[
https://issues.apache.org/jira/browse/SPARK-41232?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17642796#comment-17642796
]
Ankit Prakash Gupta commented on SPARK-41232:
---------------------------------------------
Documenting the behaviour of snowflake for this function in different scenarios
{code:java}
select array_append(array_construct(1, 2, 3), 'HELLO');
-- [ 1, 2, 3, "HELLO" ]
select array_append(array_construct(1, 2, 3), NULL);
-- [1,2,3,undefined]
select array_append(NULL, 'a');
-- null
select array_append(NULL, NULL);
-- null {code}
So, if the array is null, we don't create an array and return null directly
while if the element is null we just insert it directly without checking if it
is null.
> High-order function: array_append
> ---------------------------------
>
> Key: SPARK-41232
> URL: https://issues.apache.org/jira/browse/SPARK-41232
> Project: Spark
> Issue Type: Sub-task
> Components: PySpark, SQL
> Affects Versions: 3.4.0
> Reporter: Ruifeng Zheng
> Priority: Major
>
> refer to
> https://docs.snowflake.com/en/developer-guide/snowpark/reference/python/api/snowflake.snowpark.functions.array_append.html
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]