cube-js/cube

Getting Unsupported filter scalar: int32(3) while executing query which filters dayofweek

Open

#7,598 建立於 2024年1月4日

在 GitHub 查看
 (4 留言) (0 反應) (2 負責人)Rust (1,965 fork)batch import
api:sqlhelp wanted

倉庫指標

Star
 (19,563 star)
PR 合併指標
 (平均合併 5天 16小時) (30 天內合併 138 個 PR)

描述

Failed SQL

select
  'b2c_orders' as metric_name,
  measure(b2c_orders) as metric_value,
  date_trunc('week', time) as time
from product_revenue 
where dayofweek <= EXTRACT(DOW from current_date)
GROUP by 1,3

Logical Plan Not able to get the logical plan, getting the same error while appending "explain" keyword to the query.

Error postgresql error: Error during rewrite: Unexpected panic. Reason: Unsupported filter scalar: Int32(4). Please check logs for additional information.

Version: 0.34.36

Additional context

  1. dayofweek is a simple dimension of type number in the cube 'product_revenue'
  2. If I use a constant value on the either side of the filter, for eg: '2 <= EXTRACT(DOW from current_date)', or 'dayofweek <= 2', it works just fine.

貢獻者指南