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

Add FILLNULL command in PPL (#3032) #3075

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

normanj-bitquill
Copy link
Contributor

Description

Adds the FILLNULL command for PPL. FILLNULL will replace NULL values in specified fields.

Related Issues

Resolves #3032

Check List

  • [Y] New functionality includes testing.
  • [Y] New functionality has been documented.
  • [Y] New functionality has javadoc added.
  • [Y] New functionality has a user manual doc added.
  • [N/A] API changes companion pull request created.
  • [Y] Commits are signed per the DCO using --signoff.
  • [?] Public documentation issue/PR created.

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.

* Add FILLNULL command in PPL

Signed-off-by: Norman Jordan <[email protected]>
Copy link
Collaborator

@MaxKsyunz MaxKsyunz left a comment

Choose a reason for hiding this comment

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

Thank you for the PR! Could you add some integration tests? They live here.

YANG-DB
YANG-DB previously approved these changes Oct 18, 2024
Copy link

@jduo jduo left a comment

Choose a reason for hiding this comment

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

I think we should add an ExplainTest to validate that you get an Eval physical plan when using FILLNULL.

@normanj-bitquill
Copy link
Contributor Author

@MaxKsyunz I have added some integration tests.

@normanj-bitquill
Copy link
Contributor Author

@jduo I have added an explain test.

Comment on lines +54 to +63
os> source=accounts | fields email, host | fillnull using email = '<not found>', host = '<no host>' ;
fetched rows / total rows = 4/4
+-----------------------+------------+
| email | host |
|-----------------------+------------|
| [email protected] | pyrami.com |
| [email protected] | netagy.com |
| <not found> | |
| [email protected] | boink.com |
+-----------------------+------------+

Choose a reason for hiding this comment

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

This is missing <no host> from the right column, right? Same for the table above, it looks like one <not found> is missing?

Suggested change
os> source=accounts | fields email, host | fillnull using email = '<not found>', host = '<no host>' ;
fetched rows / total rows = 4/4
+-----------------------+------------+
| email | host |
|-----------------------+------------|
| [email protected] | pyrami.com |
| [email protected] | netagy.com |
| <not found> | |
| [email protected] | boink.com |
+-----------------------+------------+
os> source=accounts | fields email, host | fillnull using email = '<not found>', host = '<no host>' ;
fetched rows / total rows = 4/4
+-----------------------+------------+
| email | host |
|-----------------------+------------|
| [email protected] | pyrami.com |
| [email protected] | netagy.com |
| <not found> | <no host> |
| [email protected] | boink.com |
+-----------------------+------------+

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.

[FEATURE]Add fillnull command to PPL
5 participants