Compiler plugin: refine `reorderColumnsBy` / `reorderColumnsByName` with `inFrameColumns`
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
调研方向
Start with the ReorderColumnsByName interpreter in the Kotlin repository and the reorderColumnsByName / reorderColumnsBy overloads that take inFrameColumns. Step 1 depends on the dataframe-dev bump that includes #2130, so the change cannot be made until that lands. Done means the new interpreter declares inFrameColumns, the overload carries @Refine and @Interpretable, and the compile-time schema matches the runtime column order for nested frame columns.
由索引模型根据 Issue 内容生成。
描述
reorderColumnsByName(atAnyDepth, desc, inFrameColumns) and reorderColumnsBy(atAnyDepth, desc, inFrameColumns) { }
were added in #2130 without @Refine. With the compiler plugin, the result of such a call keeps the receiver's
compile-time schema, so its column order is not updated.
They are not refined because the ReorderColumnsByName interpreter in the Kotlin repository declares only
receiver, atAnyDepth and desc. An argument the interpreter does not declare makes interpret() return
null, and the plugin then materializes an empty schema, so accessors on the result stop compiling. An
interpreter name the plugin does not know has the same effect.
Steps:
- After
dataframe-devin the Kotlin repository includes #2130, addinFrameColumnssupport to the
interpreter (a new interpreter, orval Arguments.inFrameColumns: Boolean by arg(defaultValue = Present(false))). - Add
@Refine/@Interpretableto the newreorderColumnsByNameoverload. Do this only once the minimal
Kotlin version supported with the compiler plugin contains step 1; with an older plugin the call gets an
empty schema. - Optionally, refine
reorderColumnsBytoo. Likeby/byDesc, its expression is arbitrary code.
Until the dataframe-dev bump, reorderColumnsByName() is interpreted with the old :core, which still
reorders the columns inside frame columns, so the compile-time schema of nested frame columns can differ
from the runtime one. Columns are accessed by name, so code keeps working.
- 主要语言
- Kotlin
- 星标
- 1.1k
- 派生
- 87
- 平均合并
- 2 天 21 小时
- 30 天内合并 PR
- 40
环境准备
在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
Kotlin/dataframe 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 68/100
维护者通常 1 天内回复
-
API
难度 2/5 1-3 小时 新手友好度 66/100
Kotlin/dataframe#2202 · 3 条评论 · 1 个 reaction ·
维护者通常 1 天内回复
-
documentation
难度 2/5 1-3 小时 新手友好度 72/100
Kotlin/dataframe#2195 · 2 条评论 · 1 个 reaction ·
维护者通常 1 天内回复
-
AX
难度 1/5 1 小时以内 新手友好度 90/100
维护者通常 1 天内回复
-
Add minimal KDocs for `print` APIs可能已有人在做 @zaleslaw 于 3 天前认领。 未关闭KDocs
难度 2/5 1-3 小时 新手友好度 88/100
维护者通常 1 天内回复
相似的 Issue
-
enhancement
难度 2/5 1-3 小时 新手友好度 68/100
-
难度 2/5 1-3 小时 新手友好度 86/100
liberation-data/drivine-cypher-spec#67 ·
维护者通常 1 天内回复
-
feature
难度 2/5 1-3 小时 新手友好度 64/100
-
documentation good first issue help wanted P2 roadmap-v4
难度 2/5 1-3 小时 新手友好度 82/100
maziyarpanahi/openmed#5425 ·
维护者通常 3 天内回复
-
难度 2/5 1-3 小时 新手友好度 70/100
OneBusAway/vehicle-positions#250 ·
维护者通常 1 天内回复