Skip to content

Commit

Permalink
[bugfix](multi catalog) fixed an issue where the hive catalog field d…
Browse files Browse the repository at this point in the history
…elimiter is an empty string, causing it to be core (#34589)
  • Loading branch information
felixwluo authored May 9, 2024
1 parent 06d3bb1 commit af9f5a2
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,11 @@ protected TFileAttributes getFileAttributes() throws UserException {
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 {
Expand Down

0 comments on commit af9f5a2

Please sign in to comment.