You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2019/12/05 04:06:54 UTC

[GitHub] [flink] xuefuz commented on issue #10401: [FLINK-15020][hive] Support timestamp type in hive

xuefuz commented on issue #10401: [FLINK-15020][hive] Support timestamp type in hive
URL: https://github.com/apache/flink/pull/10401#issuecomment-561959312
 
 
   > @xuefuz I just refactored the code such that callers need to explicitly specify whether precision check is needed. Hopefully that'll make things clearer. The conversion from `DataType` to `TypeInfo` is needed in the following code paths:
   > 
   >     1. When creating tables via HiveCatalog. As we discussed earlier, we'll enforce the check in this case.
   > 
   >     2. When getting `ObjectInspector` for writing to Hive tables. Since Hive tables only support ts(9), we'll enforce the check here.
   > 
   >     3. Used by Hive UDFs during initialization, deciding result type, getting `ObjectInspector`s for parameters, etc. We don't enforce the check in this case since we want UDFs to be able to handle ts (<9).
   
   Thanks for the explanation. It sounds good. One thing to watch out is when Flink timestamp value has greater precision than 9, which can lose precision after converting to Hive timestamp. We don't have to address this in the PR, but it's one interesting thing to find out.
   
   I'm +1 for this PR to merge. For orc reader issue. if #10426 fix the issue, we can merge either one first, and the second to turn the switch back on.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services