Skip to content

Commit

Permalink
Add unary_executor.patch
Browse files Browse the repository at this point in the history
  • Loading branch information
carlopi committed Sep 25, 2024
1 parent 5e6505e commit 7356332
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions patches/duckdb/unary_executor.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
diff --git a/src/include/duckdb/common/vector_operations/unary_executor.hpp b/src/include/duckdb/common/vector_operations/unary_executor.hpp
index 9f29d7410f..bf77c61e7a 100644
--- a/src/include/duckdb/common/vector_operations/unary_executor.hpp
+++ b/src/include/duckdb/common/vector_operations/unary_executor.hpp
@@ -136,6 +136,8 @@ private:
}
}

+#define DUCKDB_SMALLER_BINARY
+
template <class INPUT_TYPE, class RESULT_TYPE, class OPWRAPPER, class OP>
static inline void ExecuteStandard(Vector &input, Vector &result, idx_t count, void *dataptr, bool adds_nulls) {
switch (input.GetVectorType()) {
@@ -153,6 +155,7 @@ private:
}
break;
}
+#ifndef DUCKDB_SMALLER_BINARY
case VectorType::FLAT_VECTOR: {
result.SetVectorType(VectorType::FLAT_VECTOR);
auto result_data = FlatVector::GetData<RESULT_TYPE>(result);
@@ -162,6 +165,7 @@ private:
FlatVector::Validity(result), dataptr, adds_nulls);
break;
}
+#endif
default: {
UnifiedVectorFormat vdata;
input.ToUnifiedFormat(count, vdata);
@@ -176,6 +180,7 @@ private:
}
}
}
+#undef DUCKDB_SMALLER_BINARY

public:
template <class INPUT_TYPE, class RESULT_TYPE, class OP>

0 comments on commit 7356332

Please sign in to comment.