DataSQRL / sqrl

Flexible development framework for building streaming data applications in SQL with Kafka, Flink, Postgres, GraphQL, and more.
https://www.datasqrl.com/
97 stars 14 forks source link

Flink Comparison functions `LIKE` and `Similar To` don't work with DataSQRL Strings #949

Closed Zesky665 closed 1 month ago

Zesky665 commented 1 month ago

Data with the String type can't be used with LIKE and SIMILAR TO functions.

For example:

LikeTest := SELECT id,
                   word LIKE '%al' AS like_word,
            FROM  UnmodifiedTextData
            ORDER BY id;

Where

---
name: "strings"
schema_version: "1"
partial_schema: false
columns:
  - name: "id"
    type: "BIGINT"
    tests:
      - "not_null"
  - name: "word"
    type: "String"
    tests:
      - "not_null"

Throws this error

[FATAL] From line 42, column 20 to line 42, column 30: No match found for function signature LIKE
in script:<script> [42:20]:
/*+ test */
 LikeTest := SELECT id,
                   word LIKE '%al' AS like_word,
-------------------^
Zesky665 commented 1 month ago

For the full code check out: sqrl-testing/sqrl-integration-tests/src/test/resources/usecases/flink-functions/comparison-functions.sqrl