jackwener commented on code in PR #12511:
URL: https://github.com/apache/doris/pull/12511#discussion_r969165351
##########
fe/fe-core/src/main/java/org/apache/doris/nereids/trees/expressions/literal/BooleanLiteral.java:
##########
@@ -32,11 +32,27 @@ public class BooleanLiteral extends Literal {
private final boolean value;
- public BooleanLiteral(boolean value) {
+ private BooleanLiteral(boolean value) {
super(BooleanType.INSTANCE);
this.value = value;
}
+ public static BooleanLiteral of(boolean value) {
+ if (value) {
+ return TRUE;
+ } else {
+ return FALSE;
+ }
+ }
+
+ public static BooleanLiteral of(Boolean value) {
Review Comment:
Literal also has `of` function, if this don't exist, `Literal of` will call
itself which is dead loop.
--
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]