-
Notifications
You must be signed in to change notification settings - Fork 447
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
[GLUTEN-4830][VL] Support MapType substrait signature #4833
Conversation
Run Gluten Clickhouse CI |
2 similar comments
Run Gluten Clickhouse CI |
Run Gluten Clickhouse CI |
@@ -182,6 +183,43 @@ TypePtr VeloxSubstraitSignature::fromSubstraitSignature(const std::string& signa | |||
return ARRAY(elementType); | |||
} | |||
|
|||
if (startWith(signature, "map")) { | |||
// Map type name is in the format of map<T1,T2>. | |||
auto mapStart = signature.find_first_of('<'); |
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.
There are so much code which copied from struct
type, can we extract them?
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
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.
fixed
Run Gluten Clickhouse CI |
508431a
to
465baf4
Compare
Run Gluten Clickhouse CI |
1 similar comment
Run Gluten Clickhouse CI |
a678422
to
8cae041
Compare
Run Gluten Clickhouse CI |
8cae041
to
5e71836
Compare
Run Gluten Clickhouse CI |
5e71836
to
d841c12
Compare
Run Gluten Clickhouse CI |
@jinchengchenghh @PHILO-HE @rui-mo Can you please help review this? |
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.
Thanks. Looks good to me.
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.
@WangGuangxin, thanks for your work! Just one small refactor suggestion for list type. Please check whether it makes sense. Thanks!
} | ||
return MAP(std::move(types)[0], std::move(types)[1]); | ||
} | ||
|
||
if (startWith(signature, "list")) { | ||
auto listStart = signature.find_first_of('<'); |
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.
@WangGuangxin, it seems we can also use parseNestedTypeSignature
to handle list type. Right?
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.
Seems that the parseNestedTypeSignature
can't properly handle list type, since list
type's child doesn't have comma, so for types like list<map<str,str>>
it will not work
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.
@WangGuangxin, I see. Thanks!
Run Gluten Clickhouse CI |
@WangGuangxin, CI reported the below failure.
|
This reverts commit 8545826.
Run Gluten Clickhouse CI |
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.
Thanks!
===== Performance report for TPCH SF2000 with Velox backend, for reference only ====
|
What changes were proposed in this pull request?
Support MapType substrait signature
(Fixes: #4830)