GoogleCloudPlatform / GoogleCloudPlatform/professional-services-data-validator

generate table partitions replaces whitespace in primary keys with a single space.

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

Description

Hi,

When generate-table-partitions is invoked, it will replace whitespace in primary key literals with a single space. The issue is due to this function - [_extract_where](https://github.com/GoogleCloudPlatform/professional-services-data-validator/blob/7a49a958e48f99df1e1c6a2685201161d835b878/data_validation/partition_builder.py#L71C5-L71C23).

This function replaces whitespace with a single space. This is appropriate, except the replace function used also replaces whitespace within quoted strings. This is incorrect behavior.

We will need to parse and only do the replacement for those parts of the string that are not quoted strings.

Thanks.

Sundar Mudupalli

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.