j-esse commented on issue #23556: [SPARK-26626][SQL] Maximum size for 
repeatedly substituted aliases in SQL expressions
URL: https://github.com/apache/spark/pull/23556#issuecomment-454859062
 
 
   Ah sorry I think I didn't explain the problem clearly enough - the OOMs 
happen inside CollapseProject while performing the optimisation (and inside 
PhysicalOperation).   The recursive alias substitution grows the expression 
tree so large that it OOMs.   We're not using UDFs or any expensive expressions.
   
   To repro, try this in Spark Shell:
   ```
   var df = Seq(1, 2, 3).toDF("a").withColumn("b", lit(10)).cache()
   for( i <- 1 to 20 ) {
     df = df.select(('a + 'b).as('a), ('a - 'b).as('b))
    }
   df.collect()
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to