amplab/shark — pull request #153 by apivovarov (2013-09-09 06:12:11+00:00)
Title: SHARK-138: JoinOperator outputs result of standard objects

We found that his fix solved the problem with the following situation

to reproduce the situation:

open shark
create table ta (f1 string, ts timestamp) ROW FORMAT DELIMITED FIELDS TERMINATED BY ',';
create table tb (f1 string, f2 string) ROW FORMAT DELIMITED FIELDS TERMINATED BY ',';
exit;

$ vi ta
1,2013-09-05 13:14:30.300
2,2013-09-05 13:14:30.300
3,2013-09-05 11:11:10.100
4,2013-09-05 11:11:10.100

$ vi tb
1,10
2,10
3,10
4,10
1,20
2,20
3,20
4,20

hadoop fs -put ta /user/hive/warehouse/ta/
hadoop fs -put tb /user/hive/warehouse/tb/

open shark and run select query below

select
ta.ts
FROM
ta JOIN tb ON (ta.f1=tb.f1)
where
tb.f2 = '10';

output for me is
1971-03-02 08:07:26
1971-03-02 08:07:26
1971-03-02 08:07:02
1971-03-02 08:07:02

after the fix output is
2013-09-05 11:11:10.1
2013-09-05 11:11:10.1
2013-09-05 13:14:30.3
2013-09-05 13:14:30.3