Uploaded image for project: 'Engineering'
  1. Engineering
  2. ENG-2779

Add SQL support for "IN (<list of fixed number of constant values>)" - no index support for this ticket

    XMLWordPrintable

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: IT16-v2.5
    • Fix Version/s: V3.4
    • Component/s: Core
    • Team Backlog:
      CORE team
    • Epic Link:
    • Story Points:
      8
    • Sprint:
      core10

      Description

      First step: Don't have to use the index, turn into an "or" expression
      Could be re-written as a function. Comes in as an expression to the planner.

      One idea: turn this into "or"s, then subsequently make or's use indices.

      2nd pass = have or expressions use index more efficiently. Not part of this ticket.

      In a quick feature test,

      callProcedure("@AdHoc", "select count from P1 where ID IN (2,4,6)")

      currently fails with some kind of timeout

      after printing

      UNSUPPORTED EXPR TYPE: 25
      UNSUPPORTED EXPR TYPE: 26

      to stderr and logging:

      WARN ZK-SERVER: Exception causing close of session 0xfb7a0c352800001 due to java.nio.channels.CancelledKeyException
      INFO HOST: ClientConfigForTest reports connection lost due to CONNECTION_CLOSED at host 127.0.0.1:21212 with 0 connections left

      The "IN (<list of constants>)" syntax seems to be failing in the parser.
      There are mentions of "IN" improvements in the revision notes for hsqldb that post-date our fork,
      so a parser upgrade MIGHT help.

      This feature request was cloned from the more ambitious feature request ENG-39 with the following description:

      Request to support IN functionality in SQL WHERE clause as list of values.

      select tableA.column1
      from tableA
      where tableA.column2 in ;

      1. First update HSQLDB
      2. Add support in XMLQueryParser
      3. Add new InComparisonExpression node
      4. Add support in QueryPlanner

      Rinse and repeat

      ORIGINAL REPORTER: pavlo@cs.brown.edu

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              pmartel Paul Martel
              Reporter:
              pmartel Paul Martel
              Votes:
              2 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Zendesk Support