English 中文(简体)
Druid压缩大精子的复合功能
原标题:Aggregate function for compressed big decimal in Druid
  • 时间:2023-12-27 17:12:28
  •  标签:
  • druid

I have a column in Druid database with the type of Compressed Big Decimal. I can not use any aggregate functions like sum or even other functions like ABS on this columns.

当我试图使用像以下苏姆这样的综合职能时。

摘自我的表

它给我留下以下错误。

不能将SUM适用于SUM(<COMPLEX>)的论点。 辅助表格:小型卫星

问题回答

Unfortunately, Druid does not support aggregate functions on COMPRESSED BIG DECIMAL. I had to use API query instead of Native SQL like:

{
  "queryType": "timeseries",
  "dataSource": "mytable",
  "intervals": [ "2022-01-01T00:00:00.000/2024-01-01T00:00:00.000" ],
  "granularity": "all",
  "aggregations": [
    { "type": "compressedBigDecimalSum", "name": "mycolumn", "mycolumn": "adItemPrice" }
  ],
  "filter": {
    "type": "selector",
    "dimension": "myOtherColumn",
    "value": "myValue"
  },
  "context": {
    "grandTotal": true
  }
}




相关问题
热门标签