Skip to content

Commit fb4db29

Browse files
dorellangcopybara-github
authored andcommitted
Update edw_index_ingestion_benchmark.
PiperOrigin-RevId: 828028302
1 parent 541f0ff commit fb4db29

File tree

5 files changed

+372
-149
lines changed

5 files changed

+372
-149
lines changed

perfkitbenchmarker/edw_service.py

Lines changed: 30 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
Classes to wrap specific backend services are in the corresponding provider
1717
directory as a subclass of BaseEdwService.
1818
"""
19+
import datetime
1920
import os
2021
from typing import Any, Dict, List
2122

@@ -181,7 +182,7 @@
181182
'edw_search_data_location',
182183
None,
183184
'Cloud directory of bucket to source ongoing load data '
184-
'for EDW search benchmarks.',
185+
'for EDW search benchmarks (without rare token).',
185186
)
186187
EDW_SEARCH_INDEX_NAME = flags.DEFINE_string(
187188
'edw_search_index_name',
@@ -761,7 +762,12 @@ def GetTableRowCount(self, table_path: str) -> tuple[int, dict[str, Any]]:
761762
raise NotImplementedError
762763

763764
def TextSearchQuery(
764-
self, table_path: str, search_keyword: str, index_name: str
765+
self,
766+
table_path: str,
767+
search_keyword: str,
768+
order_by: str | None = None,
769+
limit: int | None = None,
770+
date_between: tuple[datetime.date, datetime.date] | None = None,
765771
) -> tuple[float, dict[str, Any]]:
766772
"""Executes a text search query against a table.
767773
@@ -781,7 +787,28 @@ def TextSearchQuery(
781787
Args:
782788
table_path: The full path or name of the table to query.
783789
search_keyword: The text to search for within the indexed columns.
784-
index_name: The name of the search index to use for the query.
790+
order_by: The column to order the results by.
791+
limit: The maximum number of rows to return.
792+
date_between: A tuple of two dates to filter the results by.
793+
794+
Returns:
795+
A tuple of execution time in seconds and a dictionary of metadata.
796+
"""
797+
raise NotImplementedError
798+
799+
def InjectTokenIntoTable(
800+
self, table_path: str, token: str, token_count: int
801+
) -> tuple[float, dict[str, Any]]:
802+
"""Updates N rows to append a token to a well-known string column.
803+
804+
Metadata returned by this method is arbitrary, and is for the purpose of
805+
inclusion in benchmark result metadata. The presence or absence of specific
806+
values should not be relied on.
807+
808+
Args:
809+
table_path: The full path or name of the table to insert data into.
810+
token: The token to append to the column.
811+
token_count: The number of rows to update.
785812
786813
Returns:
787814
A tuple of execution time in seconds and a dictionary of metadata.

0 commit comments

Comments
 (0)