spark-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jacek Laskowski (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (SPARK-25278) Number of output rows metric of union of views is multiplied by their occurrences
Date Thu, 30 Aug 2018 07:33:00 GMT

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

Jacek Laskowski updated SPARK-25278:
------------------------------------
    Attachment: union-2-views.png

> Number of output rows metric of union of views is multiplied by their occurrences
> ---------------------------------------------------------------------------------
>
>                 Key: SPARK-25278
>                 URL: https://issues.apache.org/jira/browse/SPARK-25278
>             Project: Spark
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 2.3.1
>            Reporter: Jacek Laskowski
>            Priority: Major
>         Attachments: union-2-views.png, union-3-views.png
>
>
> When you use a view in a union multiple times (self-union), the {{number of output rows}} metric seems
to be the correct {{number of output rows}} multiplied by the occurrences of the view, e.g.
> {code:java}
> scala> spark.version
> res0: String = 2.3.1
> val name = "demo_view"
> sql(s"CREATE OR REPLACE VIEW $name AS VALUES 1,2")
> assert(spark.catalog.tableExists(name))
> val view = spark.table(name)
> assert(view.count == 2)
> view.union(view).show // gives 4 for every view, but should be 2
> view.union(view).union(view).show // gives 6{code}
> I think it's because {{View}} logical operator is a {{MultiInstanceRelation}} (and think
other {{MultiInstanceRelation}}s may also be affected).



--
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


Mime
View raw message