Parquet
This document introduces the support for reading and writing Parquet file formats in VeloDB Cloud. It applies to the following features:
- Reading and writing data in the Catalog.
- Reading data using Table Valued Functions.
- Reading data with Broker Load.
- Writing data during Export.
- Writing data with Outfile.
Supported compression formats
- uncompressed
- snappy
- lz4
- zstd
- gzip
- lzo
- brotli
Parameters
Timestamp and date compatibility
In VeloDB Core 26.1.3, timestamp inference depends on the catalog or TVF compatibility settings. In particular, INT96 maps to TIMESTAMPTZ(6) when time-zone mapping is enabled and otherwise to DATETIME(6). Check these settings when reading files written by another engine.
In a future release, Parquet reads and writes are planned to preserve the distinction between wall-clock times and instants. A logical timestamp without a time zone maps to DATETIME; a logical timestamp with isAdjustedToUTC=true maps to TIMESTAMPTZ. Neither the Catalog compatibility property nor enable_mapping_timestamp_tz=false in a file TVF can restore the DATETIME mapping for the latter.
The planned compatibility changes treat Parquet INT96 as DATETIME(6) because it has no time zone annotation. Hive Catalogs and file TVFs are planned to accept the optional hive.parquet.time-zone property to specify the INT96 writer time zone. Its default is an empty string, which preserves wall-clock time. Use an IANA time zone or a UTC offset from -12:00 to +14:00. UTC and GMT are accepted; short aliases such as CST and PRC are rejected. Set it only when the writer time zone is known, for example, "hive.parquet.time-zone" = "Asia/Shanghai".
In VeloDB Core 26.1.3, Outfile and Export use INT96 timestamps by default. SELECT INTO OUTFILE accepts enable_int96_timestamps; the same override is not supported by Export in that release. A future release is planned to default to logical INT64 timestamps and add the Export override. Hive table writes use a separate compatibility choice; see Hive Catalog.
For the planned compatibility changes, DATE files written with the old Apache Doris encoding and containing 0000-01-01 through 0000-02-28 require migration based on their writer. A reader upgrade cannot repair affected files; retain the writer version and validate rewritten dates before migration.
Session variables
-
enable_parquet_lazy_materializationControls whether the Parquet Reader enables lazy materialization. Default is true.
-
hive_parquet_use_column_namesWhen reading Parquet data types from Hive tables, VeloDB Cloud will, by default, read data from columns in the Parquet file that have the same name as the columns in the Hive table. When this variable is set to
false, VeloDB Cloud will read data from the Parquet file based on the column order in the Hive table, regardless of column names. This is similar to theparquet.column.index.accessvariable in Hive. This parameter only applies to top-level column names and is ineffective for columns inside Structs.
Managed service settings
The following are engine configuration settings managed by VeloDB Cloud. Ask VeloDB Cloud support before requesting a change. Listed defaults are source defaults, not a report of the effective warehouse configuration.
-
parquet_metadata_size_limitThe maximum serialized footer metadata size for the native Parquet V2 Reader. Defaults to
268435456bytes (256 MiB), must be greater than0, and supports dynamic updates. This is separate from the Page Header limit. Exceeding it returnsParquet v2 footer size ... exceeds metadata limit .... -
enable_parquet_page_indexDetermines whether the Parquet Reader uses the Page Index to filter data. Changing this setting affects Page Index filtering and can change scan work. The source default is
true. -
parquet_header_max_size_mbThe maximum buffer size allocated when reading the Parquet Page header. Default is 1M.
-
parquet_rowgroup_max_buffer_mbThe maximum buffer size allocated when reading a Parquet Row Group. Default is 128M.
-
parquet_column_max_buffer_mbThe maximum buffer size allocated when reading a Column within a Parquet Row Group. Default is 8M.