zhztheplayer commented on a change in pull request #1210: CALCITE-3065,
consider primitive type in method RexLiteral#getValueAs.
URL: https://github.com/apache/calcite/pull/1210#discussion_r286390955
##########
File path: core/src/main/java/org/apache/calcite/rex/RexLiteral.java
##########
@@ -970,7 +970,7 @@ public Comparable getValue4() {
}
break;
case DECIMAL:
- if (clazz == Long.class) {
+ if (clazz == Long.class || clazz == long.class) {
Review comment:
@Aaaaaaron - How does such logic work?
I tested against following case on Java 8:
```
long.class.cast(1L);
```
Then I encountered ClassCastException:
```
Exception in thread "main" java.lang.ClassCastException: Cannot cast
java.lang.Long to long
```
Are we on different platforms?
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services