Read Primitives — Simple Text Search
Read Primitives benchmark · all Read Primitives queries
Basic full-text search using string pattern matching
Representative SQL
Rendered in the benchmark’s native SQL with default parameters (no dialect translation available).
SELECT p_partkey, p_name, p_mfgr, p_commentFROM partWHERE MATCH(p_name, p_comment) AGAINST('STEEL COPPER' IN NATURAL LANGUAGE MODE)LIMIT 100Representative DataFrame
Expression family (Polars, PySpark, DataFusion), default parameters.
def fulltext_simple_search_expression_impl(ctx: DataFrameContext) -> Any: part = ctx.get_table("part") col = ctx.col
return ( part.filter( col("p_name").str.contains("STEEL") | col("p_name").str.contains("COPPER") | col("p_comment").str.contains("STEEL") | col("p_comment").str.contains("COPPER") ) .select("p_partkey", "p_name", "p_mfgr", "p_comment") .limit(100) )Get the exact query for your run
The blocks above are representative. To get the precise statement a specific platform runs at a specific scale, substitute your own values:
from benchbox import ReadPrimitives
bench = ReadPrimitives(scale_factor=0.01) # your scale factorqueries = bench.get_queries(dialect="datafusion") # your platform's dialect; drop dialect= for native SQLprint(queries['fulltext_simple_search'])For the DataFrame form:
from benchbox.core.query_catalog import get_dataframe_render
print(get_dataframe_render('read_primitives', 'fulltext_simple_search', family="expression").source) # or family="pandas"Source
Query text: benchbox/core/read_primitives/queries.py