Skip to content

Commit

Permalink
test: add like function
Browse files Browse the repository at this point in the history
  • Loading branch information
richtia committed May 9, 2023
1 parent af9a19a commit 25a1712
Show file tree
Hide file tree
Showing 4 changed files with 66 additions and 0 deletions.
60 changes: 60 additions & 0 deletions cases/string/like.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
function: like
cases:
- group:
id: basic
description: Basic examples without any special cases
args:
- value: 'abcdefg'
type: string
- value: 'abcdefg'
type: string
result:
value: true
type: boolean
- group: basic
args:
- value: 'abcdefg'
type: string
- value: 'abc'
type: string
result:
value: false
type: boolean
- group:
id: wildcard
description: Examples using wildcards
args:
- value: 'abcdefg'
type: string
- value: 'abc%'
type: string
result:
value: true
type: boolean
- group: wildcard
args:
- value: 'abcdefg'
type: string
- value: '%efg'
type: string
result:
value: true
type: boolean
- group: wildcard
args:
- value: 'abcdefg'
type: string
- value: '_bcdefg'
type: string
result:
value: true
type: boolean
- group: wildcard
args:
- value: 'abcdefg'
type: string
- value: 'abc_efg'
type: string
result:
value: true
type: boolean
2 changes: 2 additions & 0 deletions dialects/postgres.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,3 +60,5 @@ scalar_functions:
- name: concat
local_name: "||"
infix: True
- name: like
infix: True
2 changes: 2 additions & 0 deletions dialects/sqlite.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,5 @@ scalar_functions:
- name: concat
local_name: "||"
infix: True
- name: like
infix: True
2 changes: 2 additions & 0 deletions dialects/velox_presto.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -68,3 +68,5 @@ scalar_functions:
- name: concat
local_name: concat
infix: False
- name: like
infix: True

0 comments on commit 25a1712

Please sign in to comment.