zhangjun0x01 commented on a change in pull request #1822:
URL: https://github.com/apache/iceberg/pull/1822#discussion_r535791036
##########
File path: flink/src/main/java/org/apache/iceberg/flink/IcebergTableSource.java
##########
@@ -36,25 +36,30 @@
/**
* Flink Iceberg table source.
- * TODO: Implement {@link FilterableTableSource} and {@link
LimitableTableSource}.
+ * TODO: Implement {@link FilterableTableSource}
*/
-public class IcebergTableSource implements StreamTableSource<RowData>,
ProjectableTableSource<RowData> {
+public class IcebergTableSource
+ implements StreamTableSource<RowData>, ProjectableTableSource<RowData>,
LimitableTableSource<RowData> {
private final TableLoader loader;
private final TableSchema schema;
private final Map<String, String> properties;
private final int[] projectedFields;
+ private boolean isLimitPushDown = false;
+ private long limit = -1L;
Review comment:
I also think we can judge whether to pushdown by the value of limit, but
the
[LimitableTableSource](https://github.com/apache/flink/blob/release-1.11/flink-table/flink-table-common/src/main/java/org/apache/flink/table/sources/LimitableTableSource.java)
interface provides two methods, `isLimitPushedDown` and `applyLimit`. From the
method comments, I think the author wants to judge whether to pushdown by the
`isLimitPushedDown` method.
In versions after flink 1.12, a new interface
[SupportsLimitPushDown](https://github.com/apache/flink/blob/release-1.12/flink-table/flink-table-common/src/main/java/org/apache/flink/table/connector/source/abilities/SupportsLimitPushDown.java)
is provided. This interface only provides one method. I think we can judge
pushdown by the value of limit
----------------------------------------------------------------
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]