pbanakar opened a new pull request, #3906:
URL: https://github.com/apache/fluss/pull/3906
### Purpose
Linked issue: close #3901
`FlinkCatalog#listFunctions`, `#functionExists`, and `#getFunction` resolved
the built-in RoaringBitmap SQL functions (introduced in FIP-37) purely by
function name, ignoring the database component of the request entirely. As a
result, a fully qualified reference to a built-in function resolved
successfully even when its database did not exist, e.g.:
```sql
SELECT fluss_catalog.nonexistent_db.rb_build(ARRAY[1, 2]);
```
This broke the database-scoped semantics Flink catalogs are expected to
guarantee, and made it impossible to rely on the database component of
`<catalog>.<database>.<function>` identifying an existing database.
### Brief change log
- `FlinkCatalog.java`:
- `listFunctions(String dbName)` now throws `DatabaseNotExistException` if
`dbName` does not exist, before returning the built-in bitmap function names.
- `functionExists(ObjectPath)` now returns `false` if the object path's
database does not exist, before checking the built-in function map.
- `getFunction(ObjectPath)` now throws `FunctionNotExistException` if the
object path's database does not exist, before resolving the function class.
- All three reuse the existing `databaseExists(String)` (already backed by
`admin.databaseExists()`), so no new dependency or RPC path was introduced.
- Built-in functions still resolve unqualified from any existing database
— only the database-existence gate is new; no scoping to a specific database
was added.
### Tests
- Verified locally:
- `./mvnw test -pl fluss-flink/fluss-flink-common
-Dtest="FlinkCatalogTest"` — BUILD SUCCESS
- `./mvnw verify -pl fluss-flink/fluss-flink-common
-Dit.test="Flink118CatalogITCase,Flink119CatalogITCase,Flink120CatalogITCase,Flink22CatalogITCase,RbFunctionsCatalogITCase"`
— BUILD SUCCESS
### API and Format
no new public API is introduced.
### Documentation
No user-facing documentation changes needed
--
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]