Skip to content

Conversation

@czgdp1807
Copy link

@czgdp1807 czgdp1807 commented Dec 19, 2025

Summary

This PR implements comprehensive deprecation warnings for the filter_query parameter in ListOperationOptions that depends on ZetaSQL. This prepares for the removal of ZetaSQL dependency from ML Metadata in version 1.19.0.

Motivation

ZetaSQL dependency is being phased out from ML Metadata. The filter_query feature relies on ZetaSQL for SQL query parsing and analysis. To maintain backward compatibility while communicating the planned removal, this PR adds proper deprecation warnings across the codebase.

Changes

Runtime Warnings

  • Python API (metadata_store.py): Added DeprecationWarning when filter_query is used in ListOptions
  • C++ Query Executors: Added LOG(WARNING) messages in:
    • query_config_executor.cc (MySQL)
    • postgresql_query_executor.cc (PostgreSQL)

Documentation Updates

  • RELEASE.md: Added deprecation notice in Current Version section with v1.19.0 removal timeline
  • ListOptions docstring: Updated to clearly mark filter_query as deprecated with migration guidance
  • C++ Headers & Implementations: Added deprecation comments to:
    • filter_query_ast_resolver.h and .cc
    • filter_query_builder.h and .cc

Test Updates

  • Modified test_get_nodes_by_filter_query to verify DeprecationWarning is raised
  • Modified test_get_nodes_by_filter_query_syntax_errors to verify warnings even on syntax errors
  • Added warning suppression (warnings.catch_warnings()) to lineage subgraph tests that use filter_query for backward compatibility testing
  • All deprecation warnings properly tested with assertions on warning message content

Timeline

  • v1.18.0 (next release): Deprecation warnings introduced
  • v1.19.0: Complete removal of filter_query and ZetaSQL dependency

Testing

All tests pass with proper deprecation warning handling:

  • Tests explicitly verify warnings are raised when filter_query is used
  • Backward compatibility tests suppress warnings while noting the deprecated functionality
  • No functional changes to existing behavior

Migration Path

Users relying on filter_query should migrate to alternative filtering approaches before v1.19.0. The deprecation warnings provide clear guidance on the timeline and necessary actions.

Deprecate filter_query parameter in ListOperationOptions that depends on
ZetaSQL. Add runtime warnings (Python DeprecationWarning, C++ LOG(WARNING)),
update documentation, and add test coverage for deprecation warnings.

This prepares for removal of ZetaSQL dependency in version 1.19.0.
@czgdp1807 czgdp1807 changed the title Deprecate ZetaSQL-based filter_query functionality for v1.19.0 removal Deprecate ZetaSQL-based filter_query functionality for v1.19.0 removal Dec 19, 2025
@czgdp1807 czgdp1807 marked this pull request as ready for review December 19, 2025 17:31
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.

1 participant