This is an automated email from the ASF dual-hosted git repository.

jackie pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pinot.git


The following commit(s) were added to refs/heads/master by this push:
     new f06d5a80a8 verify FilterContext equals (#12593)
f06d5a80a8 is described below

commit f06d5a80a85c30fb66af850d9a814c4ff3bd569c
Author: sullis <[email protected]>
AuthorDate: Thu Mar 7 12:39:19 2024 -0800

    verify FilterContext equals (#12593)
---
 .../common/request/context/FilterContext.java      |  2 +-
 .../common/request/context/FilterContextTest.java  | 32 ++++++++++++++++++++++
 2 files changed, 33 insertions(+), 1 deletion(-)

diff --git 
a/pinot-common/src/main/java/org/apache/pinot/common/request/context/FilterContext.java
 
b/pinot-common/src/main/java/org/apache/pinot/common/request/context/FilterContext.java
index 3ce48fd06c..0f532797f7 100644
--- 
a/pinot-common/src/main/java/org/apache/pinot/common/request/context/FilterContext.java
+++ 
b/pinot-common/src/main/java/org/apache/pinot/common/request/context/FilterContext.java
@@ -30,7 +30,7 @@ import 
org.apache.pinot.common.request.context.predicate.Predicate;
  * The {@code FilterContext} class encapsulates the information of a filter in 
the query. Both WHERE clause and HAVING
  * clause are modeled as a filter.
  */
-public class FilterContext {
+public final class FilterContext {
   public static final FilterContext CONSTANT_TRUE = new 
FilterContext(Type.CONSTANT, null, null, true);
   public static final FilterContext CONSTANT_FALSE = new 
FilterContext(Type.CONSTANT, null, null, false);
 
diff --git 
a/pinot-common/src/test/java/org/apache/pinot/common/request/context/FilterContextTest.java
 
b/pinot-common/src/test/java/org/apache/pinot/common/request/context/FilterContextTest.java
new file mode 100644
index 0000000000..44285c9b4b
--- /dev/null
+++ 
b/pinot-common/src/test/java/org/apache/pinot/common/request/context/FilterContextTest.java
@@ -0,0 +1,32 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.pinot.common.request.context;
+
+import nl.jqno.equalsverifier.EqualsVerifier;
+import org.testng.annotations.Test;
+
+
+public class FilterContextTest {
+
+  @Test
+  public void equalsVerifier() {
+    EqualsVerifier.forClass(FilterContext.class)
+        .withPrefabValues(FilterContext.class, FilterContext.CONSTANT_TRUE, 
FilterContext.CONSTANT_FALSE).verify();
+  }
+}


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to