clintropolis commented on a change in pull request #11188: URL: https://github.com/apache/druid/pull/11188#discussion_r628489278
########## File path: docs/querying/sql.md ########## @@ -293,15 +293,15 @@ the `UNNEST` functionality available in some other SQL dialects. Refer to the do The `druid.generic.useDefaultValueForNull` [runtime property](../configuration/index.md#sql-compatible-null-handling) controls Druid's NULL handling mode. -In the default mode (`true`), Druid treats NULLs and empty strings interchangeably, rather than according to the SQL +In the default value mode (`true`), Druid treats NULLs and empty strings interchangeably, rather than according to the SQL standard. In this mode Druid SQL only has partial support for NULLs. For example, the expressions `col IS NULL` and `col = ''` are equivalent, and both will evaluate to true if `col` contains an empty string. Similarly, the expression `COALESCE(col1, col2)` will return `col2` if `col1` is an empty string. While the `COUNT(*)` aggregator counts all rows, the `COUNT(expr)` aggregator will count the number of rows where expr is neither null nor the empty string. Numeric columns in this mode are not nullable; any null or missing values will be treated as zeroes. In SQL compatible mode (`false`), NULLs are treated more closely to the SQL standard. The property affects both storage -and querying, so for best behavior, it should be set at both ingestion time and query time. There is some overhead +and querying, so for correct behavior, it should be set on all Druid service types to be available at both ingestion time and query time. There is some overhead associated with the ability to handle NULLs; see the [segment internals](../design/segments.md#sql-compatible-null-handling) Review comment: hmm, we're going to need to watch out for this for a while in any PR that is adding these SQL tests that use this context parameter. -- 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: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@druid.apache.org For additional commands, e-mail: commits-h...@druid.apache.org