QuestionQ127

VerifiedCost & Performance Optimisation

The data science team has asked for help speeding up queries over free-form text in user reviews. The data is currently stored in Parquet with the following schema:

item_id INT, user_id INT, review_id INT, rating FLOAT, review STRING

The review column holds the complete text of each user-submitted review. In particular, the data science team wants to determine whether any of 30 keywords are present in this field.

A junior data engineer proposes converting this data to Delta Lake to improve query performance.

Which reply to the junior data engineer's suggestion is correct?

Explanation

Delta Lake data skipping relies on per-file statistics such as minimum and maximum values, null counts, and record counts; it does not provide a term matrix or inverted index for keyword searches. High-cardinality, long free-text strings therefore do not yield selective file-skipping statistics for arbitrary word-presence predicates, and long strings can be truncated during statistics collection. Delta Lake supports STRING columns, and the default data-skipping-statistics setting is 32 columns rather than four. Databricks: Data skipping

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!