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/20 15:35:00 UTC
[jira] [Updated] (ARROW-13117) [R] Retain schema in new Expressions
[ https://issues.apache.org/jira/browse/ARROW-13117?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ian Cook updated ARROW-13117:
-----------------------------
Description:
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(y = 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}
was:
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}
> [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
> Priority: Major
> 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(y = 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)