You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Wenchen Fan (JIRA)" <ji...@apache.org> on 2018/05/22 11:15:00 UTC
[jira] [Resolved] (SPARK-24321) Extract common code from
Divide/Remainder to a base trait
[ https://issues.apache.org/jira/browse/SPARK-24321?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Wenchen Fan resolved SPARK-24321.
---------------------------------
Resolution: Fixed
Fix Version/s: 2.4.0
Issue resolved by pull request 21367
[https://github.com/apache/spark/pull/21367]
> Extract common code from Divide/Remainder to a base trait
> ---------------------------------------------------------
>
> Key: SPARK-24321
> URL: https://issues.apache.org/jira/browse/SPARK-24321
> Project: Spark
> Issue Type: Improvement
> Components: SQL
> Affects Versions: 2.4.0
> Reporter: Kris Mok
> Assignee: Kris Mok
> Priority: Minor
> Fix For: 2.4.0
>
>
> There's a lot of code duplication between {{Divide}} and {{Remainder}} expression types. They're mostly the codegen template (which is exactly the same, with just cosmetic differences), the eval function structure, etc.
> It tedious to have to update multiple places in case we make improvements to the codegen templates in the future. This ticket proposes to refactor the duplicate code into a common base trait for these two classes.
> Non-goal: There another class, {{Pmod}}, that is also similiar to {{Divide}} and {{Remainder}}, so in theory we can make a deeper refactoring to accommodate this class as well. But the "operation" part of its codegen template is harder to factor into the base trait, so this ticket only handles {{Divide}} and {{Remainder}} for now.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org