influxdata / influxdata/influxdb-java
SelectionQueryImpl should support buildQueryString
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 1.2k
- Forks
- 469
- PR merge metrics
- No merged PRs in 30d
Description
If I want to create a query using dynamic selections, for example say from UI we received a request for aggregate function
List functions; which as max,min for columns "test1". This list of functions can be dynamic. Now I cannot use query build to build a query dynamically. SelectionQueryImpl can be used but this cannot generate a string, Is there a work around? or is there a way that i can build select query dynamically when using aggregate functions?
SelectionQueryImpl selection= select();
selection.column(searchFilter.getName().get(0)).function(searchFilter.getFunctions().get(0).toString());
selection.function("mean", searchFilter.getName().get(0));
selection.function("min", searchFilter.getName().get(0));
selection.from(bucket,(ObjectUtils.isNotEmpty(searchFilter.getType()))? searchFilter.getType().stream().toArray(String[]::new): new String[0]);
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating SelectionQueryImpl and the existing query-building APIs it uses. Determine the expected query-string output for dynamic aggregate functions, then verify that SelectionQueryImpl can produce it with tests covering the shown selection pattern.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- api
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100