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