vlsi commented on a change in pull request #2441:
URL: https://github.com/apache/calcite/pull/2441#discussion_r654914132



##########
File path: core/src/main/java/org/apache/calcite/adapter/jdbc/JdbcTable.java
##########
@@ -130,7 +130,7 @@
 
   private List<Pair<ColumnMetaData.Rep, Integer>> fieldClasses(
       final JavaTypeFactory typeFactory) {
-    final RelDataType rowType = requireNonNull(protoRowType, 
"protoRowType").apply(typeFactory);
+    final RelDataType rowType = getRowType(typeFactory);

Review comment:
       Just for the reference, the previous code was 
`protoRowType.apply(typeFactory)` (see 
https://github.com/apache/calcite/blob/2f2fc406f4675a9ca16e3c0a352cfa4f2a1bc047/core/src/main/java/org/apache/calcite/adapter/jdbc/JdbcTable.java#L130),
 so nullness verifier was right that `protoRowType` should not be used like 
that.
   
   I added `requireNonNull` just to avoid unrelated changes.




-- 
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]


Reply via email to