Repository: matrixorigin/matrixone
Pull request #13860 (2023-12-27 08:19:51)

delete some unused code
## What type of PR is this?

- [ ] API-change
- [ ] BUG
- [ ] Improvement
- [ ] Documentation
- [ ] Feature
- [ ] Test and CI
- [x] Code Refactoring

## Which issue(s) this PR fixes:

issue #12497

## What this PR does / why we need it:

delete unused code in catalog.


Patch:
diff --git a/pkg/catalog/catalog.go b/pkg/catalog/catalog.go
index d421be821..14316282c 100644
--- a/pkg/catalog/catalog.go
+++ b/pkg/catalog/catalog.go
@@ -148,20 +148,6 @@ func ParseEntryList(es []*api.Entry) (any, []*api.Entry, error) {
 	}
 }
 
-func GenBlockInfo(rows [][]any) []BlockInfo {
-	infos := make([]BlockInfo, len(rows))
-	for i, row := range rows {
-		infos[i].BlockID = row[BLOCKMETA_ID_IDX].(types.Blockid)
-		infos[i].EntryState = row[BLOCKMETA_ENTRYSTATE_IDX].(bool)
-		infos[i].Sorted = row[BLOCKMETA_SORTED_IDX].(bool)
-		infos[i].SetMetaLocation(row[BLOCKMETA_METALOC_IDX].([]byte))
-		infos[i].SetDeltaLocation(row[BLOCKMETA_DELTALOC_IDX].([]byte))
-		infos[i].CommitTs = row[BLOCKMETA_COMMITTS_IDX].(types.TS)
-		infos[i].SegmentID = row[BLOCKMETA_SEGID_IDX].(types.Uuid)
-	}
-	return infos
-}
-
 func genCreateDatabases(rows [][]any) []CreateDatabase {
 	cmds := make([]CreateDatabase, len(rows))
 	for i, row := range rows {
diff --git a/pkg/catalog/protogen.sh b/pkg/catalog/protogen.sh
deleted file mode 100755
index 23343969d..000000000
--- a/pkg/catalog/protogen.sh
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/bin/bash
-
-WORKSPACE=$(dirname $(go env GOMOD))
-VENDOR_DIR="$WORKSPACE/vendor"
-PROTOC_DIR="$WORKSPACE/proto"
-
-# https://github.com/gogo/protobuf.git@v1.3.2
-${GOPATH}/bin/protoc -I=.:$PROTOC_DIR:$VENDOR_DIR --gogofast_out=paths=source_relative:. types.proto
-goimports -w *.pb.go
diff --git a/pkg/catalog/types.go b/pkg/catalog/types.go
index 7bf19784f..ebfa06976 100644
--- a/pkg/catalog/types.go
+++ b/pkg/catalog/types.go
@@ -343,45 +343,6 @@ const (
 
 type ObjectLocation [objectio.LocationLen]byte
 
-// ProtoSize is used by gogoproto.
-func (m *ObjectLocation) ProtoSize() int {
-	return objectio.LocationLen
-}
-
-// MarshalTo is used by gogoproto.
-func (m *ObjectLocation) MarshalTo(data []byte) (int, error) {
-	size := m.ProtoSize()
-	return m.MarshalToSizedBuffer(data[:size])
-}
-
-// MarshalToSizedBuffer is used by gogoproto.
-func (m *ObjectLocation) MarshalToSizedBuffer(data []byte) (int, error) {
-	if len(data) < m.ProtoSize() {
-		panic("invalid byte slice")
-	}
-	n := copy(data, m[:])
-	return n, nil
-}
-
-// Marshal is used by gogoproto.
-func (m *ObjectLocation) Marshal() ([]byte, error) {
-	data := make([]byte, m.ProtoSize())
-	n, err := m.MarshalToSizedBuffer(data)
-	if err != nil {
-		return nil, err
-	}
-	return data[:n], err
-}
-
-// Unmarshal is used by gogoproto.
-func (m *ObjectLocation) Unmarshal(data []byte) error {
-	if len(data) < m.ProtoSize() {
-		panic("invalid byte slice")
-	}
-	copy(m[:], data)
-	return nil
-}
-
 const (
 	BlockInfoSize = unsafe.Sizeof(BlockInfo{})
 )
diff --git a/pkg/catalog/types.pb.go b/pkg/catalog/types.pb.go
deleted file mode 100644
index 0570e88d6..000000000
--- a/pkg/catalog/types.pb.go
+++ /dev/null
@@ -1,579 +0,0 @@
-// Code generated by protoc-gen-gogo. DO NOT EDIT.
-// source: types.proto
-
-package catalog
-
-import (
-	fmt "fmt"
-	io "io"
-	math "math"
-	math_bits "math/bits"
-
-	_ "github.com/gogo/protobuf/gogoproto"
-	proto "github.com/gogo/protobuf/proto"
-)
-
-// Reference imports to suppress errors if they are not otherwise used.
-var _ = proto.Marshal
-var _ = fmt.Errorf
-var _ = math.Inf
-
-// This is a compile-time assertion to ensure that this generated file
-// is compatible with the proto package it is being compiled against.
-// A compilation error at this line likely means your copy of the
-// proto package needs to be updated.
-const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
-
-func (m *BlockInfo) Reset()         { *m = BlockInfo{} }
-func (m *BlockInfo) String() string { return proto.CompactTextString(m) }
-func (*BlockInfo) ProtoMessage()    {}
-func (*BlockInfo) Descriptor() ([]byte, []int) {
-	return fileDescriptor_d938547f84707355, []int{0}
-}
-func (m *BlockInfo) XXX_Unmarshal(b []byte) error {
-	return m.Unmarshal(b)
-}
-func (m *BlockInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
-	if deterministic {
-		return xxx_messageInfo_BlockInfo.Marshal(b, m, deterministic)
-	} else {
-		b = b[:cap(b)]
-		n, err := m.MarshalToSizedBuffer(b)
-		if err != nil {
-			return nil, err
-		}
-		return b[:n], nil
-	}
-}
-func (m *BlockInfo) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_BlockInfo.Merge(m, src)
-}
-func (m *BlockInfo) XXX_Size() int {
-	return m.ProtoSize()
-}
-func (m *BlockInfo) XXX_DiscardUnknown() {
-	xxx_messageInfo_BlockInfo.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_BlockInfo proto.InternalMessageInfo
-
-func (m *BlockInfo) GetEntryState() bool {
-	if m != nil {
-		return m.EntryState
-	}
-	return false
-}
-
-func (m *BlockInfo) GetSorted() bool {
-	if m != nil {
-		return m.Sorted
-	}
-	return false
-}
-
-func init() {
-	proto.RegisterType((*BlockInfo)(nil), "catalog.BlockInfo")
-}
-
-func init() { proto.RegisterFile("types.proto", fileDescriptor_d938547f84707355) }
-
-var fileDescriptor_d938547f84707355 = []byte{
-	// 348 bytes of a gzipped FileDescriptorProto
-	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x91, 0xc1, 0x4e, 0xf2, 0x40,
-	0x14, 0x85, 0xdb, 0x1f, 0x7e, 0x0a, 0xa3, 0x71, 0x31, 0x0b, 0xd2, 0xb8, 0x18, 0x88, 0x2b, 0x36,
-	0x52, 0xa3, 0x1b, 0x43, 0x62, 0x62, 0x2a, 0x2c, 0x48, 0x30, 0x26, 0x2d, 0xee, 0x4c, 0xb4, 0x2d,
-	0x43, 0x1d, 0xa1, 0x73, 0x49, 0xb9, 0x24, 0xf2, 0x16, 0x3e, 0x82, 0xbe, 0x0d, 0xcb, 0x2e, 0x8d,
-	0x0b, 0xa2, 0xf4, 0x05, 0x7c, 0x04, 0x93, 0x69, 0x41, 0x56, 0x2e, 0xd8, 0xcd, 0x99, 0x7b, 0xcf,
-	0x77, 0x4e, 0x66, 0xc8, 0x1e, 0xce, 0x27, 0x7c, 0xda, 0x9c, 0xc4, 0x80, 0x40, 0x8d, 0xc0, 0x43,
-	0x6f, 0x0c, 0xe1, 0xe1, 0x71, 0x28, 0xf0, 0x71, 0xe6, 0x37, 0x03, 0x88, 0xac, 0x10, 0x42, 0xb0,
-	0xd4, 0xdc, 0x9f, 0x0d, 0x95, 0x52, 0x42, 0x9d, 0x32, 0xdf, 0x51, 0x52, 0x20, 0x15, 0x7b, 0x0c,
-	0xc1, 0xa8, 0x2b, 0x87, 0x40, 0xef, 0x89, 0x91, 0x89, 0xb6, 0xa9, 0xd7, 0xf5, 0xc6, 0xbe, 0xdd,
-	0x59, 0x2c, 0x6b, 0xda, 0xc7, 0xb2, 0x76, 0xb1, 0x45, 0x8d, 0x3c, 0x8c, 0xc5, 0x33, 0xc4, 0x22,
-	0x14, 0x72, 0x2d, 0x24, 0xb7, 0x26, 0xa3, 0xd0, 0x0a, 0x40, 0xa2, 0x27, 0x24, 0x8f, 0xad, 0xac,
-	0x9b, 0x82, 0x89, 0x81, 0xb3, 0xa6, 0x52, 0x46, 0x48, 0x47, 0x62, 0x3c, 0x77, 0xd1, 0x43, 0x6e,
-	0xfe, 0xab, 0xeb, 0x8d, 0xb2, 0xb3, 0x75, 0x43, 0xab, 0xa4, 0xe4, 0x42, 0x8c, 0x7c, 0x60, 0x16,
-	0xd4, 0x2c, 0x57, 0xf4, 0x84, 0x18, 0xd7, 0x1c, 0xbd, 0x1e, 0x04, 0x66, 0x51, 0x15, 0xab, 0xe6,
-	0xc5, 0x0e, 0x6e, 0xfc, 0x27, 0x1e, 0x60, 0x0f, 0x02, 0x0f, 0x05, 0x48, 0x67, 0xbd, 0x46, 0x4f,
-	0x49, 0xb9, 0xcd, 0xc7, 0x99, 0xe5, 0xff, 0x9f, 0x96, 0xcd, 0x1e, 0x7d, 0x20, 0x15, 0x97, 0x87,
-	0x11, 0x97, 0xd8, 0x6d, 0x9b, 0x25, 0x65, 0xb2, 0x73, 0x53, 0x6b, 0xb7, 0x07, 0xb8, 0x9d, 0x89,
-	0x81, 0xf3, 0x0b, 0xa5, 0x77, 0xa4, 0x7c, 0x05, 0x51, 0x24, 0xb0, 0x3f, 0x35, 0x0d, 0x15, 0x70,
-	0x99, 0x07, 0x9c, 0xef, 0x16, 0xd0, 0x77, 0x9d, 0x0d, 0xb1, 0x55, 0xfc, 0x7e, 0xab, 0x69, 0x76,
-	0x3d, 0xf9, 0x62, 0xda, 0x62, 0xc5, 0xf4, 0x64, 0xc5, 0xf4, 0xcf, 0x15, 0xd3, 0x5e, 0x52, 0xa6,
-	0xbd, 0xa6, 0x4c, 0x4f, 0x52, 0xa6, 0xbd, 0xa7, 0x4c, 0xf3, 0x4b, 0xea, 0xef, 0xcf, 0x7e, 0x02,
-	0x00, 0x00, 0xff, 0xff, 0x62, 0x12, 0x60, 0xcd, 0x42, 0x02, 0x00, 0x00,
-}
-
-func (m *BlockInfo) Marshal() (dAtA []byte, err error) {
-	size := m.ProtoSize()
-	dAtA = make([]byte, size)
-	n, err := m.MarshalToSizedBuffer(dAtA[:size])
-	if err != nil {
-		return nil, err
-	}
-	return dAtA[:n], nil
-}
-
-func (m *BlockInfo) MarshalTo(dAtA []byte) (int, error) {
-	size := m.ProtoSize()
-	return m.MarshalToSizedBuffer(dAtA[:size])
-}
-
-func (m *BlockInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) {
-	i := len(dAtA)
-	_ = i
-	var l int
-	_ = l
-	{
-		size := m.CommitTs.ProtoSize()
-		i -= size
-		if _, err := m.CommitTs.MarshalTo(dAtA[i:]); err != nil {
-			return 0, err
-		}
-		i = encodeVarintTypes(dAtA, i, uint64(size))
-	}
-	i--
-	dAtA[i] = 0x3a
-	{
-		size := m.SegmentID.ProtoSize()
-		i -= size
-		if _, err := m.SegmentID.MarshalTo(dAtA[i:]); err != nil {
-			return 0, err
-		}
-		i = encodeVarintTypes(dAtA, i, uint64(size))
-	}
-	i--
-	dAtA[i] = 0x32
-	{
-		size := m.DeltaLoc.ProtoSize()
-		i -= size
-		if _, err := m.DeltaLoc.MarshalTo(dAtA[i:]); err != nil {
-			return 0, err
-		}
-		i = encodeVarintTypes(dAtA, i, uint64(size))
-	}
-	i--
-	dAtA[i] = 0x2a
-	{
-		size := m.MetaLoc.ProtoSize()
-		i -= size
-		if _, err := m.MetaLoc.MarshalTo(dAtA[i:]); err != nil {
-			return 0, err
-		}
-		i = encodeVarintTypes(dAtA, i, uint64(size))
-	}
-	i--
-	dAtA[i] = 0x22
-	if m.Sorted {
-		i--
-		if m.Sorted {
-			dAtA[i] = 1
-		} else {
-			dAtA[i] = 0
-		}
-		i--
-		dAtA[i] = 0x18
-	}
-	if m.EntryState {
-		i--
-		if m.EntryState {
-			dAtA[i] = 1
-		} else {
-			dAtA[i] = 0
-		}
-		i--
-		dAtA[i] = 0x10
-	}
-	{
-		size := m.BlockID.ProtoSize()
-		i -= size
-		if _, err := m.BlockID.MarshalTo(dAtA[i:]); err != nil {
-			return 0, err
-		}
-		i = encodeVarintTypes(dAtA, i, uint64(size))
-	}
-	i--
-	dAtA[i] = 0xa
-	return len(dAtA) - i, nil
-}
-
-func encodeVarintTypes(dAtA []byte, offset int, v uint64) int {
-	offset -= sovTypes(v)
-	base := offset
-	for v >= 1<<7 {
-		dAtA[offset] = uint8(v&0x7f | 0x80)
-		v >>= 7
-		offset++
-	}
-	dAtA[offset] = uint8(v)
-	return base
-}
-func (m *BlockInfo) ProtoSize() (n int) {
-	if m == nil {
-		return 0
-	}
-	var l int
-	_ = l
-	l = m.BlockID.ProtoSize()
-	n += 1 + l + sovTypes(uint64(l))
-	if m.EntryState {
-		n += 2
-	}
-	if m.Sorted {
-		n += 2
-	}
-	l = m.MetaLoc.ProtoSize()
-	n += 1 + l + sovTypes(uint64(l))
-	l = m.DeltaLoc.ProtoSize()
-	n += 1 + l + sovTypes(uint64(l))
-	l = m.SegmentID.ProtoSize()
-	n += 1 + l + sovTypes(uint64(l))
-	l = m.CommitTs.ProtoSize()
-	n += 1 + l + sovTypes(uint64(l))
-	return n
-}
-
-func sovTypes(x uint64) (n int) {
-	return (math_bits.Len64(x|1) + 6) / 7
-}
-func sozTypes(x uint64) (n int) {
-	return sovTypes(uint64((x << 1) ^ uint64((int64(x) >> 63))))
-}
-func (m *BlockInfo) Unmarshal(dAtA []byte) error {
-	l := len(dAtA)
-	iNdEx := 0
-	for iNdEx < l {
-		preIndex := iNdEx
-		var wire uint64
-		for shift := uint(0); ; shift += 7 {
-			if shift >= 64 {
-				return ErrIntOverflowTypes
-			}
-			if iNdEx >= l {
-				return io.ErrUnexpectedEOF
-			}
-			b := dAtA[iNdEx]
-			iNdEx++
-			wire |= uint64(b&0x7F) << shift
-			if b < 0x80 {
-				break
-			}
-		}
-		fieldNum := int32(wire >> 3)
-		wireType := int(wire & 0x7)
-		if wireType == 4 {
-			return fmt.Errorf("proto: BlockInfo: wiretype end group for non-group")
-		}
-		if fieldNum <= 0 {
-			return fmt.Errorf("proto: BlockInfo: illegal tag %d (wire type %d)", fieldNum, wire)
-		}
-		switch fieldNum {
-		case 1:
-			if wireType != 2 {
-				return fmt.Errorf("proto: wrong wireType = %d for field BlockID", wireType)
-			}
-			var byteLen int
-			for shift := uint(0); ; shift += 7 {
-				if shift >= 64 {
-					return ErrIntOverflowTypes
-				}
-				if iNdEx >= l {
-					return io.ErrUnexpectedEOF
-				}
-				b := dAtA[iNdEx]
-				iNdEx++
-				byteLen |= int(b&0x7F) << shift
-				if b < 0x80 {
-					break
-				}
-			}
-			if byteLen < 0 {
-				return ErrInvalidLengthTypes
-			}
-			postIndex := iNdEx + byteLen
-			if postIndex < 0 {
-				return ErrInvalidLengthTypes
-			}
-			if postIndex > l {
-				return io.ErrUnexpectedEOF
-			}
-			if err := m.BlockID.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
-				return err
-			}
-			iNdEx = postIndex
-		case 2:
-			if wireType != 0 {
-				return fmt.Errorf("proto: wrong wireType = %d for field EntryState", wireType)
-			}
-			var v int
-			for shift := uint(0); ; shift += 7 {
-				if shift >= 64 {
-					return ErrIntOverflowTypes
-				}
-				if iNdEx >= l {
-					return io.ErrUnexpectedEOF
-				}
-				b := dAtA[iNdEx]
-				iNdEx++
-				v |= int(b&0x7F) << shift
-				if b < 0x80 {
-					break
-				}
-			}
-			m.EntryState = bool(v != 0)
-		case 3:
-			if wireType != 0 {
-				return fmt.Errorf("proto: wrong wireType = %d for field Sorted", wireType)
-			}
-			var v int
-			for shift := uint(0); ; shift += 7 {
-				if shift >= 64 {
-					return ErrIntOverflowTypes
-				}
-				if iNdEx >= l {
-					return io.ErrUnexpectedEOF
-				}
-				b := dAtA[iNdEx]
-				iNdEx++
-				v |= int(b&0x7F) << shift
-				if b < 0x80 {
-					break
-				}
-			}
-			m.Sorted = bool(v != 0)
-		case 4:
-			if wireType != 2 {
-				return fmt.Errorf("proto: wrong wireType = %d for field MetaLoc", wireType)
-			}
-			var byteLen int
-			for shift := uint(0); ; shift += 7 {
-				if shift >= 64 {
-					return ErrIntOverflowTypes
-				}
-				if iNdEx >= l {
-					return io.ErrUnexpectedEOF
-				}
-				b := dAtA[iNdEx]
-				iNdEx++
-				byteLen |= int(b&0x7F) << shift
-				if b < 0x80 {
-					break
-				}
-			}
-			if byteLen < 0 {
-				return ErrInvalidLengthTypes
-			}
-			postIndex := iNdEx + byteLen
-			if postIndex < 0 {
-				return ErrInvalidLengthTypes
-			}
-			if postIndex > l {
-				return io.ErrUnexpectedEOF
-			}
-			if err := m.MetaLoc.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
-				return err
-			}
-			iNdEx = postIndex
-		case 5:
-			if wireType != 2 {
-				return fmt.Errorf("proto: wrong wireType = %d for field DeltaLoc", wireType)
-			}
-			var byteLen int
-			for shift := uint(0); ; shift += 7 {
-				if shift >= 64 {
-					return ErrIntOverflowTypes
-				}
-				if iNdEx >= l {
-					return io.ErrUnexpectedEOF
-				}
-				b := dAtA[iNdEx]
-				iNdEx++
-				byteLen |= int(b&0x7F) << shift
-				if b < 0x80 {
-					break
-				}
-			}
-			if byteLen < 0 {
-				return ErrInvalidLengthTypes
-			}
-			postIndex := iNdEx + byteLen
-			if postIndex < 0 {
-				return ErrInvalidLengthTypes
-			}
-			if postIndex > l {
-				return io.ErrUnexpectedEOF
-			}
-			if err := m.DeltaLoc.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
-				return err
-			}
-			iNdEx = postIndex
-		case 6:
-			if wireType != 2 {
-				return fmt.Errorf("proto: wrong wireType = %d for field SegmentID", wireType)
-			}
-			var byteLen int
-			for shift := uint(0); ; shift += 7 {
-				if shift >= 64 {
-					return ErrIntOverflowTypes
-				}
-				if iNdEx >= l {
-					return io.ErrUnexpectedEOF
-				}
-				b := dAtA[iNdEx]
-				iNdEx++
-				byteLen |= int(b&0x7F) << shift
-				if b < 0x80 {
-					break
-				}
-			}
-			if byteLen < 0 {
-				return ErrInvalidLengthTypes
-			}
-			postIndex := iNdEx + byteLen
-			if postIndex < 0 {
-				return ErrInvalidLengthTypes
-			}
-			if postIndex > l {
-				return io.ErrUnexpectedEOF
-			}
-			if err := m.SegmentID.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
-				return err
-			}
-			iNdEx = postIndex
-		case 7:
-			if wireType != 2 {
-				return fmt.Errorf("proto: wrong wireType = %d for field CommitTs", wireType)
-			}
-			var byteLen int
-			for shift := uint(0); ; shift += 7 {
-				if shift >= 64 {
-					return ErrIntOverflowTypes
-				}
-				if iNdEx >= l {
-					return io.ErrUnexpectedEOF
-				}
-				b := dAtA[iNdEx]
-				iNdEx++
-				byteLen |= int(b&0x7F) << shift
-				if b < 0x80 {
-					break
-				}
-			}
-			if byteLen < 0 {
-				return ErrInvalidLengthTypes
-			}
-			postIndex := iNdEx + byteLen
-			if postIndex < 0 {
-				return ErrInvalidLengthTypes
-			}
-			if postIndex > l {
-				return io.ErrUnexpectedEOF
-			}
-			if err := m.CommitTs.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
-				return err
-			}
-			iNdEx = postIndex
-		default:
-			iNdEx = preIndex
-			skippy, err := skipTypes(dAtA[iNdEx:])
-			if err != nil {
-				return err
-			}
-			if (skippy < 0) || (iNdEx+skippy) < 0 {
-				return ErrInvalidLengthTypes
-			}
-			if (iNdEx + skippy) > l {
-				return io.ErrUnexpectedEOF
-			}
-			iNdEx += skippy
-		}
-	}
-
-	if iNdEx > l {
-		return io.ErrUnexpectedEOF
-	}
-	return nil
-}
-func skipTypes(dAtA []byte) (n int, err error) {
-	l := len(dAtA)
-	iNdEx := 0
-	depth := 0
-	for iNdEx < l {
-		var wire uint64
-		for shift := uint(0); ; shift += 7 {
-			if shift >= 64 {
-				return 0, ErrIntOverflowTypes
-			}
-			if iNdEx >= l {
-				return 0, io.ErrUnexpectedEOF
-			}
-			b := dAtA[iNdEx]
-			iNdEx++
-			wire |= (uint64(b) & 0x7F) << shift
-			if b < 0x80 {
-				break
-			}
-		}
-		wireType := int(wire & 0x7)
-		switch wireType {
-		case 0:
-			for shift := uint(0); ; shift += 7 {
-				if shift >= 64 {
-					return 0, ErrIntOverflowTypes
-				}
-				if iNdEx >= l {
-					return 0, io.ErrUnexpectedEOF
-				}
-				iNdEx++
-				if dAtA[iNdEx-1] < 0x80 {
-					break
-				}
-			}
-		case 1:
-			iNdEx += 8
-		case 2:
-			var length int
-			for shift := uint(0); ; shift += 7 {
-				if shift >= 64 {
-					return 0, ErrIntOverflowTypes
-				}
-				if iNdEx >= l {
-					return 0, io.ErrUnexpectedEOF
-				}
-				b := dAtA[iNdEx]
-				iNdEx++
-				length |= (int(b) & 0x7F) << shift
-				if b < 0x80 {
-					break
-				}
-			}
-			if length < 0 {
-				return 0, ErrInvalidLengthTypes
-			}
-			iNdEx += length
-		case 3:
-			depth++
-		case 4:
-			if depth == 0 {
-				return 0, ErrUnexpectedEndOfGroupTypes
-			}
-			depth--
-		case 5:
-			iNdEx += 4
-		default:
-			return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
-		}
-		if iNdEx < 0 {
-			return 0, ErrInvalidLengthTypes
-		}
-		if depth == 0 {
-			return iNdEx, nil
-		}
-	}
-	return 0, io.ErrUnexpectedEOF
-}
-
-var (
-	ErrInvalidLengthTypes        = fmt.Errorf("proto: negative length found during unmarshaling")
-	ErrIntOverflowTypes          = fmt.Errorf("proto: integer overflow")
-	ErrUnexpectedEndOfGroupTypes = fmt.Errorf("proto: unexpected end of group")
-)
diff --git a/pkg/catalog/types.proto b/pkg/catalog/types.proto
deleted file mode 100644
index 32737576b..000000000
--- a/pkg/catalog/types.proto
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Copyright 2021 Matrix Origin
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-syntax = "proto3";
-package catalog;
-
-import "github.com/gogo/protobuf/gogoproto/gogo.proto";
-
-option (gogoproto.sizer_all)                = false;
-option (gogoproto.protosizer_all)           = true;
-option (gogoproto.goproto_enum_prefix_all)  = false;
-option (gogoproto.goproto_unrecognized_all) = false;
-option (gogoproto.goproto_unkeyed_all)      = false;
-option (gogoproto.goproto_sizecache_all)    = false;
-
-message BlockInfo {
-    option (gogoproto.typedecl) = false;
-    bytes BlockID               = 1 [
-        (gogoproto.customtype) =
-            "github.com/matrixorigin/matrixone/pkg/container/types.Blockid",
-        (gogoproto.nullable) = false
-    ];
-    bool EntryState = 2;
-    bool Sorted     = 3;
-    bytes MetaLoc   = 4 [
-        (gogoproto.customtype) = "ObjectLocation",
-        (gogoproto.nullable)   = false
-    ];
-    bytes DeltaLoc = 5 [
-        (gogoproto.customtype) = "ObjectLocation",
-        (gogoproto.nullable)   = false
-    ];
-    bytes SegmentID = 6 [
-        (gogoproto.customtype) =
-            "github.com/matrixorigin/matrixone/pkg/container/types.Uuid",
-        (gogoproto.nullable) = false
-    ];
-    bytes CommitTs = 7 [
-        (gogoproto.customtype) =
-            "github.com/matrixorigin/matrixone/pkg/container/types.TS",
-        (gogoproto.nullable) = false
-    ];
-}


Test patch:
diff --git a/pkg/catalog/catalog_test.go b/pkg/catalog/catalog_test.go
index 2e5f43203..4d1c83413 100644
--- a/pkg/catalog/catalog_test.go
+++ b/pkg/catalog/catalog_test.go
@@ -13,9 +13,3 @@
 // limitations under the License.
 
 package catalog
-
-import "testing"
-
-func TestGenBlockMeta(t *testing.T) {
-	_ = GenBlockInfo(nil)
-}
diff --git a/pkg/catalog/types_test.go b/pkg/catalog/types_test.go
index 54fbba0c3..4d1c83413 100644
--- a/pkg/catalog/types_test.go
+++ b/pkg/catalog/types_test.go
@@ -13,24 +13,3 @@
 // limitations under the License.
 
 package catalog
-
-import (
-	"testing"
-
-	"github.com/stretchr/testify/require"
-)
-
-func TestObjectLocationMarshalAndUnmarshal(t *testing.T) {
-	var loc ObjectLocation
-	for i := 0; i < len(loc); i++ {
-		loc[i] = byte(i)
-	}
-
-	data, err := loc.Marshal()
-	require.NoError(t, err)
-
-	var ret ObjectLocation
-	err = ret.Unmarshal(data)
-	require.NoError(t, err)
-	require.Equal(t, loc, ret)
-}