-
Notifications
You must be signed in to change notification settings - Fork 5k
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Bug Description
I am encountering an internal error of Primary key column should not be none while executing this sql below
INSERT INTO us.ohlcv_1d(tbname, symbol, ts, open, high, low, close, volume) SELECT tbname, symbol, '2025-12-01T00:00:00.000-05:00', first(open), max(high), min(low), last(close), sum(volume) FROM us.ohlcv_1m WHERE symbol = 'AAPL' AND ts >= '2025-12-01T00:00:00.000-05:00' AND ts < '2025-12-02T00:00:00.000-05:00' PARTITION BY tbname, symbolIf I just execute the subquery alone, I get the correct result
SELECT tbname, symbol, '2025-12-01T00:00:00.000-05:00', first(open), max(high), min(low), last(close), sum(volume) FROM us.ohlcv_1m WHERE symbol = 'AAPL' AND ts >= '2025-12-01T00:00:00.000-05:00' AND ts < '2025-12-02T00:00:00.000-05:00' PARTITION BY tbname, symbol
I'm wondering if there is something wrong with my SQL statement, or if the feature is not supported, or if it's a bug?
To Reproduce
Steps to reproduce the behavior:
Execute the following SQL statement
INSERT INTO us.ohlcv_1d(tbname, symbol, ts, open, high, low, close, volume) SELECT tbname, symbol, '2025-12-01T00:00:00.000-05:00', first(open), max(high), min(low), last(close), sum(volume) FROM us.ohlcv_1m WHERE symbol = 'AAPL' AND ts >= '2025-12-01T00:00:00.000-05:00' AND ts < '2025-12-02T00:00:00.000-05:00' PARTITION BY tbname, symbolExpected Behavior
A piece of data is inserted into the us.ohlcv_1d Stable.
Screenshots
Environment (please complete the following information):
- OS: [e.g. CentOS 7.0]
Docker image tdengine/tsdb - Memory, CPU, current Disk Space
6G 6U 100G - TDengine Version [e.g. 1.6.1.7]
3.3.8.8
Additional Context
No
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working