Skip to content

Commit

Permalink
Merge pull request #1710 from tangwz/support_substring
Browse files Browse the repository at this point in the history
[deps]bump sqlparser-rs, support substring(string, start, length) syntax
  • Loading branch information
databend-bot authored Sep 3, 2021
2 parents 163821c + e1f6376 commit bc564a4
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion common/exception/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ tonic = "0.5.2"
prost = "0.8.0"

# Github dependencies
sqlparser = { git = "https://github.com/datafuse-extras/sqlparser-rs", rev = "2535347" }
sqlparser = { git = "https://github.com/datafuse-extras/sqlparser-rs", rev = "77f6ae5" }
2 changes: 1 addition & 1 deletion query/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ common-metatypes = { path = "../common/metatypes" }
# Github dependencies
msql-srv = { git = "https://github.com/datafuse-extras/msql-srv", rev = "cc53408" }
clickhouse-rs = { git = "https://github.com/datafuse-extras/clickhouse-rs", rev = "c4743a9" }
sqlparser = { git = "https://github.com/datafuse-extras/sqlparser-rs", rev = "2535347" }
sqlparser = { git = "https://github.com/datafuse-extras/sqlparser-rs", rev = "77f6ae5" }

# Crates.io dependencies
clickhouse-srv = "0.3.1"
Expand Down
3 changes: 3 additions & 0 deletions tests/suites/0_stateless/02_0005_function_substring.result
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,6 @@ bc
bcde
ab
cde
bc
bcde
cde
5 changes: 4 additions & 1 deletion tests/suites/0_stateless/02_0005_function_substring.sql
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
select subString('abcde' from 2 for 2);
select subString('abcde' from 2);
select subString('abcde' for 2);
select subString('abcde' from -3 for 3);
select subString('abcde' from -3 for 3);
select subString('abcde', 2, 2);
select subString('abcde', 2);
select subString('abcde', -3, 3);

0 comments on commit bc564a4

Please sign in to comment.