-
Notifications
You must be signed in to change notification settings - Fork 94
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Handle comparison operators containing whitespace (#2203)
2-character comparison operators may contain whitespace (e.g. ! =, < >, but Babelfish does not currently support this. Also, Babelfish does not support the !< and !> operators. This fix addresses both issues by rewriting the ANTLR input stream. Signed-off-by: Rob Verschoor [email protected] Issues Resolved BABEL-3379 Babelfish doesn't strip out white space for comparison operators BABEL-4114 Support comparison operators !< and !>
- Loading branch information
1 parent
56c5545
commit 4fc74b9
Showing
8 changed files
with
508 additions
and
3 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
drop procedure p1_operator_whitespace | ||
go | ||
|
||
drop view v1_operator_whitespace | ||
go | ||
|
||
drop table t1_operator_whitespace | ||
go |
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,31 @@ | ||
create table t1_operator_whitespace(a int) | ||
go | ||
|
||
create view v1_operator_whitespace as | ||
select c1=1, c2=a from t1_operator_whitespace where a = case when a! >2 then a else 0 end | ||
go | ||
|
||
|
||
create procedure p1_operator_whitespace | ||
as | ||
select a as p1 from t1_operator_whitespace where a ! = 2 | ||
select a as p2 from t1_operator_whitespace where a ! =2 | ||
select a as q3 from t1_operator_whitespace where a ! | ||
|
||
|
||
= 2 | ||
select a as p4 from t1_operator_whitespace where a < >2 | ||
select a as p5 from t1_operator_whitespace where a < = 2 | ||
select a as p6 from t1_operator_whitespace where a > =2 | ||
select a as p7 from t1_operator_whitespace where a!<2 | ||
select a as p8 from t1_operator_whitespace where a !< 2 | ||
select a as p9 from t1_operator_whitespace where a ! < 2 | ||
select a as p10 from t1_operator_whitespace where a! <2 | ||
select a as p11 from t1_operator_whitespace where a !> 2 | ||
select a as p12 from t1_operator_whitespace where a!>2 | ||
select a as p13 from t1_operator_whitespace where a ! > 2 | ||
select a as p14 from t1_operator_whitespace where a! >2 | ||
select a as q15 from t1_operator_whitespace where a = case when a! >2 then a else 0 end | ||
EXECUTE('select a as p16 from t1_operator_whitespace where a ! = 2') | ||
EXECUTE('select a as p17 from t1_operator_whitespace where a ! < 2') | ||
go |
Oops, something went wrong.