The generic SQL serializer, serializes the nested subqueries of nesting operators into strings and stores these strings in map:
attribute name -> serialized subquery. Then in serialization of selection operators, references to the subquery result attribute are replaced with the serialized subquery. This does not work for LATERAL subqueries which have to be treated as FROM clause items. Plan of attack:
do not replace references to the result attributes of a LATERAL subquery with the subquery itself
deal with LATERAL nesting operators as FROM items in the generic serializer
The generic SQL serializer, serializes the nested subqueries of nesting operators into strings and stores these strings in map:
attribute name -> serialized subquery
. Then in serialization of selection operators, references to the subquery result attribute are replaced with the serialized subquery. This does not work for LATERAL subqueries which have to be treated as FROM clause items. Plan of attack: