You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Hyukjin Kwon (JIRA)" <ji...@apache.org> on 2019/06/14 10:02:00 UTC

[jira] [Commented] (SPARK-28040) sql() fails to process output of glue::glue_data()

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

Hyukjin Kwon commented on SPARK-28040:
--------------------------------------

What does {{glue_data}} return? {{sql}} takes strings so it looks natural.

> sql() fails to process output of glue::glue_data()
> --------------------------------------------------
>
>                 Key: SPARK-28040
>                 URL: https://issues.apache.org/jira/browse/SPARK-28040
>             Project: Spark
>          Issue Type: Bug
>          Components: R
>    Affects Versions: 2.4.3
>            Reporter: Michael Chirico
>            Priority: Major
>
> {{glue}} package is quite natural for sending parameterized queries to Spark from R. Very similar to Python's {{format}} for strings. Error is as simple as
> {code:java}
> library(glue)
> library(sparkR)
> sparkR.session()
> query = glue_data(list(val = 4), 'select {val}')
> sql(query){code}
> Error in writeType(con, serdeType) : 
>   Unsupported type for serialization glue
> {{sql(as.character(query))}} works as expected but this is a bit awkward / post-hoc



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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