aboutsummaryrefslogtreecommitdiff
path: root/exec/java-exec/src/test/resources/queries/tpch/04.sql
diff options
context:
space:
mode:
authorJacques Nadeau <jacques@apache.org>2014-03-18 10:48:45 -0700
committerJacques Nadeau <jacques@apache.org>2014-03-26 22:46:38 -0700
commit129cd775ad8e28e2c6629e774ce2f2049f173557 (patch)
treef4135c7a3281c3ad4fc7ec2bd3d4d7d94eb52699 /exec/java-exec/src/test/resources/queries/tpch/04.sql
parent721e7c25759eda2f12b17e15e4ca32ab16ec1e1c (diff)
- Add TPC-H Data as test dependency (automatically downloads from s3 on first execution)
- Update avg function to divide using double instead of integers - Update classpath file system to return correct size information (to allow cp use of Parquet files) - Enhance BaseTestQuery to support all query types (sql, physical logical) and execution from file - Add TPC-H queries updated to use TPC-H test data (disabled) - Update field name matching to be case insensitive. - Treat CHAR literals like VARCHAR in Optiq - Add clear as part of VectorUtil - Add hash aggregation physical plan executions using tpch data.
Diffstat (limited to 'exec/java-exec/src/test/resources/queries/tpch/04.sql')
-rw-r--r--exec/java-exec/src/test/resources/queries/tpch/04.sql24
1 files changed, 24 insertions, 0 deletions
diff --git a/exec/java-exec/src/test/resources/queries/tpch/04.sql b/exec/java-exec/src/test/resources/queries/tpch/04.sql
new file mode 100644
index 000000000..3c5957209
--- /dev/null
+++ b/exec/java-exec/src/test/resources/queries/tpch/04.sql
@@ -0,0 +1,24 @@
+-- tpch4 using 1395599672 as a seed to the RNG
+select
+ o_orderpriority,
+ count(*) as order_count
+from
+ cp.`tpch/orders.parquet`
+
+where
+-- o_orderdate >= date '1996-10-01'
+-- and o_orderdate < date '1996-10-01' + interval '3' month
+-- and
+ exists (
+ select
+ *
+ from
+ cp.`tpch/lineitem.parquet`
+ where
+ l_orderkey = o_orderkey
+ and l_commitdate < l_receiptdate
+ )
+group by
+ o_orderpriority
+order by
+ o_orderpriority;