mihaibudiu commented on code in PR #4212:
URL: https://github.com/apache/calcite/pull/4212#discussion_r1969106396
##########
core/src/main/java/org/apache/calcite/adapter/jdbc/JdbcToEnumerableConverter.java:
##########
@@ -155,22 +162,53 @@ protected JdbcToEnumerableConverter(
}
final ParameterExpression e_ =
Expressions.parameter(SQLException.class, builder.newName("e"));
+ BlockStatement valueBlock;
+ if (fieldCount == 0) {
+ // For some queries, we don't need to rely on a specific column value in
the data source,
+ // we only need to know the number of rows in the table.
+ // For example: "select row_number() over () from dept"
+ // we can't push down the "row_number() over ()"
+ // So the generate code should be:
Review Comment:
generated
--
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]