Skip to content

Conversation

@twalthr
Copy link
Contributor

@twalthr twalthr commented Oct 27, 2020

What is the purpose of the change

Hardens the KafkaTableITCase by further improving the new test utilities and ignoring non-deterministic metadata columns.

Brief change log

  • Offer an unordered list of row deep equals with matcher
  • Remove offset from test

Verifying this change

This change added tests and can be verified as follows: RowTest

Does this pull request potentially affect one of the following parts:

  • Dependencies (does it add or upgrade a dependency): no
  • The public API, i.e., is any changed class annotated with @Public(Evolving): yes
  • The serializers: no
  • The runtime per-record code paths (performance sensitive): no
  • Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Kubernetes/Yarn/Mesos, ZooKeeper: no
  • The S3 file system connector: no

Documentation

  • Does this pull request introduce a new feature? no
  • If yes, how is the feature documented? not applicable

@flinkbot
Copy link
Collaborator

Thanks a lot for your contribution to the Apache Flink project. I'm the @flinkbot. I help the community
to review your pull request. We will use this comment to track the progress of the review.

Automated Checks

Last check on commit 25256d0 (Tue Oct 27 04:32:20 UTC 2020)

Warnings:

  • No documentation files were touched! Remember to keep the Flink docs up to date!

Mention the bot in a comment to re-run the automated checks.

Review Progress

  • ❓ 1. The [description] looks good.
  • ❓ 2. There is [consensus] that the contribution should go into to Flink.
  • ❓ 3. Needs [attention] from.
  • ❓ 4. The change fits into the overall [architecture].
  • ❓ 5. Overall code [quality] is good.

Please see the Pull Request Review Guide for a full explanation of the review process.

Details
The Bot is tracking the review progress through labels. Labels are applied according to the order of the review items. For consensus, approval by a Flink committer of PMC member is required Bot commands
The @flinkbot bot supports the following commands:

  • @flinkbot approve description to approve one or more aspects (aspects: description, consensus, architecture and quality)
  • @flinkbot approve all to approve all aspects
  • @flinkbot approve-until architecture to approve everything until architecture
  • @flinkbot attention @username1 [@username2 ..] to require somebody's attention
  • @flinkbot disapprove architecture to remove an approval you gave earlier

@flinkbot
Copy link
Collaborator

flinkbot commented Oct 27, 2020

CI report:

Bot commands The @flinkbot bot supports the following commands:
  • @flinkbot run travis re-run the last Travis build
  • @flinkbot run azure re-run the last Azure build

Copy link
Contributor

@dawidwys dawidwys left a comment

Choose a reason for hiding this comment

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

+1, I had only one optional suggestion

*/
public static boolean deepEquals(List<Row> l1, List<Row> l2) {
return deepEqualsInternal(l1, l2);
public static boolean deepEquals(List<Row> l1, List<Row> l2, boolean ignoreOrder) {
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: Shouldn't this be a method in some test utility? It's rather strictly tailored for a particular test. It does not cover all the possible cases (e.g. nested ordered/unordered comparison).

Overall I think it does not harm having the method, but I'd at least have a method with ignoreOrder = false by default. Personally though I'd prefer to have it only in the TableTestMatchers

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 was also thinking about this, but I wanted to give users an official API that allows for simple testing for comparing rows. I will see what I can do.

@twalthr twalthr force-pushed the FLINK-19793 branch 3 times, most recently from fe3a8cf to c46d576 Compare October 27, 2020 12:24
Copy link
Contributor

@dawidwys dawidwys left a comment

Choose a reason for hiding this comment

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

Honestly, not much has changed. The methods are still the same and part of public interfaces. I am still ok with it, I'd still add a method:

public static boolean compareRows(List<Row> l1, List<Row> l2) {
    return compareRows(l1, l2, false);
}

…eSinkWithMetadata

Hardens the KafkaTableITCase by further improving the new test utilities and ignoring
non-deterministic metadata columns.

This closes apache#13802.
@twalthr twalthr closed this in b60c1f9 Oct 27, 2020
jnh5y pushed a commit to jnh5y/flink that referenced this pull request Dec 18, 2023
…eSinkWithMetadata

Hardens the KafkaTableITCase by further improving the new test utilities and ignoring
non-deterministic metadata columns.

This closes apache#13802.
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.

4 participants