From a91465d6ae41223334be986f4e6fb7004870c2d1 Mon Sep 17 00:00:00 2001 From: Miguel Company Date: Wed, 4 Mar 2026 11:24:32 +0100 Subject: [PATCH 1/5] Refs #24181. Add properties in non-consolidated QoS. Signed-off-by: Miguel Company --- .../non_consolidated_qos.rst | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/docs/fastdds/property_policies/non_consolidated_qos.rst b/docs/fastdds/property_policies/non_consolidated_qos.rst index 2f05089bf..500d3d682 100644 --- a/docs/fastdds/property_policies/non_consolidated_qos.rst +++ b/docs/fastdds/property_policies/non_consolidated_qos.rst @@ -543,3 +543,28 @@ The following table lists all the optional QoS that can be serialized in the dis :start-after: SERIALIZE_OPTIONAL_QOS_PROPERTY<--> :end-before: <--> :lines: 2-4,6-17,19-20 + +.. _properties_sql_filter_factory: + +SQL Filter Factory settings +^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +The SQL Filter Factory is a component of *Fast DDS* that allows users to define custom filters for content-based filtering. +When creating a participant, some limits on the SQL expressions used for content-based filtering can be set using the following properties: + +.. list-table:: + :header-rows: 1 + :align: left + + * - PropertyPolicyQos name + - PropertyPolicyQos value + - Default value + * - ``"dds.sql.expression.max_expression_length"`` + - Maximum length of the SQL expression, in characters. + - ``16384`` + * - ``"dds.sql.expression.max_subexpressions"`` + - Maximum number of sub-expressions in the SQL expression. + - ``256`` + +Creating content-filtered topics with expressions exceeding any of these limits will fail. +Expressions received in discovery messages exceeding any of these limits will be ignored, and filtering will happen in the reader side. From 81ce232dc565808a130aa71e4aac97e26d2932ac Mon Sep 17 00:00:00 2001 From: Miguel Company Date: Wed, 4 Mar 2026 11:35:59 +0100 Subject: [PATCH 2/5] Refs #24181. Add example. Signed-off-by: Miguel Company --- code/DDSCodeTester.cpp | 13 +++++++++ code/XMLTester.xml | 28 +++++++++++++++++++ .../non_consolidated_qos.rst | 14 ++++++++++ 3 files changed, 55 insertions(+) diff --git a/code/DDSCodeTester.cpp b/code/DDSCodeTester.cpp index f86e9f9c2..cf472f97f 100644 --- a/code/DDSCodeTester.cpp +++ b/code/DDSCodeTester.cpp @@ -1033,6 +1033,19 @@ void dds_domain_examples() "true"); // true or True or TRUE or 1 //!-- } + + { + // DDS_SQL_LIMITS_PROPERTY + DomainParticipantQos pqos; + + pqos.properties().properties().emplace_back( + "dds.sql.expression.max_expression_length", + "20000"); + pqos.properties().properties().emplace_back( + "dds.sql.expression.max_subexpressions", + "10"); + //!-- + } } //DOMAINPARTICIPANTLISTENER-DISCOVERY-CALLBACKS diff --git a/code/XMLTester.xml b/code/XMLTester.xml index e3dd819c6..be156d0b7 100644 --- a/code/XMLTester.xml +++ b/code/XMLTester.xml @@ -3363,6 +3363,34 @@ --> <--> +DDS_SQL_LIMITS_PROPERTY<--> + + + + + + + dds.sql.expression.max_expression_length + 20000 + + + dds.sql.expression.max_subexpressions + 10 + + + + + + +<--> + FASTDDS_STATISTICS_MODULE<--> diff --git a/docs/fastdds/property_policies/non_consolidated_qos.rst b/docs/fastdds/property_policies/non_consolidated_qos.rst index 500d3d682..1a65a7ebe 100644 --- a/docs/fastdds/property_policies/non_consolidated_qos.rst +++ b/docs/fastdds/property_policies/non_consolidated_qos.rst @@ -568,3 +568,17 @@ When creating a participant, some limits on the SQL expressions used for content Creating content-filtered topics with expressions exceeding any of these limits will fail. Expressions received in discovery messages exceeding any of these limits will be ignored, and filtering will happen in the reader side. + +.. tab-set-code:: + + .. literalinclude:: /../code/DDSCodeTester.cpp + :language: c++ + :start-after: // DDS_SQL_LIMITS_PROPERTY + :end-before: //!-- + :dedent: 8 + + .. literalinclude:: /../code/XMLTester.xml + :language: xml + :start-after: DDS_SQL_LIMITS_PROPERTY<--> + :end-before: <--> + :lines: 2-4,6-21,23-24 From db877a880fbff11af21f864deea5891dfaf1573d Mon Sep 17 00:00:00 2001 From: Miguel Company Date: Wed, 4 Mar 2026 11:45:31 +0100 Subject: [PATCH 3/5] Refs #24181. Add link from the filtering section. Signed-off-by: Miguel Company --- .../dds_layer/topic/contentFilteredTopic/defaultFilter.rst | 1 + docs/fastdds/property_policies/non_consolidated_qos.rst | 7 +++---- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/fastdds/dds_layer/topic/contentFilteredTopic/defaultFilter.rst b/docs/fastdds/dds_layer/topic/contentFilteredTopic/defaultFilter.rst index e413a4727..3ff755963 100644 --- a/docs/fastdds/dds_layer/topic/contentFilteredTopic/defaultFilter.rst +++ b/docs/fastdds/dds_layer/topic/contentFilteredTopic/defaultFilter.rst @@ -9,6 +9,7 @@ The default SQL-like filter Filter expressions used by :ref:`dds_layer_topic_contentFilteredTopic` API may use a subset of SQL syntax, extended with the possibility to use program variables in the SQL expression. This section shows this default SQL-like syntax and how to use it. +Some limits on the filter expressions can be set when the participant is created, as explained in :ref:`properties_sql_filter_expression_limits`. * :ref:`default_sql_filter_grammar` * :ref:`default_sql_filter_like` diff --git a/docs/fastdds/property_policies/non_consolidated_qos.rst b/docs/fastdds/property_policies/non_consolidated_qos.rst index 1a65a7ebe..a193306cc 100644 --- a/docs/fastdds/property_policies/non_consolidated_qos.rst +++ b/docs/fastdds/property_policies/non_consolidated_qos.rst @@ -544,12 +544,11 @@ The following table lists all the optional QoS that can be serialized in the dis :end-before: <--> :lines: 2-4,6-17,19-20 -.. _properties_sql_filter_factory: +.. _properties_sql_filter_expression_limits: -SQL Filter Factory settings -^^^^^^^^^^^^^^^^^^^^^^^^^^^ +SQL Filter Expression limits +^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -The SQL Filter Factory is a component of *Fast DDS* that allows users to define custom filters for content-based filtering. When creating a participant, some limits on the SQL expressions used for content-based filtering can be set using the following properties: .. list-table:: From ca74ff16bb17f51f566957c4ec3f44f343fc3923 Mon Sep 17 00:00:00 2001 From: Miguel Company Date: Wed, 4 Mar 2026 12:38:24 +0100 Subject: [PATCH 4/5] Refs #24181. Fix doc8. Signed-off-by: Miguel Company --- .../dds_layer/topic/contentFilteredTopic/defaultFilter.rst | 3 ++- docs/fastdds/property_policies/non_consolidated_qos.rst | 6 ++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/docs/fastdds/dds_layer/topic/contentFilteredTopic/defaultFilter.rst b/docs/fastdds/dds_layer/topic/contentFilteredTopic/defaultFilter.rst index 3ff755963..517634633 100644 --- a/docs/fastdds/dds_layer/topic/contentFilteredTopic/defaultFilter.rst +++ b/docs/fastdds/dds_layer/topic/contentFilteredTopic/defaultFilter.rst @@ -9,7 +9,8 @@ The default SQL-like filter Filter expressions used by :ref:`dds_layer_topic_contentFilteredTopic` API may use a subset of SQL syntax, extended with the possibility to use program variables in the SQL expression. This section shows this default SQL-like syntax and how to use it. -Some limits on the filter expressions can be set when the participant is created, as explained in :ref:`properties_sql_filter_expression_limits`. +Some limits on the filter expressions can be set when the participant is created, as explained in +:ref:`properties_sql_filter_expression_limits`. * :ref:`default_sql_filter_grammar` * :ref:`default_sql_filter_like` diff --git a/docs/fastdds/property_policies/non_consolidated_qos.rst b/docs/fastdds/property_policies/non_consolidated_qos.rst index a193306cc..3d760e4fe 100644 --- a/docs/fastdds/property_policies/non_consolidated_qos.rst +++ b/docs/fastdds/property_policies/non_consolidated_qos.rst @@ -549,7 +549,8 @@ The following table lists all the optional QoS that can be serialized in the dis SQL Filter Expression limits ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -When creating a participant, some limits on the SQL expressions used for content-based filtering can be set using the following properties: +When creating a participant, some limits on the SQL expressions used for content-based filtering can be set using the +following properties: .. list-table:: :header-rows: 1 @@ -566,7 +567,8 @@ When creating a participant, some limits on the SQL expressions used for content - ``256`` Creating content-filtered topics with expressions exceeding any of these limits will fail. -Expressions received in discovery messages exceeding any of these limits will be ignored, and filtering will happen in the reader side. +Expressions received in discovery messages exceeding any of these limits will be ignored, and filtering will happen +in the reader side. .. tab-set-code:: From 2bab03628dd092c8d41222fe048e90990f46e595 Mon Sep 17 00:00:00 2001 From: Miguel Company Date: Mon, 9 Mar 2026 11:19:01 +0100 Subject: [PATCH 5/5] Refs #24181. Apply suggestions. Signed-off-by: Miguel Company --- .../dds_layer/topic/contentFilteredTopic/defaultFilter.rst | 3 ++- docs/fastdds/property_policies/non_consolidated_qos.rst | 7 +++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/docs/fastdds/dds_layer/topic/contentFilteredTopic/defaultFilter.rst b/docs/fastdds/dds_layer/topic/contentFilteredTopic/defaultFilter.rst index 517634633..317eeb236 100644 --- a/docs/fastdds/dds_layer/topic/contentFilteredTopic/defaultFilter.rst +++ b/docs/fastdds/dds_layer/topic/contentFilteredTopic/defaultFilter.rst @@ -9,7 +9,8 @@ The default SQL-like filter Filter expressions used by :ref:`dds_layer_topic_contentFilteredTopic` API may use a subset of SQL syntax, extended with the possibility to use program variables in the SQL expression. This section shows this default SQL-like syntax and how to use it. -Some limits on the filter expressions can be set when the participant is created, as explained in +Apart from the syntax described in this section, certain restrictions apply to the allowed SQL expressions. +These restrictions can be relaxed or tightened by the user, as explained in :ref:`properties_sql_filter_expression_limits`. * :ref:`default_sql_filter_grammar` diff --git a/docs/fastdds/property_policies/non_consolidated_qos.rst b/docs/fastdds/property_policies/non_consolidated_qos.rst index 3d760e4fe..0c8e55a0f 100644 --- a/docs/fastdds/property_policies/non_consolidated_qos.rst +++ b/docs/fastdds/property_policies/non_consolidated_qos.rst @@ -549,8 +549,11 @@ The following table lists all the optional QoS that can be serialized in the dis SQL Filter Expression limits ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -When creating a participant, some limits on the SQL expressions used for content-based filtering can be set using the -following properties: +When creating content-filtered topics using the +:ref:`default SQL-like filter `, some restrictions apply to the +SQL expressions that can be used for content-based filtering. +The default limits are set to values that should be enough for most use cases, but they can be customized using the +following properties when a participant is created: .. list-table:: :header-rows: 1