File tree Expand file tree Collapse file tree 2 files changed +9
-4
lines changed
Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Original file line number Diff line number Diff line change 11from typing import Union , Iterable
22import substrait .dataframe
3- from substrait .builders .plan import project
3+ from substrait .builders .plan import select
44from 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 ):
Original file line number Diff line number Diff line change 22import substrait .gen .proto .plan_pb2 as stp
33import substrait .gen .proto .algebra_pb2 as stalg
44from 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
66from substrait .extension_registry import ExtensionRegistry
77import 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
You can’t perform that action at this time.
0 commit comments