You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Takeshi Yamamuro (Jira)" <ji...@apache.org> on 2020/08/26 03:01:00 UTC

[jira] [Resolved] (SPARK-32700) select from table TABLESAMPLE gives wrong resultset.

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

Takeshi Yamamuro resolved SPARK-32700.
--------------------------------------
    Resolution: Invalid

> select from table TABLESAMPLE gives wrong resultset.
> ----------------------------------------------------
>
>                 Key: SPARK-32700
>                 URL: https://issues.apache.org/jira/browse/SPARK-32700
>             Project: Spark
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 3.0.0
>         Environment: Spark 3.0.0
>            Reporter: Chetan Bhat
>            Priority: Minor
>
> create table test(id int,name string) stored as parquet;
> insert into test values (5,'Alex'),(8,'Lucy'),(2,'Mary'),(4,'Fred'),(1,'Lisa'),(9,'Eric'),(10,'Adam'),(6,'Mark'),(7,'Lily'),(3,'Evan');
> SELECT * FROM test TABLESAMPLE (50 PERCENT); --> output is giving only 3 rows.
> spark-sql> SELECT * FROM test TABLESAMPLE (50 PERCENT);
> 5 Alex
> 10 Adam
> 4 Fred
>  
> Expected as per the link is 5 rows -->[https://spark.apache.org/docs/latest/sql-ref-syntax-qry-select-sampling.html]
>  
> Also the bucket parameter for select from table TABLESAMPLE gives wrong resultset.
> spark-sql> SELECT * FROM test TABLESAMPLE (BUCKET 4 OUT OF 10);
> 5 Alex
> 8 Lucy
> 9 Eric
> 1 Lisa
> 3 Evan
> Expected is 4 records.
>  



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