chenkovsky opened a new issue, #16533:
URL: https://github.com/apache/datafusion/issues/16533

   ### Is your feature request related to a problem or challenge?
   
   The TABLESAMPLE statement is used to sample the table.
   
   Different DBs have different sample implementations.
   
   Spark:
   
   https://spark.apache.org/docs/latest/sql-ref-syntax-qry-select-sampling.html
   
https://spark.apache.org/docs/latest/api/python/reference/pyspark.sql/api/pyspark.sql.DataFrame.sample.html
   
   it implements
   1. Sample the table down to the given number of rows.
   2. Sample the table down to the given percentage.    
       a. poisson sample, (only in dataframe api)
       b. bernoulli sample.
   
   Spark introduced a Sample logical plan, and many other dataframe apis are 
also based on this logical plan. e.g. 
   
https://spark.apache.org/docs/latest/api/python/reference/pyspark.sql/api/pyspark.sql.DataFrame.randomSplit.html
   
   Hive:
   https://cwiki.apache.org/confluence/display/hive/languagemanual+sampling
   
   1. Sample the table down to the given number of rows.
   2. Sample the table down to the given percentage. (bernoulli)
   3. Sample  on column, it's useful for clustered table.
   
   Clickhouse:
   
   https://clickhouse.com/docs/sql-reference/statements/select/sample
   
   1. Sample the table down to the given number of rows.
   2. Sample the table down to the given percentage. 
   3. Sample with offset.
   
   Postgres:
   
   https://wiki.postgresql.org/wiki/TABLESAMPLE_Implementation
   1. BERNOULLI sample.
   2. SYSTEM
   
   
   
   
   
   ### Describe the solution you'd like
   
   _No response_
   
   ### Describe alternatives you've considered
   
   _No response_
   
   ### Additional context
   
   _No response_


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org
For additional commands, e-mail: github-h...@datafusion.apache.org

Reply via email to