Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(function): add to_xxx() cast function #8599

Merged
merged 6 commits into from
Nov 3, 2022
Merged

Conversation

andylokandy
Copy link
Collaborator

@andylokandy andylokandy commented Nov 2, 2022

I hereby agree to the terms of the CLA available at: https://databend.rs/dev/policies/cla/

Summary

new functions:

to_date(Timestamp) :: Date
to_date(Timestamp NULL) :: Date NULL
to_date(Int64) :: Date
to_date(Int64 NULL) :: Date NULL
to_date(String) :: Date
to_date(String NULL) :: Date NULL
to_float32(UInt8) :: Float32
to_float32(UInt8 NULL) :: Float32 NULL
to_float32(UInt16) :: Float32
to_float32(UInt16 NULL) :: Float32 NULL
to_float32(UInt32) :: Float32
to_float32(UInt32 NULL) :: Float32 NULL
to_float32(UInt64) :: Float32
to_float32(UInt64 NULL) :: Float32 NULL
to_float32(Int8) :: Float32
to_float32(Int8 NULL) :: Float32 NULL
to_float32(Int16) :: Float32
to_float32(Int16 NULL) :: Float32 NULL
to_float32(Int32) :: Float32
to_float32(Int32 NULL) :: Float32 NULL
to_float32(Int64) :: Float32
to_float32(Int64 NULL) :: Float32 NULL
to_float32(Float32) :: Float32
to_float32(Float32 NULL) :: Float32 NULL
to_float32(Float64) :: Float32
to_float32(Float64 NULL) :: Float32 NULL
to_float64(UInt8) :: Float64
to_float64(UInt8 NULL) :: Float64 NULL
to_float64(UInt16) :: Float64
to_float64(UInt16 NULL) :: Float64 NULL
to_float64(UInt32) :: Float64
to_float64(UInt32 NULL) :: Float64 NULL
to_float64(UInt64) :: Float64
to_float64(UInt64 NULL) :: Float64 NULL
to_float64(Int8) :: Float64
to_float64(Int8 NULL) :: Float64 NULL
to_float64(Int16) :: Float64
to_float64(Int16 NULL) :: Float64 NULL
to_float64(Int32) :: Float64
to_float64(Int32 NULL) :: Float64 NULL
to_float64(Int64) :: Float64
to_float64(Int64 NULL) :: Float64 NULL
to_float64(Float32) :: Float64
to_float64(Float32 NULL) :: Float64 NULL
to_float64(Float64) :: Float64
to_float64(Float64 NULL) :: Float64 NULL
to_int16(UInt8) :: Int16
to_int16(UInt8 NULL) :: Int16 NULL
to_int16(UInt16) :: Int16
to_int16(UInt16 NULL) :: Int16 NULL
to_int16(UInt32) :: Int16
to_int16(UInt32 NULL) :: Int16 NULL
to_int16(UInt64) :: Int16
to_int16(UInt64 NULL) :: Int16 NULL
to_int16(Int8) :: Int16
to_int16(Int8 NULL) :: Int16 NULL
to_int16(Int16) :: Int16
to_int16(Int16 NULL) :: Int16 NULL
to_int16(Int32) :: Int16
to_int16(Int32 NULL) :: Int16 NULL
to_int16(Int64) :: Int16
to_int16(Int64 NULL) :: Int16 NULL
to_int16(Float32) :: Int16
to_int16(Float32 NULL) :: Int16 NULL
to_int16(Float64) :: Int16
to_int16(Float64 NULL) :: Int16 NULL
to_int32(UInt8) :: Int32
to_int32(UInt8 NULL) :: Int32 NULL
to_int32(UInt16) :: Int32
to_int32(UInt16 NULL) :: Int32 NULL
to_int32(UInt32) :: Int32
to_int32(UInt32 NULL) :: Int32 NULL
to_int32(UInt64) :: Int32
to_int32(UInt64 NULL) :: Int32 NULL
to_int32(Int8) :: Int32
to_int32(Int8 NULL) :: Int32 NULL
to_int32(Int16) :: Int32
to_int32(Int16 NULL) :: Int32 NULL
to_int32(Int32) :: Int32
to_int32(Int32 NULL) :: Int32 NULL
to_int32(Int64) :: Int32
to_int32(Int64 NULL) :: Int32 NULL
to_int32(Float32) :: Int32
to_int32(Float32 NULL) :: Int32 NULL
to_int32(Float64) :: Int32
to_int32(Float64 NULL) :: Int32 NULL
to_int64(UInt8) :: Int64
to_int64(UInt8 NULL) :: Int64 NULL
to_int64(UInt16) :: Int64
to_int64(UInt16 NULL) :: Int64 NULL
to_int64(UInt32) :: Int64
to_int64(UInt32 NULL) :: Int64 NULL
to_int64(UInt64) :: Int64
to_int64(UInt64 NULL) :: Int64 NULL
to_int64(Int8) :: Int64
to_int64(Int8 NULL) :: Int64 NULL
to_int64(Int16) :: Int64
to_int64(Int16 NULL) :: Int64 NULL
to_int64(Int32) :: Int64
to_int64(Int32 NULL) :: Int64 NULL
to_int64(Int64) :: Int64
to_int64(Int64 NULL) :: Int64 NULL
to_int64(Float32) :: Int64
to_int64(Float32 NULL) :: Int64 NULL
to_int64(Float64) :: Int64
to_int64(Float64 NULL) :: Int64 NULL
to_int64(Timestamp) :: Int64
to_int64(Timestamp NULL) :: Int64 NULL
to_int64(Date) :: Int64
to_int64(Date NULL) :: Int64 NULL
to_int8(UInt8) :: Int8
to_int8(UInt8 NULL) :: Int8 NULL
to_int8(UInt16) :: Int8
to_int8(UInt16 NULL) :: Int8 NULL
to_int8(UInt32) :: Int8
to_int8(UInt32 NULL) :: Int8 NULL
to_int8(UInt64) :: Int8
to_int8(UInt64 NULL) :: Int8 NULL
to_int8(Int8) :: Int8
to_int8(Int8 NULL) :: Int8 NULL
to_int8(Int16) :: Int8
to_int8(Int16 NULL) :: Int8 NULL
to_int8(Int32) :: Int8
to_int8(Int32 NULL) :: Int8 NULL
to_int8(Int64) :: Int8
to_int8(Int64 NULL) :: Int8 NULL
to_int8(Float32) :: Int8
to_int8(Float32 NULL) :: Int8 NULL
to_int8(Float64) :: Int8
to_int8(Float64 NULL) :: Int8 NULL
to_string(Timestamp) :: String
to_string(Timestamp NULL) :: String NULL
to_string(Date) :: String
to_string(Date NULL) :: String NULL
to_timestamp(Date) :: Timestamp
to_timestamp(Date NULL) :: Timestamp NULL
to_timestamp(Int64) :: Timestamp
to_timestamp(Int64 NULL) :: Timestamp NULL
to_timestamp(String) :: Timestamp
to_timestamp(String NULL) :: Timestamp NULL
to_uint16(UInt8) :: UInt16
to_uint16(UInt8 NULL) :: UInt16 NULL
to_uint16(UInt16) :: UInt16
to_uint16(UInt16 NULL) :: UInt16 NULL
to_uint16(UInt32) :: UInt16
to_uint16(UInt32 NULL) :: UInt16 NULL
to_uint16(UInt64) :: UInt16
to_uint16(UInt64 NULL) :: UInt16 NULL
to_uint16(Int8) :: UInt16
to_uint16(Int8 NULL) :: UInt16 NULL
to_uint16(Int16) :: UInt16
to_uint16(Int16 NULL) :: UInt16 NULL
to_uint16(Int32) :: UInt16
to_uint16(Int32 NULL) :: UInt16 NULL
to_uint16(Int64) :: UInt16
to_uint16(Int64 NULL) :: UInt16 NULL
to_uint16(Float32) :: UInt16
to_uint16(Float32 NULL) :: UInt16 NULL
to_uint16(Float64) :: UInt16
to_uint16(Float64 NULL) :: UInt16 NULL
to_uint32(UInt8) :: UInt32
to_uint32(UInt8 NULL) :: UInt32 NULL
to_uint32(UInt16) :: UInt32
to_uint32(UInt16 NULL) :: UInt32 NULL
to_uint32(UInt32) :: UInt32
to_uint32(UInt32 NULL) :: UInt32 NULL
to_uint32(UInt64) :: UInt32
to_uint32(UInt64 NULL) :: UInt32 NULL
to_uint32(Int8) :: UInt32
to_uint32(Int8 NULL) :: UInt32 NULL
to_uint32(Int16) :: UInt32
to_uint32(Int16 NULL) :: UInt32 NULL
to_uint32(Int32) :: UInt32
to_uint32(Int32 NULL) :: UInt32 NULL
to_uint32(Int64) :: UInt32
to_uint32(Int64 NULL) :: UInt32 NULL
to_uint32(Float32) :: UInt32
to_uint32(Float32 NULL) :: UInt32 NULL
to_uint32(Float64) :: UInt32
to_uint32(Float64 NULL) :: UInt32 NULL
to_uint64(UInt8) :: UInt64
to_uint64(UInt8 NULL) :: UInt64 NULL
to_uint64(UInt16) :: UInt64
to_uint64(UInt16 NULL) :: UInt64 NULL
to_uint64(UInt32) :: UInt64
to_uint64(UInt32 NULL) :: UInt64 NULL
to_uint64(UInt64) :: UInt64
to_uint64(UInt64 NULL) :: UInt64 NULL
to_uint64(Int8) :: UInt64
to_uint64(Int8 NULL) :: UInt64 NULL
to_uint64(Int16) :: UInt64
to_uint64(Int16 NULL) :: UInt64 NULL
to_uint64(Int32) :: UInt64
to_uint64(Int32 NULL) :: UInt64 NULL
to_uint64(Int64) :: UInt64
to_uint64(Int64 NULL) :: UInt64 NULL
to_uint64(Float32) :: UInt64
to_uint64(Float32 NULL) :: UInt64 NULL
to_uint64(Float64) :: UInt64
to_uint64(Float64 NULL) :: UInt64 NULL
to_uint8(UInt8) :: UInt8
to_uint8(UInt8 NULL) :: UInt8 NULL
to_uint8(UInt16) :: UInt8
to_uint8(UInt16 NULL) :: UInt8 NULL
to_uint8(UInt32) :: UInt8
to_uint8(UInt32 NULL) :: UInt8 NULL
to_uint8(UInt64) :: UInt8
to_uint8(UInt64 NULL) :: UInt8 NULL
to_uint8(Int8) :: UInt8
to_uint8(Int8 NULL) :: UInt8 NULL
to_uint8(Int16) :: UInt8
to_uint8(Int16 NULL) :: UInt8 NULL
to_uint8(Int32) :: UInt8
to_uint8(Int32 NULL) :: UInt8 NULL
to_uint8(Int64) :: UInt8
to_uint8(Int64 NULL) :: UInt8 NULL
to_uint8(Float32) :: UInt8
to_uint8(Float32 NULL) :: UInt8 NULL
to_uint8(Float64) :: UInt8
to_uint8(Float64 NULL) :: UInt8 NULL
to_variant(T0) :: Variant
to_variant(T0 NULL) :: Variant NULL
try_to_date(Timestamp) :: Date
try_to_date(Timestamp NULL) :: Date NULL
try_to_date(Int64 NULL) :: Date NULL
try_to_date(String NULL) :: Date NULL
try_to_float32(UInt8) :: Float32 NULL
try_to_float32(UInt8 NULL) :: Float32 NULL
try_to_float32(UInt16) :: Float32 NULL
try_to_float32(UInt16 NULL) :: Float32 NULL
try_to_float32(UInt32) :: Float32 NULL
try_to_float32(UInt32 NULL) :: Float32 NULL
try_to_float32(UInt64) :: Float32 NULL
try_to_float32(UInt64 NULL) :: Float32 NULL
try_to_float32(Int8) :: Float32 NULL
try_to_float32(Int8 NULL) :: Float32 NULL
try_to_float32(Int16) :: Float32 NULL
try_to_float32(Int16 NULL) :: Float32 NULL
try_to_float32(Int32) :: Float32 NULL
try_to_float32(Int32 NULL) :: Float32 NULL
try_to_float32(Int64) :: Float32 NULL
try_to_float32(Int64 NULL) :: Float32 NULL
try_to_float32(Float32) :: Float32 NULL
try_to_float32(Float32 NULL) :: Float32 NULL
try_to_float32(Float64) :: Float32 NULL
try_to_float32(Float64 NULL) :: Float32 NULL
try_to_float64(UInt8) :: Float64 NULL
try_to_float64(UInt8 NULL) :: Float64 NULL
try_to_float64(UInt16) :: Float64 NULL
try_to_float64(UInt16 NULL) :: Float64 NULL
try_to_float64(UInt32) :: Float64 NULL
try_to_float64(UInt32 NULL) :: Float64 NULL
try_to_float64(UInt64) :: Float64 NULL
try_to_float64(UInt64 NULL) :: Float64 NULL
try_to_float64(Int8) :: Float64 NULL
try_to_float64(Int8 NULL) :: Float64 NULL
try_to_float64(Int16) :: Float64 NULL
try_to_float64(Int16 NULL) :: Float64 NULL
try_to_float64(Int32) :: Float64 NULL
try_to_float64(Int32 NULL) :: Float64 NULL
try_to_float64(Int64) :: Float64 NULL
try_to_float64(Int64 NULL) :: Float64 NULL
try_to_float64(Float32) :: Float64 NULL
try_to_float64(Float32 NULL) :: Float64 NULL
try_to_float64(Float64) :: Float64 NULL
try_to_float64(Float64 NULL) :: Float64 NULL
try_to_int16(UInt8) :: Int16 NULL
try_to_int16(UInt8 NULL) :: Int16 NULL
try_to_int16(UInt16) :: Int16 NULL
try_to_int16(UInt16 NULL) :: Int16 NULL
try_to_int16(UInt32) :: Int16 NULL
try_to_int16(UInt32 NULL) :: Int16 NULL
try_to_int16(UInt64) :: Int16 NULL
try_to_int16(UInt64 NULL) :: Int16 NULL
try_to_int16(Int8) :: Int16 NULL
try_to_int16(Int8 NULL) :: Int16 NULL
try_to_int16(Int16) :: Int16 NULL
try_to_int16(Int16 NULL) :: Int16 NULL
try_to_int16(Int32) :: Int16 NULL
try_to_int16(Int32 NULL) :: Int16 NULL
try_to_int16(Int64) :: Int16 NULL
try_to_int16(Int64 NULL) :: Int16 NULL
try_to_int16(Float32) :: Int16 NULL
try_to_int16(Float32 NULL) :: Int16 NULL
try_to_int16(Float64) :: Int16 NULL
try_to_int16(Float64 NULL) :: Int16 NULL
try_to_int32(UInt8) :: Int32 NULL
try_to_int32(UInt8 NULL) :: Int32 NULL
try_to_int32(UInt16) :: Int32 NULL
try_to_int32(UInt16 NULL) :: Int32 NULL
try_to_int32(UInt32) :: Int32 NULL
try_to_int32(UInt32 NULL) :: Int32 NULL
try_to_int32(UInt64) :: Int32 NULL
try_to_int32(UInt64 NULL) :: Int32 NULL
try_to_int32(Int8) :: Int32 NULL
try_to_int32(Int8 NULL) :: Int32 NULL
try_to_int32(Int16) :: Int32 NULL
try_to_int32(Int16 NULL) :: Int32 NULL
try_to_int32(Int32) :: Int32 NULL
try_to_int32(Int32 NULL) :: Int32 NULL
try_to_int32(Int64) :: Int32 NULL
try_to_int32(Int64 NULL) :: Int32 NULL
try_to_int32(Float32) :: Int32 NULL
try_to_int32(Float32 NULL) :: Int32 NULL
try_to_int32(Float64) :: Int32 NULL
try_to_int32(Float64 NULL) :: Int32 NULL
try_to_int64(UInt8) :: Int64 NULL
try_to_int64(UInt8 NULL) :: Int64 NULL
try_to_int64(UInt16) :: Int64 NULL
try_to_int64(UInt16 NULL) :: Int64 NULL
try_to_int64(UInt32) :: Int64 NULL
try_to_int64(UInt32 NULL) :: Int64 NULL
try_to_int64(UInt64) :: Int64 NULL
try_to_int64(UInt64 NULL) :: Int64 NULL
try_to_int64(Int8) :: Int64 NULL
try_to_int64(Int8 NULL) :: Int64 NULL
try_to_int64(Int16) :: Int64 NULL
try_to_int64(Int16 NULL) :: Int64 NULL
try_to_int64(Int32) :: Int64 NULL
try_to_int64(Int32 NULL) :: Int64 NULL
try_to_int64(Int64) :: Int64 NULL
try_to_int64(Int64 NULL) :: Int64 NULL
try_to_int64(Float32) :: Int64 NULL
try_to_int64(Float32 NULL) :: Int64 NULL
try_to_int64(Float64) :: Int64 NULL
try_to_int64(Float64 NULL) :: Int64 NULL
try_to_int8(UInt8) :: Int8 NULL
try_to_int8(UInt8 NULL) :: Int8 NULL
try_to_int8(UInt16) :: Int8 NULL
try_to_int8(UInt16 NULL) :: Int8 NULL
try_to_int8(UInt32) :: Int8 NULL
try_to_int8(UInt32 NULL) :: Int8 NULL
try_to_int8(UInt64) :: Int8 NULL
try_to_int8(UInt64 NULL) :: Int8 NULL
try_to_int8(Int8) :: Int8 NULL
try_to_int8(Int8 NULL) :: Int8 NULL
try_to_int8(Int16) :: Int8 NULL
try_to_int8(Int16 NULL) :: Int8 NULL
try_to_int8(Int32) :: Int8 NULL
try_to_int8(Int32 NULL) :: Int8 NULL
try_to_int8(Int64) :: Int8 NULL
try_to_int8(Int64 NULL) :: Int8 NULL
try_to_int8(Float32) :: Int8 NULL
try_to_int8(Float32 NULL) :: Int8 NULL
try_to_int8(Float64) :: Int8 NULL
try_to_int8(Float64 NULL) :: Int8 NULL
try_to_timestamp(Date) :: Timestamp
try_to_timestamp(Date NULL) :: Timestamp NULL
try_to_timestamp(Int64 NULL) :: Timestamp NULL
try_to_timestamp(String NULL) :: Timestamp NULL
try_to_uint16(UInt8) :: UInt16 NULL
try_to_uint16(UInt8 NULL) :: UInt16 NULL
try_to_uint16(UInt16) :: UInt16 NULL
try_to_uint16(UInt16 NULL) :: UInt16 NULL
try_to_uint16(UInt32) :: UInt16 NULL
try_to_uint16(UInt32 NULL) :: UInt16 NULL
try_to_uint16(UInt64) :: UInt16 NULL
try_to_uint16(UInt64 NULL) :: UInt16 NULL
try_to_uint16(Int8) :: UInt16 NULL
try_to_uint16(Int8 NULL) :: UInt16 NULL
try_to_uint16(Int16) :: UInt16 NULL
try_to_uint16(Int16 NULL) :: UInt16 NULL
try_to_uint16(Int32) :: UInt16 NULL
try_to_uint16(Int32 NULL) :: UInt16 NULL
try_to_uint16(Int64) :: UInt16 NULL
try_to_uint16(Int64 NULL) :: UInt16 NULL
try_to_uint16(Float32) :: UInt16 NULL
try_to_uint16(Float32 NULL) :: UInt16 NULL
try_to_uint16(Float64) :: UInt16 NULL
try_to_uint16(Float64 NULL) :: UInt16 NULL
try_to_uint32(UInt8) :: UInt32 NULL
try_to_uint32(UInt8 NULL) :: UInt32 NULL
try_to_uint32(UInt16) :: UInt32 NULL
try_to_uint32(UInt16 NULL) :: UInt32 NULL
try_to_uint32(UInt32) :: UInt32 NULL
try_to_uint32(UInt32 NULL) :: UInt32 NULL
try_to_uint32(UInt64) :: UInt32 NULL
try_to_uint32(UInt64 NULL) :: UInt32 NULL
try_to_uint32(Int8) :: UInt32 NULL
try_to_uint32(Int8 NULL) :: UInt32 NULL
try_to_uint32(Int16) :: UInt32 NULL
try_to_uint32(Int16 NULL) :: UInt32 NULL
try_to_uint32(Int32) :: UInt32 NULL
try_to_uint32(Int32 NULL) :: UInt32 NULL
try_to_uint32(Int64) :: UInt32 NULL
try_to_uint32(Int64 NULL) :: UInt32 NULL
try_to_uint32(Float32) :: UInt32 NULL
try_to_uint32(Float32 NULL) :: UInt32 NULL
try_to_uint32(Float64) :: UInt32 NULL
try_to_uint32(Float64 NULL) :: UInt32 NULL
try_to_uint64(UInt8) :: UInt64 NULL
try_to_uint64(UInt8 NULL) :: UInt64 NULL
try_to_uint64(UInt16) :: UInt64 NULL
try_to_uint64(UInt16 NULL) :: UInt64 NULL
try_to_uint64(UInt32) :: UInt64 NULL
try_to_uint64(UInt32 NULL) :: UInt64 NULL
try_to_uint64(UInt64) :: UInt64 NULL
try_to_uint64(UInt64 NULL) :: UInt64 NULL
try_to_uint64(Int8) :: UInt64 NULL
try_to_uint64(Int8 NULL) :: UInt64 NULL
try_to_uint64(Int16) :: UInt64 NULL
try_to_uint64(Int16 NULL) :: UInt64 NULL
try_to_uint64(Int32) :: UInt64 NULL
try_to_uint64(Int32 NULL) :: UInt64 NULL
try_to_uint64(Int64) :: UInt64 NULL
try_to_uint64(Int64 NULL) :: UInt64 NULL
try_to_uint64(Float32) :: UInt64 NULL
try_to_uint64(Float32 NULL) :: UInt64 NULL
try_to_uint64(Float64) :: UInt64 NULL
try_to_uint64(Float64 NULL) :: UInt64 NULL
try_to_uint8(UInt8) :: UInt8 NULL
try_to_uint8(UInt8 NULL) :: UInt8 NULL
try_to_uint8(UInt16) :: UInt8 NULL
try_to_uint8(UInt16 NULL) :: UInt8 NULL
try_to_uint8(UInt32) :: UInt8 NULL
try_to_uint8(UInt32 NULL) :: UInt8 NULL
try_to_uint8(UInt64) :: UInt8 NULL
try_to_uint8(UInt64 NULL) :: UInt8 NULL
try_to_uint8(Int8) :: UInt8 NULL
try_to_uint8(Int8 NULL) :: UInt8 NULL
try_to_uint8(Int16) :: UInt8 NULL
try_to_uint8(Int16 NULL) :: UInt8 NULL
try_to_uint8(Int32) :: UInt8 NULL
try_to_uint8(Int32 NULL) :: UInt8 NULL
try_to_uint8(Int64) :: UInt8 NULL
try_to_uint8(Int64 NULL) :: UInt8 NULL
try_to_uint8(Float32) :: UInt8 NULL
try_to_uint8(Float32 NULL) :: UInt8 NULL
try_to_uint8(Float64) :: UInt8 NULL
try_to_uint8(Float64 NULL) :: UInt8 NULL

to_xxx() cast function
@vercel
Copy link

vercel bot commented Nov 2, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Updated
databend ⬜️ Ignored (Inspect) Nov 3, 2022 at 1:42AM (UTC)

@mergify mergify bot added the pr-refactor this PR changes the code base without new features or bugfix label Nov 2, 2022
@andylokandy andylokandy requested a review from sundy-li November 2, 2022 06:55
@andylokandy andylokandy changed the title refactor(function): add to_xxx() cast function feat(function): add to_xxx() cast function Nov 2, 2022
@mergify mergify bot added the pr-feature this PR introduces a new feature to the codebase label Nov 2, 2022
@andylokandy
Copy link
Collaborator Author

Note that only to_int64([Timestamp | Date]) is added, but not to_[int32 | uint64 | ...]([Timestamp | Date]) nor try_to_int64([Timestamp | Date]). Likewise, to_string([Timestamp | Date]) is added but not try_to_string([Timestamp | Date]). I'm not sure if it's desired...

@sundy-li
Copy link
Member

sundy-li commented Nov 2, 2022

Likewise, to_string([Timestamp | Date]) is added but not try_to_string([Timestamp | Date])

I think we can have a template to control the behavior and introduce another MutableBitmap to store the errors.

@andylokandy
Copy link
Collaborator Author

I think we can have a template to control the behavior and introduce another MutableBitmap to store the errors.

Even when to_string must succeed?

@sundy-li
Copy link
Member

sundy-li commented Nov 2, 2022

Even when to_string must succeed?

I think it's yes.

We should keep the rule: try_cast performs the same operation as cast, but returns a NULL value instead of raising an error when the conversion can not be performed.

But it's trivial, we can have it in a low priority.

@mergify mergify bot merged commit e47f679 into databendlabs:main Nov 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr-feature this PR introduces a new feature to the codebase pr-refactor this PR changes the code base without new features or bugfix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants