You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "Dmitry Tolpeko (JIRA)" <ji...@apache.org> on 2017/09/10 21:46:00 UTC

[jira] [Assigned] (HIVE-14417) HPL/SQL: Wrong syntax generated for Postgres INSERT

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

Dmitry Tolpeko reassigned HIVE-14417:
-------------------------------------

    Assignee: Dmitry Tolpeko

> HPL/SQL: Wrong syntax generated for Postgres INSERT
> ---------------------------------------------------
>
>                 Key: HIVE-14417
>                 URL: https://issues.apache.org/jira/browse/HIVE-14417
>             Project: Hive
>          Issue Type: Bug
>          Components: hpl/sql
>    Affects Versions: 2.1.0
>            Reporter: Carter Shanklin
>            Assignee: Dmitry Tolpeko
>            Priority: Minor
>
> HPL/SQL doesn't claim any support for Postgres so I guess I can't really complain. But if you do connect to Postgres and try an insert, this happens:
> {code}
> ERROR:  syntax error at or near "TABLE" at character 13
> STATEMENT:  INSERT INTO TABLE pgtable VALUES
> 	(1, 2, 'a')
> {code}
> This "INSERT INTO TABLE" stuff isn't used against MySQL, my guess the code generation assume it's Hive unless it's one of the other known databases so it inserts the non-standard Hive-ism.
> This was my configuration when this happened:
> {code}
> <configuration>
>   <property>
>     <name>hplsql.conn.default</name>
>     <value>myhiveconn</value>
>   </property>
>   <property>
>     <name>hplsql.conn.myhiveconn</name>
>     <value>org.apache.hive.jdbc.HiveDriver;jdbc:hive2://hdp250.example.com:10000</value>
>   </property>
>   <property>
>     <name>hplsql.conn.pgdbconn</name>
>     <value>org.postgresql.Driver;jdbc:postgresql://hdp250.example.com/vagrant?user=vagrant&amp;password=vagrant</value>
>   </property>
>   <property>
>     <name>hplsql.conn.mydbconn</name>
>     <value>com.mysql.jdbc.Driver;jdbc:mysql://hdp250.example.com:3306/hive;hive;vagrant</value>
>   </property>
> </configuration>
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)