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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to