You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
stat_to_dataframe references nonexistent StatMsg fields (stat_value, flags) — throws on any STATISTICS records #33
Line refs are against the registered v0.1.3 tarball.
Problem
stat_to_dataframe (src/export.jl:288) references fields that do not exist on StatMsg:
stat_value = [r.stat_value for r in records],
flags = [r.flags for r in records],
StatMsg (src/messages.jl:250) has price, quantity, and stat_flags — there is no stat_value and no flags. Any call throws ErrorException: type StatMsg has no field stat_value.
Impact
records_to_dataframe dispatches to this for statistics records (src/export.jl:124), so DatabentoAPI.to_dataframe, to_csv, to_json, and to_parquet all fail for the STATISTICS schema. The mismatch suggests this path has no test against a constructed StatMsg.
Suggested fix
price = [price_to_float(r.price) for r in records],
quantity = [r.quantity for r in records],
flags = [r.stat_flags for r in records],
(plus ts_ref, stat_type, channel_id, update_action, which are useful columns for this schema), and a unit test that round-trips a synthetic StatMsg through records_to_dataframe.
Activity
Fix STATISTICS decode corruption and related decoder bugs (#32-#35) (#36
tbeason commentedon Jun 10, 2026
Fixed in #36 (merged as 371301c).