File tree Expand file tree Collapse file tree 3 files changed +20
-2
lines changed
main/scala/shark/execution Expand file tree Collapse file tree 3 files changed +20
-2
lines changed Original file line number Diff line number Diff line change
1
+ 1 012
2
+ 2 345
3
+ 3 678
Original file line number Diff line number Diff line change @@ -27,8 +27,7 @@ import org.apache.hadoop.hive.conf.HiveConf
27
27
import org .apache .hadoop .hive .ql .exec .{JoinOperator => HiveJoinOperator }
28
28
import org .apache .hadoop .hive .ql .plan .{JoinDesc , TableDesc }
29
29
import org .apache .hadoop .hive .serde2 .{Deserializer , Serializer , SerDeUtils }
30
- import org .apache .hadoop .hive .serde2 .objectinspector .ObjectInspectorUtils
31
- import org .apache .hadoop .hive .serde2 .objectinspector .StandardStructObjectInspector
30
+ import org .apache .hadoop .hive .serde2 .objectinspector .{ObjectInspectorUtils , StandardStructObjectInspector }
32
31
import org .apache .hadoop .io .BytesWritable
33
32
34
33
import shark .execution .serialization .OperatorSerializationWrapper
Original file line number Diff line number Diff line change @@ -73,6 +73,14 @@ class SQLSuite extends FunSuite with BeforeAndAfterAll {
73
73
OVERWRITE INTO TABLE users""" )
74
74
sc.sql(" drop table if exists users_cached" )
75
75
sc.sql(" create table users_cached as select * from users" )
76
+
77
+ // test1
78
+ sc.sql(" drop table if exists test1" )
79
+ sc.sql(""" CREATE TABLE test1 (id INT, test1val ARRAY<INT>)
80
+ row format delimited fields terminated by '\t'""" )
81
+ sc.sql(" LOAD DATA LOCAL INPATH '${hiveconf:shark.test.data.path}/test1.txt' INTO TABLE test1" )
82
+ sc.sql(" drop table if exists test1_cached" )
83
+ sc.sql(" CREATE TABLE test1_cached AS SELECT * FROM test1" )
76
84
}
77
85
78
86
override def afterAll () {
@@ -141,6 +149,14 @@ class SQLSuite extends FunSuite with BeforeAndAfterAll {
141
149
" val_98\t 196" )
142
150
}
143
151
152
+ // ////////////////////////////////////////////////////////////////////////////
153
+ // join
154
+ // ////////////////////////////////////////////////////////////////////////////
155
+ test(" join ouput rows of stand objects" ) {
156
+ expect(" select test1val from users join test1 on users.id=test1.id and users.id=1" ,
157
+ " [0,1,2]" )
158
+ }
159
+
144
160
// ////////////////////////////////////////////////////////////////////////////
145
161
// map join
146
162
// ////////////////////////////////////////////////////////////////////////////
You can’t perform that action at this time.
0 commit comments