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

Calcite integration. Fix metadata for IgniteTable when it has embedded filters.

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: sql
    • Labels:
      None
    • Ignite Flags:
      Release Notes Required

      Description

      By default RelMdRowCount return the actual row count for IgniteTables. But current implementation of IgniteTableScan may contain embedded filters and rows that are filtered out by these filters are not taken into account by the metadata subsystem.
      For example, table emps contains 1000 rows. Filter name='Vasya' filters out 95% of rows. For now we end up with situation

      IgniteFilter(name='Vasya') <- estimated cardinality = 50 rows 
        IgniteTableScan(filters=null) <- estimated cardinality = 1000 rows.
      

      but after merging Filter into Scan we get the wrong estimation

      IgniteTableScan(filters={name='Vasya'}) <- estimated cardinality = 1000 rows. But should be 50 rows.
      

      We need to add a special case in order to compute the actual cardinality returned by IgniteTableScan

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                korlov Konstantin Orlov
                Reporter:
                rkondakov Roman Kondakov
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: