hutiefang76 opened a new pull request, #67899:
URL: https://github.com/apache/doris/pull/67899
### What problem does this PR solve?
Related to #67578 (partial A3).
Flight SQL clients can obtain FlightInfo for GetTableTypes, but reading its
ticket fails with UNIMPLEMENTED. GetTables also forwards only the first
table_types entry to a service that treats only VIEW as a filter: [VIEW, BASE
TABLE] loses base tables, while [BASE TABLE] or an unknown type can return
excluded rows.
Implement the type stream using the same Doris names as GetTables, sorted
according to Flight SQL. Match the complete filter against the existing
authorized listing before collecting optional schemas. Request only name/type
metadata to avoid unused table statistics, and retain the session guard and
Arrow buffer cleanup on failed sends.
### Release note
Flight SQL clients can enumerate supported table types and filter table
metadata by multiple types accurately.
### Check List (For Author)
- Test:
- [x] Unit Test: 30 passed via run-fe-ut.sh, including 19 new regression
cases and 11 existing producer/schema cases.
- Baseline: the 19 new cases produced 15 failures/errors on unmodified
master, reproducing UNIMPLEMENTED and incorrect filtering.
- Coverage includes both schema modes, filter order, unknown/duplicate
types, external catalog propagation, serialized column alignment and repeated
success/failure buffer cleanup.
- FE Checkstyle: 0 violations.
- No live-cluster or end-to-end ADBC driver test was run.
- Behavior changed: Yes. GetTableTypes now returns BASE TABLE, SYSTEM VIEW
and VIEW. Empty type filters retain all authorized tables; unknown-only filters
return no rows.
- Does this need documentation: No new configuration or API schema.
Validation command (JDK 17, matching Thrift 0.24.0 compiler):
```sh
bash run-fe-ut.sh --run
org.apache.doris.arrowflight.FlightSqlTableTypesTest,org.apache.doris.arrowflight.FlightSqlSchemaHelperTableTypesTest,org.apache.doris.arrowflight.DorisFlightSqlProducerTest,org.apache.doris.arrowflight.FlightSqlSchemaHelperArrowTypeTest
```
--
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]