diff options
Diffstat (limited to 'tests/dataframe/integration')
-rw-r--r-- | tests/dataframe/integration/test_session.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/dataframe/integration/test_session.py b/tests/dataframe/integration/test_session.py index ec50034..3bb3e20 100644 --- a/tests/dataframe/integration/test_session.py +++ b/tests/dataframe/integration/test_session.py @@ -34,3 +34,10 @@ class TestSessionFunc(DataFrameValidator): .agg(SF.countDistinct(SF.col("employee_id"))) ) self.compare_spark_with_sqlglot(df, dfs, skip_schema_compare=True) + + def test_nameless_column(self): + query = "SELECT MAX(age) FROM employee" + df = self.spark.sql(query) + dfs = self.sqlglot.sql(query) + # Spark will alias the column to `max(age)` while sqlglot will alias to `_col_0` so their schemas will differ + self.compare_spark_with_sqlglot(df, dfs, skip_schema_compare=True) |