[jira] [Updated] (PHOENIX-3374) Wrong data row key is getting generated for local indexes for functions with fixed non null columns

2016-10-28 Thread Rajeshbabu Chintaguntla (JIRA)

 [ 
https://issues.apache.org/jira/browse/PHOENIX-3374?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Rajeshbabu Chintaguntla updated PHOENIX-3374:
-
Attachment: PHOENIX-3374_v3.patch

> Wrong data row key is getting generated for local indexes for functions with 
> fixed non null columns
> ---
>
> Key: PHOENIX-3374
> URL: https://issues.apache.org/jira/browse/PHOENIX-3374
> Project: Phoenix
>  Issue Type: Bug
>Reporter: Rajeshbabu Chintaguntla
>Assignee: Rajeshbabu Chintaguntla
> Fix For: 4.9.0, 4.8.2
>
> Attachments: PHOENIX-3374.patch, PHOENIX-3374_v2.patch, 
> PHOENIX-3374_v3.patch
>
>
> When we create local indexes on functions then while joining back missing 
> columns from data table is generating wrong data row key. 
> When we generated index row key schema we are initializing isNullableToBe to 
> true always even if the expression might be not null. Because of this we 
> might change the column type to other castable one and may consider actual 
> data as separator bytes.
> {noformat}
> ...
> if (indexField == null) {
> Expression e = expressionItr.next();
> isNullableToBe = true;
> dataTypeToBe = 
> IndexUtil.getIndexColumnDataType(isNullableToBe, e.getDataType());
> sortOrderToBe = descIndexColumnBitSet.get(i) ? SortOrder.DESC 
> : SortOrder.ASC;
> maxLengthToBe = e.getMaxLength();
> scaleToBe = e.getScale();
> ...
> {noformat}



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


[jira] [Updated] (PHOENIX-3374) Wrong data row key is getting generated for local indexes for functions with fixed non null columns

2016-10-28 Thread Rajeshbabu Chintaguntla (JIRA)

 [ 
https://issues.apache.org/jira/browse/PHOENIX-3374?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Rajeshbabu Chintaguntla updated PHOENIX-3374:
-
Attachment: PHOENIX-3374_v2.patch

> Wrong data row key is getting generated for local indexes for functions with 
> fixed non null columns
> ---
>
> Key: PHOENIX-3374
> URL: https://issues.apache.org/jira/browse/PHOENIX-3374
> Project: Phoenix
>  Issue Type: Bug
>Reporter: Rajeshbabu Chintaguntla
>Assignee: Rajeshbabu Chintaguntla
> Fix For: 4.9.0, 4.8.2
>
> Attachments: PHOENIX-3374.patch, PHOENIX-3374_v2.patch
>
>
> When we create local indexes on functions then while joining back missing 
> columns from data table is generating wrong data row key. 
> When we generated index row key schema we are initializing isNullableToBe to 
> true always even if the expression might be not null. Because of this we 
> might change the column type to other castable one and may consider actual 
> data as separator bytes.
> {noformat}
> ...
> if (indexField == null) {
> Expression e = expressionItr.next();
> isNullableToBe = true;
> dataTypeToBe = 
> IndexUtil.getIndexColumnDataType(isNullableToBe, e.getDataType());
> sortOrderToBe = descIndexColumnBitSet.get(i) ? SortOrder.DESC 
> : SortOrder.ASC;
> maxLengthToBe = e.getMaxLength();
> scaleToBe = e.getScale();
> ...
> {noformat}



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


[jira] [Updated] (PHOENIX-3374) Wrong data row key is getting generated for local indexes for functions with fixed non null columns

2016-10-12 Thread Rajeshbabu Chintaguntla (JIRA)

 [ 
https://issues.apache.org/jira/browse/PHOENIX-3374?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Rajeshbabu Chintaguntla updated PHOENIX-3374:
-
Attachment: PHOENIX-3374.patch

Here is the patch. [~jamestaylor] Please review.

> Wrong data row key is getting generated for local indexes for functions with 
> fixed non null columns
> ---
>
> Key: PHOENIX-3374
> URL: https://issues.apache.org/jira/browse/PHOENIX-3374
> Project: Phoenix
>  Issue Type: Bug
>Reporter: Rajeshbabu Chintaguntla
>Assignee: Rajeshbabu Chintaguntla
> Fix For: 4.9.0, 4.8.2
>
> Attachments: PHOENIX-3374.patch
>
>
> When we create local indexes on functions then while joining back missing 
> columns from data table is generating wrong data row key. 
> When we generated index row key schema we are initializing isNullableToBe to 
> true always even if the expression might be not null. Because of this we 
> might change the column type to other castable one and may consider actual 
> data as separator bytes.
> {noformat}
> ...
> if (indexField == null) {
> Expression e = expressionItr.next();
> isNullableToBe = true;
> dataTypeToBe = 
> IndexUtil.getIndexColumnDataType(isNullableToBe, e.getDataType());
> sortOrderToBe = descIndexColumnBitSet.get(i) ? SortOrder.DESC 
> : SortOrder.ASC;
> maxLengthToBe = e.getMaxLength();
> scaleToBe = e.getScale();
> ...
> {noformat}



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