@@ -319,6 +319,9 @@ func (ed *EncDatum) Encode(
319
319
}
320
320
}
321
321
322
+ // TODO(yuzefovich): evaluate whether this method can call
323
+ // colinfo.MustBeValueEncoded for most types. We need to be careful with
324
+ // mixed-version clusters since Fingerprint is used by row-by-row hash routers.
322
325
func mustUseValueEncodingForFingerprinting (t * types.T ) bool {
323
326
switch t .Family () {
324
327
// Both TSQuery and TSVector types don't have key-encoding, so we must use
@@ -328,6 +331,9 @@ func mustUseValueEncodingForFingerprinting(t *types.T) bool {
328
331
// behavior can result in incorrect results in mixed version clusters).
329
332
case types .JsonFamily , types .TSQueryFamily , types .TSVectorFamily , types .PGVectorFamily :
330
333
return true
334
+ case types .LTreeFamily :
335
+ // TODO(paulniziolek): remove this once key encoding is added.
336
+ return true
331
337
case types .ArrayFamily :
332
338
// Note that at time of this writing we don't support arrays of JSON
333
339
// (tracked via #23468) nor of TSQuery / TSVector / PGVector types (tracked by
@@ -348,7 +354,7 @@ func mustUseValueEncodingForFingerprinting(t *types.T) bool {
348
354
349
355
// Fingerprint appends a unique hash of ed to the given slice. If datums are intended
350
356
// to be deduplicated or grouped with hashes, this function should be used
351
- // instead of encode . Additionally, Fingerprint has the property that if the
357
+ // instead of Encode . Additionally, Fingerprint has the property that if the
352
358
// fingerprints of a set of datums are appended together, the resulting
353
359
// fingerprint will uniquely identify the set.
354
360
// It takes an optional (can be nil) memory account that should be updated if
0 commit comments