quxiucheng commented on a change in pull request #1568: [CALCITE-3486] In JDBC
adapter, when generating ROW value expression, generates the ROW keyword only
if the dialect allows it (quxiucheng)
URL: https://github.com/apache/calcite/pull/1568#discussion_r345000874
##########
File path: core/src/test/java/org/apache/calcite/sql/parser/SqlParserTest.java
##########
@@ -1159,6 +1159,36 @@ protected boolean isUnparserTest() {
.ok("SELECT ((`TBL`.`FOO`(0).`COL`).`BAR`)\nFROM `TBL`");
}
+ @Test public void testRowValueExpression() {
+ String expected = "INSERT INTO \"EMPS\"\n"
+ + "VALUES (ROW(1, 'Fred')),\n"
+ + "(ROW(2, 'Eric'))";
+ sql("insert into emps values ROW(1,'Fred'),ROW(2, 'Eric')")
+ .withDialect(SqlDialect.DatabaseProduct.CALCITE.getDialect())
+ .ok(expected);
+
+ expected = "INSERT INTO `emps`\n"
+ + "VALUES (1, 'Fred'),\n"
+ + "(2, 'Eric')";
+ sql("insert into emps values (1,'Fred'),(2, 'Eric')")
Review comment:
sorry,I didn't notice that
Write the wrong
----------------------------------------------------------------
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]
With regards,
Apache Git Services