github-actions[bot] commented on code in PR #67993:
URL: https://github.com/apache/doris/pull/67993#discussion_r4037482655
##########
fe/fe-core/src/main/java/org/apache/doris/datasource/property/fileformat/FileFormatProperties.java:
##########
@@ -103,8 +102,6 @@ public static FileFormatProperties
createFileFormatProperties(String formatStrin
return new WalFileFormatProperties();
case FORMAT_ARROW:
return new ArrowFileFormatProperties();
- case FORMAT_NATIVE:
Review Comment:
[P1] Validate the EXPORT format before deleting the target. `EXPORT` copies
the raw format string into the job without constructing `FileFormatProperties`,
then `ExportMgr` persists the job and honors `delete_existing_files` before the
asynchronous planner reaches this factory. After Native is removed here, a
fresh `EXPORT` with `format=native` and `delete_existing_files=true` can
therefore delete the existing output and only later cancel with `format:native
is not supported`. Please validate the selected format during `ExportCommand`
parameter checking, before the job is registered or any filesystem mutation
occurs, and cover that ordering in a test.
##########
be/src/exec/sink/writer/vfile_result_writer.cpp:
##########
@@ -149,12 +148,6 @@ Status VFileResultWriter::_create_file_writer(const
std::string& file_name) {
_state, _file_writer_impl.get(), _vec_output_expr_ctxs,
_file_opts->orc_schema, {},
_output_object_data, _file_opts->orc_compression_type));
break;
- case TFileFormatType::FORMAT_NATIVE:
Review Comment:
[P1] Reject `FORMAT_NATIVE` before any writer side effects. An older FE can
still send the retained wire value during a rolling upgrade, but `open()` first
honors its `delete_existing_files` flag and this method creates or opens the
destination before the switch now rejects Native. That can remove existing
output and/or leave an empty or open `.unknown` file even though the request is
unsupported. Please validate the supported writer format at the start of
`open()`, before `_delete_dir()` and `_create_next_file_writer()`, and add a
retained-enum test proving rejection occurs before filesystem mutation.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]