vogievetsky commented on a change in pull request #10196:
URL: https://github.com/apache/druid/pull/10196#discussion_r456724917



##########
File path: web-console/src/utils/sampler.ts
##########
@@ -202,7 +203,10 @@ 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);
+  const reingestMode = isDruidSourceFromInputSource(deepGet(ioConfig, 
'inputSource'));
+  if (!reingestMode) {
+    ioConfig = deepSet(ioConfig, 'inputFormat.keepNullColumns', true);

Review comment:
       the issue is that `ioConfig = deepSet(ioConfig, 
'inputFormat.keepNullColumns', true);` creates the `ioConfig.inputFormat` 
object even if it is not there. Right?
   I think the fix is to change:
   
   ```
   ioConfig = deepSet(ioConfig, 'inputFormat.keepNullColumns', true);
   ```
   
   to:
   
   ```
   if (ioConfig.inputFormat) {
     ioConfig = deepSet(ioConfig, 'inputFormat.keepNullColumns', true);
   }
   ```
   
   And not worry about the `reingestMode` here (we want to set 
`keepNullColumns` even if we are not re-ingesting)




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to