Skip to content

[HHH-19365]GaussDB Dialect Support #10093

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

Open
wants to merge 33 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
9b248b5
[HHH-19365]merge works done in https://github.com/SweetWuXiaoMei/hibe…
liubao68 Apr 25, 2025
efb100a
[HHH-19365] update default port
liubao68 Apr 25, 2025
ffd55e2
HHH-19365 - Solve gaussdb function support
SweetWuXiaoMei Apr 25, 2025
b596828
[HHH-19365]!supportsIdentityColumns
liubao68 Apr 25, 2025
6becc03
HHH-19365 - ignore gauss identity
SweetWuXiaoMei Apr 25, 2025
a5da4e3
[HHH-19365]!appendDatetimeFormat
liubao68 Apr 25, 2025
28773f5
[HHH-19365]!xml-functions
liubao68 Apr 25, 2025
7a1a94c
[HHH-19365]add no guarantee of the data order.
liubao68 Apr 26, 2025
40992f4
[HHH-19365]change limit handler
liubao68 Apr 26, 2025
df8ade0
[HHH-19365]Hyperbolic functions
liubao68 Apr 26, 2025
bb1c2c2
[HHH-19365]log10 functions
liubao68 Apr 26, 2025
1ee4444
[HHH-19365]json functions
liubao68 Apr 26, 2025
be0aea6
[HHH-19365]unused skip annotations
liubao68 Apr 26, 2025
95e5bc7
[HHH-19365]unused skip functions
liubao68 Apr 26, 2025
fbd8015
[HHH-19365]unused skip functions
liubao68 Apr 26, 2025
320e453
HHH-19365 - add author
SweetWuXiaoMei Apr 27, 2025
fe689d6
HHH-19365 - delete some skip gaussdialect case
SweetWuXiaoMei Apr 27, 2025
c22008e
HHH-19365 - format code
SweetWuXiaoMei Apr 27, 2025
481279c
HHH-19365 - format code
SweetWuXiaoMei Apr 27, 2025
a1be339
HHH-19365 - format code
SweetWuXiaoMei Apr 27, 2025
0749432
[HHH-19365]optimize transaction test skip and remove not used code
liubao68 Apr 27, 2025
36361cd
HHH-19365 - restore code
SweetWuXiaoMei Apr 27, 2025
cc834ac
[HHH-19365]date type operation
liubao68 Apr 27, 2025
f77746d
[HHH-19365]like default escape adapt
liubao68 Apr 28, 2025
72dc941
[HHH-19365]identity column support
liubao68 Apr 28, 2025
53c9e24
[HHH-19365]integer division test
liubao68 Apr 28, 2025
4226d2e
[HHH-19365]on duplicate key update do nothing
liubao68 Apr 28, 2025
b0e0484
HHH-19365 - support identity and containsExactlyInAnyOrder
SweetWuXiaoMei Apr 28, 2025
a56f602
[HHH-19365]fix comments and remove unused skip
liubao68 Apr 28, 2025
3380caf
HHH-19365 - delete unused skip
SweetWuXiaoMei Apr 28, 2025
4df7c63
HHH-19365 - delete LessThanPredicate.java
SweetWuXiaoMei Apr 28, 2025
1f85512
HHH-19365 - canonical name
SweetWuXiaoMei Apr 28, 2025
14996ce
[HHH-19365]fix indention (#29)
liubao68 Apr 28, 2025
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
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ jobs:
- rdbms: mysql
- rdbms: mariadb
- rdbms: postgresql
- rdbms: gaussdb
- rdbms: edb
- rdbms: oracle
- rdbms: db2
Expand Down
2 changes: 2 additions & 0 deletions ci/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ elif [ "$RDBMS" == "mariadb" ] || [ "$RDBMS" == "mariadb_10_4" ]; then
goal="-Pdb=mariadb_ci"
elif [ "$RDBMS" == "postgresql" ] || [ "$RDBMS" == "postgresql_13" ]; then
goal="-Pdb=pgsql_ci"
elif [ "$RDBMS" == "gaussdb" ]; then
goal="-Pdb=gaussdb -DdbHost=localhost:8000"
elif [ "$RDBMS" == "edb" ] || [ "$RDBMS" == "edb_13" ]; then
goal="-Pdb=edb_ci -DdbHost=localhost:5444"
elif [ "$RDBMS" == "oracle" ]; then
Expand Down
2 changes: 2 additions & 0 deletions ci/database-start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ elif [ "$RDBMS" == 'mariadb' ]; then
bash $DIR/../docker_db.sh mariadb
elif [ "$RDBMS" == 'postgresql' ]; then
bash $DIR/../docker_db.sh postgresql
elif [ "$RDBMS" == 'gaussdb' ]; then
bash $DIR/../docker_db.sh gaussdb
elif [ "$RDBMS" == 'edb' ]; then
bash $DIR/../docker_db.sh edb
elif [ "$RDBMS" == 'db2' ]; then
Expand Down
42 changes: 42 additions & 0 deletions docker_db.sh
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,47 @@ postgresql_17() {
$CONTAINER_CLI exec postgres bash -c '/usr/share/postgresql-common/pgdg/apt.postgresql.org.sh -y && apt install -y postgresql-17-pgvector && psql -U hibernate_orm_test -d hibernate_orm_test -c "create extension vector;"'
}

gaussdb() {
$CONTAINER_CLI rm -f opengauss || true

# config param
CONTAINER_NAME=opengauss
IMAGE=opengauss/opengauss:7.0.0-RC1
PORT=8000
DB_USER=hibernate_orm_test
DB_PASSWORD=Hibernate_orm_test@1234
DB_NAME=hibernate_orm_test
PSQL_IMAGE=postgres:14

echo "start OpenGauss container..."
$CONTAINER_CLI run --name ${CONTAINER_NAME} \
--privileged \
-e GS_PASSWORD=${DB_PASSWORD} \
-e GS_NODENAME=opengauss \
-e GS_PORT=${PORT} \
-e GS_CGROUP_DISABLE=YES \
-p ${PORT}:8000 \
-d ${IMAGE}

echo "wait OpenGauss starting..."
sleep 20

echo " Initialize the database using the PostgreSQL client container..."

$CONTAINER_CLI run --rm --network=host ${PSQL_IMAGE} \
bash -c "
PGPASSWORD='${DB_PASSWORD}' psql -h localhost -p ${PORT} -U gaussdb -d postgres -c \"CREATE USER ${DB_USER} WITH PASSWORD '${DB_PASSWORD}';\" &&
PGPASSWORD='${DB_PASSWORD}' psql -h localhost -p ${PORT} -U gaussdb -d postgres -c \"CREATE DATABASE ${DB_NAME} OWNER ${DB_USER};\" &&
PGPASSWORD='${DB_PASSWORD}' psql -h localhost -p ${PORT} -U gaussdb -d ${DB_NAME} -c \"CREATE SCHEMA test AUTHORIZATION ${DB_USER};\"
"

echo "Initialization completed"
echo "connection information"
echo " Host: localhost"
echo " Port: ${PORT}"
echo " Database: ${DB_NAME}"
}

edb() {
edb_17
}
Expand Down Expand Up @@ -1089,6 +1130,7 @@ if [ -z ${1} ]; then
echo -e "\toracle"
echo -e "\toracle_23"
echo -e "\toracle_21"
echo -e "\tgaussdb"
echo -e "\tpostgresql"
echo -e "\tpostgresql_17"
echo -e "\tpostgresql_16"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

import org.hibernate.community.dialect.AltibaseDialect;
import org.hibernate.community.dialect.TiDBDialect;
import org.hibernate.dialect.GaussDBDialect;
import org.hibernate.engine.jdbc.connections.spi.ConnectionProvider;
import org.hibernate.agroal.internal.AgroalConnectionProvider;

Expand All @@ -17,6 +18,7 @@
*/
@SkipForDialect(value = TiDBDialect.class, comment = "Doesn't support SERIALIZABLE isolation")
@SkipForDialect(value = AltibaseDialect.class, comment = "Altibase cannot change isolation level in autocommit mode")
@SkipForDialect(value = GaussDBDialect.class, comment = "GaussDB query serialization level of SERIALIZABLE has some problem")
public class AgroalTransactionIsolationConfigTest extends BaseTransactionIsolationConfigTest {
@Override
protected ConnectionProvider getConnectionProviderUnderTest() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import org.hibernate.boot.registry.StandardServiceRegistryBuilder;
import org.hibernate.c3p0.internal.C3P0ConnectionProvider;
import org.hibernate.community.dialect.AltibaseDialect;
import org.hibernate.dialect.GaussDBDialect;
import org.hibernate.dialect.SybaseASEDialect;
import org.hibernate.community.dialect.TiDBDialect;
import org.hibernate.engine.jdbc.connections.spi.ConnectionProvider;
Expand All @@ -23,6 +24,7 @@
@SkipForDialect(value = TiDBDialect.class, comment = "Doesn't support SERIALIZABLE isolation")
@SkipForDialect(value = AltibaseDialect.class, comment = "Altibase cannot change isolation level in autocommit mode")
@SkipForDialect(value = SybaseASEDialect.class, comment = "JtdsConnection.isValid not implemented")
@SkipForDialect(value = GaussDBDialect.class, comment = "GaussDB query serialization level of SERIALIZABLE has some problem")
public class C3p0TransactionIsolationConfigTest extends BaseTransactionIsolationConfigTest {
private StandardServiceRegistry ssr;

Expand Down
Loading