Skip to main content

AdaptiveAggregateScanNode

  • Namespace: PPDS.Dataverse.Query.Planning.Nodes
  • Assembly: PPDS.Dataverse
  • Kind: Class
  • Implements: IQueryPlanNode

Summary​

Wraps a FetchXML aggregate scan with adaptive retry. When the Dataverse 50K AggregateQueryRecordLimit is hit, splits the date range in half and retries both halves recursively. Guarantees convergence for any data distribution.

Members​

Constructors​

AdaptiveAggregateScanNode(string templateFetchXml, string entityLogicalName, DateTime rangeStart, DateTime rangeEnd, int depth)​

AdaptiveAggregateScanNode(string templateFetchXml, string entityLogicalName, DateTime rangeStart, DateTime rangeEnd, int depth)

Initializes a new instance of the PPDS.Dataverse.Query.Planning.Nodes.AdaptiveAggregateScanNode class.

Methods​

ExecuteAsync​

IAsyncEnumerable<QueryRow> ExecuteAsync(QueryPlanContext context, CancellationToken cancellationToken)

Execute this node, producing rows.

Properties​

Children​

IReadOnlyList<IQueryPlanNode> Children { get; }

Child nodes (inputs to this operator).

Depth​

int Depth { get; }

Current recursion depth (0 = original partition).

Description​

string Description { get; }

Human-readable description for EXPLAIN output.

EntityLogicalName​

string EntityLogicalName { get; }

The entity logical name being queried.

EstimatedRows​

long EstimatedRows { get; }

Estimated row count (for cost-based decisions). -1 if unknown.

RangeEnd​

DateTime RangeEnd { get; }

Exclusive end of this partition's date range.

RangeStart​

DateTime RangeStart { get; }

Inclusive start of this partition's date range.

TemplateFetchXml​

string TemplateFetchXml { get; }

The template FetchXML (without date range filter).

Fields​

MaxDepth​

int MaxDepth

Maximum recursion depth to prevent infinite splitting.