intuit / superglue

Superglue is a lineage-tracking tool built to help visualize the propagation of data through complex pipelines composed of tables, jobs and reports.
Apache License 2.0
155 stars 37 forks source link

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

Open sambekar15 opened 3 years ago

sambekar15 commented 3 years ago

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 commented 3 years ago

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

samik-saha commented 2 years ago

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" ...