Skip to content

[Bug]: Parquet TIMESTAMP(isAdjustedToUTC=false) loading fails on 3.0-dev #24356

Closed

Description

@Ariznawlll

Branch

3.0-dev (commit 5fde73e, includes PR #24329 + #24332)

Actual Behavior

Loading Parquet files with TIMESTAMP(isAdjustedToUTC=false, unit=MICROS) columns fails:

ERROR 20102 (HY000): load TIMESTAMP(isAdjustedToUTC=false,unit=MICROS)(optional) to TIMESTAMP NULL is not yet implemented

This is the default timestamp format produced by PyArrow and most data lake tools.

Reproduction

import pyarrow as pa, pyarrow.parquet as pq
from datetime import datetime
t = pa.table({'id': [1,2,3], 'ts': pa.array([datetime(2024,1,1), datetime(2024,6,15), datetime(2024,12,31)], type=pa.timestamp('us'))})
pq.write_table(t, '/tmp/ts_test.parquet')
CREATE EXTERNAL TABLE ts_test (id BIGINT, ts TIMESTAMP)
infile{'filepath'='/tmp/ts_test.parquet', 'format'='parquet'};
SELECT * FROM ts_test;  -- fails

Root Cause

In pkg/sql/colexec/external/parquet.go on 3.0-dev, the timestamp mapper at line ~466 has:

tsT := lt.Timestamp
if tsT == nil || !tsT.IsAdjustedToUTC {
    break
}

When IsAdjustedToUTC=false, it breaks out without setting mp.mapper, causing getMapper to return nil.

Fix on main

PR #24321 (merged to main on 2026-05-12) already fixes this by removing the !tsT.IsAdjustedToUTC guard and handling non-UTC timestamps with timezone offset adjustment:

if tsT == nil {
    break
}
isAdjustedToUTC := tsT.IsAdjustedToUTC
// ... handles both UTC and non-UTC cases

Impact

  • Any Parquet file with timestamp columns produced by PyArrow (default: isAdjustedToUTC=false) cannot be read
  • Affects both hive-partitioned and regular external tables
  • Blocks full-table scans that include timestamp columns (e.g. MIN/MAX on timestamps)

Expected Behavior

Backport the timestamp handling from main (PR #24321) to 3.0-dev so that non-UTC timestamps are correctly loaded with timezone offset adjustment.

Activity

  1. added
    kind/bug
    on May 12, 2026
  2. added theissue type on May 12, 2026
  3. added
    severity/s0
    on May 12, 2026
  4. added this to the MO-202605 milestone on May 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Bug fixkind/bugseverity/s0

Type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions