compassql icon indicating copy to clipboard operation
compassql copied to clipboard

Support calculating schema and stats for inline data.

Open kanitw opened this issue 8 years ago • 1 comments

Note: #86 or this one should be implemented soon to support broader range of test.

kanitw avatar Jul 05 '16 18:07 kanitw

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 the specQuery 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.)

kanitw avatar Jul 13 '16 06:07 kanitw