Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[C++][Gandiva] Function ascii_utf8 result is different on x86_64 and Aarch_64 #41433

Closed
DenisTarasyuk opened this issue Apr 29, 2024 · 1 comment

Comments

@DenisTarasyuk
Copy link
Contributor

Describe the bug, including details regarding any error messages, version, and platform.

On x86 platform ascii_utf8 function returns negative values for ascii codes >127, on Arm this function returns positive values. This issues is caused by usage of const char* input parameter which is by default signed char on x86 and unsigned char on Arm.

Component(s)

C++ - Gandiva

DenisTarasyuk added a commit to DenisTarasyuk/arrow that referenced this issue Apr 29, 2024
@kou kou changed the title Function ascii_utf8 result is different on x86_64 and Aarch_64 [C++][Gandiva] Function ascii_utf8 result is different on x86_64 and Aarch_64 Apr 30, 2024
kou pushed a commit that referenced this issue Apr 30, 2024
…t on x86 and Arm (#41434)

### Rationale for this change
Fixing ascii_utf8 function that has different return result on x86 and Arm due to default char type sign difference on those platforms. Added tests to cover existing x86 behavior for ascii symbols with code >127.

### What changes are included in this PR?

1. Added type cast to signed char to save existing x86 behavior on Arm platform.
2. Added tests cases for negative results.

### Are these changes tested?
UT included.

### Are there any user-facing changes?
None

* GitHub Issue: #41433

Authored-by: DenisTarasyuk <[email protected]>
Signed-off-by: Sutou Kouhei <[email protected]>
@kou kou added this to the 17.0.0 milestone Apr 30, 2024
@kou
Copy link
Member

kou commented Apr 30, 2024

Issue resolved by pull request 41434
#41434

@kou kou closed this as completed Apr 30, 2024
DenisTarasyuk added a commit to DenisTarasyuk/arrow that referenced this issue Apr 30, 2024
… result on x86 and Arm (apache#41434)

### Rationale for this change
Fixing ascii_utf8 function that has different return result on x86 and Arm due to default char type sign difference on those platforms. Added tests to cover existing x86 behavior for ascii symbols with code >127.

### What changes are included in this PR?

1. Added type cast to signed char to save existing x86 behavior on Arm platform.
2. Added tests cases for negative results.

### Are these changes tested?
UT included.

### Are there any user-facing changes?
None

* GitHub Issue: apache#41433

Authored-by: DenisTarasyuk <[email protected]>
Signed-off-by: Sutou Kouhei <[email protected]>
DenisTarasyuk added a commit to DenisTarasyuk/arrow that referenced this issue May 2, 2024
… result on x86 and Arm (apache#41434)

### Rationale for this change
Fixing ascii_utf8 function that has different return result on x86 and Arm due to default char type sign difference on those platforms. Added tests to cover existing x86 behavior for ascii symbols with code >127.

### What changes are included in this PR?

1. Added type cast to signed char to save existing x86 behavior on Arm platform.
2. Added tests cases for negative results.

### Are these changes tested?
UT included.

### Are there any user-facing changes?
None

* GitHub Issue: apache#41433

Authored-by: DenisTarasyuk <[email protected]>
Signed-off-by: Sutou Kouhei <[email protected]>
tolleybot pushed a commit to tmct/arrow that referenced this issue May 2, 2024
… result on x86 and Arm (apache#41434)

### Rationale for this change
Fixing ascii_utf8 function that has different return result on x86 and Arm due to default char type sign difference on those platforms. Added tests to cover existing x86 behavior for ascii symbols with code >127.

### What changes are included in this PR?

1. Added type cast to signed char to save existing x86 behavior on Arm platform.
2. Added tests cases for negative results.

### Are these changes tested?
UT included.

### Are there any user-facing changes?
None

* GitHub Issue: apache#41433

Authored-by: DenisTarasyuk <[email protected]>
Signed-off-by: Sutou Kouhei <[email protected]>
DenisTarasyuk added a commit to dremio/arrow that referenced this issue May 3, 2024
… result on x86 and Arm (apache#41434)

### Rationale for this change
Fixing ascii_utf8 function that has different return result on x86 and Arm due to default char type sign difference on those platforms. Added tests to cover existing x86 behavior for ascii symbols with code >127.

### What changes are included in this PR?

1. Added type cast to signed char to save existing x86 behavior on Arm platform.
2. Added tests cases for negative results.

### Are these changes tested?
UT included.

### Are there any user-facing changes?
None

* GitHub Issue: apache#41433

Authored-by: DenisTarasyuk <[email protected]>
Signed-off-by: Sutou Kouhei <[email protected]>
vibhatha pushed a commit to vibhatha/arrow that referenced this issue May 25, 2024
… result on x86 and Arm (apache#41434)

### Rationale for this change
Fixing ascii_utf8 function that has different return result on x86 and Arm due to default char type sign difference on those platforms. Added tests to cover existing x86 behavior for ascii symbols with code >127.

### What changes are included in this PR?

1. Added type cast to signed char to save existing x86 behavior on Arm platform.
2. Added tests cases for negative results.

### Are these changes tested?
UT included.

### Are there any user-facing changes?
None

* GitHub Issue: apache#41433

Authored-by: DenisTarasyuk <[email protected]>
Signed-off-by: Sutou Kouhei <[email protected]>
lriggs pushed a commit to lriggs/arrow that referenced this issue Sep 6, 2024
… result on x86 and Arm (apache#41434)

### Rationale for this change
Fixing ascii_utf8 function that has different return result on x86 and Arm due to default char type sign difference on those platforms. Added tests to cover existing x86 behavior for ascii symbols with code >127.

### What changes are included in this PR?

1. Added type cast to signed char to save existing x86 behavior on Arm platform.
2. Added tests cases for negative results.

### Are these changes tested?
UT included.

### Are there any user-facing changes?
None

* GitHub Issue: apache#41433

Authored-by: DenisTarasyuk <[email protected]>
Signed-off-by: Sutou Kouhei <[email protected]>
DenisTarasyuk added a commit to DenisTarasyuk/arrow that referenced this issue Sep 30, 2024
… result on x86 and Arm (apache#41434)

### Rationale for this change
Fixing ascii_utf8 function that has different return result on x86 and Arm due to default char type sign difference on those platforms. Added tests to cover existing x86 behavior for ascii symbols with code >127.

### What changes are included in this PR?

1. Added type cast to signed char to save existing x86 behavior on Arm platform.
2. Added tests cases for negative results.

### Are these changes tested?
UT included.

### Are there any user-facing changes?
None

* GitHub Issue: apache#41433

Authored-by: DenisTarasyuk <[email protected]>
Signed-off-by: Sutou Kouhei <[email protected]>
DenisTarasyuk added a commit to DenisTarasyuk/arrow that referenced this issue Oct 2, 2024
… result on x86 and Arm (apache#41434)

Fixing ascii_utf8 function that has different return result on x86 and Arm due to default char type sign difference on those platforms. Added tests to cover existing x86 behavior for ascii symbols with code >127.

1. Added type cast to signed char to save existing x86 behavior on Arm platform.
2. Added tests cases for negative results.

UT included.

None

* GitHub Issue: apache#41433

Authored-by: DenisTarasyuk <[email protected]>
Signed-off-by: Sutou Kouhei <[email protected]>
DenisTarasyuk added a commit to dremio/arrow that referenced this issue Oct 4, 2024
… result on x86 and Arm (apache#41434)

Fixing ascii_utf8 function that has different return result on x86 and Arm due to default char type sign difference on those platforms. Added tests to cover existing x86 behavior for ascii symbols with code >127.

1. Added type cast to signed char to save existing x86 behavior on Arm platform.
2. Added tests cases for negative results.

UT included.

None

* GitHub Issue: apache#41433

Authored-by: DenisTarasyuk <[email protected]>
Signed-off-by: Sutou Kouhei <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants