Copilot commented on code in PR #1657:
URL: https://github.com/apache/auron/pull/1657#discussion_r2554642309


##########
spark-extension/src/main/scala/org/apache/spark/sql/auron/AuronConverters.scala:
##########
@@ -467,9 +471,19 @@ object AuronConverters extends Logging {
     relation.fileFormat match {
       case p if p.getClass.getName.endsWith("ParquetFileFormat") =>
         assert(enableScanParquet)
+        if (!enableScanParquetTimestamp) {
+          assert(
+            !exec.requiredSchema.exists(e => existTimestampType(e.dataType)),
+            "Parquet scan with timestamp type is not supported")

Review Comment:
   The error message could be more informative. Consider including guidance on 
how to resolve the issue, such as: "Parquet scan with timestamp type is not 
supported. Set spark.auron.enable.scan.parquet.timestamp=true to enable 
timestamp support or remove timestamp columns from the query."
   ```suggestion
               "Parquet scan with timestamp type is not supported. " +
               "Set spark.auron.enable.scan.parquet.timestamp=true to enable 
timestamp support or remove timestamp columns from the query.")
   ```



##########
spark-extension/src/main/scala/org/apache/spark/sql/auron/AuronConverters.scala:
##########
@@ -467,9 +471,19 @@ object AuronConverters extends Logging {
     relation.fileFormat match {
       case p if p.getClass.getName.endsWith("ParquetFileFormat") =>
         assert(enableScanParquet)
+        if (!enableScanParquetTimestamp) {
+          assert(
+            !exec.requiredSchema.exists(e => existTimestampType(e.dataType)),
+            "Parquet scan with timestamp type is not supported")
+        }
         addRenameColumnsExec(Shims.get.createNativeParquetScanExec(exec))
       case p if p.getClass.getName.endsWith("OrcFileFormat") =>
         assert(enableScanOrc)
+        if (!enableScanOrcTimestamp) {
+          assert(
+            !exec.requiredSchema.exists(e => existTimestampType(e.dataType)),
+            "ORC scan with timestamp type is not supported")

Review Comment:
   The error message could be more informative. Consider including guidance on 
how to resolve the issue, such as: "ORC scan with timestamp type is not 
supported. Set spark.auron.enable.scan.orc.timestamp=true to enable timestamp 
support or remove timestamp columns from the query."
   ```suggestion
               "ORC scan with timestamp type is not supported. Set 
spark.auron.enable.scan.orc.timestamp=true to enable timestamp support or 
remove timestamp columns from the query.")
   ```



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

Reply via email to