bug fixes and add support for boolean inputs to classic long dimension indexer #14069
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
LONG
is currently the (semi?) official boolean type in Druid, even more-so ifdruid.expressions.useStrictBooleans
is set to true (which it is not in the code, but is defined as true in the distribution default runtime.properties for new installs to use the better behavior). However, ingesting boolean data with the 'long' dimension schema currently fails since theLongDimensionIndexer
does not expect to handle this type of input. As a workaround one can currently use an expression transform to coerce the boolean to a long (if strict booleans is enabled), but that's sort of sad. This PR fixes this by adding support to coercing booleans to longs using the same functions as the expressions.This PR also fixes some bugs with the sampler response after #14014, where the 'logical' dimensions list was still specifying 'json' instead of the newer 'auto' schema.
Release note
The native ingestion
"long"
dimension schema can now handle boolean inputs, which will be coerced to 1L or 0L for true or false values respectively.This PR has: