You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/04/22 20:18:51 UTC

[GitHub] [arrow-datafusion] andygrove opened a new issue, #2319: Improve UX of looking up a DFSchema column by name

andygrove opened a new issue, #2319:
URL: https://github.com/apache/arrow-datafusion/issues/2319

   **Is your feature request related to a problem or challenge? Please describe what you are trying to do.**
   I have a simple schema containing a column with the qualified name `df.a`:
   
   ``` rust
   let schema = DFSchema::new_with_metadata(vec![
       DFField::new(Some("df"), "a", DataType::Int64, false),
   
   ], HashMap::new())?;
   ```
   
   If I attempt to look this up using `schema.index_of("df.a")` I get the very confusing error `No field named 'df.a'. Valid fields are 'df.a'.`.
   
   There is an `index_of_column_by_name(&self, qualifier: Option<&str>, name: &str)` which would be a better API to call and this works as expected but it is not public.
   
   As a workaround I have to use `index_of_column(&Column::from_qualified_name("df.a"))` instead, creating a temporary data structure and invoking a tokenizer which seems heavyweight.
   
   **Describe the solution you'd like**
   My proposal would be:
   
   - Deprecate `index_of(&self, name: &str)` and also have it return an error if passed a qualified name
   - Make `index_of_column_by_name` public
   
   **Describe alternatives you've considered**
   None
   
   **Additional context**
   None
   


-- 
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-unsubscribe@arrow.apache.org.apache.org

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


[GitHub] [arrow-datafusion] xudong963 closed issue #2319: Improve UX of looking up a DFSchema column by name

Posted by GitBox <gi...@apache.org>.
xudong963 closed issue #2319: Improve UX of looking up a DFSchema column by name
URL: https://github.com/apache/arrow-datafusion/issues/2319


-- 
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-unsubscribe@arrow.apache.org

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


[GitHub] [arrow-datafusion] andygrove commented on issue #2319: Improve UX of looking up a DFSchema column by name

Posted by GitBox <gi...@apache.org>.
andygrove commented on issue #2319:
URL: https://github.com/apache/arrow-datafusion/issues/2319#issuecomment-1106839519

   I just noticed there is also `field_with_name` which would work fine, so I think all we need to is deprecate `index_of` and the check in there for qualified names


-- 
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-unsubscribe@arrow.apache.org

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


[GitHub] [arrow-datafusion] jdye64 commented on issue #2319: Improve UX of looking up a DFSchema column by name

Posted by GitBox <gi...@apache.org>.
jdye64 commented on issue #2319:
URL: https://github.com/apache/arrow-datafusion/issues/2319#issuecomment-1106835346

   This would be helpful for something I am working on and am happy to work on this issue.


-- 
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-unsubscribe@arrow.apache.org

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


[GitHub] [arrow-datafusion] andygrove commented on issue #2319: Improve UX of looking up a DFSchema column by name

Posted by GitBox <gi...@apache.org>.
andygrove commented on issue #2319:
URL: https://github.com/apache/arrow-datafusion/issues/2319#issuecomment-1106840883

   Actually ignore my last comment - that is not an `index_of` method


-- 
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-unsubscribe@arrow.apache.org

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