Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-21343

CBO: CalcitePlanner debug logging is expensive and costly

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 4.0.0
    • 4.0.0-alpha-1
    • CBO
    • None

    Description

            //Remove subquery
            LOG.debug("Plan before removing subquery:\n" + RelOptUtil.toString(calciteGenPlan));
            calciteGenPlan = hepPlan(calciteGenPlan, false, mdProvider.getMetadataProvider(), null,
                    new HiveSubQueryRemoveRule(conf));
            LOG.debug("Plan just after removing subquery:\n" + RelOptUtil.toString(calciteGenPlan));
      
            calciteGenPlan = HiveRelDecorrelator.decorrelateQuery(calciteGenPlan);
            LOG.debug("Plan after decorrelation:\n" + RelOptUtil.toString(calciteGenPlan));
      

      The LOG.debug() consumes more CPU than the actual planner steps.

      Attachments

        1. calcite-planner-after-fix.svg.zip
          82 kB
          Gopal Vijayaraghavan
        2. Reloptutil-toString.png
          230 kB
          Gopal Vijayaraghavan

        Issue Links

          Activity

            People

              jcamacho Jesús Camacho Rodríguez
              gopalv Gopal Vijayaraghavan
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: