When the query does not have an explicit Select node, this Define node gets ignored:
print(render(q))
#=>
SELECT "person_1"."person_id", "person_1"."year_of_birth", "person_1"."location_id"
FROM "person" AS "person_1"
=#
One would expect that year_of_birth respects the redefinition. To fix this, we should make the columns created with Define to be included to the default output.
Consider a query where
Define
overrides an existing column of a table:When the query does not have an explicit
Select
node, thisDefine
node gets ignored:One would expect that
year_of_birth
respects the redefinition. To fix this, we should make the columns created withDefine
to be included to the default output.