wForget commented on code in PR #1573:
URL: https://github.com/apache/datafusion-comet/pull/1573#discussion_r2016559408


##########
spark/src/main/spark-3.5/org/apache/spark/sql/comet/shims/ShimCometScanExec.scala:
##########
@@ -55,15 +55,48 @@ trait ShimCometScanExec {
   protected def isNeededForSchema(sparkSchema: StructType): Boolean = false
 
   protected def getPartitionedFile(f: FileStatusWithMetadata, p: 
PartitionDirectory): PartitionedFile =
-    PartitionedFileUtil.getPartitionedFile(f, f.getPath, p.values)
+    try {
+      PartitionedFileUtil.getPartitionedFile(f, f.getPath, p.values)
+    } catch {
+      case _: NoSuchMethodError =>

Review Comment:
   I prefer to define reflection for each version. Some similar implementations:
   
   
https://github.com/apache/iceberg/blob/aa4ed6041b2e4555e222eb587d5055be163f362c/hive-metastore/src/main/java/org/apache/iceberg/hive/HiveClientPool.java#L37-L48
   
   
https://github.com/apache/spark/blob/master/sql/hive/src/main/scala/org/apache/spark/sql/hive/client/HiveShim.scala
   
   @kazuyukitanimura WDYT?



-- 
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: github-unsubscr...@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org
For additional commands, e-mail: github-h...@datafusion.apache.org

Reply via email to