Skip to content

Commit

Permalink
fix feut
Browse files Browse the repository at this point in the history
  • Loading branch information
BePPPower committed Sep 14, 2023
1 parent 05dcd34 commit 297bd4b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,6 @@ public abstract class ExternalFileTableValuedFunction extends TableValuedFunctio
.add(TRIM_DOUBLE_QUOTES)
.add(SKIP_LINES)
.add(CSV_SCHEMA)
.add(COMPRESS_TYPE)
.add(PATH_PARTITION_KEYS)
.build();

// Columns got from file and path(if has)
Expand All @@ -138,8 +136,6 @@ public abstract class ExternalFileTableValuedFunction extends TableValuedFunctio

protected List<TBrokerFileStatus> fileStatuses = Lists.newArrayList();
protected Map<String, String> locationProperties;
protected String filePath;


private TFileFormatType fileFormatType;
private TFileCompressType compressionType;
Expand Down Expand Up @@ -203,7 +199,6 @@ protected void parseFile() throws AnalysisException {
}
}

//The keys in the passed validParams map need to be lowercase.
protected void parseProperties(Map<String, String> validParams) throws AnalysisException {
String formatString = validParams.getOrDefault(FORMAT, "");
switch (formatString) {
Expand Down Expand Up @@ -240,7 +235,7 @@ protected void parseProperties(Map<String, String> validParams) throws AnalysisE
}

columnSeparator = validParams.getOrDefault(COLUMN_SEPARATOR, DEFAULT_COLUMN_SEPARATOR);
if (columnSeparator.isEmpty()) {
if (Strings.isNullOrEmpty(columnSeparator)) {
throw new AnalysisException("column_separator can not be empty.");
}
columnSeparator = Separator.convertSeparator(columnSeparator);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,15 +129,12 @@ public void testTvfGeneration() {
@Injectable
Table targetTable;

@Injectable
DataDescription dataDescription;

@Test
public void testColumnMappings() throws Exception {
// c1/c2/c3 in both file and table, and c5 is only in table
final List<ImportColumnDesc> columnsDescList = getColumnsDescList(
"c1,c2,c3,c1=upper(c1), tmp_c4=c1 + 1, c5 = tmp_c4+1");
// DataDescription dataDescription = buildDataDesc(colNames, null, null, null);
DataDescription dataDescription = buildDataDesc(colNames, null, null, null);
new Expectations() {
{
dataDescription.getParsedColumnExprList();
Expand Down

0 comments on commit 297bd4b

Please sign in to comment.