-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Open
Description
Search before asking
- I had searched in the issues and found no similar issues.
Description
Doris has an open api to observe table schema information. See here.
Currently, schema information is attached to the response body, like below.
{
"msg": "success",
"code": 0,
"data": {
"properties": [{
"type": "INT",
"name": "k1",
"comment": "",
"aggregation_type":""
}, {
"type": "INT",
"name": "k2",
"comment": "",
"aggregation_type":"MAX"
}],
"keysType":UNIQUE_KEYS,
"status": 200
},
"count": 0
}
It would be better to show more details here, which would help a lot when debugging, especially column unique id and schema version.
Solution
- The related api logic is in org.apache.doris.httpv2.rest.TableSchemaAction.
- Column unique id is addressed in org.apache.doris.catalog.Column.
- Schema version is addressed in org.apache.doris.catalog.MaterializedIndexMeta
Attach column unique ids to column informantion in properties, and add a schema version field. Expected result may be like:
{
"msg": "success",
"code": 0,
"data": {
"properties": [{
"column_uid" : "0",
"type": "INT",
"name": "k1",
"comment": "",
"aggregation_type":""
}, {
"column_uid" : "1",
"type": "INT",
"name": "k2",
"comment": "",
"aggregation_type":"MAX"
}],
"keysType":UNIQUE_KEYS,
"schema_version": 1
"status": 200
},
"count": 0
}
Are you willing to submit PR?
- Yes I am willing to submit a PR!
Code of Conduct
- I agree to follow this project's Code of Conduct