Skip to content

[python]Fix avro write timestamp without timezone wrongly#7259

Merged
JingsongLi merged 2 commits intoapache:masterfrom
discivigour:bug/avroTimezone
Feb 11, 2026
Merged

[python]Fix avro write timestamp without timezone wrongly#7259
JingsongLi merged 2 commits intoapache:masterfrom
discivigour:bug/avroTimezone

Conversation

@discivigour
Copy link
Contributor

@discivigour discivigour commented Feb 11, 2026

Purpose

When fastavro writes timestamp without a timezone (such as pyarrow.timestamp('us')), the write and read results will differ by 8 hours.

This is because fastavro calculates the timestamp based on the local timezone (UTC+8) when writing no-timezone datetime data of the timestamp-millis logical type. It subtracts 8 hours when storing UTC timestamp, resulting in an 8-hour difference when reading.

Tests

test_py_write_read_pk_table()

API and Format

Documentation

Generative AI tooling

Copy link
Contributor

@JingsongLi JingsongLi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

@JingsongLi JingsongLi merged commit 7914ab0 into apache:master Feb 11, 2026
6 checks passed
jerry-024 added a commit to jerry-024/paimon that referenced this pull request Feb 12, 2026
* upstream/master: (33 commits)
  [core] Fix merge adjacent files in DataEvolutionCompactCoordinator
  [python] Rename list_tag to list_tags
  [python] add list tag for TagManager (apache#7264)
  [core][python] Introduce DataFileMeta.nonNullRowIdRange to unify codes
  [python] with_shard should be evenly distributed for data evolution mode (apache#7271)
  [core] Remove useless version in Varant
  [core] Should work with Split in DataTableBatchScan
  [core] Fix  paimon_incremental_query with limit push down (apache#7269)
  [rest] Improve RestCatalog OpenAPI nonce generation (apache#7270)
  [cdc] Avoid sending empty schema change events to Schema Evolution (apache#7261)
  [python] Fix avro write timestamp without timezone wrongly (apache#7259)
  [doc] add doc for filter by _ROW_ID on data evolution (apache#7262)
  [fs] Extract jindo dls to separate module (apache#7263)
  [core] Add listTableDetails method to Catalog interface (apache#7266)
  [python] Support filter by _ROW_ID for data evolution (apache#7252)
  [Flink] Add sourceParallelismUpperBound metric for auto-scaling systems (apache#7117)
  [github] Add whether it is an AI-generated tag in the PR template (apache#7257)
  [core] Improve HttpClient error response handling (apache#7254)
  [python] Light refactor: move _is_blob_file check into DataFileMeta (apache#7256)
  [core] RowIdPredicateVisitor supports converting between statement (apache#7255)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants