Skip to content

Commit

Permalink
mock object unsubscripable error
Browse files Browse the repository at this point in the history
  • Loading branch information
Yifei Wang authored and Yifei Wang committed Nov 25, 2023
1 parent c00b0f3 commit 7147a33
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions evadb/models/storage/batch.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,16 +173,18 @@ def apply_function_expression(self, expr: Callable) -> Batch:
"""
Execute function expression on frames.
"""

if (
hasattr(expr, "forward")
and hasattr(expr.forward, "tags")
and (len(expr.forward.tags["input"]) != 0)
):
input_tags = expr.forward.tags["input"][0]
output_tags = expr.forward.tags["output"][0]
self.drop_column_alias(metadata=(input_tags, output_tags))
else:
try:
if (
hasattr(expr, "forward")
and hasattr(expr.forward, "tags")
and (len(expr.forward.tags["input"]) != 0)
):
input_tags = expr.forward.tags["input"][0]
output_tags = expr.forward.tags["output"][0]
self.drop_column_alias(metadata=(input_tags, output_tags))
else:
self.drop_column_alias()
except (TypeError, KeyError):
self.drop_column_alias()

return Batch(expr(self._frames))
Expand Down

0 comments on commit 7147a33

Please sign in to comment.