cloudberry icon indicating copy to clipboard operation
cloudberry copied to clipboard

Send rows in binary mode for ANALYZE

Open Light-City opened this issue 1 year ago • 1 comments

fix #569


Change logs

Send results of select pg_catalog.gp_acquire_sample_rows query in binary mode. That allows to avoid overflow for max double.
For example, if run the following prior to this fix:

    set extra_float_digits to 0;
    create table t (a double precision);
    insert into t values (1.7976931348623157e+308);
    analyze t;
    the following message will be printed:
    ERROR: value out of range: overflow

so cherry-pick related commits from gpdb-archive.

get correlation from segments instead of calculating it on QD (#15357)

Consider oversized rows for stawidth computation

Send rows in binary mode for ANALYZE

Why are the changes needed?

  • analyze and analyze func.
  • related test

Does this PR introduce any user-facing change?

no.

How was this patch tested?

icw test: analyze.sql

Contributor's Checklist

Here are some reminders and checklists before/when submitting your pull request, please check them:

  • [x] Make sure your Pull Request has a clear title and commit message. You can take git-commit template as a reference.
  • [x] Sign the Contributor License Agreement as prompted for your first-time contribution(One-time setup).
  • [x] Learn the coding contribution guide, including our code conventions, workflow and more.
  • [x] List your communication in the GitHub Issues or Discussions (if has or needed).
  • [x] Document changes.
  • [x] Add tests for the change
  • [x] Pass make installcheck
  • [x] Pass make -C src/test installcheck-cbdb-parallel
  • [x] Feel free to request cloudberrydb/dev team for review and approval when your PR is ready🥳

Light-City avatar Aug 13 '24 02:08 Light-City

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 4 committers have signed the CLA.

:white_check_mark: Light-City
:x: zhangxing
:x: yanwr1
:x: zxuejing


zhangxing seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

CLAassistant avatar Aug 13 '24 02:08 CLAassistant