github.com/matrixorigin/matrixone@v0.7.0/pkg/sql/colexec/types.go (about) 1 // Copyright 2021 Matrix Origin 2 // 3 // Licensed under the Apache License, Version 2.0 (the "License"); 4 // you may not use this file except in compliance with the License. 5 // You may obtain a copy of the License at 6 // 7 // http://www.apache.org/licenses/LICENSE-2.0 8 // 9 // Unless required by applicable law or agreed to in writing, software 10 // distributed under the License is distributed on an "AS IS" BASIS, 11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 // See the License for the specific language governing permissions and 13 // limitations under the License. 14 15 package colexec 16 17 import ( 18 "sync" 19 20 "github.com/google/uuid" 21 "github.com/matrixorigin/matrixone/pkg/logservice" 22 "github.com/matrixorigin/matrixone/pkg/vm/process" 23 ) 24 25 type ResultPos struct { 26 Rel int32 27 Pos int32 28 } 29 30 func NewResultPos(rel int32, pos int32) ResultPos { 31 return ResultPos{Rel: rel, Pos: pos} 32 } 33 34 // ReceiveInfo used to spec which node, 35 // and which registers you need 36 type ReceiveInfo struct { 37 NodeAddr string 38 Uuid uuid.UUID 39 } 40 41 // TODO: remove batchCntMap when dispatch executor using the stream correctly 42 // Server used to support cn2s3 directly, for more info, refer to docs about it 43 type Server struct { 44 sync.Mutex 45 id uint64 46 mp map[uint64]*process.WaitRegister 47 48 hakeeper logservice.CNHAKeeperClient 49 CNSegmentId [12]byte 50 InitSegmentId bool 51 52 uuidCsChanMap UuidCsChanMap 53 } 54 55 type UuidCsChanMap struct { 56 sync.Mutex 57 mp map[uuid.UUID]chan process.WrapCs 58 }