-
Notifications
You must be signed in to change notification settings - Fork 13
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Describe this problem
Steps to reproduce
- Create table
curl --location --request POST 'http://127.0.0.1:5440/sql' --data-raw '
CREATE TABLE `demo` (
`name` string TAG,
`value` double NOT NULL,
`t` timestamp NOT NULL,
`t2` timestamp NOT NULL,
timestamp KEY (t))
ENGINE=Analytic
with
(enable_ttl="false")
- Insert a row
curl --location --request POST 'http://127.0.0.1:5440/sql' --data-raw '
INSERT INTO demo (t, t2, name, value)
VALUES (1651737067000, 1651737067009, "ceresdb", 100)
'
- Query by http interface
curl --location --request POST 'http://127.0.0.1:5440/sql' --data-raw '
SELECT t, avg(value) FROM `demo` group by t
'
response:
{"rows":[{"t":1651737067000,"AVG(demo.value)":100.0}]}
- Query by Java SDK
CeresDBClient client = getClient();
String query = "SELECT t, avg(value) FROM `demo` group by t";
SqlQueryRequest request = new SqlQueryRequest(query);
CompletableFuture<Result<SqlQueryOk, Err>> future = client.sqlQuery(request);
Result<SqlQueryOk, Err> result = future.get();
System.out.println(result);
The response's rowCount is 0.
Expected behavior
Additional Information
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working