alamb opened a new pull request, #4530:
URL: https://github.com/apache/arrow-datafusion/pull/4530

   # Which issue does this PR close?
   
   Closes https://github.com/apache/arrow-datafusion/issues/4513
   
   # Rationale for this change
   
   See more details on https://github.com/apache/arrow-datafusion/issues/4513
   
   ```sql
   ❯ select * from "foo.bar";
   Plan("failed to resolve schema: foo")
   ```
   
   Should not be treating "foo" as a schema name
   
   The issue was that the SQL planner was flattening multi part identifiers 
like `['"foo"', 'bar']` into Strings like `'"foo".bar'` and then the strings 
were being parsed by 
https://github.com/apache/arrow-datafusion/blob/740a4fa2c6ba4b85875a433bb86e5b00435a5969/datafusion/common/src/table_reference.rs#L97
 which simply splits them on `.` rather than handling `"` properly
   # What changes are included in this PR?
   
   
   
   Changes:
   1. Add `OwnedTableReference`, And change the planner and relevant DML plan 
nodes to use that rather than a String
   2. Add docstrings in  `impl<'a> From<&'a str> for TableReference<'a> {` to 
document its limitatations.
   3. Added protobuf serialization support
   4. Tests for same
   
   
   The correct way to parse strings to refereces is to run through the SQL 
parser and our planner, but this API seems to be a fairly large part of the 
public API
   
   I filed a follow on ticket to track properly supporting name resolution via 
the API: XXXXX
   
   
   Things changed:
   
   Create memory table
   create view
   create external table
   drop table
   drop view
   
   # Are these changes tested?
   Yes
   
   # Are there any user-facing changes?
   Better support for names with periods


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