Skip to content

Commit

Permalink
refactor(datafusion): get name from expr
Browse files Browse the repository at this point in the history
  • Loading branch information
gforsyth authored and kszucs committed Oct 5, 2022
1 parent 345b3b8 commit fea3e5b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion ibis/backends/datafusion/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ def execute(
return output.to_pandas()
elif isinstance(expr, ir.Column):
series = output.to_pandas()
series.name = "tmp"
series.name = expr.get_name()
return series
elif isinstance(expr, ir.Scalar):
return output.as_py()
Expand Down
2 changes: 1 addition & 1 deletion ibis/backends/datafusion/tests/test_udf.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def test_udf(alltypes):


def test_multiple_argument_udf(alltypes):
expr = my_add(alltypes.smallint_col, alltypes.int_col)
expr = my_add(alltypes.smallint_col, alltypes.int_col).name("tmp")
result = expr.execute()

df = alltypes[['smallint_col', 'int_col']].execute()
Expand Down

0 comments on commit fea3e5b

Please sign in to comment.