danny0405 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_r345169088
##########
File path: core/src/main/java/org/apache/calcite/sql/SqlDialect.java
##########
@@ -448,6 +448,31 @@ public void unparseCall(SqlWriter writer, SqlCall call,
int leftPrec,
call.getOperator().unparse(writer, call, leftPrec, rightPrec);
}
+ public void unparseRow(SqlWriter writer,
+ SqlCall call, int leftPrec, int rightPrec) {
+ if (getConformance().allowExplicitRowValueConstructor()) {
+ SqlUtil.unparseFunctionSyntax(call.getOperator(), writer, call);
+ } else {
+ if (" ".equals(call.getOperator().getName())) {
+ writer.print(call.getOperator().getName());
+ }
+ if (writer.isAlwaysUseParentheses()) {
+ for (SqlNode operand : call.getOperandList()) {
+ writer.sep(",");
Review comment:
Can you explain why we need this decision ?
----------------------------------------------------------------
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