Skip to content

Conversation

@alamb
Copy link
Contributor

@alamb alamb commented Nov 28, 2023

Which issue does this PR close?

Part of #8194

Rationale for this change

Follow on to #8316 I noticed that one of the test was actually using the dataframe API, so it should also be put in the dataframe tests

What changes are included in this PR?

Restore one tests into the dataframe tests

Are these changes tested?

They are all tests

Are there any user-facing changes?

@alamb alamb marked this pull request as ready for review November 28, 2023 12:54
@github-actions github-actions bot added the core Core DataFusion crate label Nov 28, 2023
Copy link
Contributor

@comphead comphead left a comment

Choose a reason for hiding this comment

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

lgtm, thanks @alamb

assert_eq!("c1", physical_plan.schema().field(0).name().as_str());
assert_eq!(
"total_salary",
physical_plan.schema().field(1).name().as_str()
Copy link
Member

Choose a reason for hiding this comment

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

Actually this test doesn't really use DataFrame API but creates logical plan and physical plan with SessionState. Maybe physical-plan? But there doesn't have tests module, so here is also good.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You are right -- I mistakenly assumed that the scan_empty was returning a DataFrame (it is actually returning a LogicalPlanBuilder): https://github.com/alamb/arrow-datafusion/blob/9a15bf89682728a277cc0a8f443fbd4ba8398ae6/datafusion/core/src/test_util/mod.rs#L133

I will see if I can find a better home for this

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Moved in 2ea11a0

}

#[tokio::test]
async fn aggregate_with_alias() -> Result<()> {
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 found a better place for this test (with the other tests that are checking things about the physical plans)

Copy link
Member

Choose a reason for hiding this comment

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

Looks good. 👍

@alamb alamb merged commit d22403a into apache:main Nov 29, 2023
@alamb alamb deleted the alamb/dataframe_test branch November 29, 2023 16:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core Core DataFusion crate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants