-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Substrait to Velox] Code style cleanup #1784
Conversation
Hi @zhejiangxiaomai! Thank you for your pull request and welcome to our community. Action RequiredIn order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you. ProcessIn order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA. Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with If you have received this in error or have any questions, please contact us at cla@fb.com. Thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@zhejiangxiaomai The cleanup is nice. Thank you. Some questions below.
The PR title should be written as "[Substrait to Velox] Code style cleanup"
velox/substrait/SubstraitParser.h
Outdated
/// words. Key: the Substrait function key word, Value: the Velox function key | ||
/// word. For those functions with different names in Substrait and Velox, | ||
/// A map used for mapping Substrait function key words into Velox functions' | ||
/// key words. Key: the Substrait function key word, Value: the Velox function |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo: key words - keywords, key word -> keyword
What is Velox function keyword? It looks like this is just a mapping from Substrait function names to Velox function names, no?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, just a mapping. I have corrected the grammar errors
|
||
// Omit alias because name change is not needed. | ||
if (veloxFunction == "alias") { | ||
VELOX_CHECK(params.size() == 1, "Alias expects one parameter."); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use VELOX_CHECK_EQ to get a better error message
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok,I hava fixed it.
substraitParser_.parseType(substraitFunc.output_type())->type); | ||
|
||
// Omit alias because name change is not needed. | ||
if (veloxFunction == "alias") { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't believe there is a function "alias" in Velox. What's the scenario where you hit this code path? Is there a test?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SparkSql has "alias" function,there is an example
wordCounts = textFile.select(explode(split(textFile.value, "\s+")).alias("word")).groupBy("word").count()
. So we add this code. And it will pass by substrait to velox.
35fd84b
to
ffa0353
Compare
const auto& veloxType = toVeloxType( | ||
substraitParser_.parseType(substraitFunc.output_type())->type); | ||
|
||
// Some engines like SparkSQL has alias function, we omit it because name change is not needed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, this should be done when generating the plan. Redundant transformation like "alias" should be removed.
Let's remove this change. It doesn't belong to "cleanup" PR anyway.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, I have removed it.
@zhejiangxiaomai format-check CI job is failing. Would you rebase, run |
ffa0353
to
27ab80e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@zhejiangxiaomai Thank you for the cleanup.
@zhejiangxiaomai Would you sign the CLA? Without it I cannot merge this PR. |
Hi, @mbasmanova, my manager yang, Binwei has Helped me apply CLA this afternoon, Maybe I will get CLA tomorrow. I will tell you, when I get CLA. |
@zhejiangxiaomai Thanks. Ping me when the CLA is signed and I'll merge the PR. Thank you for contributing. |
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks! |
@mbasmanova has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
Hi,@mbasmanova CLA is signed, please merge this code. |
Thank you, @zhejiangxiaomai . The PR should get merged soon. |
Summary: Pull Request resolved: facebookincubator#1784 Reviewed By: spershin Differential Revision: D37088299 Pulled By: mbasmanova fbshipit-source-id: aae88f6d067a8e982b530235ec482bd5e67ca74d
…incubator#1784) * [GLUTEN-1632][CH]Daily Update Clickhouse Version (20230526) * Fix Build since (ClickHouse/ClickHouse#50205) --------- Co-authored-by: kyligence-git <gluten@kyligence.io> Co-authored-by: Chang Chen <baibaichen@gmail.com>
No description provided.