Comments (2)
This is working as designed but I can see how it would be good for the design to change.
All numeric literals regardless of format (even hex) are inferred as <numeric>
.
This placeholder within the type hierarchy allows them to be unified with any other numeric type. The way it currently works, if we inferred 0
as <integral>
then it wouldn't unify with any types under the <fractional>
branch of the hierarchy, so e.g. select SomeFloatingPointColumn + 1
wouldn't work.
When a type comes out of inference as one of those placeholders like <numeric>
or <fractional>
or whatever, instead of a concrete type like int64
, we just default to the most general type. In the case of <numeric>
decimal is considered to be the most general.
Maybe we could track a little extra information in the type so that literals like 0 can still be treated as "any ol' number" for unification purposes, but if they get through all of typechecking without further info, could get a default type assigned based on the characteristics of the literal (fits in int32? has decimal point? hex?).
from rezoom.sql.
If it's working as designed, then maybe all that's needed is to clarify the linked documentation, adding a bullet point to the bottom of the page to indicate that all numbers are inferred as decimal unless explicitly cast.
from rezoom.sql.
Related Issues (20)
- Bug: Batching results over large queries HOT 2
- Plan execution with transaction HOT 2
- Error using LIMIT with a parameter HOT 2
- Duplicate columns in Insert statements do not show as error HOT 2
- Can you call stored procedures? HOT 1
- Error when following tutorial HOT 1
- Type provider doesn't work with FParsec-Pipes 1.0.0 HOT 1
- Generated code doesn't work with LicenseToCIL 1.0.0 HOT 1
- Error in dynamicCommand HOT 1
- Increase Command Timeout HOT 1
- Path to 1.0.1 HOT 4
- issue using nuget package from FSI HOT 3
- Data type/column type: array HOT 3
- Less horrible way to run migrations with dynamic connection string? HOT 1
- Support for Geography types
- Create / Drop Schema support HOT 1
- Visual Studio gives errors when used with the .NET Standard branch HOT 9
- Any hope for custom types/serializers?
- Dacpac support info HOT 1
- fsprojects onboarding HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rezoom.sql.