[jira] [Updated] (CARBONDATA-717) AND operator does not work properly in carbondata

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[jira] [Updated] (CARBONDATA-717) AND operator does not work properly in carbondata

Akash R Nilugal (Jira)

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

Vinod Rohilla updated CARBONDATA-717:
-------------------------------------
    Request participants:   (was: )
             Description:
Incorrect result displays to a user while use AND operator.


Note:Issue exist when you take ID as a String but if you take ID as a int then it's working fine.

Steps to Reproduce:

1: create a table:
 CREATE TABLE IF NOT EXISTS t4 (ID string, name string) STORED BY 'carbondata';

2:Load the data
LOAD DATA LOCAL INPATH '/home/Desktop/sample.csv' into table t4;

3:Total record in the table.

0: jdbc:hive2://localhost:10000> select * from t4;
+-----+--------+--+
| ID  |  name  |
+-----+--------+--+
| 1   | david  |
| 2   | eason  |
| 3   | jarry  |
+-----+--------+--+

4: SELECT * FROM t3 where id>=1 and id <3;

0: jdbc:hive2://localhost:10000> SELECT * FROM t4 where id>=1 and id <3;
+-----+--------+--+
| ID  |  name  |
+-----+--------+--+
| 2   | eason  |
| 3   | jarry  |
+-----+--------+--+



Expected Result: It should show the below result:

0: jdbc:hive2://localhost:10000> SELECT * FROM t4 where id>=1 and id <3;
+-----+--------+--+
| ID  |  name  |
+-----+--------+--+
| 1   | david  |
| 2   | eason  |
+-----+--------+--+


  was:
Incorrect result displays to a user while use AND operator.

Steps to Reproduce:

1: create a table:
 CREATE TABLE IF NOT EXISTS t4 (ID string, name string) STORED BY 'carbondata';

2:Load the data
LOAD DATA LOCAL INPATH '/home/Desktop/sample.csv' into table t4;

3:Total record in the table.

0: jdbc:hive2://localhost:10000> select * from t4;
+-----+--------+--+
| ID  |  name  |
+-----+--------+--+
| 1   | david  |
| 2   | eason  |
| 3   | jarry  |
+-----+--------+--+

4: SELECT * FROM t3 where id>=1 and id <3;

0: jdbc:hive2://localhost:10000> SELECT * FROM t4 where id>=1 and id <3;
+-----+--------+--+
| ID  |  name  |
+-----+--------+--+
| 2   | eason  |
| 3   | jarry  |
+-----+--------+--+



Expected Result: It should show the below result:

0: jdbc:hive2://localhost:10000> SELECT * FROM t4 where id>=1 and id <3;
+-----+--------+--+
| ID  |  name  |
+-----+--------+--+
| 1   | david  |
| 2   | eason  |
+-----+--------+--+



> AND operator does not work properly in carbondata
> -------------------------------------------------
>
>                 Key: CARBONDATA-717
>                 URL: https://issues.apache.org/jira/browse/CARBONDATA-717
>             Project: CarbonData
>          Issue Type: Bug
>          Components: sql
>    Affects Versions: 1.0.0-incubating
>         Environment: Spark 2.1
>            Reporter: Vinod Rohilla
>            Priority: Minor
>         Attachments: sample.csv
>
>
> Incorrect result displays to a user while use AND operator.
> Note:Issue exist when you take ID as a String but if you take ID as a int then it's working fine.
> Steps to Reproduce:
> 1: create a table:
>  CREATE TABLE IF NOT EXISTS t4 (ID string, name string) STORED BY 'carbondata';
> 2:Load the data
> LOAD DATA LOCAL INPATH '/home/Desktop/sample.csv' into table t4;
> 3:Total record in the table.
> 0: jdbc:hive2://localhost:10000> select * from t4;
> +-----+--------+--+
> | ID  |  name  |
> +-----+--------+--+
> | 1   | david  |
> | 2   | eason  |
> | 3   | jarry  |
> +-----+--------+--+
> 4: SELECT * FROM t3 where id>=1 and id <3;
> 0: jdbc:hive2://localhost:10000> SELECT * FROM t4 where id>=1 and id <3;
> +-----+--------+--+
> | ID  |  name  |
> +-----+--------+--+
> | 2   | eason  |
> | 3   | jarry  |
> +-----+--------+--+
> Expected Result: It should show the below result:
> 0: jdbc:hive2://localhost:10000> SELECT * FROM t4 where id>=1 and id <3;
> +-----+--------+--+
> | ID  |  name  |
> +-----+--------+--+
> | 1   | david  |
> | 2   | eason  |
> +-----+--------+--+



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)