You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Hyukjin Kwon (Jira)" <ji...@apache.org> on 2020/10/26 02:40:00 UTC
[jira] [Reopened] (SPARK-32388) TRANSFORM when schema less should
keep same with hive
[ https://issues.apache.org/jira/browse/SPARK-32388?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Hyukjin Kwon reopened SPARK-32388:
----------------------------------
> 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-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org