You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by "stephhazlitt (via GitHub)" <gi...@apache.org> on 2023/09/06 17:04:25 UTC

[GitHub] [arrow] stephhazlitt opened a new issue, #37594: Convenience function for returning schema code

stephhazlitt opened a new issue, #37594:
URL: https://github.com/apache/arrow/issues/37594

   ### Describe the enhancement requested
   
   I wonder if a convenience function for returning the schema code would be handy for users? 
   
   Currently you can extract the schema with:
   
   ``` r
   library(arrow)
   #> 
   #> Attaching package: 'arrow'
   #> The following object is masked from 'package:utils':
   #> 
   #>     timestamp
   library(dplyr)
   #> 
   #> Attaching package: 'dplyr'
   #> The following objects are masked from 'package:stats':
   #> 
   #>     filter, lag
   #> The following objects are masked from 'package:base':
   #> 
   #>     intersect, setdiff, setequal, union
   
   schema(arrow_table(mtcars))
   #> Schema
   #> mpg: double
   #> cyl: double
   #> disp: double
   #> hp: double
   #> drat: double
   #> wt: double
   #> qsec: double
   #> vs: double
   #> am: double
   #> gear: double
   #> carb: double
   #> 
   #> See $metadata for additional Schema metadata
   ```
   And you can extract the schema code with:
   
   ``` r
   library(arrow)
   #> 
   #> Attaching package: 'arrow'
   #> The following object is masked from 'package:utils':
   #> 
   #>     timestamp
   library(dplyr)
   #> 
   #> Attaching package: 'dplyr'
   #> The following objects are masked from 'package:stats':
   #> 
   #>     filter, lag
   #> The following objects are masked from 'package:base':
   #> 
   #>     intersect, setdiff, setequal, union
   
   arrow_table(mtcars)$schema$code()
   #> schema(mpg = float64(), cyl = float64(), disp = float64(), hp = float64(), 
   #>     drat = float64(), wt = float64(), qsec = float64(), vs = float64(), 
   #>     am = float64(), gear = float64(), carb = float64())
   ```
   
   The schema code output is very useful for editing/altering and creating schemas, but the code is not very intuitive, especially for new users. I was thinking maybe a `schema_code()` convenience function might be useful (or some other better suited name).
   
   ### Component(s)
   
   R


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

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


Re: [I] [R] Convenience function for returning schema code [arrow]

Posted by "thisisnic (via GitHub)" <gi...@apache.org>.
thisisnic commented on issue #37594:
URL: https://github.com/apache/arrow/issues/37594#issuecomment-1910187723

   Closing as this has now been completed


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


Re: [I] [R] Convenience function for returning schema code [arrow]

Posted by "thisisnic (via GitHub)" <gi...@apache.org>.
thisisnic closed issue #37594: [R] Convenience function for returning schema code
URL: https://github.com/apache/arrow/issues/37594


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

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


Re: [I] [R] Convenience function for returning schema code [arrow]

Posted by "orgadish (via GitHub)" <gi...@apache.org>.
orgadish commented on issue #37594:
URL: https://github.com/apache/arrow/issues/37594#issuecomment-1748383190

   This would be great! Hopefully it would also include my request from #38033.


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