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

[BUG] Failed to convert date type field with epoch format #170

Closed
chloe-zh opened this issue Jul 27, 2021 · 1 comment
Closed

[BUG] Failed to convert date type field with epoch format #170

chloe-zh opened this issue Jul 27, 2021 · 1 comment
Labels
bug Something isn't working Priority-High SQL

Comments

@chloe-zh
Copy link
Contributor

Describe the bug
Date field with epoch format (epoch-millis, epoch-second etc.) failed with message: Construct ExprTimestampValue from "1623267788498" failed, unsupported date format.

To Reproduce

PUT testdata/_mapping
{
    "properties": {
      "date": {
        "type":   "date",
        "format": "epoch_millis"
      }
    }
}
PUT testdata/_bulk
{"index":{"_id":"1"}}
{"date":1420070400001}
POST _opendistro/_sql
{
  "query": "select * from testdata"
}

Expected behavior

{
  "schema": [{
    "name": "date",
    "type": "date"
  }],
  "total": 1,
  "datarows": [["2015-01-01 00:00:00.001"]],
  "size": 1,
  "status": 200
}

Plugins
SQL

Screenshots
NA

Host/Environment (please complete the following information):
NA

Additional context
NA

@chloe-zh chloe-zh added bug Something isn't working SQL Priority-High labels Jul 27, 2021
@chloe-zh
Copy link
Contributor Author

Another issue that is related to incompatible format of date and time type data: #126

SpartanApple pushed a commit to SpartanApple/opensearch-sql that referenced this issue Dec 24, 2022
…tionTesting

Adding mutation testing to build gradle with PiTest
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Priority-High SQL
Projects
None yet
Development

No branches or pull requests

1 participant