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

Parquet codec tests fix #4698

Merged
merged 3 commits into from
Jul 2, 2024

Conversation

kkondaka
Copy link
Collaborator

@kkondaka kkondaka commented Jul 1, 2024

Description

Fix Parquet output codec tests

Issues Resolved

Resolves #3992

Check List

  • [X ] New functionality includes testing.
  • New functionality has a documentation issue. Please link to it in this PR.
    • New functionality has javadoc added
  • [X ] Commits are signed with a real name per the DCO

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

@@ -115,11 +117,11 @@ void test_happy_case(final int numberOfRecords) throws Exception {
parquetOutputCodec.writeEvent(event, outputStream);
}
parquetOutputCodec.complete(outputStream);
List<Map<String, Object>> actualRecords = createParquetRecordsList(new ByteArrayInputStream(tempFile.toString().getBytes()));
List<Map<String, Object>> actualRecords = createParquetRecordsList(new FileInputStream(tempFile));
Copy link
Member

Choose a reason for hiding this comment

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

We need assertions on all of these to verify the size. Otherwise, the loop below will not assert anything.

assertThat(actualRecords.size(), equalTo(inputMaps.size()));

break;
default: throw new IllegalArgumentException("Unknown field");
}
} catch (RuntimeException e) {continue;}
Copy link
Member

Choose a reason for hiding this comment

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

I think we should remove this try-catch. Just let the exception propagate up.

Relatedly, there is an exception below. Can you remove it?

} catch (Exception parquetException) {
            LOG.error("Failed to parse Parquet", parquetException);

@@ -0,0 +1,43 @@
# Simple workflow for deploying static content to GitHub Pages
Copy link
Member

Choose a reason for hiding this comment

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

I think this was from a concept you were working. This commit shouldn't be in this branch.

@dlvenable
Copy link
Member

Your DCO is failing.

@kkondaka kkondaka force-pushed the parquet-codec-fix branch 4 times, most recently from 1faba56 to 86a100e Compare July 2, 2024 00:24
kkondaka and others added 2 commits July 2, 2024 00:24
Signed-off-by: Krishna Kondaka <krishkdk@dev-dsk-krishkdk-2c-bd29c437.us-west-2.amazon.com>
Signed-off-by: Krishna Kondaka <krishkdk@dev-dsk-krishkdk-2c-bd29c437.us-west-2.amazon.com>
Signed-off-by: Krishna Kondaka <krishkdk@dev-dsk-krishkdk-2c-bd29c437.us-west-2.amazon.com>
@dlvenable dlvenable merged commit a466013 into opensearch-project:main Jul 2, 2024
43 of 47 checks passed
opensearch-trigger-bot bot pushed a commit that referenced this pull request Jul 16, 2024
Parquet codec tests fix

Signed-off-by: Krishna Kondaka <krishkdk@dev-dsk-krishkdk-2c-bd29c437.us-west-2.amazon.com>
(cherry picked from commit a466013)
dlvenable pushed a commit that referenced this pull request Jul 17, 2024
Parquet codec tests fix

Signed-off-by: Krishna Kondaka <krishkdk@dev-dsk-krishkdk-2c-bd29c437.us-west-2.amazon.com>
(cherry picked from commit a466013)

Co-authored-by: Krishna Kondaka <41027584+kkondaka@users.noreply.github.com>
kkondaka added a commit to kkondaka/kk-data-prepper-f2 that referenced this pull request Jul 23, 2024
Parquet codec tests fix

Signed-off-by: Krishna Kondaka <krishkdk@dev-dsk-krishkdk-2c-bd29c437.us-west-2.amazon.com>
kkondaka added a commit to kkondaka/kk-data-prepper-f2 that referenced this pull request Jul 23, 2024
Parquet codec tests fix

Signed-off-by: Krishna Kondaka <krishkdk@dev-dsk-krishkdk-2c-bd29c437.us-west-2.amazon.com>
kkondaka added a commit to kkondaka/kk-data-prepper-f2 that referenced this pull request Jul 30, 2024
Parquet codec tests fix

Signed-off-by: Krishna Kondaka <krishkdk@dev-dsk-krishkdk-2c-bd29c437.us-west-2.amazon.com>
kkondaka added a commit to kkondaka/kk-data-prepper-f2 that referenced this pull request Aug 8, 2024
Parquet codec tests fix

Signed-off-by: Krishna Kondaka <krishkdk@dev-dsk-krishkdk-2c-bd29c437.us-west-2.amazon.com>
kkondaka added a commit to kkondaka/kk-data-prepper-f2 that referenced this pull request Aug 12, 2024
Parquet codec tests fix

Signed-off-by: Krishna Kondaka <krishkdk@dev-dsk-krishkdk-2c-bd29c437.us-west-2.amazon.com>
kkondaka added a commit to kkondaka/kk-data-prepper-f2 that referenced this pull request Aug 14, 2024
Parquet codec tests fix

Signed-off-by: Krishna Kondaka <krishkdk@dev-dsk-krishkdk-2c-bd29c437.us-west-2.amazon.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] ParquetOutputCodecTest may not be testing correctly
3 participants