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 2020/08/29 03:57:31 UTC

[GitHub] [calcite] julianhyde commented on a change in pull request #2124: [CALCITE-4173] Add internal SEARCH operator and Sarg literal that represents a set of values or ranges

julianhyde commented on a change in pull request #2124:
URL: https://github.com/apache/calcite/pull/2124#discussion_r479603588



##########
File path: core/src/main/java/org/apache/calcite/rel/rel2sql/RelToSqlConverter.java
##########
@@ -640,10 +640,10 @@ public Result visit(Values e) {
         // In case of empty values, we need to build:
         // select * from VALUES(NULL, NULL ...) as T (C1, C2 ...)
         // where 1=0.
-        List<SqlNode> nulls = IntStream.range(0, fieldNames.size())
-            .mapToObj(i ->
-                SqlLiteral.createNull(POS)).collect(Collectors.toList());
-        selects.add(ANONYMOUS_ROW.createCall(new SqlNodeList(nulls, POS)));
+        SqlNodeList nulls = IntStream.range(0, fieldNames.size())
+            .mapToObj(i -> SqlLiteral.createNull(POS))
+            .collect(SqlNode.toList());

Review comment:
       Fine. I didn't create that code, just reformatted it.




----------------------------------------------------------------
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:
users@infra.apache.org