Discussing the article: "Reading Parquet Natively in MQL5: Thrift, Snappy and Dictionary Decoding into matrix Without CSV"

Check out the new article: Reading Parquet Natively in MQL5: Thrift, Snappy and Dictionary Decoding into matrix Without CSV.

This article shows how to read Apache Parquet files directly in MQL5 without DLLs: a native Thrift Compact Protocol decoder for footer metadata, a native Snappy block decompressor, and a hybrid RLE/bit‑packing decoder for definition levels and dictionary indices. We assemble numeric columns into a matrix with an optional null mask. Scope: flat schemas, INT32/INT64/FLOAT/DOUBLE, UNCOMPRESSED/SNAPPY, DataPageV1, first row group. The result avoids CSV conversions and preserves nulls and types.

The usual way to get Parquet data into MQL5 is a conversion step: a Python script writes a CSV, and an MQL5 script or EA reads it back with FileReadString(). That works, but it costs a second process before the terminal sees fresh data, a round trip through text for every number, and the file's own schema — which column is nullable, which is an integer — since once everything is text, null handling becomes a convention you invent and keep in sync yourself.

This article builds a native Parquet reader that skips that step: a hand-written Thrift Compact Protocol decoder, a Snappy decompressor, and a hybrid RLE/bit-packing decoder, assembled by one orchestrator into a native matrix — no DLL, no external process. The matrix holds doubles, so an INT64 beyond 2^53 is rounded and flagged, and the file is treated as untrusted input throughout: a file that fails a check is refused rather than half-read.

Author: Olamide Daniel Adebayo