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

Plan to add a new flavor: Presto SQL #98

Closed
doyonghoon opened this issue Mar 21, 2023 · 3 comments
Closed

Plan to add a new flavor: Presto SQL #98

doyonghoon opened this issue Mar 21, 2023 · 3 comments

Comments

@doyonghoon
Copy link

I am not sure if it would be an excessive demand, but I found that it will be a sole-choice for me to use in my project if Presto SQL is supported. Thanks!

@huandu
Copy link
Owner

huandu commented Mar 21, 2023

From my observation, Presto SQL is the same as MySQL SQL syntax except following. Correct me if I'm wrong.

  • Presto uses LIMIT n OFFSET m whereas MySQL uses LIMIT n, m;
  • Presto uses from_hex('abcdef') to create binary data whereas MySQL uses 0xabcdef to do so.

I can implement new Presto flavor in this weekend if above is all I need to do.

@doyonghoon
Copy link
Author

@huandu Hey, thanks for the quick response! Yeah, that looks good to me. In a case where missing pieces are found, then I may be available to open a new PR to cover other corner cases. Greatly appreciated your time!

@tengteng22
Copy link

From my observation, Presto SQL is the same as MySQL SQL syntax except following. Correct me if I'm wrong.

  • Presto uses LIMIT n OFFSET m whereas MySQL uses LIMIT n, m;
  • Presto uses from_hex('abcdef') to create binary data whereas MySQL uses 0xabcdef to do so.

I can implement new Presto flavor in this weekend if above is all I need to do.

From prestoDB doc I think OFFSET goes before LIMIT.
This caused issue when I use this library to build a SQL query against AWS Athena (which is Presto SQL):
mismatched input 'OFFSET'. Expecting: <EOF>

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

3 participants