Skip to content
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
72 changes: 72 additions & 0 deletions java/driver/jni-validation-sqlite/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.apache.arrow.adbc</groupId>
<artifactId>arrow-adbc-java-root</artifactId>
<version>0.23.0-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>

<artifactId>adbc-driver-jni-validation-sqlite</artifactId>
<packaging>jar</packaging>
<name>Arrow ADBC Driver JNI Validation with SQLite</name>
<description>Tests validating the JNI driver against SQLite.</description>

<properties>
<maven.deploy.skip>true</maven.deploy.skip>
</properties>

<dependencies>
<dependency>
<groupId>org.apache.arrow.adbc</groupId>
<artifactId>adbc-core</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.arrow.adbc</groupId>
<artifactId>adbc-driver-jni</artifactId>
<scope>test</scope>
</dependency>

<!-- Testing -->
<dependency>
<groupId>org.apache.arrow</groupId>
<artifactId>arrow-memory-netty</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.assertj</groupId>
<artifactId>assertj-core</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.arrow.adbc</groupId>
<artifactId>adbc-driver-validation</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package org.apache.arrow.adbc.driver.jni;

import org.apache.arrow.adbc.driver.testsuite.AbstractConnectionMetadataTest;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Disabled;

public class JniSqliteConnectionMetadataTest extends AbstractConnectionMetadataTest {
@BeforeAll
static void beforeAll() {
quirks = new JniSqliteQuirks();
}

@Override
@Disabled("SQLite getInfo schema differs: map value type is List<Int32> instead of Int32")
public void getInfo() {}

@Override
@Disabled("SQLite getInfo schema differs: map value type is List<Int32> instead of Int32")
public void getInfoByCode() {}

@Override
@Disabled("SQLite does not support ALTER TABLE ... ALTER COLUMN ... SET NOT NULL")
public void getObjectsConstraints() {}

@Override
@Disabled(
"SQLite getObjects schema has nullable catalog_name/db_schema_name, test expects non-null")
public void getObjectsColumns() {}

@Override
@Disabled(
"SQLite getObjects schema has nullable catalog_name/db_schema_name, test expects non-null")
public void getObjectsCatalogs() {}

@Override
@Disabled(
"SQLite getObjects schema has nullable catalog_name/db_schema_name, test expects non-null")
public void getObjectsCatalogsPattern() {}

@Override
@Disabled(
"SQLite getObjects schema has nullable catalog_name/db_schema_name, test expects non-null")
public void getObjectsDbSchemas() {}

@Override
@Disabled(
"SQLite getObjects schema has nullable catalog_name/db_schema_name, test expects non-null")
public void getObjectsTables() {}

@Override
@Disabled("SQLite type affinity returns Int64 for all types, causing schema mismatch")
public void getTableSchema() {}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package org.apache.arrow.adbc.driver.jni;

import org.apache.arrow.adbc.driver.testsuite.AbstractConnectionTest;
import org.junit.jupiter.api.BeforeAll;

public class JniSqliteConnectionTest extends AbstractConnectionTest {
@BeforeAll
static void beforeAll() {
quirks = new JniSqliteQuirks();
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package org.apache.arrow.adbc.driver.jni;

import java.util.HashMap;
import java.util.Map;
import org.apache.arrow.adbc.core.AdbcDatabase;
import org.apache.arrow.adbc.core.AdbcException;
import org.apache.arrow.adbc.driver.testsuite.SqlValidationQuirks;
import org.apache.arrow.memory.BufferAllocator;

public class JniSqliteQuirks extends SqlValidationQuirks {
@Override
public AdbcDatabase initDatabase(BufferAllocator allocator) throws AdbcException {
final Map<String, Object> parameters = new HashMap<>();
JniDriver.PARAM_DRIVER.set(parameters, "adbc_driver_sqlite");
return new JniDriver(allocator).open(parameters);
}

@Override
public String defaultCatalog() {
return "main";
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package org.apache.arrow.adbc.driver.jni;

import org.apache.arrow.adbc.driver.testsuite.AbstractStatementTest;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Disabled;

class JniSqliteStatementTest extends AbstractStatementTest {
@BeforeAll
static void beforeAll() {
quirks = new JniSqliteQuirks();
}

@Override
@Disabled("SQLite driver does not return expected ADBC status codes for schema mismatch")
public void bulkIngestAppendConflict() {}

@Override
@Disabled("SQLite driver returns INTERNAL instead of NOT_FOUND")
public void bulkIngestAppendNotFound() {}

@Override
@Disabled("SQLite driver returns INTERNAL instead of ALREADY_EXISTS")
public void bulkIngestCreateConflict() {}

@Override
@Disabled("Not yet implemented in JNI driver")
public void executeSchema() {}

@Override
@Disabled("Not yet implemented in JNI driver")
public void executeSchemaPrepared() {}

@Override
@Disabled("Not yet implemented in JNI driver")
public void executeSchemaParams() {}

@Override
@Disabled("Not yet implemented in JNI driver")
public void getParameterSchema() {}

@Override
@Disabled("SQLite promotes INT to BIGINT, causing strict schema equality check to fail")
public void prepareQueryWithParameters() {}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package org.apache.arrow.adbc.driver.jni;

import org.apache.arrow.adbc.driver.testsuite.AbstractTransactionTest;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Disabled;

@Disabled("Transactions not yet implemented in JNI driver")
public class JniSqliteTransactionTest extends AbstractTransactionTest {
@BeforeAll
static void beforeAll() {
quirks = new JniSqliteQuirks();
}
}
Loading
Loading