Skip to content

Commit b44e57e

Browse files
committed
Use ILIKE instead of LIKE with lowerUTF8 and toValidUTF8
1 parent 4fc9ed4 commit b44e57e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/cubejs-schema-compiler/src/adapter/ClickHouseQuery.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class ClickHouseFilter extends BaseFilter {
2020
public likeIgnoreCase(column, not, param, type) {
2121
const p = (!type || type === 'contains' || type === 'ends') ? '%' : '';
2222
const s = (!type || type === 'contains' || type === 'starts') ? '%' : '';
23-
return `lowerUTF8(toValidUTF8(${column})) ${not ? 'NOT' : ''} LIKE CONCAT('${p}', lowerUTF8(toValidUTF8(${this.allocateParam(param)})), '${s}')`;
23+
return `${column} ${not ? 'NOT' : ''} ILIKE CONCAT('${p}', ${this.allocateParam(param)}, '${s}')`;
2424
}
2525

2626
public castParameter() {

0 commit comments

Comments
 (0)