Copilot commented on code in PR #6954:
URL: https://github.com/apache/hive/pull/6954#discussion_r4524571414


##########
ql/src/test/org/apache/hadoop/hive/ql/io/parquet/read/TestParquetFilterPredicate.java:
##########
@@ -736,4 +740,60 @@ public void testFilterMoreComplexVarCharColumn() throws 
Exception {
         + "or(eq(c, Binary{\"banana\"}), lt(d, Binary{\"cherry\"})))";
     assertEquals(expected, p.toString());
   }
+
+  /** A runtime value (a DynamicValue) that is not available when the reader 
builds its filter. */
+  private static final LiteralDelegate UNRESOLVED = new LiteralDelegate() {
+    @Override
+    public Object getLiteral() {
+      throw new NoDynamicValuesException("not available");
+    }
+
+    @Override
+    public String getId() {
+      return "unresolved";
+    }
+
+    @Override
+    public void setConf(Configuration conf) {
+    }
+
+    @Override
+    public Configuration getConf() {
+      return null;
+    }
+  };

Review Comment:
   `setConf` and `getConf` are implemented as no-op / returning null. If 
`LiteralDelegate` is expected to behave as a Hadoop `Configurable`, returning 
null can be error-prone (e.g., unexpected NPEs if future code starts calling 
`getConf()` on delegates used in tests). Consider storing the `Configuration` 
in a field and returning it, or explicitly returning a new 
`Configuration(false)` if you want to keep it isolated.



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

Reply via email to