Skip to content

batch serialize/deserialize interface support handling nullmap#9825

Merged
ti-chi-bot[bot] merged 33 commits intopingcap:masterfrom
guo-shaoge:batch_serialize_refine
Feb 20, 2025
Merged

batch serialize/deserialize interface support handling nullmap#9825
ti-chi-bot[bot] merged 33 commits intopingcap:masterfrom
guo-shaoge:batch_serialize_refine

Conversation

@guo-shaoge
Copy link
Contributor

@guo-shaoge guo-shaoge commented Jan 24, 2025

What problem does this PR solve?

Issue Number: close #9836

Problem Summary:
#9756 support the compare semantics family of batch serialize/deserialize. But it didn't handle nullmap.

For example, for column ColumnNullable(ColumnString), if row-i is null, a default value will be serialized.

What is changed and how it works?


Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No code

Side effects

  • Performance regression: Consumes more CPU
  • Performance regression: Consumes more Memory
  • Breaking backward compatibility

Documentation

  • Affects user behaviors
  • Contains syntax changes
  • Contains variable changes
  • Contains experimental features
  • Changes MySQL compatibility

Release note

None

Signed-off-by: guo-shaoge <shaoge1994@163.com>
Signed-off-by: guo-shaoge <shaoge1994@163.com>
@ti-chi-bot ti-chi-bot bot added release-note-none Denotes a PR that doesn't merit a release note. do-not-merge/needs-linked-issue size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Jan 24, 2025
@guo-shaoge guo-shaoge changed the title Batch serialize refine batch serialize/deserialize interface support handling nullmap Jan 24, 2025
Signed-off-by: guo-shaoge <shaoge1994@163.com>
Signed-off-by: guo-shaoge <shaoge1994@163.com>
Signed-off-by: guo-shaoge <shaoge1994@163.com>
@guo-shaoge guo-shaoge force-pushed the batch_serialize_refine branch from 300891b to a13008f Compare January 25, 2025 14:02
Signed-off-by: guo-shaoge <shaoge1994@163.com>
Signed-off-by: guo-shaoge <shaoge1994@163.com>
Signed-off-by: guo-shaoge <shaoge1994@163.com>
Signed-off-by: guo-shaoge <shaoge1994@163.com>
@guo-shaoge guo-shaoge force-pushed the batch_serialize_refine branch from 5d11869 to 62fbbed Compare January 26, 2025 10:22
Signed-off-by: guo-shaoge <shaoge1994@163.com>
Signed-off-by: guo-shaoge <shaoge1994@163.com>
…ize_refine

Signed-off-by: guo-shaoge <shaoge1994@163.com>
Signed-off-by: guo-shaoge <shaoge1994@163.com>
}

template <bool for_compare>
template <bool compare_semantics>
Copy link
Contributor

Choose a reason for hiding this comment

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

for_compare seems better? Because the caller function name is XXXForCmp

Copy link
Contributor

@gengliqi gengliqi left a comment

Choose a reason for hiding this comment

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

Seems countSerializeByteSizeForCmp also needs to add a nullmap because the size may be changed if it's null.

Signed-off-by: guo-shaoge <shaoge1994@163.com>
Signed-off-by: guo-shaoge <shaoge1994@163.com>
Signed-off-by: guo-shaoge <shaoge1994@163.com>
Signed-off-by: guo-shaoge <shaoge1994@163.com>
Signed-off-by: guo-shaoge <shaoge1994@163.com>
@guo-shaoge
Copy link
Contributor Author

/retest

@guo-shaoge guo-shaoge removed the request for review from windtalker February 17, 2025 10:46
Copy link
Contributor

@xzhangxian1008 xzhangxian1008 left a comment

Choose a reason for hiding this comment

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

LGTM

@ti-chi-bot ti-chi-bot bot added the needs-1-more-lgtm Indicates a PR needs 1 more LGTM. label Feb 19, 2025
Signed-off-by: guo-shaoge <shaoge1994@163.com>
@guo-shaoge guo-shaoge force-pushed the batch_serialize_refine branch from 2b7c8ff to f94d6cb Compare February 19, 2025 03:23
Signed-off-by: guo-shaoge <shaoge1994@163.com>
@guo-shaoge guo-shaoge force-pushed the batch_serialize_refine branch from d58ce32 to 5fe79b6 Compare February 19, 2025 04:08
Signed-off-by: guo-shaoge <shaoge1994@163.com>
Signed-off-by: guo-shaoge <shaoge1994@163.com>
@guo-shaoge guo-shaoge requested a review from gengliqi February 19, 2025 06:47
Signed-off-by: guo-shaoge <shaoge1994@163.com>
Signed-off-by: guo-shaoge <shaoge1994@163.com>
Signed-off-by: guo-shaoge <shaoge1994@163.com>
Signed-off-by: guo-shaoge <shaoge1994@163.com>
@guo-shaoge guo-shaoge requested a review from gengliqi February 20, 2025 04:09
Copy link
Contributor

@gengliqi gengliqi left a comment

Choose a reason for hiding this comment

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

Others LGTM

}

template <bool has_null, bool has_collator, typename DerivedCollator>
template <bool compare_semantics, bool has_null, bool need_decode_collator, typename DerivedCollator, bool has_nullmap>
Copy link
Contributor

Choose a reason for hiding this comment

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

The function defination uses has_collator but here uses need_decode_collator

@ti-chi-bot ti-chi-bot bot added the lgtm label Feb 20, 2025
@ti-chi-bot
Copy link
Contributor

ti-chi-bot bot commented Feb 20, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: gengliqi, xzhangxian1008

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ti-chi-bot ti-chi-bot bot added approved and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Feb 20, 2025
@ti-chi-bot
Copy link
Contributor

ti-chi-bot bot commented Feb 20, 2025

[LGTM Timeline notifier]

Timeline:

  • 2025-02-19 03:20:12.837546193 +0000 UTC m=+1017855.233768252: ☑️ agreed by xzhangxian1008.
  • 2025-02-20 10:01:55.20583731 +0000 UTC m=+1128357.602059372: ☑️ agreed by gengliqi.

@ti-chi-bot
Copy link
Contributor

ti-chi-bot bot commented Feb 20, 2025

@guo-shaoge: Your PR was out of date, I have automatically updated it for you.

At the same time I will also trigger all tests for you:

/run-all-tests

trigger some heavy tests which will not run always when PR updated.

If the CI test fails, you just re-trigger the test that failed and the bot will merge the PR for you after the CI passes.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the ti-community-infra/tichi repository.

@ti-chi-bot ti-chi-bot bot merged commit ed8f828 into pingcap:master Feb 20, 2025
5 checks passed
@guo-shaoge guo-shaoge deleted the batch_serialize_refine branch February 21, 2025 02:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved lgtm release-note-none Denotes a PR that doesn't merit a release note. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

serializeToPosForCmp supports handling nullmap

3 participants