File tree Expand file tree Collapse file tree
xtable-service/src/main/java/org/apache/xtable/service Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -190,10 +190,14 @@ public ConversionService(
190190 public ConvertTableResponse convertTable (ConvertTableRequest convertTableRequest ) {
191191
192192 Properties sourceProperties = new Properties ();
193- String partitionSpec =
194- convertTableRequest .getConfigurations ().getOrDefault ("partition-spec" , null );
195- if (partitionSpec != null ) {
196- sourceProperties .put (PARTITION_FIELD_SPEC_CONFIG , partitionSpec );
193+ if (convertTableRequest .getConfigurations () != null ) {
194+ String partitionSpec =
195+ convertTableRequest .getConfigurations ().getOrDefault ("partition-spec" , null );
196+ if (partitionSpec != null
197+ && (HUDI .equals (convertTableRequest .getSourceFormat ())
198+ || convertTableRequest .getTargetFormats ().contains (HUDI ))) {
199+ sourceProperties .put (PARTITION_FIELD_SPEC_CONFIG , partitionSpec );
200+ }
197201 }
198202
199203 SourceTable sourceTable =
You can’t perform that action at this time.
0 commit comments