Skip to content

Conversation

davyboyhayes
Copy link
Contributor

@davyboyhayes davyboyhayes commented Sep 9, 2025

Fixes #2306
Trino SQL allows you to specify User Defined functions in the WITH clause ahead of a statement. This adds support for this type of statement.

Trino SQL allows you to specify User Defined functions in the WITH clause ahead of a statement. This adds support for this type of statement.
@davyboyhayes
Copy link
Contributor Author

It's almost midnight here, so I will need to do the JMH tests in the morning (~0800 UTC)

@davyboyhayes
Copy link
Contributor Author

jmh {
    includes = ['.*JSQLParserBenchmark.*']
    warmupIterations = 2
    fork = 5
    iterations = 5
    timeOnIteration = '5s'
}

After:

  34.537 ±(99.9%) 1.669 ms/op [Average]
  (min, avg, max) = (31.524, 34.537, 36.699), stdev = 2.228
  CI (99.9%): [32.869, 36.206] (assumes normal distribution)

Before:

  36.172 ±(99.9%) 0.175 ms/op [Average]
  (min, avg, max) = (35.851, 36.172, 36.662), stdev = 0.233
  CI (99.9%): [35.997, 36.347] (assumes normal distribution)

Trino SQL allows you to specify User Defined functions in the WITH clause ahead of a statement. This adds support for this type of statement.
@davyboyhayes
Copy link
Contributor Author

I've fixed the spotbugs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] JSQLParser 5.4-SNAPSHOT : TRINO : WITH FUNCTION udf - unsupported
1 participant