Jefffrey commented on issue #4532:
URL: 
https://github.com/apache/arrow-datafusion/issues/4532#issuecomment-1415644141

   So the method of interest is here:
   
   
https://github.com/apache/arrow-datafusion/blob/1ec2a839645013cc9a2a4f78d8cadcec44d865e2/datafusion/common/src/table_reference.rs#L180-L196
   
   An interesting problem I've found is that since the method takes a `&str` 
and returns a `TableReference` bounded by the lifetime of that `&str`, it can't 
mutate it (well, allocate a new `String` based off of it). This raises the 
question of how this identifier would be parsed:
   
   ```rust
   ctx.register_table("\"foo\"\".bar\"", t);
   ```
   
   Which I believe should register a table `foo".bar`
   
   So it doesn't seem possible for current `TableReference` to handle this case 
as would need to allocate a new `String` to replace that inner `""` to just `"`
   
   It seems might be necessary to change `TableReference` to have `Cow<'a, 
str>` for its fields instead of raw `&'a str`'s but this affects the rest of 
the code base. Will give it a shot to see how it goes.


-- 
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: github-unsubscr...@arrow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to