Skip to content

Conversation

@finchxxia
Copy link

To fix issue#2163

Add support for SAMPLE clause on subqueries/derived tables. Previously, SAMPLE clause was only supported on table references, but Snowflake and other databases also support it on subqueries.

Add support for SAMPLE clause on subqueries/derived tables.
Previously, SAMPLE clause was only supported on table references,
but Snowflake and other databases also support it on subqueries.

Example:
  SELECT * FROM (SELECT * FROM mytable) SAMPLE (10)
  SELECT * FROM (SELECT * FROM mytable) AS t SAMPLE (50 PERCENT)
  SELECT * FROM (SELECT * FROM mytable) SAMPLE (10) SEED (42)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Snowflake: cannot parse SAMPLE in subquery

1 participant