Package io.trino.plugin.hive
Class HivePageSourceProvider
- java.lang.Object
-
- io.trino.plugin.hive.HivePageSourceProvider
-
- All Implemented Interfaces:
ConnectorPageSourceProvider
public class HivePageSourceProvider extends Object implements ConnectorPageSourceProvider
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classHivePageSourceProvider.BucketAdaptationstatic classHivePageSourceProvider.ColumnMappingstatic classHivePageSourceProvider.ColumnMappingKind
-
Constructor Summary
Constructors Constructor Description HivePageSourceProvider(TypeManager typeManager, HdfsEnvironment hdfsEnvironment, HiveConfig hiveConfig, Set<HivePageSourceFactory> pageSourceFactories, Set<HiveRecordCursorProvider> cursorProviders, GenericHiveRecordCursorProvider genericCursorProvider, OrcFileWriterFactory orcFileWriterFactory)HivePageSourceProvider(TypeManager typeManager, HdfsEnvironment hdfsEnvironment, HiveConfig hiveConfig, Set<HivePageSourceFactory> pageSourceFactories, Set<HiveRecordCursorProvider> cursorProviders, GenericHiveRecordCursorProvider genericCursorProvider, Optional<OrcFileWriterFactory> orcFileWriterFactory)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Optional<ConnectorPageSource>createHivePageSource(Set<HivePageSourceFactory> pageSourceFactories, Set<HiveRecordCursorProvider> cursorProviders, org.apache.hadoop.conf.Configuration configuration, ConnectorSession session, org.apache.hadoop.fs.Path path, OptionalInt bucketNumber, long start, long length, long estimatedFileSize, long fileModifiedTime, Properties schema, TupleDomain<HiveColumnHandle> effectivePredicate, List<HiveColumnHandle> columns, String partitionName, List<HivePartitionKey> partitionKeys, TypeManager typeManager, TableToPartitionMapping tableToPartitionMapping, Optional<HiveSplit.BucketConversion> bucketConversion, Optional<HiveSplit.BucketValidation> bucketValidation, boolean s3SelectPushdownEnabled, Optional<AcidInfo> acidInfo, boolean originalFile, AcidTransaction transaction)ConnectorPageSourcecreatePageSource(ConnectorTransactionHandle transaction, ConnectorSession session, ConnectorSplit split, ConnectorTableHandle tableHandle, List<ColumnHandle> columns, DynamicFilter dynamicFilter)static Optional<ReaderColumns>projectBaseColumns(List<HiveColumnHandle> columns)Creates a mapping between the input {@param columns} and base columns if required.static Optional<ReaderColumns>projectSufficientColumns(List<HiveColumnHandle> columns)Creates a set of sufficient columns for the input projected columns and prepares a mapping between the two.
-
-
-
Constructor Detail
-
HivePageSourceProvider
@Inject public HivePageSourceProvider(TypeManager typeManager, HdfsEnvironment hdfsEnvironment, HiveConfig hiveConfig, Set<HivePageSourceFactory> pageSourceFactories, Set<HiveRecordCursorProvider> cursorProviders, GenericHiveRecordCursorProvider genericCursorProvider, OrcFileWriterFactory orcFileWriterFactory)
-
HivePageSourceProvider
public HivePageSourceProvider(TypeManager typeManager, HdfsEnvironment hdfsEnvironment, HiveConfig hiveConfig, Set<HivePageSourceFactory> pageSourceFactories, Set<HiveRecordCursorProvider> cursorProviders, GenericHiveRecordCursorProvider genericCursorProvider, Optional<OrcFileWriterFactory> orcFileWriterFactory)
-
-
Method Detail
-
createPageSource
public ConnectorPageSource createPageSource(ConnectorTransactionHandle transaction, ConnectorSession session, ConnectorSplit split, ConnectorTableHandle tableHandle, List<ColumnHandle> columns, DynamicFilter dynamicFilter)
- Specified by:
createPageSourcein interfaceConnectorPageSourceProvider
-
createHivePageSource
public static Optional<ConnectorPageSource> createHivePageSource(Set<HivePageSourceFactory> pageSourceFactories, Set<HiveRecordCursorProvider> cursorProviders, org.apache.hadoop.conf.Configuration configuration, ConnectorSession session, org.apache.hadoop.fs.Path path, OptionalInt bucketNumber, long start, long length, long estimatedFileSize, long fileModifiedTime, Properties schema, TupleDomain<HiveColumnHandle> effectivePredicate, List<HiveColumnHandle> columns, String partitionName, List<HivePartitionKey> partitionKeys, TypeManager typeManager, TableToPartitionMapping tableToPartitionMapping, Optional<HiveSplit.BucketConversion> bucketConversion, Optional<HiveSplit.BucketValidation> bucketValidation, boolean s3SelectPushdownEnabled, Optional<AcidInfo> acidInfo, boolean originalFile, AcidTransaction transaction)
-
projectBaseColumns
public static Optional<ReaderColumns> projectBaseColumns(List<HiveColumnHandle> columns)
Creates a mapping between the input {@param columns} and base columns if required.
-
projectSufficientColumns
public static Optional<ReaderColumns> projectSufficientColumns(List<HiveColumnHandle> columns)
Creates a set of sufficient columns for the input projected columns and prepares a mapping between the two. For example, if input {@param columns} include columns "a.b" and "a.b.c", then they will be projected from a single column "a.b".
-
-