FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

fix: Wrap LocalOutputNode return value in ArrowTableValue for consist… by cutoutsy · Pull Request #6286 · feast-dev/feast · GitHub

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .py  (2) All 1 file type selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
      • nodes.py
      • test_nodes.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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

Back | FazBrowse Home | New Git URL