[ 
https://issues.apache.org/jira/browse/SPARK-32388?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Hyukjin Kwon resolved SPARK-32388.
----------------------------------
    Fix Version/s: 3.1.0
       Resolution: Fixed

Issue resolved by pull request 29421
[https://github.com/apache/spark/pull/29421]

> TRANSFORM when schema less should keep same with hive
> -----------------------------------------------------
>
>                 Key: SPARK-32388
>                 URL: https://issues.apache.org/jira/browse/SPARK-32388
>             Project: Spark
>          Issue Type: Sub-task
>          Components: SQL
>    Affects Versions: 3.0.0
>            Reporter: angerszhu
>            Assignee: angerszhu
>            Priority: Major
>             Fix For: 3.1.0
>
>
> Hive transform without schema
>  
> {code:java}
> hive> create table t (c0 int, c1 int, c2 int);
> hive> INSERT INTO t VALUES (1, 1, 1);
> hive> INSERT INTO t VALUES (2, 2, 2);
> hive> CREATE VIEW v AS SELECT TRANSFORM(c0, c1, c2) USING 'cat' FROM t;
> hive> DESCRIBE v;
> key                   string                                      
> value                 string                                      
> hive> SELECT * FROM v;
> 1     1       1
> 2     2       2
> hive> SELECT key FROM v;
> 1
> 2
> hive> SELECT value FROM v;
> 1     1
> 2     2{code}
> Spark
> {code:java}
> hive> create table t (c0 int, c1 int, c2 int); 
> hive> INSERT INTO t VALUES (1, 1, 1); 
> hive> INSERT INTO t VALUES (2, 2, 2); 
> hive> CREATE VIEW v AS SELECT TRANSFORM(c0, c1, c2) USING 'cat' FROM t; 
> hive> SELECT * FROM v; 
> 1   11
> 2   22 {code}
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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

Reply via email to