Skip to content

Commit d0fe0a9

Browse files
MattDelacMwad22
authored andcommitted
Rename to_table to to_arrow (feast-dev#1671)
Signed-off-by: Matt Delacour <matt.delacour@shopify.com> Signed-off-by: Mwad22 <51929507+Mwad22@users.noreply.github.com>
1 parent 12dbbea commit d0fe0a9

9 files changed

Lines changed: 10 additions & 11 deletions

File tree

sdk/python/feast/infra/gcp.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ def materialize_single_feature_view(
110110
start_date=start_date,
111111
end_date=end_date,
112112
)
113-
table = offline_job.to_table()
113+
table = offline_job.to_arrow()
114114

115115
if feature_view.input.field_mapping is not None:
116116
table = _run_field_mapping(table, feature_view.input.field_mapping)

sdk/python/feast/infra/local.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ def materialize_single_feature_view(
109109
end_date=end_date,
110110
config=config,
111111
)
112-
table = offline_job.to_table()
112+
table = offline_job.to_arrow()
113113

114114
if feature_view.input.field_mapping is not None:
115115
table = _run_field_mapping(table, feature_view.input.field_mapping)

sdk/python/feast/infra/offline_stores/bigquery.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ def _block_until_done():
277277
print(f"Done writing to '{job_config.destination}'.")
278278
return str(job_config.destination)
279279

280-
def to_table(self) -> pyarrow.Table:
280+
def to_arrow(self) -> pyarrow.Table:
281281
return self.client.query(self.query).to_arrow()
282282

283283

sdk/python/feast/infra/offline_stores/file.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ def to_df(self):
3838
df = self.evaluation_function()
3939
return df
4040

41-
def to_table(self):
41+
def to_arrow(self):
4242
# Only execute the evaluation function to build the final historical retrieval dataframe at the last moment.
4343
df = self.evaluation_function()
4444
return pyarrow.Table.from_pandas(df)

sdk/python/feast/infra/offline_stores/offline_store.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ def to_df(self) -> pd.DataFrame:
3333
pass
3434

3535
@abstractmethod
36-
def to_table(self) -> pyarrow.Table:
36+
def to_arrow(self) -> pyarrow.Table:
3737
"""Return dataset as pyarrow Table synchronously"""
3838
pass
3939

sdk/python/tensorflow_metadata/proto/v0/path_pb2.py

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sdk/python/tensorflow_metadata/proto/v0/schema_pb2.py

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sdk/python/tensorflow_metadata/proto/v0/statistics_pb2.py

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sdk/python/tests/test_historical_retrieval.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -508,7 +508,7 @@ def test_historical_features_from_bigquery_sources(
508508
check_dtype=False,
509509
)
510510

511-
table_from_sql_entities = job_from_sql.to_table()
511+
table_from_sql_entities = job_from_sql.to_arrow()
512512
assert_frame_equal(
513513
actual_df_from_sql_entities, table_from_sql_entities.to_pandas()
514514
)
@@ -594,8 +594,7 @@ def test_historical_features_from_bigquery_sources(
594594
.reset_index(drop=True),
595595
check_dtype=False,
596596
)
597-
598-
table_from_df_entities = job_from_df.to_table()
597+
table_from_df_entities = job_from_df.to_arrow()
599598
assert_frame_equal(
600599
actual_df_from_df_entities, table_from_df_entities.to_pandas()
601600
)

0 commit comments

Comments
 (0)