olivrlee commented on code in PR #3140:
URL: https://github.com/apache/calcite/pull/3140#discussion_r1163393834
##########
core/src/main/java/org/apache/calcite/rel/externalize/RelJson.java:
##########
@@ -657,7 +721,7 @@ public RexNode toRex(RelOptCluster cluster, Object o) {
final RexBuilder rexBuilder = cluster.getRexBuilder();
if (o == null) {
return null;
- } else if (o instanceof Map) {
+ } else if (Map.class.isAssignableFrom(o.getClass())) {
final Map<String, @Nullable Object> map = (Map) o;
Review Comment:
This change is actually to allow support for classes such as [gson
LinkedHashMap](https://github.com/google/gson/blob/master/gson/src/main/java/com/google/gson/internal/LinkedTreeMap.java).
Without this change, `o instance of Map` would fail for this class.
We were making assumptions on what type of JSON deserialization library is
being used.
I'll add a comment above to clarify this
(If `o` is null it'll have been caught above)
--
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]