Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
BePPPower committed Sep 14, 2023
1 parent 0896aef commit 41049a1
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
package org.apache.doris.tablefunction;

import org.apache.doris.analysis.BrokerDesc;
import org.apache.doris.analysis.Separator;
import org.apache.doris.analysis.TupleDescriptor;
import org.apache.doris.catalog.ArrayType;
import org.apache.doris.catalog.Column;
Expand Down Expand Up @@ -238,7 +239,13 @@ protected void parseProperties(Map<String, String> validParams) throws AnalysisE
|| formatString.equals("orc"))) {
throw new AnalysisException("current http_stream does not yet support parquet, avro and orc");
}

columnSeparator = validParams.getOrDefault(COLUMN_SEPARATOR, DEFAULT_COLUMN_SEPARATOR);
if (columnSeparator.isEmpty()) {
throw new AnalysisException("column_separator can not be empty.");
}
columnSeparator = Separator.convertSeparator(columnSeparator);

lineDelimiter = validParams.getOrDefault(LINE_DELIMITER, DEFAULT_LINE_DELIMITER);
jsonRoot = validParams.getOrDefault(JSON_ROOT, "");
jsonPaths = validParams.getOrDefault(JSON_PATHS, "");
Expand All @@ -248,6 +255,7 @@ protected void parseProperties(Map<String, String> validParams) throws AnalysisE
fuzzyParse = Boolean.valueOf(validParams.get(FUZZY_PARSE)).booleanValue();
trimDoubleQuotes = Boolean.valueOf(validParams.get(TRIM_DOUBLE_QUOTES)).booleanValue();
skipLines = Integer.valueOf(validParams.getOrDefault(SKIP_LINES, "0")).intValue();

try {
compressionType = Util.getFileCompressType(validParams.getOrDefault(COMPRESS_TYPE, "UNKNOWN"));
} catch (IllegalArgumentException e) {
Expand Down
Loading

0 comments on commit 41049a1

Please sign in to comment.