FrankChen021 commented on code in PR #5281:
URL: https://github.com/apache/calcite/pull/5281#discussion_r4114131523


##########
core/src/main/java/org/apache/calcite/sql/type/BasicSqlType.java:
##########
@@ -156,6 +157,9 @@ public BasicSqlType createWithNullability(boolean nullable) 
{
   BasicSqlType createWithCharsetAndCollation(Charset charset,
       SqlCollation collation) {
     checkArgument(SqlTypeUtil.inCharFamily(this));
+    if (collation == this.collation && Objects.equals(charset, getCharset())) {

Review Comment:
   for the `Objects.equals` comment here, that's true the charset is not null, 
however, `getCharset` is declared as `Nullable`, the CheckerFramework reports 
error for the change you propose. So `Objects.equals` would be the most likely 
concise statement here.



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

Reply via email to