[R] Silent loss of metadata integrity for date-time and numeric attributes in write_parquet()/read_parquet()
维护者通常 1 天内回复
@james-finn-travers 已经在做这个了。
开始于 2026年10月3日。
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 72/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- r
调研方向
从 write_parquet() 和 read_parquet() 使用的 R 元数据序列化入手,重点关注建议修复中的 serialize() 调用。确认 double 值属性(包括日期时间)能够通过 write_parquet()/read_parquet() 完全往返,同时现有文件仍然可读,且不需要修改 reader。
由索引模型根据 Issue 内容生成。
描述
Describe the bug, including details regarding any error messages, version, and platform.
Double-valued attributes, including date-times, do not round-trip through Arrow's R metadata. No warning is raised. (Tested on arrow 25.0.1, R 4.6.1, Linux.)
library(arrow)
options(digits.secs = 6)
df <- data.frame(x = 1:3)
attr(df, "updated") <- as.POSIXct("2026-10-02 14:30:15.987654321", tz = "UTC")
f <- tempfile(fileext = ".parquet")
write_parquet(df, f)
back <- read_parquet(f)
attr(df, "updated")
#> [1] "2026-10-02 14:30:15.987654 UTC"
attr(back, "updated")
#> [1] "2026-10-02 14:30:15.987653 UTC"
identical(attr(back, "updated"), attr(df, "updated"))
#> [1] FALSE
Suggested fix
Fortuitously, R already has an exact variant of the ASCII format, so the fix is simple and fully backwards compatible.
Arrow uses R_pstream_ascii_format (ascii = TRUE in base::serialize). Instead use R_pstream_asciihex_format (ascii = NA).
out <- serialize(safe_r_metadata(x, on_save = TRUE), NULL, ascii = NA)
The hex format means that doubles are written out in hex instead of decimal.
Either way, the output still starts with "A" (arrow's check) and base unserialize() reads it fine, so the reader needs no change and previous versions work with the output.
Component(s)
R
- 主要语言
- C++
- 星标
- 17.2k
- 派生
- 4.4k
- 平均合并
- 3 天 8 小时
- 30 天内合并 PR
- 69
环境准备
- 提供 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
apache/arrow 的其他 Issue
-
[R][Parquet] ParquetReaderProperties does not expose page_checksum_verification, so a corrupt page CRC reads silently可能重新可做 关联的 PR 已关闭且未合并。 未关闭Component: R Type: enhancement
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
-
[C++][Python] IPC reader rejects a DictionaryEncoding without indexType, which the format allows可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭Component: C++ Component: Python Type: bug
难度 2/5 1-3 小时 新手友好度 68/100
维护者通常 1 天内回复
-
[C++][Parquet] Plaintext-footer files written with AES_GCM_CTR_V1 record AES_GCM_V1 as the encryption algorithm and cannot be read可能已有人在做 @YusefSyed 于 10 天前认领。 未关闭Type: bug
难度 2/5 1-3 小时 新手友好度 88/100
维护者通常 1 天内回复
-
[R] Expose ignore_extra_columns and pad_short_rows CSV parse options可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭Component: R good-first-issue Type: enhancement
难度 2/5 1-3 小时 新手友好度 76/100
维护者通常 1 天内回复
-
Component: C++
难度 2/5 1-3 小时 新手友好度 86/100
维护者通常 1 天内回复
相似的 Issue
-
难度 1/5 1 小时以内 新手友好度 76/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 76/100
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 65/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 77/100
ros-navigation/navigation2#6648 · 1 条评论 ·
维护者通常 1 天内回复
-
[BUG] OTA Requestor accepts reserved provider endpoint 0xFFFF可能已有人在做 @Chapoly1305 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 72/100
project-chip/connectedhomeip#74742 ·
维护者通常 1 天内回复