Skip to content

Commit 07f9464

Browse files
authored
fix session window (#409)
1 parent c9e5e39 commit 07f9464

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

docs/connect-data-in.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Connect Data In
22

3+
## Overview
4+
35
Timeplus supports multiple ways to load data into the system, or access the external data without copying them in Timeplus:
46

57
- [External Stream for Apache Kafka](/external-stream), Confluent, Redpanda, and other Kafka API compatible data streaming platform. This feature is also available in Timeplus Proton.

docs/usecases.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -240,8 +240,8 @@ group by window_start,window_end`
240240

241241
```sql
242242
SELECT cid,window_start,window_end,max(total_km)-min(total_km) AS trip_km
243-
FROM session(car_live_data, time, 5s, cid)
244-
GROUP BY __tp_session_id, cid, window_start, window_end
243+
FROM session(car_live_data, time, 5s)
244+
GROUP BY cid, window_start, window_end
245245
HAVING trip_km > 0
246246
```
247247

@@ -257,7 +257,7 @@ More complex queries can be created to aggregate the data by car id and trip end
257257
```sql
258258
with query_1 AS (
259259
select cid,window_start AS w_start,window_end AS w_end,max(total_km)-min(total_km) AS trip_km
260-
from session(car_live_data,time,20m, cid) group by __tp_session_id, cid, window_start, window_end
260+
from session(car_live_data,time,20m) group by cid, window_start, window_end
261261
)
262262
select cid,window_start,window_end,sum(trip_km)
263263
from tumble(query_1,w_end,1h) group by cid,window_start,window_end

0 commit comments

Comments
 (0)