GoogleCloudPlatform / GoogleCloudPlatform/professional-services-data-validator

Extraction of filter clause from SQL statements has bugs

Open
#1,503 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
524
Forks
171
Avg merge
5d 15h
Merged PRs (30d)
4

Description

**Describe the bug**
DVT creates the string that is used as a filter clause to create partitions. The extraction of this filter clause is hack - see explanation [here](https://github.com/GoogleCloudPlatform/professional-services-data-validator/blob/e15d8fd5bdf413d0d8ea3d43319c35c4a78607df/data_validation/partition_builder.py#L109).

The [unit test](https://github.com/GoogleCloudPlatform/professional-services-data-validator/blob/e15d8fd5bdf413d0d8ea3d43319c35c4a78607df/tests/unit/test_partition_builder.py#L653) contains some sample SQL where the _extract_where does not extract the filter clause correctly. These tests are currently skipped.

Most customers will not run into these issues - even if they do - the validation will fail due to malformed SQL rather than give incorrect results.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.