Wire memory tracker in constant folding not done through ExpressionNary::optimise()

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Won't Do
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Query Execution
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      In addition to ExpressionNary, constant folding is also done in ExpressionDateDiff, ExpressionDateArithmetics and ExpressionDateTrunc, but in those cases the risk of using unbounded memory is lower because the values folded are semantically constrained to short strings or small numbers. For those cases, we should create a temporary SimpleMemoryUsageTracker and attach it to the eval context. The internalQueryMaxConstantFoldingBytes knob will be used to bound each individual constant-fold evaluation until a per-query limit is defined.

      The flags gFeatureFlagExpressionMemoryTracking and gFeatureFlagMemoryTracking must be checked before passing the tracker.

            Assignee:
            Unassigned
            Reporter:
            Foteini Alvanaki
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: