T-209: M2.2u — Fix ceoPosts event kind ('ceo_post') and co-publish under <curatedRoot>/events
This commit is contained in:
parent
436616b343
commit
035d18bfad
15 changed files with 1213 additions and 250 deletions
|
|
@ -11,7 +11,7 @@
|
|||
* - `<curatedRoot>/bars_1d/year=*\/part.parquet` (`hive_partitioning = true`)
|
||||
* - `<curatedRoot>/adj_factors/part.parquet` (point-in-time fenced snapshot with
|
||||
* `stock_bot.adj_factors.*` Parquet footer metadata)
|
||||
* - `<curatedRoot>/events/year=*\/part.parquet` (`hive_partitioning = true`)
|
||||
* - `<curatedRoot>/events/year=*\/\*.parquet` (`hive_partitioning = true`)
|
||||
* - `<curatedRoot>/shorts/part.parquet`
|
||||
* - `<curatedRoot>/fx_1d/part.parquet`
|
||||
* - `<curatedRoot>/fundamentals_pit/year=*\/part.parquet` (`hive_partitioning = true`)
|
||||
|
|
@ -1445,7 +1445,7 @@ export function planEventsQuery(q: EventsQuery, ctx: DuckDbPlanContext): Planned
|
|||
const fromIso = formatUtcIsoWithMicros(fenced.fromMs, fromSubMs);
|
||||
const toIso = formatUtcIsoWithMicros(fenced.toMs, toSubMs);
|
||||
const asOfIso = formatUtcIsoWithMicros(fenced.asOfMs, asOfSubMs);
|
||||
const eventsPath = joinCuratedPath(curatedRoot, 'events/year=*/part.parquet');
|
||||
const eventsPath = joinCuratedPath(curatedRoot, 'events/year=*/*.parquet');
|
||||
const kindPlaceholders = buildPlaceholders(kinds.length);
|
||||
const orderBy =
|
||||
'ORDER BY e.listing_id ASC, e.ts ASC, e.kind ASC, e.subtype ASC, e.payload_json ASC, e.known_at ASC, e.known_at_source ASC';
|
||||
|
|
|
|||
|
|
@ -384,7 +384,7 @@ describe('pure DuckDB query planners — exact SQL and bound parameters', () =>
|
|||
expect(kinds).toEqual(['filing', 'earnings', 'filing']);
|
||||
expect(withListings.sql).toBe(
|
||||
'SELECT e.listing_id, epoch_ms(e.ts) AS ts, epoch_ms(e.known_at) AS known_at, e.known_at_source, e.kind, e.subtype, e.payload_json ' +
|
||||
`FROM read_parquet('${CURATED_ROOT}/events/year=*/part.parquet', hive_partitioning = true) AS e ` +
|
||||
`FROM read_parquet('${CURATED_ROOT}/events/year=*/*.parquet', hive_partitioning = true) AS e ` +
|
||||
'WHERE e.kind IN (?, ?) AND e.listing_id IN (?, ?) AND e.ts >= ? AND e.ts <= ? AND e.known_at <= ? ' +
|
||||
'ORDER BY e.listing_id ASC, e.ts ASC, e.kind ASC, e.subtype ASC, e.payload_json ASC, e.known_at ASC, e.known_at_source ASC'
|
||||
);
|
||||
|
|
@ -408,7 +408,7 @@ describe('pure DuckDB query planners — exact SQL and bound parameters', () =>
|
|||
);
|
||||
expect(withoutListings.sql).toBe(
|
||||
'SELECT e.listing_id, epoch_ms(e.ts) AS ts, epoch_ms(e.known_at) AS known_at, e.known_at_source, e.kind, e.subtype, e.payload_json ' +
|
||||
`FROM read_parquet('${CURATED_ROOT}/events/year=*/part.parquet', hive_partitioning = true) AS e ` +
|
||||
`FROM read_parquet('${CURATED_ROOT}/events/year=*/*.parquet', hive_partitioning = true) AS e ` +
|
||||
'WHERE e.kind IN (?) AND e.ts >= ? AND e.ts <= ? AND e.known_at <= ? ' +
|
||||
'ORDER BY e.listing_id ASC, e.ts ASC, e.kind ASC, e.subtype ASC, e.payload_json ASC, e.known_at ASC, e.known_at_source ASC'
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue