[bugfix](multi catalog) fixed an issue in master where hive directory field separator was an empty string causing it to be core (#34594)

Fixed an issue in master where hive directory field separator was an empty string causing it to be core.
This commit is contained in:
lw112
2024-05-11 15:49:35 +08:00
committed by yiguolei
parent e602048f73
commit 792d87c87c

View File

@ -362,7 +362,11 @@ public class HiveScanNode extends FileQueryScanNode {
TFileTextScanRangeParams textParams = new TFileTextScanRangeParams();
java.util.Map<String, String> delimiter = hmsTable.getRemoteTable().getSd().getSerdeInfo().getParameters();
if (delimiter.containsKey(PROP_FIELD_DELIMITER)) {
textParams.setColumnSeparator(delimiter.get(PROP_FIELD_DELIMITER));
if (delimiter.get(PROP_FIELD_DELIMITER).length() == 0) {
textParams.setColumnSeparator(DEFAULT_FIELD_DELIMITER);
} else {
textParams.setColumnSeparator(delimiter.get(PROP_FIELD_DELIMITER));
}
} else if (delimiter.containsKey(PROP_SEPARATOR_CHAR)) {
textParams.setColumnSeparator(delimiter.get(PROP_SEPARATOR_CHAR));
} else {