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

CLI uses ballista context instead of datafusion context in local mode #252

Merged
merged 5 commits into from
Sep 30, 2022

Conversation

r4ntix
Copy link
Contributor

@r4ntix r4ntix commented Sep 20, 2022

Which issue does this PR close?

Closes #219

Rationale for this change

See #219

What changes are included in this PR?

  • add concurrent_tasks parameter for ballista local mode, default to all available cores
  • use BallistaContext instead of SessionContext
  • use BallistaError instead of DataFusionError

Are there any user-facing changes?

add concurrent_tasks parameter for ballista local mode, default to all available cores

- add concurrent_tasks parameter for ballista local mode, default to all available cores
- use `BallistaContext` instead of `SessionContext`
- use `BallistaError` instead of `DataFusionError`
Comment on lines 58 to 65
Context::Local(ballista) => ballista
.sql(sql)
.await
.map_err(BallistaError::DataFusionError),
Context::Remote(ballista) => ballista
.sql(sql)
.await
.map_err(BallistaError::DataFusionError),
Copy link
Member

Choose a reason for hiding this comment

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

We have the same code in both cases. I think we can remove the Context abstraction in the CLI now and just use the Ballista context directly.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

👍 Thanks for the feedback, I will fix it again.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I submit a new commit for this.

@andygrove
Copy link
Member

This is looking good. Thanks @r4ntix. I left some feedback.

@andygrove
Copy link
Member

This is looking good @r4ntix. Did you need any help with the CI failures?

failures:
    context::tests::test_aggregate_func
    context::tests::test_ballista_show_tables
    context::tests::test_show_tables_not_with_information_schema

@andygrove
Copy link
Member

@r4ntix I took the liberty of merging latest from master and fixing merge conflicts

@andygrove andygrove merged commit 58c2ccc into apache:master Sep 30, 2022
@r4ntix
Copy link
Contributor Author

r4ntix commented Sep 30, 2022

@r4ntix I took the liberty of merging latest from master and fixing merge conflicts

Thank you very much for helping to fix the remaining issues, I will keep learning and contributing to ballista :)

@r4ntix r4ntix deleted the remove-datafusion-context-from-cli branch March 18, 2023 11:43
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.

CLI uses DataFusion context if no host or port are provided
2 participants