Skip to content
This repository has been archived by the owner on Aug 23, 2021. It is now read-only.

Commit

Permalink
Temporary fix for Cubrid('Interval' syntax)
Browse files Browse the repository at this point in the history
  • Loading branch information
Yuchen Deng committed Dec 14, 2017
1 parent 42c9e96 commit 82bc2a2
Show file tree
Hide file tree
Showing 9 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/com/oltpbenchmark/benchmarks/tpch/queries/Q1.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public class Q1 extends GenericQuery {
+ "from "
+ "lineitem "
+ "where "
+ "l_shipdate <= date '1998-12-01' - interval '95' day "
+ "l_shipdate <= ADDDATE('1998-12-01', interval -'95' day) "
+ "group by "
+ "l_returnflag, "
+ "l_linestatus "
Expand Down
2 changes: 1 addition & 1 deletion src/com/oltpbenchmark/benchmarks/tpch/queries/Q10.java
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public class Q10 extends GenericQuery {
+ "c_custkey = o_custkey "
+ "and l_orderkey = o_orderkey "
+ "and o_orderdate >= date '1994-12-01' "
+ "and o_orderdate < date '1994-12-01' + interval '3' month "
+ "and o_orderdate < ADDDATE('1994-12-01' , interval '3' month) "
+ "and l_returnflag = 'R' "
+ "and c_nationkey = n_nationkey "
+ "group by "
Expand Down
2 changes: 1 addition & 1 deletion src/com/oltpbenchmark/benchmarks/tpch/queries/Q12.java
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public class Q12 extends GenericQuery {
+ "and l_commitdate < l_receiptdate "
+ "and l_shipdate < l_commitdate "
+ "and l_receiptdate >= date '1997-01-01' "
+ "and l_receiptdate < date '1997-01-01' + interval '1' year "
+ "and l_receiptdate < ADDDATE( '1997-01-01' , interval '1' year)"
+ "group by "
+ "l_shipmode "
+ "order by "
Expand Down
2 changes: 1 addition & 1 deletion src/com/oltpbenchmark/benchmarks/tpch/queries/Q14.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public class Q14 extends GenericQuery {
+ "where "
+ "l_partkey = p_partkey "
+ "and l_shipdate >= date '1997-04-01' "
+ "and l_shipdate < date '1997-04-01' + interval '1' month"
+ "and l_shipdate < ADDDATE( '1997-04-01' , interval '1' month)"
);

protected SQLStmt get_query() {
Expand Down
2 changes: 1 addition & 1 deletion src/com/oltpbenchmark/benchmarks/tpch/queries/Q15.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public class Q15 extends GenericQuery {
+ "lineitem "
+ "where "
+ "l_shipdate >= date '1997-03-01' "
+ "and l_shipdate < date '1997-03-01' + interval '3' month "
+ "and l_shipdate < ADDDATE('1997-03-01' , interval '3' month) "
+ "group by "
+ "l_suppkey"
);
Expand Down
2 changes: 1 addition & 1 deletion src/com/oltpbenchmark/benchmarks/tpch/queries/Q20.java
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public class Q20 extends GenericQuery {
+ "l_partkey = ps_partkey "
+ "and l_suppkey = ps_suppkey "
+ "and l_shipdate >= date '1997-01-01' "
+ "and l_shipdate < date '1997-01-01' + interval '1' year "
+ "and l_shipdate < ADDDATE( '1997-01-01', interval '1' year) "
+ ") "
+ ") "
+ "and s_nationkey = n_nationkey "
Expand Down
2 changes: 1 addition & 1 deletion src/com/oltpbenchmark/benchmarks/tpch/queries/Q4.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public class Q4 extends GenericQuery {
+ "orders "
+ "where "
+ "o_orderdate >= date '1994-08-01' "
+ "and o_orderdate < date '1994-08-01' + interval '3' month "
+ "and o_orderdate < ADDDATE ('1994-08-01', interval '3' month) "
+ "and exists ( "
+ "select "
+ "* "
Expand Down
2 changes: 1 addition & 1 deletion src/com/oltpbenchmark/benchmarks/tpch/queries/Q5.java
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public class Q5 extends GenericQuery {
+ "and n_regionkey = r_regionkey "
+ "and r_name = 'AFRICA' "
+ "and o_orderdate >= date '1997-01-01' "
+ "and o_orderdate < date '1997-01-01' + interval '1' year "
+ "and o_orderdate < ADDDATE( '1997-01-01' + interval '1' year) "
+ "group by "
+ "n_name "
+ "order by "
Expand Down
2 changes: 1 addition & 1 deletion src/com/oltpbenchmark/benchmarks/tpch/queries/Q6.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public class Q6 extends GenericQuery {
+ "lineitem "
+ "where "
+ "l_shipdate >= date '1997-01-01' "
+ "and l_shipdate < date '1997-01-01' + interval '1' year "
+ "and l_shipdate < ADDDATE('1997-01-01' , interval '1' year)"
+ "and l_discount between 0.07 - 0.01 and 0.07 + 0.01 "
+ "and l_quantity < 24"
);
Expand Down

0 comments on commit 82bc2a2

Please sign in to comment.