hubgeter opened a new pull request, #70813: URL: https://github.com/apache/doris/pull/70813
### Background `SELECT INTO OUTFILE` writes query results to a destination. `EXPORT TABLE` schedules background queries that use the same writer. Operators can enable local disk as a destination with the FE setting `enable_outfile_to_local`. ### What problem does this PR solve? Issue Number: None Related PR: None PR Type: Enhancement Problem Summary: An operator enabling local exports needs to control which users can use them. Require global `ADMIN_PRIV` for both statements and carry the submitting session's roles into the background task. Validate the destination before scheduling the export or starting its writer. ### Details - **Before and after:** Enabling local exports previously made the local writer available to users with query access. The FE now requires both the setting and global `ADMIN_PRIV` for a `file:///` destination. Local OUTFILE accepts format and file options. Remote writer properties must match the selected writer, and HDFS output requires a Hadoop filesystem URI. - **Configs and defaults:** `enable_outfile_to_local` still defaults to `false` and takes effect at FE startup. - **Impact on existing users:** Administrators can keep their local output paths and success markers. Other users can use a configured remote destination. File suffixes can contain letters, digits, dots, underscores, plus signs and hyphens. ### Testing Checkstyle passed on the eight changed Java files. The new P0 regression suite passed Groovy parsing and AST conversion. The FE metadata and diff whitespace checks passed locally. FE unit and cluster regression tests await CI. ### Release note Local `SELECT INTO OUTFILE` and `EXPORT TABLE` require global `ADMIN_PRIV` and `enable_outfile_to_local=true`. Use a `file:///` URI for local output and supply only local output and format options. An OUTFILE suffix must be a single file name component. ### Check List (For Author) - Behavior changed: Yes (see Details) - Does this need documentation: Yes (update the OUTFILE and EXPORT pages in apache/doris-website with the local privilege requirement and supported destination options) - Pre-submission status: Partially verified: the project was not built locally, and FE unit tests and cluster regressions were not run. ### AI Disclosure - Tool: OpenAI Codex (GPT-6) - Generated: Code, tests and PR description. - Human review: Pending. -- 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]
