feat: status_code in response header (#1982)

* feat: status_code in response header

* chore: parese grpc response

* fix: sqlness failed

* chore: fix sqlness
This commit is contained in:
JeremyHi
2023-07-19 19:27:49 +08:00
committed by GitHub
parent 2e2a82689c
commit 2ef0d06cdb
12 changed files with 199 additions and 54 deletions
@@ -0,0 +1,43 @@
CREATE TABLE test(i BIGINT TIME INDEX, j INTEGER, k INTEGER NOT NULL);
Affected Rows: 0
INSERT INTO test VALUES (1, 1, 11), (2, 2, 12);
Affected Rows: 2
SELECT * FROM test;
+---+---+----+
| i | j | k |
+---+---+----+
| 1 | 1 | 11 |
| 2 | 2 | 12 |
+---+---+----+
ALTER TABLE test DROP COLUMN j;
Affected Rows: 0
INSERT INTO test VALUES (3, NULL);
Error: 1004(InvalidArguments), Failed to insert value to table: greptime.public.test, source: Failed to operate table, source: Column k is not null but input has null
INSERT INTO test VALUES (3, 13);
Affected Rows: 1
SELECT * FROM test;
+---+----+
| i | k |
+---+----+
| 1 | 11 |
| 2 | 12 |
| 3 | 13 |
+---+----+
DROP TABLE test;
Affected Rows: 1
@@ -0,0 +1,15 @@
CREATE TABLE test(i BIGINT TIME INDEX, j INTEGER, k INTEGER NOT NULL);
INSERT INTO test VALUES (1, 1, 11), (2, 2, 12);
SELECT * FROM test;
ALTER TABLE test DROP COLUMN j;
INSERT INTO test VALUES (3, NULL);
INSERT INTO test VALUES (3, 13);
SELECT * FROM test;
DROP TABLE test;