Helllo, I am using dremio cloud in 22.1.4 version and I observe an error with reflection
When I execute a query of that pattern
SELECT count(*) FROM a_table WHERE a_condition_filtering_all_rows
=> without reflection, it returns 0
=> with reflection, it returns null
If I execute the same query replacing star char by a column name, then the result is OK
Is it a known problem ? Is there a workaround to use star char ?
@tempestj Are you able to send the 2 job profiles?
count(*) should always return a type of BIGINT NOT NULL even if there are no records.
Here is an illustration
If I disable the reflection the query answer is ok, here is the successful profile
Thanks… looks like a bug with sum0. In the profile without the reflection, I can see 9 rows (from the 9 threads from phase 1) entering sum0 and it returns 0 as expected. However, with the reflection, no rows enter sum0 and it returns null. That seems like a bug. Usually, if the reflection had more data, we would have parallelized the scan and then this would have worked around the bug because the physical plan would have looked more like the working case with exchanges.