You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: generator_builtins_test.go
    path of file: ./repos/cockroach/pkg/sql/sem/builtins
    
    the code of the file until where you have to start completion: // Copyright 2019 The Cockroach Authors.
//
// Use of this software is governed by the Business Source License
// included in the file licenses/BSL.txt.
//
// As of the Change Date specified in that file, in accordance with
// the Business Source License, use of this software will be governed
// by the Apache License, Version 2.0, included in the file
// licenses/APL.txt.

package builtins

import (
	"context"
	"encoding/json"
	"fmt"
	"testing"

	"github.com/cockroachdb/cockroach/pkg/base"
	"github.com/cockroachdb/cockroach/pkg/kv"
	"github.com/cockroachdb/cockroach/pkg/kv/kvserver"
	"github.com/cockroachdb/cockroach/pkg/set
    
func TestGetSSTableMetricsSingleNode(t *testing.T) {
	defer leaktest.AfterTest(t)()
	defer log.Scope(t).Close(t)

	ctx := context.Background()
	ts, hostDB, _ := serverutils.StartServer(t, base.TestServerArgs{})
	defer ts.Stopper().Stop(ctx)

	nodeIDArg := 1
	storeIDArg := int(ts.GetFirstStoreID())

	r := sqlutils.MakeSQLRunner(hostDB)
	r.Exec(t, `CREATE TABLE t(k INT PRIMARY KEY, v INT)`)
	r.Exec(t, `INSERT INTO t SELECT i, i*10 FROM generate_series(1, 10000) AS g(i)`)

	r.Exec(t, fmt.Sprintf(`
	 SELECT crdb_internal.compact_engine_span(
		 %d, %d,
		 (SELECT raw_start_key FROM [SHOW RANGES FROM TABLE t WITH KEYS] LIMIT 1),
		 (SELECT raw_end_key FROM [SHOW RANGES FROM TABLE t WITH KEYS] LIMIT 1))`,
		nodeIDArg, storeIDArg))

	rows := r.Query(t, fmt.Sprintf(`
	 SELECT * FROM crdb_internal.sstable_metrics(
		 %d, %d,
		 (SELECT raw_start_key FROM [SHOW RANGES FROM TABLE t WITH KEYS] LIMIT 1),
		 (SELECT raw_end_key FROM [SHOW RANGES FROM TABLE t WITH KEYS] LIMIT 1))`,
		nodeIDArg, storeIDArg))

	count := 0
	var nodeID int
	var storeID int
	var level int
	var fileNum int
	var approximateSpanBytes uint64
	var metrics []byte

	for rows.Next() {
		require.NoError(t, rows.Scan(&nodeID, &storeID, &level, &fileNum, &approximateSpanBytes, &metrics))
		require.NoError(t, json.Unmarshal(metrics, &enginepb.SSTableMetricsInfo{}))
		require.Equal(t, nodeID, nodeIDArg)
		require.Equal(t, storeID, storeIDArg)
		require.NotEqual(t, fileNum, 0)
		require.NotEqual(t, approximateSpanBytes, 0)
		count++
	}
	require.GreaterOrEqual(t, count, 1)
}