suneet-s commented on a change in pull request #10350:
URL: https://github.com/apache/druid/pull/10350#discussion_r486066973
##########
File path: docs/querying/sql.md
##########
@@ -561,6 +561,8 @@ The [DataSketches
extension](../development/extensions-core/datasketches-extensi
|`COALESCE(value1, value2, ...)`|Returns the first value that is neither NULL
nor empty string.|
|`NVL(expr,expr-for-null)`|Returns 'expr-for-null' if 'expr' is null (or empty
string for string type).|
|`BLOOM_FILTER_TEST(<expr>, <serialized-filter>)`|Returns true if the value is
contained in a Base64-serialized bloom filter. See the [Bloom filter
extension](../development/extensions-core/bloom-filter.html) documentation for
additional details.|
+|`CONTAINS_STR(<expr>, str)`|Returns true if the `str` is a substring of
`expr`.|
+|`ICONTAINS_STR(<expr>, str)`|Returns true if the `str` is a substring of
`expr`. The match is case-insensitive.|
Review comment:
The PR description says the functions are called `contains` and
`icontains`, but it looks like this patch uses the names with `_str` appended.
Was there any reason you chose these names instead of others?
I couldn't find an equivalent query in postgresql, and when I googled for a
contains operator: Oracle and SQL server appear to have one -
https://docs.oracle.com/cd/B28359_01/text.111/b28303/query.htm#g1016054 and
https://docs.microsoft.com/en-us/sql/t-sql/queries/contains-transact-sql?view=sql-server-2017.
Also, was there any reasoning behind having 2 functions instead of 1 with a
parameter to ignore the case? I don't think I have a strong preference either
way yet, just curious
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]