apache / apache/iotdb

Replace this "switch" statement by "if" statements to increase readability.

Open
#7,016 5 comments 0 reactions 0 assignees View on GitHub
Easy-Fixed
Dominant language
Java
Stars
6.4k
Forks
1.2k
Avg merge
1d 23h
Merged PRs (30d)
115

Description

Code Path:server/src/main/java/org/apache/iotdb/db/mpp/plan/analyze/ExpressionUtils.java
1660631579087
switch statements are useful when there are many different cases depending on the value of the same expression. For just one or two cases however, the code will be more readable with if statements.

Contributor guide

Open the contributing guide

Research direction

Open server/src/main/java/org/apache/iotdb/db/mpp/plan/analyze/ExpressionUtils.java and inspect the switch statement identified by the issue. Replace it with equivalent if statements for the existing cases, then verify that the file still compiles and the relevant checks pass.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
databases
Issue type
Refactor
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.