Skip to content

docs: re-doing documentation - #180

Merged
milindsrivastava1997 merged 7 commits into
mainfrom
dev-milind
Aug 14, 2026
Merged

milindsrivastava1997 merged 7 commits into
mainfrom
dev-milind

Conversation

@milindsrivastava1997

Copy link
Copy Markdown
Collaborator

No description provided.

# Conflicts:
#	README.md
#	docs/l2-intent-algebra.md
#	docs/l3-intent-algebra.md
#	docs/l3-summary-bound-ir.md
#	docs/l4-physical-plan.md
#	docs/l4-summary-bound-ir.md
#	docs/l5-physical-plan.md
#	old_docs/docs/l2-logical-plan.md
#	old_docs/docs/l3-intent-algebra.md
#	old_docs/docs/l4-summary-bound-ir.md
#	old_docs/docs/l5-physical-plan.md
@milindsrivastava1997 milindsrivastava1997 changed the title Re-doing documentation docs: re-doing documentation Aug 14, 2026
@milindsrivastava1997
milindsrivastava1997 merged commit ed7d3c4 into main Aug 14, 2026
1 check passed
@milindsrivastava1997
milindsrivastava1997 deleted the dev-milind branch August 14, 2026 14:27
Comment thread docs/pre-asap-ir.md

The pre-ASAP IR is defined using the `QueryExpr` enum. We discuss some of important enum types below.

## Node index

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://github.com/ProjectASAP/ASAPController/blob/main/docs/pre-asap-ir.md#node-index node index now is mixing SQL specific node and PromQL specific nodes, e..g, Scan/filter, vs infojoin

Comment thread docs/pre-asap-ir.md
Comment thread docs/pre-asap-ir.md
meaningful summary implementation.

**Fields** (real implementation — differs from the sketch above, see #185):
- `reduction` — whether this is a genuine cross-entity reduction (`Reduce(GroupKeys)`) or a per-entity pass-through with no grouping concept at all (`PerEntity`).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO: need to check this with examples, but I remember this was introduced due to a real example need.

Comment thread docs/pre-asap-ir.md
- `aggs` — the aggregate intents to compute (`Sum`, `Rate`, `HistogramQuantile`, ...).
- `output_names` — output column name per entry in `aggs`; overrides the synthetic default when non-empty.
- `having` — an optional post-aggregation filter predicate (SQL `HAVING`).
- `child` — the input being aggregated.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These seem too implementation level.

Comment thread docs/pre-asap-ir.md

### Subquery

PromQL sub-query syntax `<expr>[range:resolution]` — a logical pass-through that lets a

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

<instant_query> [ : [ ] ] [ offset ]
as promql sub-query syntax

Comment thread docs/pre-asap-ir.md
Comment thread docs/pre-asap-ir.md
SELECT * FROM (SELECT srcip, COUNT(*) AS cnt FROM packets GROUP BY srcip) t WHERE cnt > 10
```

**Fields:**

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How did these "Fields" come up? They look implementation level and not related to the node definitions themselves.

Comment thread docs/pre-asap-ir.md
- `left` — the left branch.
- `right` — the right branch.

### Merge

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO: need to note Merge node is not SQL nor PromQL, it is a node introduced by ASAP for representing multi-branch query result supported by one query expression, or one intermediate state?

Comment thread docs/pre-asap-ir.md

### Scalar

A scalar constant leaf — a PromQL number literal, or a folded constant scalar expression.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like a binary operation node as SQL, why it is PromQL specific?

Comment thread docs/pre-asap-ir.md
time()
```

### VectorFromScalar

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if these are needed for the common IR layer. they will appear in promql parser output I agree.

milindsrivastava1997 added a commit that referenced this pull request Aug 14, 2026
Addresses PR #180 review comment: the flat node index mixed SQL-only
and PromQL-only nodes together (e.g. Scan/Filter next to InfoJoin)
with no indication of scope. Group it under the same section headers
used in the body (aggregation/time/relational/PromQL/SQL) so scope is
visible at a glance.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants