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

Owen O'Malley edited comment on HIVE-14310 at 7/27/16 10:15 PM:
----------------------------------------------------------------

Comments:

* You should not throw if the file schema has more columns than the reader 
schema. We want to support schema evolution that includes deleting columns.
* You should comment that included, readerFileTypes, and ppdSafeConversion are 
all indexed by the reader column id.
* The comment about why float -> double isn't support is a little broken. How 
about:

{code}
// NOTE: Float to double evolution is not safe as floats are stored as doubles 
in ORC's
// internal index, but when doing predicate evaluation for queries like "select 
* from
// orc_float where f = 74.72" the constant on the filter is converted from 
string -> double
// so the precisions will be different and the comparison will fail.
// Soon, we should convert all sargs that compare equality between floats or
// doubles to range predicates.
{code}

Other than that, it looks good.


was (Author: owen.omalley):
Comments:

* You should not throw in the file schema has more columns than the reader 
schema. We want to support schema evolution that includes deleting columns.
* You should comment that included, readerFileTypes, and ppdSafeConversion are 
all indexed by the reader column id.
* The comment about why float -> double isn't support is a little broken. How 
about:

{code}
// NOTE: Float to double evolution is not safe as floats are stored as doubles 
in ORC's
// internal index, but when doing predicate evaluation for queries like "select 
* from
// orc_float where f = 74.72" the constant on the filter is converted from 
string -> double
// so the precisions will be different and the comparison will fail.
// Soon, we should convert all sargs that compare equality between floats or
// doubles to range predicates.
{code}

Other than that, it looks good.

> ORC schema evolution should not completely disable PPD
> ------------------------------------------------------
>
>                 Key: HIVE-14310
>                 URL: https://issues.apache.org/jira/browse/HIVE-14310
>             Project: Hive
>          Issue Type: Bug
>    Affects Versions: 2.2.0
>            Reporter: Prasanth Jayachandran
>            Assignee: Prasanth Jayachandran
>            Priority: Critical
>         Attachments: HIVE-14310.1.patch, HIVE-14310.2.patch, 
> HIVE-14310.WIP.patch
>
>
> Follow up for HIVE-14214 which completely shuts off PPD when there is any 
> schema evolution. Some evolutions are safer for PPD like
> byte -> short -> int -> long
> -float -> double- (This is unsafe, see comments in SchemaEvolution.java in 
> the patch)
> varchar <-> string (string to char, varchar to char and vice versa is also 
> unsafe conversion as Orc stores internal index with padded spaces for char)
> For all other conversions we can disable PPD for that specific column that 
> has evolved by returning TruthValue.YES_NO



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to