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.
Line refs are against the registered v0.1.3 tarball.
Problem
stat_to_dataframe(src/export.jl:288) references fields that do not exist onStatMsg:StatMsg(src/messages.jl:250) hasprice,quantity, andstat_flags— there is nostat_valueand noflags. Any call throwsErrorException: type StatMsg has no field stat_value.Impact
records_to_dataframedispatches to this for statistics records (src/export.jl:124), soDatabentoAPI.to_dataframe,to_csv,to_json, andto_parquetall fail for the STATISTICS schema. The mismatch suggests this path has no test against a constructedStatMsg.Suggested fix
(plus
ts_ref,stat_type,channel_id,update_action, which are useful columns for this schema), and a unit test that round-trips a syntheticStatMsgthroughrecords_to_dataframe.