Github user dilipbiswal commented on a diff in the pull request:
https://github.com/apache/spark/pull/22407#discussion_r217267848
--- Diff:
sql/core/src/test/scala/org/apache/spark/sql/DataFrameFunctionsSuite.scala ---
@@ -1045,6 +1045,31 @@ class DataFrameFunctionsSuite extends QueryTest with
SharedSQLContext {
Seq(Row(null), Row(null))
)
+ checkAnswer(
+ df.selectExpr("array_position(array(1), 1.23D)"),
+ Seq(Row(0L), Row(0L))
+ )
+
+ checkAnswer(
+ df.selectExpr("array_position(array(1), 1.0D)"),
+ Seq(Row(1L), Row(1L))
+ )
+
+ checkAnswer(
+ df.selectExpr("array_position(array(1.23D), 1)"),
+ Seq(Row(0L), Row(0L))
+ )
--- End diff --
@ueshin Sure.. i will add this case.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]