Github user maropu commented on the issue:

    https://github.com/apache/spark/pull/18516
  
    The hive-related tests failed, so I checked the hive behaviour;
    ```
    hive> CREATE TEMPORARY TABLE t1 AS SELECT map();
    hive> DESCRIBE t1;
    _c0   map<string,string>                          
    
    hive> CREATE TEMPORARY TABLE t2 AS SELECT array();
    hive> DESCRIBE t2;
    _c0   array<string>
    
    hive> CREATE TEMPORARY TABLE t3 AS SELECT coalesce();
    FAILED: SemanticException [Error 10305]: CREATE-TABLE-AS-SELECT creates a 
VOID type, please use CAST to specify the type, near field:  _c0
    
    hive> CREATE TEMPORARY TABLE t4 AS SELECT struct();
    hive> DESCRIBE t4;
    _c0                     struct<>   
    
    hive> CREATE TEMPORARY TABLE t5 AS SELECT greatest();
    FAILED: SemanticException [Error 10015]: Line 1:37 Arguments length 
mismatch 'greatest': greatest requires at least 2 arguments, got 0
    
    hive> CREATE TEMPORARY TABLE t6 AS SELECT least();
    FAILED: SemanticException [Error 10015]: Line 1:37 Arguments length 
mismatch 'least': least requires at least 2 arguments, got 0
    ```
    In hive, `array` and `map` with no argument use string types by default. 
Spark fails when using `struct` with no argument though, it seems hive return 
an empty struct. If you get time, could you check this? @gatorsmile Thanks!


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

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

Reply via email to