mirror of https://github.com/apache/druid.git
switch to using arrays by default (#17133)
This commit is contained in:
parent
1a13bd5485
commit
4872f0457a
|
@ -296,6 +296,9 @@ export type SchemaMode = 'fixed' | 'string-only-discovery' | 'type-aware-discove
|
|||
export type ArrayMode = 'arrays' | 'multi-values';
|
||||
|
||||
export const DEFAULT_FORCE_SEGMENT_SORT_BY_TIME = true;
|
||||
export const DEFAULT_SCHEMA_MODE: SchemaMode = 'fixed';
|
||||
export const DEFAULT_ARRAY_MODE: ArrayMode = 'arrays';
|
||||
|
||||
export function getForceSegmentSortByTime(spec: Partial<IngestionSpec>): boolean {
|
||||
return (
|
||||
deepGet(spec, 'spec.dataSchema.dimensionsSpec.forceSegmentSortByTime') ??
|
||||
|
|
|
@ -83,7 +83,9 @@ import {
|
|||
computeFlattenPathsForData,
|
||||
CONSTANT_TIMESTAMP_SPEC,
|
||||
CONSTANT_TIMESTAMP_SPEC_FIELDS,
|
||||
DEFAULT_ARRAY_MODE,
|
||||
DEFAULT_FORCE_SEGMENT_SORT_BY_TIME,
|
||||
DEFAULT_SCHEMA_MODE,
|
||||
DIMENSION_SPEC_FIELDS,
|
||||
fillDataSourceNameIfNeeded,
|
||||
fillInputFormatIfNeeded,
|
||||
|
@ -317,8 +319,8 @@ function initializeSchemaWithSampleIfNeeded(
|
|||
spec,
|
||||
sample,
|
||||
DEFAULT_FORCE_SEGMENT_SORT_BY_TIME,
|
||||
'fixed',
|
||||
'multi-values',
|
||||
DEFAULT_SCHEMA_MODE,
|
||||
DEFAULT_ARRAY_MODE,
|
||||
getRollup(spec, false),
|
||||
);
|
||||
}
|
||||
|
|
|
@ -27,6 +27,7 @@ import type { ArrayMode, InputFormat, InputSource } from '../../../druid-models'
|
|||
import {
|
||||
BATCH_INPUT_FORMAT_FIELDS,
|
||||
chooseByBestTimestamp,
|
||||
DEFAULT_ARRAY_MODE,
|
||||
DETECTION_TIMESTAMP_SPEC,
|
||||
getPossibleSystemFieldsForInputSource,
|
||||
guessColumnTypeFromSampleResponse,
|
||||
|
@ -93,7 +94,7 @@ export const InputFormatStep = React.memo(function InputFormatStep(props: InputF
|
|||
InputSourceAndFormat | undefined
|
||||
>(isValidInputFormat(initInputFormat) ? inputSourceAndFormat : undefined);
|
||||
const [selectTimestamp, setSelectTimestamp] = useState(true);
|
||||
const [arrayMode, setArrayMode] = useState<ArrayMode>('multi-values');
|
||||
const [arrayMode, setArrayMode] = useState<ArrayMode>(DEFAULT_ARRAY_MODE);
|
||||
|
||||
const [previewState] = useQueryManager<InputSourceAndFormat, SampleResponse>({
|
||||
query: inputSourceAndFormatToSample,
|
||||
|
|
Loading…
Reference in New Issue