Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
a week ago
Let's say I have the following dataframe
%sql
CREATE OR REPLACE TEMPORARY VIEW v_temp AS
VALUES (NULL, DATE'2025-12-31'), (NULL, DATE'2026-04-12'), (NULL, DATE'2026-06-23') AS T(PAYMENT_DATE, TRANSACTION_DATE);
SELECT PAYMENT_DATE, TYPEOF(PAYMENT_DATE), TRANSACTION_DATE, TYPEOF(TRANSACTION_DATE)
FROM v_temp;
If I try to cast the PAYMENT_DATE column to variant it works fine
But, if I put the column inside a struct and then cast it to variant, it fails.
Casting to string makes the code work.
Since VOID is castable to VARIANT. Why is it failing?
Labels:
- Labels:
-
Spark