@@ -10,30 +10,30 @@ using duckdb::StringUtil;
1010
1111namespace duckdb {
1212
13- enum class PythonTVFType : uint8_t { TUPLES, ARROW_TABLE };
13+ enum class PythonTableUDFType : uint8_t { TUPLES, ARROW_TABLE };
1414
1515} // namespace duckdb
1616
17- using duckdb::PythonTVFType ;
17+ using duckdb::PythonTableUDFType ;
1818
1919namespace py = pybind11;
2020
21- static PythonTVFType PythonTVFTypeFromString (const string &type) {
21+ static PythonTableUDFType PythonTableUDFTypeFromString (const string &type) {
2222 auto ltype = StringUtil::Lower (type);
2323 if (ltype.empty () || ltype == " tuples" ) {
24- return PythonTVFType ::TUPLES;
24+ return PythonTableUDFType ::TUPLES;
2525 } else if (ltype == " arrow_table" ) {
26- return PythonTVFType ::ARROW_TABLE;
26+ return PythonTableUDFType ::ARROW_TABLE;
2727 } else {
2828 throw InvalidInputException (" '%s' is not a recognized type for 'tvf_type'" , type);
2929 }
3030}
3131
32- static PythonTVFType PythonTVFTypeFromInteger (int64_t value) {
32+ static PythonTableUDFType PythonTableUDFTypeFromInteger (int64_t value) {
3333 if (value == 0 ) {
34- return PythonTVFType ::TUPLES;
34+ return PythonTableUDFType ::TUPLES;
3535 } else if (value == 1 ) {
36- return PythonTVFType ::ARROW_TABLE;
36+ return PythonTableUDFType ::ARROW_TABLE;
3737 } else {
3838 throw InvalidInputException (" '%d' is not a recognized type for 'tvf_type'" , value);
3939 }
@@ -43,27 +43,27 @@ namespace PYBIND11_NAMESPACE {
4343namespace detail {
4444
4545template <>
46- struct type_caster <PythonTVFType > : public type_caster_base<PythonTVFType > {
47- using base = type_caster_base<PythonTVFType >;
48- PythonTVFType tmp;
46+ struct type_caster <PythonTableUDFType > : public type_caster_base<PythonTableUDFType > {
47+ using base = type_caster_base<PythonTableUDFType >;
48+ PythonTableUDFType tmp;
4949
5050public:
5151 bool load (handle src, bool convert) {
5252 if (base::load (src, convert)) {
5353 return true ;
5454 } else if (py::isinstance<py::str>(src)) {
55- tmp = PythonTVFTypeFromString (py::str (src));
55+ tmp = PythonTableUDFTypeFromString (py::str (src));
5656 value = &tmp;
5757 return true ;
5858 } else if (py::isinstance<py::int_>(src)) {
59- tmp = PythonTVFTypeFromInteger (src.cast <int64_t >());
59+ tmp = PythonTableUDFTypeFromInteger (src.cast <int64_t >());
6060 value = &tmp;
6161 return true ;
6262 }
6363 return false ;
6464 }
6565
66- static handle cast (PythonTVFType src, return_value_policy policy, handle parent) {
66+ static handle cast (PythonTableUDFType src, return_value_policy policy, handle parent) {
6767 return base::cast (src, policy, parent);
6868 }
6969};
0 commit comments