Error running query on reflection


Dremio is throwing an error on my query when I enable reflections on the data. I can run the query without reflections without any problems.

The error is “Cannot convert RexNode to equivalent Dremio expression. RexNode Class: org.apache.calcite.rex.RexOver, RexNode Digest: COUNT($3) OVER (PARTITION BY $0 ORDER BY $1 ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW)”

The query profiles for the successful and failing queries are attached. Does anyone have any idea what could be happening?

-Mike (36.5 KB) (54.2 KB)

Hi - is there any update on this? We’re still running into this error on the most recent release (4.3.1).

Hello @panomike

Can we get the DDL’s for the below?


Also, may i know the source?

We need to repro this.


Hey @Rakesh_Malugu,

See the attached SQL for the DDL for those tables. This is running on Snowflake.

Thanks! (2.1 KB)

Hello @panomike

Apart of the query says that

"SUM(t2.__billed_charge_local_micro_microdollars / 1000000) AS spend "

where t2 is “cp36434”.metrics3_stg.twitter_views.metric_campaigns_hourly" .

In the provided DDL I do not see this column. Can you confirm?


Hi @Rakesh_Malugu,

Sorry about that - the field got removed as I was cleaning up internal SQL DDL for upload here.

That field is a DECIMAL field - I have attached an updated DDL.

Mike (2.6 KB)


I see that the failed query is not used the reflection at all.

Can you confirm once again, that the query got failed just because you created the reflection on the data?

If query got failed using the reflection then I can check. But here the failed query didn’t used accelerations and failed in planning state itself.

So, I do not see the evidence that the problem is with the creation of reflection here.