Repository navigation
Commit 1258c51
[fix](arrow-flight) Match the common Flight SQL table type names in GetTables
### What problem does this PR solve?
Issue Number: None
Related PR: #67899
Problem Summary: GetTables now filters the authorized tables by every requested
table type with an exact match against Doris's names (BASE TABLE, VIEW, SYSTEM
VIEW). Clients do not send those names. Flight SQL leaves the names to the
server but calls TABLE, VIEW and SYSTEM TABLE the commonly supported ones, and
that is what clients ask for: the ADBC Flight SQL driver sends "table" (Doris's
own ADBC catalog lists tables with getObjects(..., {"table"})), JDBC tools send
"TABLE". Before the exact filter, Doris only recognised VIEW and answered every
other type with all objects, so these requests worked; with it they match
nothing.
Reproduction: an ADBC catalog whose source is a Doris Arrow Flight SQL endpoint
lists no tables, so SHOW TABLES is empty and every query fails with "Unknown
table" (all 18 external_table_p0/adbc suites fail in the External pipeline);
JDBC getTables(..., {"TABLE"}) returns no rows and {"TABLE", "VIEW"} returns
only views.
Fix: map each requested type before matching. The comparison ignores case,
TABLE selects BASE TABLE and SYSTEM TABLE selects SYSTEM VIEW; any other name
still matches only a type of that name, so UNKNOWN still selects nothing.
### Release note
None
### Check List (For Author)
- Test: Unit Test / Regression test
- FlightSqlSchemaHelperTableTypesTest: table, TABLE + VIEW, view,
SYSTEM TABLE and mixed-case names, with and without schemas
- test_table_types_over_arrow_flight: TABLE, table, table + view through
Flight SQL JDBC
- external_table_p0/adbc suites against a local cluster
- Behavior changed: No (restores the listing these clients got before the
multi-type filter)
- Does this need documentation: No
Co-Authored-By: Claude Opus 5.5 <[email protected]>1 parent 2a31c4d commit 1258c51
3 files changed
Lines changed: 40 additions & 5 deletions
File tree
- fe/fe-core/src
- main/java/org/apache/doris/arrowflight
- test/java/org/apache/doris/arrowflight
- regression-test/suites/arrow_flight_sql_p0
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
| 68 | + | |
68 | 69 | | |
69 | 70 | | |
70 | 71 | | |
| |||
84 | 85 | | |
85 | 86 | | |
86 | 87 | | |
87 | | - | |
| 88 | + | |
88 | 89 | | |
89 | 90 | | |
90 | 91 | | |
| |||
170 | 171 | | |
171 | 172 | | |
172 | 173 | | |
173 | | - | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
174 | 196 | | |
175 | 197 | | |
176 | 198 | | |
| |||
353 | 375 | | |
354 | 376 | | |
355 | 377 | | |
356 | | - | |
| 378 | + | |
357 | 379 | | |
358 | 380 | | |
359 | | - | |
| 381 | + | |
360 | 382 | | |
361 | 383 | | |
362 | 384 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
72 | | - | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
73 | 81 | | |
74 | 82 | | |
75 | 83 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
86 | 86 | | |
87 | 87 | | |
88 | 88 | | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
89 | 94 | | |
90 | 95 | | |
91 | 96 | | |
| |||
0 commit comments