Skip to content

SQL: rename DataType.DATE to something else #36440

@costin

Description

@costin

While respecting the Elasticsearch type naming, Es-SQL has a DATE type which in practice is a DateTime.
However this clashes with the SQL type DATE causing a lot of confusion especially when migrating.

Several options were discussed going forward:

  1. rename date

Rename date to datetime. This adds more meaning to the content however breaks the convention that it maps the elasticsearch date type.
On the upside there's no collision with the SQL types and allows the SQL date type if needed.

  1. rename date to timestamp

This is a variant of 1 however it follows the SQL terminology which might be both confusing and clear.

  1. don't expose ES types in the queries

Prevent the problem from exposing by not allowing the user to create the ES data types (typically through CAST - CAST ('1' AS KEYWORD). This will impact testing and be asymmetric since such types are returned as results. Further more, the confusion around date remains since it shows up in the table description.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions