Member since
04-26-2018
7
Posts
0
Kudos Received
0
Solutions
05-01-2018
04:36 AM
Related bug reports. Only fixed in V2 and not backported unfortunately. https://issues.apache.org/jira/browse/HIVE-17358?jql=project%20%3D%20HIVE%20AND%20text%20~%20%22inse... https://issues.apache.org/jira/browse/HIVE-11723?jql=project%20%3D%20HIVE%20AND%20text%20~%20%22inse...
... View more
05-01-2018
04:33 AM
Related bug reports. Only fixed in V2 and not backported unfortunately. https://issues.apache.org/jira/browse/HIVE-17358?jql=project%20%3D%20HIVE%20AND%20text%20~%20%22insert%20values%22 https://issues.apache.org/jira/browse/HIVE-11723?jql=project%20%3D%20HIVE%20AND%20text%20~%20%22insert%20values%22
... View more
04-30-2018
08:04 AM
A Hive statement of the form below does not seem to escape single quotes as expected.
insert into table x values ('Jim', 'O\'Brien');
whereas the following is inserted as expected.
insert into table x select 'Jim', 'O\'Brien';
The former fails for inserts made using the HUE editor and over JDBC with records being inserted as:
O\'Brien.
... View more
Labels:
- Labels:
-
Apache Hive
-
Cloudera Hue
04-30-2018
07:36 AM
Any idea why insert into default.mytest
select 'For testing single quote\'s', 1; works and insert into default.mytest
values ('For testing single quote\'s', 1); doesn't work?
... View more
04-30-2018
04:07 AM
How, exactly, should a single quote ' be escaped in an Hive SQL insert statement?
In the Hive editor in HUE I jave tried \' and 2 single quotes '' which gives the following results when queried so neither of these look to be correct:
35 We Rmyoyi''w Rymih
35 We Rmyoyi\'w Rymih
The JDBC driver (org.apache.hive.jdbc.HivePreparedStatement) is escaping single quotes by doing
public void setString(int parameterIndex, String x) throws SQLException {
x=x.replace("'", "\\'");
this.parameters.put(parameterIndex,"'"+x+"'");
}
however this is also results as records being inserted as which is not correct either.
35 We Rmyoyi\'w Rymih
... View more
Labels:
- Labels:
-
Apache Hive
-
Cloudera Hue