Skip to content
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

Closed

Conversation

zhejiangxiaomai
Copy link
Contributor

@zhejiangxiaomai zhejiangxiaomai commented Jun 8, 2022

No description provided.

@facebook-github-bot
Copy link
Contributor

Hi @zhejiangxiaomai!

Thank you for your pull request and welcome to our community.

Action Required

In 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.

Process

In 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 CLA signed. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.

If you have received this in error or have any questions, please contact us at cla@fb.com. Thanks!

@zhejiangxiaomai zhejiangxiaomai changed the title code style fix in PR #1554 code style fix in PR #1554[Substrait to Velox] Jun 8, 2022
Copy link
Contributor

@mbasmanova mbasmanova left a 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"

/// 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
Copy link
Contributor

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?

Copy link
Contributor Author

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.");
Copy link
Contributor

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

Copy link
Contributor Author

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") {
Copy link
Contributor

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?

Copy link
Contributor Author

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.

@mbasmanova mbasmanova changed the title code style fix in PR #1554[Substrait to Velox] [Substrait to Velox] Code style cleanup Jun 8, 2022
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.
Copy link
Contributor

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.

Copy link
Contributor Author

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.

@mbasmanova
Copy link
Contributor

@zhejiangxiaomai format-check CI job is failing. Would you rebase, run make format-fix and update the PR?

Copy link
Contributor

@mbasmanova mbasmanova left a 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.

@mbasmanova
Copy link
Contributor

@zhejiangxiaomai Would you sign the CLA? Without it I cannot merge this PR.

@zhejiangxiaomai
Copy link
Contributor Author

zhejiangxiaomai commented Jun 9, 2022

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.

@mbasmanova
Copy link
Contributor

@zhejiangxiaomai Thanks. Ping me when the CLA is signed and I'll merge the PR. Thank you for contributing.

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jun 11, 2022
@facebook-github-bot
Copy link
Contributor

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks!

@facebook-github-bot
Copy link
Contributor

@mbasmanova has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@zhejiangxiaomai
Copy link
Contributor Author

@zhejiangxiaomai Thanks. Ping me when the CLA is signed and I'll merge the PR. Thank you for contributing.

Hi,@mbasmanova CLA is signed, please merge this code.

@mbasmanova
Copy link
Contributor

Thank you, @zhejiangxiaomai . The PR should get merged soon.

shiyu-bytedance pushed a commit to shiyu-bytedance/velox-1 that referenced this pull request Aug 18, 2022
Summary: Pull Request resolved: facebookincubator#1784

Reviewed By: spershin

Differential Revision: D37088299

Pulled By: mbasmanova

fbshipit-source-id: aae88f6d067a8e982b530235ec482bd5e67ca74d
marin-ma pushed a commit to marin-ma/velox-oap that referenced this pull request Dec 15, 2023
…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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants