morningman commented on code in PR #68935:
URL: https://github.com/apache/doris/pull/68935#discussion_r4245398495
##########
regression-test/suites/external_table_p0/paimon/write/test_paimon_write_variant.groovy:
##########
@@ -103,6 +103,27 @@ suite("test_paimon_write_variant",
"p0,external,paimon,nonConcurrent") {
ORDER BY id
"""
+ // A UUID reaches a Variant column without an explicit cast, as a
scalar and as array
+ // elements, in both cast modes, and reads back as the UUID it holds.
+ sql """
+ INSERT INTO t_variant_basic VALUES
+ (30, CAST('6ba7b810-9dad-11d1-80b4-00c04fd430c8' AS UUID),
+ ARRAY(CAST('6ba7b811-9dad-11d1-80b4-00c04fd430c8' AS
UUID), NULL))
+ """
+ sql """SET enable_strict_cast = true"""
+ sql """
+ INSERT INTO t_variant_basic
+ SELECT 31, CAST('6ba7b812-9dad-11d1-80b4-00c04fd430c8' AS UUID),
+ ARRAY(CAST('6ba7b813-9dad-11d1-80b4-00c04fd430c8' AS UUID))
+ """
+ sql """SET enable_strict_cast = false"""
+ order_qt_variant_uuid """
+ SELECT id, payload, secondary, variant_type(payload)
Review Comment:
Done in 3bdb070c8c3. `order_qt_variant_uuid` now also selects
`variant_type(secondary[1])`, and the regenerated `.out` has `uuid` for both
rows. As a check on a local cluster, a row written with an `ARRAY<STRING>` of
the same text prints the same JSON for `secondary` and gives `string` there.
--
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]