py: add remaining illegal argument tests#5558
Merged
mihaibudiu merged 2 commits intomainfrom Feb 12, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
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_METADATAandDEFAULTtable expressions in the illarg grammar test suite. - Extends
TstAccumulatorto distinguish passing vs. failing tables/views, run table tests separately from views, and centralize failure handling and expected-error assertions. - Propagates
expected_errorfromTstTabledefinitions onto underlyingTableobjects 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. |
Contributor
Author
|
Fixes #3921 |
mihaibudiu
approved these changes
Feb 4, 2026
| self.sql = """CREATE TABLE connector_metadata_legal_tbl( | ||
| id INT, | ||
| meta_val VARCHAR | ||
| DEFAULT CAST(CONNECTOR_METADATA()['check'] AS VARCHAR) |
Contributor
There was a problem hiding this comment.
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""" |
Contributor
There was a problem hiding this comment.
and run it in a separate pipeline
Signed-off-by: rivudhk <rivudhkr@gmail.com>
Signed-off-by: rivudhk <rivudhkr@gmail.com>
3f0dae8 to
1b5868f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
expected_errorattribute