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
f4c053b
[HHH-19365]merge works done in https://github.com/SweetWuXiaoMei/hibe…
liubao68 Apr 25, 2025
3d7b9ee
[HHH-19365] update default port
liubao68 Apr 25, 2025
5b46988
HHH-19365 - Solve gaussdb function support
SweetWuXiaoMei Apr 25, 2025
ff69012
[HHH-19365]!supportsIdentityColumns
liubao68 Apr 25, 2025
72c4fc4
HHH-19365 - ignore gauss identity
SweetWuXiaoMei Apr 25, 2025
de5d2a4
[HHH-19365]!appendDatetimeFormat
liubao68 Apr 25, 2025
e5d638b
[HHH-19365]!xml-functions
liubao68 Apr 25, 2025
aaf40d3
[HHH-19365]add no guarantee of the data order.
liubao68 Apr 26, 2025
d9ffce0
[HHH-19365]change limit handler
liubao68 Apr 26, 2025
4dada79
[HHH-19365]Hyperbolic functions
liubao68 Apr 26, 2025
c5910bf
[HHH-19365]log10 functions
liubao68 Apr 26, 2025
24c9f5a
[HHH-19365]json functions
liubao68 Apr 26, 2025
7546d57
[HHH-19365]unused skip annotations
liubao68 Apr 26, 2025
cc2d5b3
[HHH-19365]unused skip functions
liubao68 Apr 26, 2025
d65aa1c
[HHH-19365]unused skip functions
liubao68 Apr 26, 2025
f1bbc09
HHH-19365 - add author
SweetWuXiaoMei Apr 27, 2025
792c5d1
HHH-19365 - delete some skip gaussdialect case
SweetWuXiaoMei Apr 27, 2025
1503224
HHH-19365 - format code
SweetWuXiaoMei Apr 27, 2025
9a4ad90
HHH-19365 - format code
SweetWuXiaoMei Apr 27, 2025
3b0ce92
HHH-19365 - format code
SweetWuXiaoMei Apr 27, 2025
9c2db17
[HHH-19365]optimize transaction test skip and remove not used code
liubao68 Apr 27, 2025
ff2a03e
HHH-19365 - restore code
SweetWuXiaoMei Apr 27, 2025
bfa559c
[HHH-19365]date type operation
liubao68 Apr 27, 2025
777340b
[HHH-19365]like default escape adapt
liubao68 Apr 28, 2025
7fe05d6
[HHH-19365]identity column support
liubao68 Apr 28, 2025
d9afec7
[HHH-19365]integer division test
liubao68 Apr 28, 2025
e6cfab1
[HHH-19365]on duplicate key update do nothing
liubao68 Apr 28, 2025
3148577
HHH-19365 - support identity and containsExactlyInAnyOrder
SweetWuXiaoMei Apr 28, 2025
f4cbf2b
[HHH-19365]fix comments and remove unused skip
liubao68 Apr 28, 2025
89936d9
HHH-19365 - delete unused skip
SweetWuXiaoMei Apr 28, 2025
8bea215
HHH-19365 - delete LessThanPredicate.java
SweetWuXiaoMei Apr 28, 2025
dc49314
HHH-19365 - canonical name
SweetWuXiaoMei Apr 28, 2025
b510ca9
[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