spark-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yanbo Liang (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (SPARK-12234) SparkR subset throw error when only set "select" argument
Date Wed, 09 Dec 2015 06:38:10 GMT

     [ https://issues.apache.org/jira/browse/SPARK-12234?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Yanbo Liang updated SPARK-12234:
--------------------------------
    Description: 
SparkR subset function throw error when only set "select" argument, it's easy to repreduce.
In SparkR:
{code}
> df <- suppressWarnings(createDataFrame(sqlContext, iris))
> subset(df, select=c("Sepal_Length", "Petal_Length", "Species"))
Error in x[subset, select, ...] : 
  error in evaluating the argument 'i' in selecting a method for function '[': Error: argument
"subset" is missing, with no default
{code}
But in base R, the subset function works well with only specifying "select" argument:
{code}
> df <- iris
> subset(df, select=c("Sepal.Length", "Petal.Length", "Species"))
    Sepal.Length Petal.Length    Species
1            5.1          1.4     setosa
2            4.9          1.4     setosa
3            4.7          1.3     setosa
4            4.6          1.5     setosa
5            5.0          1.4     setosa
......
{code}

  was:
SparkR subset throw error when only set "select" argument, it's easy to repreduce.
In SparkR:
{code}
> df <- suppressWarnings(createDataFrame(sqlContext, iris))
> subset(df, select=c("Sepal_Length", "Petal_Length", "Species"))
Error in x[subset, select, ...] : 
  error in evaluating the argument 'i' in selecting a method for function '[': Error: argument
"subset" is missing, with no default
{code}
But in base R, the subset function works well with only specifying "select" argument:
{code}
> df <- iris
> subset(df, select=c("Sepal.Length", "Petal.Length", "Species"))
    Sepal.Length Petal.Length    Species
1            5.1          1.4     setosa
2            4.9          1.4     setosa
3            4.7          1.3     setosa
4            4.6          1.5     setosa
5            5.0          1.4     setosa
......
{code}


> SparkR subset throw error when only set "select" argument
> ---------------------------------------------------------
>
>                 Key: SPARK-12234
>                 URL: https://issues.apache.org/jira/browse/SPARK-12234
>             Project: Spark
>          Issue Type: Bug
>          Components: SparkR
>            Reporter: Yanbo Liang
>
> SparkR subset function throw error when only set "select" argument, it's easy to repreduce.
> In SparkR:
> {code}
> > df <- suppressWarnings(createDataFrame(sqlContext, iris))
> > subset(df, select=c("Sepal_Length", "Petal_Length", "Species"))
> Error in x[subset, select, ...] : 
>   error in evaluating the argument 'i' in selecting a method for function '[': Error:
argument "subset" is missing, with no default
> {code}
> But in base R, the subset function works well with only specifying "select" argument:
> {code}
> > df <- iris
> > subset(df, select=c("Sepal.Length", "Petal.Length", "Species"))
>     Sepal.Length Petal.Length    Species
> 1            5.1          1.4     setosa
> 2            4.9          1.4     setosa
> 3            4.7          1.3     setosa
> 4            4.6          1.5     setosa
> 5            5.0          1.4     setosa
> ......
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org


Mime
View raw message