Added firebird database type and parser module#33773
Merged
strongduanmu merged 2 commits intoapache:masterfrom Nov 24, 2024
Merged
Added firebird database type and parser module#33773strongduanmu merged 2 commits intoapache:masterfrom
strongduanmu merged 2 commits intoapache:masterfrom
Conversation
Co-authored-by: vasilevskyy <marvo.rate2016@yandex.ru>
Member
|
Great job, I will review soon. |
7 tasks
Comment on lines
+35
to
+39
| @Override | ||
| public ConnectionProperties parse(final String url, final String username, final String catalog) { | ||
| JdbcUrl jdbcUrl = new StandardJdbcUrlParser().parse(url); | ||
| return new StandardConnectionProperties(jdbcUrl.getHostname(), jdbcUrl.getPort(DEFAULT_PORT), jdbcUrl.getDatabase(), null, jdbcUrl.getQueryProperties(), new Properties()); | ||
| } |
Member
There was a problem hiding this comment.
- I noticed a potential issue with the current PR while investigating the fallout from Improve GraalVM Reachability Metadata and corresponding nativeTest related unit tests #29052 .
- Why use
org.apache.shardingsphere.infra.database.core.connector.url.StandardJdbcUrlParserinstead of using a class provided by the database driver, such asorg.apache.hive.jdbc.Utils, as in https://github.com/apache/shardingsphere/blob/master/infra/database/type/hive/src/main/java/org/apache/shardingsphere/infra/database/hive/connector/HiveConnectionPropertiesParser.java ? - The current PR causes URLs like
jdbc:firebird://localhost:32783//var/lib/firebird/data/demo_ds_2.fdbto not be recognized.
[ERROR] 2025-01-11 10:20:35.235 [main] com.zaxxer.hikari.pool.HikariPool - HikariPool-1 - Exception during pool initialization.
org.apache.shardingsphere.infra.database.core.exception.UnrecognizedDatabaseURLException: The URL `jdbc:firebird://localhost:32783//var/lib/firebird/data/demo_ds_2.fdb` is not recognized, please refer to the pattern `(?<schema>[\w-.+:%%]+)\s*(?://(?<authority>[^/?#]*))?\s*(?:/(?!\s*/)(?<path>[^?#]*))?(?:\?(?!\s*\?)(?<query>[^#]*))?`.
at org.apache.shardingsphere.infra.database.core.connector.url.StandardJdbcUrlParser.lambda$parse$0(StandardJdbcUrlParser.java:58)
at org.apache.shardingsphere.infra.exception.core.ShardingSpherePreconditions.checkState(ShardingSpherePreconditions.java:44)
at org.apache.shardingsphere.infra.database.core.connector.url.StandardJdbcUrlParser.parse(StandardJdbcUrlParser.java:58)
at org.apache.shardingsphere.infra.database.firebird.connector.FirebirdConnectionPropertiesParser.parse(FirebirdConnectionPropertiesParser.java:37)
This was referenced Jan 11, 2025
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #33699.
Changes proposed in this pull request:
Before committing this PR, I'm sure that I have checked the following options:
./mvnw clean install -B -T1C -Dmaven.javadoc.skip -Dmaven.jacoco.skip -e.