You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by GitBox <gi...@apache.org> on 2020/08/07 17:38:00 UTC

[GitHub] [beam] amaliujia commented on a change in pull request #12500: Fix precommit errors

amaliujia commented on a change in pull request #12500:
URL: https://github.com/apache/beam/pull/12500#discussion_r467178463



##########
File path: sdks/java/extensions/sql/src/main/java/org/apache/beam/sdk/extensions/sql/meta/provider/bigquery/BeamSqlUnparseContext.java
##########
@@ -110,6 +111,26 @@ public SqlNode toSql(RexProgram program, RexNode rex) {
     public void unparse(SqlWriter writer, int leftPrec, int rightPrec) {
       writer.literal("DATETIME '" + timestampString.toString() + "'");
     }
+
+    @Override
+    public boolean equals(Object o) {
+      if (this == o) {
+        return true;
+      }
+      if (o == null || getClass() != o.getClass()) {
+        return false;
+      }
+      if (!super.equals(o)) {

Review comment:
       This check is a bit confusing. Why use super's equal to check an object of current class?
   
   Something like `super.equals((super) o)` makes more sense (just pseudo code)




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org