599166320 commented on issue #18055:
URL: https://github.com/apache/druid/issues/18055#issuecomment-2951522173
I just looked into the "Dynamic table append" you mentioned — it's quite new
and very inspiring to me. It's great.
From my perspective, leveraging context offers greater flexibility and is
more lightweight. It can be scoped either to a single query or extended to the
client-database session level. Most importantly, it requires no modifications
to existing SQL statements, resulting in near-zero code intrusion.
In contrast, adopting "Dynamic table append" necessitates altering all
relevant SQL statements. Each query must explicitly include
TABLE(APPEND('table1', 'table2', 'table3')), which introduces significant
intrusion into the existing codebase.
Furthermore, as you pointed out, views provide a broader application scope
but lack the desired flexibility. Consider a scenario where User A has
consistently queried table1. Over time, table1 is partitioned into table2 and
table3, thereby reducing the volume of data in the original table1. Continuing
to query the physical table1 would result in improved performance. However, if
we redefine table1 as a view such as table1 = TABLE(APPEND(table1, table2,
table3)), User A's queries would unnecessarily scan a larger dataset. Moreover,
reusing the same name for both the physical table and the view (i.e., table1)
could lead to naming conflicts and operational confusion.
--
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]