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

GH-41433: [C++][Gandiva] Fix ascii_utf8 function to return same result on x86 and Arm #41434 #82

Merged
merged 1 commit into from
Oct 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cpp/src/gandiva/precompiled/string_ops.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1377,7 +1377,7 @@ gdv_int32 ascii_utf8(const char* data, gdv_int32 data_len) {
if (data_len == 0) {
return 0;
}
return static_cast<gdv_int32>(data[0]);
return static_cast<gdv_int32>(static_cast<signed char>(data[0]));
}

// Returns the ASCII character having the binary equivalent to A.
Expand Down
2 changes: 2 additions & 0 deletions cpp/src/gandiva/precompiled/string_ops_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ TEST(TestStringOps, TestAscii) {
EXPECT_EQ(ascii_utf8("", 0), 0);
EXPECT_EQ(ascii_utf8("123", 3), 49);
EXPECT_EQ(ascii_utf8("999", 3), 57);
EXPECT_EQ(ascii_utf8("\x80", 1), -128);
EXPECT_EQ(ascii_utf8("\xFF", 1), -1);
}

TEST(TestStringOps, TestChrBigInt) {
Expand Down
2 changes: 1 addition & 1 deletion dev/tasks/docker-tests/github.linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ jobs:
done
- name: Save the R test output
if: always()
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: test-output
path: arrow/r/check/arrow.Rcheck/tests/testthat.Rout*
Expand Down
6 changes: 3 additions & 3 deletions dev/tasks/java-jars/github.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ jobs:
- name: Compress into single artifact to keep directory structure
run: tar -cvzf arrow-shared-libs-linux-{{ arch }}.tar.gz arrow/java-dist/
- name: Upload artifacts
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: ubuntu-shared-lib-{{ arch }}
path: arrow-shared-libs-linux-{{ arch }}.tar.gz
Expand Down Expand Up @@ -154,7 +154,7 @@ jobs:
- name: Compress into single artifact to keep directory structure
run: tar -cvzf arrow-shared-libs-macos-{{ arch }}.tar.gz arrow/java-dist/
- name: Upload artifacts
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: macos-shared-lib-{{ arch }}
path: arrow-shared-libs-macos-{{ arch }}.tar.gz
Expand Down Expand Up @@ -188,7 +188,7 @@ jobs:
shell: bash
run: tar -cvzf arrow-shared-libs-windows.tar.gz arrow/java-dist/
- name: Upload artifacts
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: windows-shared-lib
path: arrow-shared-libs-windows.tar.gz
Expand Down
2 changes: 1 addition & 1 deletion dev/tasks/r/github.devdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ jobs:
EOF
shell: bash -l {0}
- name: Save the install script
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: {{ "devdocs-script_os-${{ matrix.os }}_sysinstall-${{ matrix.system-install }}" }}
path: arrow/r/vignettes/developers/script.sh
Expand Down
2 changes: 1 addition & 1 deletion dev/tasks/r/github.linux.arrow.version.back.compat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ jobs:
shell: bash

- name: Upload the parquet artifacts
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: files
path: arrow/r/extra-tests/files
Expand Down
2 changes: 1 addition & 1 deletion dev/tasks/r/github.linux.cran.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ jobs:
if: always()
- name: Save the test output
if: always()
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: test-output
path: arrow/r/check/arrow.Rcheck/tests/testthat.Rout*
4 changes: 2 additions & 2 deletions dev/tasks/r/github.linux.offline.build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
R -e "source('R/install-arrow.R'); create_package_with_all_dependencies(dest_file = 'arrow_with_deps.tar.gz', source_file = \"${built_tar}\")"
shell: bash
- name: Upload the third party dependency artifacts
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: thirdparty_deps
path: arrow/r/arrow_with_deps.tar.gz
Expand Down Expand Up @@ -91,7 +91,7 @@ jobs:
run: cat arrow-tests/testthat.Rout*
if: always()
- name: Save the test output
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: test-output
path: arrow-tests/testthat.Rout*
Expand Down
2 changes: 1 addition & 1 deletion dev/tasks/r/github.linux.versions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:
if: always()
- name: Save the test output
if: always()
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: test-output
path: arrow/r/check/arrow.Rcheck/tests/testthat.Rout*
2 changes: 1 addition & 1 deletion dev/tasks/r/github.macos-linux.local.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ jobs:
run: cat arrow-tests/testthat.Rout*
if: failure()
- name: Save the test output
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: test-output
path: arrow-tests/testthat.Rout*
Expand Down
Loading