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

Calcite integration. Merge index conditions for the same field.

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • 2.15
    • sql
    • SQL Calcite: Added optimization to merge index conditions for the same field
    • Release Notes Required

    Description

      Index scans should be able to merge index conditions. For example query

      SELECT * FROM tbl WHERE a<5 AND a<10
      

      should be reduced to

       

      SELECT * FROM tbl WHERE a<5
      

      Parameters should be handled in a more tricky way:

      SELECT * FROM tbl WHERE a<?1 AND a<?2
      

      can be rewritten as

      SELECT * FROM tbl WHERE a<MIN(?1, ?2)

      where the expression MIN(?1, ?2) should be evaluated right before the execution when parameters are known.

       

       

      Attachments

        Issue Links

          Activity

            People

              alex_pl Aleksey Plekhanov
              rkondakov Roman Kondakov
              Votes:
              0 Vote for this issue
              Watchers:
              3 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 - 3h 20m
                  3h 20m