Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

[Enhancement] LogicExpression three-valued truth table and short-circuit behavior lack direct tests

Open Beginner friendly
#11,339 2 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

@chennaji9 is already working on this.

Since Oct 9, 2026.

  • #11348 by @chennaji9 — open

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
78/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Active
Tech stack
java
Domain
testing

Research direction

Start with LogicExpression.java in filter/src/main/java/org/apache/rocketmq/filter/expression/ to see how AND and OR evaluate their operands and where UNKNOWN (null) is handled, then read the existing ExpressionTest for how SQL92 expressions are built and evaluated. Add a new LogicExpressionTest that asserts all nine AND/OR operand combinations and that matches() treats UNKNOWN as false, plus short-circuit checks that prove the right operand is not evaluated when the left decides the result. Run the filter module's tests; done when the truth table and both short-circuit cases pass.

Written by the indexing model from the issue text.

Description

Description

LogicExpression (filter/src/main/java/org/apache/rocketmq/filter/expression/LogicExpression.java) implements the SQL92 three-valued logic used by property (SQL92) subscriptions: operands evaluate to TRUE, FALSE, or null (UNKNOWN), AND/OR short-circuit when the left operand already decides the result, and UNKNOWN propagates (null AND TRUE = UNKNOWN, null OR FALSE = UNKNOWN), with matches() treating UNKNOWN as no-match.

ExpressionTest covers composite expressions end to end, but nothing pins the truth table itself or the short-circuit: the full 3x3 operand matrix is not asserted anywhere, and no test would notice if the short-circuit disappeared (left FALSE under AND still evaluating the right operand) or if UNKNOWN propagation was replaced by a plain false.

Since brokers compile every SQL92 subscription through these expressions, the matching semantics deserve direct regression coverage.

Expected behavior

A dedicated LogicExpressionTest covering the 3x3 truth table for AND/OR, the UNKNOWN-matches-false rule, and short-circuit proofs (right operand provably unevaluated when the left decides).

Dominant language
Java
Stars
22.6k
Forks
12k
Avg merge
6d 16h
Merged PRs (30d)
18

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from apache/rocketmq

All issues in apache/rocketmq

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.