Github user maropu commented on the issue:

    https://github.com/apache/spark/pull/21215
  
    Do you wanna do this?
    ```
    scala> sql("select array()").printSchema
    root
     |-- array(): array (nullable = false)
     |    |-- element: string (containsNull = false)
    
    
    scala> sql("select CAST(array() AS ARRAY<INT>) c").printSchema
    root
     |-- c: array (nullable = false)
     |    |-- element: integer (containsNull = true)
    
    
    scala> sql("select CAST(array() AS ARRAY<INT>) c").show
    +---+
    |  c|
    +---+
    | []|
    +---+
    ```


---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to