Chetan Bhat created CARBONDATA-342:
-------------------------------------- Summary: Select query with 'in' has issue with where clause for int, bigint and decimal data types. Key: CARBONDATA-342 URL: https://issues.apache.org/jira/browse/CARBONDATA-342 Project: CarbonData Issue Type: Bug Components: data-query Affects Versions: 0.1.0-incubating Environment: 3 node cluster. Spark 1.6.2 built for Hadoop 2.6.0 Hadoop 2.7.2 Reporter: Chetan Bhat Priority: Minor Fix For: 0.2.0-incubating Select query with 'in' has issue with where clause for int, bigint and decimal data types. Actual output as shown below - select queries with 'in' does not return any records in resultset. 0: jdbc:hive2://10.18.102.236:10000> create table Test_Boundary (c1_int int,c2_Bigint Bigint,c3_Decimal Decimal(38,38),c4_double double,c5_string string,c6_Timestamp Timestamp,c7_Datatype_Desc string) STORED BY 'org.apache.carbondata.format'; +---------+--+ | Result | +---------+--+ +---------+--+ No rows selected (0.078 seconds) 0: jdbc:hive2://10.18.102.236:10000> LOAD DATA INPATH 'hdfs://10.18.102.236:54310/chetan/Test_Data1.csv' INTO table Test_Boundary OPTIONS('DELIMITER'=',','QUOTECHAR'='"','FILEHEADER'=''); +---------+--+ | Result | +---------+--+ +---------+--+ No rows selected (0.501 seconds) 0: jdbc:hive2://10.18.102.236:10000> select c1_int from test_boundary where c1_int in (2.147483647E9,2345.0,1234.0); +---------+--+ | c1_int | +---------+--+ +---------+--+ No rows selected (0.069 seconds) 0: jdbc:hive2://10.18.102.236:10000> select c1_int from test_boundary where c1_int in (-2.147483647E9,2345.0,-1234.0); +---------+--+ | c1_int | +---------+--+ +---------+--+ No rows selected (0.071 seconds) 0: jdbc:hive2://10.18.102.236:10000> select c1_int from test_boundary where c1_int in (0,-1234.0); +---------+--+ | c1_int | +---------+--+ +---------+--+ No rows selected (0.076 seconds) 0: jdbc:hive2://10.18.102.236:10000> select c2_bigint from test_boundary where c2_bigint in (9223372036854775807,2345.0,1234.0); +------------+--+ | c2_bigint | +------------+--+ +------------+--+ No rows selected (0.059 seconds) 0: jdbc:hive2://10.18.102.236:10000> select c2_bigint from test_boundary where c2_bigint in (-9223372036854775808,2345.0,-1234.0); +------------+--+ | c2_bigint | +------------+--+ +------------+--+ No rows selected (0.077 seconds) 0: jdbc:hive2://10.18.102.236:10000> select c2_bigint from test_boundary where c2_bigint in (0,-1234.0); +------------+--+ | c2_bigint | +------------+--+ +------------+--+ No rows selected (0.062 seconds) 0: jdbc:hive2://10.18.102.236:10000> select c3_decimal from test_boundary where c3_decimal in (0,-1234.0); +-------------+--+ | c3_decimal | +-------------+--+ +-------------+--+ No rows selected (0.072 seconds) Expected Output should be as shown below :- 0: jdbc:hive2://ha-cluster/default> select c1_int from test_boundary where c1_int in (2.147483647E9,2345.0,1234.0); +-------------+--+ | c1_int | +-------------+--+ | 2147483647 | | 2147483647 | | 2345 | | 1234 | +-------------+--+ 4 rows selected (0.388 seconds) 0: jdbc:hive2://ha-cluster/default> select c1_int from test_boundary where c1_int in (-2.147483647E9,2345.0,-1234.0); +--------------+--+ | c1_int | +--------------+--+ | -2147483647 | | 2345 | +--------------+--+ 2 rows selected (0.258 seconds) 0: jdbc:hive2://ha-cluster/default> select c1_int from test_boundary where c1_int in (0,-1234.0); +---------+--+ | c1_int | +---------+--+ | 0 | +---------+--+ 1 row selected (0.255 seconds) 0: jdbc:hive2://ha-cluster/default> select c2_bigint from test_boundary where c2_bigint in (9223372036854775807,2345.0,1234.0); +----------------------+--+ | c2_bigint | +----------------------+--+ | 9223372036854775807 | | 9223372036854775807 | | 9223372036854775807 | | 9223372036854775807 | | 2345 | | 1234 | +----------------------+--+ 6 rows selected (0.331 seconds) 0: jdbc:hive2://ha-cluster/default> select c2_bigint from test_boundary where c2_bigint in (-9223372036854775808,2345.0,-1234.0); +-----------------------+--+ | c2_bigint | +-----------------------+--+ | -9223372036854775808 | | 2345 | +-----------------------+--+ 2 rows selected (0.299 seconds) 0: jdbc:hive2://ha-cluster/default> select c2_bigint from test_boundary where c2_bigint in (0,-1234.0); +------------+--+ | c2_bigint | +------------+--+ | 0 | +------------+--+ 1 row selected (0.263 seconds) 0: jdbc:hive2://ha-cluster/default> select c3_decimal from test_boundary where c3_decimal in (0,-1234.0); +-------------+--+ | c3_decimal | +-------------+--+ | 0E-38 | | 0E-38 | +-------------+--+ 2 rows selected (0.273 seconds) -- This message was sent by Atlassian JIRA (v6.3.4#6332) |
Free forum by Nabble | Edit this page |