Skip to content

Commit

Permalink
Rename to_table to to_arrow (#1671)
Browse files Browse the repository at this point in the history
Signed-off-by: Matt Delacour <[email protected]>
  • Loading branch information
MattDelac authored Jun 29, 2021
1 parent 5a49470 commit d0ae38f
Show file tree
Hide file tree
Showing 9 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion sdk/python/feast/infra/gcp.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ def materialize_single_feature_view(
start_date=start_date,
end_date=end_date,
)
table = offline_job.to_table()
table = offline_job.to_arrow()

if feature_view.input.field_mapping is not None:
table = _run_field_mapping(table, feature_view.input.field_mapping)
Expand Down
2 changes: 1 addition & 1 deletion sdk/python/feast/infra/local.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ def materialize_single_feature_view(
end_date=end_date,
config=config,
)
table = offline_job.to_table()
table = offline_job.to_arrow()

if feature_view.input.field_mapping is not None:
table = _run_field_mapping(table, feature_view.input.field_mapping)
Expand Down
2 changes: 1 addition & 1 deletion sdk/python/feast/infra/offline_stores/bigquery.py
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ def _block_until_done():
print(f"Done writing to '{job_config.destination}'.")
return str(job_config.destination)

def to_table(self) -> pyarrow.Table:
def to_arrow(self) -> pyarrow.Table:
return self.client.query(self.query).to_arrow()


Expand Down
2 changes: 1 addition & 1 deletion sdk/python/feast/infra/offline_stores/file.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def to_df(self):
df = self.evaluation_function()
return df

def to_table(self):
def to_arrow(self):
# Only execute the evaluation function to build the final historical retrieval dataframe at the last moment.
df = self.evaluation_function()
return pyarrow.Table.from_pandas(df)
Expand Down
2 changes: 1 addition & 1 deletion sdk/python/feast/infra/offline_stores/offline_store.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def to_df(self) -> pd.DataFrame:
pass

@abstractmethod
def to_table(self) -> pyarrow.Table:
def to_arrow(self) -> pyarrow.Table:
"""Return dataset as pyarrow Table synchronously"""
pass

Expand Down
2 changes: 1 addition & 1 deletion sdk/python/tensorflow_metadata/proto/v0/path_pb2.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion sdk/python/tensorflow_metadata/proto/v0/schema_pb2.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion sdk/python/tensorflow_metadata/proto/v0/statistics_pb2.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions sdk/python/tests/test_historical_retrieval.py
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,7 @@ def test_historical_features_from_bigquery_sources(
check_dtype=False,
)

table_from_sql_entities = job_from_sql.to_table()
table_from_sql_entities = job_from_sql.to_arrow()
assert_frame_equal(
actual_df_from_sql_entities, table_from_sql_entities.to_pandas()
)
Expand Down Expand Up @@ -546,7 +546,7 @@ def test_historical_features_from_bigquery_sources(
.reset_index(drop=True),
check_dtype=False,
)
table_from_df_entities = job_from_df.to_table()
table_from_df_entities = job_from_df.to_arrow()
assert_frame_equal(
actual_df_from_df_entities, table_from_df_entities.to_pandas()
)

0 comments on commit d0ae38f

Please sign in to comment.