Skip to content

Commit

Permalink
check for tag not exist
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 7344f3e commit 2b83449
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions evadb/models/storage/batch.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,10 +173,12 @@ def apply_function_expression(self, expr: Callable) -> Batch:
"""
Execute function expression on frames.
"""
input_tags = expr.forward.tags["input"][0]
output_tags = expr.forward.tags["output"][0]

self.drop_column_alias(metadata=(input_tags, output_tags))
if expr.forward.tags is not None:
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()

return Batch(expr(self._frames))

Expand Down Expand Up @@ -614,7 +616,7 @@ def deduce_and_map_type(element, check_type):
self._frames.rename(columns=column_rename_map, inplace=True)
new_cols = []
for col in self.columns:
new_cols.append(column_rename_map[col])
new_cols.append(col_name.split(".")[0] + "." + column_rename_map[col])
self.columns = new_cols

def to_numpy(self):
Expand Down

0 comments on commit 2b83449

Please sign in to comment.