egalpin commented on issue #10712:
URL: https://github.com/apache/pinot/issues/10712#issuecomment-1727999407

   @Jackie-Jiang do you think that it would be possible to use aliases to 
support a use case like:
   
   - There are 3 tables, each with a **different schema**
     - Table1 has fields: `created_at`, `id`, `my_metric`, `foo`
     - Table2 has fields: `created_at`, `id`, `my_metric`, `bar`
     - Table3 has fields: `created_at`, `id`, `my_metric`, `baz`
   - The schemata for all 3 tables overlap at least partially (ex. they all 
have columns named `created_at`, `id`, and `my_metric`)
   - A query can be issued like:
   ```sql
   select id, my_metric from <aliasName> order by created_at desc limit 5
   ```
   such that the 5 most recently created rows, regardless of physical table, 
would be in the query result?
   - And a query could also project a column which exists in only one of the 
physical tables, where the query result would then only contain the 5 most 
recently created rows _only from the table where the column exists_ i.e. 5 most 
recent from Table1 with the following query, since only Table1 has column `foo`:
   ```sql
   select id, my_metric, foo from <aliasName> order by created_at desc limit 5
   ```


-- 
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: commits-unsubscr...@pinot.apache.org

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


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

Reply via email to