Delta Sharing & UC: Understanding the Initial Empty Predicate Query

mooze456
New Contributor

We're testing our Delta Sharing server with Unity Catalog (UC) and noticed a behavior where a simple query like SELECT COUNT(1) FROM table_name WHERE col1 = 'value' triggers two /query requests to our server.

The initial request arrives with empty predicateHints and limitHints. We suspect this is to fetch the table's schema and basic metadata, allowing the client to understand the data structure before applying filters. The subsequent request includes the predicateHints from our WHERE clause, which is the actual data retrieval query.

Our question is regarding the necessity of this first request. While it might seem redundant for data retrieval, it likely plays a role in client-side query planning and optimization by providing upfront schema information. Therefore, ignoring the first /query request is generally not recommended, as it could disrupt the client's ability to correctly process subsequent queries.

Are there specific issues or performance concerns driving the desire to ignore this initial request? Understanding the context might help in exploring alternative solutions.