File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -309,7 +309,7 @@ bool testFilters(
309309template <TypeKind ToKind>
310310velox::variant convertFromString (const std::optional<std::string>& value) {
311311 if (value.has_value ()) {
312- if constexpr (ToKind == TypeKind::VARCHAR) {
312+ if constexpr (ToKind == TypeKind::VARCHAR || ToKind == TypeKind::VARBINARY ) {
313313 return velox::variant (value.value ());
314314 }
315315 bool nullOutput = false ;
Original file line number Diff line number Diff line change @@ -668,7 +668,10 @@ class BaseVector {
668668 // two unknowns but values cannot be assigned into an unknown 'left'
669669 // from a not-unknown 'right'.
670670 static bool compatibleKind (TypeKind left, TypeKind right) {
671- return left == right || right == TypeKind::UNKNOWN;
671+ // Vectors of VARCHAR and VARBINARY are compatible with each other.
672+ bool varcharAndBinary = (left == TypeKind::VARCHAR && right == TypeKind::VARBINARY) ||
673+ (left == TypeKind::VARBINARY && right == TypeKind::VARCHAR);
674+ return left == right || right == TypeKind::UNKNOWN || varcharAndBinary;
672675 }
673676
674677 // / Returns a brief summary of the vector. If 'recursive' is true, includes a
You can’t perform that action at this time.
0 commit comments