From b823ce985b41fed49764d3be9ae1fc1cac6333aa Mon Sep 17 00:00:00 2001 From: Simon Brugman Date: Mon, 11 Sep 2023 13:14:09 +0200 Subject: [PATCH] initial implementation for fluid interface check --- test/data/err_999.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/test/data/err_999.py b/test/data/err_999.py index b231351..825bc17 100644 --- a/test/data/err_999.py +++ b/test/data/err_999.py @@ -30,6 +30,10 @@ class functions: def lit(constant): return constant + @staticmethod + def col(col_name): + return col_name + class DataFrame: @staticmethod def withColumnRenamed(col_in, col_out): @@ -63,6 +67,14 @@ def process(file_name: str): return df +def projection(df_in: spark.DataFrame) -> spark.DataFrame: + df = ( + df_in.select(["col1", "col2"]) + .withColumnRenamed("col1", "col1a") + ) + return df.withColumn("col2a", spark.functions.col("col2").cast("date")) + + # these will not def no_match(): y = 10