Skip to content

SQL-compatible null handling and strict booleans by default #14154

Description

@gianm

Today (Druid 25) we have these defaults:

druid.generic.useDefaultValueForNull = true
druid.expressions.useStrictBooleans = false

This issue is about flipping them to:

druid.generic.useDefaultValueForNull = false
druid.expressions.useStrictBooleans = true

This would enable SQL-compatible null handling and strict booleans by default, meaning support for:

  • Nullable numeric columns
  • Null and empty string being differentiated in string columns
  • SQL-compatible JOIN behavior
  • Three-valued boolean logic for expressions

This would all be great for any new users using SQL, and possibly even great for existing users on SQL, to the degree that they thought we already behaved this way by default 🙂

The main prerequisite I am aware of is that we need to ensure that it is possible for segments written in one null-handling mode to be readable by servers configured with the other mode. This is already true for segments written in default-value mode: they are read just fine by servers in SQL-compatible mode. But segments written in SQL-compatible mode aren't always read properly in default-value mode. This PR addresses it: #14142

I am not aware of any prerequisites for changing the default scrict-booleans mode.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions