Native Parquet write falls back on int96RebaseModeInWrite=LEGACY even when timestamps are not written as INT96
维护者通常 2 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 62/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
调研方向
回退逻辑位于 NativeWriteUtils.legacyDatetimeRebaseWriteReason;从这里开始,阅读它在检查输出时间戳类型之前如何检查 int96RebaseModeInWrite。添加一个条件,使 INT96 检查仅在 spark.sql.parquet.outputTimestampType 为 INT96 时生效,然后添加一个回归测试,使用 TIMESTAMP_MICROS 和 int96RebaseModeInWrite=LEGACY,断言写入保持为原生写入。当该测试通过且 docs/source/user-guide/latest/parquet.md 中的段落已更新时,任务完成。
由索引模型根据 Issue 内容生成。
描述
What is the problem the feature request solves?
Found in review of #7053. The native Parquet writer fallback added there, NativeWriteUtils.legacyDatetimeRebaseWriteReason, treats spark.sql.parquet.int96RebaseModeInWrite=LEGACY as a reason to fall back whenever the output has a timestamp column. That setting only governs the INT96 encoding. When spark.sql.parquet.outputTimestampType is TIMESTAMP_MICROS or TIMESTAMP_MILLIS, Spark writes INT64 and uses datetimeRebaseModeInWrite instead, so the INT96 setting has no effect on the output.
Reproduction: a timestamp column, outputTimestampType=TIMESTAMP_MICROS, datetimeRebaseModeInWrite=CORRECTED. Changing only int96RebaseModeInWrite from CORRECTED to LEGACY makes the helper return a fallback reason instead of None. Spark writes the same INT64 TIMESTAMP(MICROS) either way (for 1500-01-01 12:34:56.123456 both files contain -14831724303876544).
The fallback is safe, but an unrelated legacy INT96 setting disables native write acceleration for a write the native writer handles correctly.
Describe the potential solution
Only apply the INT96 condition when spark.sql.parquet.outputTimestampType is INT96. The native writer always writes INT64 microseconds and ignores outputTimestampType when writing, so the check has to read the session conf.
Add a regression test with a non-INT96 timestamp output and int96RebaseModeInWrite=LEGACY that asserts the write stays native and matches Spark's value. Update the paragraph in docs/source/user-guide/latest/parquet.md that names int96RebaseModeInWrite=LEGACY as a fallback trigger.
Additional context
Reviewer comment: https://github.com/apache/datafusion-comet/pull/7053#discussion_r4458640616
Follow-on to #7053, which should merge first.
- 主要语言
- Scala
- 星标
- 1.3k
- 派生
- 405
- 平均合并
- 3 天 1 小时
- 30 天内合并 PR
- 277
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
apache/datafusion-comet 的其他 Issue
-
requires-triage
难度 2/5 1-3 小时 新手友好度 78/100
apache/datafusion-comet#7458 ·
维护者通常 2 天内回复
-
requires-triage
难度 2/5 1-3 小时 新手友好度 72/100
apache/datafusion-comet#7453 ·
维护者通常 2 天内回复
-
area:ci enhancement priority:low requires-triage
难度 2/5 1-3 小时 新手友好度 74/100
apache/datafusion-comet#7319 · 1 条评论 ·
维护者通常 2 天内回复
-
area:ci bug priority:low requires-triage
难度 2/5 1-3 小时 新手友好度 78/100
apache/datafusion-comet#7315 ·
维护者通常 2 天内回复
-
requires-triage
难度 2/5 1-3 小时 新手友好度 72/100
apache/datafusion-comet#7240 ·
维护者通常 2 天内回复
查看 apache/datafusion-comet 的全部 Issue
相似的 Issue
-
Python: zadd stringifies bytes/bytearray/memoryview members (silent data corruption), including in Batch可能已有人在做 @prateek-kumar-improving 今天认领。 未关闭bug 🐞 python 🐍
难度 2/5 1-3 小时 新手友好度 62/100
valkey-io/valkey-glide#7521 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 75/100
riscv-boom/riscv-boom#835 ·
-
Add a base64url Stringable helper可能已有人在做 @nafg 于 1 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 68/100
nafg/simple-router#362 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 62/100
propensive/soundness#2351 ·
维护者通常 1 天内回复
-
Traffic event delivered/rejected counters appear swapped in TrafficStateController.updateWithReceipt未关闭
难度 2/5 1-3 小时 新手友好度 65/100
digital-asset/canton#705 ·
维护者通常 2 天内回复