Description
SQLGlot currently transpiles GROUP BY ALL from Databricks to Exasol without rewriting it, even though Exasol does not support GROUP BY ALL. Databricks supports GROUP BY ALL as shorthand to group by all non-aggregate select expressions, but Exasol requires explicit grouping expressions.
As a result, the generated Exasol SQL is invalid.
Example
SELECT car_model, COUNT(*) FROM dealer GROUP BY ALL;
Current Behaviour
SQLGlot transpiles to Exasol as:
SELECT
car_model,
COUNT(*)
FROM dealer
GROUP BY ALL
This is invalid because Exasol does not support GROUP BY ALL.
Expected Behaviour
SQLGlot should transpile to valid Exasol SQL:
SELECT
car_model,
COUNT(*)
FROM dealer
GROUP BY car_model
Proposed solution
Add generator support in the Exasol dialect to:
• Detect GROUP BY ALL
• Expand it to explicit grouping expressions based on non-aggregate select columns
• Generate valid Exasol SQL
without modifying the original AST, ensuring correct dialect transpilation.
Description
SQLGlot currently transpiles
GROUP BY ALLfrom Databricks to Exasol without rewriting it, even though Exasol does not supportGROUP BY ALL. Databricks supportsGROUP BY ALLas shorthand to group by all non-aggregate select expressions, but Exasol requires explicit grouping expressions.As a result, the generated Exasol SQL is invalid.
Example
Current Behaviour
SQLGlot transpiles to Exasol as:
This is invalid because Exasol does not support
GROUP BY ALL.Expected Behaviour
SQLGlot should transpile to valid Exasol SQL:
Proposed solution
Add generator support in the Exasol dialect to:
• Detect
GROUP BY ALL• Expand it to explicit grouping expressions based on non-aggregate select columns
• Generate valid Exasol SQL
without modifying the original AST, ensuring correct dialect transpilation.