Skip to content

Add result_scan visitor to replace table(result_scan.. #1052

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 11, 2025

Conversation

osipovartem
Copy link
Contributor

Related to #1037
and #1048

Added SQL AST visitor that rewrites TABLE(RESULT_SCAN(...)) table functions into RESULT_SCAN(...) by removing the unnecessary TABLE(...) wrapper since result scan already returns data as a Table

 SELECT * FROM TABLE(RESULT_SCAN(LAST_QUERY_ID())) WHERE value > 1;
SELECT * FROM RESULT_SCAN(LAST_QUERY_ID()) WHERE value > 1;

Copy link
Contributor

SQL Logic Tests Results ❌

Coverage by SLT File

  • result_scan: 0/3 (0.0%)

Overall: 0/3 (0.0%)

Copy link
Contributor

@DanCodedThis DanCodedThis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@rampage644 rampage644 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@osipovartem osipovartem merged commit 3f0f5c5 into main Jun 11, 2025
6 checks passed
@osipovartem osipovartem deleted the issues/1037_table_visitor branch June 11, 2025 05:41
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.

4 participants