clintropolis commented on code in PR #15588:
URL: https://github.com/apache/druid/pull/15588#discussion_r1441260795
##########
web-console/src/druid-models/dimension-spec/dimension-spec.ts:
##########
@@ -64,6 +65,12 @@ export const DIMENSION_SPEC_FIELDS: Field<DimensionSpec>[] =
[
defaultValue: 'SORTED_ARRAY',
suggestions: ['SORTED_ARRAY', 'SORTED_SET', 'ARRAY'],
},
+ {
+ name: 'castToType',
+ type: 'string',
+ defined: typeIsKnown(KNOWN_TYPES, 'auto'),
+ suggestions: [undefined, 'ARRAY<STRING>', 'ARRAY<LONG>', 'ARRAY<DOUBLE>'],
Review Comment:
this works with any native druid type built-in type `STRING`, `LONG`,
`DOUBLE`, `FLOAT`, `ARRAY<STRING>`, `ARRAY<LONG>`, `ARRAY<DOUBLE>`
(`ARRAY<FLOAT>` works too but is just mapped to `ARRAY<DOUBLE>`, which is also
true for `FLOAT` which gets mapped to `DOUBLE` when using 'auto').
It isn't completely crazy to use 'auto' with 'castToType' for all column
types really though i'm not entirely sure we want to make that jump yet.. but
for example if you want indexes for numerical columns you should use this
instead of the classic dimension schemas, the only exception is multi-value
strings which do not exist in 'auto' (and must be ingested as ARRAY<STRING>
instead).
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]