flink icon indicating copy to clipboard operation
flink copied to clipboard

[FLINK-27175][hive] Fix fail to call Hive UDAF when the UDAF accepts one parameter with array type

Open luoyuxia opened this issue 2 years ago • 5 comments

What is the purpose of the change

To fix fail to call Hive UDAF when the UDAF accepts one parameter with array type

Brief change log

When the parameter is a single array, wrap it to an array.

Verifying this change

Added test method testUDAFCollectList in HiveGenericUDAFTest.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, 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? N/A

luoyuxia avatar Apr 11 '22 11:04 luoyuxia

CI report:

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

flinkbot avatar Apr 11 '22 11:04 flinkbot

@flinkbot run azure

luoyuxia avatar Apr 12 '22 02:04 luoyuxia

@hehuiyuan Thanks very much for your review.

luoyuxia avatar Apr 13 '22 01:04 luoyuxia

@hehuiyuan Thanks very much for your review.

imageWe are just doing some hive compatibility verification.

hehuiyuan avatar Apr 13 '22 08:04 hehuiyuan

@luoyuxia Thanks for your contribution, I left a minor comment. Overall, LGTM

lsyldliu avatar Apr 13 '22 12:04 lsyldliu

Could you add an IT case for this?

wuchong avatar Aug 18 '22 08:08 wuchong

Could you add an IT case for this?

Sure. Now, I add a query in udaf.q to verify this fix. Without this fix, the query will fail to run.

luoyuxia avatar Aug 19 '22 11:08 luoyuxia