You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[ZEPPELIN-6264] Refactor InfluxDBInterpreter for improved readability and maintainability
### What is this PR for?
This PR refactors the `InfluxDBInterpreter.class` to improve code readability, maintainability, and adherence to modern Java practices, without altering its runtime behavior or core logic.
- Key changes include:
- Renamed getInfluxDBClient() to better reflect its purpose (e.g., getQueryApi()), improving semantic clarity.
- Removed unnecessary code
- (e.g., InterpreterContext) from methods where they are unused.
- Throwing exceptions from methods like open(), close(), cancel(), getFormType(), and getProgress() where exceptions are not thrown.
- Extracted long nested logic blocks in `internalInterpret()` into smaller, well-named private methods.
- Replaced imperative loops with Stream operations for collection processing.
These changes aim to make the codebase more modular, clean by reducing boilerplate code, and approachable for future contributors and reviewers.
### What type of PR is it?
Refactoring
### Todos
* [ ] - Task
### What is the Jira issue?
* [ZEPPELIN-6264](https://issues.apache.org/jira/browse/ZEPPELIN-6264)
### How should this be tested?
* No functional changes; existing tests should pass as-is.
### Screenshots (if appropriate)
### Questions:
* Does the license files need to update? no
* Is there breaking changes for older versions? no
* Does this needs documentation? no
Closes#5005 from eunhwa99/ZEPPELIN-6264.
Signed-off-by: Philipp Dallig <philipp.dallig@gmail.com>
0 commit comments