Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions sdk/python/feast/infra/compute_engines/local/nodes.py
Original file line number Diff line number Diff line change
Expand Up @@ -361,10 +361,11 @@ def __init__(

def execute(self, context: ExecutionContext) -> ArrowTableValue:
input_table = self.get_single_table(context).data
context.node_outputs[self.name] = input_table
output = ArrowTableValue(data=input_table)
context.node_outputs[self.name] = output

if input_table.num_rows == 0:
return input_table
return output

if self.feature_view.online:
online_store = context.online_store
Expand Down Expand Up @@ -403,4 +404,4 @@ def execute(self, context: ExecutionContext) -> ArrowTableValue:
progress=lambda x: None,
)

return input_table
return output
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,8 @@ def test_local_output_node():
node.add_input(MagicMock())
node.inputs[0].name = "source"
result = node.execute(context)
assert result.num_rows == 4
assert isinstance(result, ArrowTableValue)
assert result.data.num_rows == 4


def test_local_output_node_online_write_default_batch():
Expand Down
Loading