zhangbutao commented on code in PR #4510:
URL: https://github.com/apache/hive/pull/4510#discussion_r1282725068
##########
ql/src/java/org/apache/hadoop/hive/ql/parse/AlterTableSnapshotRefSpec.java:
##########
@@ -89,9 +89,32 @@ public CreateSnapshotRefSpec(String refName, Long
snapShotId, Long asOfTime, Lon
}
public String toString() {
- return MoreObjects.toStringHelper(this).add("branchName",
refName).add("snapshotId", snapshotId)
+ return MoreObjects.toStringHelper(this).add("refName",
refName).add("snapshotId", snapshotId)
.add("asOfTime", asOfTime).add("maxRefAgeMs",
maxRefAgeMs).add("minSnapshotsToKeep", minSnapshotsToKeep)
.add("maxSnapshotAgeMs",
maxSnapshotAgeMs).omitNullValues().toString();
}
}
+ public static class DropSnapshotRefSpec {
+
+ private String refName;
+ private boolean ifExists;
+
+ public String getRefName() {
+ return refName;
+ }
+
+ public boolean getIfExists() {
+ return ifExists;
+ }
+
+ public DropSnapshotRefSpec(String refName, Boolean ifExists) {
+ this.refName = refName;
+ this.ifExists = ifExists;
+ }
+
+ public String toString() {
+ return MoreObjects.toStringHelper(this).add("refName",
refName).add("ifExists", ifExists).omitNullValues()
Review Comment:
Removed the `omitNullValues `. I just want to omit `null `when `explain
alter table drop snapshotref`, but here the `refName `& `ifExists` will never
be null, so `omitNullValues ` is useless.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]