Skip to content

优化 DataFrameOperator#153

Open
shengtianyang wants to merge 3 commits into
lynxworld:devfrom
shengtianyang:dev
Open

优化 DataFrameOperator#153
shengtianyang wants to merge 3 commits into
lynxworld:devfrom
shengtianyang:dev

Conversation

@shengtianyang

Copy link
Copy Markdown

STY个人完成
小组名称STY

对DefaultDateFrameOperator.scala主要改进点及注释总结:

缓存表达式计算结果:
添加了 evalCache 和 cachedEval 方法来缓存表达式的计算结果,避免重复计算。

提取公共逻辑:
提取了 createContext 方法,用于创建上下文,减少了重复代码。
减少中间数据结构的创建:
在 distinct 和 orderBy 方法中使用了 Iterator 来减少中间集合的创建。

简化复杂逻辑:
使用 collectFirst 简化了 _ascCmp 方法中的比较逻辑,替代了显式的 while 循环。

增加异常处理和参数校验:
在 join 方法中增加了异常处理和参数校验,确保输入参数的有效性。

@HC-teemo HC-teemo left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

There seems to be an issue with the code structure. Why is the code you added before the old code.

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