Package org.apache.iceberg
Class BaseScanTaskGroup<T extends ScanTask>
- java.lang.Object
-
- org.apache.iceberg.BaseScanTaskGroup<T>
-
- All Implemented Interfaces:
java.io.Serializable
,ScanTask
,ScanTaskGroup<T>
public class BaseScanTaskGroup<T extends ScanTask> extends java.lang.Object implements ScanTaskGroup<T>
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description BaseScanTaskGroup(java.util.Collection<T> tasks)
BaseScanTaskGroup(StructLike groupingKey, java.util.Collection<T> tasks)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long
estimatedRowsCount()
The estimated number of rows produced by this scan task.int
filesCount()
The number of files that will be opened by this scan task.StructLike
groupingKey()
Returns a grouping key for this task group.long
sizeBytes()
The number of bytes that should be read by this scan task.java.util.Collection<T>
tasks()
Returns scan tasks in this group.java.lang.String
toString()
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.apache.iceberg.ScanTask
asCombinedScanTask, asDataTask, asFileScanTask, isDataTask, isFileScanTask
-
-
-
-
Constructor Detail
-
BaseScanTaskGroup
public BaseScanTaskGroup(StructLike groupingKey, java.util.Collection<T> tasks)
-
BaseScanTaskGroup
public BaseScanTaskGroup(java.util.Collection<T> tasks)
-
-
Method Detail
-
groupingKey
public StructLike groupingKey()
Description copied from interface:ScanTaskGroup
Returns a grouping key for this task group.A grouping key is a set of values that are common amongst all rows produced by the tasks in this task group. The values may be the result of transforming the underlying data. For example, a grouping key can consist of a bucket ordinal computed by applying a bucket transform to a column of the underlying rows. The grouping key type is determined at planning time and is identical across all task groups produced by a scan.
Implementations should return an empty struct if the data grouping is random or unknown.
- Specified by:
groupingKey
in interfaceScanTaskGroup<T extends ScanTask>
- Returns:
- a grouping key for this task group
-
tasks
public java.util.Collection<T> tasks()
Description copied from interface:ScanTaskGroup
Returns scan tasks in this group.- Specified by:
tasks
in interfaceScanTaskGroup<T extends ScanTask>
-
sizeBytes
public long sizeBytes()
Description copied from interface:ScanTask
The number of bytes that should be read by this scan task.
-
estimatedRowsCount
public long estimatedRowsCount()
Description copied from interface:ScanTask
The estimated number of rows produced by this scan task.- Specified by:
estimatedRowsCount
in interfaceScanTask
- Specified by:
estimatedRowsCount
in interfaceScanTaskGroup<T extends ScanTask>
- Returns:
- the estimated number of produced rows
-
filesCount
public int filesCount()
Description copied from interface:ScanTask
The number of files that will be opened by this scan task.- Specified by:
filesCount
in interfaceScanTask
- Specified by:
filesCount
in interfaceScanTaskGroup<T extends ScanTask>
- Returns:
- the number of files to open
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-