Skip to content

Commit

Permalink
Update Hive query tests and golden files to 0.13
Browse files Browse the repository at this point in the history
  • Loading branch information
marmbrus committed Oct 24, 2014
1 parent 3a906c6 commit f044843
Show file tree
Hide file tree
Showing 8,142 changed files with 37,869 additions and 47,158 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
80 changes: 51 additions & 29 deletions sql/hive/src/test/resources/data/conf/hive-site.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@

<configuration>

<property>
<name>hive.in.test</name>
<value>true</value>
<description>Internal marker for test. Used for masking env-dependent values</description>
</property>

<!-- Hive Configuration can either be stored in this file or in the hadoop configuration files -->
<!-- that are implied by Hadoop setup variables. -->
<!-- Aside from Hadoop setup variables - this file is provided as a convenience so that Hive -->
Expand All @@ -28,7 +34,7 @@
<!-- Hive Execution Parameters -->
<property>
<name>hadoop.tmp.dir</name>
<value>${build.dir.hive}/test/hadoop-${user.name}</value>
<value>${test.tmp.dir}/hadoop-tmp</value>
<description>A base for other temporary directories.</description>
</property>

Expand All @@ -42,22 +48,27 @@

<property>
<name>hive.exec.scratchdir</name>
<value>${build.dir}/scratchdir</value>
<value>${test.tmp.dir}/scratchdir</value>
<description>Scratch space for Hive jobs</description>
</property>

<property>
<name>hive.exec.local.scratchdir</name>
<value>${build.dir}/localscratchdir/</value>
<value>${test.tmp.dir}/localscratchdir/</value>
<description>Local scratch space for Hive jobs</description>
</property>

<property>
<name>javax.jdo.option.ConnectionURL</name>
<!-- note: variable substituion not working here because it's loaded by jdo, not Hive -->
<value>jdbc:derby:;databaseName=../build/test/junit_metastore_db;create=true</value>
<value>jdbc:derby:;databaseName=${test.tmp.dir}/junit_metastore_db;create=true</value>
</property>

<property>
<name>hive.stats.dbconnectionstring</name>
<value>jdbc:derby:;databaseName=${test.tmp.dir}/TempStatsStore;create=true</value>
</property>


<property>
<name>javax.jdo.option.ConnectionDriverName</name>
<value>org.apache.derby.jdbc.EmbeddedDriver</value>
Expand All @@ -82,40 +93,27 @@

<property>
<name>hive.metastore.metadb.dir</name>
<value>file://${build.dir}/test/data/metadb/</value>
<value>file://${test.tmp.dir}/metadb/</value>
<description>
Required by metastore server or if the uris argument below is not supplied
</description>
</property>

<property>
<name>test.log.dir</name>
<value>${build.dir}/test/logs</value>
<description></description>
</property>

<property>
<name>test.src.dir</name>
<value>file://${build.dir}/src/test</value>
<value>${test.tmp.dir}/log/</value>
<description></description>
</property>

<property>
<name>test.data.files</name>
<value>${user.dir}/../data/files</value>
<description></description>
</property>

<property>
<name>test.query.file1</name>
<value>file://${user.dir}/../ql/src/test/org/apache/hadoop/hive/ql/input2.q</value>
<value></value>
<value>${hive.root}/data/files</value>
<description></description>
</property>

<property>
<name>hive.jar.path</name>
<value>${build.dir.hive}/ql/hive-exec-${version}.jar</value>
<value>${maven.local.repository}/org/apache/hive/hive-exec/${hive.version}/hive-exec-${hive.version}.jar</value>
<description></description>
</property>

Expand All @@ -127,7 +125,7 @@

<property>
<name>hive.querylog.location</name>
<value>${build.dir}/tmp</value>
<value>${test.tmp.dir}/tmp</value>
<description>Location of the structured hive logs</description>
</property>

Expand All @@ -143,18 +141,25 @@
<description>Post Execute Hook for Tests</description>
</property>

<property>
<name>hive.task.progress</name>
<value>false</value>
<description>Track progress of a task</description>
</property>

<property>
<name>hive.support.concurrency</name>
<value>true</value>
<description>Whether hive supports concurrency or not. A zookeeper instance must be up and running for the default hive lock manager to support read-write locks.</description>
</property>

<property>
<key>hive.unlock.numretries</key>
<value>2</value>
<description>The number of times you want to retry to do one unlock</description>
</property>

<property>
<key>hive.lock.sleep.between.retries</key>
<value>2</value>
<description>The sleep time (in seconds) between various retries</description>
</property>


<property>
<name>fs.pfile.impl</name>
<value>org.apache.hadoop.fs.ProxyLocalFileSystem</value>
Expand Down Expand Up @@ -194,4 +199,21 @@
<description>The default SerDe hive will use for the rcfile format</description>
</property>

<property>
<name>hive.stats.dbclass</name>
<value>jdbc:derby</value>
<description>The storage for temporary stats generated by tasks. Currently, jdbc, hbase and counter types are supported</description>
</property>

<property>
<name>hive.stats.key.prefix.reserve.length</name>
<value>0</value>
</property>

<property>
<name>hive.conf.restricted.list</name>
<value>dummy.config.value</value>
<description>Using dummy config value above because you cannot override config with empty value</description>
</property>

</configuration>
15 changes: 15 additions & 0 deletions sql/hive/src/test/resources/data/files/ProxyAuth.res
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
+-----+-------+
| id | name |
+-----+-------+
| 1 | aaa |
| 2 | bbb |
| 3 | ccc |
| 4 | ddd |
| 5 | eee |
+-----+-------+
+-------+-----+
| name | id |
+-------+-----+
| aaa | 1 |
| bbb | 2 |
+-------+-----+
2 changes: 2 additions & 0 deletions sql/hive/src/test/resources/data/files/alltypes.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
true|10|100|1000|10000|4.0|20.0|2.2222|1969-12-31 15:59:58.174|1970-01-01 00:00:00|hello|hello|k1:v1,k2:v2|100,200|{10, "foo"}
true|20|200|2000|20000|8.0|40.0|4.2222|1970-12-31 15:59:58.174|1971-01-01 00:00:00|||k3:v3,k4:v4|200,300|{20, "bar"}
2 changes: 2 additions & 0 deletions sql/hive/src/test/resources/data/files/alltypes2.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
true|10|100|1000|10000|4.0|20.0|4.2222|1969-12-31 15:59:58.174|1970-01-01|string|hello|hello|k1:v1,k2:v2|100,200|{10, "foo"}
false|20|200|2000|20000|8.0|40.0|2.2222|1970-12-31 15:59:58.174|1971-01-01|abcd|world|world|k3:v3,k4:v4|200,300|{20, "bar"}
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
47.3224 2923.29346
6 changes: 3 additions & 3 deletions sql/hive/src/test/resources/data/files/datatypes.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
\N\N\N\N\N\N\N\N\N\N\N\N\N\N\N\N\N\N\N\N\N
-1false-1.1\N\N\N-1-1-1.0-1\N\N\N\N\N\N\N
1true1.11121x2ykva92.2111.01abcd1111213142212212x1abcd22012-04-22 09:00:00.123456789123456789.0123456YWJjZA==2013-01-01abc123
\N\N\N\N\N\N\N\N\N\N\N\N\N\N\N\N\N\N\N\N\N\N
-1false-1.1\N\N\N-1-1-1.0-1\N\N\N\N\N\N\N\N
1true1.11121x2ykva92.2111.01abcd1111213142212212x1abcd22012-04-22 09:00:00.123456789123456789.0123456YWJjZA==2013-01-01abc123abc123X'01FF'
18 changes: 18 additions & 0 deletions sql/hive/src/test/resources/data/files/decimal.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
55.33
44.2
435.33
324.33
324.33
44.2
55.3
55.3
0.0

66.4
23.22
-87.2

33.44
55.3
435.331
-0.342
4 changes: 4 additions & 0 deletions sql/hive/src/test/resources/data/files/dept.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
31|sales
33|engineering
34|clerical
35|marketing
6 changes: 6 additions & 0 deletions sql/hive/src/test/resources/data/files/emp.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Rafferty|31
Jones|33
Steinberg|33
Robinson|34
Smith|34
John|
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"partitions":[],"table":"{\"1\":{\"str\":\"j1_41\"},\"2\":{\"str\":\"default\"},\"3\":{\"str\":\"johndee\"},\"4\":{\"i32\":1371900915},\"5\":{\"i32\":0},\"6\":{\"i32\":0},\"7\":{\"rec\":{\"1\":{\"lst\":[\"rec\",2,{\"1\":{\"str\":\"a\"},\"2\":{\"str\":\"string\"}},{\"1\":{\"str\":\"b\"},\"2\":{\"str\":\"int\"}}]},\"2\":{\"str\":\"hdfs://hivebase01:8020/user/hive/warehouse/j1_41\"},\"3\":{\"str\":\"org.apache.hadoop.mapred.TextInputFormat\"},\"4\":{\"str\":\"org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat\"},\"5\":{\"tf\":0},\"6\":{\"i32\":-1},\"7\":{\"rec\":{\"2\":{\"str\":\"org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe\"},\"3\":{\"map\":[\"str\",\"str\",2,{\"serialization.format\":\",\",\"field.delim\":\",\"}]}}},\"8\":{\"lst\":[\"str\",0]},\"9\":{\"lst\":[\"rec\",0]},\"10\":{\"map\":[\"str\",\"str\",0,{}]}}},\"8\":{\"lst\":[\"rec\",0]},\"9\":{\"map\":[\"str\",\"str\",1,{\"transient_lastDdlTime\":\"1371900931\"}]},\"12\":{\"str\":\"MANAGED_TABLE\"}}","version":"0.1"}
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
johndee,1
burks,2
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
12 jason
13 steven
15 joe
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
name message 0
steven hive 1
dave oozie 2
xifa phd 3
chuan hadoop 4
shanyu senior 5
footer1 footer1 0
footer2 0
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
name message 0
steven2 hive 11
dave2 oozie 12
xifa2 phd 13
chuan2 hadoop 14
shanyu2 senior 15
footer1 footer1 0
footer2 0
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
name message 0
david3 oozie 22
footer1 footer1 0
footer2 0
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
name message 0
steven hive 1
dave oozie 2
xifa phd 3
chuan hadoop 4
shanyu senior 5
footer1 footer1 0
footer2 0
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
name message 0
steven2 hive 11
dave2 oozie 12
xifa2 phd 13
chuan2 hadoop 14
shanyu2 senior 15
footer1 footer1 0
footer2 0
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
name message 0
david3 oozie 22
footer1 footer1 0
footer2 0
7 changes: 7 additions & 0 deletions sql/hive/src/test/resources/data/files/input.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
a b c d e f g
a b c d e f g
a b c d e f g
d e f g
a b c d
a e f g
a d g
Binary file not shown.
27 changes: 27 additions & 0 deletions sql/hive/src/test/resources/data/files/kv9.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
-4400 4400
1E+99 0
1E-99 0
0 0
10 10
23232.23435 2
2389432.23752 3
2389432.2375 4
10.73433 5
0.333 0
-0.3 0
-0.333 0
1.0 1
2 2
3.14 3
-1.12 -1
-1.122 -11
1.12 1
1.122 1
124.00 124
125.2 125
-1255.49 -1255
3.14 3
3.140 4
0.9999999999999999999999999 1
-1234567890.1234567890 -1234567890
1234567890.1234567800 1234567890
8 changes: 8 additions & 0 deletions sql/hive/src/test/resources/data/files/loc.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
OH|31|43201|2001
IO|32|43202|2001
CA|35|43809|2001
FL|33|54342|2001
UT|35||2001
CA|35|43809|2001
|34|40000|
FL|33|54342|2001
1 change: 1 addition & 0 deletions sql/hive/src/test/resources/data/files/non_ascii_tbl.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1|Garçu Kôkaku kidôtai
Loading

0 comments on commit f044843

Please sign in to comment.