diff --git a/web-console/src/druid-models/ingestion-spec/ingestion-spec.spec.ts b/web-console/src/druid-models/ingestion-spec/ingestion-spec.spec.ts index 86787010f27a..d6513aa20818 100644 --- a/web-console/src/druid-models/ingestion-spec/ingestion-spec.spec.ts +++ b/web-console/src/druid-models/ingestion-spec/ingestion-spec.spec.ts @@ -720,6 +720,7 @@ describe('spec utils', () => { expect(guessColumnTypeFromInput([null, 1, 2.1, 3], true)).toEqual('double'); expect(guessColumnTypeFromInput([null, '1', '2.1', '3'], false)).toEqual('string'); expect(guessColumnTypeFromInput([null, '1', '2.1', '3'], true)).toEqual('double'); + expect(guessColumnTypeFromInput([null, '1.0', '2.0', '3.0'], true)).toEqual('double'); }); it('works for ARRAY', () => { diff --git a/web-console/src/druid-models/ingestion-spec/ingestion-spec.tsx b/web-console/src/druid-models/ingestion-spec/ingestion-spec.tsx index 54a1cb241c69..09322bc15526 100644 --- a/web-console/src/druid-models/ingestion-spec/ingestion-spec.tsx +++ b/web-console/src/druid-models/ingestion-spec/ingestion-spec.tsx @@ -2504,7 +2504,9 @@ function isIntegerOrNull(x: any): boolean { function isIntegerOrNullAcceptString(x: any): boolean { return ( - x == null || ((typeof x === 'number' || typeof x === 'string') && Number.isInteger(Number(x))) + x == null || + (typeof x === 'number' && Number.isInteger(x)) || + (typeof x === 'string' && !x.includes('.') && Number.isInteger(Number(x))) ); } diff --git a/web-console/src/views/workbench-view/input-format-step/input-format-step.tsx b/web-console/src/views/workbench-view/input-format-step/input-format-step.tsx index 9729b2248310..cfe51d8fc3d9 100644 --- a/web-console/src/views/workbench-view/input-format-step/input-format-step.tsx +++ b/web-console/src/views/workbench-view/input-format-step/input-format-step.tsx @@ -193,6 +193,9 @@ export const InputFormatStep = React.memo(function InputFormatStep(props: InputF inputSourceAndFormat.inputSource, ); + const needsResample = inputSourceAndFormatToSample !== inputSourceAndFormat; + const nextDisabled = !inputSourceFormatAndMore || needsResample; + return (
@@ -246,7 +249,7 @@ export const InputFormatStep = React.memo(function InputFormatStep(props: InputF onChange={setInputSourceAndFormat as any} /> )} - {inputSourceAndFormatToSample !== inputSourceAndFormat && ( + {needsResample && (