Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
S
sbroad
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
core
sbroad
Commits
753b482e
Commit
753b482e
authored
9 months ago
by
Maksim Kaitmazian
Browse files
Options
Downloads
Patches
Plain Diff
feat: support substr function
parent
aced5eb3
No related branches found
No related tags found
1 merge request
!501
feat: support substr function
Pipeline
#48716
passed
7 months ago
Stage: build
Stage: test
Stage: stress-test
Stage: stress-test-processing
Changes
2
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
doc/sql/query.ebnf
+2
-0
2 additions, 0 deletions
doc/sql/query.ebnf
sbroad-core/src/executor/engine.rs
+1
-0
1 addition, 0 deletions
sbroad-core/src/executor/engine.rs
with
3 additions
and
0 deletions
doc/sql/query.ebnf
+
2
−
0
View file @
753b482e
...
...
@@ -27,6 +27,7 @@ expression ::= ('NOT'* (
| to_char
| to_date
| trim
| substr
| '(' expression ')'
| 'NOT'? 'EXISTS' '(' (query | values) ')'
| '(' (query | values) ')'
...
...
@@ -53,6 +54,7 @@ to_date ::= 'TO_DATE' '(' expression ',' format ')'
trim ::= 'TRIM' '('
((('LEADING' | 'TRAILING' | 'BOTH')? removal_chars
| ('LEADING' | 'TRAILING' | 'BOTH')) 'FROM')? string ')'
substr ::= 'SUBSTR' '(' string ',' from (',' count)? ')'
values ::= 'VALUES'
('(' (expression(',' expression)*) ')')
(',' ('(' (expression(',' expression)*) ')'))*
...
...
This diff is collapsed.
Click to expand it.
sbroad-core/src/executor/engine.rs
+
1
−
0
View file @
753b482e
...
...
@@ -77,6 +77,7 @@ pub fn get_builtin_functions() -> &'static [Function] {
vec!
[
Function
::
new_stable
(
"
\"
TO_DATE
\"
"
.into
(),
Type
::
Datetime
),
Function
::
new_stable
(
"
\"
TO_CHAR
\"
"
.into
(),
Type
::
String
),
Function
::
new_stable
(
"
\"
SUBSTR
\"
"
.into
(),
Type
::
String
),
]
})
}
...
...
This diff is collapsed.
Click to expand it.
Artur Sabirov
@a.sabirov
mentioned in merge request
docs!534 (merged)
·
7 months ago
mentioned in merge request
docs!534 (merged)
mentioned in merge request docs!534
Toggle commit list
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment