duckdb 0.4.1-dev216.0 → 0.4.1-dev223.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -91,8 +91,8 @@ public:
91
91
  * under the License.
92
92
  */
93
93
 
94
- #ifndef _THRIFT_THRIFT_H_
95
- #define _THRIFT_THRIFT_H_ 1
94
+ #ifndef _DUCKDB_THRIFT_THRIFT_H_
95
+ #define _DUCKDB_THRIFT_THRIFT_H_ 1
96
96
 
97
97
 
98
98
 
@@ -121,8 +121,8 @@ public:
121
121
 
122
122
  // clang-format off
123
123
 
124
- #ifndef _THRIFT_TRANSPORT_PLATFORM_SOCKET_H_
125
- # define _THRIFT_TRANSPORT_PLATFORM_SOCKET_H_
124
+ #ifndef _DUCKDB_THRIFT_TRANSPORT_PLATFORM_SOCKET_H_
125
+ # define _DUCKDB_THRIFT_TRANSPORT_PLATFORM_SOCKET_H_
126
126
 
127
127
  #ifdef _WIN32
128
128
  #ifdef _WINSOCKAPI_
@@ -236,7 +236,7 @@ public:
236
236
  # define THRIFT_SHUT_RDWR SHUT_RDWR
237
237
  #endif
238
238
 
239
- #endif // _THRIFT_TRANSPORT_PLATFORM_SOCKET_H_
239
+ #endif // _DUCKDB_THRIFT_TRANSPORT_PLATFORM_SOCKET_H_
240
240
 
241
241
 
242
242
  // LICENSE_CHANGE_END
@@ -329,8 +329,8 @@ public:
329
329
  * under the License.
330
330
  */
331
331
 
332
- #ifndef _THRIFT_TLOGGING_H_
333
- #define _THRIFT_TLOGGING_H_ 1
332
+ #ifndef _DUCKDB_THRIFT_TLOGGING_H_
333
+ #define _DUCKDB_THRIFT_TLOGGING_H_ 1
334
334
 
335
335
 
336
336
 
@@ -454,7 +454,7 @@ public:
454
454
  #define T_GENERIC_PROTOCOL(template_class, generic_prot, specific_prot)
455
455
  #endif
456
456
 
457
- #endif // #ifndef _THRIFT_TLOGGING_H_
457
+ #endif // #ifndef _DUCKDB_THRIFT_TLOGGING_H_
458
458
 
459
459
 
460
460
  // LICENSE_CHANGE_END
@@ -546,7 +546,7 @@ void profile_write_pprof(FILE* gen_calls_f, FILE* virtual_calls_f);
546
546
  }
547
547
  } // duckdb_apache::thrift
548
548
 
549
- #endif // #ifndef _THRIFT_THRIFT_H_
549
+ #endif // #ifndef _DUCKDB_THRIFT_THRIFT_H_
550
550
 
551
551
 
552
552
  // LICENSE_CHANGE_END
@@ -576,8 +576,8 @@ void profile_write_pprof(FILE* gen_calls_f, FILE* virtual_calls_f);
576
576
  * under the License.
577
577
  */
578
578
 
579
- #ifndef _THRIFT_TAPPLICATIONEXCEPTION_H_
580
- #define _THRIFT_TAPPLICATIONEXCEPTION_H_ 1
579
+ #ifndef _DUCKDB_THRIFT_TAPPLICATIONEXCEPTION_H_
580
+ #define _DUCKDB_THRIFT_TAPPLICATIONEXCEPTION_H_ 1
581
581
 
582
582
 
583
583
 
@@ -671,7 +671,7 @@ protected:
671
671
  }
672
672
  } // duckdb_apache::thrift
673
673
 
674
- #endif // #ifndef _THRIFT_TAPPLICATIONEXCEPTION_H_
674
+ #endif // #ifndef _DUCKDB_THRIFT_TAPPLICATIONEXCEPTION_H_
675
675
 
676
676
 
677
677
  // LICENSE_CHANGE_END
@@ -701,8 +701,8 @@ protected:
701
701
  * under the License.
702
702
  */
703
703
 
704
- #ifndef _THRIFT_TBASE_H_
705
- #define _THRIFT_TBASE_H_ 1
704
+ #ifndef _DUCKDB_THRIFT_TBASE_H_
705
+ #define _DUCKDB_THRIFT_TBASE_H_ 1
706
706
 
707
707
 
708
708
 
@@ -730,8 +730,8 @@ protected:
730
730
  * under the License.
731
731
  */
732
732
 
733
- #ifndef _THRIFT_PROTOCOL_TPROTOCOL_H_
734
- #define _THRIFT_PROTOCOL_TPROTOCOL_H_ 1
733
+ #ifndef _DUCKDB_THRIFT_PROTOCOL_TPROTOCOL_H_
734
+ #define _DUCKDB_THRIFT_PROTOCOL_TPROTOCOL_H_ 1
735
735
 
736
736
  #ifdef _WIN32
737
737
  // Need to come before any Windows.h includes
@@ -763,8 +763,8 @@ protected:
763
763
  * under the License.
764
764
  */
765
765
 
766
- #ifndef _THRIFT_TRANSPORT_TTRANSPORT_H_
767
- #define _THRIFT_TRANSPORT_TTRANSPORT_H_ 1
766
+ #ifndef _DUCKDB_THRIFT_TRANSPORT_TTRANSPORT_H_
767
+ #define _DUCKDB_THRIFT_TRANSPORT_TTRANSPORT_H_ 1
768
768
 
769
769
 
770
770
 
@@ -792,8 +792,8 @@ protected:
792
792
  * under the License.
793
793
  */
794
794
 
795
- #ifndef _THRIFT_TRANSPORT_TTRANSPORTEXCEPTION_H_
796
- #define _THRIFT_TRANSPORT_TTRANSPORTEXCEPTION_H_ 1
795
+ #ifndef _DUCKDB_THRIFT_TRANSPORT_TTRANSPORTEXCEPTION_H_
796
+ #define _DUCKDB_THRIFT_TRANSPORT_TTRANSPORTEXCEPTION_H_ 1
797
797
 
798
798
  // FUCK OFF #include <boost/numeric/conversion/cast.hpp>
799
799
  #include <string>
@@ -878,7 +878,7 @@ protected:
878
878
  }
879
879
  } // duckdb_apache::thrift::transport
880
880
 
881
- #endif // #ifndef _THRIFT_TRANSPORT_TTRANSPORTEXCEPTION_H_
881
+ #endif // #ifndef _DUCKDB_THRIFT_TRANSPORT_TTRANSPORTEXCEPTION_H_
882
882
 
883
883
 
884
884
  // LICENSE_CHANGE_END
@@ -1129,7 +1129,7 @@ public:
1129
1129
  }
1130
1130
  } // duckdb_apache::thrift::transport
1131
1131
 
1132
- #endif // #ifndef _THRIFT_TRANSPORT_TTRANSPORT_H_
1132
+ #endif // #ifndef _DUCKDB_THRIFT_TRANSPORT_TTRANSPORT_H_
1133
1133
 
1134
1134
 
1135
1135
  // LICENSE_CHANGE_END
@@ -1159,8 +1159,8 @@ public:
1159
1159
  * under the License.
1160
1160
  */
1161
1161
 
1162
- #ifndef _THRIFT_PROTOCOL_TPROTOCOLEXCEPTION_H_
1163
- #define _THRIFT_PROTOCOL_TPROTOCOLEXCEPTION_H_ 1
1162
+ #ifndef _DUCKDB_THRIFT_PROTOCOL_TPROTOCOLEXCEPTION_H_
1163
+ #define _DUCKDB_THRIFT_PROTOCOL_TPROTOCOLEXCEPTION_H_ 1
1164
1164
 
1165
1165
  #include <string>
1166
1166
 
@@ -1244,7 +1244,7 @@ protected:
1244
1244
  }
1245
1245
  } // duckdb_apache::thrift::protocol
1246
1246
 
1247
- #endif // #ifndef _THRIFT_PROTOCOL_TPROTOCOLEXCEPTION_H_
1247
+ #endif // #ifndef _DUCKDB_THRIFT_PROTOCOL_TPROTOCOLEXCEPTION_H_
1248
1248
 
1249
1249
 
1250
1250
  // LICENSE_CHANGE_END
@@ -1267,37 +1267,39 @@ protected:
1267
1267
  // but that doesn't work.
1268
1268
  // For a pretty in-depth explanation of the problem, see
1269
1269
  // http://cellperformance.beyond3d.com/articles/2006/06/understanding-strict-aliasing.html
1270
+ namespace duckdb_apache { namespace thrift {
1270
1271
  template <typename To, typename From>
1271
1272
  static inline To bitwise_cast(From from) {
1272
- static_assert(sizeof(From) == sizeof(To), "sizeof(From) == sizeof(To)");
1273
-
1274
- // BAD!!! These are all broken with -O2.
1275
- //return *reinterpret_cast<To*>(&from); // BAD!!!
1276
- //return *static_cast<To*>(static_cast<void*>(&from)); // BAD!!!
1277
- //return *(To*)(void*)&from; // BAD!!!
1278
-
1279
- // Super clean and paritally blessed by section 3.9 of the standard.
1280
- //unsigned char c[sizeof(from)];
1281
- //memcpy(c, &from, sizeof(from));
1282
- //To to;
1283
- //memcpy(&to, c, sizeof(c));
1284
- //return to;
1285
-
1286
- // Slightly more questionable.
1287
- // Same code emitted by GCC.
1288
- //To to;
1289
- //memcpy(&to, &from, sizeof(from));
1290
- //return to;
1291
-
1292
- // Technically undefined, but almost universally supported,
1293
- // and the most efficient implementation.
1294
- union {
1295
- From f;
1296
- To t;
1297
- } u;
1298
- u.f = from;
1299
- return u.t;
1273
+ static_assert(sizeof(From) == sizeof(To), "sizeof(From) == sizeof(To)");
1274
+
1275
+ // BAD!!! These are all broken with -O2.
1276
+ // return *reinterpret_cast<To*>(&from); // BAD!!!
1277
+ // return *static_cast<To*>(static_cast<void*>(&from)); // BAD!!!
1278
+ // return *(To*)(void*)&from; // BAD!!!
1279
+
1280
+ // Super clean and paritally blessed by section 3.9 of the standard.
1281
+ // unsigned char c[sizeof(from)];
1282
+ // memcpy(c, &from, sizeof(from));
1283
+ // To to;
1284
+ // memcpy(&to, c, sizeof(c));
1285
+ // return to;
1286
+
1287
+ // Slightly more questionable.
1288
+ // Same code emitted by GCC.
1289
+ // To to;
1290
+ // memcpy(&to, &from, sizeof(from));
1291
+ // return to;
1292
+
1293
+ // Technically undefined, but almost universally supported,
1294
+ // and the most efficient implementation.
1295
+ union {
1296
+ From f;
1297
+ To t;
1298
+ } u;
1299
+ u.f = from;
1300
+ return u.t;
1300
1301
  }
1302
+ }} // namespace duckdb_apache::thrift
1301
1303
 
1302
1304
 
1303
1305
  #ifdef HAVE_SYS_PARAM_H
@@ -1983,7 +1985,7 @@ uint32_t skip(Protocol_& prot, TType type) {
1983
1985
 
1984
1986
  }}} // duckdb_apache::thrift::protocol
1985
1987
 
1986
- #endif // #define _THRIFT_PROTOCOL_TPROTOCOL_H_ 1
1988
+ #endif // #define _DUCKDB_THRIFT_PROTOCOL_TPROTOCOL_H_ 1
1987
1989
 
1988
1990
 
1989
1991
  // LICENSE_CHANGE_END
@@ -2001,7 +2003,7 @@ public:
2001
2003
  }
2002
2004
  } // duckdb_apache::thrift
2003
2005
 
2004
- #endif // #ifndef _THRIFT_TBASE_H_
2006
+ #endif // #ifndef _DUCKDB_THRIFT_TBASE_H_
2005
2007
 
2006
2008
 
2007
2009
  // LICENSE_CHANGE_END
@@ -4651,8 +4653,8 @@ std::ostream& operator<<(std::ostream& out, const FileCryptoMetaData& obj);
4651
4653
  * under the License.
4652
4654
  */
4653
4655
 
4654
- #ifndef _THRIFT_PROTOCOL_TCOMPACTPROTOCOL_H_
4655
- #define _THRIFT_PROTOCOL_TCOMPACTPROTOCOL_H_ 1
4656
+ #ifndef _DUCKDB_THRIFT_PROTOCOL_TCOMPACTPROTOCOL_H_
4657
+ #define _DUCKDB_THRIFT_PROTOCOL_TCOMPACTPROTOCOL_H_ 1
4656
4658
 
4657
4659
 
4658
4660
 
@@ -4679,8 +4681,8 @@ std::ostream& operator<<(std::ostream& out, const FileCryptoMetaData& obj);
4679
4681
  * under the License.
4680
4682
  */
4681
4683
 
4682
- #ifndef _THRIFT_PROTOCOL_TVIRTUALPROTOCOL_H_
4683
- #define _THRIFT_PROTOCOL_TVIRTUALPROTOCOL_H_ 1
4684
+ #ifndef _DUCKDB_THRIFT_PROTOCOL_TVIRTUALPROTOCOL_H_
4685
+ #define _DUCKDB_THRIFT_PROTOCOL_TVIRTUALPROTOCOL_H_ 1
4684
4686
 
4685
4687
 
4686
4688
 
@@ -5172,7 +5174,7 @@ protected:
5172
5174
  }
5173
5175
  } // duckdb_apache::thrift::protocol
5174
5176
 
5175
- #endif // #define _THRIFT_PROTOCOL_TVIRTUALPROTOCOL_H_ 1
5177
+ #endif // #define _DUCKDB_THRIFT_PROTOCOL_TVIRTUALPROTOCOL_H_ 1
5176
5178
 
5177
5179
 
5178
5180
  // LICENSE_CHANGE_END
@@ -5441,8 +5443,8 @@ typedef TCompactProtocolFactoryT<TTransport> TCompactProtocolFactory;
5441
5443
  * specific language governing permissions and limitations
5442
5444
  * under the License.
5443
5445
  */
5444
- #ifndef _THRIFT_PROTOCOL_TCOMPACTPROTOCOL_TCC_
5445
- #define _THRIFT_PROTOCOL_TCOMPACTPROTOCOL_TCC_ 1
5446
+ #ifndef _DUCKDB_THRIFT_PROTOCOL_TCOMPACTPROTOCOL_TCC_
5447
+ #define _DUCKDB_THRIFT_PROTOCOL_TCOMPACTPROTOCOL_TCC_ 1
5446
5448
 
5447
5449
  #include <limits>
5448
5450
 
@@ -6248,7 +6250,7 @@ TType TCompactProtocolT<Transport_>::getTType(int8_t type) {
6248
6250
 
6249
6251
  }}} // duckdb_apache::thrift::protocol
6250
6252
 
6251
- #endif // _THRIFT_PROTOCOL_TCOMPACTPROTOCOL_TCC_
6253
+ #endif // _DUCKDB_THRIFT_PROTOCOL_TCOMPACTPROTOCOL_TCC_
6252
6254
 
6253
6255
 
6254
6256
  // LICENSE_CHANGE_END
@@ -6284,8 +6286,8 @@ TType TCompactProtocolT<Transport_>::getTType(int8_t type) {
6284
6286
  * under the License.
6285
6287
  */
6286
6288
 
6287
- #ifndef _THRIFT_TRANSPORT_TBUFFERTRANSPORTS_H_
6288
- #define _THRIFT_TRANSPORT_TBUFFERTRANSPORTS_H_ 1
6289
+ #ifndef _DUCKDB_THRIFT_TRANSPORT_TBUFFERTRANSPORTS_H_
6290
+ #define _DUCKDB_THRIFT_TRANSPORT_TBUFFERTRANSPORTS_H_ 1
6289
6291
 
6290
6292
  #include <cstdlib>
6291
6293
  #include <cstddef>
@@ -6319,8 +6321,8 @@ TType TCompactProtocolT<Transport_>::getTType(int8_t type) {
6319
6321
  * under the License.
6320
6322
  */
6321
6323
 
6322
- #ifndef _THRIFT_TRANSPORT_TVIRTUALTRANSPORT_H_
6323
- #define _THRIFT_TRANSPORT_TVIRTUALTRANSPORT_H_ 1
6324
+ #ifndef _DUCKDB_THRIFT_TRANSPORT_TVIRTUALTRANSPORT_H_
6325
+ #define _DUCKDB_THRIFT_TRANSPORT_TVIRTUALTRANSPORT_H_ 1
6324
6326
 
6325
6327
 
6326
6328
 
@@ -6439,7 +6441,7 @@ protected:
6439
6441
  }
6440
6442
  } // duckdb_apache::thrift::transport
6441
6443
 
6442
- #endif // #ifndef _THRIFT_TRANSPORT_TVIRTUALTRANSPORT_H_
6444
+ #endif // #ifndef _DUCKDB_THRIFT_TRANSPORT_TVIRTUALTRANSPORT_H_
6443
6445
 
6444
6446
 
6445
6447
  // LICENSE_CHANGE_END
@@ -6902,7 +6904,7 @@ protected:
6902
6904
  }
6903
6905
  } // duckdb_apache::thrift::transport
6904
6906
 
6905
- #endif // #ifndef _THRIFT_TRANSPORT_TBUFFERTRANSPORTS_H_
6907
+ #endif // #ifndef _DUCKDB_THRIFT_TRANSPORT_TBUFFERTRANSPORTS_H_
6906
6908
 
6907
6909
 
6908
6910
  // LICENSE_CHANGE_END