You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Paul Deng (Jira)" <ji...@apache.org> on 2021/09/14 20:31:00 UTC
[jira] [Updated] (SPARK-36757) countDistinct becomes count when
converted to SQL string
[ https://issues.apache.org/jira/browse/SPARK-36757?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Paul Deng updated SPARK-36757:
------------------------------
Summary: countDistinct becomes count when converted to SQL string (was: countDistinct becomes to count when converted to SQL string)
> countDistinct becomes count when converted to SQL string
> --------------------------------------------------------
>
> Key: SPARK-36757
> URL: https://issues.apache.org/jira/browse/SPARK-36757
> Project: Spark
> Issue Type: Bug
> Components: SQL
> Affects Versions: 3.1.1
> Reporter: Paul Deng
> Priority: Major
> Original Estimate: 24h
> Remaining Estimate: 24h
>
> In pyspark=3.1.1
> {code:python}
> > F.countDistinct(F.col("bar"))
> Column<'count(bar)'>{code}
>
> In pyspark=2.4
> {code:python}
> > F.countDistinct(F.col("bar"))
> Column<b'count(DISTINCT foo)'>{code}
>
> This creates problems when trying to convert the pyspark function into SQL code to compose SQL queries via:
> {code:python}
> > F.countDistinct(F.col("bar"))._jc.toString()
> {code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org