GoogleCloudPlatform / professional-services-data-validator

Utility to compare data between homogeneous or heterogeneous environments to ensure source and target tables match
Apache License 2.0
399 stars 114 forks source link

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

Open sundar-mudupalli-work opened 3 months ago

sundar-mudupalli-work commented 3 months ago

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.

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