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

Data type conversion improvement #47

Closed
dai-chen opened this issue May 13, 2021 · 1 comment
Closed

Data type conversion improvement #47

dai-chen opened this issue May 13, 2021 · 1 comment
Assignees
Labels
enhancement New feature or request PPL Piped processing language SQL

Comments

@dai-chen
Copy link
Collaborator

dai-chen commented May 13, 2021

Is your feature request related to a problem? Please describe.
Currently the type check is very strict and thus not very user friendly. We need to support implicit casting and make it consistent with explicit casting. For example: if A can be converted to B implicitly, this should be done by explicit CAST function too.

  1. Comparing date, timestamp and string lead to failures and Date formatted as timestamp opendistro-for-elasticsearch/sql#1056: Comparison between date and string
  2. WHERE boolField = 'true', doesn't autocast (changed behavior) opendistro-for-elasticsearch/sql#1061: Comparison between bool and string
  3. Regression?date_filed>1591459200000 does not works in latest version opendistro-for-elasticsearch/sql#510: Comparison between date and long?

Cast function in PPL: opendistro-for-elasticsearch/sql#924

More SQL types supported:

  1. DECIMAL
  2. SIGNED INT
  3. CHAR
  4. etc

Describe the solution you'd like
Relax the type check by well defined conversion rules.

Describe alternatives you've considered
Follow the strict data type grammar, such as TIMESTAMP(...).

@dai-chen dai-chen added enhancement New feature or request PPL Piped processing language SQL Priority-Medium labels May 13, 2021
@dai-chen dai-chen self-assigned this May 27, 2021
@dai-chen
Copy link
Collaborator Author

More SQL type support will be worked on as needed in future. Closing for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request PPL Piped processing language SQL
Projects
None yet
Development

No branches or pull requests

2 participants