Skip to content

[SPARK-52666][SQL] Map User Defined Type to correct MutableValue in SpecificInternalRow #51356

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

yaooqinn
Copy link
Member

@yaooqinn yaooqinn commented Jul 3, 2025

What changes were proposed in this pull request?

Map User Defined Type to correct MutableValue in SpecificInternalRow to Fix:

Caused by: java.lang.IllegalArgumentException: Spark type: ... doesn't match the type: ... in column vector
	at org.apache.spark.sql.execution.datasources.parquet.ParquetColumnVector.<init>(ParquetColumnVector.java:80)
	at org.apache.spark.sql.execution.datasources.parquet.ParquetColumnVector.<init>(ParquetColumnVector.java:139)

Why are the changes needed?

Add UDT missing features

Does this PR introduce any user-facing change?

no

How was this patch tested?

  • New tests in UT
  • Manual test

spark-sql (default)> select submissionTime from bbb;
25/07/03 09:55:57 WARN TaskSetManager: Lost task 0.0 in stage 2.0 (TID 4) (10.242.151.176 executor 0): java.lang.ClassCastException: class org.apache.spark.sql.catalyst.expressions.MutableAny cannot be cast to class org.apache.spark.sql.catalyst.expressions.MutableLong (org.apache.spark.sql.catalyst.expressions.MutableAny and org.apache.spark.sql.catalyst.expressions.MutableLong are in unnamed module of loader 'app')
	at org.apache.spark.sql.catalyst.expressions.SpecificInternalRow.setLong(SpecificInternalRow.scala:304)
	at org.apache.spark.sql.execution.datasources.orc.OrcDeserializer$RowUpdater.setLong(OrcDeserializer.scala:282)
spark-sql (default)> select submissionTime from bbb;
Thu Jul 03 11:18:39 CST 2025

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

No

…pecificInternalRow

```java

Caused by: java.lang.IllegalArgumentException: Spark type: ... doesn't match the type: ... in column vector
	at org.apache.spark.sql.execution.datasources.parquet.ParquetColumnVector.<init>(ParquetColumnVector.java:80)
	at org.apache.spark.sql.execution.datasources.parquet.ParquetColumnVector.<init>(ParquetColumnVector.java:139)

```

This PR adds a recursive loop to omit the UDT

Add UDT missing features

No

New Tests

no
@github-actions github-actions bot added the SQL label Jul 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant