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

Superglue Calcite Parser : Use SqlBabelParserImpl as Parser Factory instead of SqlDdlParserImpl while creating calcite config #49

Open
sambekar15 opened this issue Jul 12, 2021 · 2 comments

Comments

@sambekar15
Copy link
Contributor

sambekar15 commented Jul 12, 2021

Is your feature request related to a problem? Please describe.
Superglue Calcite Parser uses SqlDdlParserImpl Parser Factory to create calcite Config. It sets Conformance to SqlConformanceEnum.BABEL but it is not sufficient . Many of the date/time syntaxes are fixed in SqlBabelParserImpl but not available in SqlDdlParserImpl.

Describe the solution you'd like
Change the Superglue Calcite Parser to Use SqlBabelParserImpl as Parser Factory instead of SqlDdlParserImpl while creating calcite config
SQl statements like - select date('1990-01-01') from t , select date(x) from t should succeed on parsing

@samik-saha
Copy link

@sambekar15 I would like to work on this issue as part of hacktoberfest. Could you please assign it to me.

@samik-saha
Copy link

samik-saha commented Oct 6, 2021

If I change the default parser factory to SqlBabelParserImpl, the CREATE VIEW test cases fail. I guess SqlBabelParserImpl does not support VIEWs?
image

Exception message

Encountered "VIEW" at line 1, column 8.
Was expecting one of:
    "TABLE" ...
    "OR" ...
    "MULTISET" ...
    "SET" ...
    "VOLATILE" ...
    

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