flink icon indicating copy to clipboard operation
flink copied to clipboard

[FLINK-27952][table-planner] Throw error while trying to convert Double.Infinity/NaN to BigDecimal in value literal expression

Open swuferhong opened this issue 3 years ago • 1 comments

What is the purpose of the change

When user use UDF, they may define Double.Infinity or Double.NaN in Expression. For numerical value like Double and Float, it will be converted to and stored as BigDecimal type in value literal expression convert step. However, for Double.Infinity or Double.NaN, it cannot be converted to BigDecimal. So this pr is aims to throw error when these cases appeared.

Brief change log

  • Throw error while trying to convert Double.Infinity/NaN to BigDecimal in value literal expression.
  • Adding UT tests.

Verifying this change

  • Adding UT 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): 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, 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? no

swuferhong avatar Sep 13 '22 11:09 swuferhong

CI report:

  • 4fabe010a2c2717557c4196022990b6b9c987f61 Azure: FAILURE
Bot commands The @flinkbot bot supports the following commands:
  • @flinkbot run azure re-run the last Azure build

flinkbot avatar Sep 13 '22 12:09 flinkbot