devoopsman45 opened a new pull request, #102:
URL: https://github.com/apache/datafusion-java/pull/102

   ## Which issue does this PR close?
   
   - Closes #101 .
   
   ## Rationale for this change
   SessionContext can let a caller register tables but there is no way to
   
       Check whether a table name is already registered
       Remove a registered table from the session
   
   This makes it tough to write safer code while registering
   
   ## What changes are included in this PR?
   
   - `SessionContext.tableExists(String name)` — returns true if a table
       with that name is registered in the session
     - `SessionContext.deregisterTable(String name)` — removes a registered
       table; no-op if the name is not found
   
     Both are thin JNI wrappers over DataFusion's existing
     `SessionContext::table_exist` and `SessionContext::deregister_table`
     on the Rust side.
   
   
   ## Are these changes tested?
   
   Yes. `SessionContextTableRegistrationTest` covers:
     - tableExists returns false for an unregistered table
     - tableExists returns true after registerCsv
     - deregisterTable removes a registered table
     - deregisterTable is a no-op for an unregistered table
     - Both methods throw IllegalStateException on a closed context
   
   
   -->
   
   ## Are there any user-facing changes?
   
     Yes — two new public methods on `SessionContext`. Additive only, no
     breaking changes.


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

Reply via email to