You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "flaming-archer (via GitHub)" <gi...@apache.org> on 2025/08/13 07:55:28 UTC
[PR] [SPARK-52969][SQL] Support DSv2 OrcScan dpp [spark]
flaming-archer opened a new pull request, #52009:
URL: https://github.com/apache/spark/pull/52009
<!--
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
'common/utils/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.
-->
Support ORCScan Dynamic Partition Prune to greatly improves performance.
### 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.
-->
Improve dsv2 and enhance the query performance of commonly used files
### Does this PR introduce _any_ user-facing change?
<!--
Note that it means *any* user-facing change including all aspects such as new features, bug fixes, or other behavior changes. Documentation-only updates are not considered user-facing changes.
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'.
-->
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.
-->
UT.
### Was this patch authored or co-authored using generative AI tooling?
<!--
If generative AI tooling has been used in the process of authoring this patch, please include the
phrase: 'Generated-by: ' followed by the name of the tool and its version.
If no, write 'No'.
Please refer to the [ASF Generative Tooling Guidance](https://www.apache.org/legal/generative-tooling.html) for details.
-->
NO.
--
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
Re: [PR] [SPARK-52969][SQL] Support DSv2 OrcScan Dynamic Partition Prune [spark]
Posted by "flaming-archer (via GitHub)" <gi...@apache.org>.
flaming-archer commented on PR #52009:
URL: https://github.com/apache/spark/pull/52009#issuecomment-3187365562
@dongjoon-hyun Pls take a look at it again. I have used ./dev/scalafmt format scala files already.
--
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
Re: [PR] [SPARK-52969][SQL] Support DSv2 OrcScan Dynamic Partition Prune [spark]
Posted by "dongjoon-hyun (via GitHub)" <gi...@apache.org>.
dongjoon-hyun commented on code in PR #52009:
URL: https://github.com/apache/spark/pull/52009#discussion_r2274306714
##########
sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/orc/OrcQuerySuite.scala:
##########
@@ -333,6 +333,72 @@ abstract class OrcQueryTest extends OrcTest {
}
}
+ test("dpp") {
+ // 4 rows, cells of column 1 of row 2 and row 4 are null
+ val fact = (0 to 99).map { i =>
+ (i, i + 1, (i + 2).toByte, (i + 3).toShort, (i * 20) % 100, (i + 1).toString)
+ }
+
+ val dim = (0 to 9).map { i =>
+ (i, i + 1, (i + 2).toByte, (i + 3).toShort, (i * 10), (i + 1).toString)
+ }
+
+ withOrcTable(fact, "fact", true, Seq.apply("_1", "_2", "_3")) {
+ withOrcTable(dim, "dim") {
+ val df = sql(
+ """
+ |SELECT f._1, f._2, f._3, f._4 FROM fact f
+ |JOIN dim d
+ |ON (f._2 = d._2)
+ |WHERE d._5 > 80
+ """.stripMargin)
+ val explainDF = df.queryExecution.explainString(ExplainMode
+ .fromString("extended"))
+ assert(explainDF.contains("dynamicpruningexpression"))
+ checkAnswer(df, Row(9, 10, 11, 12) :: Nil)
+
+ // reuse a single Byte key
+ val dfByte = sql(
+ """
+ |SELECT f._1, f._2, f._3, f._4 FROM fact f
+ |JOIN dim d
+ |ON (f._3 = d._3)
+ |WHERE d._5 > 80
+ """.stripMargin)
+ val explainDFByte = dfByte.queryExecution.explainString(ExplainMode
+ .fromString("extended"))
+ assert(explainDFByte.contains("dynamicpruningexpression"))
+ checkAnswer(dfByte, Row(9, 10, 11, 12) :: Nil)
+
+ // reuse a single String key
+ val dfStr = sql(
+ """
+ |SELECT f._1, f._2, f._3, f._4 FROM fact f
+ |JOIN dim d
+ |ON (f._3 = d._3)
+ |WHERE d._5 > 80
+ """.stripMargin)
+ val explainDFStr = dfStr.queryExecution.explainString(ExplainMode
+ .fromString("extended"))
Review Comment:
ditto.
##########
sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/orc/OrcQuerySuite.scala:
##########
@@ -333,6 +333,72 @@ abstract class OrcQueryTest extends OrcTest {
}
}
+ test("dpp") {
+ // 4 rows, cells of column 1 of row 2 and row 4 are null
+ val fact = (0 to 99).map { i =>
+ (i, i + 1, (i + 2).toByte, (i + 3).toShort, (i * 20) % 100, (i + 1).toString)
+ }
+
+ val dim = (0 to 9).map { i =>
+ (i, i + 1, (i + 2).toByte, (i + 3).toShort, (i * 10), (i + 1).toString)
+ }
+
+ withOrcTable(fact, "fact", true, Seq.apply("_1", "_2", "_3")) {
+ withOrcTable(dim, "dim") {
+ val df = sql(
+ """
+ |SELECT f._1, f._2, f._3, f._4 FROM fact f
+ |JOIN dim d
+ |ON (f._2 = d._2)
+ |WHERE d._5 > 80
+ """.stripMargin)
+ val explainDF = df.queryExecution.explainString(ExplainMode
+ .fromString("extended"))
+ assert(explainDF.contains("dynamicpruningexpression"))
+ checkAnswer(df, Row(9, 10, 11, 12) :: Nil)
+
+ // reuse a single Byte key
+ val dfByte = sql(
+ """
+ |SELECT f._1, f._2, f._3, f._4 FROM fact f
+ |JOIN dim d
+ |ON (f._3 = d._3)
+ |WHERE d._5 > 80
+ """.stripMargin)
+ val explainDFByte = dfByte.queryExecution.explainString(ExplainMode
+ .fromString("extended"))
+ assert(explainDFByte.contains("dynamicpruningexpression"))
+ checkAnswer(dfByte, Row(9, 10, 11, 12) :: Nil)
+
+ // reuse a single String key
+ val dfStr = sql(
+ """
+ |SELECT f._1, f._2, f._3, f._4 FROM fact f
+ |JOIN dim d
+ |ON (f._3 = d._3)
+ |WHERE d._5 > 80
+ """.stripMargin)
+ val explainDFStr = dfStr.queryExecution.explainString(ExplainMode
+ .fromString("extended"))
+ assert(explainDFStr.contains("dynamicpruningexpression"))
+ checkAnswer(dfStr, Row(9, 10, 11, 12) :: Nil)
+
+ // mult results
+ val dfMultStr = sql(
+ """
+ |SELECT f._1, f._2, f._3, f._4 FROM fact f
+ |JOIN dim d
+ |ON (f._3 = d._3)
+ |WHERE d._5 > 70
+ """.stripMargin)
+ val explainDFMultStr = dfMultStr.queryExecution.explainString(ExplainMode
+ .fromString("extended"))
Review Comment:
ditto.
--
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
Re: [PR] [SPARK-52969][SQL] Support DSv2 OrcScan Dynamic Partition Pruning [spark]
Posted by "dongjoon-hyun (via GitHub)" <gi...@apache.org>.
dongjoon-hyun commented on PR #52009:
URL: https://github.com/apache/spark/pull/52009#issuecomment-3231910719
Thank you so much, @flaming-archer .
--
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
Re: [PR] [SPARK-52969][SQL] Support DSv2 OrcScan Dynamic Partition Prune [spark]
Posted by "dongjoon-hyun (via GitHub)" <gi...@apache.org>.
dongjoon-hyun commented on code in PR #52009:
URL: https://github.com/apache/spark/pull/52009#discussion_r2274306048
##########
sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/orc/OrcQuerySuite.scala:
##########
@@ -333,6 +333,72 @@ abstract class OrcQueryTest extends OrcTest {
}
}
+ test("dpp") {
+ // 4 rows, cells of column 1 of row 2 and row 4 are null
+ val fact = (0 to 99).map { i =>
+ (i, i + 1, (i + 2).toByte, (i + 3).toShort, (i * 20) % 100, (i + 1).toString)
+ }
+
+ val dim = (0 to 9).map { i =>
+ (i, i + 1, (i + 2).toByte, (i + 3).toShort, (i * 10), (i + 1).toString)
+ }
+
+ withOrcTable(fact, "fact", true, Seq.apply("_1", "_2", "_3")) {
+ withOrcTable(dim, "dim") {
+ val df = sql(
+ """
+ |SELECT f._1, f._2, f._3, f._4 FROM fact f
+ |JOIN dim d
+ |ON (f._2 = d._2)
+ |WHERE d._5 > 80
+ """.stripMargin)
+ val explainDF = df.queryExecution.explainString(ExplainMode
+ .fromString("extended"))
Review Comment:
It seems that your IDE has a different setting. Apache Spark uses 100 .
https://github.com/apache/spark/blob/43f650eaa43f0586e0066118a1f53f8b1f20f88f/scalastyle-config.xml#L78
Could you double-check your code and adjust like the following in order to follow the community coding guidelines?
```scala
- val explainDF = df.queryExecution.explainString(ExplainMode
- .fromString("extended"))
+ val explainDF = df.queryExecution.explainString(ExplainMode.fromString("extended"))
```
##########
sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/orc/OrcQuerySuite.scala:
##########
@@ -333,6 +333,72 @@ abstract class OrcQueryTest extends OrcTest {
}
}
+ test("dpp") {
+ // 4 rows, cells of column 1 of row 2 and row 4 are null
+ val fact = (0 to 99).map { i =>
+ (i, i + 1, (i + 2).toByte, (i + 3).toShort, (i * 20) % 100, (i + 1).toString)
+ }
+
+ val dim = (0 to 9).map { i =>
+ (i, i + 1, (i + 2).toByte, (i + 3).toShort, (i * 10), (i + 1).toString)
+ }
+
+ withOrcTable(fact, "fact", true, Seq.apply("_1", "_2", "_3")) {
+ withOrcTable(dim, "dim") {
+ val df = sql(
+ """
+ |SELECT f._1, f._2, f._3, f._4 FROM fact f
+ |JOIN dim d
+ |ON (f._2 = d._2)
+ |WHERE d._5 > 80
+ """.stripMargin)
+ val explainDF = df.queryExecution.explainString(ExplainMode
+ .fromString("extended"))
+ assert(explainDF.contains("dynamicpruningexpression"))
+ checkAnswer(df, Row(9, 10, 11, 12) :: Nil)
+
+ // reuse a single Byte key
+ val dfByte = sql(
+ """
+ |SELECT f._1, f._2, f._3, f._4 FROM fact f
+ |JOIN dim d
+ |ON (f._3 = d._3)
+ |WHERE d._5 > 80
+ """.stripMargin)
+ val explainDFByte = dfByte.queryExecution.explainString(ExplainMode
+ .fromString("extended"))
Review Comment:
ditto.
--
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
Re: [PR] [SPARK-52969][SQL] Support DSv2 OrcScan Dynamic Partition Prune [spark]
Posted by "flaming-archer (via GitHub)" <gi...@apache.org>.
flaming-archer commented on PR #52009:
URL: https://github.com/apache/spark/pull/52009#issuecomment-3186410612
> In addition to the above comments, I have one question. I guess you did compare this with the corresponding `ParquetScan.scala` logic. Could you confirm if there is any difference, @flaming-archer ?
In fact, I also rewrote ParquetScan with the same code can work. But I haven't figured out how to change these two classes together yet. Or rewrite a class so that both inherit it.
I used to write more Java and less Scala before。。
--
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
Re: [PR] [SPARK-52969][SQL] Support DSv2 OrcScan Dynamic Partition Prune [spark]
Posted by "dongjoon-hyun (via GitHub)" <gi...@apache.org>.
dongjoon-hyun commented on code in PR #52009:
URL: https://github.com/apache/spark/pull/52009#discussion_r2274296707
##########
sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/FileBasedDataSourceTest.scala:
##########
@@ -92,9 +97,19 @@ private[sql] trait FileBasedDataSourceTest extends SQLTestUtils {
* data file will be dropped/deleted after `f` returns.
*/
protected def withDataSourceTable[T <: Product : ClassTag : TypeTag]
- (data: Seq[T], tableName: String, testVectorized: Boolean = true)
+ (data: Seq[T], tableName: String, testVectorized: Boolean = true
+ , partitionNames: Seq[String] = Seq.empty)
Review Comment:
Indentation?
--
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
Re: [PR] [SPARK-52969][SQL] Support DSv2 OrcScan Dynamic Partition Pruning [spark]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #52009:
URL: https://github.com/apache/spark/pull/52009#issuecomment-3787553469
We're closing this PR because it hasn't been updated in a while. This isn't a judgement on the merit of the PR in any way. It's just a way of keeping the PR queue manageable.
If you'd like to revive this PR, please reopen it and ask a committer to remove the Stale tag!
--
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
Re: [PR] [SPARK-52969][SQL] Support DSv2 OrcScan Dynamic Partition Prune [spark]
Posted by "dongjoon-hyun (via GitHub)" <gi...@apache.org>.
dongjoon-hyun commented on code in PR #52009:
URL: https://github.com/apache/spark/pull/52009#discussion_r2274307253
##########
sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/orc/OrcTest.scala:
##########
@@ -94,8 +94,10 @@ trait OrcTest extends QueryTest with FileBasedDataSourceTest with BeforeAndAfter
* Orc file will be dropped/deleted after `f` returns.
*/
protected def withOrcTable[T <: Product: ClassTag: TypeTag]
- (data: Seq[T], tableName: String, testVectorized: Boolean = true)
- (f: => Unit): Unit = withDataSourceTable(data, tableName, testVectorized)(f)
+ (data: Seq[T], tableName: String, testVectorized: Boolean = true
+ , partitionNames: Seq[String] = Seq.empty)
Review Comment:
indentation.
##########
sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/orc/OrcTest.scala:
##########
@@ -94,8 +94,10 @@ trait OrcTest extends QueryTest with FileBasedDataSourceTest with BeforeAndAfter
* Orc file will be dropped/deleted after `f` returns.
*/
protected def withOrcTable[T <: Product: ClassTag: TypeTag]
- (data: Seq[T], tableName: String, testVectorized: Boolean = true)
- (f: => Unit): Unit = withDataSourceTable(data, tableName, testVectorized)(f)
+ (data: Seq[T], tableName: String, testVectorized: Boolean = true
+ , partitionNames: Seq[String] = Seq.empty)
+ (f: => Unit): Unit = withDataSourceTable(data, tableName, testVectorized
+ , partitionNames)(f)
Review Comment:
ditto.
--
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
Re: [PR] [SPARK-52969][SQL] Support DSv2 OrcScan Dynamic Partition Prune [spark]
Posted by "dongjoon-hyun (via GitHub)" <gi...@apache.org>.
dongjoon-hyun commented on code in PR #52009:
URL: https://github.com/apache/spark/pull/52009#discussion_r2274299261
##########
sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/orc/OrcQuerySuite.scala:
##########
@@ -333,6 +333,72 @@ abstract class OrcQueryTest extends OrcTest {
}
}
+ test("dpp") {
Review Comment:
If you don't mind, please write the full words.
--
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
Re: [PR] [SPARK-52969][SQL] Support DSv2 OrcScan Dynamic Partition Pruning [spark]
Posted by "flaming-archer (via GitHub)" <gi...@apache.org>.
flaming-archer commented on PR #52009:
URL: https://github.com/apache/spark/pull/52009#issuecomment-3231753397
> Sorry for being late, @flaming-archer . I was on vacation since 8/15 until this Monday.对不起迟到了,。我从 8 月 15 日到本周一一直在度假。
>
> While revisiting your contribution, I'd like to recommend you to make a Parquet PR first to get more community attentions and to enlarge the impact of your contributions.在重新审视您的贡献时,我想建议您先进行 Parquet PR,以获得更多社区关注并扩大您的贡献的影响力。
>
> > In fact, I also rewrote ParquetScan with the same code can work. But I haven't figured out how to change these two classes together yet. Or rewrite a class so that both inherit it.事实上,我也用相同的代码重写了 ParquetScan 也可以工作。但我还没有想出如何将这两个类一起改变。或者重写一个类,以便两者都继承它。
>
> As you know, `Parquet` is the Apache Spark's default file-based source format. Most test coverages are based on `Parquet` features. So, your contribution will be tested fully if you make a Parquet PR first. After than, we can come back to the other data sources like ORC (this PR).如您所知,`Parquet` 是 Apache Spark 默认的基于文件的源格式。大多数测试覆盖率都基于 `Parquet` 功能。因此,如果您先进行 Parquet PR,您的贡献将得到充分测试。之后,我们可以回到其他数据源,如 ORC(此 PR)。
>
> https://github.com/apache/spark/blob/0c9af991ca287c6e21fbada9bd15c04b173ebe89/sql/catalyst/src/main/scala/org/apache/spark/sql/internal/SQLConf.scala#L1838-L1842
No problem, I will submit a Parquet version later in the next day or two.
--
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
Re: [PR] [SPARK-52969][SQL] Support DSv2 OrcScan Dynamic Partition Prune [spark]
Posted by "dongjoon-hyun (via GitHub)" <gi...@apache.org>.
dongjoon-hyun commented on code in PR #52009:
URL: https://github.com/apache/spark/pull/52009#discussion_r2274294216
##########
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/v2/orc/OrcScan.scala:
##########
@@ -45,14 +47,20 @@ case class OrcScan(
options: CaseInsensitiveStringMap,
pushedAggregate: Option[Aggregation] = None,
pushedFilters: Array[Filter],
- partitionFilters: Seq[Expression] = Seq.empty,
- dataFilters: Seq[Expression] = Seq.empty) extends FileScan {
+ originPartitionFilters: Seq[Expression] = Seq.empty,
+ dataFilters: Seq[Expression] = Seq.empty) extends FileScan with SupportsRuntimeV2Filtering {
override def isSplitable(path: Path): Boolean = {
// If aggregate is pushed down, only the file footer will be read once,
// so file should not be split across multiple tasks.
pushedAggregate.isEmpty
}
+ private var dppPartitionFilters: Seq[Expression] = Seq.empty;
Review Comment:
We don't need `;` in Scala code, @flaming-archer .
--
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
Re: [PR] [SPARK-52969][SQL] Support DSv2 OrcScan Dynamic Partition Prune [spark]
Posted by "dongjoon-hyun (via GitHub)" <gi...@apache.org>.
dongjoon-hyun commented on code in PR #52009:
URL: https://github.com/apache/spark/pull/52009#discussion_r2274307473
##########
sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/orc/OrcTest.scala:
##########
@@ -94,8 +94,10 @@ trait OrcTest extends QueryTest with FileBasedDataSourceTest with BeforeAndAfter
* Orc file will be dropped/deleted after `f` returns.
*/
protected def withOrcTable[T <: Product: ClassTag: TypeTag]
- (data: Seq[T], tableName: String, testVectorized: Boolean = true)
- (f: => Unit): Unit = withDataSourceTable(data, tableName, testVectorized)(f)
+ (data: Seq[T], tableName: String, testVectorized: Boolean = true
+ , partitionNames: Seq[String] = Seq.empty)
+ (f: => Unit): Unit = withDataSourceTable(data, tableName, testVectorized
+ , partitionNames)(f)
Review Comment:
```scala
- (f: => Unit): Unit = withDataSourceTable(data, tableName, testVectorized
- , partitionNames)(f)
+ (f: => Unit): Unit = withDataSourceTable(data, tableName, testVectorized, partitionNames)(f)
```
--
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
Re: [PR] [SPARK-52969][SQL] Support DSv2 OrcScan Dynamic Partition Prune [spark]
Posted by "dongjoon-hyun (via GitHub)" <gi...@apache.org>.
dongjoon-hyun commented on code in PR #52009:
URL: https://github.com/apache/spark/pull/52009#discussion_r2274307253
##########
sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/orc/OrcTest.scala:
##########
@@ -94,8 +94,10 @@ trait OrcTest extends QueryTest with FileBasedDataSourceTest with BeforeAndAfter
* Orc file will be dropped/deleted after `f` returns.
*/
protected def withOrcTable[T <: Product: ClassTag: TypeTag]
- (data: Seq[T], tableName: String, testVectorized: Boolean = true)
- (f: => Unit): Unit = withDataSourceTable(data, tableName, testVectorized)(f)
+ (data: Seq[T], tableName: String, testVectorized: Boolean = true
+ , partitionNames: Seq[String] = Seq.empty)
Review Comment:
The leading indentation looks wrong.
--
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
Re: [PR] [SPARK-52969][SQL] Support DSv2 OrcScan Dynamic Partition Pruning [spark]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed pull request #52009: [SPARK-52969][SQL] Support DSv2 OrcScan Dynamic Partition Pruning
URL: https://github.com/apache/spark/pull/52009
--
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