automation/tincrepo/main/pxf/features/hive/orc_primitive_types/sql/query01.sql [22:67]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
SELECT * FROM pxf_hive_orc_types WHERE r IN ( CAST(8.7 as float4), CAST(9.7 as float4), CAST(10.7 as float4));
--int8
SELECT * FROM pxf_hive_orc_types WHERE bg IN (23456789);
--boolean
SELECT * FROM pxf_hive_orc_types WHERE b IN (TRUE);
SELECT * FROM pxf_hive_orc_types WHERE b IN (FALSE);
SELECT * FROM pxf_hive_orc_types WHERE b IN (FALSE, TRUE);
SELECT * FROM pxf_hive_orc_types WHERE b IN (TRUE, FALSE);
--int2
SELECT * FROM pxf_hive_orc_types WHERE tn IN (11,8);
--date
SELECT * FROM pxf_hive_orc_types WHERE dt IN ('2015-03-06');
--varchar
SELECT * FROM pxf_hive_orc_types WHERE vc1 IN ('abcd', 'abcde');
--char
SELECT * FROM pxf_hive_orc_types WHERE c1 IN ('abc');

--BETWEEN
SELECT t1 FROM pxf_hive_small_data WHERE dub1 BETWEEN 10 AND 15;

--IS NULL
SELECT t1 FROM pxf_hive_orc_types WHERE t2 IS NULL;
SELECT t1 FROM pxf_hive_orc_types WHERE dub1 IS NULL;
SELECT t1 FROM pxf_hive_orc_types WHERE b IS NULL;
SELECT t1 FROM pxf_hive_orc_types WHERE bin IS NULL;

--IS NOT NULL
SELECT t1 FROM pxf_hive_orc_types WHERE t2 IS NOT NULL;
SELECT t1 FROM pxf_hive_orc_types WHERE dub1 IS NOT NULL;
SELECT t1 FROM pxf_hive_orc_types WHERE b IS NOT NULL;
SELECT t1 FROM pxf_hive_orc_types WHERE bin IS NOT NULL;

--NOT
SELECT t1 FROM pxf_hive_small_data WHERE NOT (dub1 = 10);

--OR
SELECT t1 FROM pxf_hive_small_data WHERE dub1 = 10 OR num1 = 10;

--AND
SELECT t1 FROM pxf_hive_small_data WHERE dub1 = 12 AND num1 = 7;

--Complex logic expression, Var=Const, Const=Var, Const=Const, Var=Var
SELECT * FROM pxf_hive_small_data WHERE num1+5 = dub1;
SELECT * FROM pxf_hive_small_data WHERE num1+5 = dub1 AND 1=1;
SELECT * FROM pxf_hive_small_data WHERE num1 = 1 OR (t1 = 'row9' AND t2 = 's_14' AND num1 > 5);
SELECT * FROM pxf_hive_small_data WHERE num1 = 1 OR (t1 = 'row9' AND t2 = 's_14' AND num1 > 5 AND dub1 > 1) OR num1 = 2;
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



automation/tincrepo/main/pxf/features/hive/orc_primitive_types_no_timestamp/sql/query01.sql [18:63]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
SELECT * FROM pxf_hive_orc_types WHERE r IN ( CAST(8.7 as float4), CAST(9.7 as float4), CAST(10.7 as float4));
--int8
SELECT * FROM pxf_hive_orc_types WHERE bg IN (23456789);
--boolean
SELECT * FROM pxf_hive_orc_types WHERE b IN (TRUE);
SELECT * FROM pxf_hive_orc_types WHERE b IN (FALSE);
SELECT * FROM pxf_hive_orc_types WHERE b IN (FALSE, TRUE);
SELECT * FROM pxf_hive_orc_types WHERE b IN (TRUE, FALSE);
--int2
SELECT * FROM pxf_hive_orc_types WHERE tn IN (11,8);
--date
SELECT * FROM pxf_hive_orc_types WHERE dt IN ('2015-03-06');
--varchar
SELECT * FROM pxf_hive_orc_types WHERE vc1 IN ('abcd', 'abcde');
--char
SELECT * FROM pxf_hive_orc_types WHERE c1 IN ('abc');

--BETWEEN
SELECT t1 FROM pxf_hive_small_data WHERE dub1 BETWEEN 10 AND 15;

--IS NULL
SELECT t1 FROM pxf_hive_orc_types WHERE t2 IS NULL;
SELECT t1 FROM pxf_hive_orc_types WHERE dub1 IS NULL;
SELECT t1 FROM pxf_hive_orc_types WHERE b IS NULL;
SELECT t1 FROM pxf_hive_orc_types WHERE bin IS NULL;

--IS NOT NULL
SELECT t1 FROM pxf_hive_orc_types WHERE t2 IS NOT NULL;
SELECT t1 FROM pxf_hive_orc_types WHERE dub1 IS NOT NULL;
SELECT t1 FROM pxf_hive_orc_types WHERE b IS NOT NULL;
SELECT t1 FROM pxf_hive_orc_types WHERE bin IS NOT NULL;

--NOT
SELECT t1 FROM pxf_hive_small_data WHERE NOT (dub1 = 10);

--OR
SELECT t1 FROM pxf_hive_small_data WHERE dub1 = 10 OR num1 = 10;

--AND
SELECT t1 FROM pxf_hive_small_data WHERE dub1 = 12 AND num1 = 7;

--Complex logic expression, Var=Const, Const=Var, Const=Const, Var=Var
SELECT * FROM pxf_hive_small_data WHERE num1+5 = dub1;
SELECT * FROM pxf_hive_small_data WHERE num1+5 = dub1 AND 1=1;
SELECT * FROM pxf_hive_small_data WHERE num1 = 1 OR (t1 = 'row9' AND t2 = 's_14' AND num1 > 5);
SELECT * FROM pxf_hive_small_data WHERE num1 = 1 OR (t1 = 'row9' AND t2 = 's_14' AND num1 > 5 AND dub1 > 1) OR num1 = 2;
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



