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
91e62d1
[HHH-19365]merge works done in https://github.com/SweetWuXiaoMei/hibe…
liubao68 Apr 25, 2025
00e1c32
[HHH-19365] update default port
liubao68 Apr 25, 2025
99d9348
HHH-19365 - Solve gaussdb function support
SweetWuXiaoMei Apr 25, 2025
61b46ac
[HHH-19365]!supportsIdentityColumns
liubao68 Apr 25, 2025
707df9c
HHH-19365 - ignore gauss identity
SweetWuXiaoMei Apr 25, 2025
e374293
[HHH-19365]!appendDatetimeFormat
liubao68 Apr 25, 2025
e4835dc
[HHH-19365]!xml-functions
liubao68 Apr 25, 2025
69efee4
[HHH-19365]add no guarantee of the data order.
liubao68 Apr 26, 2025
beb3430
[HHH-19365]change limit handler
liubao68 Apr 26, 2025
7df0862
[HHH-19365]Hyperbolic functions
liubao68 Apr 26, 2025
fe1ffeb
[HHH-19365]log10 functions
liubao68 Apr 26, 2025
9220385
[HHH-19365]json functions
liubao68 Apr 26, 2025
f37da37
[HHH-19365]unused skip annotations
liubao68 Apr 26, 2025
65d1651
[HHH-19365]unused skip functions
liubao68 Apr 26, 2025
f99f64d
[HHH-19365]unused skip functions
liubao68 Apr 26, 2025
cad776f
HHH-19365 - add author
SweetWuXiaoMei Apr 27, 2025
e811b76
HHH-19365 - delete some skip gaussdialect case
SweetWuXiaoMei Apr 27, 2025
1074b17
HHH-19365 - format code
SweetWuXiaoMei Apr 27, 2025
30891e2
HHH-19365 - format code
SweetWuXiaoMei Apr 27, 2025
2aaf7ff
HHH-19365 - format code
SweetWuXiaoMei Apr 27, 2025
f1be602
[HHH-19365]optimize transaction test skip and remove not used code
liubao68 Apr 27, 2025
f6b8ca9
HHH-19365 - restore code
SweetWuXiaoMei Apr 27, 2025
e166acc
[HHH-19365]date type operation
liubao68 Apr 27, 2025
3e7585a
[HHH-19365]like default escape adapt
liubao68 Apr 28, 2025
a823e3f
[HHH-19365]identity column support
liubao68 Apr 28, 2025
d689617
[HHH-19365]integer division test
liubao68 Apr 28, 2025
12d09d3
[HHH-19365]on duplicate key update do nothing
liubao68 Apr 28, 2025
3920d37
HHH-19365 - support identity and containsExactlyInAnyOrder
SweetWuXiaoMei Apr 28, 2025
761b7af
[HHH-19365]fix comments and remove unused skip
liubao68 Apr 28, 2025
78fbe5e
HHH-19365 - delete unused skip
SweetWuXiaoMei Apr 28, 2025
92bee75
HHH-19365 - delete LessThanPredicate.java
SweetWuXiaoMei Apr 28, 2025
c94ad93
HHH-19365 - canonical name
SweetWuXiaoMei Apr 28, 2025
280aeca
[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