[ 
https://issues.apache.org/jira/browse/SPARK-16037?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15340300#comment-15340300
 ] 

Yin Huai commented on SPARK-16037:
----------------------------------

For SQL, I feel having the project list like other databases (e.g. insert into 
src (a, c, b) select 1, 2 as c, 3 as b) make the semantic more clear. What do 
you think?

> use by-position resolution when insert into hive table
> ------------------------------------------------------
>
>                 Key: SPARK-16037
>                 URL: https://issues.apache.org/jira/browse/SPARK-16037
>             Project: Spark
>          Issue Type: Sub-task
>          Components: SQL
>    Affects Versions: 2.0.0
>            Reporter: Wenchen Fan
>            Assignee: Wenchen Fan
>             Fix For: 2.0.0
>
>
> INSERT INTO TABLE src SELECT 1, 2 AS c, 3 AS b;
> The result is 1, 3, 2 for hive table, which is wrong.
> Postgres ignores the column names when performing the equivalent query 
> (without partitioning):
> {code:title=psql (9.3.13)}
> postgres=# create table src (a int, b int, c int);
> CREATE TABLE
> postgres=# insert into src select 1, 2 as c, 3 as b;
> INSERT 0 1
> postgres=# select * from src;
>  a | b | c 
> ---+---+---
>  1 | 2 | 3
> (1 row)
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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

Reply via email to