-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
On error, only pop spans from the current ongoing level
Query may still proceed despite the thrown error so we need to keep spans from previous nested levels.
- Loading branch information
Showing
8 changed files
with
66 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
-- Test error thrown within a nested function | ||
/*traceparent='00-00000000000000000000000000000001-0000000000000001-01'*/ SELECT | ||
eval_expr(format('date %L + interval %L', '-infinity', 'infinity')), | ||
eval_expr(format('date %L - interval %L', '-infinity', 'infinity')); | ||
eval_expr | eval_expr | ||
------------------------+----------- | ||
timestamp out of range | -infinity | ||
(1 row) | ||
|
||
select span_operation, lvl FROM peek_ordered_spans where trace_id='00000000000000000000000000000001'; | ||
span_operation | lvl | ||
----------------------------------------------------------------------+----- | ||
SELECT eval_expr(format($1, $2, $3)), eval_expr(format($4, $5, $6)); | 1 | ||
Planner | 2 | ||
ExecutorRun | 2 | ||
Result | 3 | ||
$2||expr | 4 | ||
Planner | 5 | ||
Planner | 5 | ||
select date $1 - interval $2 | 4 | ||
Planner | 5 | ||
ExecutorRun | 5 | ||
Result | 6 | ||
(11 rows) | ||
|
||
-- Cleanup | ||
CALL clean_spans(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
-- Test error thrown within a nested function | ||
/*traceparent='00-00000000000000000000000000000001-0000000000000001-01'*/ SELECT | ||
eval_expr(format('date %L + interval %L', '-infinity', 'infinity')), | ||
eval_expr(format('date %L - interval %L', '-infinity', 'infinity')); | ||
select span_operation, lvl FROM peek_ordered_spans where trace_id='00000000000000000000000000000001'; | ||
|
||
-- Cleanup | ||
CALL clean_spans(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters