Files
greptimedb/tests/cases/standalone/common/promql/encode_substrait.sql
discord9 a9a3e0b121 fix: prom ql logical plan use column index not name (#7109)
* feat: use index not col name

Signed-off-by: discord9 <discord9@163.com>

* fix: use name without qualifier&output schema fix

Signed-off-by: discord9 <discord9@163.com>

* proto

Signed-off-by: discord9 <discord9@163.com>

* refactor: resolve column name/index

Signed-off-by: discord9 <discord9@163.com>

* pcr

Signed-off-by: discord9 <discord9@163.com>

* chore: update proto

Signed-off-by: discord9 <discord9@163.com>

* chore: update proto

Signed-off-by: discord9 <discord9@163.com>

---------

Signed-off-by: discord9 <discord9@163.com>
2025-10-22 09:04:09 +00:00

23 lines
541 B
SQL

create table count_total (
ts timestamp time index,
tag_a string,
tag_b string,
val double,
primary key (tag_a, tag_b),
);
-- if `RangeManipulate` can be encoded/decoded correctly in substrait, the following queries should pass
-- SQLNESS REPLACE (peers.*) REDACTED
-- SQLNESS REPLACE (partitioning.*) REDACTED
tql explain (0, 100, '1s')
increase(count_total{
tag_a="ffa",
}[1h])[12h:1h];
tql eval (0, 100, '1s')
increase(count_total{
tag_a="ffa",
}[1h])[12h:1h];
drop table count_total;