cloud-fan commented on code in PR #50286: URL: https://github.com/apache/spark/pull/50286#discussion_r1998740474
########## python/pyspark/sql/tests/test_dataframe.py: ########## @@ -1076,6 +1076,32 @@ def test_metadata_column(self): [Row(0), Row(0), Row(0)], ) + def test_with_column_and_generator(self): + # SPARK-51451: Generators should be available with withColumn + df = self.spark.createDataFrame([("082017",)], ["dt"]).select( + to_date(col("dt"), "MMyyyy").alias("dt") + ) + df_dt = df.withColumn("dt", date_format(col("dt"), "MM/dd/yyyy")) + monthArray = [lit(x) for x in range(0, 12)] + df_month_y = df_dt.withColumn("month_y", explode(array(monthArray))) Review Comment: How does it introduce nested generator functions? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org