gianm commented on a change in pull request #10350:
URL: https://github.com/apache/druid/pull/10350#discussion_r486199959



##########
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:
       Did some collection of those other databases I mentioned seem to agree 
on a way to do this?
   
   If not, I think your reasoning makes sense. The only thing I'd consider 
changing, in that case, is spelling out STRING rather than STR. We have a few 
other functions that have STRING in the name and none that have STR: 
https://druid.apache.org/docs/latest/querying/sql
   
   On the two-functions vs extra-parameter thing: IMO it feels more SQL-ish to 
have two functions. It doesn't map as directly onto the native construct, but I 
think that's okay. The native constructs were designed for a JSON API, where 
it's easy and natural to add a bunch of named parameters. That isn't the case 
with SQL, where parameters are positional, and so adding a lot of them doesn't 
work as well.




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

Reply via email to