zy-kkk opened a new pull request, #35771:
URL: https://github.com/apache/doris/pull/35771
## Proposed changes
pick #34516,#34779
This PR supports a Table Value Function called `Query`. He can push a query
directly to the catalog source for execution by specifying `catalog` and
`query` without parsing by Doris. Doris only receives the results returned by
the query. Currently only JDBC Catalog is supported.
Example:
```
Doris > desc function query('catalog' = 'mysql','query' = 'select count(*)
as cnt from test.test');
+-------+--------+------+------+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-------+--------+------+------+---------+-------+
| cnt | BIGINT | Yes | true | NULL | NONE |
+-------+--------+------+------+---------+-------+
Doris > select * from query('catalog' = 'mysql','query' = 'select count(*)
as cnt from test.test');
+----------+
| cnt |
+----------+
| 30000000 |
+----------+
```
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]