mihaibudiu commented on code in PR #5342:
URL: https://github.com/apache/calcite/pull/5342#discussion_r4308219739


##########
druid/src/main/java/org/apache/calcite/adapter/druid/DruidQuery.java:
##########
@@ -712,7 +713,8 @@ protected QuerySpec deriveQuerySpec() {
           numericCollationBitSetBuilder.set(fCol.getFieldIndex());
         }
       }
-      fetch = sort.fetch != null ? RexLiteral.intValue(sort.fetch) : null;
+      fetch = sort.fetch != null

Review Comment:
   this may be a breaking change: the previous code allowed fractional values.
   Maybe you just need to round, check what SQL expects.



##########
cassandra/src/main/java/org/apache/calcite/adapter/cassandra/CassandraLimit.java:
##########
@@ -59,10 +59,10 @@ public CassandraLimit(RelOptCluster cluster, RelTraitSet 
traitSet,
   @Override public void implement(Implementor implementor) {
     implementor.visitChild(0, getInput());
     if (offset != null) {
-      implementor.offset = RexLiteral.intValue(offset);
+      implementor.offset = RexLiteral.bigDecimalValue(offset).intValueExact();

Review Comment:
   this will throw if the value is not an integer.
   Did you check what Cassandra expects?



-- 
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