evinism / evinism/mistql

Error message with dot access can be very confusing.

Open
#166 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
393
Forks
20
PR merge metrics
No merged PRs in 30d

Description

If you index a string using dot access, you get a very confusing error message stating that we expected a number, but got a string. This does not lead to a good debugging experience. Comes from [this SO post.](https://stackoverflow.com/questions/72584594/my-first-hello-word-program-in-mistql-is-throwing-exception-expected-runtimevalu) This is also likely an issue with all invalid dot accesses in MistQL.

## Example

Data: `"{\"foo\": \"bar\"}"`

Query: `@.foo`

Expected: Error stating that dot access on strings is not allowed.

Actual: MistQLTypeError: Expected RuntimeValueType.Number, got RuntimeValueType.String

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.