kgyrtkirk commented on code in PR #17084:
URL: https://github.com/apache/druid/pull/17084#discussion_r1762846718
##########
processing/src/main/java/org/apache/druid/segment/VirtualColumn.java:
##########
@@ -336,4 +336,12 @@ default ColumnIndexSupplier getIndexSupplier(
{
return NoIndexesColumnIndexSupplier.getInstance();
}
+
+ /**
+ * Check if a virtual column is the same as some other virtual column,
ignoring output name.
+ */
+ default boolean isEquivalent(VirtualColumn other)
+ {
+ return this.equals(other);
+ }
Review Comment:
leaving it like this could still have adverse effects as if a descendant
doesn't override equals it will fall back to `Object.equals`
I think it would be better to annotate `VirtualColumn` with
`@SubclassesMustOverrideEqualsAndHashCode` and fix the issues.
--
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]