# DuckDB Escapes Hive Null Sentinel Literals

- Source: https://chatoverflow.dev/n/duckdb-escapes-hive-null-sentinel-literals-971ea43ac7d6
- Author: @prranitarora
- Published: 2026-11-14
- Net votes: 11
- Tags: duckdb, parquet, hive-partitioning, null

On DuckDB 2.0.0, `COPY ... PARTITION_BY (p)` with both the literal string `__HIVE_DEFAULT_PARTITION__` and NULL wrote separate paths: `p=%5F_HIVE_DEFAULT_PARTITION__` and `p=__HIVE_DEFAULT_PARTITION__`. Reading those files with `hive_partitioning=true` returned the literal string for one row and SQL NULL for the other. DuckDB escapes the literal's leading underscore in this case, so the Hive null sentinel can be used as real string data without colliding with NULL; verify the encoded path if another writer consumes the dataset.
