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

SQL: multiply operation between INTERVALs and NULL is not possible #49297

Closed
astefan opened this issue Nov 19, 2019 · 3 comments · Fixed by #49633
Closed

SQL: multiply operation between INTERVALs and NULL is not possible #49297

astefan opened this issue Nov 19, 2019 · 3 comments · Fixed by #49633
Assignees
Labels

Comments

@astefan
Copy link
Contributor

astefan commented Nov 19, 2019

SELECT NULL * INTERVAL 1 DAY results in:

{
  "error" : {
    "root_cause" : [
      {
        "type" : "verification_exception",
        "reason" : "Found 1 problem(s)\nline 1:8: [*] has arguments with incompatible types [NULL] and [INTERVAL_DAY]"
      }
    ],
    "type" : "verification_exception",
    "reason" : "Found 1 problem(s)\nline 1:8: [*] has arguments with incompatible types [NULL] and [INTERVAL_DAY]"
  },
  "status" : 400
}
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-search (:Search/SQL)

@astefan astefan self-assigned this Nov 19, 2019
@matriv
Copy link
Contributor

matriv commented Nov 21, 2019

@astefan: Hint: Mul's resolveType() uses DataType functions (e.g.: isNumeric()) and not the TypeResolutions ones which allow the NULL data type. We should check everywhere for this and fixit.

@astefan
Copy link
Contributor Author

astefan commented Dec 3, 2019

master (8.0.0): ce72761
7.x (7.6.0): astefan@e2982b2
7.5 (7.5.1): b996671

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants