scovich commented on issue #18717:
URL: https://github.com/apache/datafusion/issues/18717#issuecomment-3564463610

   > > I don't think I understand how `->` syntax relates to hashable union 
arrays or cross-type comparisons, sorry?
   > 
   > I don't know how variant plans on handling this in general but imaging you 
have the data `[{"id":123},{"id":"some-uuid"}]`. This can happen if e.g. two 
different systems send data to the same data store and they don't agree on what 
a super generic field like `id` means. Then if you want to do a query such as 
"the id is equal to 123" what you want is `[true, false]`. How we write that 
query with variant I'm not sure but in Postgres JSON syntax that would be 
`col->'id' = 123`. For our implementation of json stuff this returns a Union 
array. Again not sure how variant plans on handling this but I'd imagine a 
Union array makes sense.
   
   AFAIK, `variant_col->'id'` should return a variant value, which then 
compares against `123` in the usual variant way? I don't know why a union type 
would ever be involved. 
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to