Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add column matching for function pipelining #1415

Closed
wants to merge 14 commits into from
Prev Previous commit
mock object unsubscripable error
Yifei Wang authored and Yifei Wang committed Nov 25, 2023
commit 438de475ec9f225c6ecac420f7b20fdbb491af7c
6 changes: 4 additions & 2 deletions evadb/models/storage/batch.py
Original file line number Diff line number Diff line change
@@ -459,7 +459,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 and isinstance(input_meta, pd.DataFrame):
if metadata is not None and isinstance(metadata[0], 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]
@@ -599,7 +599,9 @@ 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 hasattr(sample_data,'shape') and 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]