FeatureBaseDB / featurebase

A crazy fast analytical database, built on bitmaps. Perfect for ML applications. Learn more at: http://docs.featurebase.com/. Start a Docker instance: https://hub.docker.com/r/featurebasedb/featurebase
https://www.featurebase.com
Apache License 2.0
2.53k stars 230 forks source link

don't panic on a MIN that isn't a call #2365

Closed seebs closed 1 year ago

seebs commented 1 year ago

parseOperand was assuming that any reference to MIN in a place where an operand was expected was a call, which it should be, but it might not be. parseCallExpression panics if it doesn't find a parenthesis, because it's never supposed to be called when we don't know we have one.

The test for this is in with MinMaxColumnConstraints, even though it's actually a test of MinMaxFunctionCalls, because that's where the other tests involving the special MIN/MAX tokens live.

seebs commented 1 year ago

oh, good catch. i'll fix that too while i'm looking at it.

oh. d'oh. that one's my fault from the trackexistence stuff.

seebs commented 1 year ago

hah. i was just thinking "huh we don't have a test case for max being less than min. well, surely it works." i was wrong.

good catch.

sonarcloud[bot] commented 1 year ago

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication