hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Frank Kemmer (JIRA)" <>
Subject [jira] [Created] (HIVE-17655) SQL UPDATE on Object mapped to mysqlconn fails
Date Fri, 29 Sep 2017 17:43:00 GMT
Frank Kemmer created HIVE-17655:

             Summary: SQL UPDATE on Object mapped to mysqlconn fails
                 Key: HIVE-17655
             Project: Hive
          Issue Type: Bug
          Components: hpl/sql
            Reporter: Frank Kemmer

We have a MySQL Database configured in hplsql-site.xml:

  <value>com.mysql.jdbc.Driver;jdbc:mysql://<our my sql server>/defaultdb;luser;strenggeheim</value>
  <description>MySQL connection</description>

In hplsqlrc:

MAP OBJECT T TO defaultdb.T AT mysqlconn;

This works:

$ hplsql -e "select * from T;"
Open connection: jdbc:mysql:/<our mysql server>/defaultdb (649 ms)
Starting query
Query executed successfully (5 ms)
1 Hans

This not:

$ hplsql -e "UPDATE T SET name = 'Peter' WHERE id = 1;"

This funnily tries to open the hive connection and fails with not knowing table T ... ofc
T exists only on our MySQL DB ...

Really strange ... if we set the mysqlconn as default connection, then everything works as
expected ...

It looks like hplsql forgets to lookup the mapped object and assumes it only needs to access
the default connection.

Personally I would much more prefer, to have the connection in the table specification than
in a MAP statement, like for exmaple in presto:

SELECT * FROM mysqlconn.T;

We are using cloudera 5.12 and I have downloaded hplsql-0.3.31 ...

Thx for any info in advance.

This message was sent by Atlassian JIRA

View raw message