vitess.io/vitess@v0.16.2/go/vt/vtgate/planbuilder/testdata/call_cases.json (about)

     1  [
     2    {
     3      "comment": "simple call proc on current keyspace",
     4      "query": "call proc()",
     5      "plan": {
     6        "QueryType": "CALL_PROC",
     7        "Original": "call proc()",
     8        "Instructions": {
     9          "OperatorType": "Send",
    10          "Keyspace": {
    11            "Name": "main",
    12            "Sharded": false
    13          },
    14          "TargetDestination": "AnyShard()",
    15          "Query": "call proc()"
    16        }
    17      }
    18    },
    19    {
    20      "comment": "call qualified keyspace",
    21      "query": "call main.proc()",
    22      "plan": {
    23        "QueryType": "CALL_PROC",
    24        "Original": "call main.proc()",
    25        "Instructions": {
    26          "OperatorType": "Send",
    27          "Keyspace": {
    28            "Name": "main",
    29            "Sharded": false
    30          },
    31          "TargetDestination": "AnyShard()",
    32          "Query": "call proc()"
    33        }
    34      }
    35    },
    36    {
    37      "comment": "CALL not allowed on sharded keyspaces",
    38      "query": "call user.proc()",
    39      "plan": "CALL is not supported for sharded keyspace"
    40    },
    41    {
    42      "comment": "CALL with expressions and parameters",
    43      "query": "call proc(1, 'foo', @var)",
    44      "plan": {
    45        "QueryType": "CALL_PROC",
    46        "Original": "call proc(1, 'foo', @var)",
    47        "Instructions": {
    48          "OperatorType": "Send",
    49          "Keyspace": {
    50            "Name": "main",
    51            "Sharded": false
    52          },
    53          "TargetDestination": "AnyShard()",
    54          "Query": "call proc(1, 'foo', :__vtudvvar)"
    55        }
    56      }
    57    }
    58  ]