pzhdfy commented on code in PR #69493:
URL: https://github.com/apache/doris/pull/69493#discussion_r4360670462


##########
regression-test/framework/src/main/groovy/org/apache/doris/regression/util/ResultUtils.groovy:
##########
@@ -45,6 +47,21 @@ class ResultUtils {
     private static final Pattern DATETIME_PATTERN = Pattern.compile(
             "(\\d{4}-\\d{2}-\\d{2})[T 
](\\d{2}:\\d{2})(?::(\\d{2})(?:\\.(\\d{1,9}))?)?")
     private static final Pattern UNICODE_ESCAPE_PATTERN = 
Pattern.compile("[0-9a-fA-F]{4}")
+    /**
+     * A "0x" token as Doris renders a VARBINARY nested in arrays/maps/structs.
+     * The negative lookbehind keeps the match at a VALUE/ELEMENT boundary: a
+     * token preceded by an alphanumeric ("prefix0x41"), a quote (a nested
+     * STRING the engine renders quoted) or a backslash is a literal-string
+     * fragment, not a binary rendering — substituting it could make unequal
+     * rows compare equal (Spark "prefixA" vs Doris "prefix0x41"). Only a token
+     * that Doris could only have produced as a binary element ("[0x616C, "
+     * / "{0x41: 0x42}" / "ROW(0x61)") is decoded. A literal string whose whole
+     * value coincides with a bare token ("0x41") is indistinguishable from a
+     * binary rendering without column types and remains the one known
+     * ambiguity.
+     */
+    private static final Pattern NESTED_BINARY_TOKEN = Pattern.compile(
+            "(?i)(?<![0-9a-zA-Z'"\\])0x(?:[0-9a-f]{2})+(?![0-9a-fA-F])")

Review Comment:
   Confirmed — the lookbehind's escaped quote terminated the double-quoted
   literal mid-pattern; the framework could not compile. Fixed in 792aa85: the
   pattern moves to a Groovy slashy string literal, where neither the backslash
   nor either quote character needs escaping. Verified by rebuilding the
   framework jar (compile + packaging) and running the spark-vs-doris oracle
   suite against the rebuilt jar. (This round also caught that our earlier
   "green" run had used the stale prebuilt framework jar — the rebuild-and-rerun
   is now part of the loop.)



-- 
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