LakshSingla commented on pull request #11923:
URL: https://github.com/apache/druid/pull/11923#issuecomment-992130236
I have updated the PR with `null` handling only in the cases when required.
I agree with @abhishekagarwal87 comment that we shouldn't perform many type
conversions if we can help it, because it might conflict with Calcite's
behavior. The original code, does circumvent this without any explicit null
check, but only because we are defaulting to original code in case something
wrong happens.
```
Object maybeBigDecimalImpl = literal.getValue();
if (maybeBigDecimalImpl instanceof BigDecimal) {
return ((BigDecimal) maybeBigDecimalImpl).longValue();
}
return literal.getValueAs(Long.class);
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]