Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1306,10 +1306,6 @@ public void notifyPropertiesUpdated(Map<String, String> updatedProps) {
}
}

public ThreadPoolExecutor getThreadPoolExecutor() {
return threadPoolWithPreAuth;
}

public CatalogProperty getCatalogProperty() {
return catalogProperty;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -582,7 +582,7 @@ private Namespace getNamespace() {
}

public ThreadPoolExecutor getThreadPoolWithPreAuth() {
return dorisCatalog.getThreadPoolExecutor();
return dorisCatalog.getThreadPoolWithPreAuth();
}

private void performDropView(String remoteDbName, String remoteViewName) throws DdlException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,16 @@ public class CsvFileFormatProperties extends FileFormatProperties {
public static final String PROP_ENCLOSE = "enclose";
public static final String PROP_ESCAPE = "escape";

public static final String PROP_ENABLE_TEXT_VALIDATE_UTF8 = "enable_text_validate_utf8";

private String headerType = "";
private String columnSeparator = DEFAULT_COLUMN_SEPARATOR;
private String lineDelimiter = DEFAULT_LINE_DELIMITER;
private boolean trimDoubleQuotes;
private int skipLines;
private byte enclose;
private byte escape;
private boolean enableTextValidateUTF8 = true;

public CsvFileFormatProperties(String formatName) {
super(TFileFormatType.FORMAT_CSV_PLAIN, formatName);
Expand Down Expand Up @@ -118,6 +121,18 @@ public void analyzeFileFormatProperties(Map<String, String> formatProperties, bo
PROP_COMPRESS_TYPE, "UNKNOWN", isRemoveOriginProperty);
compressionType = Util.getFileCompressType(compressTypeStr);

// get ENABLE_TEXT_VALIDATE_UTF8 from properties map first,
// if not exist, try getting from session variable,
// if connection context is null, use "true" as default value.
String validateUtf8 = getOrDefault(formatProperties, PROP_ENABLE_TEXT_VALIDATE_UTF8, "",
isRemoveOriginProperty);
if (Strings.isNullOrEmpty(validateUtf8)) {
enableTextValidateUTF8 = ConnectContext.get() == null ? true
: ConnectContext.get().getSessionVariable().enableTextValidateUtf8;
} else {
enableTextValidateUTF8 = Boolean.parseBoolean(validateUtf8);
}

} catch (org.apache.doris.common.AnalysisException e) {
throw new AnalysisException(e.getMessage());
}
Expand All @@ -142,8 +157,7 @@ public TFileAttributes toTFileAttributes() {
fileAttributes.setHeaderType(headerType);
fileAttributes.setTrimDoubleQuotes(trimDoubleQuotes);
fileAttributes.setSkipLines(skipLines);
fileAttributes.setEnableTextValidateUtf8(
ConnectContext.get().getSessionVariable().enableTextValidateUtf8);
fileAttributes.setEnableTextValidateUtf8(enableTextValidateUTF8);
return fileAttributes;
}

Expand Down
Loading