morningman commented on PR #69867:
URL: https://github.com/apache/doris/pull/69867#issuecomment-6514562298

   Addressed review round 1 in `7c7393c8c18`.
   
   - 4419077176: before checking privileges, Prepare now inlines the CTEs that 
execution inlines, so a CTE used once is checked only on the columns the query 
reads. If the analyzed plan is still denied, for example because of an ORDER BY 
under a derived table on a column without the grant, the statement keeps the 
placeholder schema and execution decides, as it did before this PR. GetSchema 
answers UNIMPLEMENTED without a schema.
   - 4419077184: `ShowStoragePolicyCommand.getMetaData()` returns the header of 
the form that runs: seven columns for SHOW STORAGE POLICY, four for USING. No 
other SHOW command has this mismatch.
   - 4419077191: WARM UP SELECT keeps the placeholder schema. It answers OK 
instead of its statistics whenever planning finds its source empty, and that 
includes a table without data.
   
   New and changed tests, each red without its fix:
   - `DorisFlightSqlSchemaTest` adds 
`columnGrantsAreCheckedAsExecutionChecksThem`, replaces the WARM UP header test 
with `warmupSelectRunsUncheckedWhateverItsSourceHolds`, and updates two tests.
   - `SchemaOnlyCommandMetadataTest` adds `storagePolicyHeadersMatchExecution`.
   - `test_schema_only` now executes its side-effect-free frontend-side 
statements as prepared statements and compares the executed schema with the 
advertised one. It also prepares a WARM UP SELECT on an empty table and, in 
cloud mode (the only mode that warms up internal tables), executes it. Against 
the previous head the strengthened suite fails at the SHOW STORAGE POLICY 
header.
   
   41 related FE test classes, 536 tests, pass with Checkstyle.
   


-- 
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]

Reply via email to