You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Anupam Yadav (Jira)" <ji...@apache.org> on 2026/05/16 21:06:00 UTC
[jira] [Commented] (SPARK-56637) Variant getFieldByKey() on large objects silently fails if variant metadata is unsorted
[ https://issues.apache.org/jira/browse/SPARK-56637?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18081434#comment-18081434 ]
Anupam Yadav commented on SPARK-56637:
--------------------------------------
I would like to work on this. Will investigate and submit a PR.
> Variant getFieldByKey() on large objects silently fails if variant metadata is unsorted
> ---------------------------------------------------------------------------------------
>
> Key: SPARK-56637
> URL: https://issues.apache.org/jira/browse/SPARK-56637
> Project: Spark
> Issue Type: Bug
> Components: Spark Core
> Affects Versions: 4.2.0
> Reporter: Steve Loughran
> Priority: Major
>
> Variant method getFieldByKey(String key) looks up a key by simple walk if key count < 32, binary search if above that. But the binary search assumes the metadata is sorted. This is optional according to the format spec; there's a bit in the variant to indicate whether or not a variant's metadata is unsorted
> Spark Variant class must do a full scan on unsorted variants. (that's ignoring the performance penalty of the scans); iceberg has adopted and parquet is adopting caching there.
> Parquet has it's own version of this bug, https://github.com/apache/parquet-java/issues/3529
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org