villebro commented on issue #18085:
URL: https://github.com/apache/superset/issues/18085#issuecomment-1017591624


   _In theory_, i think the optimal solution would be to have the column cases 
equal for both physical and virtual datasets. I _think_ this problem would go 
away if we called the normalization function on the column names when we fetch 
column names from the query metadata when we create a new virtual dataset. 
However, I believe this would break backward compatibility with previously 
created virtual tables, as refreshing the column metadata for pre-existing 
virtual tables would change the case from upper case to lower case, which would 
probably break all existing charts. We could, of course, do a database 
migration which would update all existing chart metadata, but that would be 
very tricky, as column names appear in lots of different controls (we also 
don't know what custom controls containing column names some orgs might have if 
they've created custom viz plugins).
   
   Therefore, the approach I'm proposing is to rather be aware of the dataset 
type, and then be able to work around this problem at query creation time, i.e. 
do the normalization there. As the dataset metadata would be unaffected 
(caseless virtual dataset column names would still be UPPER CASE), this change 
would be backwards compatible, and therefore wouldn't require any database 
migrations.
   
   However, if column cases are different for physical vs virtual tables, there 
is the risk that native filters will work properly on datasets of different 
types. So this may require some further planning.


-- 
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: notifications-unsubscr...@superset.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org
For additional commands, e-mail: notifications-h...@superset.apache.org

Reply via email to