Class ParquetTableLocation
- All Implemented Interfaces:
LogOutputAppendable
,DelegatingLivenessReferent
,LivenessReferent
,TableLocation
,TableLocationState
,PushdownFilterMatcher
,NamedImplementation
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.deephaven.engine.table.impl.locations.TableLocation
TableLocation.Listener
-
Field Summary
Fields inherited from class io.deephaven.engine.table.impl.locations.impl.SubscriptionAggregator
subscriptions
Fields inherited from interface io.deephaven.engine.table.impl.locations.TableLocationState
NULL_SIZE, NULL_TIME
-
Constructor Summary
ConstructorsConstructorDescriptionParquetTableLocation
(@NotNull TableKey tableKey, @NotNull ParquetTableLocationKey tableLocationKey, @NotNull ParquetInstructions readInstructions) -
Method Summary
Modifier and TypeMethodDescriptionvoid
estimatePushdownFilterCost
(WhereFilter filter, RowSet selection, boolean usePrev, PushdownFilterContext context, JobScheduler jobScheduler, LongConsumer onComplete, Consumer<Exception> onError) Estimate the cost of pushing down the next pushdown filter.Get a list of the columns by which this location is indexedGet a name for the implementing class.@NotNull List<SortColumn>
Get an ordered list of columns this location is sorted by.boolean
hasDataIndex
(@NotNull String... columns) Check if this TableLocation has a data index for the specified columns.protected final void
No-op by default, can be overridden by subclasses to initialize state on first access.@Nullable BasicDataIndex
loadDataIndex
(@NotNull String... columns) Load the data index from the location implementation.protected @NotNull ColumnLocation
makeColumnLocation
(@NotNull String columnName) void
pushdownFilter
(WhereFilter filter, RowSet selection, boolean usePrev, PushdownFilterContext context, long costCeiling, JobScheduler jobScheduler, Consumer<PushdownResult> onComplete, Consumer<Exception> onError) Push down the given filter to the underlying table and pass the result to the consumer.void
refresh()
Initialize or run state information.Methods inherited from class io.deephaven.engine.table.impl.locations.impl.AbstractTableLocation
asLivenessReferent, clearColumnLocations, deliverInitialSnapshot, destroy, getColumnLocation, getDataIndex, getKey, getLastModifiedTimeMillis, getRowSet, getSize, getStateLock, getTableKey, handleUpdate, handleUpdate, handleUpdateInternal, handleUpdateInternal, hasAnyCachedDataIndex, hasCachedDataIndex, makePushdownFilterContext, toString
Methods inherited from class io.deephaven.engine.table.impl.locations.impl.SubscriptionAggregator
activateUnderlyingDataSource, activationFailed, activationSuccessful, checkHasSubscribers, deactivateUnderlyingDataSource, matchSubscriptionToken, postActivationHook, subscribe, supportsSubscriptions, unsubscribe
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface io.deephaven.engine.liveness.DelegatingLivenessReferent
dropReference, getWeakReference, tryRetainReference
Methods inherited from interface io.deephaven.engine.liveness.LivenessReferent
getReferentDescription, retainReference
Methods inherited from interface io.deephaven.engine.table.impl.locations.TableLocation
append, subscribe, supportsSubscriptions, toGenericString, toStringDetailed, toStringHelper, unsubscribe
Methods inherited from interface io.deephaven.engine.table.impl.locations.TableLocationState
copyStateValuesTo
-
Constructor Details
-
ParquetTableLocation
public ParquetTableLocation(@NotNull @NotNull TableKey tableKey, @NotNull @NotNull ParquetTableLocationKey tableLocationKey, @NotNull @NotNull ParquetInstructions readInstructions)
-
-
Method Details
-
getImplementationName
Description copied from interface:NamedImplementation
Get a name for the implementing class. Useful for abstract classes that implement
LogOutputAppendable
or overridetoString
.The default implementation is correct, but not suitable for high-frequency usage.
- Returns:
- A name for the implementing class
-
refresh
public void refresh()Description copied from interface:TableLocation
Initialize or run state information. -
getColumnTypes
-
getSortedColumns
Description copied from interface:TableLocation
Get an ordered list of columns this location is sorted by.- Returns:
- A non-null ordered list of
SortColumns
-
initializeState
protected final void initializeState()Description copied from class:AbstractTableLocation
No-op by default, can be overridden by subclasses to initialize state on first access.The expectation for static locations that override this is to call
AbstractTableLocation.handleUpdateInternal(RowSet, long)
instead ofAbstractTableLocation.handleUpdate(RowSet, long)
, andAbstractTableLocation.handleUpdateInternal(TableLocationState)
instead ofAbstractTableLocation.handleUpdate(TableLocationState)
from insideAbstractTableLocation.initializeState()
. Otherwise, the initialization logic will recurse infinitely.- Overrides:
initializeState
in classAbstractTableLocation
-
makeColumnLocation
- Specified by:
makeColumnLocation
in classAbstractTableLocation
-
getDataIndexColumns
Description copied from interface:TableLocation
Get a list of the columns by which this location is indexed- Returns:
- A non-null list of
String[]
arrays containing the key column names for each existing index
-
hasDataIndex
Description copied from interface:TableLocation
Check if this TableLocation has a data index for the specified columns.- Parameters:
columns
- The set of columns to check for- Returns:
- Whether the TableLocation has an index for the specified columns
-
loadDataIndex
Description copied from class:AbstractTableLocation
Load the data index from the location implementation. Implementations of this method should not perform any result caching.- Specified by:
loadDataIndex
in classAbstractTableLocation
- Parameters:
columns
- The columns to load an index for- Returns:
- The data index, or
null
if none exists
-
estimatePushdownFilterCost
public void estimatePushdownFilterCost(WhereFilter filter, RowSet selection, boolean usePrev, PushdownFilterContext context, JobScheduler jobScheduler, LongConsumer onComplete, Consumer<Exception> onError) Description copied from interface:PushdownFilterMatcher
Estimate the cost of pushing down the next pushdown filter. This returns a unitless value to compare the cost of executing different filters. Common costs are listed inPushdownResult
(such asPushdownResult.METADATA_STATS_COST
) and should be used as a baseline for estimating the cost of newly implemented pushdown operations.A no-op implementation should simply complete with
Long.MAX_VALUE
.- Specified by:
estimatePushdownFilterCost
in interfacePushdownFilterMatcher
- Overrides:
estimatePushdownFilterCost
in classAbstractTableLocation
- Parameters:
filter
- Thefilter
to test.selection
- The set of rows to tests.usePrev
- Whether to use the previous resultcontext
- ThePushdownFilterContext
to use for the pushdown operation.jobScheduler
- The job scheduler to use for scheduling child jobsonComplete
- Consumer of the estimated cost of the pushdown operation. 9223372036854775807L indicates that the filter cannot be pushed down.onError
- Consumer of any exceptions that occur during the estimate operation
-
pushdownFilter
public void pushdownFilter(WhereFilter filter, RowSet selection, boolean usePrev, PushdownFilterContext context, long costCeiling, JobScheduler jobScheduler, Consumer<PushdownResult> onComplete, Consumer<Exception> onError) Description copied from interface:PushdownFilterMatcher
Push down the given filter to the underlying table and pass the result to the consumer. This method is expected to execute all pushdown filter steps that are greater thanPushdownFilterContext.executedFilterCost()
and less than or equal tocostCeiling
.The resulting
PushdownResult
(toonComplete
) must only contain rows fromselection
. Thematch row set
are rows that are guaranteed to match. The implicitly "missing" rowsselection - match - maybeMatch
are rows that are guaranteed to not match. The remainingmaybe match row set
are rows that may, or may not, match. The pushdown result ownership passes toonComplete
.A no-op implementation should simply complete with
PushdownResult.maybeMatch(selection)
.- Specified by:
pushdownFilter
in interfacePushdownFilterMatcher
- Overrides:
pushdownFilter
in classAbstractTableLocation
- Parameters:
filter
- Thefilter
to apply.selection
- The set of rows to test.usePrev
- Whether to use the previous resultcontext
- ThePushdownFilterContext
to use for the pushdown operation.costCeiling
- Execute all possible filters with a cost less than or equal this value.jobScheduler
- The job scheduler to use for scheduling child jobsonComplete
- Consumer of the output rowsets for added and modified rows that pass the filteronError
- Consumer of any exceptions that occur during the pushdown operation
-