aokolnychyi commented on a change in pull request #2362:
URL: https://github.com/apache/iceberg/pull/2362#discussion_r608852959
##########
File path: spark2/src/main/java/org/apache/iceberg/spark/source/Reader.java
##########
@@ -443,52 +448,37 @@ public String toString() {
private static class ReadTask<T> implements Serializable, InputPartition<T> {
private final CombinedScanTask task;
- private final String tableSchemaString;
+ private final Broadcast<Table> tableBroadcast;
private final String expectedSchemaString;
- private final String nameMappingString;
- private final Broadcast<FileIO> io;
- private final Broadcast<EncryptionManager> encryptionManager;
private final boolean caseSensitive;
private final boolean localityPreferred;
private final ReaderFactory<T> readerFactory;
- private transient Schema tableSchema = null;
private transient Schema expectedSchema = null;
private transient String[] preferredLocations = null;
- private ReadTask(CombinedScanTask task, String tableSchemaString, String
expectedSchemaString,
- String nameMappingString, Broadcast<FileIO> io,
Broadcast<EncryptionManager> encryptionManager,
+ private ReadTask(CombinedScanTask task, Broadcast<Table> tableBroadcast,
String expectedSchemaString,
boolean caseSensitive, boolean localityPreferred,
ReaderFactory<T> readerFactory) {
this.task = task;
- this.tableSchemaString = tableSchemaString;
+ this.tableBroadcast = tableBroadcast;
this.expectedSchemaString = expectedSchemaString;
- this.io = io;
- this.encryptionManager = encryptionManager;
this.caseSensitive = caseSensitive;
this.localityPreferred = localityPreferred;
this.preferredLocations = getPreferredLocations();
this.readerFactory = readerFactory;
- this.nameMappingString = nameMappingString;
}
@Override
public InputPartitionReader<T> createPartitionReader() {
- return readerFactory.create(task, lazyTableSchema(),
lazyExpectedSchema(), nameMappingString, io.value(),
- encryptionManager.value(), caseSensitive);
+ Table table = tableBroadcast.getValue();
Review comment:
Fixed.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]