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 7147a33 commit 1d887e7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions evadb/models/storage/batch.py
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,7 @@ def drop_column_alias(self, metadata=None) -> None:
new_col_names.append(col_name)
# Iterate over each column in the dataframe
self._frames.columns = new_col_names
if metadata is not None:
if metadata is not None and isinstance(input_meta, pd.DataFrame):
input_meta, output_meta = metadata
defined_column_names = [entry for entry in input_meta.columns]
defined_column_types = [entry for entry in input_meta.column_types]
Expand Down Expand Up @@ -601,7 +601,7 @@ def deduce_and_map_type(element, check_type):
for i, def_name in enumerate(list(defined_column_names)):
# check if shape match
sample_data = self._frames[col_name].iloc[0]
if is_shape_matching(sample_data, defined_column_shapes[i]):
if hasattr(sample_data,'shape') and is_shape_matching(sample_data, defined_column_shapes[i]):
basic_element = get_basic_element(sample_data)
if deduce_and_map_type(
basic_element, defined_column_types[i]
Expand Down

0 comments on commit 1d887e7

Please sign in to comment.