-
Notifications
You must be signed in to change notification settings - Fork 610
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
support StartsWith predicates for pg types
- Loading branch information
Showing
10 changed files
with
220 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,6 +10,7 @@ SRCS( | |
|
||
PEERDIR( | ||
ydb/library/yql/core/services | ||
ydb/library/yql/core/type_ann | ||
) | ||
|
||
YQL_LAST_ABI_VERSION() | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
ydb/library/yql/tests/sql/suites/compute_range/pg_startswith.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
/* syntax version 1 */ | ||
/* postgres can not */ | ||
/* dq can not */ | ||
/* dqfile can not */ | ||
/* yt can not */ | ||
pragma warning("disable", "4510"); | ||
pragma warning("disable", "1108"); | ||
|
||
-- like 'aaaa' | ||
select YQL::RangeComputeFor( | ||
Struct<a:PgInt4,b:PgText>, | ||
($row) -> (StartsWith(FromPg($row.b), 'aaaa') ?? false), | ||
AsTuple(AsAtom("b")) | ||
); | ||
|
||
-- not like 'aaaa' | ||
select YQL::RangeComputeFor( | ||
Struct<a:PgInt4,b:PgText>, | ||
($row) -> (not (StartsWith(FromPg($row.b), 'aaaa') ?? true)), | ||
AsTuple(AsAtom("b")) | ||
); | ||
|
||
|
||
-- like <invalid utf8> | ||
select YQL::RangeComputeFor( | ||
Struct<a:PgInt4,b:PgText>, | ||
($row) -> (StartsWith(FromPg($row.b), 'a\xf5') ?? false), | ||
AsTuple(AsAtom("b")) | ||
); | ||
|
||
-- not like <invalid utf8> | ||
select YQL::RangeComputeFor( | ||
Struct<a:PgInt4,b:PgText>, | ||
($row) -> (not (StartsWith(FromPg($row.b), 'a\xf5') ?? true)), | ||
AsTuple(AsAtom("b")) | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters