LiaCastaneda commented on code in PR #16454: URL: https://github.com/apache/datafusion/pull/16454#discussion_r2179767364
########## datafusion/substrait/tests/testdata/test_plans/join_with_expression_key.json: ########## Review Comment: Sorry for the huge substrait plan, here is the SQL version: ``` WITH index_sizes AS (SELECT index_name AS index, Upper(host) AS host_expr, Max(size_bytes) AS idx_size FROM index_metrics WHERE index_name IN ( 'aaa' ) GROUP BY index_name, Upper(host)), db_sizes AS (SELECT Upper(host) AS host_expr,-- scalar func Max(total_bytes) AS db_size FROM db_metrics WHERE Upper(host) IN (SELECT host_expr FROM index_sizes) -- this comes as inner join in the substrait plan GROUP BY Upper(host)) SELECT ix.index, ds.host_expr AS host, ix.idx_size, ds.db_size, ( ix.idx_size / ds.db_size ) * 100.0 AS pct_of_db FROM index_sizes ix JOIN db_sizes ds ON ix.host_expr = ds.host_expr; ``` -- 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: github-unsubscr...@datafusion.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For additional commands, e-mail: github-h...@datafusion.apache.org