Skip to content

Conversation

@twalthr
Copy link
Contributor

@twalthr twalthr commented Jun 6, 2019

What is the purpose of the change

This PR updates field references such as FieldReferenceExpression or LocalFieldReference to the new type system.

Brief change log

  • Updated expressions and tests.

Verifying this change

This change is already covered by existing 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? not applicable

@flinkbot
Copy link
Collaborator

flinkbot commented Jun 6, 2019

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.

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

@twalthr twalthr force-pushed the FLINK-12254_FIELD branch from 3746335 to 45bfea6 Compare June 7, 2019 07:10
private void validateBatchTimeAttribute(TypeInformation<?> timeFieldType) {
if (!(timeFieldType instanceof SqlTimeTypeInfo || timeFieldType == LONG_TYPE_INFO)) {
private void validateBatchTimeAttribute(LogicalType timeFieldType) {
if (!(hasRoot(timeFieldType, TIMESTAMP_WITHOUT_TIME_ZONE) || hasRoot(timeFieldType, BIGINT))) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this enough for the legacy planner? I think legacy planner supports only subset of the TIMESTAMP_WITHOUT_TIME_ZONE root? Where should we validate that?

I understand it is hard to tame two different types systems and two different planners that support different subsets of those type systems. I guess the user will always have the possibility to fallback to the legacy type system for now if something goes wrong. So I am ok with 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.

I think the planners need to verify the types that are entering at the beginning. The validation in the API should be performed logically otherwise we end up in an validation hell.

If something goes wrong a users has two fallbacks, either use the old type system or fully specify the DataType such that a legacy type info converter understands it.

@asfgit asfgit closed this in c984383 Jun 7, 2019
sjwiesman pushed a commit to sjwiesman/flink that referenced this pull request Jun 26, 2019
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