adithyashanker22 opened a new pull request, #505:
URL: https://github.com/apache/polaris/pull/505

   Ensure matching file prefixes when using polaris instance with FILE based 
storage.
   
   # Description
   
   We encountered a bug when attempting to register tables to a file-based 
instance of Polaris for testing. Through logging, we discovered an inconsistent 
file naming convention when comparing file:/// to /. This inconsistency caused 
the system to fail to recognize paths that were actually children as child 
paths, resulting in the isChildOf method failing every time.
   
   This change ensures that when comparing file paths in the isChildOf method, 
we use a consistent prefix. Additionally, this change enhances the robustness 
of the method by ensuring that comparisons are made between paths with similar 
prefixes, whether they start with / or file:///.
   
   Fixes # (issue)
   
   ## Type of change
   
   - Bug fix (non-breaking change which fixes an issue)
   
   # How Has This Been Tested?
   
   Please describe the tests that you ran to verify your changes. Provide 
instructions so we can reproduce. Please also list any relevant details for 
your test configuration
   
   - This test has been manually verified by registering tables and creating 
namespaces using the new method. The method ensures that namespaces and tables 
are only created and registered if they are part of the child directory, while 
also ensuring that comparisons are made between similar prefixes.
   
   **Test Configuration**:
   * Hardware: Macbook M3 Pro
   * Toolchain: 
   * SDK: Java 21
   
   # Checklist:
   
   Please delete options that are not relevant.
   
   - [x] I have performed a self-review of my code
   - [x] My changes generate no new warnings
   


-- 
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]

Reply via email to