FrankChen021 opened a new pull request, #20586:
URL: https://github.com/apache/druid/pull/20586

   ### Description
   
   Follow-up to #20555. Adds `sys.query_context_parameters`, which lists the 
query context parameters users can set, built from the `QueryContextParameters` 
catalog. `SYSTEM` parameters, which only Druid sets, are excluded. This PR also 
renames the `Visibility.INTERNAL` level added in #20555 to `SYSTEM`; 
`Visibility` has not been released yet. Descriptions are normalized to one line 
when the descriptor is built; an enum's description lists its accepted values.
   
   | Column | Type |
   |---|---|
   | `name`, `type`, `range`, `default_value`, `effective_value`, 
`effective_source`, `default_description`, `description`, `visibility`, 
`since`, `deprecation_message` | VARCHAR |
   | `query_languages` (`SQL`, `JSON`), `engines`, `native_query_types`, 
`statement_types` | ARRAY<VARCHAR> |
   | `is_nullable`, `is_deprecated` | BIGINT |
   
   `default_value` is the built-in default. `effective_value` is the default 
this Broker applies when a query doesn't set the parameter: the Broker dynamic 
configuration's `queryContext`, else the `druid.query.default.context.<name>` 
runtime property, else the built-in default; `effective_source` says which. A 
`null` in the dynamic configuration unsets the key, so the built-in default 
applies. `QueryConfigProvider` gains `getDynamicContext()` so the table can 
tell the dynamic overrides apart.
   
   Unlike `sys.servers`, the table doesn't require `STATE` READ: any user who 
can query `sys` tables can read the catalog. Only the effective defaults come 
from Broker configuration, so without `READ` on the `CONFIG` resource the query 
still succeeds, but `effective_value` is null and `effective_source` is 
`UNAUTHORIZED` in every row.
   
   `native_query_types` and `statement_types` are empty when a parameter 
applies to all native query types or statement types, and null when it doesn't 
apply to native queries or SQL at all.
   
   The table runs on the Bindable path, where array columns can be selected and 
indexed but not used with Druid array functions such as `ARRAY_CONTAINS`. Those 
need the native system-table path (apache/druid#20183).
   
   This PR, #20578 and #20579 all rename `Visibility.INTERNAL` to `SYSTEM`; 
whichever merges later will be rebased.
   
   <hr>
   
   This PR has:
   
   - [x] been self-reviewed.
   - [x] added documentation for new or modified features or behaviors.
   - [x] added unit tests or modified existing tests to cover new code paths.
   
   
   
   


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