Skip to content

Commit

Permalink
GH-55: [Gandiva] Re-enable tests (#595)
Browse files Browse the repository at this point in the history
Fixes GH-55.

### Rationale for this change
I fixed the linking error here:
apache/arrow#45114

### What changes are included in this PR?
Reenabling some disabled tests.

### Are these changes tested?
Yes, they are tests.

### Are there any user-facing changes?
No.
  • Loading branch information
lriggs authored Feb 19, 2025
1 parent 52cf1f2 commit e1dd6d8
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 41 deletions.
2 changes: 1 addition & 1 deletion .env
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,4 @@ MAVEN=3.9.9
# Keep in sync with apache/arrow
ARROW_REPO_ROOT=./arrow
PYTHON=3.9
VCPKG="943c5ef1c8f6b5e6ced092b242c8299caae2ff01" # 2024.04.26 Release
VCPKG="f7423ee180c4b7f40d43402c2feb3859161ef625" # 2024.06.15 Release
32 changes: 16 additions & 16 deletions .github/workflows/rc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,12 +107,12 @@ jobs:
- name: Extract source archive
run: |
tar -xf apache-arrow-java-*.tar.gz --strip-components=1
- name: Download the latest Apache Arrow C++
if: github.event_name != 'schedule'
run: |
ci/scripts/download_cpp.sh
# - name: Download the latest Apache Arrow C++
# if: github.event_name != 'schedule'
# run: |
# ci/scripts/download_cpp.sh
- name: Checkout Apache Arrow C++
if: github.event_name == 'schedule'
# if: github.event_name == 'schedule'
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
repository: apache/arrow
Expand Down Expand Up @@ -174,12 +174,12 @@ jobs:
- name: Extract source archive
run: |
tar -xf apache-arrow-java-*.tar.gz --strip-components=1
- name: Download the latest Apache Arrow C++
if: github.event_name != 'schedule'
run: |
ci/scripts/download_cpp.sh
# - name: Download the latest Apache Arrow C++
# if: github.event_name != 'schedule'
# run: |
# ci/scripts/download_cpp.sh
- name: Checkout Apache Arrow C++
if: github.event_name == 'schedule'
# if: github.event_name == 'schedule'
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
repository: apache/arrow
Expand Down Expand Up @@ -299,13 +299,13 @@ jobs:
shell: bash
run: |
tar -xf apache-arrow-java-*.tar.gz --strip-components=1
- name: Download the latest Apache Arrow C++
if: github.event_name != 'schedule'
shell: bash
run: |
ci/scripts/download_cpp.sh
# - name: Download the latest Apache Arrow C++
# if: github.event_name != 'schedule'
# shell: bash
# run: |
# ci/scripts/download_cpp.sh
- name: Checkout Apache Arrow C++
if: github.event_name == 'schedule'
# if: github.event_name == 'schedule'
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
repository: apache/arrow
Expand Down
4 changes: 2 additions & 2 deletions compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -92,12 +92,12 @@ services:
# Usage:
# docker compose build vcpkg-jni
# docker compose run vcpkg-jni
image: ${REPO}:${ARCH}-vcpkg-jni
image: ${REPO}:${ARCH}-vcpkg-jni-${VCPKG}
build:
context: .
dockerfile: ci/docker/vcpkg-jni.dockerfile
cache_from:
- ${REPO}:${ARCH}-vcpkg-jni
- ${REPO}:${ARCH}-vcpkg-jni-${VCPKG}
args:
base: ${ARROW_REPO}:${ARCH}-python-${PYTHON}-wheel-manylinux-2014-vcpkg-${VCPKG}
volumes:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,11 @@
import org.apache.arrow.vector.ipc.message.ArrowRecordBatch;
import org.apache.arrow.vector.types.pojo.Field;
import org.apache.arrow.vector.types.pojo.Schema;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;

public class FilterProjectTest extends BaseEvaluatorTest {

@Test
@Disabled("GH-43576 - Fix and enable this test")
public void testSimpleSV16() throws GandivaException, Exception {
Field a = Field.nullable("a", int32);
Field b = Field.nullable("b", int32);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
import org.apache.arrow.vector.types.pojo.ArrowType;
import org.apache.arrow.vector.types.pojo.Field;
import org.apache.arrow.vector.types.pojo.Schema;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;

public class FilterTest extends BaseEvaluatorTest {
Expand Down Expand Up @@ -73,7 +72,6 @@ List<ArrowBuf> stringBufs(String[] strings) {
}

@Test
@Disabled("GH-43576 - Fix and enable this test")
public void testSimpleInString() throws GandivaException, Exception {
Field c1 = Field.nullable("c1", new ArrowType.Utf8());
TreeNode l1 = TreeBuilder.makeLiteral(1L);
Expand Down Expand Up @@ -137,7 +135,6 @@ public void testSimpleInString() throws GandivaException, Exception {
}

@Test
@Disabled("GH-43576 - Fix and enable this test")
public void testSimpleInInt() throws GandivaException, Exception {
Field c1 = Field.nullable("c1", int32);

Expand Down Expand Up @@ -181,7 +178,6 @@ public void testSimpleInInt() throws GandivaException, Exception {
}

@Test
@Disabled("GH-43576 - Fix and enable this test")
public void testSimpleSV16() throws GandivaException, Exception {
Field a = Field.nullable("a", int32);
Field b = Field.nullable("b", int32);
Expand All @@ -203,7 +199,6 @@ public void testSimpleSV16() throws GandivaException, Exception {
}

@Test
@Disabled("GH-43576 - Fix and enable this test")
public void testSimpleSV16_AllMatched() throws GandivaException, Exception {
Field a = Field.nullable("a", int32);
Field b = Field.nullable("b", int32);
Expand Down Expand Up @@ -233,7 +228,6 @@ public void testSimpleSV16_AllMatched() throws GandivaException, Exception {
}

@Test
@Disabled("GH-43576 - Fix and enable this test")
public void testSimpleSV16_GreaterThan64Recs() throws GandivaException, Exception {
Field a = Field.nullable("a", int32);
Field b = Field.nullable("b", int32);
Expand Down Expand Up @@ -265,7 +259,6 @@ public void testSimpleSV16_GreaterThan64Recs() throws GandivaException, Exceptio
}

@Test
@Disabled("GH-43576 - Fix and enable this test")
public void testSimpleSV32() throws GandivaException, Exception {
Field a = Field.nullable("a", int32);
Field b = Field.nullable("b", int32);
Expand All @@ -287,7 +280,6 @@ public void testSimpleSV32() throws GandivaException, Exception {
}

@Test
@Disabled("GH-43576 - Fix and enable this test")
public void testSimpleFilterWithNoOptimisation() throws GandivaException, Exception {
Field a = Field.nullable("a", int32);
Field b = Field.nullable("b", int32);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,11 @@
import org.apache.arrow.vector.types.pojo.ArrowType.Decimal;
import org.apache.arrow.vector.types.pojo.Field;
import org.apache.arrow.vector.types.pojo.Schema;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;

public class ProjectorDecimalTest extends org.apache.arrow.gandiva.evaluator.BaseEvaluatorTest {

@Test
@Disabled("GH-43576 - Fix and enable this test")
public void test_add() throws GandivaException {
int precision = 38;
int scale = 8;
Expand Down Expand Up @@ -116,7 +114,6 @@ public void test_add() throws GandivaException {
}

@Test
@Disabled("GH-43576 - Fix and enable this test")
public void test_add_literal() throws GandivaException {
int precision = 2;
int scale = 0;
Expand Down Expand Up @@ -178,7 +175,6 @@ public void test_add_literal() throws GandivaException {
}

@Test
@Disabled("GH-43576 - Fix and enable this test")
public void test_multiply() throws GandivaException {
int precision = 38;
int scale = 8;
Expand Down Expand Up @@ -248,7 +244,6 @@ public void test_multiply() throws GandivaException {
}

@Test
@Disabled("GH-43576 - Fix and enable this test")
public void testCompare() throws GandivaException {
Decimal aType = new Decimal(38, 3, 128);
Decimal bType = new Decimal(38, 2, 128);
Expand Down Expand Up @@ -343,7 +338,6 @@ public void testCompare() throws GandivaException {
}

@Test
@Disabled("GH-43576 - Fix and enable this test")
public void testRound() throws GandivaException {
Decimal aType = new Decimal(38, 2, 128);
Decimal aWithScaleZero = new Decimal(38, 0, 128);
Expand Down Expand Up @@ -486,7 +480,6 @@ public void testRound() throws GandivaException {
}

@Test
@Disabled("GH-43576 - Fix and enable this test")
public void testCastToDecimal() throws GandivaException {
Decimal decimalType = new Decimal(38, 2, 128);
Decimal decimalWithScaleOne = new Decimal(38, 1, 128);
Expand Down Expand Up @@ -613,7 +606,6 @@ public void testCastToDecimal() throws GandivaException {
}

@Test
@Disabled("GH-43576 - Fix and enable this test")
public void testCastToLong() throws GandivaException {
Decimal decimalType = new Decimal(38, 2, 128);
Field dec = Field.nullable("dec", decimalType);
Expand Down Expand Up @@ -666,7 +658,6 @@ public void testCastToLong() throws GandivaException {
}

@Test
@Disabled("GH-43576 - Fix and enable this test")
public void testCastToDouble() throws GandivaException {
Decimal decimalType = new Decimal(38, 2, 128);
Field dec = Field.nullable("dec", decimalType);
Expand Down Expand Up @@ -721,7 +712,6 @@ public void testCastToDouble() throws GandivaException {
}

@Test
@Disabled("GH-43576 - Fix and enable this test")
public void testCastToString() throws GandivaException {
Decimal decimalType = new Decimal(38, 2, 128);
Field dec = Field.nullable("dec", decimalType);
Expand Down Expand Up @@ -783,7 +773,6 @@ public void testCastToString() throws GandivaException {
}

@Test
@Disabled("GH-43576 - Fix and enable this test")
public void testCastStringToDecimal() throws GandivaException {
Decimal decimalType = new Decimal(4, 2, 128);
Field dec = Field.nullable("dec", decimalType);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;

@Disabled("Disabled until GH-43981 is solved")
public class ProjectorTest extends BaseEvaluatorTest {

private Charset utf8Charset = Charset.forName("UTF-8");
Expand Down

0 comments on commit e1dd6d8

Please sign in to comment.