Skip to content

feature: Improve string representation of datafusion classes#159

Merged
andygrove merged 6 commits into
apache:mainfrom
simicd:feature/improve-repl-output
Feb 4, 2023
Merged

feature: Improve string representation of datafusion classes#159
andygrove merged 6 commits into
apache:mainfrom
simicd:feature/improve-repl-output

Conversation

@simicd
Copy link
Copy Markdown
Contributor

@simicd simicd commented Jan 29, 2023

Which issue does this PR close?

Closes #158.

Rationale for this change

Improve developer experience

What changes are included in this PR?

Implement __repr__ methods of the following classes:

  • DataFrame
  • Expression
  • Context
  • Catalog
  • Database
  • Table
  • Config
  • UDAF & UDF

Are there any user-facing changes?

Display additional information when debugging or using REPL tools

Comment thread src/expression.rs
expr.into()
}

fn __str__(&self) -> PyResult<String> {
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Removed since redundant if implemented the same way, e.g. str(literal(5)) will fall back to __repr__ if __str__ is not implemented)

@andygrove
Copy link
Copy Markdown
Member

Thanks @simicd this looks good. We are aware of the build issue #161

Copy link
Copy Markdown
Contributor

@jdye64 jdye64 left a comment

Choose a reason for hiding this comment

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

@simicd LGTM. Thanks for this. As Andy mentioned we are aware of the CI issue. I just pushed some changes to PR after having Apache infra whitelist a github action for protoc which is what was causing the issue. It might take a few iterations from me there to get it all working but hopefully within a day it should all be sorted out

@jdye64
Copy link
Copy Markdown
Contributor

jdye64 commented Feb 2, 2023

@andygrove and @simicd sorry for the delay but the CI fix PR is ready for review now if either of you want to take a look #162

@simicd after this merges if you want to merge into this PR your CI build should work as well and we can get your PR merged in.

@simicd simicd force-pushed the feature/improve-repl-output branch from ca47e29 to 0ede908 Compare February 2, 2023 22:30
@simicd
Copy link
Copy Markdown
Contributor Author

simicd commented Feb 2, 2023

Thanks a lot @jdye64! Checks passed now

@jdye64
Copy link
Copy Markdown
Contributor

jdye64 commented Feb 3, 2023

@simicd nice! Yep, I don't have commit permissions but looks good now

Copy link
Copy Markdown
Member

@andygrove andygrove left a comment

Choose a reason for hiding this comment

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

Thanks @simicd

@andygrove andygrove merged commit e89f161 into apache:main Feb 4, 2023
@simicd simicd deleted the feature/improve-repl-output branch February 4, 2023 15:34
@andygrove andygrove added the enhancement New feature or request label Mar 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve string representation of datafusion classes (dataframe, context, expression, ...)

3 participants