A reflection with 0 row will not accelerate the corresponding query

Recently, in Dremio 3.1.3, I noticed that if a created reflection doesn’t contain any row, the query which is expected to be accelerated by that reflection will do real database query instead…

I expect that the query will hit the reflection and return soon as the result should be empty.

Hi @pisces312

A reflection is like a relational cache, hence when a reflection not matched will do the query on the database, and not gives any empty/NULL results.

Thanks
@Venugopal_Menda

Let me take an example.

  1. Create an anchor dataset by SQL A.
  2. Create reflection by anchor dataset.
  3. Use A to query Dremio. It should be accelerated as we use the same query as reflection.
    But if query A has empty result, the query cannot be accelerated but do real db query. I think it should hit the reflection and then get empty result.