metricsql
metricsql copied to clipboard
i is not equal to j
https://github.com/VictoriaMetrics/metricsql/blob/a271ee257023dd183d444ec7e1b363c64a3db0e3/lexer.go#L641
if s[i] == '.' {
j := i
i++
for i < len(s) && isDecimalChar(s[i]) {
i++
}
if i == j || i == len(s) {
return -1
}
}
I'm learning MetricsQL and I've noticed that here 'i' might not be equal to 'j' because 'i' undergoes an addition operation. Should it be j+1 here?