-
Notifications
You must be signed in to change notification settings - Fork 24.9k
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: NullPointerException when GROUPing BY #41239
Labels
Comments
Pinging @elastic/es-search |
matriv
added a commit
to matriv/elasticsearch
that referenced
this issue
May 9, 2019
Interval * integer number is a valid operation which previously was only supported for foldables (literals) and not when a field was involved. That was because: 1. There was no common type returned for that combination 2. The `BinaryArithmeticOperation` was permitting the multiplication (called by fold()) but the BinaryArithmeticProcessor didn't allow it Moreover the error message for invalid arithmetic operations was wrong because of the issue with the overloading methods of `LoggerMessageFormat.format`. Fixes: elastic#41239
pull bot
pushed a commit
to rogues-gallery/elasticsearch
that referenced
this issue
May 15, 2019
Interval * integer number is a valid operation which previously was only supported for foldables (literals) and not when a field was involved. That was because: 1. There was no common type returned for that combination 2. The `BinaryArithmeticOperation` was permitting the multiplication (called by fold()) but the BinaryArithmeticProcessor didn't allow it Moreover the error message for invalid arithmetic operations was wrong because of the issue with the overloading methods of `LoggerMessageFormat.format`. Fixes: elastic#41239 Fixes: elastic#41200
matriv
added a commit
that referenced
this issue
May 15, 2019
Interval * integer number is a valid operation which previously was only supported for foldables (literals) and not when a field was involved. That was because: 1. There was no common type returned for that combination 2. The `BinaryArithmeticOperation` was permitting the multiplication (called by fold()) but the BinaryArithmeticProcessor didn't allow it Moreover the error message for invalid arithmetic operations was wrong because of the issue with the overloading methods of `LoggerMessageFormat.format`. Fixes: #41239 Fixes: #41200 (cherry picked from commit 91039ba)
matriv
added a commit
that referenced
this issue
May 15, 2019
Interval * integer number is a valid operation which previously was only supported for foldables (literals) and not when a field was involved. That was because: 1. There was no common type returned for that combination 2. The `BinaryArithmeticOperation` was permitting the multiplication (called by fold()) but the BinaryArithmeticProcessor didn't allow it Moreover the error message for invalid arithmetic operations was wrong because of the issue with the overloading methods of `LoggerMessageFormat.format`. Fixes: #41239 Fixes: #41200 (cherry picked from commit 91039ba)
matriv
added a commit
that referenced
this issue
May 15, 2019
Interval * integer number is a valid operation which previously was only supported for foldables (literals) and not when a field was involved. That was because: 1. There was no common type returned for that combination 2. The `BinaryArithmeticOperation` was permitting the multiplication (called by fold()) but the BinaryArithmeticProcessor didn't allow it Moreover the error message for invalid arithmetic operations was wrong because of the issue with the overloading methods of `LoggerMessageFormat.format`. Fixes: #41239 Fixes: #41200 (cherry picked from commit 91039ba)
gurkankaymak
pushed a commit
to gurkankaymak/elasticsearch
that referenced
this issue
May 27, 2019
Interval * integer number is a valid operation which previously was only supported for foldables (literals) and not when a field was involved. That was because: 1. There was no common type returned for that combination 2. The `BinaryArithmeticOperation` was permitting the multiplication (called by fold()) but the BinaryArithmeticProcessor didn't allow it Moreover the error message for invalid arithmetic operations was wrong because of the issue with the overloading methods of `LoggerMessageFormat.format`. Fixes: elastic#41239 Fixes: elastic#41200
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I think this one is from the same area of issues as #41200.
SELECT (({fn CONVERT("calcs"."datetime0", SQL_DATE)} + {fn CONVERT({fn TRUNCATE((-1 * ({fn DAYOFYEAR("calcs"."datetime0")} - 1)),0)}, SQL_BIGINT)} * INTERVAL '1' DAY) + {fn CONVERT({fn TRUNCATE((3 * ({fn CONVERT({fn TRUNCATE({fn QUARTER("calcs"."datetime0")},0)}, SQL_BIGINT)} - 1)),0)}, SQL_BIGINT)} * INTERVAL '1' MONTH) AS result FROM "calcs" GROUP BY 1
SELECT (({fn CONVERT("calcs"."date2", SQL_DATE)} + {fn CONVERT({fn TRUNCATE((-1 * ({fn DAYOFYEAR("calcs"."date2")} - 1)),0)}, SQL_BIGINT)} * INTERVAL '1' DAY) + {fn CONVERT({fn TRUNCATE((3 * ({fn CONVERT({fn TRUNCATE({fn QUARTER("calcs"."date2")},0)}, SQL_BIGINT)} - 1)),0)}, SQL_BIGINT)} * INTERVAL '1' MONTH) AS result FROM "calcs" GROUP BY 1
SELECT (({fn CONVERT("calcs"."date2", SQL_DATE)} + {fn CONVERT({fn TRUNCATE((-1 * ({fn DAYOFYEAR("calcs"."date2")} - 1)),0)}, SQL_BIGINT)} * INTERVAL '1' DAY) + {fn CONVERT({fn TRUNCATE((3 * ({fn CONVERT({fn TRUNCATE({fn QUARTER("calcs"."date2")},0)}, SQL_BIGINT)} - 1)),0)}, SQL_BIGINT)} * INTERVAL '1' MONTH) AS result FROM "calcs" GROUP BY 1
SELECT (({fn CONVERT("calcs"."datetime0", SQL_DATE)} + {fn CONVERT({fn TRUNCATE((-1 * ({fn DAYOFYEAR("calcs"."datetime0")} - 1)),0)}, SQL_BIGINT)} * INTERVAL '1' DAY) + {fn CONVERT({fn TRUNCATE((3 * ({fn CONVERT({fn TRUNCATE({fn QUARTER("calcs"."datetime0")},0)}, SQL_BIGINT)} - 1)),0)}, SQL_BIGINT)} * INTERVAL '1' MONTH) AS result FROM "calcs" GROUP BY 1
The text was updated successfully, but these errors were encountered: