Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing support for presto : TABLESAMPLE BERNOULLI clause #1593

Closed
ctdcj opened this issue Jul 18, 2022 · 3 comments
Closed

Missing support for presto : TABLESAMPLE BERNOULLI clause #1593

ctdcj opened this issue Jul 18, 2022 · 3 comments
Assignees

Comments

@ctdcj
Copy link

ctdcj commented Jul 18, 2022

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>
@manticore-projects
Copy link
Contributor

manticore-projects commented Jul 18, 2022

Greetings.
You will need to provide much more information please:

  1. What RDBMS
  2. What Version of JSQLParser
  3. 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"

@ctdcj
Copy link
Author

ctdcj commented Jul 18, 2022

Greetings.
I am using jsqlparser version 4.4 and the corresponding database is prestodb.

@ctdcj ctdcj changed the title BERNOULLI EXCEPTION Missing support for presto : TABLESAMPLE BERNOULLI clause Jul 18, 2022
@manticore-projects manticore-projects self-assigned this May 11, 2023
@manticore-projects
Copy link
Contributor

Working on it, since it is SQL:2016 compliant.

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

No branches or pull requests

2 participants