Skip to content

Conversation

@techaddict
Copy link
Contributor

Remove the Unnecessary lift-json dependency from pom.xml

Remove the Unnecessary lift-json dependency from pom.xml
@AmplabJenkins
Copy link

Can one of the admins verify this patch?

@techaddict techaddict changed the title Fix [SPARK-1078]: Replace lift-json with json4s-jackson. Fix [SPARK-1078]: Remove the Unnecessary lift-json dependency Apr 24, 2014
@mateiz
Copy link
Contributor

mateiz commented Apr 25, 2014

Jenkins, test this please

@AmplabJenkins
Copy link

Merged build triggered.

@AmplabJenkins
Copy link

Merged build started.

@AmplabJenkins
Copy link

Merged build finished. All automated tests passed.

@AmplabJenkins
Copy link

All automated tests passed.
Refer to this link for build results: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/14477/

@rxin
Copy link
Contributor

rxin commented Apr 25, 2014

Thanks. I merged this.

asfgit pushed a commit that referenced this pull request Apr 25, 2014
Remove the Unnecessary lift-json dependency from pom.xml

Author: Sandeep <[email protected]>

Closes #536 from techaddict/FIX-SPARK-1078 and squashes the following commits:

bd0fd1d [Sandeep] Fix [SPARK-1078]: Replace lift-json with json4s-jackson. Remove the Unnecessary lift-json dependency from pom.xml

(cherry picked from commit 095b518)
Signed-off-by: Reynold Xin <[email protected]>
@asfgit asfgit closed this in 095b518 Apr 25, 2014
pdeyhim pushed a commit to pdeyhim/spark-1 that referenced this pull request Jun 25, 2014
Remove the Unnecessary lift-json dependency from pom.xml

Author: Sandeep <[email protected]>

Closes apache#536 from techaddict/FIX-SPARK-1078 and squashes the following commits:

bd0fd1d [Sandeep] Fix [SPARK-1078]: Replace lift-json with json4s-jackson. Remove the Unnecessary lift-json dependency from pom.xml
markhamstra pushed a commit to markhamstra/spark that referenced this pull request Nov 7, 2017
yifeih pushed a commit to yifeih/spark that referenced this pull request May 8, 2019
squito pushed a commit to squito/spark that referenced this pull request Jul 18, 2019
bzhaoopenstack pushed a commit to bzhaoopenstack/spark that referenced this pull request Sep 11, 2019
Refactor jobs using inheritance structure and
try to reuse ansible playbook to support multiple
different testing cases.

Related: theopenlab/openlab#270
Related: theopenlab/openlab#291
turboFei pushed a commit to turboFei/spark that referenced this pull request Nov 6, 2025
…ved for MergeInto (apache#536)

### What changes were proposed in this pull request?

We got a customer issue that a `MergeInto` query on Iceberg table works earlier but cannot work after upgrading to Spark 3.4.

The error looks like

```
Caused by: org.apache.spark.SparkRuntimeException: Error while decoding: org.apache.spark.sql.catalyst.analysis.UnresolvedException: Invalid call to nullable on unresolved object
upcast(getcolumnbyordinal(0, StringType), StringType, - root class: java.lang.String).toString.
```

The source table of `MergeInto` uses `ScalaUDF`. The error happens when Spark invokes the deserializer of input encoder of the `ScalaUDF` and the deserializer is not resolved yet.

The encoders of ScalaUDF are resolved by the rule `ResolveEncodersInUDF` which will be applied at the end of analysis phase.

During rewriting `MergeInto` to `ReplaceData` query, Spark creates an `Exists` subquery and `ScalaUDF` is part of the plan of the subquery. Note that the `ScalaUDF` is already resolved by the analyzer.

Then, in `ResolveSubquery` rule which resolves the subquery, it will resolve the subquery plan if it is not resolved yet. Because the subquery containing `ScalaUDF` is resolved, the rule skips it so `ResolveEncodersInUDF` won't be applied on it. So the analyzed `ReplaceData` query contains a `ScalaUDF` with encoders unresolved that cause the error.

This patch modifies `ResolveSubquery` so it will resolve subquery plan if it is not analyzed to make sure subquery plan is fully analyzed.

This patch moves `ResolveEncodersInUDF` rule before rewriting `MergeInto` to make sure the `ScalaUDF` in the subquery plan is fully analyzed.

### Why are the changes needed?

Fixing production query error.

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

Yes, fixing user-facing issue.

### How was this patch tested?

Manually test with `MergeInto` query and add an unit test.

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

No

Closes apache#47406 from viirya/fix_subquery_resolve_3.5.

Authored-by: Liang-Chi Hsieh <[email protected]>

Signed-off-by: Dongjoon Hyun <[email protected]>
Co-authored-by: Liang-Chi Hsieh <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants