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

Calcite engine. Avoid full index scans in case of null dynamic parameter

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 2.15
    • None
    • SQL Calcite: Optimized index scans with conditions containing NULLs
    • Release Notes Required

    Description

      Currently, queries like:

      SELECT * FROM tbl WHERE a >= ?
      

      Should return no rows if dynamic parameter is null, but can be downgraded to full index scan in case table have index on column a (ASCENDING order, NULLS FIRST).

      We should somehow analyse nulls in search bounds and return empty rows iterator for regular field conditions (`=`, `<`, '>`, etc). But also nulls should be processed as is in search bounds for conditions like `IS NULL`, `IS NOT NULL`, `IS NOT DISTINCT FROM` (the last one not supported currently).  

      Attachments

        Issue Links

          Activity

            People

              alex_pl Aleksey Plekhanov
              alex_pl Aleksey Plekhanov
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 1h 10m
                  1h 10m