You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@carbondata.apache.org by "Ravindra Pesala (JIRA)" <ji...@apache.org> on 2017/09/18 09:02:00 UTC

[jira] [Resolved] (CARBONDATA-1094) Wrong results returned by the query in case inverted index is not created on a column

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

Ravindra Pesala resolved CARBONDATA-1094.
-----------------------------------------
    Resolution: Fixed

> Wrong results returned by the query in case inverted index is not created on a column
> -------------------------------------------------------------------------------------
>
>                 Key: CARBONDATA-1094
>                 URL: https://issues.apache.org/jira/browse/CARBONDATA-1094
>             Project: CarbonData
>          Issue Type: Bug
>            Reporter: Manish Gupta
>            Assignee: Manish Gupta
>             Fix For: 1.2.0
>
>          Time Spent: 1h
>  Remaining Estimate: 0h
>
> While creating a table if a column is not specified as sort column or included as no inverted index then the column will not be sorted during data load. Unsorted data will have incorrect min/max values and inverted index will not be created for that column.
> During query, if filter exists for that column it gives incorrect results as binary search cannot be applied on the unsorted data.
> Commands to reproduce
> -----------------------------------------
> CREATE TABLE IF NOT EXISTS index1 (id Int, name String, city String) STORED BY 'org.apache.carbondata.format' TBLPROPERTIES('NO_INVERTED_INDEX'='name,city', 'DICTIONARY_EXCLUDE'='city')
> LOAD DATA LOCAL INPATH '<csv file path>' into table index1
> SELECT * FROM index1 WHERE city >= 'Shanghai'
> +---+------+----------+
> | id|  name|      city|
> +---+------+----------+
> | 11| James|Washington|
> |  5|  John|   Beijing|
> | 20| Kevin| Singapore|
> | 17|  Lisa|  Hangzhou|
> | 12| Maria|    Berlin|
> |  2|  Mark|     Paris|
> |  9|  Mary|     Tokyo|
> |  6|Michel|   Chicago|
> | 16|  Paul|  Shanghai|
> | 14| Peter|    Boston|
> |  7|Robert|   Houston|
> |  4|  Sara|     Tokyo|
> |  8| Sunny|    Boston|
> +---+------+----------+



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)