Skip to content

Improved SQL<->JDBC mapping #855

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

Merged
merged 9 commits into from
Sep 16, 2024
Merged

Improved SQL<->JDBC mapping #855

merged 9 commits into from
Sep 16, 2024

Conversation

zaleslaw
Copy link
Collaborator

@zaleslaw zaleslaw commented Sep 6, 2024

Fixes #804 Fixes #701
Closed #859

Enabled the dataframe debug mode by default in the gradle.properties file. Updated JDBC type mappings to use more appropriate Kotlin types and improved handling for certain special cases. Adjusted corresponding test cases to align with these changes.
Changed several column type mappings in test cases from Float and Char to Double and String respectively for better compliance with JDBC standards. Adjusted main code to handle BLOB types as ByteArray and refined conditional logic in MariaDb and SQLite converters.
@zaleslaw zaleslaw requested a review from Jolanrensen September 6, 2024 10:41
Corrected handling of SQL Array types to properly map them to Kotlin arrays. Updated test cases to include integer array column and verified schema recognition of SQL Array types.
Corrected handling of SQL Array types to properly map them to Kotlin arrays. Introduced a utility function to cast arrays and refactored the read logic to use it. Updated test cases to include various array columns and verified schema recognition of these types.
Enhanced the SQL schema handling to accommodate array types in Postgres and improved support for Blob types in MySQL and MariaDB. Also standardized the use of specific timestamps and fixed data type mappings for schemas.
Optimized code layout in several files, including `mysqlTest.kt`, `readJdbc.kt`, and `postgresH2Test.kt`, for enhanced readability. This includes reformatting function definitions, rearranging import statements, and using concise lambda expressions.
Changed the `kotlin.dataframe.debug` property to `false`, which was previously set to `true`. This adjustment ensures that tests meant for debugging are not mistakenly executed in production environments.
Copy link
Collaborator

@Jolanrensen Jolanrensen left a comment

Choose a reason for hiding this comment

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

just some small questions

Changed `castArray` to use safe casting and made it private. Improved handling of array element types by checking distinct types and ensuring consistency, with fallback behavior for varying or unknown types.
@zaleslaw zaleslaw merged commit 6dee961 into master Sep 16, 2024
3 of 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
2 participants