You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Xiaoxuan Li (Jira)" <ji...@apache.org> on 2026/03/09 22:27:00 UTC

[jira] [Commented] (SPARK-50284) Create easy API in Python to construct Variants

    [ https://issues.apache.org/jira/browse/SPARK-50284?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18064264#comment-18064264 ] 

Xiaoxuan Li commented on SPARK-50284:
-------------------------------------

[https://github.com/apache/spark/commit/3c7f5e25b70ce8332c31bee50b704dc55d810bf1] this commit should resolve this issue.

> Create easy API in Python to construct Variants
> -----------------------------------------------
>
>                 Key: SPARK-50284
>                 URL: https://issues.apache.org/jira/browse/SPARK-50284
>             Project: Spark
>          Issue Type: Task
>          Components: PySpark
>    Affects Versions: 4.0.0
>            Reporter: Harsh Motwani
>            Priority: Major
>
> Currently, `VariantVal`'s cannot be created in Python. The `VariantVal` type can only be used to read Variants from existing DataFrames. In order to create Variants, one can only hard-code byte values of Variants (like `VariantVal(bytes([12, i]), bytes([1, 0, 0]))`) which is not useful at all. There should be some easy way for Python developers to create variants from JSON strings/potentially other ways, for example a `parse_json` API implementation in Python.



--
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