Skip to content

Conversation

@zaleslaw
Copy link
Collaborator

@zaleslaw zaleslaw commented Nov 12, 2025

  1. Extracted the common code flows in the separate functions
  2. Added support for the DataSource parameter in all methods
  3. Tested the ConnectionPool functionality and its usage under the hood the typical stress-tests

Closes #1512

casted[0][0] shouldBe "John"
}

private fun assertCustomerSalesDataWithLimit(df: AnyFrame) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same, duplicating whole logic

@zaleslaw zaleslaw requested a review from Copilot November 13, 2025 06:57
Copilot finished reviewing on behalf of zaleslaw November 13, 2025 06:59
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds DataSource parameter support to all JDBC methods, refactors test code to reduce duplication, and adds connection pool stress tests using HikariCP. The changes improve code maintainability and ensure the library works correctly with connection pooling scenarios.

Key changes:

  • Added HikariCP dependency and DataSource support across all JDBC read methods
  • Extracted repetitive test assertions into reusable helper functions
  • Added comprehensive connection pool tests to verify proper connection lifecycle management

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
gradle/libs.versions.toml Added HikariCP version definition and library reference (upgraded from 5.1.0 to 7.0.2)
dataframe-jdbc/build.gradle.kts Added HikariCP test dependency
dataframe-jdbc/src/test/kotlin/org/jetbrains/kotlinx/dataframe/io/h2/h2Test.kt Refactored tests to use helper assertion functions, added DataSource initialization, and created new test cases for DataSource API and connection pooling
Comments suppressed due to low confidence (1)

gradle/libs.versions.toml:194

  • There are now two library definitions for HikariCP: hikari (line 183) and hikaricp (line 194). Both point to the same artifact (com.zaxxer:HikariCP) with the same version reference. This creates unnecessary duplication. Consider keeping only one definition (preferably hikaricp since it's used in build.gradle.kts and matches the artifact name better).
hikari = { group = "com.zaxxer", name = "HikariCP", version.ref = "hikari" }
duckdb-jdbc = { group = "org.duckdb", name = "duckdb_jdbc", version.ref = "duckdb" }

exposed-core = { group = "org.jetbrains.exposed", name = "exposed-core", version.ref = "exposed" }
exposed-jdbc = { group = "org.jetbrains.exposed", name = "exposed-jdbc", version.ref = "exposed" }
exposed-kotlin-datetime = { group = "org.jetbrains.exposed", name = "exposed-kotlin-datetime", version.ref = "exposed" }
exposed-json = { group = "org.jetbrains.exposed", name = "exposed-json", version.ref = "exposed" }
exposed-money = { group = "org.jetbrains.exposed", name = "exposed-money", version.ref = "exposed" }

hibernate-core = { group = "org.hibernate.orm", name = "hibernate-core", version.ref = "hibernate" }
hibernate-hikaricp = { group = "org.hibernate.orm", name = "hibernate-hikaricp", version.ref = "hibernate" }
hikaricp = { group = "com.zaxxer", name = "HikariCP", version.ref = "hikari" }

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@zaleslaw zaleslaw merged commit 93d60d3 into master Nov 13, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add tests for DataSource functionality

3 participants