Skip to content

[SPARK-9938][SQL]Constant folding of binaryComparison on IntegralType#8165

Closed
yjshen wants to merge 1 commit into
apache:masterfrom
yjshen:eliminate_unnecessary_cast
Closed

[SPARK-9938][SQL]Constant folding of binaryComparison on IntegralType#8165
yjshen wants to merge 1 commit into
apache:masterfrom
yjshen:eliminate_unnecessary_cast

Conversation

@yjshen

@yjshen yjshen commented Aug 13, 2015

Copy link
Copy Markdown
Member

We could get a chance to do constant folding when we are comparing a IntegerType column with Long Literal.

JIRA: https://issues.apache.org/jira/browse/SPARK-9938

@SparkQA

SparkQA commented Aug 13, 2015

Copy link
Copy Markdown

Test build #40763 has finished for PR 8165 at commit 647a23f.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@yjshen

yjshen commented Aug 18, 2015

Copy link
Copy Markdown
Member Author

@marmbrus @liancheng, Is this PR useful? I'm doing this because #8157 (comment)

@liancheng

Copy link
Copy Markdown
Contributor

Sorry for the late reply.

I think it's great to have a general mechanism to check whether we can safely cast type A to type B without losing any information. For example, with this we can fix SPARK-9927 in a proper way.

But the constant folding part doesn't seem to be super useful? Especially when it makes the original ConstantFolding rule ~6 times longer...

@yjshen

yjshen commented Aug 18, 2015

Copy link
Copy Markdown
Member Author

:) yes, I also think its a long one....

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.

3 participants