morrySnow commented on code in PR #1807: URL: https://github.com/apache/doris-website/pull/1807#discussion_r1918854180
########## docs/sql-manual/sql-functions/table-valued-functions/frontends.md: ########## @@ -24,79 +24,51 @@ specific language governing permissions and limitations under the License. --> -## `frontends` +## Description -### Name +The table function generates the frontends temporary table, which allows you to view the FE node information in the current doris cluster. -frontends - -### description - -Table-Value-Function, generate a temporary table named `frontends`. This tvf is used to view the information of BE nodes in the doris cluster. - -This function is used in `FROM` clauses. - -#### syntax - -`frontends()` - -The table schema of `frontends()` tvf: +## Syntax +```sql +FRONTENDS() ``` -mysql> desc function frontends(); -+-------------------+------+------+-------+---------+-------+ -| Field | Type | Null | Key | Default | Extra | -+-------------------+------+------+-------+---------+-------+ -| Name | TEXT | No | false | NULL | NONE | -| Host | TEXT | No | false | NULL | NONE | -| EditLogPort | TEXT | No | false | NULL | NONE | -| HttpPort | TEXT | No | false | NULL | NONE | -| QueryPort | TEXT | No | false | NULL | NONE | -| RpcPort | TEXT | No | false | NULL | NONE | -| ArrowFlightSqlPort| TEXT | No | false | NULL | NONE | -| Role | TEXT | No | false | NULL | NONE | -| IsMaster | TEXT | No | false | NULL | NONE | -| ClusterId | TEXT | No | false | NULL | NONE | -| Join | TEXT | No | false | NULL | NONE | -| Alive | TEXT | No | false | NULL | NONE | -| ReplayedJournalId | TEXT | No | false | NULL | NONE | -| LastHeartbeat | TEXT | No | false | NULL | NONE | -| IsHelper | TEXT | No | false | NULL | NONE | -| ErrMsg | TEXT | No | false | NULL | NONE | -| Version | TEXT | No | false | NULL | NONE | -| CurrentConnected | TEXT | No | false | NULL | NONE | -+-------------------+------+------+-------+---------+-------+ -17 rows in set (0.022 sec) -``` - -The information displayed by the `frontends` tvf is basically consistent with the information displayed by the `show frontends` statement. However, the types of each field in the `frontends` tvf are more specific, and you can use the `frontends` tvf to perform operations such as filtering and joining. - -The information displayed by the `frontends` tvf is authenticated, which is consistent with the behavior of `show frontends`, user must have ADMIN/OPERATOR privelege. -### example +## Access Control Requirements + +| Privilege | Object | Notes | +| :--------- |:-------|:------| +| ADMIN_PRIV | global | | + +## Return Value Review Comment: 这个改成表格形式吧 ########## docs/sql-manual/sql-functions/table-valued-functions/backends.md: ########## @@ -24,89 +24,60 @@ specific language governing permissions and limitations under the License. --> -## `backends` +## Description -### Name +The table function generates the backends temporary table, and you can view the BE node information in the current doris cluster. -backends - -### description - -Table-Value-Function, generate a temporary table named `backends`. This tvf is used to view the information of BE nodes in the doris cluster. - -This function is used in `FROM` clauses. - -#### syntax - -`backends()` - -The table schema of `backends()` tvf: +## Syntax +```sql +BACKENDS() ``` -mysql> desc function backends(); -+-------------------------+---------+------+-------+---------+-------+ -| Field | Type | Null | Key | Default | Extra | -+-------------------------+---------+------+-------+---------+-------+ -| BackendId | BIGINT | No | false | NULL | NONE | -| Host | TEXT | No | false | NULL | NONE | -| HeartbeatPort | INT | No | false | NULL | NONE | -| BePort | INT | No | false | NULL | NONE | -| HttpPort | INT | No | false | NULL | NONE | -| BrpcPort | INT | No | false | NULL | NONE | -| LastStartTime | TEXT | No | false | NULL | NONE | -| LastHeartbeat | TEXT | No | false | NULL | NONE | -| Alive | BOOLEAN | No | false | NULL | NONE | -| SystemDecommissioned | BOOLEAN | No | false | NULL | NONE | -| TabletNum | BIGINT | No | false | NULL | NONE | -| DataUsedCapacity | BIGINT | No | false | NULL | NONE | -| AvailCapacity | BIGINT | No | false | NULL | NONE | -| TotalCapacity | BIGINT | No | false | NULL | NONE | -| UsedPct | DOUBLE | No | false | NULL | NONE | -| MaxDiskUsedPct | DOUBLE | No | false | NULL | NONE | -| RemoteUsedCapacity | BIGINT | No | false | NULL | NONE | -| Tag | TEXT | No | false | NULL | NONE | -| ErrMsg | TEXT | No | false | NULL | NONE | -| Version | TEXT | No | false | NULL | NONE | -| Status | TEXT | No | false | NULL | NONE | -| HeartbeatFailureCounter | INT | No | false | NULL | NONE | -| NodeRole | TEXT | No | false | NULL | NONE | -+-------------------------+---------+------+-------+---------+-------+ -23 rows in set (0.002 sec) -``` - -The information displayed by the `backends` tvf is basically consistent with the information displayed by the `show backends` statement. However, the types of each field in the `backends` tvf are more specific, and you can use the `backends` tvf to perform operations such as filtering and joining. - -The information displayed by the `backends` tvf is authenticated, which is consistent with the behavior of `show backends`, user must have ADMIN/OPERATOR privelege. -### example +## Access Control Requirements + +| Privilege | Object | Notes | +| :--------- |:-------|:------| +| ADMIN_PRIV | global | | + +## Return Value Review Comment: 这个改成表格形式吧 -- 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-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org