With version 1.1.4 there is an issue with RegExp in AbstractCloudSpannerStatement.sanitizeSQL method:
// Remove @{FORCE_INDEX...} statements sql = sql.replaceAll("(?is)\\@\\{\\s*FORCE_INDEX.*\\}", "");
Example case:
SQL 1: FROM tbl_a@{FORCE_INDEX=abc} LEFT JOIN@{JOIN_TYPE=LOOP_JOIN} tbl_b SQL 2: FROM tbl_a@{FORCE_INDEX=abc} LEFT JOIN@{FORCE_INDEX=xyz} tbl_b SQL 3: FROM tbl_a@{FORCE_INDEX=abc} LEFT JOIN tbl_b SQL 4: FROM tbl_a LEFT JOIN@{JOIN_TYPE=LOOP_JOIN} tbl_b
With that regex the output will be:
SQL 1: FROM tbl_a tbl_b SQL 2: FROM tbl_a tbl_b SQL 3: FROM tbl_a LEFT JOIN tbl_b SQL 4: FROM tbl_a LEFT JOIN@{JOIN_TYPE=LOOP_JOIN} tbl_b
Possible to fix by update the regex a little bit:
sql = sql.replaceAll("(?is)\\@\\{(FORCE_INDEX|JOIN_TYPE)([^}]+)\\}", "");
With version 1.1.4 there is an issue with RegExp in AbstractCloudSpannerStatement.sanitizeSQL method:
// Remove @{FORCE_INDEX...} statements sql = sql.replaceAll("(?is)\\@\\{\\s*FORCE_INDEX.*\\}", "");
Example case:
SQL 1: FROM tbl_a@{FORCE_INDEX=abc} LEFT JOIN@{JOIN_TYPE=LOOP_JOIN} tbl_b SQL 2: FROM tbl_a@{FORCE_INDEX=abc} LEFT JOIN@{FORCE_INDEX=xyz} tbl_b SQL 3: FROM tbl_a@{FORCE_INDEX=abc} LEFT JOIN tbl_b SQL 4: FROM tbl_a LEFT JOIN@{JOIN_TYPE=LOOP_JOIN} tbl_b
With that regex the output will be:
SQL 1: FROM tbl_a tbl_b SQL 2: FROM tbl_a tbl_b SQL 3: FROM tbl_a LEFT JOIN tbl_b SQL 4: FROM tbl_a LEFT JOIN@{JOIN_TYPE=LOOP_JOIN} tbl_b
Possible to fix by update the regex a little bit:
sql = sql.replaceAll("(?is)\\@\\{(FORCE_INDEX|JOIN_TYPE)([^}]+)\\}", "");