JSqlParser
JSqlParser copied to clipboard
Missing support for presto : TABLESAMPLE BERNOULLI clause
SELECT * FROM fact_halllogin_detail TABLESAMPLE BERNOULLI (10) where dt>=20220710 limit 10
Exception: Encountered unexpected token: "BERNOULLI" <S_IDENTIFIER> at line 1, column 49.
Was expecting one of:
";"
"CONNECT"
"EMIT"
"GROUP"
"HAVING"
"PIVOT"
"START"
"WINDOW"
<EOF>
Greetings. You will need to provide much more information please:
- What RDBMS
- What Version of JSQLParser
- What should the
BERNOULLI(10)represent, it seems to be far from any SQL dialect I know
Looks like we are talking about: https://wiki.postgresql.org/wiki/TABLESAMPLE_Implementation In short, it is not supported but you can provide or sponsor an Implementation.
Correction, it seems to be in the SQL:2003 standard also: http://www.neilconway.org/talks/hacking/ottawa/sql_standard.pdf
Suggestion: Edit the caption into something like "Missing support for SQL:2003 TABLESAMPLE clause"
Greetings. I am using jsqlparser version 4.4 and the corresponding database is prestodb.
Working on it, since it is SQL:2016 compliant.