Github user twalthr commented on a diff in the pull request:
https://github.com/apache/flink/pull/2282#discussion_r73178324
--- Diff:
flink-libraries/flink-table/src/main/scala/org/apache/flink/api/table/plan/nodes/dataset/DataSetSort.scala
---
@@ -71,11 +78,57 @@ class DataSetSort(
partitionedDs = partitionedDs.sortPartition(fieldCollation._1,
fieldCollation._2)
}
+ val offsetAndFetchDS = if (offset != null) {
+ val offsetIndex = RexLiteral.intValue(offset)
+ val fetchIndex = if (fetch != null) {
+ RexLiteral.intValue(fetch) + offsetIndex
+ } else {
+ Int.MaxValue
+ }
+ if (currentParallelism != 1) {
--- End diff --
Can you swap the branches? In the parallelism check above we first checked
for `==1` otherwise it might be confusing.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---