compassql
compassql copied to clipboard
Support calculating schema and stats for inline data.
Note: #86 or this one should be implemented soon to support broader range of test.
Basically, a SpecQuery
is provided as spec
property of a Query
.
Data can be provided inline via spec.data.values
.
If the data is provided inline,
- [x] make schema optional in
query()
- [x] if data is provided inline, make a
schema
from the inline data. - [ ] If schema is not provided
- [x] We can check during
SpecQueryModel.build()
whether thespecQuery
contains an enum spec for field. If not, it's okay. If yes, then we might throw error because we can't enumerate correct field without knowing the schema. - [ ] For constraints that require schema, always check if
schema
is defined, if not, return true. (Because we can't know if the spec violates the constraint, so let it pass. We only prune surely bad things.)
- [x] We can check during