yuqi1129 opened a new pull request, #9450: URL: https://github.com/apache/gravitino/pull/9450
### What changes were proposed in this pull request? This pull request improves validation for table locations in the Lance catalog implementation. The main change is the introduction of a stricter check to ensure table locations are valid URIs or absolute file paths, preventing invalid or ambiguous locations from being used. Comprehensive unit and integration tests are also added to verify this behavior. **Validation improvements:** * Added a new `isValidLanceLocation` method in `LanceTableOperations` to validate that table locations are either valid URIs with a scheme or absolute file paths. This method is now used in table creation to enforce correct location formats. [[1]](diffhunk://#diff-0f917d044cc444092f273c9619772077d88a905b4543f9587a57b6c74d1bb0acR31-R40) [[2]](diffhunk://#diff-0f917d044cc444092f273c9619772077d88a905b4543f9587a57b6c74d1bb0acL110-R116) [[3]](diffhunk://#diff-0f917d044cc444092f273c9619772077d88a905b4543f9587a57b6c74d1bb0acR349-R378) **Testing enhancements:** * Added parameterized unit tests in `TestLanceTableOperations` to cover various valid and invalid location formats, ensuring the new validation logic works as intended. [[1]](diffhunk://#diff-00a450bde65f0cdc55b48e1f5e698558f9841516ee3ed98857115676702ca5d1R27) [[2]](diffhunk://#diff-00a450bde65f0cdc55b48e1f5e698558f9841516ee3ed98857115676702ca5d1R42-R44) [[3]](diffhunk://#diff-00a450bde65f0cdc55b48e1f5e698558f9841516ee3ed98857115676702ca5d1R96-R113) * Updated integration test `LanceRESTServiceIT` to assert that registering a table with an invalid location fails with the expected error message. ### Why are the changes needed? Better user experience. Fix: #9448 ### Does this PR introduce _any_ user-facing change? N/A. ### How was this patch tested? UTs and ITs -- 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]
