docs: standardize fanout terminology

This commit is contained in:
Luca Martial 2026-05-25 17:08:28 +02:00
parent 4827437f3a
commit 9aac270f80
19 changed files with 66 additions and 66 deletions

View file

@ -1,4 +1,4 @@
"""Dedicated tests for aggregate locality (fan-out/chasm trap correctness)."""
"""Dedicated tests for aggregate locality (fanout/chasm trap correctness)."""
import pytest
import sqlglot
@ -213,7 +213,7 @@ class TestNoFanOut:
sqlglot.parse(sql)
def test_m2o_join_no_ctes(self, ecommerce_sources):
"""orders → customers is m2o, no fan-out."""
"""orders → customers is m2o, no fanout."""
graph = JoinGraph(ecommerce_sources)
graph.build()
planner = QueryPlanner(ecommerce_sources, graph)
@ -540,7 +540,7 @@ class TestFactSideDimensionsInChasm:
"""LIMIT 1: Fact-side dimensions in chasm trap (local to one CTE only)."""
def test_fact_side_dimension_in_chasm_raises_error(self):
"""Asymmetric dim from fact_a only → raises error (would cause FULL JOIN fan-out)."""
"""Asymmetric dim from fact_a only → raises error (would cause FULL JOIN fanout)."""
hub = SourceDefinition(
name="hub",
table="public.hub",
@ -977,7 +977,7 @@ class TestBug13_FalseChasm_AliasAggregate:
dimensions=["billing_customer.name", "shipping_customer.name"],
)
plan = planner.plan(query)
assert not plan.has_fan_out, "Should not detect fan-out between alias siblings"
assert not plan.has_fan_out, "Should not detect fanout between alias siblings"
sql = gen.generate(plan, sources)
sqlglot.parse(sql)

View file

@ -305,12 +305,12 @@ class TestPredefinedMeasureDeps:
assert "GROUP BY" in sql.upper()
# ── Planner: fan-out with one_to_many to dimension sources (lines 595-643) ──
# ── Planner: fanout with one_to_many to dimension sources (lines 595-643) ──
class TestFanOutEdgeCases:
def test_single_source_fan_out_to_dimension(self):
"""Measure source with one_to_many to dimension should trigger fan-out."""
"""Measure source with one_to_many to dimension should trigger fanout."""
hub = SourceDefinition(
name="hub",
table="public.hub",

View file

@ -89,10 +89,10 @@ class TestCrossSourceM2O:
class TestFanOut:
"""Test 3: Fan-out (aggregate locality)."""
"""Test 3: Fanout (aggregate locality)."""
def test_orders_by_region_no_fanout(self, planner, generator, ecommerce_sources):
"""orders → customers → regions is all m2o. No fan-out needed."""
"""orders → customers → regions is all m2o. No fanout needed."""
sql = generate_sql(
planner,
generator,

View file

@ -200,12 +200,12 @@ class TestFanOutDetection:
class TestFanOutSingleSource:
"""Fan-out when a single measure source has o2m path to dimension source."""
"""Fanout when a single measure source has o2m path to dimension source."""
def test_reverse_path_fan_out(self):
"""Querying from customers (dimension) with measures from orders triggers fan-out
"""Querying from customers (dimension) with measures from orders triggers fanout
when the path from the measure source (orders) to the dimension source (customers)
is m2o so no fan-out. But reversed: measure on customers, dim on orders."""
is m2o so no fanout. But reversed: measure on customers, dim on orders."""
customers = SourceDefinition(
name="customers",
table="t",
@ -248,7 +248,7 @@ class TestFanOutSingleSource:
assert plan.has_fan_out
def test_m2o_multi_hop_no_fan_out(self, planner):
"""orders → customers → regions is all m2o. No fan-out."""
"""orders → customers → regions is all m2o. No fanout."""
query = SemanticQuery(
measures=["sum(orders.amount)"],
dimensions=["regions.name"],
@ -1116,7 +1116,7 @@ class TestDerivedMeasureEdgeCases:
assert_valid_sql(result.sql)
# ── From test_edge_cases.py: filter fan-out detection ────────────────
# ── From test_edge_cases.py: filter fanout detection ────────────────
class TestFilterFanOutDetection: