Skip to content

Commit 67a9519

Browse files
committed
Allow only upper case operator names
Allow only upper case predefined selector literals and operator names. The JMS spec states: > Predefined selector literals and operator names are written here in upper case; however, they are case insensitive. However, the AMQP SQL spec does not include such a statement. The EBNF notation with single quotes ('AND') typically implies exact literal matching. This commit follows the AMQP SQL's EBNF notation and therefore disallows lower case predefined selector literals or operator names.
1 parent 2da705d commit 67a9519

File tree

5 files changed

+79
-231
lines changed

5 files changed

+79
-231
lines changed

deps/rabbit/src/rabbit_amqp_sql_ast.erl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ has_binary_identifier_test() ->
7777
false = has_binary_identifier("properties.group-sequence * 10 < 100"),
7878
false = has_binary_identifier("properties.creation-time >= 12345 OR properties.subject = 'test'"),
7979
true = has_binary_identifier("user_key = 'g1' AND header.priority > 5"),
80-
true = has_binary_identifier("header.priority > 5 and user_key = 'g1'"),
80+
true = has_binary_identifier("header.priority > 5 AND user_key = 'g1'"),
8181
true = has_binary_identifier("custom_metric * 10 < 100"),
8282
true = has_binary_identifier("properties.creation-time >= 12345 OR user_data = 'test'"),
8383

0 commit comments

Comments
 (0)