gianm commented on issue #10548: URL: https://github.com/apache/druid/issues/10548#issuecomment-722795105
Hey @julienlafont-tabmo, It's more of a missing feature than a bug and is mentioned on https://druid.apache.org/docs/latest/querying/sql.html#table-level: > UNION ALL can be used to query multiple tables at the same time. In this case, it must appear in the FROM clause, and the subqueries that are inputs to the UNION ALL operator must be simple table SELECTs (no expressions, column aliasing, etc). The query will run natively using a union datasource. The `1 as weight` is considered an expression so it isn't supported. The technical reason for this is that there is no good way to specify this in native queries right now. Probably the best immediately workaround is to make sure both tables have the same columns. A longer term approach could be to create a way to specify virtual columns that only apply to a specific child of a union datasource. ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
