-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
change arrayIngestMode default to array #16789
change arrayIngestMode default to array #16789
Conversation
docs/querying/arrays.md
Outdated
as regular scalar strings. SQL `BIGINT ARRAY` and `DOUBLE ARRAY` cannot be loaded under `arrayIngestMode: mvd`. This | ||
mode is not recommended and will be removed in a future release, but provided for backwards compatibility. | ||
|
||
When `arrayIngestMode` is `none`, Druid throws an exception when trying to store any type of arrays. This mode is most |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since we have validations to prevent user error associated with this transition, I wonder if we should remove arrayIngestMode = none
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
makes sense to me to drop it since I can't think of a very strong use case to keep it around.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed
docs/querying/arrays.md
Outdated
validation unless the column is named under the `skipTypeVerification` context parameter. This parameter can be either | ||
a comma-separated list of column names, or a JSON array in string form. This validation is done to prevent accidentally | ||
mixing arrays and multi-value strings in the same column. | ||
Arrays can be inserted with [SQL-based ingestion](../multi-stage-query/index.md) . |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Extraneous space
* change arrayIngestMode default to array * remove arrayIngestMode flag option none * fix space * fix test
Description
The validation added in #15920 should make this relatively safe to do. Some ingestions that are based on the old 'mvd' mode syntax which implicitly changed
ARRAY<STRING>
types toSTRING
might fail, but there is a descriptive error message and the fix is pretty easy.Release note
MSQ ingestion context flag
arrayIngestMode
now defaults toarray
instead ofmvd
. This means that SQLVARCHAR ARRAY
types will no longer be implicitly translated and stored intoVARCHAR
columns, but will instead be stored asVARCHAR ARRAY
. Additionally it permits other array types such asBIGINT ARRAY
andDOUBLE ARRAY
to be inserted with MSQ into their respective array column types (instead of failing as they do inmvd
mode). To continue to store multi-value strings modify any insert/replace queries to wrap the array types with theARRAY_TO_MV
operator. Validation is in place that will prevent mixingVARCHAR
andVARCHAR ARRAY
columns in the same table, so any ingestions affected by this change will fail and provide a descriptive error message instead of silently doing something unexpected. See https://druid.apache.org/docs/latest/querying/multi-value-dimensions#sql-based-ingestion for additional information about how to ingest multi-value strings, and https://druid.apache.org/docs/latest/querying/arrays#sql-based-ingestion for additional information about arrays.Additionally
arrayIngestMode
option ofnone
has been removed. It was introduced prior to the table validation logic as a means for cluster operators to force query writers to explicitly setarray
ormvd
on their query contexts, but provides little utility in Druid 31.This PR has: