vlsi commented on a change in pull request #2171:
URL: https://github.com/apache/calcite/pull/2171#discussion_r495731827



##########
File path: core/src/main/java/org/apache/calcite/sql/type/SqlTypeUtil.java
##########
@@ -123,21 +126,13 @@ public static boolean isCharTypeComparable(
       SqlCallBinding binding,
       List<SqlNode> operands,
       boolean throwOnFailure) {
-    final SqlValidator validator = binding.getValidator();
-    final SqlValidatorScope scope = binding.getScope();
-    assert operands != null;
-    assert operands.size() >= 2;
+    requireNonNull(operands, "operands");
+    assert operands.size() >= 2

Review comment:
       The code was there long ago (I guess before `Objects.requireNonNull` 
existed), so it was using asserts.
   However,
   1) Significant rework of `assert` is out of the scope of this PR
   2) `assert operands.size() >= 2` does not seem to have a corresponding Java 
API.




----------------------------------------------------------------
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:
[email protected]


Reply via email to