You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Ryan Blue (JIRA)" <ji...@apache.org> on 2016/06/20 19:57:58 UTC

[jira] [Issue Comment Deleted] (SPARK-16037) use by-position resolution when insert into hive table

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

Ryan Blue updated SPARK-16037:
------------------------------
    Comment: was deleted

(was: I agree, but I don't think this addresses the problem where the user expects the result of the original query to be (1,3,2) and not (1,2,3). This isn't a blocker, but a warning would be nice: "WARN: INSERT columns are matched by position, ignoring names from expressions: 2 as c, 3 as b".)

> 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: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org