Files
greptimedb/tests/cases/standalone/common/information_schema/table_constraints.result
T
dennis zhuang 3d12273c84 feat: read-time entity relationships graph over telemetry (M0+M1) (#8614)
* feat(table): add entity semantic declarations

Define open-ended greptime.semantic.entity.* options, validate entity columns at DDL time, and stamp OTLP trace tables with the service entity declaration.

Signed-off-by: Dennis Zhuang <killme2008@gmail.com>

* feat: add read-time entity relationships graph

Add computed semantic graph tables, typed DataFusion derivation plans for entity registry and trace calls edges, and streaming read-time execution.

Signed-off-by: Dennis Zhuang <killme2008@gmail.com>

* test: exclude semantic graph tables from table constraints

Signed-off-by: Dennis Zhuang <killme2008@gmail.com>

* refactor(operator): name the plan-builder source groupings

Review feedback: build_registry_plan / build_calls_plan took anonymous
(declarations, DataFrame) tuples while the caller already grouped the same
fields. Introduce RegistrySource { declarations, scan } and CallsSource
{ service, scan } next to the builders and flow them through the frontend
caller and tests. The frontend-side EntitySource keeps holding a TableRef
(the operator builders stay pure over already-built scans), so the named
structs live in operator rather than reusing that type. No behavior change.

Signed-off-by: Dennis Zhuang <killme2008@gmail.com>

---------

Signed-off-by: Dennis Zhuang <killme2008@gmail.com>
2026-08-07 03:37:14 +00:00

73 lines
3.5 KiB
Plaintext

--- test information_schema.table_constraints ----
USE INFORMATION_SCHEMA;
Affected Rows: 0
DESC TABLE TABLE_CONSTRAINTS;
+--------------------+--------+-----+------+---------+---------------+
| Column | Type | Key | Null | Default | Semantic Type |
+--------------------+--------+-----+------+---------+---------------+
| constraint_catalog | String | | NO | | FIELD |
| constraint_schema | String | | NO | | FIELD |
| constraint_name | String | | NO | | FIELD |
| table_schema | String | | NO | | FIELD |
| table_name | String | | NO | | FIELD |
| constraint_type | String | | NO | | FIELD |
| enforced | String | | NO | | FIELD |
+--------------------+--------+-----+------+---------+---------------+
SELECT *
FROM TABLE_CONSTRAINTS
WHERE TABLE_SCHEMA != 'greptime_private'
ORDER BY TABLE_NAME, CONSTRAINT_NAME;
+--------------------+-------------------+-----------------+--------------+------------+-----------------+----------+
| constraint_catalog | constraint_schema | constraint_name | table_schema | table_name | constraint_type | enforced |
+--------------------+-------------------+-----------------+--------------+------------+-----------------+----------+
| def | public | PRIMARY | public | numbers | PRIMARY KEY | YES |
+--------------------+-------------------+-----------------+--------------+------------+-----------------+----------+
use public;
Affected Rows: 0
CREATE TABLE test(i double, j string, ts timestamp time index, primary key(j));
Affected Rows: 0
use INFORMATION_SCHEMA;
Affected Rows: 0
SELECT *
FROM TABLE_CONSTRAINTS
WHERE TABLE_SCHEMA != 'greptime_private'
ORDER BY TABLE_NAME, CONSTRAINT_NAME;
+--------------------+-------------------+-----------------+--------------+------------+-----------------+----------+
| constraint_catalog | constraint_schema | constraint_name | table_schema | table_name | constraint_type | enforced |
+--------------------+-------------------+-----------------+--------------+------------+-----------------+----------+
| def | public | PRIMARY | public | numbers | PRIMARY KEY | YES |
| def | public | PRIMARY | public | test | PRIMARY KEY | YES |
| def | public | TIME INDEX | public | test | TIME INDEX | YES |
+--------------------+-------------------+-----------------+--------------+------------+-----------------+----------+
SELECT * FROM TABLE_CONSTRAINTS WHERE TABLE_NAME = 'test' ORDER BY TABLE_NAME, CONSTRAINT_NAME;
+--------------------+-------------------+-----------------+--------------+------------+-----------------+----------+
| constraint_catalog | constraint_schema | constraint_name | table_schema | table_name | constraint_type | enforced |
+--------------------+-------------------+-----------------+--------------+------------+-----------------+----------+
| def | public | PRIMARY | public | test | PRIMARY KEY | YES |
| def | public | TIME INDEX | public | test | TIME INDEX | YES |
+--------------------+-------------------+-----------------+--------------+------------+-----------------+----------+
use public;
Affected Rows: 0
DROP TABLE test;
Affected Rows: 0