Documentation
¶
Index ¶
- func DecodeKeyValsToCols(da *tree.DatumAlloc, vecs *coldata.TypedVecs, rowIdx int, indexColIdx []int, ...) (remainingKey []byte, foundNull bool, retScratch []byte, _ error)
- func DecodeTableValueToCol(da *tree.DatumAlloc, vecs *coldata.TypedVecs, vecIdx int, rowIdx int, ...) ([]byte, error)
- func UnmarshalColumnValueToCol(da *tree.DatumAlloc, vecs *coldata.TypedVecs, vecIdx, rowIdx int, typ *types.T, ...) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecodeKeyValsToCols ¶
func DecodeKeyValsToCols( da *tree.DatumAlloc, vecs *coldata.TypedVecs, rowIdx int, indexColIdx []int, checkAllColsForNull bool, keyCols []descpb.IndexFetchSpec_KeyColumn, unseen *util.FastIntSet, key []byte, scratch []byte, ) (remainingKey []byte, foundNull bool, retScratch []byte, _ error)
DecodeKeyValsToCols decodes the values that are part of the key, writing the result to the rowIdx'th row in coldata.TypedVecs.
If the unseen int set is non-nil, upon decoding the column with ordinal i, i will be removed from the set to facilitate tracking whether or not columns have been observed during decoding.
See the analog in rowenc/index_encoding.go.
DecodeKeyValsToCols additionally returns whether a NULL was encountered when decoding. Sometimes it is necessary to determine if the value of a column is NULL even though the value itself is not needed. If checkAllColsForNull is true, then foundNull=true will be returned if any columns in the key are NULL, regardless of whether or not indexColIdx indicates that the column should be decoded.
func DecodeTableValueToCol ¶
func DecodeTableValueToCol( da *tree.DatumAlloc, vecs *coldata.TypedVecs, vecIdx int, rowIdx int, typ encoding.Type, dataOffset int, valTyp *types.T, buf []byte, ) ([]byte, error)
DecodeTableValueToCol decodes a value encoded by EncodeTableValue, writing the result to the rowIdx'th position of the vecIdx'th vector in coldata.TypedVecs. See the analog in rowenc/column_type_encoding.go.
func UnmarshalColumnValueToCol ¶
func UnmarshalColumnValueToCol( da *tree.DatumAlloc, vecs *coldata.TypedVecs, vecIdx, rowIdx int, typ *types.T, value roachpb.Value, ) error
UnmarshalColumnValueToCol decodes the value from a roachpb.Value using the type expected by the column, writing into the vecIdx'th vector of coldata.TypedVecs at the given rowIdx. An error is returned if the value's type does not match the column's type. See the analog, rowenc.UnmarshalColumnValue, in rowenc/column_type_encoding.go.
Types ¶
This section is empty.