1#include "duckdb/function/cast/default_casts.hpp"
2#include "duckdb/function/cast/vector_cast_helpers.hpp"
3
4namespace duckdb {
5
6BoundCastInfo DefaultCasts::BitCastSwitch(BindCastInput &input, const LogicalType &source, const LogicalType &target) {
7 // now switch on the result type
8 switch (target.id()) {
9 case LogicalTypeId::VARCHAR:
10 // bit to varchar
11 return BoundCastInfo(&VectorCastHelpers::StringCast<string_t, duckdb::CastFromBit>);
12 default:
13 return DefaultCasts::TryVectorNullCast;
14 }
15}
16
17} // namespace duckdb
18