littleDrew commented on issue #12845:
URL: https://github.com/apache/iceberg/issues/12845#issuecomment-2990726047

   -  As here in my environment, still use spark 3.1 + iceberg 0.13.1,  
currently unable to update spark version(as effected a lot)
   -  in this condition, how can i solve above performance problem~
   
https://github1s.com/apache/iceberg/blob/0.13.x/spark/v3.1/spark/src/main/java/org/apache/iceberg/spark/source/SparkBatchScan.java
   
   what's more, here i see the code implementation of planInputpartiton method, 
**and not sure whether the thread-pool can work, if use spark SQL**, i see the 
`localityPreferred` options is an sparkReadOption `  public static final String 
LOCALITY = "locality";`
   
   ```
     @Override
     public InputPartition[] planInputPartitions() {
       String expectedSchemaString = SchemaParser.toJson(expectedSchema);
   
       // broadcast the table metadata as input partitions will be sent to 
executors
       Broadcast<Table> tableBroadcast = 
sparkContext.broadcast(SerializableTable.copyOf(table));
   
       List<CombinedScanTask> scanTasks = tasks();
       InputPartition[] readTasks = new InputPartition[scanTasks.size()];
   
       Tasks.range(readTasks.length)
           .stopOnFailure()
           .executeWith(localityPreferred ? ThreadPools.getWorkerPool() : null)
           .run(index -> readTasks[index] = new ReadTask(
               scanTasks.get(index), tableBroadcast, expectedSchemaString,
               caseSensitive, localityPreferred));
   
       return readTasks;
     }
   ```
   
   please help to have a look, thanks  @Fokko @theoryxu @dacort @wzx140 
   


-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to