You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2023/01/03 10:43:02 UTC
[GitHub] [spark] dongjoon-hyun opened a new pull request, #39362: [SPARK-41858][SQL] Fix ORC reader perf regression due to DEFAULT value feature
dongjoon-hyun opened a new pull request, #39362:
URL: https://github.com/apache/spark/pull/39362
…
<!--
Thanks for sending a pull request! Here are some tips for you:
1. If this is your first time, please read our contributor guidelines: https://spark.apache.org/contributing.html
2. Ensure you have added or run the appropriate tests for your PR: https://spark.apache.org/developer-tools.html
3. If the PR is unfinished, add '[WIP]' in your PR title, e.g., '[WIP][SPARK-XXXX] Your PR title ...'.
4. Be sure to keep the PR description updated to reflect all changes.
5. Please write your PR title to summarize what this PR proposes.
6. If possible, provide a concise example to reproduce the issue for a faster review.
7. If you want to add a new configuration, please read the guideline first for naming configurations in
'core/src/main/scala/org/apache/spark/internal/config/ConfigEntry.scala'.
8. If you want to add or modify an error type or message, please read the guideline first in
'core/src/main/resources/error/README.md'.
-->
### What changes were proposed in this pull request?
<!--
Please clarify what changes you are proposing. The purpose of this section is to outline the changes and how this PR fixes the issue.
If possible, please consider writing useful notes for better and faster reviews in your PR. See the examples below.
1. If you refactor some codes with changing classes, showing the class hierarchy will help reviewers.
2. If you fix some SQL features, you can provide some references of other DBMSes.
3. If there is design documentation, please add the link.
4. If there is a discussion in the mailing list, please add the link.
-->
### Why are the changes needed?
<!--
Please clarify why the changes are needed. For instance,
1. If you propose a new API, clarify the use case for a new API.
2. If you fix a bug, you can clarify why it is a bug.
-->
### Does this PR introduce _any_ user-facing change?
<!--
Note that it means *any* user-facing change including all aspects such as the documentation fix.
If yes, please clarify the previous behavior and the change this PR proposes - provide the console output, description and/or an example to show the behavior difference if possible.
If possible, please also clarify if this is a user-facing change compared to the released Spark versions or within the unreleased branches such as master.
If no, write 'No'.
-->
### How was this patch tested?
<!--
If tests were added, say they were added here. Please make sure to add some test cases that check the changes thoroughly including negative and positive cases if possible.
If it was tested in a way different from regular unit tests, please clarify how you tested step by step, ideally copy and paste-able, so that other reviewers can test and check, and descendants can verify in the future.
If tests were not added, please describe why they were not added and/or why it was difficult to add.
If benchmark tests were added, please run the benchmarks in GitHub Actions for the consistent environment, and the instructions could accord to: https://spark.apache.org/developer-tools.html#github-workflow-benchmarks.
-->
--
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: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] dtenedor commented on a diff in pull request #39362: [SPARK-41858][SQL] Fix ORC reader perf regression due to DEFAULT value feature
Posted by GitBox <gi...@apache.org>.
dtenedor commented on code in PR #39362:
URL: https://github.com/apache/spark/pull/39362#discussion_r1060855957
##########
sql/core/src/test/scala/org/apache/spark/sql/sources/InsertSuite.scala:
##########
@@ -1943,7 +1944,11 @@ class InsertSuite extends DataSourceTest with SharedSparkSession {
Row(Seq(Row(1, 2)), Seq(Map(false -> "def", true -> "jkl"))),
Seq(Map(true -> "xyz"))),
Row(2,
- null,
+ if (config.dataSource != "orc") {
Review Comment:
LGTM, let's merge this then
--
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: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] dongjoon-hyun commented on a diff in pull request #39362: [SPARK-41858][SQL] Fix ORC reader perf regression due to DEFAULT value feature
Posted by GitBox <gi...@apache.org>.
dongjoon-hyun commented on code in PR #39362:
URL: https://github.com/apache/spark/pull/39362#discussion_r1060813160
##########
sql/core/src/test/scala/org/apache/spark/sql/sources/InsertSuite.scala:
##########
@@ -1943,7 +1944,11 @@ class InsertSuite extends DataSourceTest with SharedSparkSession {
Row(Seq(Row(1, 2)), Seq(Map(false -> "def", true -> "jkl"))),
Seq(Map(true -> "xyz"))),
Row(2,
- null,
+ if (config.dataSource != "orc") {
Review Comment:
Thank you for review, @dtenedor .
- Please see https://issues.apache.org/jira/browse/SPARK-41782 . We have a benchmark to detect this kind of perf regression. You can run it locally in your environment.
- This is a partial revert to the original code which is the existing behavior before your PR like the previous Spark. As I mentioned in the PR description, [SPARK-39862](https://issues.apache.org/jira/browse/SPARK-39862) should propose a fix without perf regression.
New feature is good as long as not breaking the old behavior.
--
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: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] LuciferYang commented on a diff in pull request #39362: [SPARK-41858][SQL] Fix ORC reader perf regression due to DEFAULT value feature
Posted by GitBox <gi...@apache.org>.
LuciferYang commented on code in PR #39362:
URL: https://github.com/apache/spark/pull/39362#discussion_r1060570333
##########
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/orc/OrcDeserializer.scala:
##########
@@ -57,14 +57,7 @@ class OrcDeserializer(
} else {
new RowUpdater(resultRow)
}
- val writer: (Int, WritableComparable[_]) => Unit =
- (ordinal, value) =>
- if (value == null) {
- rowUpdater.setNullAt(ordinal)
- } else {
- val writerFunc = newWriter(f.dataType, rowUpdater)
- writerFunc(ordinal, value)
- }
+ val writer = newWriter(f.dataType, rowUpdater)
Review Comment:
A little magical, let me do some investigate too
--
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: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] dongjoon-hyun commented on a diff in pull request #39362: [SPARK-41858][SQL] Fix ORC reader perf regression due to DEFAULT value feature
Posted by GitBox <gi...@apache.org>.
dongjoon-hyun commented on code in PR #39362:
URL: https://github.com/apache/spark/pull/39362#discussion_r1060835491
##########
sql/core/src/test/scala/org/apache/spark/sql/sources/InsertSuite.scala:
##########
@@ -1943,7 +1944,11 @@ class InsertSuite extends DataSourceTest with SharedSparkSession {
Row(Seq(Row(1, 2)), Seq(Map(false -> "def", true -> "jkl"))),
Seq(Map(true -> "xyz"))),
Row(2,
- null,
+ if (config.dataSource != "orc") {
Review Comment:
Thanks, but I filed SPARK-41858 as the blocker of Apache Spark 3.4 because this really blocks Apache Spark 3.4 preparation from my side. If you don't mind, I'd prefer to merge this first and help you cleanly.
--
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: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] dongjoon-hyun commented on pull request #39362: [SPARK-41858][SQL] Fix ORC reader perf regression due to DEFAULT value feature
Posted by GitBox <gi...@apache.org>.
dongjoon-hyun commented on PR #39362:
URL: https://github.com/apache/spark/pull/39362#issuecomment-1370009261
Could you review this, @viirya ?
--
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: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] dongjoon-hyun commented on a diff in pull request #39362: [SPARK-41858][SQL] Fix ORC reader perf regression due to DEFAULT value feature
Posted by GitBox <gi...@apache.org>.
dongjoon-hyun commented on code in PR #39362:
URL: https://github.com/apache/spark/pull/39362#discussion_r1060823376
##########
sql/core/src/test/scala/org/apache/spark/sql/sources/InsertSuite.scala:
##########
@@ -1943,7 +1944,11 @@ class InsertSuite extends DataSourceTest with SharedSparkSession {
Row(Seq(Row(1, 2)), Seq(Map(false -> "def", true -> "jkl"))),
Seq(Map(true -> "xyz"))),
Row(2,
- null,
+ if (config.dataSource != "orc") {
Review Comment:
Sorry, I copied a wrong link. Here is the exact link, @dtenedor .
https://github.com/apache/spark/pull/39301#discussion_r1059239575
--
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: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] dtenedor commented on a diff in pull request #39362: [SPARK-41858][SQL] Fix ORC reader perf regression due to DEFAULT value feature
Posted by GitBox <gi...@apache.org>.
dtenedor commented on code in PR #39362:
URL: https://github.com/apache/spark/pull/39362#discussion_r1060803729
##########
sql/core/src/test/scala/org/apache/spark/sql/sources/InsertSuite.scala:
##########
@@ -1943,7 +1944,11 @@ class InsertSuite extends DataSourceTest with SharedSparkSession {
Row(Seq(Row(1, 2)), Seq(Map(false -> "def", true -> "jkl"))),
Seq(Map(true -> "xyz"))),
Row(2,
- null,
+ if (config.dataSource != "orc") {
Review Comment:
It looks like this PR breaks the DEFAULT value functionality for the Orc data source (as shown by this unit test). If anyone is using this functionality, this PR will make their results incorrect. It would be better if we can fix the performance regression without changing the behavior. Is there some profile to show why the performance regression takes place? For example, is it because this change to the writer function introduces a new level of function call?
<img width="2235" alt="image" src="https://user-images.githubusercontent.com/99207096/210409729-272a12c0-805f-4849-9a0b-4e7677e10575.png">
--
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: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] dongjoon-hyun commented on pull request #39362: [SPARK-41858][SQL] Fix ORC reader perf regression due to DEFAULT value feature
Posted by GitBox <gi...@apache.org>.
dongjoon-hyun commented on PR #39362:
URL: https://github.com/apache/spark/pull/39362#issuecomment-1370107099
Here is the blocker-level correctness issue JIRA, SPARK-4186, for ORC reader part.
--
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: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] dtenedor commented on a diff in pull request #39362: [SPARK-41858][SQL] Fix ORC reader perf regression due to DEFAULT value feature
Posted by GitBox <gi...@apache.org>.
dtenedor commented on code in PR #39362:
URL: https://github.com/apache/spark/pull/39362#discussion_r1060857648
##########
sql/core/src/test/scala/org/apache/spark/sql/sources/InsertSuite.scala:
##########
@@ -1943,7 +1944,11 @@ class InsertSuite extends DataSourceTest with SharedSparkSession {
Row(Seq(Row(1, 2)), Seq(Map(false -> "def", true -> "jkl"))),
Seq(Map(true -> "xyz"))),
Row(2,
- null,
+ if (config.dataSource != "orc") {
Review Comment:
You can assign the new correctness Jira for me to fix.
--
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: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] dtenedor commented on a diff in pull request #39362: [SPARK-41858][SQL] Fix ORC reader perf regression due to DEFAULT value feature
Posted by GitBox <gi...@apache.org>.
dtenedor commented on code in PR #39362:
URL: https://github.com/apache/spark/pull/39362#discussion_r1060819394
##########
sql/core/src/test/scala/org/apache/spark/sql/sources/InsertSuite.scala:
##########
@@ -1943,7 +1944,11 @@ class InsertSuite extends DataSourceTest with SharedSparkSession {
Row(Seq(Row(1, 2)), Seq(Map(false -> "def", true -> "jkl"))),
Seq(Map(true -> "xyz"))),
Row(2,
- null,
+ if (config.dataSource != "orc") {
Review Comment:
If someone can tell me how to run the benchmark, I can play around with a fix for the perf regression that also does not change the behavior. I suspect that it's due to the extra function call overhead that takes place each time a value is written, but not sure without a 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: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] beliefer commented on pull request #39362: [SPARK-41858][SQL] Fix ORC reader perf regression due to DEFAULT value feature
Posted by GitBox <gi...@apache.org>.
beliefer commented on PR #39362:
URL: https://github.com/apache/spark/pull/39362#issuecomment-1370396973
LGTM. Although later.
--
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: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] dongjoon-hyun commented on pull request #39362: [SPARK-41858][SQL] Fix ORC reader perf regression due to DEFAULT value feature
Posted by GitBox <gi...@apache.org>.
dongjoon-hyun commented on PR #39362:
URL: https://github.com/apache/spark/pull/39362#issuecomment-1370103389
Thank you, @viirya , @dtenedor , @beliefer , @LuciferYang . Merged to master.
--
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: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] dongjoon-hyun commented on a diff in pull request #39362: [SPARK-41858][SQL] Fix ORC reader perf regression due to DEFAULT value feature
Posted by GitBox <gi...@apache.org>.
dongjoon-hyun commented on code in PR #39362:
URL: https://github.com/apache/spark/pull/39362#discussion_r1060813160
##########
sql/core/src/test/scala/org/apache/spark/sql/sources/InsertSuite.scala:
##########
@@ -1943,7 +1944,11 @@ class InsertSuite extends DataSourceTest with SharedSparkSession {
Row(Seq(Row(1, 2)), Seq(Map(false -> "def", true -> "jkl"))),
Seq(Map(true -> "xyz"))),
Row(2,
- null,
+ if (config.dataSource != "orc") {
Review Comment:
Thank you for review, @dtenedor .
- Please see https://github.com/apache/spark/pull/39301#discussion_r1059239575 . We have a benchmark to detect this kind of perf regression. You can run it locally in your environment.
- This is a partial revert to the original code which is the existing behavior before your PR like the previous Spark. As I mentioned in this PR description, [SPARK-39862](https://issues.apache.org/jira/browse/SPARK-39862) should propose a new fix without perf regression.
New feature is good as long as not breaking the old behavior.
--
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: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] dongjoon-hyun commented on a diff in pull request #39362: [SPARK-41858][SQL] Fix ORC reader perf regression due to DEFAULT value feature
Posted by GitBox <gi...@apache.org>.
dongjoon-hyun commented on code in PR #39362:
URL: https://github.com/apache/spark/pull/39362#discussion_r1060824745
##########
sql/core/src/test/scala/org/apache/spark/sql/sources/InsertSuite.scala:
##########
@@ -1943,7 +1944,11 @@ class InsertSuite extends DataSourceTest with SharedSparkSession {
Row(Seq(Row(1, 2)), Seq(Map(false -> "def", true -> "jkl"))),
Seq(Map(true -> "xyz"))),
Row(2,
- null,
+ if (config.dataSource != "orc") {
Review Comment:
Here is the benchmark.
- https://github.com/apache/spark/blob/master/sql/hive/src/test/scala/org/apache/spark/sql/hive/orc/OrcReadBenchmark.scala
```
build/sbt -Phive "hive/Test/runMain org.apache.spark.sql.hive.orc.OrcReadBenchmark"
```
##########
sql/core/src/test/scala/org/apache/spark/sql/sources/InsertSuite.scala:
##########
@@ -1943,7 +1944,11 @@ class InsertSuite extends DataSourceTest with SharedSparkSession {
Row(Seq(Row(1, 2)), Seq(Map(false -> "def", true -> "jkl"))),
Seq(Map(true -> "xyz"))),
Row(2,
- null,
+ if (config.dataSource != "orc") {
Review Comment:
Here is the benchmark.
- https://github.com/apache/spark/blob/master/sql/hive/src/test/scala/org/apache/spark/sql/hive/orc/OrcReadBenchmark.scala
```
$ build/sbt -Phive "hive/Test/runMain org.apache.spark.sql.hive.orc.OrcReadBenchmark"
```
--
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: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] dongjoon-hyun commented on a diff in pull request #39362: [SPARK-41858][SQL] Fix ORC reader perf regression due to DEFAULT value feature
Posted by GitBox <gi...@apache.org>.
dongjoon-hyun commented on code in PR #39362:
URL: https://github.com/apache/spark/pull/39362#discussion_r1060813160
##########
sql/core/src/test/scala/org/apache/spark/sql/sources/InsertSuite.scala:
##########
@@ -1943,7 +1944,11 @@ class InsertSuite extends DataSourceTest with SharedSparkSession {
Row(Seq(Row(1, 2)), Seq(Map(false -> "def", true -> "jkl"))),
Seq(Map(true -> "xyz"))),
Row(2,
- null,
+ if (config.dataSource != "orc") {
Review Comment:
Thank you for review, @dtenedor .
- Please see https://github.com/apache/spark/pull/39301#discussion_r1059239575 . We have a benchmark to detect this kind of perf regression. You can run it locally in your environment.
- This is a partial revert to the original code which is the existing behavior before your PR like the previous Spark. As I mentioned in the PR description, [SPARK-39862](https://issues.apache.org/jira/browse/SPARK-39862) should propose a fix without perf regression.
New feature is good as long as not breaking the old behavior.
--
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: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] dongjoon-hyun commented on a diff in pull request #39362: [SPARK-41858][SQL] Fix ORC reader perf regression due to DEFAULT value feature
Posted by GitBox <gi...@apache.org>.
dongjoon-hyun commented on code in PR #39362:
URL: https://github.com/apache/spark/pull/39362#discussion_r1060827284
##########
sql/core/src/test/scala/org/apache/spark/sql/sources/InsertSuite.scala:
##########
@@ -1943,7 +1944,11 @@ class InsertSuite extends DataSourceTest with SharedSparkSession {
Row(Seq(Row(1, 2)), Seq(Map(false -> "def", true -> "jkl"))),
Seq(Map(true -> "xyz"))),
Row(2,
- null,
+ if (config.dataSource != "orc") {
Review Comment:
Please run the above command and check the following case, `Single Struct Column Scan with 600 Fields`, specifically, @dtenedor .
https://github.com/apache/spark/blob/ec594236df4a568d3b844089b471373789a67b2a/sql/hive/src/test/scala/org/apache/spark/sql/hive/orc/OrcReadBenchmark.scala#L400
--
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: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] dongjoon-hyun commented on a diff in pull request #39362: [SPARK-41858][SQL] Fix ORC reader perf regression due to DEFAULT value feature
Posted by GitBox <gi...@apache.org>.
dongjoon-hyun commented on code in PR #39362:
URL: https://github.com/apache/spark/pull/39362#discussion_r1060827284
##########
sql/core/src/test/scala/org/apache/spark/sql/sources/InsertSuite.scala:
##########
@@ -1943,7 +1944,11 @@ class InsertSuite extends DataSourceTest with SharedSparkSession {
Row(Seq(Row(1, 2)), Seq(Map(false -> "def", true -> "jkl"))),
Seq(Map(true -> "xyz"))),
Row(2,
- null,
+ if (config.dataSource != "orc") {
Review Comment:
Please run the above command and check the following case specifically, @dtenedor .
https://github.com/apache/spark/blob/ec594236df4a568d3b844089b471373789a67b2a/sql/hive/src/test/scala/org/apache/spark/sql/hive/orc/OrcReadBenchmark.scala#L400
--
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: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] dtenedor commented on a diff in pull request #39362: [SPARK-41858][SQL] Fix ORC reader perf regression due to DEFAULT value feature
Posted by GitBox <gi...@apache.org>.
dtenedor commented on code in PR #39362:
URL: https://github.com/apache/spark/pull/39362#discussion_r1060818425
##########
sql/core/src/test/scala/org/apache/spark/sql/sources/InsertSuite.scala:
##########
@@ -1943,7 +1944,11 @@ class InsertSuite extends DataSourceTest with SharedSparkSession {
Row(Seq(Row(1, 2)), Seq(Map(false -> "def", true -> "jkl"))),
Seq(Map(true -> "xyz"))),
Row(2,
- null,
+ if (config.dataSource != "orc") {
Review Comment:
> Thank you for review, @dtenedor .
>
> * Please see https://issues.apache.org/jira/browse/SPARK-41782 . We have a benchmark to detect this kind of perf regression. You can run it locally in your environment.
Thanks @dongjoon-hyun for the benchmark! The Jira simply comprises the title `Regenerate benchmark results`. Is there some instructions for how to run the benchmark?
> * This is a partial revert to the original code which is the existing behavior before your PR like the previous Spark. As I mentioned in the PR description, [SPARK-39862](https://issues.apache.org/jira/browse/SPARK-39862) should propose a fix without perf regression.
>
> New feature is good as long as not breaking the old behavior.
Agree on this. However, that bug fix was merged into Spark 3.3 on Jul. 28, 2022. Is it possible that users could have built pipelines since then using the new feature that would return incorrect results if we merged this PR?
--
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: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] dtenedor commented on a diff in pull request #39362: [SPARK-41858][SQL] Fix ORC reader perf regression due to DEFAULT value feature
Posted by GitBox <gi...@apache.org>.
dtenedor commented on code in PR #39362:
URL: https://github.com/apache/spark/pull/39362#discussion_r1060827703
##########
sql/core/src/test/scala/org/apache/spark/sql/sources/InsertSuite.scala:
##########
@@ -1943,7 +1944,11 @@ class InsertSuite extends DataSourceTest with SharedSparkSession {
Row(Seq(Row(1, 2)), Seq(Map(false -> "def", true -> "jkl"))),
Seq(Map(true -> "xyz"))),
Row(2,
- null,
+ if (config.dataSource != "orc") {
Review Comment:
@dongjoon-hyun sounds good, the comment in that file explains how to run it. Let me take a look myself, I will try to fix the performance regression without changing the behavior. I can ping this thread again with the results
--
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: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] dongjoon-hyun commented on a diff in pull request #39362: [SPARK-41858][SQL] Fix ORC reader perf regression due to DEFAULT value feature
Posted by GitBox <gi...@apache.org>.
dongjoon-hyun commented on code in PR #39362:
URL: https://github.com/apache/spark/pull/39362#discussion_r1060855438
##########
sql/core/src/test/scala/org/apache/spark/sql/sources/InsertSuite.scala:
##########
@@ -1943,7 +1944,11 @@ class InsertSuite extends DataSourceTest with SharedSparkSession {
Row(Seq(Row(1, 2)), Seq(Map(false -> "def", true -> "jkl"))),
Seq(Map(true -> "xyz"))),
Row(2,
- null,
+ if (config.dataSource != "orc") {
Review Comment:
Thank you so much for your understanding. I'll file another blocker JIRA for that of course.
--
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: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] dtenedor commented on a diff in pull request #39362: [SPARK-41858][SQL] Fix ORC reader perf regression due to DEFAULT value feature
Posted by GitBox <gi...@apache.org>.
dtenedor commented on code in PR #39362:
URL: https://github.com/apache/spark/pull/39362#discussion_r1060840069
##########
sql/core/src/test/scala/org/apache/spark/sql/sources/InsertSuite.scala:
##########
@@ -1943,7 +1944,11 @@ class InsertSuite extends DataSourceTest with SharedSparkSession {
Row(Seq(Row(1, 2)), Seq(Map(false -> "def", true -> "jkl"))),
Seq(Map(true -> "xyz"))),
Row(2,
- null,
+ if (config.dataSource != "orc") {
Review Comment:
@dongjoon-hyun that is OK, but we should probably not release Spark 3.4 with a correctness regression either. It is equally important as performance. If we create another Jira blocking the release of 3.4 that covers fixing the correctness bug, it is fine to merge this PR.
At any rate, I am hoping to figure this out today. Then we should be unblocked 🤔
--
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: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] dongjoon-hyun commented on a diff in pull request #39362: [SPARK-41858][SQL] Fix ORC reader perf regression due to DEFAULT value feature
Posted by GitBox <gi...@apache.org>.
dongjoon-hyun commented on code in PR #39362:
URL: https://github.com/apache/spark/pull/39362#discussion_r1060823376
##########
sql/core/src/test/scala/org/apache/spark/sql/sources/InsertSuite.scala:
##########
@@ -1943,7 +1944,11 @@ class InsertSuite extends DataSourceTest with SharedSparkSession {
Row(Seq(Row(1, 2)), Seq(Map(false -> "def", true -> "jkl"))),
Seq(Map(true -> "xyz"))),
Row(2,
- null,
+ if (config.dataSource != "orc") {
Review Comment:
I copied a wrong link. Here is the exact link, @dtenedor .
https://github.com/apache/spark/pull/39301#discussion_r1059239575
--
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: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] dongjoon-hyun commented on a diff in pull request #39362: [SPARK-41858][SQL] Fix ORC reader perf regression due to DEFAULT value feature
Posted by GitBox <gi...@apache.org>.
dongjoon-hyun commented on code in PR #39362:
URL: https://github.com/apache/spark/pull/39362#discussion_r1060824745
##########
sql/core/src/test/scala/org/apache/spark/sql/sources/InsertSuite.scala:
##########
@@ -1943,7 +1944,11 @@ class InsertSuite extends DataSourceTest with SharedSparkSession {
Row(Seq(Row(1, 2)), Seq(Map(false -> "def", true -> "jkl"))),
Seq(Map(true -> "xyz"))),
Row(2,
- null,
+ if (config.dataSource != "orc") {
Review Comment:
Here is the benchmark.
- https://github.com/apache/spark/blob/master/sql/hive/src/test/scala/org/apache/spark/sql/hive/orc/OrcReadBenchmark.scala
--
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: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] dongjoon-hyun commented on pull request #39362: [SPARK-41858][SQL] Fix ORC reader perf regression due to DEFAULT value feature
Posted by GitBox <gi...@apache.org>.
dongjoon-hyun commented on PR #39362:
URL: https://github.com/apache/spark/pull/39362#issuecomment-1370040834
Also, cc @dtenedor , @beliefer , @HyukjinKwon , too
--
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: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] dongjoon-hyun closed pull request #39362: [SPARK-41858][SQL] Fix ORC reader perf regression due to DEFAULT value feature
Posted by GitBox <gi...@apache.org>.
dongjoon-hyun closed pull request #39362: [SPARK-41858][SQL] Fix ORC reader perf regression due to DEFAULT value feature
URL: https://github.com/apache/spark/pull/39362
--
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: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org