zabetak commented on a change in pull request #138:
URL: https://github.com/apache/calcite-avatica/pull/138#discussion_r602619681
##########
File path: core/src/main/java/org/apache/calcite/avatica/Meta.java
##########
@@ -685,7 +686,14 @@ public static CursorFactory deduce(List<ColumnMetaData>
columns,
if (List.class.isAssignableFrom(resultClazz)) {
return LIST;
}
- return record(resultClazz);
+ // columns for MetaImpl internal classes do not match field names,
"record" would fail
+ // can be removed once CALCITE-2489 is merged in Calcite
+ if
(resultClazz.getName().startsWith("org.apache.calcite.avatica.MetaImpl")
+ && !resultClazz.getName().endsWith("MetaTable")) {
+ return ARRAY;
+ }
Review comment:
Usually when there is a breaking change people update `history.md`
directly when they commit the change. During the release the release manager
will make a pass on `history.md` to add commits etc. and reorganise/reword the
content as they see fit.
The message looks good although it doesn't explain for instance that
previous working code might now throw something like the following:
`java.lang.RuntimeException: java.lang.NoSuchFieldException: TABLE_CAT` Why
this happens and how should they fix it?
--
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]