summaryrefslogtreecommitdiffstats
path: root/sqlglot/dataframe/sql/column.py
diff options
context:
space:
mode:
Diffstat (limited to 'sqlglot/dataframe/sql/column.py')
-rw-r--r--sqlglot/dataframe/sql/column.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/sqlglot/dataframe/sql/column.py b/sqlglot/dataframe/sql/column.py
index f4cfeba..fcfd71e 100644
--- a/sqlglot/dataframe/sql/column.py
+++ b/sqlglot/dataframe/sql/column.py
@@ -114,7 +114,7 @@ class Column:
return self.inverse_binary_op(exp.Or, other)
@classmethod
- def ensure_col(cls, value: t.Optional[t.Union[ColumnOrLiteral, exp.Expression]]):
+ def ensure_col(cls, value: t.Optional[t.Union[ColumnOrLiteral, exp.Expression]]) -> Column:
return cls(value)
@classmethod
@@ -259,7 +259,7 @@ class Column:
new_expression = exp.Not(this=exp.Is(this=self.column_expression, expression=exp.Null()))
return Column(new_expression)
- def cast(self, dataType: t.Union[str, DataType]):
+ def cast(self, dataType: t.Union[str, DataType]) -> Column:
"""
Functionality Difference: PySpark cast accepts a datatype instance of the datatype class
Sqlglot doesn't currently replicate this class so it only accepts a string