tispark icon indicating copy to clipboard operation
tispark copied to clipboard

Fix TiFlash overflow (#2740)

Open ti-chi-bot opened this issue 1 year ago • 11 comments

This is an automated cherry-pick of #2740

What problem does this PR solve?

Reproduce:

create and insert

CREATE TABLE test.t(`a` bigint(20) UNSIGNED NOT NULL)
insert into t values (16717361816800086255)

query from tispark with tiflash returns an error result(negative number)

 spark.conf
        .set("spark.tispark.isolation_read_engines","tiflash")
spark.sql("select * from tidb_catalog.test.t").show()

What is changed and how it works?

TiSpark requests TiFlash using TypeCHBlock encode, but forgets to handle the UNSIGNED scenes when decoded.

this pr shows how to decode it corretly

Check List

Tests

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

Code changes

  • Has exported function/method change
  • Has exported variable/fields change
  • Has interface methods change
  • Has persistent data change

Side effects

  • Possible performance regression
  • Increased code complexity
  • Breaking backward compatibility

Related changes

  • Need to cherry-pick to the release branch
  • Need to update the documentation
  • Need to update the tidb-ansible repository
  • Need to be included in the release note

ti-chi-bot avatar Aug 01 '23 07:08 ti-chi-bot

/run-all-tests profile=scala-2.12

shiyuhang0 avatar Aug 03 '23 07:08 shiyuhang0

@shiyuhang0: adding LGTM is restricted to approvers and reviewers in OWNERS files.

In response to this:

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 kubernetes/test-infra repository.

ti-chi-bot[bot] avatar Aug 03 '23 07:08 ti-chi-bot[bot]

@xuanyu66: adding LGTM is restricted to approvers and reviewers in OWNERS files.

In response to this:

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 kubernetes/test-infra repository.

ti-chi-bot[bot] avatar Aug 03 '23 07:08 ti-chi-bot[bot]

/merge

shiyuhang0 avatar Aug 08 '23 03:08 shiyuhang0

@shiyuhang0: We have migrated to builtin LGTM and approve plugins for reviewing.

Please use /approve when you want approve this pull request.

The changes announcement: LGTM plugin changes

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[bot] avatar Aug 08 '23 03:08 ti-chi-bot[bot]

/approve

xuanyu66 avatar Aug 30 '23 06:08 xuanyu66

/run-all-tests profile=scala-2.12

shiyuhang0 avatar Sep 06 '23 08:09 shiyuhang0

[LGTM Timeline notifier]

Timeline:

  • 2023-09-27 03:24:30.30478489 +0000 UTC m=+418060.023127103: :ballot_box_with_check: agreed by shiyuhang0.

ti-chi-bot[bot] avatar Sep 27 '23 03:09 ti-chi-bot[bot]

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: shiyuhang0, xuanyu66

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

The pull request process is described here

Needs approval from an approver in each of these files:
  • ~~OWNERS~~ [shiyuhang0,xuanyu66]

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[bot] avatar Sep 27 '23 03:09 ti-chi-bot[bot]

/merge

shiyuhang0 avatar Sep 27 '23 03:09 shiyuhang0

@shiyuhang0: We have migrated to builtin LGTM and approve plugins for reviewing.

Please use /approve when you want approve this pull request.

The changes announcement: LGTM plugin changes

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[bot] avatar Sep 27 '23 03:09 ti-chi-bot[bot]