Package io.delta.kernel.internal.metrics
Class ScanReportImpl
Object
io.delta.kernel.internal.metrics.DeltaOperationReportImpl
io.delta.kernel.internal.metrics.ScanReportImpl
- All Implemented Interfaces:
DeltaOperationReport,MetricsReport,ScanReport
A basic POJO implementation of
ScanReport for creating them-
Constructor Summary
ConstructorsConstructorDescriptionScanReportImpl(String tablePath, long tableVersion, StructType tableSchema, UUID snapshotReportUUID, Optional<Predicate> filter, StructType readSchema, Optional<Predicate> partitionPredicate, Optional<Predicate> dataSkippingFilter, boolean isFullyConsumed, ScanMetrics scanMetrics, Optional<Exception> exception) -
Method Summary
Modifier and TypeMethodDescriptionbooleanWhether the scan file iterator had been fully consumed when it was closed.longtoJson()Converts this metrics report to a JSON string representation.Methods inherited from class io.delta.kernel.internal.metrics.DeltaOperationReportImpl
getException, getReportUUID, getTablePathMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.delta.kernel.metrics.DeltaOperationReport
getException, getReportUUID, getTablePathMethods inherited from interface io.delta.kernel.metrics.ScanReport
getOperationType
-
Constructor Details
-
ScanReportImpl
public ScanReportImpl(String tablePath, long tableVersion, StructType tableSchema, UUID snapshotReportUUID, Optional<Predicate> filter, StructType readSchema, Optional<Predicate> partitionPredicate, Optional<Predicate> dataSkippingFilter, boolean isFullyConsumed, ScanMetrics scanMetrics, Optional<Exception> exception)
-
-
Method Details
-
getTableVersion
public long getTableVersion()- Specified by:
getTableVersionin interfaceScanReport- Returns:
- the version of the table in this scan
-
getTableSchema
- Specified by:
getTableSchemain interfaceScanReport- Returns:
- the schema of the table for this scan
-
getSnapshotReportUUID
- Specified by:
getSnapshotReportUUIDin interfaceScanReport- Returns:
- the
DeltaOperationReport.getReportUUID()for the snapshot this scan was created from
-
getFilter
- Specified by:
getFilterin interfaceScanReport- Returns:
- the filter provided when building the scan
-
getReadSchema
- Specified by:
getReadSchemain interfaceScanReport- Returns:
- the read schema provided when building the scan
-
getPartitionPredicate
- Specified by:
getPartitionPredicatein interfaceScanReport- Returns:
- the part of
ScanReport.getFilter()that was used for partition pruning
-
getDataSkippingFilter
- Specified by:
getDataSkippingFilterin interfaceScanReport- Returns:
- the filter used for data skipping using the file statistics
-
getIsFullyConsumed
public boolean getIsFullyConsumed()Description copied from interface:ScanReportWhether the scan file iterator had been fully consumed when it was closed. The iterator may be closed early (before being fully consumed) either due to an exception originating within connector code or intentionally (such as for a LIMIT query).- Specified by:
getIsFullyConsumedin interfaceScanReport- Returns:
- whether the scan file iterator had been fully consumed when it was closed
-
getScanMetrics
- Specified by:
getScanMetricsin interfaceScanReport- Returns:
- the metrics for this scan
-
toJson
Description copied from interface:MetricsReportConverts this metrics report to a JSON string representation.- Specified by:
toJsonin interfaceMetricsReport- Returns:
- a JSON string representation of this metrics report
- Throws:
com.fasterxml.jackson.core.JsonProcessingException- if the report cannot be serialized to JSON
-