presto:tiny> explain (type distributed) select * from (select orderkey + 1 orderkey from orders) o join (select orderkey + 1 orderkey from orders) o1 on (o.orderkey = o1.orderkey); Query Plan -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Fragment 0 [SINGLE] Output layout: [expr, expr_13] - Output[orderkey, orderkey] => [expr:bigint, expr_13:bigint] orderkey := expr orderkey := expr_13 - RemoteSource[1] => [expr:bigint, expr_13:bigint] Fragment 1 [SOURCE] Output layout: [expr, expr_13] - InnerJoin[("$hashvalue" = "combine_hash") AND ("expr" = "expr_13") AND ("combine_hash_33" = "$hashvalue_29")] => [expr:bigint, $hashvalue:bigint, combine_hash_33:bigint, expr_13:bigint, $hashvalue_29:bigint, combine_hash:bigint] - Project => [expr:bigint, $hashvalue:bigint, combine_hash_33:bigint] expr := ("orderkey" + 1) $hashvalue := "combine_hash"(0, COALESCE("$operator$hash_code"(("orderkey" + 1)), 0)) combine_hash_33 := "combine_hash"(0, COALESCE("$operator$hash_code"(("orderkey" + 1)), 0)) - TableScan[tpch:tpch:orders:sf0.01, originalConstraint = true] => [orderkey:bigint] orderkey := tpch:orderkey - Project => [expr_13:bigint, $hashvalue_29:bigint, combine_hash:bigint] combine_hash := "combine_hash"(0, COALESCE("$operator$hash_code"("expr_13"), 0)) - RemoteSource[2] => [expr_13:bigint, $hashvalue_29:bigint] Fragment 2 [SOURCE] Output layout: [expr_13, $hashvalue_29] - Project => [expr_13:bigint, $hashvalue_29:bigint] expr_13 := ("orderkey_3" + 1) $hashvalue_29 := "combine_hash"(0, COALESCE("$operator$hash_code"(("orderkey_3" + 1)), 0)) - TableScan[tpch:tpch:orders:sf0.01, originalConstraint = true] => [orderkey_3:bigint] orderkey_3 := tpch:orderkey (1 row)