Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Backport 0.5] Lateral eval expressions are supported after Spark upgrading #561

Merged
merged 1 commit into from
Aug 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -480,12 +480,7 @@ class FlintSparkPPLEvalITSuite
comparePlans(logicalPlan, expectedPlan, checkAnalysis = false)
}

// +--------------------------------+
// | Below tests are not supported |
// +--------------------------------+
// Todo: Upgrading spark version to 3.4.0 and above could fix this test.
// https://issues.apache.org/jira/browse/SPARK-27561
ignore("test lateral eval expressions references - SPARK-27561 required") {
test("test lateral eval expressions references") {
val frame = sql(s"""
| source = $testTable | eval col1 = 1, col2 = col1 | fields name, age, col2
| """.stripMargin)
Expand Down
2 changes: 1 addition & 1 deletion ppl-spark-integration/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ Assumptions: `a`, `b`, `c` are existing fields in `table`
- `source = table | eval n = now() | eval t = unix_timestamp(a) | fields n,t`
- `source = table | eval f = a | where f > 1 | sort f | fields a,b,c | head 5`
- `source = table | eval f = a * 2 | eval h = f * 2 | fields a,f,h`
- `source = table | eval f = a * 2, h = f * 2 | fields a,f,h` (Spark 3.4.0+ required)
- `source = table | eval f = a * 2, h = f * 2 | fields a,f,h`
- `source = table | eval f = a * 2, h = b | stats avg(f) by h`

Limitation: Overriding existing field is unsupported, following queries throw exceptions with "Reference 'a' is ambiguous"
Expand Down
Loading