Github user kiszk commented on a diff in the pull request:

    https://github.com/apache/spark/pull/21258#discussion_r192548103
  
    --- Diff: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/complexTypeCreator.scala
 ---
    @@ -235,6 +235,86 @@ case class CreateMap(children: Seq[Expression]) 
extends Expression {
       override def prettyName: String = "map"
     }
     
    +/**
    + * Returns a catalyst Map containing the two arrays in children 
expressions as keys and values.
    + */
    +@ExpressionDescription(
    +  usage = """
    +    _FUNC_(keys, values) - Creates a map with a pair of the given 
key/value arrays. All elements
    +      in keys should not be null""",
    +  examples = """
    +    Examples:
    +      > SELECT _FUNC_([1.0, 3.0], ['2', '4']);
    +       {1.0:"2",3.0:"4"}
    +  """, since = "2.4.0")
    +case class CreateMapFromArrays(left: Expression, right: Expression)
    --- End diff --
    
    In existing convention, `"map" -> "CreateMap"`. How about 
`"map_from_arrays" -> ???`?
    I am neutral on `MapFromArrays` or `CreateMapFromArrays`. WDYT?


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to