diff --git a/ibis/backends/pyspark/compiler.py b/ibis/backends/pyspark/compiler.py index a78080dbc4bf..b7b3ca347471 100644 --- a/ibis/backends/pyspark/compiler.py +++ b/ibis/backends/pyspark/compiler.py @@ -329,7 +329,7 @@ def __sql_name__(self, op) -> str: raise TypeError(f"Cannot get SQL name for {type(op).__name__}") # builtin functions will not modify the name - if hasattr(op, "__input_type__") and op.__input_type__ == InputType.BUILTIN: + if getattr(op, "__input_type__", None) == InputType.BUILTIN: return name if not name.isidentifier():