You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by GitBox <gi...@apache.org> on 2022/06/21 23:51:26 UTC

[GitHub] [iceberg] flyrain commented on a diff in pull request #5077: API: Refactor FileScanTask

flyrain commented on code in PR #5077:
URL: https://github.com/apache/iceberg/pull/5077#discussion_r903157058


##########
api/src/main/java/org/apache/iceberg/ContentScanTask.java:
##########
@@ -0,0 +1,68 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.iceberg;
+
+import org.apache.iceberg.expressions.Expression;
+
+/**
+ * A scan task over a range of bytes in a content file.
+ *
+ * @param <F> the Java class of the content file
+ */
+public interface ContentScanTask<F extends ContentFile<F>> extends ScanTask {
+  /**
+   * The {@link ContentFile file} to scan.
+   *
+   * @return the file to scan
+   */
+  F file();
+
+  /**
+   * The {@link PartitionSpec spec} used to store this file.
+   *
+   * @return the partition spec from this file's manifest
+   */
+  PartitionSpec spec();
+
+  /**
+   * The starting position of this scan range in the file.
+   *
+   * @return the start position of this scan range
+   */
+  long start();
+
+  /**
+   * The number of bytes to scan from the {@link #start()} position in the file.
+   *
+   * @return the length of this scan range in bytes
+   */
+  long length();
+
+  /**
+   * Returns the residual expression that should be applied to rows in this file scan.
+   * <p>
+   * The residual expression for a file is a filter expression created from the scan's filter, inclusive

Review Comment:
   inclusive -> included? This Java doc is copied from FileScanTask. I'm OK to improve it in another PR.



-- 
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: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org