def execute_streaming_sql(
        self,
        session,
        sql,
        transaction=None,
        params=None,
        param_types=None,
        resume_token=None,
        query_mode=None,
        partition_token=None,
        seqno=None,
        retry=google.api_core.gapic_v1.method.DEFAULT,
        timeout=google.api_core.gapic_v1.method.DEFAULT,
        metadata=None,
    ):
        """
        Like ``ExecuteSql``, except returns the result set as a stream. Unlike
        ``ExecuteSql``, there is no limit on the size of the returned result
        set. However, no individual row in the result set can exceed 100 MiB,
        and no column value can exceed 10 MiB.

        Example:
            >>> from google.cloud import spanner_v1
            >>>
            >>> client = spanner_v1.SpannerClient()
            >>>
            >>> session = client.session_path('[PROJECT]', '[INSTANCE]', '[DATABASE]', '[SESSION]')
            >>>
            >>> # TODO: Initialize `sql`:
            >>> sql = ''
            >>>
            >>> for element in client.execute_streaming_sql(session, sql):
            ...     # process element
            ...     pass

        Args:
            session (str): Required. The session in which the SQL query should be performed.
            sql (str): Required. The SQL string.
            transaction (Union[dict, ~google.cloud.spanner_v1.types.TransactionSelector]): The transaction to use. If none is provided, the default is a
                temporary read-only transaction with strong concurrency.

                The transaction to use.

                For queries, if none is provided, the default is a temporary read-only
                transaction with strong concurrency.

                Standard DML statements require a ReadWrite transaction. Single-use
                transactions are not supported (to avoid replay).  The caller must
                either supply an existing transaction ID or begin a new transaction.

                Partitioned DML requires an existing PartitionedDml transaction ID.

                If a dict is provided, it must be of the same form as the protobuf
                message :class:`~google.cloud.spanner_v1.types.TransactionSelector`
            params (Union[dict, ~google.cloud.spanner_v1.types.Struct]): The SQL string can contain parameter placeholders. A parameter
                placeholder consists of ``'@'`` followed by the parameter name.
                Parameter names consist of any combination of letters, numbers, and
                underscores.

                Parameters can appear anywhere that a literal value is expected. The
                same parameter name can be used more than once, for example:
                ``"WHERE id > @msg_id AND id < @msg_id + 100"``

                It is an error to execute an SQL statement with unbound parameters.

                Parameter values are specified using ``params``, which is a JSON object
                whose keys are parameter names, and whose values are the corresponding
                parameter values.

                If a dict is provided, it must be of the same form as the protobuf
                message :class:`~google.cloud.spanner_v1.types.Struct`
            param_types (dict[str -> Union[dict, ~google.cloud.spanner_v1.types.Type]]): It is not always possible for Cloud Spanner to infer the right SQL type
                from a JSON value. For example, values of type ``BYTES`` and values of
                type ``STRING`` both appear in ``params`` as JSON strings.

                In these cases, ``param_types`` can be used to specify the exact SQL
                type for some or all of the SQL statement parameters. See the definition
                of ``Type`` for more information about SQL types.

                If a dict is provided, it must be of the same form as the protobuf
                message :class:`~google.cloud.spanner_v1.types.Type`
            resume_token (bytes): If this request is resuming a previously interrupted SQL statement
                execution, ``resume_token`` should be copied from the last
                ``PartialResultSet`` yielded before the interruption. Doing this enables
                the new SQL statement execution to resume where the last one left off.
                The rest of the request parameters must exactly match the request that
                yielded this token.
            query_mode (~google.cloud.spanner_v1.types.QueryMode): Used to control the amount of debugging information returned in
                ``ResultSetStats``. If ``partition_token`` is set, ``query_mode`` can
                only be set to ``QueryMode.NORMAL``.
            partition_token (bytes): If present, results will be restricted to the specified partition
                previously created using PartitionQuery(). There must be an exact match
                for the values of fields common to this message and the
                PartitionQueryRequest message used to create this partition\_token.
            seqno (long): A per-transaction sequence number used to identify this request. This
                makes each request idempotent such that if the request is received multiple
                times, at most one will succeed.

                The sequence number must be monotonically increasing within the
                transaction. If a request arrives for the first time with an out-of-order
                sequence number, the transaction may be aborted. Replays of previously
                handled requests will yield the same response as the first execution.

                Required for DML statements. Ignored for queries.
            retry (Optional[google.api_core.retry.Retry]):  A retry object used
                to retry requests. If ``None`` is specified, requests will not
                be retried.
            timeout (Optional[float]): The amount of time, in seconds, to wait
                for the request to complete. Note that if ``retry`` is
                specified, the timeout applies to each individual attempt.
            metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata
                that is provided to the method.

        Returns:
            Iterable[~google.cloud.spanner_v1.types.PartialResultSet].

        Raises:
            google.api_core.exceptions.GoogleAPICallError: If the request
                    failed for any reason.
            google.api_core.exceptions.RetryError: If the request failed due
                    to a retryable error and retry attempts failed.
            ValueError: If the parameters are invalid.
        """
        # Wrap the transport method to add retry and timeout logic.
        if "execute_streaming_sql" not in self._inner_api_calls:
            self._inner_api_calls[
                "execute_streaming_sql"
            ] = google.api_core.gapic_v1.method.wrap_method(
                self.transport.execute_streaming_sql,
                default_retry=self._method_configs["ExecuteStreamingSql"].retry,
                default_timeout=self._method_configs["ExecuteStreamingSql"].timeout,
                client_info=self._client_info,
            )

        request = spanner_pb2.ExecuteSqlRequest(
            session=session,
            sql=sql,
            transaction=transaction,
            params=params,
            param_types=param_types,
            resume_token=resume_token,
            query_mode=query_mode,
            partition_token=partition_token,
            seqno=seqno,
        )
        if metadata is None:
            metadata = []
        metadata = list(metadata)
        try:
            routing_header = [("session", session)]
        except AttributeError:
            pass
        else:
            routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata(
                routing_header
            )
            metadata.append(routing_metadata)

        return self._inner_api_calls["execute_streaming_sql"](
            request, retry=retry, timeout=timeout, metadata=metadata
        )
Like ``ExecuteSql``, except returns the result set as a stream. Unlike
        ``ExecuteSql``, there is no limit on the size of the returned result
        set. However, no individual row in the result set can exceed 100 MiB,
        and no column value can exceed 10 MiB.

        Example:
            >>> from google.cloud import spanner_v1
            >>>
            >>> client = spanner_v1.SpannerClient()
            >>>
            >>> session = client.session_path('[PROJECT]', '[INSTANCE]', '[DATABASE]', '[SESSION]')
            >>>
            >>> # TODO: Initialize `sql`:
            >>> sql = ''
            >>>
            >>> for element in client.execute_streaming_sql(session, sql):
            ...     # process element
            ...     pass

        Args:
            session (str): Required. The session in which the SQL query should be performed.
            sql (str): Required. The SQL string.
            transaction (Union[dict, ~google.cloud.spanner_v1.types.TransactionSelector]): The transaction to use. If none is provided, the default is a
                temporary read-only transaction with strong concurrency.

                The transaction to use.

                For queries, if none is provided, the default is a temporary read-only
                transaction with strong concurrency.

                Standard DML statements require a ReadWrite transaction. Single-use
                transactions are not supported (to avoid replay).  The caller must
                either supply an existing transaction ID or begin a new transaction.

                Partitioned DML requires an existing PartitionedDml transaction ID.

                If a dict is provided, it must be of the same form as the protobuf
                message :class:`~google.cloud.spanner_v1.types.TransactionSelector`
            params (Union[dict, ~google.cloud.spanner_v1.types.Struct]): The SQL string can contain parameter placeholders. A parameter
                placeholder consists of ``'@'`` followed by the parameter name.
                Parameter names consist of any combination of letters, numbers, and
                underscores.

                Parameters can appear anywhere that a literal value is expected. The
                same parameter name can be used more than once, for example:
                ``"WHERE id > @msg_id AND id < @msg_id + 100"``

                It is an error to execute an SQL statement with unbound parameters.

                Parameter values are specified using ``params``, which is a JSON object
                whose keys are parameter names, and whose values are the corresponding
                parameter values.

                If a dict is provided, it must be of the same form as the protobuf
                message :class:`~google.cloud.spanner_v1.types.Struct`
            param_types (dict[str -> Union[dict, ~google.cloud.spanner_v1.types.Type]]): It is not always possible for Cloud Spanner to infer the right SQL type
                from a JSON value. For example, values of type ``BYTES`` and values of
                type ``STRING`` both appear in ``params`` as JSON strings.

                In these cases, ``param_types`` can be used to specify the exact SQL
                type for some or all of the SQL statement parameters. See the definition
                of ``Type`` for more information about SQL types.

                If a dict is provided, it must be of the same form as the protobuf
                message :class:`~google.cloud.spanner_v1.types.Type`
            resume_token (bytes): If this request is resuming a previously interrupted SQL statement
                execution, ``resume_token`` should be copied from the last
                ``PartialResultSet`` yielded before the interruption. Doing this enables
                the new SQL statement execution to resume where the last one left off.
                The rest of the request parameters must exactly match the request that
                yielded this token.
            query_mode (~google.cloud.spanner_v1.types.QueryMode): Used to control the amount of debugging information returned in
                ``ResultSetStats``. If ``partition_token`` is set, ``query_mode`` can
                only be set to ``QueryMode.NORMAL``.
            partition_token (bytes): If present, results will be restricted to the specified partition
                previously created using PartitionQuery(). There must be an exact match
                for the values of fields common to this message and the
                PartitionQueryRequest message used to create this partition\_token.
            seqno (long): A per-transaction sequence number used to identify this request. This
                makes each request idempotent such that if the request is received multiple
                times, at most one will succeed.

                The sequence number must be monotonically increasing within the
                transaction. If a request arrives for the first time with an out-of-order
                sequence number, the transaction may be aborted. Replays of previously
                handled requests will yield the same response as the first execution.

                Required for DML statements. Ignored for queries.
            retry (Optional[google.api_core.retry.Retry]):  A retry object used
                to retry requests. If ``None`` is specified, requests will not
                be retried.
            timeout (Optional[float]): The amount of time, in seconds, to wait
                for the request to complete. Note that if ``retry`` is
                specified, the timeout applies to each individual attempt.
            metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata
                that is provided to the method.

        Returns:
            Iterable[~google.cloud.spanner_v1.types.PartialResultSet].

        Raises:
            google.api_core.exceptions.GoogleAPICallError: If the request
                    failed for any reason.
            google.api_core.exceptions.RetryError: If the request failed due
                    to a retryable error and retry attempts failed.
            ValueError: If the parameters are invalid.