Skip to content

Conversation

@MCPN
Copy link
Contributor

@MCPN MCPN commented Jan 4, 2026

I hereby agree to the terms of the CLA available at: https://yandex.ru/legal/cla/?lang=en

Closes #531

Long time no see 😁

@ovsds ovsds requested a review from Copilot January 4, 2026 20:01
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

This PR adds validation to raise an error when unknown fields are referenced in BEFORE FILTER BY or IGNORE DIMENSIONS clauses, fixing issue #531. The solution introduces a new BFBChecker validator that verifies all field references in these clauses exist in the current field set.

Key Changes

  • Added new BFBChecker validator to detect unknown field references in BEFORE FILTER BY clauses
  • Introduced UnknownBFBFieldError exception type for reporting validation failures
  • Enhanced LOOKUP function mutation to propagate errors from IGNORE DIMENSIONS clauses

Reviewed changes

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

Show a summary per file
File Description
lib/dl_formula/dl_formula/validation/bfb.py Implements new BFBChecker validator class that validates field references in BEFORE FILTER BY clauses
lib/dl_formula/dl_formula/core/exc.py Adds UnknownBFBFieldError exception for reporting unknown field references
lib/dl_query_processing/dl_query_processing/compilation/formula_compiler.py Integrates BFBChecker into formula validation pipeline
lib/dl_formula/dl_formula_tests/unit/validation/test_bfb.py Comprehensive test suite covering valid and invalid BEFORE FILTER BY scenarios
lib/dl_formula/dl_formula/mutation/lookup.py Adds error propagation for IGNORE DIMENSIONS with unknown fields
lib/dl_api_lib/dl_api_lib_tests/db/data_api/result/complex_queries/test_window_functions.py Removes xfail marker now that the issue is fixed
lib/dl_api_lib/dl_api_lib_tests/db/data_api/result/complex_queries/test_lookup_functions.py Removes xfail marker and unused pytest import
lib/dl_formula/dl_formula/validation/window.py Removes unused import
lib/dl_formula/dl_formula/validation/aggregation.py Removes unused import

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

@KonstantAnxiety KonstantAnxiety added the ci-approved Approved for main workflow run, dropped on branch update label Jan 12, 2026
@MCPN MCPN force-pushed the fix_unknown_fields branch from da5f070 to 60b2b18 Compare January 19, 2026 14:10
@github-actions github-actions bot removed the ci-approved Approved for main workflow run, dropped on branch update label Jan 19, 2026
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.

Unknown fields in BEFORE FILTER BY and IGNORE DIMENSIONS don't fail the validation

2 participants