Skip to content

Exasol dialect: Incorrect TYPE_MAPPING for TIMESTAMPTZ should map to TIMESTAMP #6

@nnamdi16

Description

@nnamdi16

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:

TIMESTAMPTZTIMESTAMP

This ensures:

• Valid Exasol SQL generation
• Correct type transpilation
• Consistent datatype compatibility


Metadata

Metadata

Assignees

Labels

bugUnwanted / harmful behavior

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions