This change makes it possible to have polymorphic lateral context! When looking up a column heretofore, the relevant typeclasses would search through Join lat from. This is the "correct" ordering as far as the structure from left to right in the query, making lat consistently ordered as one goes through nested lateral joins or nested subquery expressions. However, it doesn't really matter how the lookup orders the columns. And if the lookup searches through Join from lat instead then thanks to good old Haskell lazy list appending, if a query only references columns in from then it will work no matter the lat. With a small proviso; if you leave lat polymorphic, then you must qualify all columns since there could be more than one table even if from has only one table in it.
This change makes it possible to have polymorphic lateral context! When looking up a column heretofore, the relevant typeclasses would search through
Join lat from
. This is the "correct" ordering as far as the structure from left to right in the query, makinglat
consistently ordered as one goes through nested lateral joins or nested subquery expressions. However, it doesn't really matter how the lookup orders the columns. And if the lookup searches throughJoin from lat
instead then thanks to good old Haskell lazy list appending, if a query only references columns infrom
then it will work no matter thelat
. With a small proviso; if you leavelat
polymorphic, then you must qualify all columns since there could be more than one table even iffrom
has only one table in it.