Repository: microsoft/garnet
File: libs/server/Resp/Vector/RespServerSessionVectors.cs (C#)

Code before:
            // TODO: implement!

            while (!RespWriteUtils.TryWriteDirect(CmdStrings.RESP_OK, ref dcurr, dend))
                SendAndReset();

            return true;
        }

        private bool NetworkVINFO<TGarnetApi>(ref TGarnetApi storageApi)
            where TGarnetApi : IGarnetApi
        {
            if (!storageSession.vectorManager.IsEnabled)
            {
                return AbortWithErrorMessage("ERR Vector Set (preview) commands are not enabled");
            }

            if (parseState.Count != 1)
            {
                return AbortWithWrongNumberOfArguments("VINFO");
            }

            var key = parseState.GetArgSliceByRef(0);
            var res = storageApi.VectorSetInfo(key, out VectorQuantType quantType, out uint vectorDimensions, out uint reducedDimensions, out uint buildExplorationFactor, out uint numLinks, out long size);
            if (res == GarnetStatus.NOTFOUND)
            {
                WriteNull();
                return true;
            }
            
            if (res == GarnetStatus.WRONGTYPE)
            {
                WriteError("ERR Not a Vector Set"u8);
                return true;
            }

            string quantTypeStr = quantType switch
            {
                VectorQuantType.NoQuant => "no-quant",
                VectorQuantType.Bin => "bin",
                VectorQuantType.Q8 => "q8",
                VectorQuantType.XPreQ8 => "xpreq8",
                _ => "invalid",
            };

            WriteArrayLength(12);
            WriteSimpleString("quant-type");
            WriteSimpleString($"{quantTypeStr}");
            WriteSimpleString("input-vector-dimensions");
            WriteSimpleString($"{vectorDimensions}");
            WriteSimpleString("reduced-dimensions");
            WriteSimpleString($"{reducedDimensions}");

Review comment (bug):
This is subtly wrong - see [`VINFO` Returns](https://redis.io/docs/latest/commands/vinfo/#return-information).

If `RespProtocolVersion == 3` this should return the null (`_\r\n`), but in RESP 2 it writes the "null array" (`*-1\r\n`).  This is wrapped up in `WriteNullArray()`, so just call that instead.

 Many (but not all) libraries will paper over that mismatch, so understandable it got missed.

Code after:
            return true;
        }

        private bool NetworkVGETATTR<TGarnetApi>(ref TGarnetApi storageApi)
            where TGarnetApi : IGarnetApi
        {
            if (!storageSession.vectorManager.IsEnabled)
            {
                return AbortWithErrorMessage("ERR Vector Set (preview) commands are not enabled");
            }

            // TODO: implement!

            while (!RespWriteUtils.TryWriteDirect(CmdStrings.RESP_OK, ref dcurr, dend))
                SendAndReset();

            return true;
        }

        private bool NetworkVINFO<TGarnetApi>(ref TGarnetApi storageApi)
            where TGarnetApi : IGarnetApi
        {
            if (!storageSession.vectorManager.IsEnabled)
            {
                return AbortWithErrorMessage("ERR Vector Set (preview) commands are not enabled");
            }

            if (parseState.Count != 1)
            {
                return AbortWithWrongNumberOfArguments("VINFO");
            }

            var key = parseState.GetArgSliceByRef(0);
            var res = storageApi.VectorSetInfo(key, out VectorQuantType quantType, out var vectorDimensions, out var reducedDimensions, out var buildExplorationFactor, out var numLinks, out var size);
            if (res == GarnetStatus.NOTFOUND)
            {
                WriteNullArray();
                return true;
            }
            else if (res == GarnetStatus.WRONGTYPE)
            {
                return AbortVectorSetWrongType();
            }
            else if (res == GarnetStatus.BADSTATE)
            {
                return AbortVectorSetPartiallyDeleted(ref key);
            }

            var quantTypeSpan = quantType switch
            {
                VectorQuantType.NoQuant => "f32"u8,