@@ -609,7 +609,7 @@ else if (!dataFileDir.exists())
609609 //di = wrap(di, ve);
610610 //importData(di, ve);
611611
612- configureLoader (loader );
612+ configureLoader (loader , _target , getRenamedColumns (), allowLineageColumns (), getLineageImportAliases (), getOptionParamsMap () );
613613
614614 TransactionAuditProvider .TransactionAuditEvent auditEvent = null ;
615615 if (isCrossTypeImport || (behaviorType != null && behaviorType != AuditBehaviorType .NONE ))
@@ -650,13 +650,12 @@ else if (!dataFileDir.exists())
650650
651651 }
652652
653- protected void configureLoader (DataLoader loader ) throws IOException
653+ public static void configureLoader (DataLoader loader , @ Nullable TableInfo target , @ Nullable Map < String , String > renamedColumns , boolean allowLineageColumns , @ Nullable Set < String > lineageAliasNames , @ Nullable Map < Params , Boolean > optionParamsMap ) throws IOException
654654 {
655- configureLoader (loader , _target , getRenamedColumns (), allowLineageColumns (), null );
656- }
655+ // Issue 53804: When updating or adding samples across different sample types, the strings 'Yes' and 'No' are converted to their boolean values
656+ if (loader != null && optionParamsMap != null && optionParamsMap .getOrDefault (Params .crossTypeImport , false ))
657+ loader .setInferTypes (false );
657658
658- public static void configureLoader (DataLoader loader , @ Nullable TableInfo target , @ Nullable Map <String , String > renamedColumns , boolean allowLineageColumns , @ Nullable Set <String > lineageAliasNames ) throws IOException
659- {
660659 //apply known columns so loader can do better type conversion
661660 if (loader != null && target != null )
662661 loader .setKnownColumns (target .getColumns ());
0 commit comments