Skip to content

Commit 9fcd36a

Browse files
committed
fix: rebase on main
1 parent bd4682f commit 9fcd36a

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

src/substrait/dataframe/dataframe.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from typing import Union, Iterable
22
import substrait.dataframe
3-
from substrait.builders.plan import project
3+
from substrait.builders.plan import select
44
from substrait.dataframe.expression import Expression
55

66

@@ -29,7 +29,7 @@ def select(
2929
expressions = [e.expr for e in exprs] + [
3030
expr.alias(alias).expr for alias, expr in named_exprs.items()
3131
]
32-
return DataFrame(project(self.plan, expressions=expressions))
32+
return DataFrame(select(self.plan, expressions=expressions))
3333

3434
# TODO handle version
3535
def _with_version(self, version):

tests/dataframe/test_df_project.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import substrait.gen.proto.plan_pb2 as stp
33
import substrait.gen.proto.algebra_pb2 as stalg
44
from substrait.builders.type import boolean, i64
5-
from substrait.builders.plan import read_named_table
5+
from substrait.builders.plan import read_named_table, default_version
66
from substrait.extension_registry import ExtensionRegistry
77
import substrait.dataframe as sdf
88

@@ -48,7 +48,12 @@ def test_project():
4848
names=["id"],
4949
)
5050
)
51-
]
51+
],
52+
version=default_version,
5253
)
5354

55+
print(actual)
56+
print("--------------")
57+
print(expected)
58+
5459
assert actual == expected

0 commit comments

Comments
 (0)