sql: support missing JSON numeric scalar casts #41333
Labels
C-enhancement
Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)
good first issue
It should be possible to cast JSON scalars to their corresponding SQL types, but it currently is not possible.
We should support:
JSON numeric -> int
JSON numeric -> float
JSON numeric -> decimal
JSON numeric -> string
This change should be pretty straightforward -
CastExpr.Eval
should be edited ineval.go
to add the missing cases, and tests added topkg/sql/sem/tree/testdata/eval/cast
.The text was updated successfully, but these errors were encountered: