Skip to content

py: add remaining illegal argument tests#5558

Merged
mihaibudiu merged 2 commits intomainfrom
illarg_final
Feb 12, 2026
Merged

py: add remaining illegal argument tests#5558
mihaibudiu merged 2 commits intomainfrom
illarg_final

Conversation

@rivudhk
Copy link
Contributor

@rivudhk rivudhk commented Feb 4, 2026

Changes made in this PR:

Added tests for: CONNECTOR_METADATA function and DEFAULT table expression.

Since these features are table-level and some tests are expected to fail, modified aggtst_base to support the following:

  1. Tables are supplied the expected_error attribute
  2. Passing tables are run together in a single pipeline prior to running views
  3. Failing tables are run separately in individual pipelines (similar to failing views)
  4. All views (both passing and failing) reference only passing tables

Copilot AI review requested due to automatic review settings February 4, 2026 10:58
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds remaining illegal-argument grammar tests for table-level functions and enhances the aggregate test harness to handle table-level failures separately from view-level failures.

Changes:

  • Introduces positive and negative tests for CONNECTOR_METADATA and DEFAULT table expressions in the illarg grammar test suite.
  • Extends TstAccumulator to distinguish passing vs. failing tables/views, run table tests separately from views, and centralize failure handling and expected-error assertions.
  • Propagates expected_error from TstTable definitions onto underlying Table objects so table DDL failures can be validated similarly to view failures.

Reviewed changes

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

File Description
python/tests/runtime_aggtest/illarg_tests/test_grammar_tbl_fn.py Adds new legal/illegal table and view definitions to exercise CONNECTOR_METADATA and DEFAULT behavior.
python/tests/runtime_aggtest/aggtst_base.py Refactors and extends the test harness to support separate execution for passing/failing tables, shared expected-error logic, and more flexible pipeline setup.

@rivudhk rivudhk requested a review from mihaibudiu February 4, 2026 11:34
@rivudhk
Copy link
Contributor Author

rivudhk commented Feb 4, 2026

Fixes #3921

self.sql = """CREATE TABLE connector_metadata_legal_tbl(
id INT,
meta_val VARCHAR
DEFAULT CAST(CONNECTOR_METADATA()['check'] AS VARCHAR)
Copy link
Contributor

Choose a reason for hiding this comment

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

I think that this default value is actually never really used - the data is filled by the datagen connector.
I don't think that the datagen connector has actually support for CONNECTOR_METADATA.
Interesting that you can still compile this.

"""Run each view that is expected to fail in a separate pipeline"""
# List of views that contain the attribute: expected error type
failing_views = [v for v in self.views if v.expected_error]
"""Loop through each view that is expected to fail in a separate pipeline"""
Copy link
Contributor

Choose a reason for hiding this comment

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

and run it in a separate pipeline

Signed-off-by: rivudhk <rivudhkr@gmail.com>
Signed-off-by: rivudhk <rivudhkr@gmail.com>
@rivudhk rivudhk enabled auto-merge February 11, 2026 21:00
@rivudhk rivudhk added this pull request to the merge queue Feb 11, 2026
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Feb 12, 2026
@mihaibudiu mihaibudiu added this pull request to the merge queue Feb 12, 2026
Merged via the queue into main with commit dbc2a1b Feb 12, 2026
1 check passed
@mihaibudiu mihaibudiu deleted the illarg_final branch February 12, 2026 06:15
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.

2 participants