You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[BUG] DATE('data') or TIMESTAMP('data') does not return null #580
What is the bug?
DATE('data') or TIMESTAMP('data') does not return null
How can one reproduce the bug?
Steps to reproduce the behavior:
Make a query SELECT DATE('data')
See that the output is
"error": {
"type": "SemanticCheckException",
"reason": "Invalid Query",
"details": "date:data in unsupported format, please use yyyy-MM-dd"
},
"status": 400
What is the expected behavior?
Tableau's TDVT tests expects NULL
Do you have any additional context?
I've tried TIMESTAMP('data'), CAST('data' AS DATE), and DATE_FORMAT('date', '%Y-%m-%d') however, they do not return null.
This issue affects TDVT test exprtests/standard\setup.string.isdate.txt
I am trying to change data type using query workbench I want to change data type date to timestamp using query for output schema in other DB but I am not able to do and opensearch having not supporting like cast kind of query any one can help it’s Urgent
query - select timestamp(datecolumn) as date from table
Can you verify the format of the data in datecolumn?
@acarbonetto
Hello Sir I am using query bench I think both opensearchsql and querybench both can give a result
the issue is I have field name as order.date and feild type is data type is date I want to convert this feild date to timestamp
because I want timestamp data . Date is taking only date data How can I achive this using query bench.
Can you verify the format of the data in datecolumn?
@acarbonetto Hello Sir I am using query bench I think both opensearchsql and querybench both can give a result the issue is I have field name as order.date and feild type is data type is date I want to convert this feild date to timestamp because I want timestamp data . Date is taking only date data How can I achive this using query bench.
@dharminfadia you can use timestamp to convert a date to a timestamp. You need to explicitly convert dates to timestamps since the parser doesn't do any automatic conversion/casting.
However, there are a couple of datetime issues currently in the SQL plugin - and only a limited number of datetime functions exist in the new parser. If you're getting an error, could you include it? It might be caused by one of these datetime issues.
Activity
Added ISDATE back as a function as it should be supported once the bug …
Added ISDATE back as a function as it should be supported once the bug …
Added ISDATE back as a function as it should be supported once the bug …
dharminfadia commentedon Jun 9, 2022
Hello Every One
I am trying to change data type using query workbench I want to change data type date to timestamp using query for output schema in other DB but I am not able to do and opensearch having not supporting like cast kind of query any one can help it’s Urgent
query - select timestamp(datecolumn) as date from table
above query is not working plase help !!!
acarbonetto commentedon Jun 20, 2022
@dharminfadia I'm unable to reproduce your scenario. Here's the query that I attempted:
Can you verify the format of the data in
datecolumn?dharminfadia commentedon Jun 21, 2022
@acarbonetto
Hello Sir I am using query bench I think both opensearchsql and querybench both can give a result
the issue is I have field name as order.date and feild type is data type is date I want to convert this feild date to timestamp
because I want timestamp data . Date is taking only date data How can I achive this using query bench.
dharminfadia commentedon Jun 30, 2022
@acarbonetto
Have you check this thing ?
acarbonetto commentedon Jun 30, 2022
@dharminfadia you can use timestamp to convert a date to a timestamp. You need to explicitly convert dates to timestamps since the parser doesn't do any automatic conversion/casting.
QueryBench/SQL-CLI should return the same result.
However, there are a couple of datetime issues currently in the SQL plugin - and only a limited number of datetime functions exist in the new parser. If you're getting an error, could you include it? It might be caused by one of these datetime issues.