Skip to content

Commit

Permalink
[SPARK-49349][SQL][FOLLOWUP] Rename isContainsUnsupportedLCA function
Browse files Browse the repository at this point in the history
### What changes were proposed in this pull request?
As follow-up to #48915, this PR renames `isContainsUnsupportedLCA` function

### Why are the changes needed?
The renamed function is easier to understand.

### Does this PR introduce _any_ user-facing change?
No

### How was this patch tested?
No change in functionality.
Existing tests suffice.

### Was this patch authored or co-authored using generative AI tooling?
No

Closes #49134 from tedyu/cont-unsup.

Authored-by: Zhihong Yu <[email protected]>
Signed-off-by: Hyukjin Kwon <[email protected]>
  • Loading branch information
tedyu authored and HyukjinKwon committed Dec 11, 2024
1 parent 6cdc96f commit 58c77ba
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ trait CheckAnalysis extends PredicateHelper with LookupCatalog with QueryErrorsB
)
}

private def isContainsUnsupportedLCA(e: Expression, operator: LogicalPlan): Boolean = {
private def containsUnsupportedLCA(e: Expression, operator: LogicalPlan): Boolean = {
e.containsPattern(LATERAL_COLUMN_ALIAS_REFERENCE) && operator.expressions.exists {
case a: Alias
if e.collect { case l: LateralColumnAliasReference => l.nameParts.head }.contains(a.name) =>
Expand Down Expand Up @@ -369,7 +369,7 @@ trait CheckAnalysis extends PredicateHelper with LookupCatalog with QueryErrorsB
case GetMapValue(map, key: Attribute) if isMapWithStringKey(map) && !key.resolved =>
failUnresolvedAttribute(operator, key, "UNRESOLVED_MAP_KEY")

case e: Expression if isContainsUnsupportedLCA(e, operator) =>
case e: Expression if containsUnsupportedLCA(e, operator) =>
val lcaRefNames =
e.collect { case lcaRef: LateralColumnAliasReference => lcaRef.name }.distinct
failAnalysis(
Expand Down

0 comments on commit 58c77ba

Please sign in to comment.