Open jrw972 opened 1 month ago
Spec issue is https://issues.omg.org/browse/DDS15-319
I'm wondering about
Annex B implies (clarification is needed) that an expression parameter corresponds to the Parameter non-terminal
The spec uses the term "parameter" in a few different ways. It's clear to me that what it calls the "token" PARAMETER (all-caps) is a distinct entity from the non-terminal Parameter. The reader of the spec should not assume that the data passed to the set_expression_parameters DDS API (and its equivalents) follow any part of this grammar. In fact, the start of section B.1 makes this explicit:
A subset of SQL syntax is used in several parts of the specification:
• The filter_expression in the ContentFilteredTopic (see 2.2.2.3.3, ContentFilteredTopic Class).
• The topic_expression in the MultiTopic (see 2.2.2.3.4, MultiTopic Class [optional]).
• The query_expression in the QueryReadCondition (see 2.2.2.5.9, QueryCondition Class).
Executable's name
Reproducing the problem
What is the problem?
Suggestions about why this problem exists
The filter expression and expression parameter offered by the various subscribers is thus:
In the case of opendds as publisher and connext as subscriber, opendds does not support a
MATCH
operator so it performs no publisher-side content filtering, i.e., all samples are sent to the subscriber which then would filter again. This is interoperable but probably not what is intended. The reverse case succeeds.In the case of opendds as publisher and eprosima as subscriber, the difference in quoting the parameter causes failure. The reverse case succeeds.
opendds and coredx agree on the expression and expression parameter so both directions succeed.
I did not test other vendor combinations.
I suggest that the filter expression always be
color = %0
.Expression parameters are defined in 2.2.2.3.3 and 2.2.2.3.4 as
Annex B implies (clarification is needed) that an expression parameter corresponds to the
Parameter
non-terminal which can be either anINTEGERVALUE
,CHARVALUE
,FLOATVALUE
,STRING
,ENUMERATEDVALUE
, orPARAMETER
. Logically,PARAMETER
is excepted as the goal of a expression parameter is to supply a value forPARAMETER
that appears in an expression as quoted above. As it relates to the issue at hand,CHARVALUE
andSTRING
require single quotes as delimiters. This makes sense and is necessary when they appear in an expression. However, expression parameters are conveyed through string sequences so the use of delimiters is superfluous. Furthermore, it prevents using the single quote in an expression parameter. I suggest that expression parameters not be quoted and DDS Specification be clarified on this point. Thus, for this test, the expression parameter would beBLUE
.Other comments