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/05/21 04:23:15 UTC
[jira] [Updated] (SPARK-14166) Add deterministic sampling like in
Hive
[ https://issues.apache.org/jira/browse/SPARK-14166?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Hyukjin Kwon updated SPARK-14166:
---------------------------------
Labels: bulk-closed sample sql (was: sample sql)
> Add deterministic sampling like in Hive
> ---------------------------------------
>
> Key: SPARK-14166
> URL: https://issues.apache.org/jira/browse/SPARK-14166
> Project: Spark
> Issue Type: Improvement
> Components: SQL
> Affects Versions: 2.0.0
> Reporter: Ruslan Dautkhanov
> Priority: Minor
> Labels: bulk-closed, sample, sql
>
> Would be great to have Spark support deterministic sampling too
> {quote}
> set hive.sample.seednumber=12345;
> SELECT *
> FROM table_a TABLESAMPLE(BUCKET 17 OUT OF 25 ON individual_id);
> {quote}
> Notice sampling is based on a hash(individual_id).
> https://cwiki.apache.org/confluence/display/Hive/LanguageManual+Sampling
> In this case sampling is deterministic. When we have new data loads, we get very stable samples and use it all the time in Hive.
> The only reason for "BUCKET x OUT OF y " syntax in Hive is "If the columns specified in the TABLESAMPLE clause match the columns in the CLUSTERED BY clause, TABLESAMPLE scans only the required hash-partitions of the table."
--
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