Uploaded image for project: 'Calcite'
  1. Calcite
  2. CALCITE-3784

RexCall toString digest gives OOM while huge expression is evaluated

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Critical
    • Resolution: Unresolved
    • None
    • None
    • core
    • None

    Description

      I have some complex query which has tens of thousands of rex expressions and this expression is used in filter expression in the query.

      On creating a filter below code gets called:

      public RelBuilder filter(Iterable<CorrelationId> variablesSet,
        Iterable<? extends RexNode> predicates) {
      
        final RexNode simplifiedPredicates =
        simplifier.simplifyFilterPredicates(predicates);
        if (simplifiedPredicates == null) {
          return empty();
       }
      

      RexSimplify further adds the rexnode in the Set<RexNode> calling hashcode() internally which calls toString()

      Is there any way to avoid this computeDigest Call which creates complex string object and blows up the  RAM about 10GB?

      Attachments

        1. OOM_Screenshot.png
          225 kB
          Ravi Kapoor

        Issue Links

          Activity

            People

              Unassigned Unassigned
              ravi_kapoor Ravi Kapoor
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated: