You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@datafusion.apache.org by "andygrove (via GitHub)" <gi...@apache.org> on 2025/07/01 20:46:41 UTC

[PR] fix: [ignore] Remove auto scan fallback for Spark 4.0.0 [datafusion-comet]

andygrove opened a new pull request, #1975:
URL: https://github.com/apache/datafusion-comet/pull/1975

   ## Which issue does this PR close?
   
   <!--
   We generally require a GitHub issue to be filed for all bug fixes and enhancements and this helps us generate change logs for our releases. You can link an issue to this PR using the GitHub syntax. For example `Closes #123` indicates that this PR will close issue #123.
   -->
   
   Closes #.
   
   ## Rationale for this change
   
   <!--
    Why are you proposing this change? If this is already explained clearly in the issue then this section is not needed.
    Explaining clearly why changes are proposed helps reviewers understand your changes and offer better suggestions for fixes.  
   -->
   
   Testing / scoping out future work.
   
   ## What changes are included in this PR?
   
   <!--
   There is no need to duplicate the description in the issue here but it is sometimes worth providing a summary of the individual changes in this PR.
   -->
   
   ## How are these changes tested?
   
   <!--
   We typically require tests for all PRs in order to:
   1. Prevent the code from being accidentally broken by subsequent changes
   2. Serve as another way to document the expected behavior of the code
   
   If tests are not included in your PR, please explain why (for example, are they covered by existing tests)?
   -->
   


-- 
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-unsubscribe@datafusion.apache.org

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


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


Re: [PR] fix: Support `auto` scan mode with Spark 4.0.0 [datafusion-comet]

Posted by "andygrove (via GitHub)" <gi...@apache.org>.
andygrove commented on code in PR #1975:
URL: https://github.com/apache/datafusion-comet/pull/1975#discussion_r2299015436


##########
common/src/main/scala/org/apache/spark/sql/comet/util/Utils.scala:
##########
@@ -124,7 +125,10 @@ object Utils {
       case LongType => new ArrowType.Int(8 * 8, true)
       case FloatType => new ArrowType.FloatingPoint(FloatingPointPrecision.SINGLE)
       case DoubleType => new ArrowType.FloatingPoint(FloatingPointPrecision.DOUBLE)
-      case StringType => ArrowType.Utf8.INSTANCE
+      case _: StringType => ArrowType.Utf8.INSTANCE
+      case dt if isStringCollationType(dt) =>
+        // TODO collation information is lost with this transformation

Review Comment:
   I removed this comment because Spark also does not track this information, as pointed out in https://github.com/apache/datafusion-comet/issues/2190#issuecomment-3215876465 by @parthchandra 



-- 
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-unsubscribe@datafusion.apache.org

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


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


Re: [PR] fix: Support `auto` scan mode with Spark 4.0.0 [datafusion-comet]

Posted by "andygrove (via GitHub)" <gi...@apache.org>.
andygrove commented on PR #1975:
URL: https://github.com/apache/datafusion-comet/pull/1975#issuecomment-3054014387

   hive-1 failure to investigate:
   
   ```
   2025-07-09T20:18:09.4999985Z [info]   Cause: org.apache.comet.CometNativeException: External error: Arrow: Parquet argument error: Parquet error: encountered non UTF-8 data
   2025-07-09T20:18:09.5000678Z [info]   at org.apache.comet.parquet.Native.readNextRecordBatch(Native Method)
   2025-07-09T20:18:09.5001239Z [info]   at org.apache.comet.parquet.NativeBatchReader.loadNextBatch(NativeBatchReader.java:812)
   ```
   


-- 
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-unsubscribe@datafusion.apache.org

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


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


Re: [PR] fix: Support `auto` scan mode with Spark 4.0.0 [datafusion-comet]

Posted by "comphead (via GitHub)" <gi...@apache.org>.
comphead commented on code in PR #1975:
URL: https://github.com/apache/datafusion-comet/pull/1975#discussion_r2299003952


##########
spark/src/main/scala/org/apache/comet/rules/CometScanRule.scala:
##########
@@ -302,21 +298,33 @@ case class CometScanRule(session: SparkSession) extends Rule[SparkPlan] {
     val partitionSchemaSupported =
       typeChecker.isSchemaSupported(partitionSchema, fallbackReasons)
 
-    def hasMapsContainingStructs(dataType: DataType): Boolean = {
+    def isComplexType(dt: DataType): Boolean = dt match {

Review Comment:
   `isComplexType` method now exists in in `DataTypeSupport` object 



-- 
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-unsubscribe@datafusion.apache.org

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


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


Re: [PR] fix: Support `auto` scan mode with Spark 4.0.0 [datafusion-comet]

Posted by "andygrove (via GitHub)" <gi...@apache.org>.
andygrove commented on PR #1975:
URL: https://github.com/apache/datafusion-comet/pull/1975#issuecomment-3210841677

   Current failures:
   
   core-1:
   
   ```
   $ grep "* FAIL" core1.txt 
   2025-08-21T02:32:47.7183506Z [info] - SPARK-26677: negated null-safe equality comparison should not filter matched row groups *** FAILED *** (303 milliseconds)
   2025-08-21T02:52:05.6178387Z [info] - scalar types rebuild *** FAILED *** (637 milliseconds)
   2025-08-21T02:52:05.9761617Z [info] - object rebuild *** FAILED *** (357 milliseconds)
   2025-08-21T02:52:06.3954010Z [info] - array rebuild *** FAILED *** (417 milliseconds)
   2025-08-21T02:52:07.4434260Z [info] - malformed input *** FAILED *** (1 second, 40 milliseconds)
   2025-08-21T02:52:07.6507720Z [info] - extract from shredded object *** FAILED *** (206 milliseconds)
   2025-08-21T02:52:07.8370529Z [info] - extract from shredded array *** FAILED *** (182 milliseconds)
   2025-08-21T02:52:08.0028967Z [info] - missing fields *** FAILED *** (166 milliseconds)
   2025-08-21T02:52:08.1324041Z [info] - custom casts *** FAILED *** (129 milliseconds)
   ```
   
   hive-1:
   
   ```
   $ grep "* FAIL" hive1.txt 
   2025-08-21T02:28:26.0691331Z [info] - SPARK-30201 HiveOutputWriter standardOI should use ObjectInspectorCopyOption.DEFAULT *** FAILED *** (375 milliseconds)
   ```


-- 
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-unsubscribe@datafusion.apache.org

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


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


Re: [PR] fix: [ignore] Remove auto scan fallback for Spark 4.0.0 [datafusion-comet]

Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #1975:
URL: https://github.com/apache/datafusion-comet/pull/1975#issuecomment-3025599293

   ## [Codecov](https://app.codecov.io/gh/apache/datafusion-comet/pull/1975?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
   All modified and coverable lines are covered by tests :white_check_mark:
   > Project coverage is 32.78%. Comparing base [(`f09f8af`)](https://app.codecov.io/gh/apache/datafusion-comet/commit/f09f8af64c6599255e116a376f4f008f2fd63b43?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) to head [(`d97cbb2`)](https://app.codecov.io/gh/apache/datafusion-comet/commit/d97cbb29aacd4886d861a2d8e70ac3dadadf6cf0?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
   > Report is 302 commits behind head on main.
   
   <details><summary>Additional details and impacted files</summary>
   
   
   ```diff
   @@              Coverage Diff              @@
   ##               main    #1975       +/-   ##
   =============================================
   - Coverage     56.12%   32.78%   -23.34%     
   + Complexity      976      789      -187     
   =============================================
     Files           119      132       +13     
     Lines         11743    12934     +1191     
     Branches       2251     2407      +156     
   =============================================
   - Hits           6591     4241     -2350     
   - Misses         4012     7743     +3731     
   + Partials       1140      950      -190     
   ```
   
   </details>
   
   [:umbrella: View full report in Codecov by Sentry](https://app.codecov.io/gh/apache/datafusion-comet/pull/1975?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).   
   :loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
   
   <details><summary> :rocket: New features to boost your workflow: </summary>
   
   - :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
   </details>


-- 
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-unsubscribe@datafusion.apache.org

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


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


Re: [PR] fix: Support `auto` scan mode with Spark 4.0.0 [datafusion-comet]

Posted by "comphead (via GitHub)" <gi...@apache.org>.
comphead commented on code in PR #1975:
URL: https://github.com/apache/datafusion-comet/pull/1975#discussion_r2298998142


##########
common/src/main/scala/org/apache/spark/sql/comet/util/Utils.scala:
##########
@@ -124,7 +125,10 @@ object Utils {
       case LongType => new ArrowType.Int(8 * 8, true)
       case FloatType => new ArrowType.FloatingPoint(FloatingPointPrecision.SINGLE)
       case DoubleType => new ArrowType.FloatingPoint(FloatingPointPrecision.DOUBLE)
-      case StringType => ArrowType.Utf8.INSTANCE
+      case _: StringType => ArrowType.Utf8.INSTANCE
+      case dt if isStringCollationType(dt) =>
+        // TODO collation information is lost with this transformation

Review Comment:
   should we have a ticket? 



-- 
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-unsubscribe@datafusion.apache.org

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


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


Re: [PR] fix: Support `auto` scan mode with Spark 4.0.0 [datafusion-comet]

Posted by "andygrove (via GitHub)" <gi...@apache.org>.
andygrove commented on code in PR #1975:
URL: https://github.com/apache/datafusion-comet/pull/1975#discussion_r2299017634


##########
spark/src/main/scala/org/apache/comet/rules/CometScanRule.scala:
##########
@@ -302,21 +298,33 @@ case class CometScanRule(session: SparkSession) extends Rule[SparkPlan] {
     val partitionSchemaSupported =
       typeChecker.isSchemaSupported(partitionSchema, fallbackReasons)
 
-    def hasMapsContainingStructs(dataType: DataType): Boolean = {
+    def isComplexType(dt: DataType): Boolean = dt match {

Review Comment:
   Thanks. Updated.



-- 
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-unsubscribe@datafusion.apache.org

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


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


Re: [PR] fix: Support `auto` scan mode with Spark 4.0.0 [datafusion-comet]

Posted by "andygrove (via GitHub)" <gi...@apache.org>.
andygrove merged PR #1975:
URL: https://github.com/apache/datafusion-comet/pull/1975


-- 
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-unsubscribe@datafusion.apache.org

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


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