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

Refactor testing modules #1491

Merged
merged 4 commits into from
Dec 29, 2021
Merged

Refactor testing modules #1491

merged 4 commits into from
Dec 29, 2021

Conversation

hntd187
Copy link
Contributor

@hntd187 hntd187 commented Dec 26, 2021

Which issue does this PR close?

Re #743

Closes #.

Rationale for this change

Re-organize tests to be more isolated and clearer to new tests being written.

What changes are included in this PR?

Lots of copy pasting and file re-naming.

Are there any user-facing changes?

No.

Outstanding Work:

  • Add License Notice at top of all files
  • Verify all tests are in the new refactor
  • Remove pub on most of the mods
  • Rename some tests (Needs discussion)
  • Add New Tests and/or Modify existing tests (needs discussion)

@hntd187 hntd187 marked this pull request as draft December 26, 2021 23:59
@github-actions github-actions bot added the datafusion Changes in the datafusion crate label Dec 27, 2021
@@ -0,0 +1 @@
pub mod sql;
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe we don't need to public this mod

pub(crate) use test_expression;
pub mod aggregates;
#[cfg(feature = "avro")]
pub mod avro;
Copy link
Contributor

Choose a reason for hiding this comment

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

The issue like above.
If the mod is used in this model, we don't need to public them.

@@ -0,0 +1,187 @@
use super::*;
Copy link
Member

Choose a reason for hiding this comment

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

We should add the following to each new file.

// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements.  See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership.  The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use this file except in compliance
// with the License.  You may obtain a copy of the License at
//
//   http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied.  See the License for the
// specific language governing permissions and limitations
// under the License.

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 have to add these to all the new files, I'll start a list

@xudong963
Copy link
Member

Nice work! thanks, @hntd187, our tests become more clear.

@hntd187
Copy link
Contributor Author

hntd187 commented Dec 27, 2021

I noticed (I don't remember who) pointed out I was missing a test. That comment isn't here anymore, but I went back and compared the test list from the old sql.rs to the new tests and sure enough I was missing 1 test, which I have added back in.

@liukun4515
Copy link
Contributor

I noticed (I don't remember who) pointed out I was missing a test. That comment isn't here anymore, but I went back and compared the test list from the old sql.rs to the new tests and sure enough I was missing 1 test, which I have added back in.

It's me. After checking carefully, I find you did not miss the test.
Great work!

@alamb alamb changed the title Test refactor Refactor testing modules Dec 28, 2021
@alamb
Copy link
Contributor

alamb commented Dec 28, 2021

Rename some tests (Needs discussion)
Add New Tests and/or Modify existing tests (needs discussion)

I suggest that we do the test rename / modification as part of a different PR where we can focus on those changes and they don't get lost in the code movement

Copy link
Contributor

@alamb alamb 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 @hntd187 -- I didn't review this one line by line, but I trust that @liukun4515 and @xudong963 did -- thank you all

Is this one ready to merge in? It is still marked as a draft, but it seems to be

@hntd187 hntd187 marked this pull request as ready for review December 28, 2021 15:44
@alamb alamb merged commit 91ee5a4 into apache:master Dec 29, 2021
@alamb
Copy link
Contributor

alamb commented Dec 29, 2021

Thanks again @hntd187 @xudong963 and @liukun4515

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
datafusion Changes in the datafusion crate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants