Description
SQLGlot currently does not correctly map the TIMESTAMPTZ type when transpiling to the Exasol dialect.
Exasol does not support TIMESTAMPTZ as a native data type. The correct equivalent type in Exasol is TIMESTAMP.
However, the current TYPE_MAPPING in the Exasol dialect does not properly map TIMESTAMPTZ to TIMESTAMP, which can result in invalid SQL being generated.
Example
SELECT CAST('2024-01-01 10:00:00+00:00' AS TIMESTAMPTZ);
Current Behaviour
SQLGlot transpiles to Exasol as:
SELECT CAST('2024-01-01 10:00:00+00:00' AS TIMESTAMPTZ);
This is invalid because Exasol does not support TIMESTAMPTZ.
Expected Behaviour
SQLGlot should transpile to valid Exasol SQL:
SELECT CAST('2024-01-01 10:00:00+00:00' AS TIMESTAMP);
Proposed solution
Update the Exasol dialect TYPE_MAPPING to correctly map:
• TIMESTAMPTZ → TIMESTAMP
This ensures:
• Valid Exasol SQL generation
• Correct type transpilation
• Consistent datatype compatibility
Description
SQLGlot currently does not correctly map the
TIMESTAMPTZtype when transpiling to the Exasol dialect.Exasol does not support
TIMESTAMPTZas a native data type. The correct equivalent type in Exasol isTIMESTAMP.However, the current
TYPE_MAPPINGin the Exasol dialect does not properly mapTIMESTAMPTZtoTIMESTAMP, which can result in invalid SQL being generated.Example
Current Behaviour
SQLGlot transpiles to Exasol as:
This is invalid because Exasol does not support
TIMESTAMPTZ.Expected Behaviour
SQLGlot should transpile to valid Exasol SQL:
Proposed solution
Update the Exasol dialect
TYPE_MAPPINGto correctly map:•
TIMESTAMPTZ→TIMESTAMPThis ensures:
• Valid Exasol SQL generation
• Correct type transpilation
• Consistent datatype compatibility