Skip to content

Commit

Permalink
SPARK-2407: Added Parser of SQL SUBSTR() apache#1442
Browse files Browse the repository at this point in the history
  • Loading branch information
chutium committed Jul 17, 2014
1 parent 06e933b commit 9a60ccf
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,15 @@ class SQLQuerySuite extends QueryTest {
"test")
}

test("SPARK-2407 Added Parser of SQL SUBSTR()") {
checkAnswer(
sql("SELECT substr(tableName, 1, 2) FROM tableName"),
"te")
checkAnswer(
sql("SELECT substr(tableName, 3) FROM tableName"),
"st")
}

test("index into array") {
checkAnswer(
sql("SELECT data, data[0], data[0] + data[1], data[0 + 1] FROM arrayData"),
Expand Down

0 comments on commit 9a60ccf

Please sign in to comment.