mirror of
https://github.com/apache/druid.git
synced 2025-02-16 23:15:16 +00:00
Fix broken sampler for re-indexing (#10196)
* Fix broken sampler for re-indexer When re-indexing a Druid datasource, the web-console would generate an invalid inputFormat since the type is not specified. * code review
This commit is contained in:
parent
c72f96a4ba
commit
6baea0b4d5
@ -108,7 +108,9 @@ export function applyCache(sampleSpec: SampleSpec, cacheRows: CacheRows) {
|
||||
if (!cacheRows) return sampleSpec;
|
||||
|
||||
// In order to prevent potential data loss null columns should be kept by the sampler and shown in the ingestion flow
|
||||
sampleSpec = deepSet(sampleSpec, 'spec.ioConfig.inputFormat.keepNullColumns', true);
|
||||
if (deepGet(sampleSpec, 'spec.ioConfig.inputFormat')) {
|
||||
sampleSpec = deepSet(sampleSpec, 'spec.ioConfig.inputFormat.keepNullColumns', true);
|
||||
}
|
||||
|
||||
// If this is already an inline spec there is nothing to do
|
||||
if (deepGet(sampleSpec, 'spec.ioConfig.inputSource.type') === 'inline') return sampleSpec;
|
||||
@ -202,7 +204,9 @@ function makeSamplerIoConfig(
|
||||
ioConfig = deepSet(ioConfig, 'useEarliestSequenceNumber', sampleStrategy === 'start');
|
||||
}
|
||||
// In order to prevent potential data loss null columns should be kept by the sampler and shown in the ingestion flow
|
||||
ioConfig = deepSet(ioConfig, 'inputFormat.keepNullColumns', true);
|
||||
if (ioConfig.inputFormat) {
|
||||
ioConfig = deepSet(ioConfig, 'inputFormat.keepNullColumns', true);
|
||||
}
|
||||
return ioConfig;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user