blob: 2390f9ce7674106179d9f107e38cd3bc466cd96a (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
/*
syntax='proto3';
message Test {
oneof Var {
Test test = 1;
string str = 2;
}
};
*/
$config = @@{
"name": "Test",
"format": "json",
"skip": 0,
"lists": {
"optional": false
},
"meta": "H4sIAAAAAAAAA+OK4xIpyS3Qs/ArMkhMCsrwN9UrKMovyVey42IJSS0uEZLmYikB0hKMCowa3EaseiBBD4YgsKCQEBdzcUmRBBNQjhMoCOI4sXIxhyUWJbGBjTEGACyKGj9gAAAA",
"view": {
"recursion": "bytesV2",
"enum": "number"
}
}@@;
$udfPar = Udf(Protobuf::Parse, $config as TypeConfig);
$udfSer = Udf(Protobuf::Serialize, $config as TypeConfig);
SELECT TestField, $udfPar(TestField), $udfSer($udfPar(TestField)) FROM plato.Input;
|