You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@datafusion.apache.org by "huaxingao (via GitHub)" <gi...@apache.org> on 2025/06/02 17:08:26 UTC
[PR] Feat: Support Spark 4.0.0 part1 [datafusion-comet]
huaxingao opened a new pull request, #1830:
URL: https://github.com/apache/datafusion-comet/pull/1830
## 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.
-->
## 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] Feat: Support Spark 4.0.0 part1 [datafusion-comet]
Posted by "andygrove (via GitHub)" <gi...@apache.org>.
andygrove commented on code in PR #1830:
URL: https://github.com/apache/datafusion-comet/pull/1830#discussion_r2176122824
##########
dev/diffs/4.0.0.diff:
##########
@@ -159,6 +190,21 @@ index 698ca009b4f..57d774a3617 100644
-- Test tables
CREATE table explain_temp1 (key int, val int) USING PARQUET;
+diff --git a/sql/core/src/test/resources/sql-tests/inputs/listagg-collations.sql b/sql/core/src/test/resources/sql-tests/inputs/listagg-collations.sql
+index aa3d02dc2fb..c4f878d9908 100644
+--- a/sql/core/src/test/resources/sql-tests/inputs/listagg-collations.sql
++++ b/sql/core/src/test/resources/sql-tests/inputs/listagg-collations.sql
+@@ -5,7 +5,9 @@ WITH t(c1) AS (SELECT listagg(col1) WITHIN GROUP (ORDER BY col1) FROM (VALUES ('
+ -- Test cases with utf8_lcase. Lower expression added for determinism
+ SELECT lower(listagg(c1) WITHIN GROUP (ORDER BY c1 COLLATE utf8_lcase)) FROM (VALUES ('a'), ('A'), ('b'), ('B')) AS t(c1);
+ WITH t(c1) AS (SELECT lower(listagg(DISTINCT col1 COLLATE utf8_lcase)) FROM (VALUES ('a'), ('A'), ('b'), ('B'))) SELECT len(c1), regexp_count(c1, 'a'), regexp_count(c1, 'b') FROM t;
+-SELECT lower(listagg(DISTINCT c1 COLLATE utf8_lcase) WITHIN GROUP (ORDER BY c1 COLLATE utf8_lcase)) FROM (VALUES ('a'), ('B'), ('b'), ('A')) AS t(c1);
++-- TODO https://github.com/apache/datafusion-comet/issues/1947
++-- TODO fix Comet for this query
++-- SELECT lower(listagg(DISTINCT c1 COLLATE utf8_lcase) WITHIN GROUP (ORDER BY c1 COLLATE utf8_lcase)) FROM (VALUES ('a'), ('B'), ('b'), ('A')) AS t(c1);
Review Comment:
Could we make that change as part of the follow-up issue https://github.com/apache/datafusion-comet/issues/1947 that is linked to here (or maybe we can just fix the test instead). The sooner we can get this PR merged, the easier it will be to start addressing the test failures in separate (and smaller) PRs.
I would also like to ship the experimental 4.0.0 support in Comet 0.9.0 so that we can start getting feedback from the community. It seems like all the skipped tests have links to issues now.
--
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] Feat: Support Spark 4.0.0 part1 [datafusion-comet]
Posted by "YanivKunda (via GitHub)" <gi...@apache.org>.
YanivKunda commented on code in PR #1830:
URL: https://github.com/apache/datafusion-comet/pull/1830#discussion_r2134838674
##########
pom.xml:
##########
@@ -600,7 +600,7 @@ under the License.
<!-- Use Scala 2.13 by default -->
<scala.version>2.13.14</scala.version>
Review Comment:
Scala was upgraded in the 4.0.0 release version:
```suggestion
<scala.version>2.13.16</scala.version>
```
##########
pom.xml:
##########
@@ -600,7 +600,7 @@ under the License.
<!-- Use Scala 2.13 by default -->
<scala.version>2.13.14</scala.version>
<scala.binary.version>2.13</scala.binary.version>
- <spark.version>4.0.0-preview1</spark.version>
+ <spark.version>4.0.0</spark.version>
<spark.version.short>4.0</spark.version.short>
<parquet.version>1.13.1</parquet.version>
Review Comment:
Parquet was upgraded in the 4.0.0 release version:
```suggestion
<parquet.version>1.15.2</parquet.version>
```
##########
pom.xml:
##########
@@ -600,7 +600,7 @@ under the License.
<!-- Use Scala 2.13 by default -->
<scala.version>2.13.14</scala.version>
<scala.binary.version>2.13</scala.binary.version>
- <spark.version>4.0.0-preview1</spark.version>
+ <spark.version>4.0.0</spark.version>
<spark.version.short>4.0</spark.version.short>
<parquet.version>1.13.1</parquet.version>
<semanticdb.version>4.9.5</semanticdb.version>
Review Comment:
And also, because I can't comment on the next line -
slf4j was upgraded in the 4.0.0 release version, to version 2.0.16
##########
pom.xml:
##########
@@ -600,7 +600,7 @@ under the License.
<!-- Use Scala 2.13 by default -->
<scala.version>2.13.14</scala.version>
<scala.binary.version>2.13</scala.binary.version>
- <spark.version>4.0.0-preview1</spark.version>
+ <spark.version>4.0.0</spark.version>
<spark.version.short>4.0</spark.version.short>
<parquet.version>1.13.1</parquet.version>
<semanticdb.version>4.9.5</semanticdb.version>
Review Comment:
If Scala is upgraded, this probably needs to be upgraded to:
- at least 4.12.0: the first version to support scala 2.13.16
- 4.12.7: the latest 4.12.x version
- 4.13.6: the latest of the latest
**Note**: this might need to be also aligned in the `scala-2.13` profile!
--
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] Feat: Support Spark 4.0.0 part1 [datafusion-comet]
Posted by "huaxingao (via GitHub)" <gi...@apache.org>.
huaxingao commented on code in PR #1830:
URL: https://github.com/apache/datafusion-comet/pull/1830#discussion_r2176165115
##########
pom.xml:
##########
@@ -637,9 +637,9 @@ under the License.
<profile>
<id>scala-2.13</id>
<properties>
- <scala.version>2.13.14</scala.version>
+ <scala.version>2.13.16</scala.version>
<scala.binary.version>2.13</scala.binary.version>
- <semanticdb.version>4.9.5</semanticdb.version>
+ <semanticdb.version>4.13.6</semanticdb.version>
Review Comment:
I think this is needed. `4.9.5` is not compatible with scala 2.13.16
--
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] Feat: Support Spark 4.0.0 part1 [datafusion-comet]
Posted by "andygrove (via GitHub)" <gi...@apache.org>.
andygrove commented on code in PR #1830:
URL: https://github.com/apache/datafusion-comet/pull/1830#discussion_r2175499403
##########
.github/actions/java-test/action.yaml:
##########
@@ -68,7 +68,7 @@ runs:
env:
COMET_PARQUET_SCAN_IMPL: ${{ inputs.scan_impl }}
run: |
- MAVEN_OPTS="-XX:+UnlockDiagnosticVMOptions -XX:+ShowMessageBoxOnError -XX:+HeapDumpOnOutOfMemoryError -XX:ErrorFile=./hs_err_pid%p.log" SPARK_HOME=`pwd` ./mvnw -B clean install ${{ inputs.maven_opts }}
+ MAVEN_OPTS="-Xmx4G -Xms2G -XX:+UnlockDiagnosticVMOptions -XX:+ShowMessageBoxOnError -XX:+HeapDumpOnOutOfMemoryError -XX:ErrorFile=./hs_err_pid%p.log" SPARK_HOME=`pwd` ./mvnw -B clean install ${{ inputs.maven_opts }}
Review Comment:
The Comet test suites fail with OOM when running on macOS. I tried this change to specify more memory, but it did not make any difference. The macOS workflow is commented out in this PR, and I filed a follow up issue https://github.com/apache/datafusion-comet/issues/1949
--
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] Feat: Support Spark 4.0.0 part1 [datafusion-comet]
Posted by "huaxingao (via GitHub)" <gi...@apache.org>.
huaxingao commented on code in PR #1830:
URL: https://github.com/apache/datafusion-comet/pull/1830#discussion_r2175571559
##########
dev/diffs/4.0.0.diff:
##########
@@ -2211,20 +2578,19 @@ index 4fb8faa43a3..984fd1a9892 100644
checkAnswer(
// "fruit" column in this file is encoded using DELTA_LENGTH_BYTE_ARRAY.
diff --git a/sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/parquet/ParquetQuerySuite.scala b/sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/parquet/ParquetQuerySuite.scala
-index a329d3fdc3c..ebca1264eb1 100644
+index bba71f1c48d..a45d3f6e797 100644
--- a/sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/parquet/ParquetQuerySuite.scala
+++ b/sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/parquet/ParquetQuerySuite.scala
-@@ -971,7 +971,8 @@ abstract class ParquetQuerySuite extends QueryTest with ParquetTest with SharedS
- }
- }
+@@ -48,6 +48,8 @@ abstract class ParquetQuerySuite extends QueryTest with ParquetTest with SharedS
+ import testImplicits._
-- test("SPARK-26677: negated null-safe equality comparison should not filter matched row groups") {
-+ test("SPARK-26677: negated null-safe equality comparison should not filter matched row groups",
-+ IgnoreCometNativeScan("Native scans had the filter pushed into DF operator, cannot strip")) {
- withAllParquetReaders {
- withTempPath { path =>
- // Repeated values for dictionary encoding.
-@@ -1042,7 +1043,8 @@ abstract class ParquetQuerySuite extends QueryTest with ParquetTest with SharedS
+ test("simple select queries") {
++ println("==== Runtime Classpath ====")
++ System.getProperty("java.class.path").split(":").foreach(println)
Review Comment:
Removed. Thanks!
--
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] Feat: Support Spark 4.0.0 part1 [datafusion-comet]
Posted by "YanivKunda (via GitHub)" <gi...@apache.org>.
YanivKunda commented on code in PR #1830:
URL: https://github.com/apache/datafusion-comet/pull/1830#discussion_r2154538985
##########
dev/.DS_Store:
##########
Review Comment:
macOS local file
##########
dev/diffs/4.0.0-diff.patch:
##########
Review Comment:
looks like a temporary diff patch file (I know it sounds like "salsa sauce", but it probably shouldn't be here at all)
##########
dev/diffs/.DS_Store:
##########
Review Comment:
macOS local file
##########
.DS_Store:
##########
Review Comment:
macOS local file
--
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] Feat: Support Spark 4.0.0 part1 [datafusion-comet]
Posted by "andygrove (via GitHub)" <gi...@apache.org>.
andygrove commented on PR #1830:
URL: https://github.com/apache/datafusion-comet/pull/1830#issuecomment-3023843281
Thanks @huaxingao and @kazuyukitanimura. I will merge this now so that I can backport to branch-0.9 and include it in the 0.9.0 release candidate today.
--
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] Feat: Support Spark 4.0.0 part1 [datafusion-comet]
Posted by "huaxingao (via GitHub)" <gi...@apache.org>.
huaxingao commented on PR #1830:
URL: https://github.com/apache/datafusion-comet/pull/1830#issuecomment-3024594602
Thanks @andygrove @kazuyukitanimura
--
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] Feat: Support Spark 4.0.0 part1 [datafusion-comet]
Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #1830:
URL: https://github.com/apache/datafusion-comet/pull/1830#issuecomment-2943104854
## [Codecov](https://app.codecov.io/gh/apache/datafusion-comet/pull/1830?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
Attention: Patch coverage is `0%` with `11 lines` in your changes missing coverage. Please review.
> Project coverage is 32.18%. 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 [(`b39c6d2`)](https://app.codecov.io/gh/apache/datafusion-comet/commit/b39c6d213551e1e70ef8b5d114761475010c4912?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
> Report is 243 commits behind head on main.
| [Files with missing lines](https://app.codecov.io/gh/apache/datafusion-comet/pull/1830?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Patch % | Lines |
|---|---|---|
| [...c/main/java/org/apache/comet/parquet/TypeUtil.java](https://app.codecov.io/gh/apache/datafusion-comet/pull/1830?src=pr&el=tree&filepath=common%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fcomet%2Fparquet%2FTypeUtil.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-Y29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9jb21ldC9wYXJxdWV0L1R5cGVVdGlsLmphdmE=) | 0.00% | [5 Missing and 2 partials :warning: ](https://app.codecov.io/gh/apache/datafusion-comet/pull/1830?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
| [...ffle/comet/CometBoundedShuffleMemoryAllocator.java](https://app.codecov.io/gh/apache/datafusion-comet/pull/1830?src=pr&el=tree&filepath=spark%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fspark%2Fshuffle%2Fcomet%2FCometBoundedShuffleMemoryAllocator.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3Bhcmsvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NwYXJrL3NodWZmbGUvY29tZXQvQ29tZXRCb3VuZGVkU2h1ZmZsZU1lbW9yeUFsbG9jYXRvci5qYXZh) | 0.00% | [2 Missing :warning: ](https://app.codecov.io/gh/apache/datafusion-comet/pull/1830?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
| [.../scala/org/apache/comet/serde/QueryPlanSerde.scala](https://app.codecov.io/gh/apache/datafusion-comet/pull/1830?src=pr&el=tree&filepath=spark%2Fsrc%2Fmain%2Fscala%2Forg%2Fapache%2Fcomet%2Fserde%2FQueryPlanSerde.scala&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3Bhcmsvc3JjL21haW4vc2NhbGEvb3JnL2FwYWNoZS9jb21ldC9zZXJkZS9RdWVyeVBsYW5TZXJkZS5zY2FsYQ==) | 0.00% | [2 Missing :warning: ](https://app.codecov.io/gh/apache/datafusion-comet/pull/1830?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
<details><summary>Additional details and impacted files</summary>
```diff
@@ Coverage Diff @@
## main #1830 +/- ##
=============================================
- Coverage 56.12% 32.18% -23.94%
+ Complexity 976 651 -325
=============================================
Files 119 130 +11
Lines 11743 12663 +920
Branches 2251 2360 +109
=============================================
- Hits 6591 4076 -2515
- Misses 4012 7794 +3782
+ Partials 1140 793 -347
```
</details>
[:umbrella: View full report in Codecov by Sentry](https://app.codecov.io/gh/apache/datafusion-comet/pull/1830?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] Feat: Support Spark 4.0.0 part1 [datafusion-comet]
Posted by "andygrove (via GitHub)" <gi...@apache.org>.
andygrove commented on PR #1830:
URL: https://github.com/apache/datafusion-comet/pull/1830#issuecomment-2945620138
The Spark version will also need to be updated in `.github/workflows/spark_sql_test_ansi.yml`
--
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] Feat: Support Spark 4.0.0 part1 [datafusion-comet]
Posted by "andygrove (via GitHub)" <gi...@apache.org>.
andygrove commented on PR #1830:
URL: https://github.com/apache/datafusion-comet/pull/1830#issuecomment-3019807679
The 4.0.0 diff will now need to be updated to reflect the changes made to 4.0.0-preview1 in https://github.com/apache/datafusion-comet/pull/1936
I suggest that we don't merge any more PRs that update `4.0.0-preview1.diff`
--
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] Feat: Support Spark 4.0.0 part1 [datafusion-comet]
Posted by "huaxingao (via GitHub)" <gi...@apache.org>.
huaxingao commented on code in PR #1830:
URL: https://github.com/apache/datafusion-comet/pull/1830#discussion_r2176170903
##########
pom.xml:
##########
@@ -1074,9 +1074,19 @@ under the License.
<ignoreClass>javax.annotation.meta.TypeQualifierNickname</ignoreClass>
</ignoreClasses>
</dependency>
+ <dependency>
+ <groupId>com.google.guava</groupId>
+ <artifactId>guava</artifactId>
+ <ignoreClasses>
+ <ignoreClass>com.google.thirdparty.publicsuffix.TrieParser</ignoreClass>
+ <ignoreClass>com.google.thirdparty.publicsuffix.PublicSuffixPatterns</ignoreClass>
+ <ignoreClass>com.google.thirdparty.publicsuffix.PublicSuffixType</ignoreClass>
Review Comment:
I ignored these classes to get around the following errors.
```
[ERROR] Rule 2: org.codehaus.mojo.extraenforcer.dependencies.BanDuplicateClasses failed with message:
[ERROR] Duplicate classes found:
[ERROR]
[ERROR] Found in:
[ERROR] org.apache.spark:spark-network-common_2.13:jar:4.0.0:provided
[ERROR] com.google.guava:guava:jar:33.2.1-jre:compile
[ERROR] Duplicate classes:
[ERROR] com/google/thirdparty/publicsuffix/TrieParser.class
[ERROR] com/google/thirdparty/publicsuffix/PublicSuffixPatterns.class
[ERROR] com/google/thirdparty/publicsuffix/PublicSuffixType.class
```
--
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] Feat: Support Spark 4.0.0 part1 [datafusion-comet]
Posted by "kazuyukitanimura (via GitHub)" <gi...@apache.org>.
kazuyukitanimura commented on code in PR #1830:
URL: https://github.com/apache/datafusion-comet/pull/1830#discussion_r2178160745
##########
pom.xml:
##########
@@ -1074,9 +1074,19 @@ under the License.
<ignoreClass>javax.annotation.meta.TypeQualifierNickname</ignoreClass>
</ignoreClasses>
</dependency>
+ <dependency>
+ <groupId>com.google.guava</groupId>
+ <artifactId>guava</artifactId>
+ <ignoreClasses>
+ <ignoreClass>com.google.thirdparty.publicsuffix.TrieParser</ignoreClass>
+ <ignoreClass>com.google.thirdparty.publicsuffix.PublicSuffixPatterns</ignoreClass>
+ <ignoreClass>com.google.thirdparty.publicsuffix.PublicSuffixType</ignoreClass>
Review Comment:
Filed https://github.com/apache/datafusion-comet/issues/1968
cc @andygrove @huaxingao
--
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] Feat: Support Spark 4.0.0 part1 [datafusion-comet]
Posted by "andygrove (via GitHub)" <gi...@apache.org>.
andygrove commented on PR #1830:
URL: https://github.com/apache/datafusion-comet/pull/1830#issuecomment-2940951576
I ran into compilation issues locally when building for Spark 3.4. I think these can be resolved simply by moving the new `spark-3.5` shims into the `spark-3.x` shim folder instead.
Also, some jobs fail with scalastyle errors, which can be fixed by running `make format`.
--
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] Feat: Support Spark 4.0.0 part1 [datafusion-comet]
Posted by "huaxingao (via GitHub)" <gi...@apache.org>.
huaxingao commented on code in PR #1830:
URL: https://github.com/apache/datafusion-comet/pull/1830#discussion_r2127844183
##########
common/src/main/java/org/apache/comet/parquet/TypeUtil.java:
##########
@@ -74,7 +74,7 @@ public static ColumnDescriptor convertToParquet(StructField field) {
builder = Types.primitive(PrimitiveType.PrimitiveTypeName.INT64, repetition);
} else if (type == DataTypes.BinaryType) {
builder = Types.primitive(PrimitiveType.PrimitiveTypeName.BINARY, repetition);
- } else if (type == DataTypes.StringType) {
+ } else if (type == DataTypes.StringType || type.sameType(DataTypes.StringType)) {
Review Comment:
This is to support String Collation in Spark 4.0. (e.g. [test("Check order by on table with collated string column")](https://github.com/apache/spark/blob/master/sql/core/src/test/scala/org/apache/spark/sql/collation/CollationSuite.scala#L1117) )
Without String Collation, it goes to https://github.com/apache/spark/blob/master/sql/api/src/main/scala/org/apache/spark/sql/catalyst/parser/DataTypeAstBuilder.scala#L89 which uses singleton `DataTypes.StringType`, so type == DataTypes.StringType, But with String Collation, it goes to https://github.com/apache/spark/blob/master/sql/api/src/main/scala/org/apache/spark/sql/catalyst/parser/DataTypeAstBuilder.scala#L94, so type == DataTypes.StringType fails and I added type.sameType(DataTypes.StringType to let String Collation pass. Actually, I think it should be
```
else if (
type == DataTypes.StringType ||
(type.sameType(DataTypes.StringType) && isSpark40Plus())
)
```
--
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] Feat: Support Spark 4.0.0 part1 [datafusion-comet]
Posted by "andygrove (via GitHub)" <gi...@apache.org>.
andygrove commented on code in PR #1830:
URL: https://github.com/apache/datafusion-comet/pull/1830#discussion_r2175536538
##########
dev/diffs/4.0.0.diff:
##########
@@ -67,7 +53,7 @@ index 56aad01023d..ad9d6a973e4 100644
<!--
This spark-tags test-dep is needed even though it isn't used in this module, otherwise testing-cmds that exclude
diff --git a/sql/core/src/main/scala/org/apache/spark/sql/classic/SparkSession.scala b/sql/core/src/main/scala/org/apache/spark/sql/classic/SparkSession.scala
-index 0015d7ff99e..9278e2fb5f3 100644
+index 0015d7ff99..c9dd85e72c 100644
Review Comment:
Here is a better example of a change that can be avoided:
```
- index 7aef901da4f..f3d6e18926d 100644
+ index 7aef901da4..f3d6e18926 100644
```
--
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] Feat: Support Spark 4.0.0 part1 [datafusion-comet]
Posted by "huaxingao (via GitHub)" <gi...@apache.org>.
huaxingao commented on code in PR #1830:
URL: https://github.com/apache/datafusion-comet/pull/1830#discussion_r2135066516
##########
spark/src/main/scala/org/apache/comet/serde/QueryPlanSerde.scala:
##########
@@ -1437,7 +1437,7 @@ object QueryPlanSerde extends Logging with CometExprShim {
case s: StringDecode =>
// Right child is the encoding expression.
- s.right match {
+ s.charset match {
Review Comment:
```
override def left: Expression = bin
override def right: Expression = charset
```
The above was removed in 4.0. That's why we can't use s.left and s.right any more.
--
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] Feat: Support Spark 4.0.0 part1 [datafusion-comet]
Posted by "andygrove (via GitHub)" <gi...@apache.org>.
andygrove commented on code in PR #1830:
URL: https://github.com/apache/datafusion-comet/pull/1830#discussion_r2175561905
##########
dev/diffs/4.0.0.diff:
##########
@@ -2211,20 +2578,19 @@ index 4fb8faa43a3..984fd1a9892 100644
checkAnswer(
// "fruit" column in this file is encoded using DELTA_LENGTH_BYTE_ARRAY.
diff --git a/sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/parquet/ParquetQuerySuite.scala b/sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/parquet/ParquetQuerySuite.scala
-index a329d3fdc3c..ebca1264eb1 100644
+index bba71f1c48d..a45d3f6e797 100644
--- a/sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/parquet/ParquetQuerySuite.scala
+++ b/sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/parquet/ParquetQuerySuite.scala
-@@ -971,7 +971,8 @@ abstract class ParquetQuerySuite extends QueryTest with ParquetTest with SharedS
- }
- }
+@@ -48,6 +48,8 @@ abstract class ParquetQuerySuite extends QueryTest with ParquetTest with SharedS
+ import testImplicits._
-- test("SPARK-26677: negated null-safe equality comparison should not filter matched row groups") {
-+ test("SPARK-26677: negated null-safe equality comparison should not filter matched row groups",
-+ IgnoreCometNativeScan("Native scans had the filter pushed into DF operator, cannot strip")) {
- withAllParquetReaders {
- withTempPath { path =>
- // Repeated values for dictionary encoding.
-@@ -1042,7 +1043,8 @@ abstract class ParquetQuerySuite extends QueryTest with ParquetTest with SharedS
+ test("simple select queries") {
++ println("==== Runtime Classpath ====")
++ System.getProperty("java.class.path").split(":").foreach(println)
Review Comment:
nit: looks like debug logging that could be removed?
--
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] Feat: Support Spark 4.0.0 part1 [datafusion-comet]
Posted by "andygrove (via GitHub)" <gi...@apache.org>.
andygrove merged PR #1830:
URL: https://github.com/apache/datafusion-comet/pull/1830
--
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] Feat: Support Spark 4.0.0 part1 [datafusion-comet]
Posted by "huaxingao (via GitHub)" <gi...@apache.org>.
huaxingao commented on code in PR #1830:
URL: https://github.com/apache/datafusion-comet/pull/1830#discussion_r2175548788
##########
dev/diffs/4.0.0.diff:
##########
@@ -67,7 +53,7 @@ index 56aad01023d..ad9d6a973e4 100644
<!--
This spark-tags test-dep is needed even though it isn't used in this module, otherwise testing-cmds that exclude
diff --git a/sql/core/src/main/scala/org/apache/spark/sql/classic/SparkSession.scala b/sql/core/src/main/scala/org/apache/spark/sql/classic/SparkSession.scala
-index 0015d7ff99e..9278e2fb5f3 100644
+index 0015d7ff99..c9dd85e72c 100644
Review Comment:
Changed to 11 digits.
--
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] Feat: Support Spark 4.0.0 part1 [datafusion-comet]
Posted by "parthchandra (via GitHub)" <gi...@apache.org>.
parthchandra commented on code in PR #1830:
URL: https://github.com/apache/datafusion-comet/pull/1830#discussion_r2133051606
##########
common/src/main/java/org/apache/comet/parquet/TypeUtil.java:
##########
@@ -74,7 +74,8 @@ public static ColumnDescriptor convertToParquet(StructField field) {
builder = Types.primitive(PrimitiveType.PrimitiveTypeName.INT64, repetition);
} else if (type == DataTypes.BinaryType) {
builder = Types.primitive(PrimitiveType.PrimitiveTypeName.BINARY, repetition);
- } else if (type == DataTypes.StringType) {
+ } else if (type == DataTypes.StringType
+ || (type.sameType(DataTypes.StringType) && isSpark40Plus())) {
Review Comment:
Isn't it sufficient to call `type.sameType` for any version of Spark?
##########
spark/src/main/scala/org/apache/comet/serde/QueryPlanSerde.scala:
##########
@@ -1437,7 +1437,7 @@ object QueryPlanSerde extends Logging with CometExprShim {
case s: StringDecode =>
// Right child is the encoding expression.
- s.right match {
+ s.charset match {
Review Comment:
nit: Is there a subtle difference in Spark 4? `s.bin` and `s.charset` are simply aliases for `s.left` and `s.right`
(I admit this looks more useful)
--
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] Feat: Support Spark 4.0.0 part1 [datafusion-comet]
Posted by "kazuyukitanimura (via GitHub)" <gi...@apache.org>.
kazuyukitanimura commented on code in PR #1830:
URL: https://github.com/apache/datafusion-comet/pull/1830#discussion_r2175934790
##########
pom.xml:
##########
@@ -637,9 +637,9 @@ under the License.
<profile>
<id>scala-2.13</id>
<properties>
- <scala.version>2.13.14</scala.version>
+ <scala.version>2.13.16</scala.version>
<scala.binary.version>2.13</scala.binary.version>
- <semanticdb.version>4.9.5</semanticdb.version>
+ <semanticdb.version>4.13.6</semanticdb.version>
Review Comment:
Since we already updated the spark-4.0 profile, do we need this change?
##########
dev/diffs/4.0.0.diff:
##########
@@ -2150,7 +2517,17 @@ index 795e9f46a8d..1797084a941 100644
}
}
}
-@@ -1991,7 +2004,8 @@ abstract class ParquetFilterSuite extends QueryTest with ParquetTest with Shared
+@@ -1750,7 +1762,8 @@ abstract class ParquetFilterSuite extends QueryTest with ParquetTest with Shared
+ }
+ }
+
+- test("SPARK-17091: Convert IN predicate to Parquet filter push-down") {
++ test("SPARK-17091: Convert IN predicate to Parquet filter push-down",
++ IgnoreComet("IN predicate is not yet supported in Comet, see issue #36")) {
Review Comment:
For other Spark version, looks like we are using IgnoreCometNativeScan("Comet has different push-down behavior")
##########
dev/diffs/4.0.0.diff:
##########
@@ -3021,7 +3338,6 @@ index ed2e309fa07..a1fb4abe681 100644
+ conf
+ .set("spark.sql.extensions", "org.apache.comet.CometSparkSessionExtensions")
+ .set("spark.comet.enabled", "true")
-+ .set("spark.comet.parquet.respectFilterPushdown", "true")
Review Comment:
Should we keep this? `.set("spark.comet.parquet.respectFilterPushdown", "true")`
##########
pom.xml:
##########
@@ -1074,9 +1074,19 @@ under the License.
<ignoreClass>javax.annotation.meta.TypeQualifierNickname</ignoreClass>
</ignoreClasses>
</dependency>
+ <dependency>
+ <groupId>com.google.guava</groupId>
+ <artifactId>guava</artifactId>
+ <ignoreClasses>
+ <ignoreClass>com.google.thirdparty.publicsuffix.TrieParser</ignoreClass>
+ <ignoreClass>com.google.thirdparty.publicsuffix.PublicSuffixPatterns</ignoreClass>
+ <ignoreClass>com.google.thirdparty.publicsuffix.PublicSuffixType</ignoreClass>
Review Comment:
Is this a new conflict?
##########
dev/diffs/4.0.0.diff:
##########
@@ -159,6 +190,21 @@ index 698ca009b4f..57d774a3617 100644
-- Test tables
CREATE table explain_temp1 (key int, val int) USING PARQUET;
+diff --git a/sql/core/src/test/resources/sql-tests/inputs/listagg-collations.sql b/sql/core/src/test/resources/sql-tests/inputs/listagg-collations.sql
+index aa3d02dc2fb..c4f878d9908 100644
+--- a/sql/core/src/test/resources/sql-tests/inputs/listagg-collations.sql
++++ b/sql/core/src/test/resources/sql-tests/inputs/listagg-collations.sql
+@@ -5,7 +5,9 @@ WITH t(c1) AS (SELECT listagg(col1) WITHIN GROUP (ORDER BY col1) FROM (VALUES ('
+ -- Test cases with utf8_lcase. Lower expression added for determinism
+ SELECT lower(listagg(c1) WITHIN GROUP (ORDER BY c1 COLLATE utf8_lcase)) FROM (VALUES ('a'), ('A'), ('b'), ('B')) AS t(c1);
+ WITH t(c1) AS (SELECT lower(listagg(DISTINCT col1 COLLATE utf8_lcase)) FROM (VALUES ('a'), ('A'), ('b'), ('B'))) SELECT len(c1), regexp_count(c1, 'a'), regexp_count(c1, 'b') FROM t;
+-SELECT lower(listagg(DISTINCT c1 COLLATE utf8_lcase) WITHIN GROUP (ORDER BY c1 COLLATE utf8_lcase)) FROM (VALUES ('a'), ('B'), ('b'), ('A')) AS t(c1);
++-- TODO https://github.com/apache/datafusion-comet/issues/1947
++-- TODO fix Comet for this query
++-- SELECT lower(listagg(DISTINCT c1 COLLATE utf8_lcase) WITHIN GROUP (ORDER BY c1 COLLATE utf8_lcase)) FROM (VALUES ('a'), ('B'), ('b'), ('A')) AS t(c1);
Review Comment:
Should we disable comet instead of commenting out? due to this, the result in `listagg-collations.sql.out` is also removed.
--
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] Feat: Support Spark 4.0.0 part1 [datafusion-comet]
Posted by "comphead (via GitHub)" <gi...@apache.org>.
comphead commented on code in PR #1830:
URL: https://github.com/apache/datafusion-comet/pull/1830#discussion_r2175472248
##########
.github/actions/java-test/action.yaml:
##########
@@ -68,7 +68,7 @@ runs:
env:
COMET_PARQUET_SCAN_IMPL: ${{ inputs.scan_impl }}
run: |
- MAVEN_OPTS="-XX:+UnlockDiagnosticVMOptions -XX:+ShowMessageBoxOnError -XX:+HeapDumpOnOutOfMemoryError -XX:ErrorFile=./hs_err_pid%p.log" SPARK_HOME=`pwd` ./mvnw -B clean install ${{ inputs.maven_opts }}
+ MAVEN_OPTS="-Xmx4G -Xms2G -XX:+UnlockDiagnosticVMOptions -XX:+ShowMessageBoxOnError -XX:+HeapDumpOnOutOfMemoryError -XX:ErrorFile=./hs_err_pid%p.log" SPARK_HOME=`pwd` ./mvnw -B clean install ${{ inputs.maven_opts }}
Review Comment:
Didn't help, do you mean the test fails on OOM?
--
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] Feat: Support Spark 4.0.0 part1 [datafusion-comet]
Posted by "parthchandra (via GitHub)" <gi...@apache.org>.
parthchandra commented on code in PR #1830:
URL: https://github.com/apache/datafusion-comet/pull/1830#discussion_r2178432095
##########
common/src/test/java/org/apache/comet/parquet/TestFileReader.java:
##########
@@ -609,7 +611,9 @@ public void testColumnIndexReadWrite() throws Exception {
assertEquals(1, offsetIndex.getFirstRowIndex(1));
assertEquals(3, offsetIndex.getFirstRowIndex(2));
- assertNull(indexReader.readColumnIndex(footer.getBlocks().get(2).getColumns().get(0)));
+ if (!isSpark40Plus()) {
+ assertNull(indexReader.readColumnIndex(footer.getBlocks().get(2).getColumns().get(0)));
Review Comment:
Did we log an issue specifically for this? The ColumnIndex implementation is part of Comet code so if a test is failing we need to fix it in Comet.
--
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] Feat: Support Spark 4.0.0 part1 [datafusion-comet]
Posted by "andygrove (via GitHub)" <gi...@apache.org>.
andygrove commented on code in PR #1830:
URL: https://github.com/apache/datafusion-comet/pull/1830#discussion_r2127200413
##########
common/src/main/java/org/apache/comet/parquet/TypeUtil.java:
##########
@@ -74,7 +74,7 @@ public static ColumnDescriptor convertToParquet(StructField field) {
builder = Types.primitive(PrimitiveType.PrimitiveTypeName.INT64, repetition);
} else if (type == DataTypes.BinaryType) {
builder = Types.primitive(PrimitiveType.PrimitiveTypeName.BINARY, repetition);
- } else if (type == DataTypes.StringType) {
+ } else if (type == DataTypes.StringType || type.sameType(DataTypes.StringType)) {
Review Comment:
I'm not familiar with the `sameType` method. Why is it needed for strings but not for the other types?
--
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] Feat: Support Spark 4.0.0 part1 [datafusion-comet]
Posted by "huaxingao (via GitHub)" <gi...@apache.org>.
huaxingao commented on code in PR #1830:
URL: https://github.com/apache/datafusion-comet/pull/1830#discussion_r2135053492
##########
common/src/main/java/org/apache/comet/parquet/TypeUtil.java:
##########
@@ -74,7 +74,8 @@ public static ColumnDescriptor convertToParquet(StructField field) {
builder = Types.primitive(PrimitiveType.PrimitiveTypeName.INT64, repetition);
} else if (type == DataTypes.BinaryType) {
builder = Types.primitive(PrimitiveType.PrimitiveTypeName.BINARY, repetition);
- } else if (type == DataTypes.StringType) {
+ } else if (type == DataTypes.StringType
+ || (type.sameType(DataTypes.StringType) && isSpark40Plus())) {
Review Comment:
I’ve thought about this when I made the change. In Spark < 4.0, using type == DataTypes.StringType is more accurate. That's why I used both checks.
--
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] Feat: Support Spark 4.0.0 part1 [datafusion-comet]
Posted by "huaxingao (via GitHub)" <gi...@apache.org>.
huaxingao commented on code in PR #1830:
URL: https://github.com/apache/datafusion-comet/pull/1830#discussion_r2124462679
##########
spark/src/main/spark-3.5/org/apache/spark/sql/comet/shims/ShimCometTPCDSMicroBenchmark.scala:
##########
@@ -0,0 +1,41 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.spark.sql.comet.shims
+
+import org.apache.spark.sql.catalyst.catalog.HiveTableRelation
+import org.apache.spark.sql.catalyst.plans.logical.LogicalPlan
+import org.apache.spark.sql.catalyst.plans.logical.SubqueryAlias
+import org.apache.spark.sql.execution.datasources.LogicalRelation
+
+object ShimCometTPCDSMicroBenchmark {
+ def collectQueryRelations(plan: LogicalPlan): Set[String] = {
+ val queryRelations = scala.collection.mutable.HashSet[String]()
+ plan.foreach {
+ case SubqueryAlias(alias, _: LogicalRelation) =>
+ queryRelations.add(alias.name)
+ case LogicalRelation(_, _, Some(catalogTable), _) =>
+ queryRelations.add(catalogTable.identifier.table)
Review Comment:
Fixed. Thanks. I will also check other shim and remove if not needed.
--
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] Feat: Support Spark 4.0.0 part1 [datafusion-comet]
Posted by "andygrove (via GitHub)" <gi...@apache.org>.
andygrove commented on code in PR #1830:
URL: https://github.com/apache/datafusion-comet/pull/1830#discussion_r2121737798
##########
spark/src/main/spark-3.5/org/apache/spark/sql/comet/shims/ShimCometTPCDSMicroBenchmark.scala:
##########
@@ -0,0 +1,41 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.spark.sql.comet.shims
+
+import org.apache.spark.sql.catalyst.catalog.HiveTableRelation
+import org.apache.spark.sql.catalyst.plans.logical.LogicalPlan
+import org.apache.spark.sql.catalyst.plans.logical.SubqueryAlias
+import org.apache.spark.sql.execution.datasources.LogicalRelation
+
+object ShimCometTPCDSMicroBenchmark {
+ def collectQueryRelations(plan: LogicalPlan): Set[String] = {
+ val queryRelations = scala.collection.mutable.HashSet[String]()
+ plan.foreach {
+ case SubqueryAlias(alias, _: LogicalRelation) =>
+ queryRelations.add(alias.name)
+ case LogicalRelation(_, _, Some(catalogTable), _) =>
+ queryRelations.add(catalogTable.identifier.table)
Review Comment:
We could avoid the need to shim by using the following, which works across all Spark versions, but shimming works fine too.
```scala
case rel: LogicalRelation if rel.catalogTable.isDefined =>
queryRelations.add(rel.catalogTable.get.identifier.table)
```
--
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] Feat: Support Spark 4.0.0 part1 [datafusion-comet]
Posted by "andygrove (via GitHub)" <gi...@apache.org>.
andygrove commented on code in PR #1830:
URL: https://github.com/apache/datafusion-comet/pull/1830#discussion_r2175531317
##########
dev/diffs/4.0.0.diff:
##########
@@ -67,7 +53,7 @@ index 56aad01023d..ad9d6a973e4 100644
<!--
This spark-tags test-dep is needed even though it isn't used in this module, otherwise testing-cmds that exclude
diff --git a/sql/core/src/main/scala/org/apache/spark/sql/classic/SparkSession.scala b/sql/core/src/main/scala/org/apache/spark/sql/classic/SparkSession.scala
-index 0015d7ff99e..9278e2fb5f3 100644
+index 0015d7ff99..c9dd85e72c 100644
Review Comment:
This commit introduces a lot of changes because the hash is 10 digits instead of 11. This can be avoided by executing `git config core.abbrev 11;` before making the diff (taken from https://datafusion.apache.org/comet/contributor-guide/spark-sql-tests.html#generating-the-diff-file).
--
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] Feat: Support Spark 4.0.0 part1 [datafusion-comet]
Posted by "kazuyukitanimura (via GitHub)" <gi...@apache.org>.
kazuyukitanimura commented on code in PR #1830:
URL: https://github.com/apache/datafusion-comet/pull/1830#discussion_r2175922098
##########
common/src/test/java/org/apache/comet/parquet/TestFileReader.java:
##########
@@ -609,7 +611,9 @@ public void testColumnIndexReadWrite() throws Exception {
assertEquals(1, offsetIndex.getFirstRowIndex(1));
assertEquals(3, offsetIndex.getFirstRowIndex(2));
- assertNull(indexReader.readColumnIndex(footer.getBlocks().get(2).getColumns().get(0)));
+ if (!isSpark40Plus()) {
+ assertNull(indexReader.readColumnIndex(footer.getBlocks().get(2).getColumns().get(0)));
Review Comment:
Do you mind tracking this in a ticket please?
--
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] Feat: Support Spark 4.0.0 part1 [datafusion-comet]
Posted by "andygrove (via GitHub)" <gi...@apache.org>.
andygrove commented on code in PR #1830:
URL: https://github.com/apache/datafusion-comet/pull/1830#discussion_r2180120589
##########
common/src/test/java/org/apache/comet/parquet/TestFileReader.java:
##########
@@ -609,7 +611,9 @@ public void testColumnIndexReadWrite() throws Exception {
assertEquals(1, offsetIndex.getFirstRowIndex(1));
assertEquals(3, offsetIndex.getFirstRowIndex(2));
- assertNull(indexReader.readColumnIndex(footer.getBlocks().get(2).getColumns().get(0)));
+ if (!isSpark40Plus()) {
+ assertNull(indexReader.readColumnIndex(footer.getBlocks().get(2).getColumns().get(0)));
Review Comment:
The code here has a TODO linking to https://github.com/apache/datafusion-comet/issues/1948. I added a comment in this issue referring to this file.
--
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