Skip to content

Commit ff9b5b3

Browse files
CodemodService ThriftModernizationBotfacebook-github-bot
authored andcommitted
[Codemod][ThriftAnnotationsFBSource] fbcode/github/ (#26585)
Summary: Pull Request resolved: #26585 Differential Revision: D86087872
1 parent da5d5fc commit ff9b5b3

File tree

2 files changed

+18
-8
lines changed

2 files changed

+18
-8
lines changed

presto-native-execution/presto_cpp/main/thrift/presto_thrift.thrift

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@
1414

1515
namespace cpp2 facebook.presto.thrift
1616

17+
include "thrift/annotation/cpp.thrift"
18+
19+
include "thrift/annotation/thrift.thrift"
20+
1721
enum TaskState {
1822
PLANNED = 0,
1923
RUNNING = 1,
@@ -579,10 +583,11 @@ struct UpdateHandle {
579583
struct ExecutionFailureInfo {
580584
1: string type;
581585
2: string message;
582-
3: optional ExecutionFailureInfo cause (
583-
cpp.ref_type = "shared",
584-
drift.recursive_reference = true,
585-
);
586+
@cpp.Ref{type = cpp.RefType.SharedMutable}
587+
@thrift.DeprecatedUnvalidatedAnnotations{
588+
items = {"drift.recursive_reference": "1"},
589+
}
590+
3: optional ExecutionFailureInfo cause;
586591
4: list<ExecutionFailureInfo> suppressed;
587592
5: list<string> stack;
588593
6: ErrorLocation errorLocation;

presto-native-execution/presto_cpp/main/thrift/temp_presto_thrift.thrift

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@
1414

1515
namespace cpp2 facebook.presto.thrift
1616

17+
include "thrift/annotation/cpp.thrift"
18+
19+
include "thrift/annotation/thrift.thrift"
20+
1721
enum TaskState {
1822
PLANNED = 0,
1923
RUNNING = 1,
@@ -579,10 +583,11 @@ struct UpdateHandle {
579583
struct ExecutionFailureInfo {
580584
1: string type;
581585
2: string message;
582-
3: optional ExecutionFailureInfo cause (
583-
cpp.ref_type = "shared",
584-
drift.recursive_reference = true,
585-
);
586+
@cpp.Ref{type = cpp.RefType.SharedMutable}
587+
@thrift.DeprecatedUnvalidatedAnnotations{
588+
items = {"drift.recursive_reference": "1"},
589+
}
590+
3: optional ExecutionFailureInfo cause;
586591
4: list<ExecutionFailureInfo> suppressed;
587592
5: list<string> stack;
588593
6: ErrorLocation errorLocation;

0 commit comments

Comments
 (0)