[bug] CAST after expression causes weird exception
See original GitHub issueBug report
select
playerID,
cast(hits as long) AS totalHits
from baseballStats
order by totalHits DESC
or
select
playerID,
count(cast(hits as long)) AS totalHits
from baseballStats
group by playerID
order by totalHits DESC
works fine.
but:
select
playerID,
cast(count(hits) as long) AS totalHits
from baseballStats
group by playerID
order by totalHits DESC
gives
[
{
"message": "QueryExecutionError:
ProcessingException(errorCode:450, message:InternalError:
java.lang.NullPointerException
at org.apache.pinot.core.operator.combine.GroupByOrderByCombineOperator.mergeResults(GroupByOrderByCombineOperator.java:236).
at
org.apache.pinot.core.operator.combine.BaseCombineOperator.getNextBlock(BaseCombineOperator.java:119)
at org.apache.pinot.core.operator.combine.BaseCombineOperator.getNextBlock(BaseCombineOperator.java:50)",
"errorCode": 200
}
]
what’s more
select
playerID,
cast(count(hits) as long) AS totalHits
from baseballStats
group by playerID
without order by gives a non-descriptive exception
ProcessingException(errorCode:450, message:InternalError:
java.io.IOException: Failed : HTTP error code : 500
at org.apache.pinot.controller.api.resources.PinotQueryResource.sendPostRaw(PinotQueryResource.java:305)
at org.apache.pinot.controller.api.resources.PinotQueryResource.sendRequestRaw(PinotQueryResource.java:343)
at org.apache.pinot.controller.api.resources.PinotQueryResource.getQueryResponse(PinotQueryResource.java:225)
at org.apache.pinot.controller.api.resources.PinotQueryResource.handlePostSql(PinotQueryResource.java:137))
Issue Analytics
- State:
- Created a year ago
- Comments:8 (8 by maintainers)
Top Results From Across the Web
Bug descriptions — spotbugs 4.7.3 documentation
Asserting type checks in tests is not recommended as a class cast exception message could better indicate the cause of an instance of...
Read more >java - LambdaConversionException with generics: JVM bug?
The exception is thrown trying to resolve entity::filename . filename() is declared in HasImagesEntity . As far as I can tell, I get...
Read more >Bug listing with status RESOLVED with resolution FIXED as at ...
configure" status:RESOLVED resolution:FIXED severity:normal · Bug:188 - "environment variable GZIP cause pilot-link-0.9.6.ebuild (kde) to fail ?
Read more >Solving 5 Mysterious Spark Errors | by yhoztak - Medium
Problem 1: Resolved attribute(s) your_field#xx missing from ….. The actual error looks like this and noted in Spark Jira Exception in thread "main"...
Read more >Errors and Exceptions | Learn You Some Erlang for Great Good!
Badmatch errors happen whenever pattern matching fails. This most likely means you're trying to do impossible pattern matches (such as above), trying to...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Scalar function is used in the following places:
For post aggregation transform and transform, if the result class for the scalar function is dynamic, we will treat it as
STRING
. In order to solve this problem, we need to add the support to derive the result type from the arguments’ type.for the purpose of index use i think the PR works well. it doesn’t solve what’s describe in this issue though