-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
language: Added approximate number literals (#185)
This turned out to be a much more involved change that I expected. It started by adding syntax support for scientific notation (i.e. 32e5) but ended up overhauling how numbers work in vsql, and solving some major current and future problems. All literals in scientific notation are considered `DOUBLE PRECISION`, that part is pretty straightforward. Furthermore, all approximate numbers are always formatted in scientific notation, even if smaller numbers are given a "e0" suffix. Since this means that exact and approximate numbers now have a different form we can take a lot of hacky and unreliable guess work out of literals and implicit casting. `REAL` and `DOUBLE PRECISION` no longer need to be treated as supertypes for all other exact types. Which in retrospect makes no sense. The docs make much more sense on how numbers work and this makes the larger change of DECIMAL and NUMERIC types coming later much easier to explain and implement.
- Loading branch information
1 parent
1a22339
commit 2a1989a
Showing
31 changed files
with
691 additions
and
446 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.