diff options
Diffstat (limited to '')
-rw-r--r-- | sqlglot/dataframe/sql/column.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sqlglot/dataframe/sql/column.py b/sqlglot/dataframe/sql/column.py index a8b89d1..f4cfeba 100644 --- a/sqlglot/dataframe/sql/column.py +++ b/sqlglot/dataframe/sql/column.py @@ -5,6 +5,7 @@ import typing as t import sqlglot from sqlglot import expressions as exp from sqlglot.dataframe.sql.types import DataType +from sqlglot.dialects import Spark from sqlglot.helper import flatten, is_iterable if t.TYPE_CHECKING: @@ -22,6 +23,10 @@ class Column: expression = sqlglot.maybe_parse(expression, dialect="spark") if expression is None: raise ValueError(f"Could not parse {expression}") + + if isinstance(expression, exp.Column): + expression.transform(Spark.normalize_identifier, copy=False) + self.expression: exp.Expression = expression def __repr__(self): |