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

   This PR tries to address an issue of "web console tab context poisoning" 
that is when a web console user re-uses a tab by deleting the SQL query in the 
tab and writing/pasting a new one. The user might forget that deleting all the 
SQL does not clear the context parameters which will be attached to subsequent 
queries issued.
   
   Specifically here is a scenario that is of concern:
   - User plays with the "Connect external data" flow which creates a new tab 
for them with `arrayIngestMode: array` set (as was added in 
https://github.com/apache/druid/pull/15588)
   - After sometime, the user comes back and re-uses that tab by selecting the 
entire SQL query and pasting over some REPLACE/INSERT query into their 
production datasource that contains MVDs to do some fix up. They do not realize 
that while they cleared the SQL query, `arrayIngestMode: array` is still set in 
the query context in that tab.
   - The MVD columns become mixed with ARRAYs and some queries against these 
columns start working in unexpected ways.
   
   This PR makes two changes (in two respective commits):
   
   1) Change it so that the `arrayIngestMode: array` context parameter is only 
set when the user has opted in to arrays (via the toggle that is off by 
default). Currently `arrayIngestMode: array` is always being set by all UI 
flows and the toggle only affects the SQL that is generated.
     This change affects:
     - The "Connect external data" wizard flow
     - The "SQL data loader"
     - The spec to SQL converter (in this case `arrayIngestMode: array` is only 
set if the ingestion spec is detected as using arrays by having dimensions 
specs of type "auto" + "castToType: ARRAY<...>")
   
   2) Make the `arrayIngestMode` selection more prominent in the UI so that it 
is shown on the "Run panel" and is not hidden inside of a menu.
   
   
![image](https://github.com/apache/druid/assets/177816/7d542adb-8aaa-495c-b4d7-2c3ad405b7df)
   


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