liuyongvs commented on code in PR #22267:
URL: https://github.com/apache/flink/pull/22267#discussion_r1151331431


##########
docs/data/sql_functions.yml:
##########
@@ -634,6 +634,9 @@ collection:
   - sql: ARRAY_DISTINCT(haystack)
     table: haystack.arrayDistinct()
     description: Returns an array with unique elements. If the array itself is 
null, the function will return null. Keeps ordering of elements.
+  - sql: ARRAY_POSITION(haystack, needle)
+    table: haystack.arrayPosition(needle)
+    description: Returns the position of the first occurrence of element in 
the given array as long. Returns 0 if the given value could not be found in the 
array. Returns null if either of the arguments are null. And this is not zero 
based, but 1-based index. The first element in the array has index 1.

Review Comment:
   spark return bigint, just aligned with spark  
https://github.com/apache/spark/blob/5a56c17283103821714ffaaf1c764e05d0ff6b58/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/collectionOperations.scala#L2294



-- 
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: issues-unsubscr...@flink.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to