This is an automated email from the ASF dual-hosted git repository.

morningman pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/doris-cli.git

commit 497db00e1588720109a62d0066d0a5c4c7dab7fc
Author: Mingyu Chen (Rayner) <[email protected]>
AuthorDate: Sat May 30 10:01:14 2026 +0800

    fix(test): use portable octal escape in events data generator
    
    The events INSERT generator in tests/e2e/data.sh quoted SQL string
    literals with awk's `\x27` hex escape. macOS's awk (BWK awk) reads `\xNN`
    greedily across all following hex digits, so `\x27` adjacent to hex-digit
    content (e.g. `\x272024-01-01`) mangled the bytes into non-UTF-8 output,
    failing `sql -f` during setup. Use the portable octal `\047`, which both
    gawk and BSD awk parse as exactly the single quote.
    
    Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
---
 tests/e2e/data.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/e2e/data.sh b/tests/e2e/data.sh
index d41a65d..d356497 100644
--- a/tests/e2e/data.sh
+++ b/tests/e2e/data.sh
@@ -36,7 +36,7 @@ _gen_events_sql() {
       typ = t[(i % 4) + 1];
       amt = (i % 100) + 0.5;
       sep = (i == n - 1) ? ";" : ",";
-      printf "(DATE_ADD(\x272024-01-01\x27, INTERVAL %d 
DAY),%d,\x27%s\x27,%.2f,\x27detail_%d\x27)%s\n",
+      printf "(DATE_ADD(\0472024-01-01\047, INTERVAL %d 
DAY),%d,\047%s\047,%.2f,\047detail_%d\047)%s\n",
              day, uid, typ, amt, i, sep;
     }
   }'


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

Reply via email to