You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@paimon.apache.org by "YannByron (via GitHub)" <gi...@apache.org> on 2024/04/02 08:27:44 UTC
[PR] [spark] Minimize the number of data splits need to be scaned when update [paimon]
YannByron opened a new pull request, #3147:
URL: https://github.com/apache/paimon/pull/3147
<!-- Please specify the module before the PR name: [core] ... or [flink] ... -->
### Purpose
<!-- Linking this pull request to the issue -->
Linked issue: close #xxx
<!-- What is the purpose of the change -->
### Tests
<!-- List UT and IT cases to verify this change -->
### API and Format
<!-- Does this change affect API or storage format -->
### Documentation
<!-- Does this change introduce a new feature -->
--
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: issues-unsubscribe@paimon.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [spark] Minimize the number of data splits need to be scaned when update [paimon]
Posted by "Zouxxyy (via GitHub)" <gi...@apache.org>.
Zouxxyy merged PR #3147:
URL: https://github.com/apache/paimon/pull/3147
--
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: issues-unsubscribe@paimon.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [spark] Minimize the number of data splits need to be scaned when update [paimon]
Posted by "Zouxxyy (via GitHub)" <gi...@apache.org>.
Zouxxyy commented on code in PR #3147:
URL: https://github.com/apache/paimon/pull/3147#discussion_r1547431776
##########
paimon-spark/paimon-spark-common/src/main/scala/org/apache/paimon/spark/catalyst/analysis/expressions/ExpressionHelper.scala:
##########
@@ -138,18 +138,28 @@ trait ExpressionHelper extends PredicateHelper {
def convertConditionToPaimonPredicate(
condition: Expression,
output: Seq[Attribute],
- rowType: RowType): Predicate = {
+ rowType: RowType,
+ ignoreFailure: Boolean = false): Option[Predicate] = {
val converter = new SparkFilterConverter(rowType)
val filters = normalizeExprs(Seq(condition), output)
- .flatMap(splitConjunctivePredicates(_).map {
+ .flatMap(splitConjunctivePredicates(_).flatMap {
f =>
- translateFilter(f, supportNestedPredicatePushdown = true).getOrElse(
- throw new RuntimeException("Exec update failed:" +
- s" cannot translate expression to source filter: $f"))
+ val filter = translateFilter(f, supportNestedPredicatePushdown = true)
+ if (filter.isEmpty && !ignoreFailure) {
+ throw new RuntimeException(
+ "Exec update failed:" +
+ s" cannot translate expression to source filter: $f")
+ }
+ filter
})
.toArray
- val predicates = filters.map(converter.convert)
- PredicateBuilder.and(predicates: _*)
+
+ if (filters.isEmpty) {
+ None
+ } else {
+ val predicates = filters.map(converter.convert)
Review Comment:
`converter.convert` will also throw an exception, maybe we can also add ignoreFailure judgment
--
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: issues-unsubscribe@paimon.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org