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

Dev highlight in ppl #106

Closed
wants to merge 6 commits into from
Closed

Conversation

forestmvey
Copy link

Description

Add PPL support for highlight in SQL plugin.

Issues Resolved

Issue: github-636

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

…roject.

Signed-off-by: forestmvey <forestv@bitquilltech.com>
Signed-off-by: forestmvey <forestv@bitquilltech.com>
Signed-off-by: forestmvey <forestv@bitquilltech.com>
…quotes.

Signed-off-by: forestmvey <forestv@bitquilltech.com>
Signed-off-by: forestmvey <forestv@bitquilltech.com>
Signed-off-by: forestmvey <forestv@bitquilltech.com>
@forestmvey forestmvey requested a review from a team August 17, 2022 22:13
@forestmvey forestmvey closed this Aug 17, 2022
public LogicalPlan visitHighlight(Highlight node, AnalysisContext context) {
LogicalPlan child = node.getChild().get(0).accept(this, context);

if (!(((Alias)node.getExpression()).getDelegated() instanceof HighlightFunction)) {

Choose a reason for hiding this comment

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

Is this defensive check or is this situation possible?

Can the code be updated so that (Alias) casts and instanceof checks are not necessary?

Copy link
Author

Choose a reason for hiding this comment

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

I don't believe this situation would be possible. I have removed the instanceof check and I wasn't able to figure out a way to update the code to not use casting.

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.

2 participants