ramnes opened a new issue, #2408: URL: https://github.com/apache/datafusion-sqlparser-rs/issues/2408
`RedshiftSqlDialect` on version 0.62.0 fails to parse a few core Redshift statements that the real engine accepts (tested on Redshift 1.0.347559): ```sql -- 1. APPROXIMATE COUNT(DISTINCT) SELECT APPROXIMATE COUNT(DISTINCT id) FROM t; -- Expected: end of statement, found: ( -- 2. Column-level ENCODE in CREATE TABLE CREATE TABLE t (id INT ENCODE az64, name VARCHAR(20) ENCODE lzo); -- Expected: ',' or ')' after column definition, found: ENCODE -- 3. CREATE EXTERNAL SCHEMA (Spectrum) CREATE EXTERNAL SCHEMA s FROM DATA CATALOG DATABASE 'db' IAM_ROLE 'arn:...'; -- Expected: TABLE, found: SCHEMA ``` Each is documented, common Redshift syntax: - `APPROXIMATE COUNT(DISTINCT ...)`: HyperLogLog cardinality [(docs)](https://docs.aws.amazon.com/redshift/latest/dg/r_COUNT.html) - column-level compression `ENCODE <encoding>` in `CREATE TABLE` [(docs)](https://docs.aws.amazon.com/redshift/latest/dg/r_CREATE_TABLE_NEW.html) - `CREATE EXTERNAL SCHEMA ... FROM DATA CATALOG`: Redshift Spectrum [(docs)](https://docs.aws.amazon.com/redshift/latest/dg/r_CREATE_EXTERNAL_SCHEMA.html) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
