Skip to content

[fix](regression) stabilize parquet_meta tvf assertions across s3 buckets - #60938

Merged
morningman merged 1 commit into
apache:masterfrom
xylaaaaa:fix/parquet-meta-tvf-stable-cols-20260302
Mar 2, 2026
Merged

morningman merged 1 commit into
apache:masterfrom
xylaaaaa:fix/parquet-meta-tvf-stable-cols-20260302

Conversation

@xylaaaaa

@xylaaaaa xylaaaaa commented Mar 2, 2026

Copy link
Copy Markdown
Contributor

Summary

  • adjust test_parquet_meta_tvf S3-mode checks to compare only stable columns
  • avoid asserting file_name / full S3 URI fields that vary by pipeline bucket
  • update the corresponding .out baseline for the changed query projections

Why

Different CI pipelines may use different bucket names, which causes false failures when full URI/file name columns are compared.

Test

  • attempted: ./run-regression-test.sh --run -f external_table_p0/tvf/test_parquet_meta_tvf -forceGenOut
  • in this environment it failed with S3 FORBIDDEN while reading regression parquet files

Copilot AI review requested due to automatic review settings March 2, 2026 02:12
@Thearas

Thearas commented Mar 2, 2026

Copy link
Copy Markdown
Contributor

Thank you for your contribution to Apache Doris.
Don't know what should be done next? See How to process your PR.

Please clearly describe your PR:

  1. What problem was fixed (it's best to include specific error reporting information). How it was fixed.
  2. Which behaviors were modified. What was the previous behavior, what is it now, why was it modified, and what possible impacts might there be.
  3. What features were added. Why was this function added?
  4. Which code was refactored and why was this part of the code refactored?
  5. Which functions were optimized and what is the difference before and after the optimization?

Copilot AI left a comment

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.

Pull request overview

Stabilizes test_parquet_meta_tvf regression assertions in S3 mode by avoiding bucket-/path-dependent fields and updating expected baselines accordingly.

Changes:

  • Replaced select * with explicit projections of stable parquet metadata/schema columns.
  • Added deterministic order by clauses for more stable result ordering.
  • Updated .out golden file to match the new projections (removing full S3 URI / file_name assertions).

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.

File Description
regression-test/suites/external_table_p0/tvf/test_parquet_meta_tvf.groovy Narrows asserted columns to stable metadata and adds ordering to reduce S3 bucket variability.
regression-test/data/external_table_p0/tvf/test_parquet_meta_tvf.out Updates golden outputs to match the new stable projections and reduced S3-path dependence.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +122 to 123
select count(*) from parquet_meta(
"uri" = "${basePath}/*meta.parquet",

Copilot AI Mar 2, 2026

Copy link

Choose a reason for hiding this comment

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

Switching the glob assertion from select file_name to count(*) makes the test significantly weaker (it can pass even if the wrong set of files is returned, as long as the total count matches). A more robust, bucket-stable assertion is to project a stable derived value from file_name (e.g., the basename via a regex) and order by it, so the test still validates which files are present without depending on the bucket/URI prefix.

Copilot uses AI. Check for mistakes.
Comment on lines +36 to +39
select
row_group_id, row_group_num_rows, row_group_num_columns, row_group_bytes, column_id,
file_offset, num_values, path_in_schema, type, stats_min, stats_max, stats_null_count,
stats_distinct_count, stats_min_value

Copilot AI Mar 2, 2026

Copy link

Choose a reason for hiding this comment

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

The stable column projection list is duplicated across the S3 and default-mode parquet_metadata queries. To reduce maintenance overhead (and avoid future drift), consider extracting this shared column list into a single Groovy variable/string and interpolating it into both query strings.

Copilot uses AI. Check for mistakes.
Comment on lines +53 to +56
select
row_group_id, row_group_num_rows, row_group_num_columns, row_group_bytes, column_id,
file_offset, num_values, path_in_schema, type, stats_min, stats_max, stats_null_count,
stats_distinct_count, stats_min_value

Copilot AI Mar 2, 2026

Copy link

Choose a reason for hiding this comment

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

The stable column projection list is duplicated across the S3 and default-mode parquet_metadata queries. To reduce maintenance overhead (and avoid future drift), consider extracting this shared column list into a single Groovy variable/string and interpolating it into both query strings.

Copilot uses AI. Check for mistakes.
Comment on lines +37 to +39
row_group_id, row_group_num_rows, row_group_num_columns, row_group_bytes, column_id,
file_offset, num_values, path_in_schema, type, stats_min, stats_max, stats_null_count,
stats_distinct_count, stats_min_value

Copilot AI Mar 2, 2026

Copy link

Choose a reason for hiding this comment

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

The projection includes stats_min_value but not the corresponding stats_max_value. If the intent is to keep the assertion symmetric and interpretable (especially for non-numeric types), consider selecting both stats_min_value and stats_max_value (or neither) so the test coverage of stats doesn’t become lopsided.

Copilot uses AI. Check for mistakes.
@xylaaaaa

xylaaaaa commented Mar 2, 2026

Copy link
Copy Markdown
Contributor Author

run buildall

@morningman morningman left a comment

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.

LGTM

@github-actions

github-actions Bot commented Mar 2, 2026

Copy link
Copy Markdown
Contributor

PR approved by at least one committer and no changes requested.

@github-actions github-actions Bot added approved Indicates a PR has been approved by one committer. reviewed labels Mar 2, 2026
@github-actions

github-actions Bot commented Mar 2, 2026

Copy link
Copy Markdown
Contributor

PR approved by anyone and no changes requested.

@morningman
morningman merged commit c53d9cc into apache:master Mar 2, 2026
35 of 38 checks passed
xylaaaaa added a commit to xylaaaaa/doris that referenced this pull request Mar 16, 2026
…kets (apache#60938)

## Summary
- adjust `test_parquet_meta_tvf` S3-mode checks to compare only stable
columns
- avoid asserting `file_name` / full S3 URI fields that vary by pipeline
bucket
- update the corresponding `.out` baseline for the changed query
projections

## Why
Different CI pipelines may use different bucket names, which causes
false failures when full URI/file name columns are compared.

## Test
- attempted: `./run-regression-test.sh --run -f
external_table_p0/tvf/test_parquet_meta_tvf -forceGenOut`
- in this environment it failed with S3 `FORBIDDEN` while reading
regression parquet files
xylaaaaa added a commit to xylaaaaa/doris that referenced this pull request Mar 16, 2026
…kets (apache#60938)

## Summary
- adjust `test_parquet_meta_tvf` S3-mode checks to compare only stable
columns
- avoid asserting `file_name` / full S3 URI fields that vary by pipeline
bucket
- update the corresponding `.out` baseline for the changed query
projections

## Why
Different CI pipelines may use different bucket names, which causes
false failures when full URI/file name columns are compared.

## Test
- attempted: `./run-regression-test.sh --run -f
external_table_p0/tvf/test_parquet_meta_tvf -forceGenOut`
- in this environment it failed with S3 `FORBIDDEN` while reading
regression parquet files
morningman pushed a commit to xylaaaaa/doris that referenced this pull request Mar 16, 2026
…kets (apache#60938)

## Summary
- adjust `test_parquet_meta_tvf` S3-mode checks to compare only stable
columns
- avoid asserting `file_name` / full S3 URI fields that vary by pipeline
bucket
- update the corresponding `.out` baseline for the changed query
projections

## Why
Different CI pipelines may use different bucket names, which causes
false failures when full URI/file name columns are compared.

## Test
- attempted: `./run-regression-test.sh --run -f
external_table_p0/tvf/test_parquet_meta_tvf -forceGenOut`
- in this environment it failed with S3 `FORBIDDEN` while reading
regression parquet files
morningman pushed a commit to morningman/doris that referenced this pull request Mar 17, 2026
…kets (apache#60938)

## Summary
- adjust `test_parquet_meta_tvf` S3-mode checks to compare only stable
columns
- avoid asserting `file_name` / full S3 URI fields that vary by pipeline
bucket
- update the corresponding `.out` baseline for the changed query
projections

## Why
Different CI pipelines may use different bucket names, which causes
false failures when full URI/file name columns are compared.

## Test
- attempted: `./run-regression-test.sh --run -f
external_table_p0/tvf/test_parquet_meta_tvf -forceGenOut`
- in this environment it failed with S3 `FORBIDDEN` while reading
regression parquet files
xylaaaaa added a commit to xylaaaaa/doris that referenced this pull request Mar 18, 2026
…kets (apache#60938)

## Summary
- adjust `test_parquet_meta_tvf` S3-mode checks to compare only stable
columns
- avoid asserting `file_name` / full S3 URI fields that vary by pipeline
bucket
- update the corresponding `.out` baseline for the changed query
projections

## Why
Different CI pipelines may use different bucket names, which causes
false failures when full URI/file name columns are compared.

## Test
- attempted: `./run-regression-test.sh --run -f
external_table_p0/tvf/test_parquet_meta_tvf -forceGenOut`
- in this environment it failed with S3 `FORBIDDEN` while reading
regression parquet files
xylaaaaa added a commit to xylaaaaa/doris that referenced this pull request Mar 18, 2026
…kets (apache#60938)

## Summary
- adjust `test_parquet_meta_tvf` S3-mode checks to compare only stable
columns
- avoid asserting `file_name` / full S3 URI fields that vary by pipeline
bucket
- update the corresponding `.out` baseline for the changed query
projections

## Why
Different CI pipelines may use different bucket names, which causes
false failures when full URI/file name columns are compared.

## Test
- attempted: `./run-regression-test.sh --run -f
external_table_p0/tvf/test_parquet_meta_tvf -forceGenOut`
- in this environment it failed with S3 `FORBIDDEN` while reading
regression parquet files
xylaaaaa added a commit to xylaaaaa/doris that referenced this pull request Mar 19, 2026
…kets (apache#60938)

## Summary
- adjust `test_parquet_meta_tvf` S3-mode checks to compare only stable
columns
- avoid asserting `file_name` / full S3 URI fields that vary by pipeline
bucket
- update the corresponding `.out` baseline for the changed query
projections

## Why
Different CI pipelines may use different bucket names, which causes
false failures when full URI/file name columns are compared.

## Test
- attempted: `./run-regression-test.sh --run -f
external_table_p0/tvf/test_parquet_meta_tvf -forceGenOut`
- in this environment it failed with S3 `FORBIDDEN` while reading
regression parquet files
morningman pushed a commit that referenced this pull request Mar 19, 2026
) (#61474)

Replacement for #61446 because the original PR head branch could not be
updated from this environment.

This branch contains:
- [feat] add Parquet metadata TVF (#58972)
- [fix](regression) stabilize parquet_meta tvf assertions across s3
buckets (#60938)
- [fix] remove useless const_cast and explain const_cast for vec (4)
(#56603)
- [fix] fix parquet metadata TVF compile on branch-4.1

Please review this PR instead of #61446.

---------

Co-authored-by: admiring_xm <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by one committer. dev/4.1.0-merged reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants