-
Notifications
You must be signed in to change notification settings - Fork 89
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Created a new integrations/venice-duckdb module, which is currently pretty barebones (just has the dependency and a unit test). Miscellaneous build changes: - The proto-related tasks are now only going to run in modules that have proto schemas defined. - Also refactored the CI tasks a bit: - There is a new Integrations bucket in the unit tests, which includes all of the unit tests coming from integrations/ (previously, samza and pulsar unit tests ran in the Clients bucket). - The Alpini unit tests are moved to the Router bucket. - Reduced repetitions and boilerplate throughout the CI files.
- Loading branch information
Showing
6 changed files
with
122 additions
and
92 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
dependencies { | ||
implementation libraries.duckdbJdbc | ||
} | ||
|
||
checkerFramework { | ||
extraJavacArgs = ['-Xmaxerrs', '256'] | ||
checkers = ['org.checkerframework.checker.nullness.NullnessChecker'] | ||
skipCheckerFramework = true | ||
excludeTests = true | ||
} |
44 changes: 44 additions & 0 deletions
44
integrations/venice-duckdb/src/test/java/com/linkedin/venice/duckdb/HelloWorldTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
package com.linkedin.venice.duckdb; | ||
|
||
import static org.testng.Assert.assertEquals; | ||
import static org.testng.Assert.assertFalse; | ||
import static org.testng.Assert.assertTrue; | ||
|
||
import java.sql.Connection; | ||
import java.sql.DriverManager; | ||
import java.sql.ResultSet; | ||
import java.sql.SQLException; | ||
import java.sql.Statement; | ||
import org.testng.annotations.Test; | ||
|
||
|
||
/** | ||
* The aim of this class is just to test DuckDB itself, without any Venice-ism involved. | ||
*/ | ||
public class HelloWorldTest { | ||
/** | ||
* Lightly adapted from: https://duckdb.org/docs/api/java.html#querying | ||
*/ | ||
@Test | ||
public void test() throws SQLException { | ||
try (Connection connection = DriverManager.getConnection("jdbc:duckdb:"); | ||
Statement stmt = connection.createStatement()) { | ||
// create a table | ||
stmt.execute("CREATE TABLE items (item VARCHAR, value DECIMAL(10, 2), count INTEGER)"); | ||
// insert two items into the table | ||
stmt.execute("INSERT INTO items VALUES ('jeans', 20.0, 1), ('hammer', 42.2, 2)"); | ||
|
||
try (ResultSet rs = stmt.executeQuery("SELECT * FROM items")) { | ||
assertTrue(rs.next(), "There should be a first row!"); | ||
assertEquals(rs.getString(1), "jeans"); | ||
assertEquals(rs.getInt(3), 1); | ||
|
||
assertTrue(rs.next(), "There should be a second row!"); | ||
assertEquals(rs.getString(1), "hammer"); | ||
assertEquals(rs.getInt(3), 2); | ||
|
||
assertFalse(rs.next(), "There should only be two rows!"); | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters