You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@arrow.apache.org by "Ian Cook (Jira)" <ji...@apache.org> on 2021/06/18 14:59:00 UTC

[jira] [Created] (ARROW-13117) [R] Retain schema in new Expressions

Ian Cook created ARROW-13117:
--------------------------------

             Summary: [R] Retain schema in new Expressions
                 Key: ARROW-13117
                 URL: https://issues.apache.org/jira/browse/ARROW-13117
             Project: Apache Arrow
          Issue Type: Improvement
          Components: R
            Reporter: Ian Cook
            Assignee: Ian Cook
             Fix For: 5.0.0


When a new Expression is created, {{schema}} should be retained from the expression(s) it was created from. That way, the {{type()}} and {{type_id()}} methods of the new Expression will work. For example, currently this happens:
{code:r}
> x <- Expression$field_ref("x")
> x$schema <- Schema$create(x = int32())
> 
> y <- Expression$field_ref("y")
> y$schema <- Schema$create(x = int32())
> 
> Expression$create("add_checked", x, y)$type()
Error: !is.null(schema) is not TRUE {code}

This is what we want to happen:
{code:r}
> Expression$create("add_checked", x, y)$type()
Int32
int32
{code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)