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

Add coercion test coverage for Sequence file #18921

Conversation

Praveen2112
Copy link
Member

@Praveen2112 Praveen2112 commented Sep 5, 2023

Description

Additional coercion test coverage for Sequence file

Additional context and related issues

Release notes

(x) This is not user-visible or is docs only, and no release notes are required.

@vlad-lyutenko
Copy link
Contributor

Is it extension to some PR?

@Praveen2112
Copy link
Member Author

Is it extension to some PR?

It is actually an independent PR but it helps for #18832.

@@ -231,7 +231,7 @@ protected Map<String, List<Object>> expectedValuesForEngineProvider(Engine engin
{
String hiveValueForCaseChangeField;
Predicate<String> isFormat = formatName -> tableName.toLowerCase(ENGLISH).contains(formatName);
if (isFormat.test("rctext") || isFormat.test("textfile")) {
if (isFormat.test("rctext") || isFormat.test("textfile") || isFormat.test("sequencefile")) {
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
if (isFormat.test("rctext") || isFormat.test("textfile") || isFormat.test("sequencefile")) {
if (Arrays.asList("rctext", "textfile", "sequencefile").contains(isFormat)) {

Copy link
Member

Choose a reason for hiding this comment

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

nit: Easier to read than 3+ conditions.

Copy link
Member Author

Choose a reason for hiding this comment

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

Since we need to match for the tableName pattern I have modified to use Stream here

@Praveen2112 Praveen2112 force-pushed the praveen/additional_coercion_test_coverage branch from fc296c3 to 50a04a3 Compare September 5, 2023 11:18
@Praveen2112 Praveen2112 closed this Sep 5, 2023
@Praveen2112 Praveen2112 reopened this Sep 5, 2023
@Praveen2112 Praveen2112 merged commit 799f5ad into trinodb:master Sep 6, 2023
64 of 98 checks passed
@github-actions github-actions bot added this to the 427 milestone Sep 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

5 participants