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

Jesus Camacho Rodriguez edited comment on HIVE-20095 at 7/18/18 11:49 PM:
--------------------------------------------------------------------------

[~msydoron], we need to fix those two test failures before committing this 
patch. What is the error that we are getting?

After checking the code in more detail.
For the existing failures, I think your new code in JdbcRecordIterator is the 
right way to go, but we should modify the {{deserialize}} method in JDBCSerde 
to create the right type requested for Hive (the deserialize method in 
DruidSerDe may serve as an example 
https://github.com/apache/hive/blob/master/druid-handler/src/java/org/apache/hadoop/hive/druid/serde/DruidSerDe.java#L387
 ). JDBCSerde always has information for the columnTypes derived either from 
from metadata query or from conf depending on the existence of 
{{Constants.HIVE_JDBC_QUERY}}, hence it should be straightforward. At the same 
time, issue for nulls and timestamp would be fixed this way. What do you think?



was (Author: jcamachorodriguez):
[~msydoron], we need to fix those two test failures before committing this 
patch. What is the error that we are getting?

For the existing failures, could we 1) modify {{getColumnTypes}} to obtain the 
types from metadata query or from conf depending on the existence of 
{{Constants.HIVE_JDBC_QUERY}}, 2) then use the method to pass the types to the 
constructor of JdbcRecordIterator (as it is currently done), and 3) keep the 
code to infer from those types the object that we need to extract for each row, 
possibly fixing the issue with null values and timestamp? Would that work?

Alternatively, the fix for the long/double/timestamp can be fixed in a separate 
ticket, then please create a follow-up for that.

> Fix jdbc external table feature
> -------------------------------
>
>                 Key: HIVE-20095
>                 URL: https://issues.apache.org/jira/browse/HIVE-20095
>             Project: Hive
>          Issue Type: Bug
>            Reporter: Jonathan Doron
>            Assignee: Jonathan Doron
>            Priority: Major
>         Attachments: HIVE-20095.1.patch, HIVE-20095.2.patch, 
> HIVE-20095.3.patch, HIVE-20095.4.patch
>
>
> It seems like the committed code for HIVE-19161 
> (7584b3276bebf64aa006eaa162c0a6264d8fcb56) reverted some of HIVE-18423 
> updates, and therefore some of the external table queries are not working 
> correctly.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to