Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to compare DATETIME and TIMESTAMP[BUG] #294

Closed
ghost opened this issue Nov 19, 2021 · 1 comment · Fixed by #1196
Closed

Unable to compare DATETIME and TIMESTAMP[BUG] #294

ghost opened this issue Nov 19, 2021 · 1 comment · Fixed by #1196
Assignees
Labels
bug Something isn't working tdvt Tableau test framework v2.6.0

Comments

@ghost
Copy link

ghost commented Nov 19, 2021

Describe the bug
Unable to compare DATETIME and TIMESTAMP for logical operators and CASE.

Or for query issues:'

  1. Run the query 'SELECT TIMESTAMP(DATE("2010-04-12")) = SUBDATE(TIMESTAMP(DATE("2010-04-12")), INTERVAL 1 HOUR)'
  2. See error "ExpressionEvaluationException"

Expected behavior
The SQL plugin should be able to compare DATETIME and TIMESTAMP or SUBDATE and ADDDATE should have output of type TIMESTAMP.

Screenshots
image

@ghost ghost added Beta bug Something isn't working untriaged labels Nov 19, 2021
@joshuali925 joshuali925 added the tdvt Tableau test framework label Nov 24, 2021
@dai-chen
Copy link
Collaborator

dai-chen commented Apr 5, 2022

The root cause seems implicit conversion between DATETIME and TIMESTAMP is not supported. Code: https://github.com/opensearch-project/sql/blob/main/core/src/main/java/org/opensearch/sql/data/type/ExprCoreType.java#L58

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working tdvt Tableau test framework v2.6.0
Projects
No open projects
Status: Done
4 participants