influxdata / influxdata/influxdb
Empty prefix alias for wildcards aggregate functions
- Dominant language
- Rust
- Stars
- 31.7k
- Forks
- 3.7k
- Avg merge
- 13h 37m
- Merged PRs (30d)
- 8
Description
Moving and downsampling data between databases or retention policies should allow us to maintain the field names.
I tried
```
SELECT last(*) AS ""
INTO "mfcf_vmware"."autogen".:measurement
FROM /^vmware_.*/
WHERE time >= '2016-01-01T00:00:00Z'
GROUP BY time(30m), "host"
```
but sadly because the prefix key is empty it fallbacks to "last_" in this case.
https://github.com/influxdata/influxdb/pull/7009
@jsternberg would adding this be simple?
@gunnaraasen should something different be done so it uses backreferences?
Contributor guide
Research direction
Start by reading the discussion and linked pull request #7009, then reproduce the shown SELECT last(*) query against wildcard measurements. Determine how an empty prefix is handled for wildcard aggregate aliases; done means the query preserves the original field names instead of falling back to names beginning with "last_".
Written by the indexing model from the issue text.
Assessment
- Domain
- databases
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100