Skip to content

Commit

Permalink
Fix comparison documentation for BETWEEN and NULL
Browse files Browse the repository at this point in the history
  • Loading branch information
pajaks authored and ebyhr committed Apr 20, 2023
1 parent 32bfda6 commit 493dcb8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -396,6 +396,8 @@ public void testBetween()
assertOptimizedEquals("NULL BETWEEN 2 AND 4", "NULL");
assertOptimizedEquals("3 BETWEEN NULL AND 4", "NULL");
assertOptimizedEquals("3 BETWEEN 2 AND NULL", "NULL");
assertOptimizedEquals("2 BETWEEN 3 AND NULL", "false");
assertOptimizedEquals("8 BETWEEN NULL AND 6", "false");

assertOptimizedEquals("'cc' BETWEEN 'b' AND 'd'", "true");
assertOptimizedEquals("'b' BETWEEN 'cc' AND 'd'", "false");
Expand Down
2 changes: 1 addition & 1 deletion docs/src/main/sphinx/functions/comparison.rst
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ expression above::

SELECT 2 BETWEEN NULL AND 6; -- null

SELECT 2 BETWEEN 1 AND NULL; -- false
SELECT 2 BETWEEN 3 AND NULL; -- false

SELECT 8 BETWEEN NULL AND 6; -- false

Expand Down

0 comments on commit 493dcb8

Please sign in to comment.