You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by "linliu-code (via GitHub)" <gi...@apache.org> on 2023/11/08 09:48:26 UTC
[PR] [WIP] Fix the filter pushdown logic for file group reader [hudi]
linliu-code opened a new pull request, #10018:
URL: https://github.com/apache/hudi/pull/10018
### Change Logs
For MOR table, when position based merging is specified, no filters should be pushed down; otherwise, the filters can be pushed down for key based one.
TESTS:
need to make the demo work to demonstrate this fix.
### Impact
After fixing, the user should have higher performance for key based merging queries.
### Risk level (write none, low medium or high below)
Low.
### Contributor's checklist
- [ ] Read through [contributor's guide](https://hudi.apache.org/contribute/how-to-contribute)
- [ ] Change Logs and Impact were stated clearly
- [ ] Adequate tests were added if applicable
- [ ] CI passed
--
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: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [HUDI-7053] Fix the filter pushdown logic for file group reader [hudi]
Posted by "linliu-code (via GitHub)" <gi...@apache.org>.
linliu-code commented on code in PR #10018:
URL: https://github.com/apache/hudi/pull/10018#discussion_r1387302837
##########
hudi-spark-datasource/hudi-spark-common/src/main/scala/org/apache/spark/sql/execution/datasources/parquet/HoodieFileGroupReaderBasedParquetFileFormat.scala:
##########
@@ -239,8 +239,9 @@ class HoodieFileGroupReaderBasedParquetFileFormat(tableState: HoodieTableState,
//file reader for reading a hudi base file that needs to be merged with log files
val preMergeBaseFileReader = if (isMOR) {
// Add support for reading files using inline file system.
- super.buildReaderWithPartitionValues(sparkSession, dataSchema, partitionSchema,
- requiredSchemaWithMandatory, requiredFilters, options, new Configuration(hadoopConf))
+ super.buildReaderWithPartitionValues(sparkSession, dataSchema, partitionSchema, requiredSchemaWithMandatory,
+ if (shouldUseRecordPosition) requiredFilters else filters ++ requiredFilters,
Review Comment:
Sounds good.
--
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: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [HUDI-7053] Fix the filter pushdown logic for file group reader [hudi]
Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #10018:
URL: https://github.com/apache/hudi/pull/10018#issuecomment-1803111222
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "c5812540396b56db64df779ab7147cc0cede626a",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=20735",
"triggerID" : "c5812540396b56db64df779ab7147cc0cede626a",
"triggerType" : "PUSH"
}, {
"hash" : "0f4e8c208b5614736e450657ad56810bc4060ea4",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=20751",
"triggerID" : "0f4e8c208b5614736e450657ad56810bc4060ea4",
"triggerType" : "PUSH"
}, {
"hash" : "e420cdf46604699ae6587b9aa13e6e9c0d139d38",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=20755",
"triggerID" : "e420cdf46604699ae6587b9aa13e6e9c0d139d38",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* c5812540396b56db64df779ab7147cc0cede626a Azure: [FAILURE](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=20735)
* 0f4e8c208b5614736e450657ad56810bc4060ea4 Azure: [PENDING](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=20751)
* e420cdf46604699ae6587b9aa13e6e9c0d139d38 Azure: [PENDING](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=20755)
<details>
<summary>Bot commands</summary>
@hudi-bot supports the following commands:
- `@hudi-bot run azure` re-run the last Azure build
</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: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [HUDI-7053] Fix the filter pushdown logic for file group reader [hudi]
Posted by "codope (via GitHub)" <gi...@apache.org>.
codope commented on code in PR #10018:
URL: https://github.com/apache/hudi/pull/10018#discussion_r1386418453
##########
hudi-spark-datasource/hudi-spark-common/src/main/scala/org/apache/spark/sql/execution/datasources/parquet/HoodieFileGroupReaderBasedParquetFileFormat.scala:
##########
@@ -239,8 +239,9 @@ class HoodieFileGroupReaderBasedParquetFileFormat(tableState: HoodieTableState,
//file reader for reading a hudi base file that needs to be merged with log files
val preMergeBaseFileReader = if (isMOR) {
// Add support for reading files using inline file system.
- super.buildReaderWithPartitionValues(sparkSession, dataSchema, partitionSchema,
- requiredSchemaWithMandatory, requiredFilters, options, new Configuration(hadoopConf))
+ super.buildReaderWithPartitionValues(sparkSession, dataSchema, partitionSchema, requiredSchemaWithMandatory,
+ if (shouldUseRecordPosition) requiredFilters else filters ++ requiredFilters,
Review Comment:
We should further check for presence of record key fields in `filters` and if present, then only add record key fields. For other fields, there maybe some correctness issue.
--
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: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [HUDI-7053] Fix the filter pushdown logic for file group reader [hudi]
Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #10018:
URL: https://github.com/apache/hudi/pull/10018#issuecomment-1801564953
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "c5812540396b56db64df779ab7147cc0cede626a",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "c5812540396b56db64df779ab7147cc0cede626a",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* c5812540396b56db64df779ab7147cc0cede626a UNKNOWN
<details>
<summary>Bot commands</summary>
@hudi-bot supports the following commands:
- `@hudi-bot run azure` re-run the last Azure build
</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: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [HUDI-7053] Fix the filter pushdown logic for file group reader [hudi]
Posted by "yihua (via GitHub)" <gi...@apache.org>.
yihua merged PR #10018:
URL: https://github.com/apache/hudi/pull/10018
--
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: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [HUDI-7053] Fix the filter pushdown logic for file group reader [hudi]
Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #10018:
URL: https://github.com/apache/hudi/pull/10018#issuecomment-1801586750
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "c5812540396b56db64df779ab7147cc0cede626a",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=20735",
"triggerID" : "c5812540396b56db64df779ab7147cc0cede626a",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* c5812540396b56db64df779ab7147cc0cede626a Azure: [PENDING](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=20735)
<details>
<summary>Bot commands</summary>
@hudi-bot supports the following commands:
- `@hudi-bot run azure` re-run the last Azure build
</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: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [HUDI-7053] Fix the filter pushdown logic for file group reader [hudi]
Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #10018:
URL: https://github.com/apache/hudi/pull/10018#issuecomment-1803106634
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "c5812540396b56db64df779ab7147cc0cede626a",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=20735",
"triggerID" : "c5812540396b56db64df779ab7147cc0cede626a",
"triggerType" : "PUSH"
}, {
"hash" : "0f4e8c208b5614736e450657ad56810bc4060ea4",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=20751",
"triggerID" : "0f4e8c208b5614736e450657ad56810bc4060ea4",
"triggerType" : "PUSH"
}, {
"hash" : "e420cdf46604699ae6587b9aa13e6e9c0d139d38",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "e420cdf46604699ae6587b9aa13e6e9c0d139d38",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* c5812540396b56db64df779ab7147cc0cede626a Azure: [FAILURE](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=20735)
* 0f4e8c208b5614736e450657ad56810bc4060ea4 Azure: [PENDING](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=20751)
* e420cdf46604699ae6587b9aa13e6e9c0d139d38 UNKNOWN
<details>
<summary>Bot commands</summary>
@hudi-bot supports the following commands:
- `@hudi-bot run azure` re-run the last Azure build
</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: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [HUDI-7053] Fix the filter pushdown logic for file group reader [hudi]
Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #10018:
URL: https://github.com/apache/hudi/pull/10018#issuecomment-1803229313
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "c5812540396b56db64df779ab7147cc0cede626a",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=20735",
"triggerID" : "c5812540396b56db64df779ab7147cc0cede626a",
"triggerType" : "PUSH"
}, {
"hash" : "0f4e8c208b5614736e450657ad56810bc4060ea4",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=20751",
"triggerID" : "0f4e8c208b5614736e450657ad56810bc4060ea4",
"triggerType" : "PUSH"
}, {
"hash" : "e420cdf46604699ae6587b9aa13e6e9c0d139d38",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=20755",
"triggerID" : "e420cdf46604699ae6587b9aa13e6e9c0d139d38",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* e420cdf46604699ae6587b9aa13e6e9c0d139d38 Azure: [FAILURE](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=20755)
<details>
<summary>Bot commands</summary>
@hudi-bot supports the following commands:
- `@hudi-bot run azure` re-run the last Azure build
</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: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [HUDI-7053] Fix the filter pushdown logic for file group reader [hudi]
Posted by "codope (via GitHub)" <gi...@apache.org>.
codope commented on code in PR #10018:
URL: https://github.com/apache/hudi/pull/10018#discussion_r1386420487
##########
hudi-spark-datasource/hudi-spark-common/src/main/scala/org/apache/spark/sql/execution/datasources/parquet/HoodieFileGroupReaderBasedParquetFileFormat.scala:
##########
@@ -239,8 +239,9 @@ class HoodieFileGroupReaderBasedParquetFileFormat(tableState: HoodieTableState,
//file reader for reading a hudi base file that needs to be merged with log files
val preMergeBaseFileReader = if (isMOR) {
// Add support for reading files using inline file system.
- super.buildReaderWithPartitionValues(sparkSession, dataSchema, partitionSchema,
- requiredSchemaWithMandatory, requiredFilters, options, new Configuration(hadoopConf))
+ super.buildReaderWithPartitionValues(sparkSession, dataSchema, partitionSchema, requiredSchemaWithMandatory,
+ if (shouldUseRecordPosition) requiredFilters else filters ++ requiredFilters,
Review Comment:
Also, if you have verified this is working, please add the same check and push down filters in `NewHoodieParquetFileFormat` as well.
--
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: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [HUDI-7053] Fix the filter pushdown logic for file group reader [hudi]
Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #10018:
URL: https://github.com/apache/hudi/pull/10018#issuecomment-1803061463
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "c5812540396b56db64df779ab7147cc0cede626a",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=20735",
"triggerID" : "c5812540396b56db64df779ab7147cc0cede626a",
"triggerType" : "PUSH"
}, {
"hash" : "0f4e8c208b5614736e450657ad56810bc4060ea4",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "0f4e8c208b5614736e450657ad56810bc4060ea4",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* c5812540396b56db64df779ab7147cc0cede626a Azure: [FAILURE](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=20735)
* 0f4e8c208b5614736e450657ad56810bc4060ea4 UNKNOWN
<details>
<summary>Bot commands</summary>
@hudi-bot supports the following commands:
- `@hudi-bot run azure` re-run the last Azure build
</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: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [HUDI-7053] Fix the filter pushdown logic for file group reader [hudi]
Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #10018:
URL: https://github.com/apache/hudi/pull/10018#issuecomment-1802504865
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "c5812540396b56db64df779ab7147cc0cede626a",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=20735",
"triggerID" : "c5812540396b56db64df779ab7147cc0cede626a",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* c5812540396b56db64df779ab7147cc0cede626a Azure: [FAILURE](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=20735)
<details>
<summary>Bot commands</summary>
@hudi-bot supports the following commands:
- `@hudi-bot run azure` re-run the last Azure build
</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: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [HUDI-7053] Fix the filter pushdown logic for file group reader [hudi]
Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #10018:
URL: https://github.com/apache/hudi/pull/10018#issuecomment-1803066730
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "c5812540396b56db64df779ab7147cc0cede626a",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=20735",
"triggerID" : "c5812540396b56db64df779ab7147cc0cede626a",
"triggerType" : "PUSH"
}, {
"hash" : "0f4e8c208b5614736e450657ad56810bc4060ea4",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=20751",
"triggerID" : "0f4e8c208b5614736e450657ad56810bc4060ea4",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* c5812540396b56db64df779ab7147cc0cede626a Azure: [FAILURE](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=20735)
* 0f4e8c208b5614736e450657ad56810bc4060ea4 Azure: [PENDING](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=20751)
<details>
<summary>Bot commands</summary>
@hudi-bot supports the following commands:
- `@hudi-bot run azure` re-run the last Azure build
</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: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org