pub struct Sample {Show 15 fields
pub method: SampleMethod,
pub size: Expression,
pub seed: Option<Expression>,
pub offset: Option<Expression>,
pub unit_after_size: bool,
pub use_sample_keyword: bool,
pub explicit_method: bool,
pub method_before_size: bool,
pub use_seed_keyword: bool,
pub bucket_numerator: Option<Box<Expression>>,
pub bucket_denominator: Option<Box<Expression>>,
pub bucket_field: Option<Box<Expression>>,
pub is_using_sample: bool,
pub is_percent: bool,
pub suppress_method_output: bool,
}Expand description
SAMPLE / TABLESAMPLE clause
Fields§
§method: SampleMethod§size: Expression§seed: Option<Expression>§offset: Option<Expression>ClickHouse OFFSET expression after SAMPLE size
unit_after_size: boolWhether the unit comes after the size (e.g., “100 ROWS” vs “ROW 100”)
use_sample_keyword: boolWhether the keyword was SAMPLE (true) or TABLESAMPLE (false)
explicit_method: boolWhether the method was explicitly specified (BERNOULLI, SYSTEM, etc.)
method_before_size: boolWhether the method keyword appeared before the size (TABLESAMPLE BERNOULLI (10))
use_seed_keyword: boolWhether SEED keyword was used (true) or REPEATABLE (false)
bucket_numerator: Option<Box<Expression>>BUCKET numerator for Hive bucket sampling (BUCKET 1 OUT OF 5)
bucket_denominator: Option<Box<Expression>>BUCKET denominator (the 5 in BUCKET 1 OUT OF 5)
bucket_field: Option<Box<Expression>>BUCKET field for ON clause (BUCKET 1 OUT OF 5 ON x)
is_using_sample: boolWhether this is a DuckDB USING SAMPLE clause (vs SAMPLE/TABLESAMPLE)
is_percent: boolWhether the unit was explicitly PERCENT (vs ROWS)
suppress_method_output: boolWhether to suppress method output (for cross-dialect transpilation)