Skip to content

Commit

Permalink
[#2155] fix: add missing @return (#2228)
Browse files Browse the repository at this point in the history
### What changes were proposed in this pull request?

`@return` missing description in:
JdbcDatabaseOperations.java
ConvertUtil.java
FromIcebergPartitionSpec.java
ToIcebergPartitionSpec.java
IcebergTableOpsHelper.java
JsonUtils.java
TrinoQueryIT.java

### Why are the changes needed?

For better document.

Fix: #2155

### Does this PR introduce _any_ user-facing change?

No.

### How was this patch tested?

Make sure there is no missing description for `@return`.

Signed-off-by: PoAn Yang <[email protected]>
  • Loading branch information
FrankYang0529 authored Feb 18, 2024
1 parent c42fb7d commit c9d9f36
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand All @@ -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) {
Expand All @@ -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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ abstract static class JsonArrayIterator<T> implements Iterator<T> {
/**
* Judge whether it has more elements in the JSON array.
*
* @return
* @return true if the iteration has more elements.
*/
@Override
public boolean hasNext() {
Expand All @@ -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() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 <BLANK_LINE>} case, return true if the actual result is empty. For {@literal
* <QUERY_FAILED>} case, replace the placeholder with "^Query \\w+ failed.*: " and do match.
*/
static boolean match(String expectResult, String result) {
if (expectResult.isEmpty()) {
Expand Down

0 comments on commit c9d9f36

Please sign in to comment.