You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by "TangSiyang2001 (via GitHub)" <gi...@apache.org> on 2025/10/10 09:59:49 UTC

[I] [Enhancement] More information for table schema open api [doris]

TangSiyang2001 opened a new issue, #56800:
URL: https://github.com/apache/doris/issues/56800

   ### Search before asking
   
   - [x] I had searched in the [issues](https://github.com/apache/doris/issues?q=is%3Aissue) and found no similar issues.
   
   
   ### Description
   
   Doris has an open api to observe table schema information. [See here.](https://doris.apache.org/docs/3.0/admin-manual/open-api/fe-http/table-schema-action)
   
   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
   
   
   1. The related api logic is in org.apache.doris.httpv2.rest.TableSchemaAction.
   2. Column unique id is addressed in org.apache.doris.catalog.Column.
   3. 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
   
   - [x] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


Re: [I] [Enhancement] More information for table schema open api [doris]

Posted by "luwei16 (via GitHub)" <gi...@apache.org>.
luwei16 closed issue #56800: [Enhancement] More information for table schema open api
URL: https://github.com/apache/doris/issues/56800


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


Re: [I] [Enhancement] More information for table schema open api [doris]

Posted by "Dragonliu2018 (via GitHub)" <gi...@apache.org>.
Dragonliu2018 commented on issue #56800:
URL: https://github.com/apache/doris/issues/56800#issuecomment-3397967114

   i want to try it.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org