Skip to content

Commit

Permalink
initial implementation for fluid interface check
Browse files Browse the repository at this point in the history
  • Loading branch information
sbrugman committed Dec 9, 2023
1 parent 70c85e8 commit b823ce9
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions test/data/err_999.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit b823ce9

Please sign in to comment.