zy-kkk opened a new pull request, #34516:
URL: https://github.com/apache/doris/pull/34516
## Proposed changes
Issue Number: close #xxx
This PR supports a Table Value Function called `Query`. He can push a query
directly to the catalog source for execution by specifying `catalog_name` and
`query` without parsing by Doris. Doris only receives the results returned by
the query.
Currently only MySQL and SAP HANA in JDBC Catalog are supported.
Example:
```
Doris > desc function query('catalog_name' = '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_name' = 'mysql','query' = 'select
count(*) as cnt from test.test');
+----------+
| cnt |
+----------+
| 30000000 |
+----------+
```
## Further comments
If this is a relatively large or complex change, kick off the discussion at
[[email protected]](mailto:[email protected]) by explaining why you
chose the solution you did and what alternatives you considered, etc...
--
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]