Skip to content

Fix/fc 887 query cache - #9

Merged
bplatz merged 2 commits into
masterfrom
fix/FC-887-query-cache
Oct 28, 2020
Merged

bplatz merged 2 commits into
masterfrom
fix/FC-887-query-cache

Conversation

@bplatz

@bplatz bplatz commented Oct 28, 2020

Copy link
Copy Markdown
Contributor

No description provided.

@bplatz
bplatz requested a review from a team October 28, 2020 17:00
@bplatz
bplatz merged commit c1df19d into master Oct 28, 2020
@bplatz
bplatz deleted the fix/FC-887-query-cache branch October 28, 2020 17:30
flyingmachine pushed a commit that referenced this pull request Feb 22, 2023
Use string-based context for queries
aaj3f added a commit that referenced this pull request Jul 18, 2026
resolve_join_at_open resolved EVERY GROUP BY key on the terminal dim, so a
fact-column key (#7's `GROUP BY yearNum (date dim), shipMethod (fact)`) failed
scalar_column_for_var(terminal_dim, shipMethod) and declined → 156s materialized
fold → deadline. Route each key to its single source instead: fact-column keys
read inline from the fact scan, dim-attribute keys from the FK→GKey map, composed
per SPARQL order.

- KeySource plan + assemble_group_key interleave fact-inline and dim-resolved
  positions; group_cols stays one-per-position so the output binding() is
  unchanged. Both existing paths are special cases (all-Fact = single-table,
  all-Dim = today's join, byte-identical).
- Gate Q1 (route_group_key_sources): a key's source must be EXACTLY ONE
  participating pattern — 0 (unbound), ≥2 (cross-source value-equality the fold
  cannot enforce), or an interior-dim source all decline (v1 admits fact or the
  terminal dim only). No fact-wins tiebreak.
- NULL in ANY key position drops the fact row (BGP unbound-object semantics):
  assemble_group_key's per-position Null-drop is the robust guarantee, with
  validity_cols (a fact group key is a fact object var) as the secondary drop; dim
  keys drop via the map-miss. Symmetric across sources.
- Q2 plain-literal gate applied per key on ITS OWN source pattern/TM (fact AND
  dim). O1/E2 star_constraints, #1490 dup-key decline, and the memory/cancel
  checkpoints are untouched. Empty-dim-subset (all-fact keys over a join)
  degenerates the FK→GKey map to a join-existence set.
- Hermetics: route_group_key_sources (mixed both orders, cross-source/interior/
  unbound declines, all-fact); assemble_group_key (interleave both orders,
  fact-null + dim-null drops, no-resolver defensive drop, and the empty-dim-subset
  existence-only slice `Some(&[])`).
- Corpus q066 (FACT_SHIPMENT mixed COUNT via FROM: string fact key + integer dim
  key; COUNT-only because SHIP_COST is xsd:double and the f64 SUM is
  summation-order dependent) + q067 (FACT_SUPPORT_TICKET mixed COUNT + SUM over the
  xsd:integer csatScore — exact i128, hash-deterministic — exercising the mixed key
  path together with a value fold). Oracles blessed at the wave-4 corpus gate.

Riders folded per review:
- W4-3 DEFENSIVE cancellation: values.rs ValuesOperator now polls check_cancelled
  per batch, bounding the O(input_rows × value_rows) match for a large VALUES
  product. This is capacity protection, NOT the round-3b #9 fix — #9's timeout is
  the un-lowered full scan (the VALUES→IN-set lowering is the real fix, next-slate);
  this poll only makes the execution-side product cancellable.
- W4-1: pin "-0" (parses to 0, canonical "0" ≠ "-0" → declines) and a >i64
  overflow string (parse Err → declines) in the coercion refutation hermetic.
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