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

[GLUTEN-5643] Fix the failure when the pre-project of GenerateExec falls back #6167

Merged
merged 2 commits into from
Jun 26, 2024

Conversation

marin-ma
Copy link
Contributor

@marin-ma marin-ma commented Jun 20, 2024

Currently, if GenerateExec needs a pre-project, only ProjectNode is allowed in the native substrait -> Velox PlanNode transformation. Query would fail if the pre-project of GenerateExec falls back due to native validation failure. We should consider ValueStreamNode as valid in case of pre-project fallback.

Introduce VeloxDummyExpression for test purpose. An expression wrapped by VeloxDummyExpression can mock the case when a certain expression is supported by Gluten, but it fails on native validation.

Copy link

#5643

Copy link

Run Gluten Clickhouse CI

3 similar comments
Copy link

Run Gluten Clickhouse CI

Copy link

Run Gluten Clickhouse CI

Copy link

Run Gluten Clickhouse CI

@marin-ma marin-ma marked this pull request as draft June 24, 2024 06:53
@marin-ma marin-ma force-pushed the fix-generator-fallback branch from cbecf17 to 2496f2a Compare June 24, 2024 07:27
Copy link

Run Gluten Clickhouse CI

1 similar comment
@marin-ma
Copy link
Contributor Author

Run Gluten Clickhouse CI

@marin-ma marin-ma changed the title [GLUTEN-5643] Fix generator not fallback when pre-project fallback [GLUTEN-5643] Fix the failure when the pre-project of GenerateExec falls back Jun 24, 2024
@marin-ma marin-ma marked this pull request as ready for review June 24, 2024 13:46
@marin-ma
Copy link
Contributor Author

@xumingming Could you help to review? Thanks!

@xumingming
Copy link
Contributor

@xumingming Could you help to review? Thanks!

Sure, will do the first round of review in the recent days.

@xumingming
Copy link
Contributor

Query would fail if the pre-project of GenerateExec falls back due to native validation failure. We should consider ValueStreamNode as valid in case of pre-project fallback.

@marin-ma I understand Project might fallback(some function not supported?), but I don't understand why we should consider ValueStreamNode as valid, can you elaborate?

@marin-ma
Copy link
Contributor Author

@xumingming ValueStreamNode represents the input iterator is not from the pipeline. With pre-project fallback, it represents the input is from RowToColumnar conversion.

} else {
auto name = child->outputType()->names()[index];
auto field = child->outputType()->childAt(index);
std::cout << "name: " << name << "type: " << field->toString() << std::endl;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: field -> type, remove the std::cout?

VELOX_CHECK(
projNode != nullptr && projNode->names().size() > requiredChildOutput.size(),
std::dynamic_pointer_cast<const core::ProjectNode>(childNode) != nullptr ||
std::dynamic_pointer_cast<const ValueStreamNode>(childNode) != nullptr,
"injectedProject is true, but the Project is missing or does not have the corresponding projection field")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The error message need to be updated to reflect the code change.

Copy link

Run Gluten Clickhouse CI

@marin-ma marin-ma merged commit 9ae34a9 into apache:main Jun 26, 2024
42 checks passed
deepashreeraghu pushed a commit to deepashreeraghu/incubator-gluten that referenced this pull request Jun 26, 2024
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