[jira] [Commented] (HIVE-24229) DirectSql fails in case of OracleDB

2020-12-16 Thread Ayush Saxena (Jira)


[ 
https://issues.apache.org/jira/browse/HIVE-24229?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17250643#comment-17250643
 ] 

Ayush Saxena commented on HIVE-24229:
-

Hi [~ngangam]
For me on Oracle DB, it was giving `ClassCastException`, Something like can not 
case oracle.sql.Clob to string. 
{{extractSqlClob}} has a check in it {{  if (value instanceof Clob) { }}} 
so will it bother still?

> DirectSql fails in case of OracleDB
> ---
>
> Key: HIVE-24229
> URL: https://issues.apache.org/jira/browse/HIVE-24229
> Project: Hive
>  Issue Type: Bug
>Reporter: Ayush Saxena
>Assignee: Ayush Saxena
>Priority: Critical
>  Labels: pull-request-available
> Fix For: 4.0.0
>
>  Time Spent: 40m
>  Remaining Estimate: 0h
>
> Direct Sql fails due to different data type mapping incase of Oracle DB



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (HIVE-24229) DirectSql fails in case of OracleDB

2020-12-16 Thread Naveen Gangam (Jira)


[ 
https://issues.apache.org/jira/browse/HIVE-24229?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17250415#comment-17250415
 ] 

Naveen Gangam commented on HIVE-24229:
--

[~ayushtkn] Have a quick question about part of this fix. Looks like the change 
include the following fix.

{noformat}
public void apply(Partition t, Object[] fields) {
-t.putToParameters((String)fields[1], extractSqlClob(fields[2]));
+t.putToParameters(extractSqlClob(fields[1]), 
extractSqlClob(fields[2]));
  }});
{noformat}

The PARTITION_PARAMS.PARAM_KEY is a varchar(256). Why was the change from 
"(String)fields[1]" to "extractSqlClob(fields[1]" required? I am concerned that 
this might cause issues in some other databases where the column value might be 
treated as a reference to a file and not the actual value itself.

{noformat}
-- Table PARTITION_PARAMS for join relationship
CREATE TABLE PARTITION_PARAMS
(
PART_ID NUMBER NOT NULL,
PARAM_KEY VARCHAR2(256) NOT NULL,
PARAM_VALUE CLOB NULL
);

{noformat}


> DirectSql fails in case of OracleDB
> ---
>
> Key: HIVE-24229
> URL: https://issues.apache.org/jira/browse/HIVE-24229
> Project: Hive
>  Issue Type: Bug
>Reporter: Ayush Saxena
>Assignee: Ayush Saxena
>Priority: Critical
>  Labels: pull-request-available
> Fix For: 4.0.0
>
>  Time Spent: 40m
>  Remaining Estimate: 0h
>
> Direct Sql fails due to different data type mapping incase of Oracle DB



--
This message was sent by Atlassian Jira
(v8.3.4#803005)