Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions code/DDSCodeTester.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
28 changes: 28 additions & 0 deletions code/XMLTester.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3363,6 +3363,34 @@
-->
<!--><-->

<!-->DDS_SQL_LIMITS_PROPERTY<-->
<!--
<?xml version="1.0" encoding="UTF-8" ?>
<dds xmlns="http://www.eprosima.com">
<profiles>
-->
<participant profile_name="custom_sql_limits_domainparticipant_xml_profile">
<rtps>
<propertiesPolicy>
<properties>
<property>
<name>dds.sql.expression.max_expression_length</name>
<value>20000</value>
</property>
<property>
<name>dds.sql.expression.max_subexpressions</name>
<value>10</value>
</property>
</properties>
</propertiesPolicy>
</rtps>
</participant>
<!--
</profiles>
</dds>
-->
<!--><-->

<!-->FASTDDS_STATISTICS_MODULE<-->
<participant profile_name="statistics_domainparticipant_conf_xml_profile">
<rtps>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +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`.
Comment thread
richiware marked this conversation as resolved.
Outdated

* :ref:`default_sql_filter_grammar`
* :ref:`default_sql_filter_like`
Expand Down
40 changes: 40 additions & 0 deletions docs/fastdds/property_policies/non_consolidated_qos.rst
Original file line number Diff line number Diff line change
Expand Up @@ -543,3 +543,43 @@ 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_expression_limits:

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:
Comment thread
richiware marked this conversation as resolved.
Outdated

.. 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.

.. 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