eddelbuettel commented on issue #296:
URL: 
https://github.com/apache/arrow-nanoarrow/issues/296#issuecomment-1716038325

   I guess this is a related shortcoming.  Turning a `factor` (that should be / 
can be `ordered`) into `ordered` leads to what seems like an incorrect schema 
print as the ordered flag is ignored -- flag should be 3 not 2.
   
   ```r
   > pclass <- as.ordered(earth::etitanic$pclass)
   > str(pclass)
    Ord.factor w/ 3 levels "1st"<"2nd"<"3rd": 1 1 1 1 1 1 1 1 1 1 ...
   > infer_nanoarrow_schema(pclass)
   <nanoarrow_schema dictionary(int32)<string>>
    $ format    : chr "i"
    $ name      : chr ""
    $ metadata  : list()
    $ flags     : int 2
    $ children  : list()
    $ dictionary:<nanoarrow_schema string>
     ..$ format    : chr "u"
     ..$ name      : chr ""
     ..$ metadata  : list()
     ..$ flags     : int 2
     ..$ children  : list()
     ..$ dictionary: NULL
   > 
   ```


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