Skip to content

Commit

Permalink
Updated Comments on top of the Test cases and added multi Character T…
Browse files Browse the repository at this point in the history
…ests for SQL Strings
  • Loading branch information
DerSchmidt committed Jan 16, 2025
1 parent f86b9e2 commit 2635ae1
Show file tree
Hide file tree
Showing 12 changed files with 42 additions and 8 deletions.
2 changes: 1 addition & 1 deletion test/api/cli/sql/SQLTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ MAKE_TEST_CASE("select_asterisk", 6)

MAKE_TEST_CASE("distinct", 4)

MAKE_TEST_CASE("strings", 3)
MAKE_TEST_CASE("strings", 5)

MAKE_TEST_CASE("between", 4)
// TODO Use the scripts testing failure cases.
2 changes: 1 addition & 1 deletion test/api/cli/sql/between_1.daphne
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Aggregation with avg without group clause.
# BETWEEN clause test with Strings as attributes

f = createFrame(
[ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9],
Expand Down
2 changes: 1 addition & 1 deletion test/api/cli/sql/between_2.daphne
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Aggregation with avg without group clause.
# BETWEEN clause test with Integers as attribute

f = createFrame(
[ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9],
Expand Down
2 changes: 1 addition & 1 deletion test/api/cli/sql/between_3.daphne
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Aggregation with avg without group clause.
# Multiple BETWEEN clause test

f = createFrame(
[ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9],
Expand Down
2 changes: 1 addition & 1 deletion test/api/cli/sql/between_4.daphne
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Aggregation with avg without group clause.
# BETWEEN clause test with following AND from the WHERE clause

f = createFrame(
[ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9],
Expand Down
2 changes: 1 addition & 1 deletion test/api/cli/sql/strings_1.daphne
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Aggregation with avg without group clause.
# String for SQL test using equality

f = createFrame(
[ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9],
Expand Down
2 changes: 1 addition & 1 deletion test/api/cli/sql/strings_2.daphne
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Aggregation with avg without group clause.
# String for SQL test using greater than comparision

f = createFrame(
[ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9],
Expand Down
2 changes: 1 addition & 1 deletion test/api/cli/sql/strings_3.daphne
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Aggregation with avg without group clause.
# String for SQL test using unequal and escaped double quotes

f = createFrame(
[ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9],
Expand Down
12 changes: 12 additions & 0 deletions test/api/cli/sql/strings_4.daphne
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# String for SQL test using equality and multi character Strings

f = createFrame(
[ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9],
[ "Europe", "America", "Africa", "Asia", "Europe", "a", "Oceania", "Europe", "Asia", "Antarctica"],
"a", "b");

registerView("f", f);

res = sql("SELECT f.a, f.b FROM f WHERE f.b = 'Europe';");

print(res);
4 changes: 4 additions & 0 deletions test/api/cli/sql/strings_4.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Frame(3x2, [f.a:int64_t, f.b:std::string])
0 Europe
4 Europe
7 Europe
12 changes: 12 additions & 0 deletions test/api/cli/sql/strings_5.daphne
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# String for SQL test using greater equal and multi character Strings

f = createFrame(
[ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9],
[ "Europe", "America", "Africa", "Asia", "Europe", "a", "Oceania", "Europe", "Asia", "Antarctica"],
"a", "b");

registerView("f", f);

res = sql("SELECT f.a, f.b FROM f WHERE f.b >= 'Europe';");

print(res);
6 changes: 6 additions & 0 deletions test/api/cli/sql/strings_5.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Frame(5x2, [f.a:int64_t, f.b:std::string])
0 Europe
4 Europe
5 a
6 Oceania
7 Europe

0 comments on commit 2635ae1

Please sign in to comment.