Skip to content

Conversation

@xueyumusic
Copy link
Contributor

What is the purpose of the change

This PR moves QueryConfig, BatchQueryConfig, StreamQueryConfig and TableDescriptor to flink-table-api-java

Brief change log

  • move QueryConfig, BatchQueryConfig, StreamQueryConfig and TableDescriptor to flink-table-java
  • remove queryConfig.scala and TableDescriptor.scala

Verifying this change

This change is already covered by existing tests, such as (please describe tests).

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, 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? (JavaDocs)

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.

Hi @xueyumusic , thank you for the contribution.
I put some comments. Also could you please move the TableDescriptor to table-common module, as answered in JIRA?

* The {@link QueryConfig} holds parameters to configure the behavior of queries.
*/
@PublicEvolving
public class QueryConfig implements Serializable {
Copy link
Contributor

Choose a reason for hiding this comment

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

This should be an interface.

/**
* The {@link BatchQueryConfig} holds parameters to configure the behavior of batch queries.
*/
@PublicEvolving
Copy link
Contributor

Choose a reason for hiding this comment

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

I wouldn't add this annotation. This class will actually be dropped in a near future, once we have one unified TableEnvironment.

* <p>An empty {@link StreamQueryConfig} can be generated using the [[StreamTableEnvironment.queryConfig]]
* method.
*/
@PublicEvolving
Copy link
Contributor

Choose a reason for hiding this comment

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

Same as for BatchQueryConfig. Let's not add this annotation.

/**
* The {@link StreamQueryConfig} holds parameters to configure the behavior of streaming queries.
*
* <p>An empty {@link StreamQueryConfig} can be generated using the [[StreamTableEnvironment.queryConfig]]
Copy link
Contributor

Choose a reason for hiding this comment

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

Please convert [[StreamTableEnvironment.queryConfig]] as well.

return this;
}

public long getMinIdleStateRetentionTime() {
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you add javadoc for those methods? I think we can reuse the description for corresponding field.

*/
abstract class TableDescriptor extends DescriptorBase
@PublicEvolving
public abstract class TableDescriptor extends DescriptorBase {
Copy link
Contributor

Choose a reason for hiding this comment

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

Just a thought. How about we convert it to interface? That means converting DescriptorBase to interface as well. What do you think @twalthr about it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hi, @dawidwys , thanks for review. I updated the code except this place right now.
It looks DescriptorBase overrides toString() method implementation, if it is converted to interface how to migrate this method...

Copy link
Contributor

Choose a reason for hiding this comment

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

Oh, wasn't aware you cannot override methods from Object with defaultmethods. Forget about this comment then.

@dawidwys dawidwys self-assigned this Feb 1, 2019
@dawidwys dawidwys closed this in ed4b940 Feb 1, 2019
@dawidwys
Copy link
Contributor

dawidwys commented Feb 1, 2019

Thank you @xueyumusic for your contribution

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