Skip to content

Conversation

@JasonLeeCoding
Copy link
Contributor

What is the purpose of the change

this change is in order to use comments in the initialization script with '--' in the SQL Client

Brief change log

add replaceAll in CliStatementSplitter#splitContent

Verifying this change

This change added tests and can be verified as follows:

Modify the original test file CliStatementSplitterTest.java

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): (no)
  • 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

flinkbot commented May 17, 2021

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 1ebd110 (Sat Aug 28 12:11:20 UTC 2021)

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 May 17, 2021

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

@JasonLeeCoding
Copy link
Contributor Author

I got an error java.lang.AssertionError testCancelExecutionInNonInteractiveMode throws an exception at line 303 of the code
Can anyone help me take a look ?

@fsk119
Copy link
Member

fsk119 commented May 19, 2021

Thanks for your contribution. Please use rebase rather than merge in FLINK. What's more, please also add tests in CliStatementSplitterTest and CliClientTest to verify the code is right.

buffer.add(line);
statements.add(String.join("\n", buffer));
statements.add(
buffer.stream()
Copy link
Member

Choose a reason for hiding this comment

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

Please also take a look at line 63.

Copy link
Member

Choose a reason for hiding this comment

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

Could you filter the empty line after map operation, e.g.

buffer.stream()
  .map(...)
  .filter(...) // only keep the non-empty line here
  .collect(...)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks , I will fix these problems

@fsk119
Copy link
Member

fsk119 commented May 19, 2021

I got an error java.lang.AssertionError testCancelExecutionInNonInteractiveMode throws an exception at line 303 of the code
Can anyone help me take a look ?

Please take a look at the logic in the test.. We compare the received statement with input statement in the test. However, we clear all the comments in CliStatementSplitter, which cause the test fails.

JasonLeeCoding and others added 2 commits May 19, 2021 17:11
… session It should be possible to annotate the script with --
@fsk119
Copy link
Member

fsk119 commented May 19, 2021

@JasonLeeCoding
Copy link
Contributor Author

OK I submitted a new PR #15980 and I will close this PR

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