vortex-array: Attempt casting inner array to target for extensions#7469
vortex-array: Attempt casting inner array to target for extensions#7469robert3005 merged 1 commit intovortex-data:developfrom
Conversation
Signed-off-by: Frederic Branczyk <fbranczyk@gmail.com>
connortsui20
left a comment
There was a problem hiding this comment.
whoops, I must have forgot this!
|
So just a heads up that we do not know if this behavior will be supported in this exact way in the future as we have not fully figured out the exact semantics of extension type casting. Note that there will definitely be a way to do this cast, but we might enforce that you have to "define" that this cast is allowed somewhere (rather than say that we always allow casting directly from the storage array). |
|
So we talked offline and we actually do not want this behavior for extension types (we might want to enforce that you cannot cast to or from extension types). Instead, we want to enforce that conversions on extension types have to go through scalar functions like So we are going to revert this, but in order not to break you we will make sure we add functionality so that you can do this operation. |
Summary
Getting
When running a datafusion query like:
Where the timestamp array is a utc timestamp type column.
Since the inner array of a timestamp array is int64 already, all we really need to do is try to attempt to cast the inner array of the extension type to the target type. That's exactly what this PR does.
Testing
Added a unit test.