Java Code Examples for org.apache.spark.sql.sources.v2.reader.InputPartitionReader

The following examples show how to use org.apache.spark.sql.sources.v2.reader.InputPartitionReader. These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
@Override
public InputPartitionReader<InternalRow> createPartitionReader() {
    ReadRowsRequest.Builder readRowsRequest = ReadRowsRequest.newBuilder().setReadStream(streamName);
    ReadRowsHelper readRowsHelper = new ReadRowsHelper(bigQueryReadClientFactory, readRowsRequest, maxReadRowsRetries);
    Iterator<ReadRowsResponse> readRowsResponses = readRowsHelper.readRows();
    return new BigQueryInputPartitionReader(readRowsResponses, converter, readRowsHelper);
}
 
Example 2
@Override
public InputPartitionReader<InternalRow> createPartitionReader() {
    return new BigQueryEmptyProjectionInputPartitionReader(partitionSize);
}
 
Example 3
@Override
public InputPartitionReader<ColumnarBatch> createPartitionReader() {
  return new FlightDataReader(options);
}
 
Example 4
Source Project: iceberg   Source File: Reader.java    License: Apache License 2.0 4 votes vote down vote up
@Override
public InputPartitionReader<T> createPartitionReader() {
  return readerFactory.create(task, lazyTableSchema(), lazyExpectedSchema(), nameMappingString, io.value(),
      encryptionManager.value(), caseSensitive);
}
 
Example 5
Source Project: iceberg   Source File: Reader.java    License: Apache License 2.0 4 votes vote down vote up
InputPartitionReader<T> create(CombinedScanTask task, Schema tableSchema, Schema expectedSchema,
String nameMapping, FileIO io,
EncryptionManager encryptionManager, boolean caseSensitive);
 
Example 6
Source Project: iceberg   Source File: Reader.java    License: Apache License 2.0 4 votes vote down vote up
@Override
public InputPartitionReader<InternalRow> create(CombinedScanTask task, Schema tableSchema, Schema expectedSchema,
                                                String nameMapping, FileIO io,
                                                EncryptionManager encryptionManager, boolean caseSensitive) {
  return new RowReader(task, tableSchema, expectedSchema, nameMapping, io, encryptionManager, caseSensitive);
}
 
Example 7
Source Project: iceberg   Source File: Reader.java    License: Apache License 2.0 4 votes vote down vote up
@Override
public InputPartitionReader<ColumnarBatch> create(CombinedScanTask task, Schema tableSchema, Schema expectedSchema,
                                                  String nameMapping, FileIO io,
                                                  EncryptionManager encryptionManager, boolean caseSensitive) {
  return new BatchReader(task, expectedSchema, nameMapping, io, encryptionManager, caseSensitive, batchSize);
}