diff --git a/catalogs/catalog-jdbc-common/src/main/java/com/datastrato/gravitino/catalog/jdbc/operation/JdbcDatabaseOperations.java b/catalogs/catalog-jdbc-common/src/main/java/com/datastrato/gravitino/catalog/jdbc/operation/JdbcDatabaseOperations.java index c47b778639a..6c0be7351c3 100644 --- a/catalogs/catalog-jdbc-common/src/main/java/com/datastrato/gravitino/catalog/jdbc/operation/JdbcDatabaseOperations.java +++ b/catalogs/catalog-jdbc-common/src/main/java/com/datastrato/gravitino/catalog/jdbc/operation/JdbcDatabaseOperations.java @@ -101,7 +101,7 @@ protected Connection getConnection() throws SQLException { * Check whether it is a system database. * * @param dbName The name of the database. - * @return + * @return false for all cases. */ protected boolean isSystemDatabase(String dbName) { return false; diff --git a/catalogs/catalog-lakehouse-iceberg/src/main/java/com/datastrato/gravitino/catalog/lakehouse/iceberg/converter/ConvertUtil.java b/catalogs/catalog-lakehouse-iceberg/src/main/java/com/datastrato/gravitino/catalog/lakehouse/iceberg/converter/ConvertUtil.java index 243cd6c638d..741a413a135 100644 --- a/catalogs/catalog-lakehouse-iceberg/src/main/java/com/datastrato/gravitino/catalog/lakehouse/iceberg/converter/ConvertUtil.java +++ b/catalogs/catalog-lakehouse-iceberg/src/main/java/com/datastrato/gravitino/catalog/lakehouse/iceberg/converter/ConvertUtil.java @@ -44,7 +44,7 @@ public static Type toIcebergType( * Convert the nested type of Iceberg to the type of gravitino. * * @param type Iceberg type of field. - * @return + * @return Gravitino type. */ public static com.datastrato.gravitino.rel.types.Type formIcebergType(Type type) { return TypeUtil.visit(type, new FromIcebergType()); diff --git a/catalogs/catalog-lakehouse-iceberg/src/main/java/com/datastrato/gravitino/catalog/lakehouse/iceberg/converter/FromIcebergPartitionSpec.java b/catalogs/catalog-lakehouse-iceberg/src/main/java/com/datastrato/gravitino/catalog/lakehouse/iceberg/converter/FromIcebergPartitionSpec.java index b42bbda01ba..10d81ff5d18 100644 --- a/catalogs/catalog-lakehouse-iceberg/src/main/java/com/datastrato/gravitino/catalog/lakehouse/iceberg/converter/FromIcebergPartitionSpec.java +++ b/catalogs/catalog-lakehouse-iceberg/src/main/java/com/datastrato/gravitino/catalog/lakehouse/iceberg/converter/FromIcebergPartitionSpec.java @@ -80,7 +80,7 @@ public Transform unknown(int fieldId, String sourceName, int sourceId, String tr * * @param partitionSpec * @param schema - * @return + * @return array of transforms for partition fields. */ @VisibleForTesting public static Transform[] fromPartitionSpec(PartitionSpec partitionSpec, Schema schema) { diff --git a/catalogs/catalog-lakehouse-iceberg/src/main/java/com/datastrato/gravitino/catalog/lakehouse/iceberg/converter/ToIcebergPartitionSpec.java b/catalogs/catalog-lakehouse-iceberg/src/main/java/com/datastrato/gravitino/catalog/lakehouse/iceberg/converter/ToIcebergPartitionSpec.java index da53db3f325..8c0e56f99c8 100644 --- a/catalogs/catalog-lakehouse-iceberg/src/main/java/com/datastrato/gravitino/catalog/lakehouse/iceberg/converter/ToIcebergPartitionSpec.java +++ b/catalogs/catalog-lakehouse-iceberg/src/main/java/com/datastrato/gravitino/catalog/lakehouse/iceberg/converter/ToIcebergPartitionSpec.java @@ -21,7 +21,7 @@ public class ToIcebergPartitionSpec { * Convert iceberg table to iceberg partition spec through gravitino. * * @param icebergTable the iceberg table. - * @return + * @return a PartitionSpec */ @VisibleForTesting public static PartitionSpec toPartitionSpec(IcebergTable icebergTable) { diff --git a/catalogs/catalog-lakehouse-iceberg/src/main/java/com/datastrato/gravitino/catalog/lakehouse/iceberg/ops/IcebergTableOpsHelper.java b/catalogs/catalog-lakehouse-iceberg/src/main/java/com/datastrato/gravitino/catalog/lakehouse/iceberg/ops/IcebergTableOpsHelper.java index ca05aec8c74..9e678f67a27 100644 --- a/catalogs/catalog-lakehouse-iceberg/src/main/java/com/datastrato/gravitino/catalog/lakehouse/iceberg/ops/IcebergTableOpsHelper.java +++ b/catalogs/catalog-lakehouse-iceberg/src/main/java/com/datastrato/gravitino/catalog/lakehouse/iceberg/ops/IcebergTableOpsHelper.java @@ -312,7 +312,7 @@ public IcebergTableChange buildIcebergTableChanges( * Therefore, we need to handle this difference here. * * @param namespace GravitinoNamespace - * @return + * @return Iceberg Namespace */ public static Namespace getIcebergNamespace(com.datastrato.gravitino.Namespace namespace) { return getIcebergNamespace(namespace.level(namespace.length() - 1)); @@ -328,7 +328,7 @@ public static Namespace getIcebergNamespace(String... level) { * * @param namespace * @param name - * @return + * @return Iceberg TableIdentifier */ public static TableIdentifier buildIcebergTableIdentifier( com.datastrato.gravitino.Namespace namespace, String name) { @@ -341,7 +341,7 @@ public static TableIdentifier buildIcebergTableIdentifier( * `{namespace}.{table}`, so we need to perform truncation here. * * @param nameIdentifier GravitinoNameIdentifier - * @return + * @return Iceberg TableIdentifier */ public static TableIdentifier buildIcebergTableIdentifier(NameIdentifier nameIdentifier) { String[] levels = nameIdentifier.namespace().levels(); diff --git a/common/src/main/java/com/datastrato/gravitino/json/JsonUtils.java b/common/src/main/java/com/datastrato/gravitino/json/JsonUtils.java index 9489438bdb2..d81e345ba6f 100644 --- a/common/src/main/java/com/datastrato/gravitino/json/JsonUtils.java +++ b/common/src/main/java/com/datastrato/gravitino/json/JsonUtils.java @@ -170,7 +170,7 @@ abstract static class JsonArrayIterator implements Iterator { /** * Judge whether it has more elements in the JSON array. * - * @return + * @return true if the iteration has more elements. */ @Override public boolean hasNext() { @@ -180,7 +180,7 @@ public boolean hasNext() { /** * Get a next element from the JSON array. * - * @return + * @return the next element in the iteration. */ @Override public T next() { diff --git a/integration-test/src/test/java/com/datastrato/gravitino/integration/test/trino/TrinoQueryIT.java b/integration-test/src/test/java/com/datastrato/gravitino/integration/test/trino/TrinoQueryIT.java index 06c3b685336..8a41a84bef8 100644 --- a/integration-test/src/test/java/com/datastrato/gravitino/integration/test/trino/TrinoQueryIT.java +++ b/integration-test/src/test/java/com/datastrato/gravitino/integration/test/trino/TrinoQueryIT.java @@ -239,7 +239,9 @@ void executeSqlFileWithCheckResult( * * @param expectResult * @param result - * @return + * @return false if the expected result is empty or the actual result does not match the expected. + * For {@literal } case, return true if the actual result is empty. For {@literal + * } case, replace the placeholder with "^Query \\w+ failed.*: " and do match. */ static boolean match(String expectResult, String result) { if (expectResult.isEmpty()) {