Uploaded image for project: 'Ignite'
  1. Ignite
  2. IGNITE-15004

Calcite engine. LIKE ESCAPE fails with empty escape string

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • None
    • None
    • sql
    • None
    • Docs Required, Release Notes Required

    Description

      SELECT '%' LIKE '%' ESCAPE ''

      error:

      class org.apache.ignite.IgniteException: Unexpected exception
      	at org.apache.ignite.internal.processors.query.calcite.exec.ExecutionContext.lambda$execute$0(ExecutionContext.java:244)
      	at org.apache.ignite.internal.processors.query.calcite.exec.QueryTaskExecutorImpl.lambda$execute$0(QueryTaskExecutorImpl.java:68)
      	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
      	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
      	at java.base/java.lang.Thread.run(Thread.java:834)
      Caused by: java.lang.RuntimeException: Invalid escape character ''
      	at org.apache.calcite.runtime.Like.invalidEscapeCharacter(Like.java:104)
      	at org.apache.calcite.runtime.Like.sqlToRegexLike(Like.java:56)
      	at org.apache.calcite.runtime.SqlFunctions.like(SqlFunctions.java:594)
      	at SC.execute(Unknown Source)
      	at org.apache.ignite.internal.processors.query.calcite.exec.exp.ExpressionFactoryImpl$ProjectImpl.apply(ExpressionFactoryImpl.java:387)
      	at org.apache.ignite.internal.processors.query.calcite.exec.rel.ProjectNode.push(ProjectNode.java:63)
      	at org.apache.ignite.internal.processors.query.calcite.exec.rel.ScanNode.push(ScanNode.java:107)
      	at org.apache.ignite.internal.processors.query.calcite.exec.ExecutionContext.lambda$execute$0(ExecutionContext.java:239)
      	... 4 more
      

      Test:
      function/string/test_like_escape.test

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              tledkov-gridgain Taras Ledkov
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated: