sollhui opened a new pull request, #64395: URL: https://github.com/apache/doris/pull/64395
### What problem does this PR solve? PR https://github.com/apache/doris/pull/47194 introduced the Nereids COPY INTO command path. In this path, CopyIntoInfo analyzes column mappings and file filter expressions with a scope that only contains target table columns. For statements like: COPY INTO customer FROM ( SELECT $1, $2, ... FROM @stage('xxx') ) CopyFromDesc rewrites the select list into column mappings such as C_CUSTKEY = $1. $1 is a valid file column placeholder, but it was analyzed against the target-table-only scope and failed with unknown column '$1'. This patch adds synthetic file column slots ($1, $2, ...) into the COPY INTO expression analysis scope, infers their types from target column mappings when possible, and translates them back to legacy SlotRef(null, "$N") when building DataDescription / CopyFromParam. -- 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]
