如题,我在执行如下 sql 的时候报错:(1064, 'org.apache.doris.analysis.FunctionCallExpr cannot be cast to org.apache.doris.analysis.SlotRef')
SELECT from_unixtime(timestamp) AS ts
FROM t
WHERE timestamp = 1733241600
GROUP BY ts
表结构:
CREATE TABLE `t` (
`node` varchar(1023) NOT NULL COMMENT "",
`timestamp` bigint(20) NULL ,
`writeKafkaTs` bigint(20) REPLACE NULL ,
`value` float MAX NULL
) ENGINE=OLAP
AGGREGATE KEY(`node`, `timestamp`)
COMMENT "OLAP"
PARTITION BY RANGE(`timestamp`)
(PARTITION pold VALUES [("-9223372036854775808"), ("1609430400")),
PARTITION p202410 VALUES [("1727712000"), ("1730390400")),
PARTITION p202411 VALUES [("1730390400"), ("1732982400")),
PARTITION p202412 VALUES [("1732982400"), ("1735660800")),
PARTITION p202501 VALUES [("1735660800"), ("1738339200")))
DISTRIBUTED BY HASH(`node`) BUCKETS 10```
之前一直没问题。
我自己测试,将建表语句中的分区 partition 去掉后这个错误就会消失。