You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@calcite.apache.org by GitBox <gi...@apache.org> on 2022/05/19 02:52:51 UTC

[GitHub] [calcite] chunweilei commented on a diff in pull request #2808: [CALCITE-5157] Fix ClassCastException in checkRollUp with DOT operator

chunweilei commented on code in PR #2808:
URL: https://github.com/apache/calcite/pull/2808#discussion_r876540880


##########
core/src/test/java/org/apache/calcite/test/ReflectiveSchemaTest.java:
##########
@@ -329,6 +329,16 @@ private int count(ResultSet resultSet) throws SQLException {
         .returnsUnordered("CITY=Heraklion", "CITY=Besançon", "CITY=Ionia");
   }
 
+  /** Test case for
+   * <a href="https://issues.apache.org/jira/browse/CALCITE-5157">[CALCITE-5157]
+   * ClassCastException in checkRollUp with DOT operator</a>. */
+  @Test void testSelectWithFieldAccessOnFirstLevelRecordTypeWithParentheses() {
+    CalciteAssert.that()
+        .with(CalciteAssert.SchemaSpec.BOOKSTORE)
+        .query("select (\"birthPlace\").\"city\" as city from \"bookstore\".\"authors\"\n")
+        .returnsUnordered("CITY=Heraklion", "CITY=Besançon", "CITY=Ionia");
+  }

Review Comment:
   Thank you for your PR, @viliam-durina. I left some comments in JIRA.



-- 
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: commits-unsubscribe@calcite.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org