modify child logic for decoded traces (#997)

modify child logic
This commit is contained in:
Sam 2024-12-05 23:15:27 +08:00 committed by GitHub
parent 0a36e48543
commit e58ebbacc9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 8 additions and 3 deletions

View File

@ -135,7 +135,12 @@
AND trace_address != 'ORIGIN' THEN trace_address || '_'
ELSE NULL
END AS parent_of,
IFF(REGEXP_REPLACE(trace_address, '.$', '') = '', 'ORIGIN', REGEXP_REPLACE(trace_address, '.$', '')) AS child_of,
IFF(REGEXP_REPLACE(trace_address, '[0-9]+$', '') = '', 'ORIGIN', REGEXP_REPLACE(trace_address, '[0-9]+$', '')) AS child_of_raw,
IFF(
trace_address = 'ORIGIN',
'ORIGI',
child_of_raw
) AS child_of,
input,
output,
concat_ws(

View File

@ -39,8 +39,8 @@ WITH look_back AS (
AND trace_address != 'ORIGIN' THEN trace_address || '_'
ELSE NULL
END AS parent_of,
IFF(REGEXP_REPLACE(trace_address, '.$', '') = '', 'ORIGIN', REGEXP_REPLACE(trace_address, '.$', '')) AS child_of,
IFF(REGEXP_REPLACE(trace_address, '[0-9]+$', '') = '', 'ORIGIN', REGEXP_REPLACE(trace_address, '[0-9]+$', '')) AS child_of_raw,
iff(trace_address = 'ORIGIN', 'ORIGI', child_of_raw) as child_of,
input,
output,
concat_ws(