[ 
https://issues.apache.org/jira/browse/SPARK-16538?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15376244#comment-15376244
 ] 

Shivaram Venkataraman commented on SPARK-16538:
-----------------------------------------------

So it looks like what is going on is that the `funcName` we get in the case of 
`SparkR::createDataFrame` is a list and not a single element. Further the list 
contents are [::, SparkR, createDataFrame] - So a change which looks like 

{code}
  funcName <- as.character(sys.call(sys.parent())[[1]])
  if (length(funcName) > 1) {
    funcName <- funcName[length(funcName)]
  }
{code}

seems to work. [~felixcheung] is there a better way to fix this ?

> Cannot use "SparkR::sql"
> ------------------------
>
>                 Key: SPARK-16538
>                 URL: https://issues.apache.org/jira/browse/SPARK-16538
>             Project: Spark
>          Issue Type: Bug
>          Components: SparkR
>    Affects Versions: 1.6.2, 2.0.0
>            Reporter: Weiluo Ren
>            Priority: Critical
>
> When call "SparkR::sql", an error pops up. For instance
> {code}
> SparkR::sql("")
> Error in get(paste0(funcName, ".default")) :
>  object '::.default' not found
> {code}
> https://github.com/apache/spark/blob/f4767bcc7a9d1bdd301f054776aa45e7c9f344a7/R/pkg/R/SQLContext.R#L51



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

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

Reply via email to