XBaith commented on code in PR #3341:
URL: https://github.com/apache/amoro/pull/3341#discussion_r1859723322
##########
amoro-ams/src/main/java/org/apache/amoro/server/persistence/converter/Object2ByteArrayConvert.java:
##########
@@ -31,14 +30,17 @@
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Types;
+import java.util.Locale;
public class Object2ByteArrayConvert<T> implements TypeHandler<T> {
@Override
public void setParameter(PreparedStatement ps, int i, T parameter, JdbcType
jdbcType)
throws SQLException {
+ String dbName =
+
ps.getConnection().getMetaData().getDatabaseProductName().toLowerCase(Locale.ENGLISH);
if (parameter == null) {
- if
(SqlSessionFactoryProvider.getDbType().equals(AmoroManagementConf.DB_TYPE_POSTGRES))
{
+ if (dbName.startsWith(AmoroManagementConf.DB_TYPE_POSTGRES)) {
Review Comment:
the lower case `postgresql` is also not equails to `postgres`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]