aokolnychyi commented on code in PR #4566:
URL: https://github.com/apache/iceberg/pull/4566#discussion_r850881483
##########
core/src/main/java/org/apache/iceberg/BaseMetadataTableScan.java:
##########
@@ -19,39 +19,50 @@
package org.apache.iceberg;
-import org.apache.iceberg.events.Listeners;
-import org.apache.iceberg.events.ScanEvent;
-import org.apache.iceberg.io.CloseableIterable;
import org.apache.iceberg.util.PropertyUtil;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
abstract class BaseMetadataTableScan extends BaseTableScan {
- private static final Logger LOG =
LoggerFactory.getLogger(BaseMetadataTableScan.class);
- protected BaseMetadataTableScan(TableOperations ops, Table table, Schema
schema) {
+ private final MetadataTableType tableType;
+
+ protected BaseMetadataTableScan(TableOperations ops, Table table, Schema
schema, MetadataTableType tableType) {
super(ops, table, schema);
+ this.tableType = tableType;
}
- protected BaseMetadataTableScan(TableOperations ops, Table table, Schema
schema, TableScanContext context) {
+ protected BaseMetadataTableScan(TableOperations ops, Table table, Schema
schema, MetadataTableType tableType,
+ TableScanContext context) {
super(ops, table, schema, context);
+ this.tableType = tableType;
+ }
+
+ /**
+ * Type of scan being performed, such as {@link
MetadataTableType#ALL_DATA_FILES} when scanning
+ * a table's {@link org.apache.iceberg.AllDataFilesTable}.
+ * <p>
+ * Used for logging and error messages.
+ */
+ protected MetadataTableType tableType() {
+ return tableType;
+ }
+
+ @Override
+ public TableScan appendsBetween(long fromSnapshotId, long toSnapshotId) {
Review Comment:
None of the metadata tables support incremental scans so we can share this
logic.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]