Skip to content

Name struct columns from parenthesised-star expressions after their source#4182

Open
arnaud-lacurie wants to merge 5 commits into
FoundationDB:mainfrom
arnaud-lacurie:star-expression-column-names
Open

Name struct columns from parenthesised-star expressions after their source#4182
arnaud-lacurie wants to merge 5 commits into
FoundationDB:mainfrom
arnaud-lacurie:star-expression-column-names

Conversation

@arnaud-lacurie
Copy link
Copy Markdown
Collaborator

SELECT (T.*) now produces a column named T; SELECT (*) from a single table names the column after the table/alias. With multiple tables in scope the column remains unnamed.

…ource

SELECT (T.*) now names the outer column after T; SELECT (*) from a single
table names it after the table/alias.  With multiple tables in scope the
column remains anonymous.
@arnaud-lacurie arnaud-lacurie added the enhancement New feature or request label May 19, 2026
@github-actions
Copy link
Copy Markdown

📊 Metrics Diff Analysis Report

Summary

  • New queries: 8
  • Dropped queries: 0
  • Plan changed + metrics changed: 0
  • Plan unchanged + metrics changed: 0
ℹ️ About this analysis

This automated analysis compares query planner metrics between the base branch and this PR. It categorizes changes into:

  • New queries: Queries added in this PR
  • Dropped queries: Queries removed in this PR. These should be reviewed to ensure we are not losing coverage.
  • Plan changed + metrics changed: The query plan has changed along with planner metrics.
  • Metrics only changed: Same plan but different metrics

The last category in particular may indicate planner regressions that should be investigated.

New Queries

Count of new queries by file:

  • yaml-tests/src/test/resources/arrays-cardinality.metrics.yaml: 8

@arnaud-lacurie arnaud-lacurie added the Run mixed-mode Label to add to Pull Requests to have it run mixed mode tests label May 20, 2026
@arnaud-lacurie arnaud-lacurie requested a review from hazefully May 20, 2026 14:03
@arnaud-lacurie arnaud-lacurie marked this pull request as ready for review May 20, 2026 14:03
@arnaud-lacurie arnaud-lacurie requested a review from hatyo May 20, 2026 14:06
@@ -0,0 +1,115 @@
#
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Should we add a test for SELECT (*) FROM VALUES (1, 2), (3, 4) as well?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Done

@@ -1,6 +1,6 @@
arrays-cardinality-tests:
- query: EXPLAIN SELECT CARDINALITY("int_arr") FROM "tab1_nn"
ref: arrays_cardinality.yamsql:72
Copy link
Copy Markdown
Contributor

@hazefully hazefully May 22, 2026

Choose a reason for hiding this comment

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

I am wondering how the yaml tests were passing with these queries missing from the metric files?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I think we do not fail if the queries do not have a metrics file entry. I'll prepare a separate patch to fix that properly.

Copy link
Copy Markdown
Contributor

@hazefully hazefully May 22, 2026

Choose a reason for hiding this comment

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

Found why, it was a recently added regression, opened a PR to fix this in #4194. You can remove these metrics from this PR now since I had to add them to the bug-fix PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request Run mixed-mode Label to add to Pull Requests to have it run mixed mode tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants