harshmotw-db commented on code in PR #57373:
URL: https://github.com/apache/spark/pull/57373#discussion_r3618905927
##########
sql/api/src/main/scala/org/apache/spark/sql/functions.scala:
##########
@@ -9988,6 +9988,92 @@ object functions {
def variant_set(v: Column, path: String, value: Column, createIfMissing:
Boolean): Column =
Column.fn("variant_set", v, lit(path), value, lit(createIfMissing))
+ /**
+ * Sets or upserts a value in a variant at the given JSONPath location. An
existing object field
Review Comment:
Same here
##########
python/pyspark/sql/functions/builtin.py:
##########
@@ -21911,6 +21911,71 @@ def variant_set(
)
+@_try_remote_functions
+def try_variant_set(
+ v: "ColumnOrName",
+ path: Union[Column, str],
+ value: "ColumnOrName",
+ create_if_missing: bool = True,
+) -> Column:
+ """
+ Sets or upserts a value in a variant at the given JSONPath location. An
existing object field
Review Comment:
Should just be "Upsert" or "Sets and inserts" IMO. Upserts is already a
combination of insert and update
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]