Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-14417

HPL/SQL: Wrong syntax generated for Postgres INSERT

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 2.1.0
    • None
    • hpl/sql
    • None

    Description

      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:

      ERROR:  syntax error at or near "TABLE" at character 13
      STATEMENT:  INSERT INTO TABLE pgtable VALUES
      	(1, 2, 'a')
      

      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:

      <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>
      

      Attachments

        Activity

          People

            dmtolpeko Dmitry Tolpeko
            cartershanklin Carter Shanklin
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: