Skip to content

move array function unit_tests to sqllogictest#8332

Merged
alamb merged 2 commits intoapache:mainfrom
Veeupup:move_array_test
Nov 28, 2023
Merged

move array function unit_tests to sqllogictest#8332
alamb merged 2 commits intoapache:mainfrom
Veeupup:move_array_test

Conversation

@Veeupup
Copy link
Copy Markdown
Contributor

@Veeupup Veeupup commented Nov 27, 2023

Which issue does this PR close?

Closes #8324 .

I have checked the unit tests in array_expressions.rs and found that almost all test cases are covered by sqllogictest.

So this PR is almost about removing the duplicate unit tests

Rationale for this change

What changes are included in this PR?

Are these changes tested?

Are there any user-facing changes?

@Veeupup
Copy link
Copy Markdown
Contributor Author

Veeupup commented Nov 27, 2023

cc @jayzhan211 @alamb PTAL

@github-actions github-actions Bot added physical-expr Changes to the physical-expr crates sqllogictest SQL Logic Tests (.slt) labels Nov 27, 2023
Copy link
Copy Markdown
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 very much @Veeupup

@alamb
Copy link
Copy Markdown
Contributor

alamb commented Nov 27, 2023

Let me know if this looks good to you @jayzhan211

Copy link
Copy Markdown
Contributor

@jayzhan211 jayzhan211 left a comment

Choose a reason for hiding this comment

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

LGTM!

@Veeupup Before closing #8324, how about function like test_align_array_dimensions?
We should either remove it or move it to dfcommon::utils if it is possible to be used elsewhere.

@Veeupup
Copy link
Copy Markdown
Contributor Author

Veeupup commented Nov 28, 2023

LGTM!

@Veeupup Before closing #8324, how about function like test_align_array_dimensions? We should either remove it or move it to dfcommon::utils if it is possible to be used elsewhere.

Sure! But I found that align_array_dimensions is only used in array_expressions.rs and its signature is not pub. So it would be fine to just keep in array_expressions.rs

@alamb
Copy link
Copy Markdown
Contributor

alamb commented Nov 28, 2023

Sure! But I found that align_array_dimensions is only used in array_expressions.rs and its signature is not pub. So it would be fine to just keep in array_expressions.rs

I agree this is a good plan (to keep align_array_dimensions test in array_expressions.rs

Signed-off-by: veeupup <code@tanweime.com>
@jayzhan211
Copy link
Copy Markdown
Contributor

OK, we can keep it. I am just afraid that people will create test in array_expression.rs if there is still rust test (any kind of test) inside it.

@Weijun-H
Copy link
Copy Markdown
Member

OK, we can keep it. I am just afraid that people will create test in array_expression.rs if there is still rust test (any kind of test) inside it.

Maybe we should leave some comments for it 🤔

@jayzhan211
Copy link
Copy Markdown
Contributor

OK, we can keep it. I am just afraid that people will create test in array_expression.rs if there is still rust test (any kind of test) inside it.

Maybe we should leave some comments for it 🤔

I think comments help.

Copy link
Copy Markdown
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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

physical-expr Changes to the physical-expr crates sqllogictest SQL Logic Tests (.slt)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Port tests in array_expression.rs to sqllogictest

4 participants