Generated by Cython 3.2.1
Yellow lines hint at Python interaction.
Click on a line that starts with a "+" to see the C code that Cython generated for it.
Raw output: dataframe.pxi
0001: # See: dataframe.md for technical overview.
0002:
+0003: from decimal import Decimal
{
PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Decimal};
__pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_decimal, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3, __pyx_L1_error)
}
__pyx_t_2 = __pyx_t_1;
__Pyx_GOTREF(__pyx_t_2);
{
PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Decimal};
__pyx_t_3 = 0; {
__pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(1, 3, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
}
}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
0004:
0005: from cpython.bytes cimport PyBytes_AsString
0006: from .mpdecimal_compat cimport decimal_pyobj_to_binary
0007:
0008: # Auto-flush settings.
0009: # The individual `interval`, `row_count` and `byte_count`
0010: # settings are set to `-1` when disabled.
0011: # If `.enabled`, then at least one of the settings are `!= -1`.
+0012: cdef struct auto_flush_mode_t:
struct __pyx_t_7questdb_7ingress_auto_flush_mode_t {
int enabled;
int64_t interval;
int64_t row_count;
int64_t byte_count;
};
0013: bint enabled
0014: int64_t interval
0015: int64_t row_count
0016: int64_t byte_count
0017:
0018:
+0019: cdef struct auto_flush_t:
struct __pyx_t_7questdb_7ingress_auto_flush_t {
struct line_sender *sender;
struct __pyx_t_7questdb_7ingress_auto_flush_mode_t mode;
int64_t *last_flush_ms;
};
0020: line_sender* sender
0021: auto_flush_mode_t mode
0022: int64_t* last_flush_ms
0023:
0024:
+0025: cdef auto_flush_t auto_flush_blank() noexcept nogil:
static struct __pyx_t_7questdb_7ingress_auto_flush_t __pyx_f_7questdb_7ingress_auto_flush_blank(void) {
struct __pyx_t_7questdb_7ingress_auto_flush_t __pyx_v_af;
struct __pyx_t_7questdb_7ingress_auto_flush_t __pyx_r;
/* … */
/* function exit code */
__pyx_L0:;
return __pyx_r;
}
0026: cdef auto_flush_t af
+0027: af.sender = NULL
__pyx_v_af.sender = NULL;
+0028: af.mode.enabled = False
__pyx_v_af.mode.enabled = 0;
+0029: af.mode.interval = -1
__pyx_v_af.mode.interval = -1L;
+0030: af.mode.row_count = -1
__pyx_v_af.mode.row_count = -1L;
+0031: af.mode.byte_count = -1
__pyx_v_af.mode.byte_count = -1L;
+0032: af.last_flush_ms = NULL
__pyx_v_af.last_flush_ms = NULL;
+0033: return af
__pyx_r = __pyx_v_af; goto __pyx_L0;
0034:
+0035: cdef bint should_auto_flush(
static int __pyx_f_7questdb_7ingress_should_auto_flush(struct __pyx_t_7questdb_7ingress_auto_flush_mode_t const *__pyx_v_af_mode, struct line_sender_buffer *__pyx_v_ls_buf, int64_t __pyx_v_last_flush_ms) {
int __pyx_r;
/* … */
/* function exit code */
__pyx_L0:;
return __pyx_r;
}
0036: const auto_flush_mode_t* af_mode,
0037: line_sender_buffer* ls_buf,
0038: int64_t last_flush_ms):
+0039: if not af_mode.enabled:
__pyx_t_1 = (!(__pyx_v_af_mode->enabled != 0));
if (__pyx_t_1) {
/* … */
}
+0040: return False
__pyx_r = 0;
goto __pyx_L0;
0041:
0042: # Check `auto_flush_rows` breach.
+0043: if (af_mode.row_count != -1) and \
__pyx_t_2 = (__pyx_v_af_mode->row_count != -1L);
if (__pyx_t_2) {
} else {
__pyx_t_1 = __pyx_t_2;
goto __pyx_L5_bool_binop_done;
}
/* … */
if (__pyx_t_1) {
/* … */
}
+0044: (<int64_t>line_sender_buffer_row_count(ls_buf) >= af_mode.row_count):
__pyx_t_2 = (((int64_t)line_sender_buffer_row_count(__pyx_v_ls_buf)) >= __pyx_v_af_mode->row_count); __pyx_t_1 = __pyx_t_2; __pyx_L5_bool_binop_done:;
+0045: return True
__pyx_r = 1;
goto __pyx_L0;
0046:
0047: # Check `auto_flush_bytes` breach.
+0048: if (af_mode.byte_count != -1) and \
__pyx_t_2 = (__pyx_v_af_mode->byte_count != -1L);
if (__pyx_t_2) {
} else {
__pyx_t_1 = __pyx_t_2;
goto __pyx_L8_bool_binop_done;
}
/* … */
if (__pyx_t_1) {
/* … */
}
+0049: (<int64_t>line_sender_buffer_size(ls_buf) >= af_mode.byte_count):
__pyx_t_2 = (((int64_t)line_sender_buffer_size(__pyx_v_ls_buf)) >= __pyx_v_af_mode->byte_count); __pyx_t_1 = __pyx_t_2; __pyx_L8_bool_binop_done:;
+0050: return True
__pyx_r = 1;
goto __pyx_L0;
0051:
0052: # Check for interval breach.
+0053: if (af_mode.interval != -1) and \
__pyx_t_2 = (__pyx_v_af_mode->interval != -1L);
if (__pyx_t_2) {
} else {
__pyx_t_1 = __pyx_t_2;
goto __pyx_L11_bool_binop_done;
}
/* … */
if (__pyx_t_1) {
/* … */
}
+0054: (((line_sender_now_micros() / 1000) - last_flush_ms) >= af_mode.interval):
__pyx_t_2 = (((((double)line_sender_now_micros()) / 1000.0) - __pyx_v_last_flush_ms) >= __pyx_v_af_mode->interval); __pyx_t_1 = __pyx_t_2; __pyx_L11_bool_binop_done:;
+0055: return True
__pyx_r = 1;
goto __pyx_L0;
0056:
+0057: return False
__pyx_r = 0; goto __pyx_L0;
0058:
+0059: cdef inline uint32_t bswap32(uint32_t value) noexcept:
static CYTHON_INLINE uint32_t __pyx_f_7questdb_7ingress_bswap32(uint32_t __pyx_v_value) {
uint32_t __pyx_r;
/* … */
/* function exit code */
__pyx_L0:;
return __pyx_r;
}
0060: return (((value & 0xFF000000u) >> 24u) |
0061: ((value & 0x00FF0000u) >> 8u) |
+0062: ((value & 0x0000FF00u) << 8u) |
__pyx_r = (((((__pyx_v_value & 0xFF000000U) >> 24U) | ((__pyx_v_value & 0x00FF0000U) >> 8U)) | ((__pyx_v_value & 0x0000FF00U) << 8U)) | ((__pyx_v_value & 0x000000FFU) << 24U)); goto __pyx_L0;
0063: ((value & 0x000000FFu) << 24u))
0064:
+0065: cdef inline uint64_t bswap64(uint64_t value) noexcept:
static CYTHON_INLINE uint64_t __pyx_f_7questdb_7ingress_bswap64(uint64_t __pyx_v_value) {
uint64_t __pyx_r;
/* … */
/* function exit code */
__pyx_L0:;
return __pyx_r;
}
0066: return (((value & 0xFF00000000000000u) >> 56u) |
0067: ((value & 0x00FF000000000000u) >> 40u) |
0068: ((value & 0x0000FF0000000000u) >> 24u) |
0069: ((value & 0x000000FF00000000u) >> 8u) |
0070: ((value & 0x00000000FF000000u) << 8u) |
0071: ((value & 0x0000000000FF0000u) << 24u) |
+0072: ((value & 0x000000000000FF00u) << 40u) |
__pyx_r = (((((((((__pyx_v_value & 0xFF00000000000000U) >> 56U) | ((__pyx_v_value & 0x00FF000000000000U) >> 40U)) | ((__pyx_v_value & 0x0000FF0000000000U) >> 24U)) | ((__pyx_v_value & 0x000000FF00000000U) >> 8U)) | ((__pyx_v_value & 0x00000000FF000000U) << 8U)) | ((__pyx_v_value & 0x0000000000FF0000U) << 24U)) | ((__pyx_v_value & 0x000000000000FF00U) << 40U)) | ((__pyx_v_value & 0x00000000000000FFU) << 56U)); goto __pyx_L0;
0073: ((value & 0x00000000000000FFu) << 56u))
0074:
+0075: cdef struct col_chunks_t:
struct __pyx_t_7questdb_7ingress_col_chunks_t {
size_t n_chunks;
struct ArrowArray *chunks;
};
0076: size_t n_chunks
0077: ArrowArray* chunks # We calloc `n_chunks + 1` of these.
0078:
0079:
+0080: cdef struct col_cursor_t:
struct __pyx_t_7questdb_7ingress_col_cursor_t {
struct ArrowArray *chunk;
size_t chunk_index;
size_t offset;
};
0081: ArrowArray* chunk # Current chunk.
0082: size_t chunk_index
0083: size_t offset # i.e. the element index (not byte offset)
0084:
0085:
+0086: cdef enum col_target_t:
enum __pyx_t_7questdb_7ingress_col_target_t {
__pyx_e_7questdb_7ingress_col_target_skip = 0,
__pyx_e_7questdb_7ingress_col_target_table = 1,
__pyx_e_7questdb_7ingress_col_target_symbol = 2,
__pyx_e_7questdb_7ingress_col_target_column_bool = 3,
__pyx_e_7questdb_7ingress_col_target_column_i64 = 4,
__pyx_e_7questdb_7ingress_col_target_column_f64 = 5,
__pyx_e_7questdb_7ingress_col_target_column_str = 6,
__pyx_e_7questdb_7ingress_col_target_column_ts = 7,
__pyx_e_7questdb_7ingress_col_target_column_arr_f64 = 8,
__pyx_e_7questdb_7ingress_col_target_column_decimal = 9,
__pyx_e_7questdb_7ingress_col_target_at = 10
};
0087: col_target_skip = 0
0088: col_target_table = 1
0089: col_target_symbol = 2
0090: col_target_column_bool = 3
0091: col_target_column_i64 = 4
0092: col_target_column_f64 = 5
0093: col_target_column_str = 6
0094: col_target_column_ts = 7
0095: col_target_column_arr_f64 = 8
0096: col_target_column_decimal = 9
0097: col_target_at = 10
0098:
0099:
0100: cdef dict _TARGET_NAMES = {
+0101: col_target_t.col_target_skip: "skipped",
__pyx_t_2 = __Pyx_PyDict_NewPresized(11); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 101, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyLong_From_enum____pyx_t_7questdb_7ingress_col_target_t(__pyx_e_7questdb_7ingress_col_target_skip); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 101, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_t_2, __pyx_t_4, __pyx_mstate_global->__pyx_n_u_skipped) < (0)) __PYX_ERR(1, 101, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+0102: col_target_t.col_target_table: "table name",
__pyx_t_4 = __Pyx_PyLong_From_enum____pyx_t_7questdb_7ingress_col_target_t(__pyx_e_7questdb_7ingress_col_target_table); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 102, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_t_2, __pyx_t_4, __pyx_mstate_global->__pyx_kp_u_table_name_2) < (0)) __PYX_ERR(1, 101, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+0103: col_target_t.col_target_symbol: "symbol",
__pyx_t_4 = __Pyx_PyLong_From_enum____pyx_t_7questdb_7ingress_col_target_t(__pyx_e_7questdb_7ingress_col_target_symbol); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 103, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_t_2, __pyx_t_4, __pyx_mstate_global->__pyx_n_u_symbol) < (0)) __PYX_ERR(1, 101, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+0104: col_target_t.col_target_column_bool: "boolean",
__pyx_t_4 = __Pyx_PyLong_From_enum____pyx_t_7questdb_7ingress_col_target_t(__pyx_e_7questdb_7ingress_col_target_column_bool); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 104, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_t_2, __pyx_t_4, __pyx_mstate_global->__pyx_n_u_boolean) < (0)) __PYX_ERR(1, 101, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+0105: col_target_t.col_target_column_i64: "integer",
__pyx_t_4 = __Pyx_PyLong_From_enum____pyx_t_7questdb_7ingress_col_target_t(__pyx_e_7questdb_7ingress_col_target_column_i64); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 105, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_t_2, __pyx_t_4, __pyx_mstate_global->__pyx_n_u_integer) < (0)) __PYX_ERR(1, 101, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+0106: col_target_t.col_target_column_f64: "float",
__pyx_t_4 = __Pyx_PyLong_From_enum____pyx_t_7questdb_7ingress_col_target_t(__pyx_e_7questdb_7ingress_col_target_column_f64); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 106, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_t_2, __pyx_t_4, __pyx_mstate_global->__pyx_n_u_float) < (0)) __PYX_ERR(1, 101, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+0107: col_target_t.col_target_column_str: "string",
__pyx_t_4 = __Pyx_PyLong_From_enum____pyx_t_7questdb_7ingress_col_target_t(__pyx_e_7questdb_7ingress_col_target_column_str); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 107, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_t_2, __pyx_t_4, __pyx_mstate_global->__pyx_n_u_string) < (0)) __PYX_ERR(1, 101, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+0108: col_target_t.col_target_column_ts: "timestamp",
__pyx_t_4 = __Pyx_PyLong_From_enum____pyx_t_7questdb_7ingress_col_target_t(__pyx_e_7questdb_7ingress_col_target_column_ts); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 108, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_t_2, __pyx_t_4, __pyx_mstate_global->__pyx_n_u_timestamp) < (0)) __PYX_ERR(1, 101, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+0109: col_target_t.col_target_column_arr_f64: "array",
__pyx_t_4 = __Pyx_PyLong_From_enum____pyx_t_7questdb_7ingress_col_target_t(__pyx_e_7questdb_7ingress_col_target_column_arr_f64); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 109, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_t_2, __pyx_t_4, __pyx_mstate_global->__pyx_n_u_array) < (0)) __PYX_ERR(1, 101, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+0110: col_target_t.col_target_column_decimal: "decimal",
__pyx_t_4 = __Pyx_PyLong_From_enum____pyx_t_7questdb_7ingress_col_target_t(__pyx_e_7questdb_7ingress_col_target_column_decimal); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 110, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_t_2, __pyx_t_4, __pyx_mstate_global->__pyx_n_u_decimal) < (0)) __PYX_ERR(1, 101, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+0111: col_target_t.col_target_at: "designated timestamp",
__pyx_t_4 = __Pyx_PyLong_From_enum____pyx_t_7questdb_7ingress_col_target_t(__pyx_e_7questdb_7ingress_col_target_at); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 111, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_t_2, __pyx_t_4, __pyx_mstate_global->__pyx_kp_u_designated_timestamp) < (0)) __PYX_ERR(1, 101, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XGOTREF(__pyx_v_7questdb_7ingress__TARGET_NAMES); __Pyx_DECREF_SET(__pyx_v_7questdb_7ingress__TARGET_NAMES, ((PyObject*)__pyx_t_2)); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0;
0112: }
0113:
0114:
+0115: cdef enum col_source_t:
enum __pyx_t_7questdb_7ingress_col_source_t {
__pyx_e_7questdb_7ingress_col_source_nulls = 0,
__pyx_e_7questdb_7ingress_col_source_bool_pyobj = 0x18AEC,
__pyx_e_7questdb_7ingress_col_source_bool_numpy = 0x18E70,
__pyx_e_7questdb_7ingress_col_source_bool_arrow = 0x19258,
__pyx_e_7questdb_7ingress_col_source_int_pyobj = 0x3118C,
__pyx_e_7questdb_7ingress_col_source_u8_numpy = 0x31510,
__pyx_e_7questdb_7ingress_col_source_i8_numpy = 0x318F8,
__pyx_e_7questdb_7ingress_col_source_u16_numpy = 0x31CE0,
__pyx_e_7questdb_7ingress_col_source_i16_numpy = 0x320C8,
__pyx_e_7questdb_7ingress_col_source_u32_numpy = 0x324B0,
__pyx_e_7questdb_7ingress_col_source_i32_numpy = 0x32898,
__pyx_e_7questdb_7ingress_col_source_u64_numpy = 0x32C80,
__pyx_e_7questdb_7ingress_col_source_i64_numpy = 0x33068,
__pyx_e_7questdb_7ingress_col_source_u8_arrow = 0x33450,
__pyx_e_7questdb_7ingress_col_source_i8_arrow = 0x33838,
__pyx_e_7questdb_7ingress_col_source_u16_arrow = 0x33C20,
__pyx_e_7questdb_7ingress_col_source_i16_arrow = 0x34008,
__pyx_e_7questdb_7ingress_col_source_u32_arrow = 0x343F0,
__pyx_e_7questdb_7ingress_col_source_i32_arrow = 0x347D8,
__pyx_e_7questdb_7ingress_col_source_u64_arrow = 0x34BC0,
__pyx_e_7questdb_7ingress_col_source_i64_arrow = 0x34FA8,
__pyx_e_7questdb_7ingress_col_source_float_pyobj = 0x4982C,
__pyx_e_7questdb_7ingress_col_source_f32_numpy = 0x49BB0,
__pyx_e_7questdb_7ingress_col_source_f64_numpy = 0x49F98,
__pyx_e_7questdb_7ingress_col_source_f32_arrow = 0x4A380,
__pyx_e_7questdb_7ingress_col_source_f64_arrow = 0x4A768,
__pyx_e_7questdb_7ingress_col_source_str_pyobj = 0x61ECC,
__pyx_e_7questdb_7ingress_col_source_str_utf8_arrow = 0x62250,
__pyx_e_7questdb_7ingress_col_source_str_i8_cat = 0x62638,
__pyx_e_7questdb_7ingress_col_source_str_i16_cat = 0x62A20,
__pyx_e_7questdb_7ingress_col_source_str_i32_cat = 0x62E08,
__pyx_e_7questdb_7ingress_col_source_str_lrg_utf8_arrow = 0x631F0,
__pyx_e_7questdb_7ingress_col_source_dt64ns_numpy = 0x7A508,
__pyx_e_7questdb_7ingress_col_source_dt64ns_tz_arrow = 0x7A8F0,
__pyx_e_7questdb_7ingress_col_source_dt64us_numpy = 0x92BA8,
__pyx_e_7questdb_7ingress_col_source_dt64us_tz_arrow = 0x92F90,
__pyx_e_7questdb_7ingress_col_source_arr_f64_numpyobj = 0xAB2AC,
__pyx_e_7questdb_7ingress_col_source_decimal_pyobj = 0xC394C,
__pyx_e_7questdb_7ingress_col_source_decimal32_arrow = 0xC3CD0,
__pyx_e_7questdb_7ingress_col_source_decimal64_arrow = 0xC40B8,
__pyx_e_7questdb_7ingress_col_source_decimal128_arrow = 0xC44A0,
__pyx_e_7questdb_7ingress_col_source_decimal256_arrow = 0xC4888
};
0116: # Note: Hundreds digit set to 1 if GIL is required.
0117: col_source_nulls = 0
0118: col_source_bool_pyobj = 101100
0119: col_source_bool_numpy = 102000
0120: col_source_bool_arrow = 103000
0121: col_source_int_pyobj = 201100
0122: col_source_u8_numpy = 202000
0123: col_source_i8_numpy = 203000
0124: col_source_u16_numpy = 204000
0125: col_source_i16_numpy = 205000
0126: col_source_u32_numpy = 206000
0127: col_source_i32_numpy = 207000
0128: col_source_u64_numpy = 208000
0129: col_source_i64_numpy = 209000
0130: col_source_u8_arrow = 210000
0131: col_source_i8_arrow = 211000
0132: col_source_u16_arrow = 212000
0133: col_source_i16_arrow = 213000
0134: col_source_u32_arrow = 214000
0135: col_source_i32_arrow = 215000
0136: col_source_u64_arrow = 216000
0137: col_source_i64_arrow = 217000
0138: col_source_float_pyobj = 301100
0139: col_source_f32_numpy = 302000
0140: col_source_f64_numpy = 303000
0141: col_source_f32_arrow = 304000
0142: col_source_f64_arrow = 305000
0143: col_source_str_pyobj = 401100
0144: col_source_str_utf8_arrow = 402000
0145: col_source_str_i8_cat = 403000
0146: col_source_str_i16_cat = 404000
0147: col_source_str_i32_cat = 405000
0148: col_source_str_lrg_utf8_arrow = 406000
0149: col_source_dt64ns_numpy = 501000
0150: col_source_dt64ns_tz_arrow = 502000
0151: col_source_dt64us_numpy = 601000
0152: col_source_dt64us_tz_arrow = 602000
0153: col_source_arr_f64_numpyobj = 701100
0154: col_source_decimal_pyobj = 801100
0155: col_source_decimal32_arrow = 802000
0156: col_source_decimal64_arrow = 803000
0157: col_source_decimal128_arrow = 804000
0158: col_source_decimal256_arrow = 805000
0159:
0160:
+0161: cdef bint col_source_needs_gil(col_source_t source) noexcept nogil:
static int __pyx_f_7questdb_7ingress_col_source_needs_gil(enum __pyx_t_7questdb_7ingress_col_source_t __pyx_v_source) {
int __pyx_r;
/* … */
/* function exit code */
__pyx_L0:;
return __pyx_r;
}
0162: # Check if hundreds digit is 1.
+0163: return <int>source // 100 % 10 == 1
__pyx_r = (__Pyx_mod_long(__Pyx_div_long(((int)__pyx_v_source), 0x64, 1), 10, 1) == 1); goto __pyx_L0;
0164:
0165:
0166: cdef set _STR_SOURCES = {
+0167: col_source_t.col_source_str_pyobj,
__pyx_t_2 = __Pyx_PyLong_From_enum____pyx_t_7questdb_7ingress_col_source_t(__pyx_e_7questdb_7ingress_col_source_str_pyobj); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 167, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2);
+0168: col_source_t.col_source_str_utf8_arrow,
__pyx_t_4 = __Pyx_PyLong_From_enum____pyx_t_7questdb_7ingress_col_source_t(__pyx_e_7questdb_7ingress_col_source_str_utf8_arrow); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 168, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4);
+0169: col_source_t.col_source_str_lrg_utf8_arrow,
__pyx_t_5 = __Pyx_PyLong_From_enum____pyx_t_7questdb_7ingress_col_source_t(__pyx_e_7questdb_7ingress_col_source_str_lrg_utf8_arrow); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 169, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5);
+0170: col_source_t.col_source_str_i8_cat,
__pyx_t_6 = __Pyx_PyLong_From_enum____pyx_t_7questdb_7ingress_col_source_t(__pyx_e_7questdb_7ingress_col_source_str_i8_cat); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 170, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6);
+0171: col_source_t.col_source_str_i16_cat,
__pyx_t_7 = __Pyx_PyLong_From_enum____pyx_t_7questdb_7ingress_col_source_t(__pyx_e_7questdb_7ingress_col_source_str_i16_cat); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 171, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7);
+0172: col_source_t.col_source_str_i32_cat,
__pyx_t_8 = __Pyx_PyLong_From_enum____pyx_t_7questdb_7ingress_col_source_t(__pyx_e_7questdb_7ingress_col_source_str_i32_cat); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 172, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = PySet_New(0); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 167, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); if (PySet_Add(__pyx_t_9, __pyx_t_2) < (0)) __PYX_ERR(1, 167, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (PySet_Add(__pyx_t_9, __pyx_t_4) < (0)) __PYX_ERR(1, 167, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (PySet_Add(__pyx_t_9, __pyx_t_5) < (0)) __PYX_ERR(1, 167, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PySet_Add(__pyx_t_9, __pyx_t_6) < (0)) __PYX_ERR(1, 167, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (PySet_Add(__pyx_t_9, __pyx_t_7) < (0)) __PYX_ERR(1, 167, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (PySet_Add(__pyx_t_9, __pyx_t_8) < (0)) __PYX_ERR(1, 167, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XGOTREF(__pyx_v_7questdb_7ingress__STR_SOURCES); __Pyx_DECREF_SET(__pyx_v_7questdb_7ingress__STR_SOURCES, ((PyObject*)__pyx_t_9)); __Pyx_GIVEREF(__pyx_t_9); __pyx_t_9 = 0;
0173: }
0174:
0175:
0176: cdef dict _PYOBJ_SOURCE_DESCR = {
+0177: col_source_t.col_source_bool_pyobj: "bool",
__pyx_t_9 = __Pyx_PyDict_NewPresized(5); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 177, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_8 = __Pyx_PyLong_From_enum____pyx_t_7questdb_7ingress_col_source_t(__pyx_e_7questdb_7ingress_col_source_bool_pyobj); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 177, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); if (PyDict_SetItem(__pyx_t_9, __pyx_t_8, __pyx_mstate_global->__pyx_n_u_bool) < (0)) __PYX_ERR(1, 177, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+0178: col_source_t.col_source_int_pyobj: "int",
__pyx_t_8 = __Pyx_PyLong_From_enum____pyx_t_7questdb_7ingress_col_source_t(__pyx_e_7questdb_7ingress_col_source_int_pyobj); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 178, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); if (PyDict_SetItem(__pyx_t_9, __pyx_t_8, __pyx_mstate_global->__pyx_n_u_int) < (0)) __PYX_ERR(1, 177, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+0179: col_source_t.col_source_float_pyobj: "float",
__pyx_t_8 = __Pyx_PyLong_From_enum____pyx_t_7questdb_7ingress_col_source_t(__pyx_e_7questdb_7ingress_col_source_float_pyobj); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 179, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); if (PyDict_SetItem(__pyx_t_9, __pyx_t_8, __pyx_mstate_global->__pyx_n_u_float) < (0)) __PYX_ERR(1, 177, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+0180: col_source_t.col_source_str_pyobj: "str",
__pyx_t_8 = __Pyx_PyLong_From_enum____pyx_t_7questdb_7ingress_col_source_t(__pyx_e_7questdb_7ingress_col_source_str_pyobj); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 180, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); if (PyDict_SetItem(__pyx_t_9, __pyx_t_8, __pyx_mstate_global->__pyx_n_u_str) < (0)) __PYX_ERR(1, 177, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+0181: col_source_t.col_source_decimal_pyobj: "Decimal",
__pyx_t_8 = __Pyx_PyLong_From_enum____pyx_t_7questdb_7ingress_col_source_t(__pyx_e_7questdb_7ingress_col_source_decimal_pyobj); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 181, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); if (PyDict_SetItem(__pyx_t_9, __pyx_t_8, __pyx_mstate_global->__pyx_n_u_Decimal) < (0)) __PYX_ERR(1, 177, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XGOTREF(__pyx_v_7questdb_7ingress__PYOBJ_SOURCE_DESCR); __Pyx_DECREF_SET(__pyx_v_7questdb_7ingress__PYOBJ_SOURCE_DESCR, ((PyObject*)__pyx_t_9)); __Pyx_GIVEREF(__pyx_t_9); __pyx_t_9 = 0;
0182: }
0183:
0184:
0185: cdef dict _TARGET_TO_SOURCES = {
+0186: col_target_t.col_target_skip: {
__pyx_t_9 = __Pyx_PyDict_NewPresized(11); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 186, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_8 = __Pyx_PyLong_From_enum____pyx_t_7questdb_7ingress_col_target_t(__pyx_e_7questdb_7ingress_col_target_skip); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 186, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8);
+0187: col_source_t.col_source_nulls,
__pyx_t_7 = __Pyx_PyLong_From_enum____pyx_t_7questdb_7ingress_col_source_t(__pyx_e_7questdb_7ingress_col_source_nulls); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 187, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_6 = PySet_New(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 187, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PySet_Add(__pyx_t_6, __pyx_t_7) < (0)) __PYX_ERR(1, 187, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (PyDict_SetItem(__pyx_t_9, __pyx_t_8, __pyx_t_6) < (0)) __PYX_ERR(1, 186, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
0188: },
+0189: col_target_t.col_target_table: {
__pyx_t_6 = __Pyx_PyLong_From_enum____pyx_t_7questdb_7ingress_col_target_t(__pyx_e_7questdb_7ingress_col_target_table); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 189, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6);
+0190: col_source_t.col_source_str_pyobj,
__pyx_t_8 = __Pyx_PyLong_From_enum____pyx_t_7questdb_7ingress_col_source_t(__pyx_e_7questdb_7ingress_col_source_str_pyobj); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 190, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8);
+0191: col_source_t.col_source_str_utf8_arrow,
__pyx_t_7 = __Pyx_PyLong_From_enum____pyx_t_7questdb_7ingress_col_source_t(__pyx_e_7questdb_7ingress_col_source_str_utf8_arrow); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 191, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7);
+0192: col_source_t.col_source_str_lrg_utf8_arrow,
__pyx_t_5 = __Pyx_PyLong_From_enum____pyx_t_7questdb_7ingress_col_source_t(__pyx_e_7questdb_7ingress_col_source_str_lrg_utf8_arrow); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 192, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5);
+0193: col_source_t.col_source_str_i8_cat,
__pyx_t_4 = __Pyx_PyLong_From_enum____pyx_t_7questdb_7ingress_col_source_t(__pyx_e_7questdb_7ingress_col_source_str_i8_cat); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 193, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4);
+0194: col_source_t.col_source_str_i16_cat,
__pyx_t_2 = __Pyx_PyLong_From_enum____pyx_t_7questdb_7ingress_col_source_t(__pyx_e_7questdb_7ingress_col_source_str_i16_cat); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 194, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2);
+0195: col_source_t.col_source_str_i32_cat,
__pyx_t_10 = __Pyx_PyLong_From_enum____pyx_t_7questdb_7ingress_col_source_t(__pyx_e_7questdb_7ingress_col_source_str_i32_cat); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 195, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __pyx_t_11 = PySet_New(0); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 190, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); if (PySet_Add(__pyx_t_11, __pyx_t_8) < (0)) __PYX_ERR(1, 190, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (PySet_Add(__pyx_t_11, __pyx_t_7) < (0)) __PYX_ERR(1, 190, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (PySet_Add(__pyx_t_11, __pyx_t_5) < (0)) __PYX_ERR(1, 190, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PySet_Add(__pyx_t_11, __pyx_t_4) < (0)) __PYX_ERR(1, 190, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (PySet_Add(__pyx_t_11, __pyx_t_2) < (0)) __PYX_ERR(1, 190, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (PySet_Add(__pyx_t_11, __pyx_t_10) < (0)) __PYX_ERR(1, 190, __pyx_L1_error) __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; if (PyDict_SetItem(__pyx_t_9, __pyx_t_6, __pyx_t_11) < (0)) __PYX_ERR(1, 186, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
0196: },
+0197: col_target_t.col_target_symbol: {
__pyx_t_11 = __Pyx_PyLong_From_enum____pyx_t_7questdb_7ingress_col_target_t(__pyx_e_7questdb_7ingress_col_target_symbol); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 197, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11);
+0198: col_source_t.col_source_str_pyobj,
__pyx_t_6 = __Pyx_PyLong_From_enum____pyx_t_7questdb_7ingress_col_source_t(__pyx_e_7questdb_7ingress_col_source_str_pyobj); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 198, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6);
+0199: col_source_t.col_source_str_utf8_arrow,
__pyx_t_10 = __Pyx_PyLong_From_enum____pyx_t_7questdb_7ingress_col_source_t(__pyx_e_7questdb_7ingress_col_source_str_utf8_arrow); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 199, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10);
+0200: col_source_t.col_source_str_lrg_utf8_arrow,
__pyx_t_2 = __Pyx_PyLong_From_enum____pyx_t_7questdb_7ingress_col_source_t(__pyx_e_7questdb_7ingress_col_source_str_lrg_utf8_arrow); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 200, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2);
+0201: col_source_t.col_source_str_i8_cat,
__pyx_t_4 = __Pyx_PyLong_From_enum____pyx_t_7questdb_7ingress_col_source_t(__pyx_e_7questdb_7ingress_col_source_str_i8_cat); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 201, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4);
+0202: col_source_t.col_source_str_i16_cat,
__pyx_t_5 = __Pyx_PyLong_From_enum____pyx_t_7questdb_7ingress_col_source_t(__pyx_e_7questdb_7ingress_col_source_str_i16_cat); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 202, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5);
+0203: col_source_t.col_source_str_i32_cat,
__pyx_t_7 = __Pyx_PyLong_From_enum____pyx_t_7questdb_7ingress_col_source_t(__pyx_e_7questdb_7ingress_col_source_str_i32_cat); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 203, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = PySet_New(0); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 198, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); if (PySet_Add(__pyx_t_8, __pyx_t_6) < (0)) __PYX_ERR(1, 198, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (PySet_Add(__pyx_t_8, __pyx_t_10) < (0)) __PYX_ERR(1, 198, __pyx_L1_error) __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; if (PySet_Add(__pyx_t_8, __pyx_t_2) < (0)) __PYX_ERR(1, 198, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (PySet_Add(__pyx_t_8, __pyx_t_4) < (0)) __PYX_ERR(1, 198, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (PySet_Add(__pyx_t_8, __pyx_t_5) < (0)) __PYX_ERR(1, 198, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PySet_Add(__pyx_t_8, __pyx_t_7) < (0)) __PYX_ERR(1, 198, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (PyDict_SetItem(__pyx_t_9, __pyx_t_11, __pyx_t_8) < (0)) __PYX_ERR(1, 186, __pyx_L1_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
0204: },
+0205: col_target_t.col_target_column_bool: {
__pyx_t_8 = __Pyx_PyLong_From_enum____pyx_t_7questdb_7ingress_col_target_t(__pyx_e_7questdb_7ingress_col_target_column_bool); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 205, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8);
+0206: col_source_t.col_source_bool_pyobj,
__pyx_t_11 = __Pyx_PyLong_From_enum____pyx_t_7questdb_7ingress_col_source_t(__pyx_e_7questdb_7ingress_col_source_bool_pyobj); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 206, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11);
+0207: col_source_t.col_source_bool_numpy,
__pyx_t_7 = __Pyx_PyLong_From_enum____pyx_t_7questdb_7ingress_col_source_t(__pyx_e_7questdb_7ingress_col_source_bool_numpy); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 207, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7);
+0208: col_source_t.col_source_bool_arrow,
__pyx_t_5 = __Pyx_PyLong_From_enum____pyx_t_7questdb_7ingress_col_source_t(__pyx_e_7questdb_7ingress_col_source_bool_arrow); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 208, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = PySet_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 206, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PySet_Add(__pyx_t_4, __pyx_t_11) < (0)) __PYX_ERR(1, 206, __pyx_L1_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; if (PySet_Add(__pyx_t_4, __pyx_t_7) < (0)) __PYX_ERR(1, 206, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (PySet_Add(__pyx_t_4, __pyx_t_5) < (0)) __PYX_ERR(1, 206, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_9, __pyx_t_8, __pyx_t_4) < (0)) __PYX_ERR(1, 186, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
0209: },
+0210: col_target_t.col_target_column_i64: {
__pyx_t_4 = __Pyx_PyLong_From_enum____pyx_t_7questdb_7ingress_col_target_t(__pyx_e_7questdb_7ingress_col_target_column_i64); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 210, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4);
+0211: col_source_t.col_source_int_pyobj,
__pyx_t_8 = __Pyx_PyLong_From_enum____pyx_t_7questdb_7ingress_col_source_t(__pyx_e_7questdb_7ingress_col_source_int_pyobj); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 211, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8);
+0212: col_source_t.col_source_u8_numpy,
__pyx_t_5 = __Pyx_PyLong_From_enum____pyx_t_7questdb_7ingress_col_source_t(__pyx_e_7questdb_7ingress_col_source_u8_numpy); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 212, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5);
+0213: col_source_t.col_source_i8_numpy,
__pyx_t_7 = __Pyx_PyLong_From_enum____pyx_t_7questdb_7ingress_col_source_t(__pyx_e_7questdb_7ingress_col_source_i8_numpy); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 213, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7);
+0214: col_source_t.col_source_u16_numpy,
__pyx_t_11 = __Pyx_PyLong_From_enum____pyx_t_7questdb_7ingress_col_source_t(__pyx_e_7questdb_7ingress_col_source_u16_numpy); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 214, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11);
+0215: col_source_t.col_source_i16_numpy,
__pyx_t_2 = __Pyx_PyLong_From_enum____pyx_t_7questdb_7ingress_col_source_t(__pyx_e_7questdb_7ingress_col_source_i16_numpy); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 215, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2);
+0216: col_source_t.col_source_u32_numpy,
__pyx_t_10 = __Pyx_PyLong_From_enum____pyx_t_7questdb_7ingress_col_source_t(__pyx_e_7questdb_7ingress_col_source_u32_numpy); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 216, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10);
+0217: col_source_t.col_source_i32_numpy,
__pyx_t_6 = __Pyx_PyLong_From_enum____pyx_t_7questdb_7ingress_col_source_t(__pyx_e_7questdb_7ingress_col_source_i32_numpy); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 217, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6);
+0218: col_source_t.col_source_u64_numpy,
__pyx_t_12 = __Pyx_PyLong_From_enum____pyx_t_7questdb_7ingress_col_source_t(__pyx_e_7questdb_7ingress_col_source_u64_numpy); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 218, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12);
+0219: col_source_t.col_source_i64_numpy,
__pyx_t_13 = __Pyx_PyLong_From_enum____pyx_t_7questdb_7ingress_col_source_t(__pyx_e_7questdb_7ingress_col_source_i64_numpy); if (unlikely(!__pyx_t_13)) __PYX_ERR(1, 219, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13);
+0220: col_source_t.col_source_u8_arrow,
__pyx_t_14 = __Pyx_PyLong_From_enum____pyx_t_7questdb_7ingress_col_source_t(__pyx_e_7questdb_7ingress_col_source_u8_arrow); if (unlikely(!__pyx_t_14)) __PYX_ERR(1, 220, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14);
+0221: col_source_t.col_source_i8_arrow,
__pyx_t_15 = __Pyx_PyLong_From_enum____pyx_t_7questdb_7ingress_col_source_t(__pyx_e_7questdb_7ingress_col_source_i8_arrow); if (unlikely(!__pyx_t_15)) __PYX_ERR(1, 221, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_15);
+0222: col_source_t.col_source_u16_arrow,
__pyx_t_16 = __Pyx_PyLong_From_enum____pyx_t_7questdb_7ingress_col_source_t(__pyx_e_7questdb_7ingress_col_source_u16_arrow); if (unlikely(!__pyx_t_16)) __PYX_ERR(1, 222, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_16);
+0223: col_source_t.col_source_i16_arrow,
__pyx_t_17 = __Pyx_PyLong_From_enum____pyx_t_7questdb_7ingress_col_source_t(__pyx_e_7questdb_7ingress_col_source_i16_arrow); if (unlikely(!__pyx_t_17)) __PYX_ERR(1, 223, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_17);
+0224: col_source_t.col_source_u32_arrow,
__pyx_t_18 = __Pyx_PyLong_From_enum____pyx_t_7questdb_7ingress_col_source_t(__pyx_e_7questdb_7ingress_col_source_u32_arrow); if (unlikely(!__pyx_t_18)) __PYX_ERR(1, 224, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_18);
+0225: col_source_t.col_source_i32_arrow,
__pyx_t_19 = __Pyx_PyLong_From_enum____pyx_t_7questdb_7ingress_col_source_t(__pyx_e_7questdb_7ingress_col_source_i32_arrow); if (unlikely(!__pyx_t_19)) __PYX_ERR(1, 225, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_19);
+0226: col_source_t.col_source_u64_arrow,
__pyx_t_20 = __Pyx_PyLong_From_enum____pyx_t_7questdb_7ingress_col_source_t(__pyx_e_7questdb_7ingress_col_source_u64_arrow); if (unlikely(!__pyx_t_20)) __PYX_ERR(1, 226, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_20);
+0227: col_source_t.col_source_i64_arrow,
__pyx_t_21 = __Pyx_PyLong_From_enum____pyx_t_7questdb_7ingress_col_source_t(__pyx_e_7questdb_7ingress_col_source_i64_arrow); if (unlikely(!__pyx_t_21)) __PYX_ERR(1, 227, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_21); __pyx_t_22 = PySet_New(0); if (unlikely(!__pyx_t_22)) __PYX_ERR(1, 211, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_22); if (PySet_Add(__pyx_t_22, __pyx_t_8) < (0)) __PYX_ERR(1, 211, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (PySet_Add(__pyx_t_22, __pyx_t_5) < (0)) __PYX_ERR(1, 211, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PySet_Add(__pyx_t_22, __pyx_t_7) < (0)) __PYX_ERR(1, 211, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (PySet_Add(__pyx_t_22, __pyx_t_11) < (0)) __PYX_ERR(1, 211, __pyx_L1_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; if (PySet_Add(__pyx_t_22, __pyx_t_2) < (0)) __PYX_ERR(1, 211, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (PySet_Add(__pyx_t_22, __pyx_t_10) < (0)) __PYX_ERR(1, 211, __pyx_L1_error) __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; if (PySet_Add(__pyx_t_22, __pyx_t_6) < (0)) __PYX_ERR(1, 211, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (PySet_Add(__pyx_t_22, __pyx_t_12) < (0)) __PYX_ERR(1, 211, __pyx_L1_error) __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; if (PySet_Add(__pyx_t_22, __pyx_t_13) < (0)) __PYX_ERR(1, 211, __pyx_L1_error) __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; if (PySet_Add(__pyx_t_22, __pyx_t_14) < (0)) __PYX_ERR(1, 211, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; if (PySet_Add(__pyx_t_22, __pyx_t_15) < (0)) __PYX_ERR(1, 211, __pyx_L1_error) __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; if (PySet_Add(__pyx_t_22, __pyx_t_16) < (0)) __PYX_ERR(1, 211, __pyx_L1_error) __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; if (PySet_Add(__pyx_t_22, __pyx_t_17) < (0)) __PYX_ERR(1, 211, __pyx_L1_error) __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; if (PySet_Add(__pyx_t_22, __pyx_t_18) < (0)) __PYX_ERR(1, 211, __pyx_L1_error) __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; if (PySet_Add(__pyx_t_22, __pyx_t_19) < (0)) __PYX_ERR(1, 211, __pyx_L1_error) __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; if (PySet_Add(__pyx_t_22, __pyx_t_20) < (0)) __PYX_ERR(1, 211, __pyx_L1_error) __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0; if (PySet_Add(__pyx_t_22, __pyx_t_21) < (0)) __PYX_ERR(1, 211, __pyx_L1_error) __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0; if (PyDict_SetItem(__pyx_t_9, __pyx_t_4, __pyx_t_22) < (0)) __PYX_ERR(1, 186, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
0228: },
+0229: col_target_t.col_target_column_f64: {
__pyx_t_22 = __Pyx_PyLong_From_enum____pyx_t_7questdb_7ingress_col_target_t(__pyx_e_7questdb_7ingress_col_target_column_f64); if (unlikely(!__pyx_t_22)) __PYX_ERR(1, 229, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_22);
+0230: col_source_t.col_source_float_pyobj,
__pyx_t_4 = __Pyx_PyLong_From_enum____pyx_t_7questdb_7ingress_col_source_t(__pyx_e_7questdb_7ingress_col_source_float_pyobj); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 230, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4);
+0231: col_source_t.col_source_f32_numpy,
__pyx_t_21 = __Pyx_PyLong_From_enum____pyx_t_7questdb_7ingress_col_source_t(__pyx_e_7questdb_7ingress_col_source_f32_numpy); if (unlikely(!__pyx_t_21)) __PYX_ERR(1, 231, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_21);
+0232: col_source_t.col_source_f64_numpy,
__pyx_t_20 = __Pyx_PyLong_From_enum____pyx_t_7questdb_7ingress_col_source_t(__pyx_e_7questdb_7ingress_col_source_f64_numpy); if (unlikely(!__pyx_t_20)) __PYX_ERR(1, 232, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_20);
+0233: col_source_t.col_source_f32_arrow,
__pyx_t_19 = __Pyx_PyLong_From_enum____pyx_t_7questdb_7ingress_col_source_t(__pyx_e_7questdb_7ingress_col_source_f32_arrow); if (unlikely(!__pyx_t_19)) __PYX_ERR(1, 233, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_19);
+0234: col_source_t.col_source_f64_arrow,
__pyx_t_18 = __Pyx_PyLong_From_enum____pyx_t_7questdb_7ingress_col_source_t(__pyx_e_7questdb_7ingress_col_source_f64_arrow); if (unlikely(!__pyx_t_18)) __PYX_ERR(1, 234, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_18); __pyx_t_17 = PySet_New(0); if (unlikely(!__pyx_t_17)) __PYX_ERR(1, 230, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_17); if (PySet_Add(__pyx_t_17, __pyx_t_4) < (0)) __PYX_ERR(1, 230, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (PySet_Add(__pyx_t_17, __pyx_t_21) < (0)) __PYX_ERR(1, 230, __pyx_L1_error) __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0; if (PySet_Add(__pyx_t_17, __pyx_t_20) < (0)) __PYX_ERR(1, 230, __pyx_L1_error) __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0; if (PySet_Add(__pyx_t_17, __pyx_t_19) < (0)) __PYX_ERR(1, 230, __pyx_L1_error) __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; if (PySet_Add(__pyx_t_17, __pyx_t_18) < (0)) __PYX_ERR(1, 230, __pyx_L1_error) __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; if (PyDict_SetItem(__pyx_t_9, __pyx_t_22, __pyx_t_17) < (0)) __PYX_ERR(1, 186, __pyx_L1_error) __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0; __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
0235: },
+0236: col_target_t.col_target_column_str: {
__pyx_t_17 = __Pyx_PyLong_From_enum____pyx_t_7questdb_7ingress_col_target_t(__pyx_e_7questdb_7ingress_col_target_column_str); if (unlikely(!__pyx_t_17)) __PYX_ERR(1, 236, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_17);
+0237: col_source_t.col_source_str_pyobj,
__pyx_t_22 = __Pyx_PyLong_From_enum____pyx_t_7questdb_7ingress_col_source_t(__pyx_e_7questdb_7ingress_col_source_str_pyobj); if (unlikely(!__pyx_t_22)) __PYX_ERR(1, 237, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_22);
+0238: col_source_t.col_source_str_utf8_arrow,
__pyx_t_18 = __Pyx_PyLong_From_enum____pyx_t_7questdb_7ingress_col_source_t(__pyx_e_7questdb_7ingress_col_source_str_utf8_arrow); if (unlikely(!__pyx_t_18)) __PYX_ERR(1, 238, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_18);
+0239: col_source_t.col_source_str_lrg_utf8_arrow,
__pyx_t_19 = __Pyx_PyLong_From_enum____pyx_t_7questdb_7ingress_col_source_t(__pyx_e_7questdb_7ingress_col_source_str_lrg_utf8_arrow); if (unlikely(!__pyx_t_19)) __PYX_ERR(1, 239, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_19);
+0240: col_source_t.col_source_str_i8_cat,
__pyx_t_20 = __Pyx_PyLong_From_enum____pyx_t_7questdb_7ingress_col_source_t(__pyx_e_7questdb_7ingress_col_source_str_i8_cat); if (unlikely(!__pyx_t_20)) __PYX_ERR(1, 240, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_20);
+0241: col_source_t.col_source_str_i16_cat,
__pyx_t_21 = __Pyx_PyLong_From_enum____pyx_t_7questdb_7ingress_col_source_t(__pyx_e_7questdb_7ingress_col_source_str_i16_cat); if (unlikely(!__pyx_t_21)) __PYX_ERR(1, 241, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_21);
+0242: col_source_t.col_source_str_i32_cat,
__pyx_t_4 = __Pyx_PyLong_From_enum____pyx_t_7questdb_7ingress_col_source_t(__pyx_e_7questdb_7ingress_col_source_str_i32_cat); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 242, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_16 = PySet_New(0); if (unlikely(!__pyx_t_16)) __PYX_ERR(1, 237, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_16); if (PySet_Add(__pyx_t_16, __pyx_t_22) < (0)) __PYX_ERR(1, 237, __pyx_L1_error) __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0; if (PySet_Add(__pyx_t_16, __pyx_t_18) < (0)) __PYX_ERR(1, 237, __pyx_L1_error) __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; if (PySet_Add(__pyx_t_16, __pyx_t_19) < (0)) __PYX_ERR(1, 237, __pyx_L1_error) __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; if (PySet_Add(__pyx_t_16, __pyx_t_20) < (0)) __PYX_ERR(1, 237, __pyx_L1_error) __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0; if (PySet_Add(__pyx_t_16, __pyx_t_21) < (0)) __PYX_ERR(1, 237, __pyx_L1_error) __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0; if (PySet_Add(__pyx_t_16, __pyx_t_4) < (0)) __PYX_ERR(1, 237, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (PyDict_SetItem(__pyx_t_9, __pyx_t_17, __pyx_t_16) < (0)) __PYX_ERR(1, 186, __pyx_L1_error) __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
0243: },
+0244: col_target_t.col_target_column_ts: {
__pyx_t_16 = __Pyx_PyLong_From_enum____pyx_t_7questdb_7ingress_col_target_t(__pyx_e_7questdb_7ingress_col_target_column_ts); if (unlikely(!__pyx_t_16)) __PYX_ERR(1, 244, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_16);
+0245: col_source_t.col_source_dt64ns_numpy,
__pyx_t_17 = __Pyx_PyLong_From_enum____pyx_t_7questdb_7ingress_col_source_t(__pyx_e_7questdb_7ingress_col_source_dt64ns_numpy); if (unlikely(!__pyx_t_17)) __PYX_ERR(1, 245, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_17);
+0246: col_source_t.col_source_dt64ns_tz_arrow,
__pyx_t_4 = __Pyx_PyLong_From_enum____pyx_t_7questdb_7ingress_col_source_t(__pyx_e_7questdb_7ingress_col_source_dt64ns_tz_arrow); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 246, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4);
+0247: col_source_t.col_source_dt64us_numpy,
__pyx_t_21 = __Pyx_PyLong_From_enum____pyx_t_7questdb_7ingress_col_source_t(__pyx_e_7questdb_7ingress_col_source_dt64us_numpy); if (unlikely(!__pyx_t_21)) __PYX_ERR(1, 247, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_21);
+0248: col_source_t.col_source_dt64us_tz_arrow
__pyx_t_20 = __Pyx_PyLong_From_enum____pyx_t_7questdb_7ingress_col_source_t(__pyx_e_7questdb_7ingress_col_source_dt64us_tz_arrow); if (unlikely(!__pyx_t_20)) __PYX_ERR(1, 248, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_20); __pyx_t_19 = PySet_New(0); if (unlikely(!__pyx_t_19)) __PYX_ERR(1, 245, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_19); if (PySet_Add(__pyx_t_19, __pyx_t_17) < (0)) __PYX_ERR(1, 245, __pyx_L1_error) __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; if (PySet_Add(__pyx_t_19, __pyx_t_4) < (0)) __PYX_ERR(1, 245, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (PySet_Add(__pyx_t_19, __pyx_t_21) < (0)) __PYX_ERR(1, 245, __pyx_L1_error) __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0; if (PySet_Add(__pyx_t_19, __pyx_t_20) < (0)) __PYX_ERR(1, 245, __pyx_L1_error) __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0; if (PyDict_SetItem(__pyx_t_9, __pyx_t_16, __pyx_t_19) < (0)) __PYX_ERR(1, 186, __pyx_L1_error) __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
0249: },
+0250: col_target_t.col_target_column_arr_f64: {
__pyx_t_19 = __Pyx_PyLong_From_enum____pyx_t_7questdb_7ingress_col_target_t(__pyx_e_7questdb_7ingress_col_target_column_arr_f64); if (unlikely(!__pyx_t_19)) __PYX_ERR(1, 250, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_19);
+0251: col_source_t.col_source_arr_f64_numpyobj,
__pyx_t_16 = __Pyx_PyLong_From_enum____pyx_t_7questdb_7ingress_col_source_t(__pyx_e_7questdb_7ingress_col_source_arr_f64_numpyobj); if (unlikely(!__pyx_t_16)) __PYX_ERR(1, 251, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_16); __pyx_t_20 = PySet_New(0); if (unlikely(!__pyx_t_20)) __PYX_ERR(1, 251, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_20); if (PySet_Add(__pyx_t_20, __pyx_t_16) < (0)) __PYX_ERR(1, 251, __pyx_L1_error) __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; if (PyDict_SetItem(__pyx_t_9, __pyx_t_19, __pyx_t_20) < (0)) __PYX_ERR(1, 186, __pyx_L1_error) __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
0252: },
+0253: col_target_t.col_target_column_decimal: {
__pyx_t_20 = __Pyx_PyLong_From_enum____pyx_t_7questdb_7ingress_col_target_t(__pyx_e_7questdb_7ingress_col_target_column_decimal); if (unlikely(!__pyx_t_20)) __PYX_ERR(1, 253, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_20);
+0254: col_source_t.col_source_decimal_pyobj,
__pyx_t_19 = __Pyx_PyLong_From_enum____pyx_t_7questdb_7ingress_col_source_t(__pyx_e_7questdb_7ingress_col_source_decimal_pyobj); if (unlikely(!__pyx_t_19)) __PYX_ERR(1, 254, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_19);
+0255: col_source_t.col_source_decimal32_arrow,
__pyx_t_16 = __Pyx_PyLong_From_enum____pyx_t_7questdb_7ingress_col_source_t(__pyx_e_7questdb_7ingress_col_source_decimal32_arrow); if (unlikely(!__pyx_t_16)) __PYX_ERR(1, 255, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_16);
+0256: col_source_t.col_source_decimal64_arrow,
__pyx_t_21 = __Pyx_PyLong_From_enum____pyx_t_7questdb_7ingress_col_source_t(__pyx_e_7questdb_7ingress_col_source_decimal64_arrow); if (unlikely(!__pyx_t_21)) __PYX_ERR(1, 256, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_21);
+0257: col_source_t.col_source_decimal128_arrow,
__pyx_t_4 = __Pyx_PyLong_From_enum____pyx_t_7questdb_7ingress_col_source_t(__pyx_e_7questdb_7ingress_col_source_decimal128_arrow); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 257, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4);
+0258: col_source_t.col_source_decimal256_arrow,
__pyx_t_17 = __Pyx_PyLong_From_enum____pyx_t_7questdb_7ingress_col_source_t(__pyx_e_7questdb_7ingress_col_source_decimal256_arrow); if (unlikely(!__pyx_t_17)) __PYX_ERR(1, 258, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_17); __pyx_t_18 = PySet_New(0); if (unlikely(!__pyx_t_18)) __PYX_ERR(1, 254, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_18); if (PySet_Add(__pyx_t_18, __pyx_t_19) < (0)) __PYX_ERR(1, 254, __pyx_L1_error) __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; if (PySet_Add(__pyx_t_18, __pyx_t_16) < (0)) __PYX_ERR(1, 254, __pyx_L1_error) __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; if (PySet_Add(__pyx_t_18, __pyx_t_21) < (0)) __PYX_ERR(1, 254, __pyx_L1_error) __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0; if (PySet_Add(__pyx_t_18, __pyx_t_4) < (0)) __PYX_ERR(1, 254, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (PySet_Add(__pyx_t_18, __pyx_t_17) < (0)) __PYX_ERR(1, 254, __pyx_L1_error) __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; if (PyDict_SetItem(__pyx_t_9, __pyx_t_20, __pyx_t_18) < (0)) __PYX_ERR(1, 186, __pyx_L1_error) __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0; __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
0259: },
+0260: col_target_t.col_target_at: {
__pyx_t_18 = __Pyx_PyLong_From_enum____pyx_t_7questdb_7ingress_col_target_t(__pyx_e_7questdb_7ingress_col_target_at); if (unlikely(!__pyx_t_18)) __PYX_ERR(1, 260, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_18);
+0261: col_source_t.col_source_dt64ns_numpy,
__pyx_t_20 = __Pyx_PyLong_From_enum____pyx_t_7questdb_7ingress_col_source_t(__pyx_e_7questdb_7ingress_col_source_dt64ns_numpy); if (unlikely(!__pyx_t_20)) __PYX_ERR(1, 261, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_20);
+0262: col_source_t.col_source_dt64ns_tz_arrow,
__pyx_t_17 = __Pyx_PyLong_From_enum____pyx_t_7questdb_7ingress_col_source_t(__pyx_e_7questdb_7ingress_col_source_dt64ns_tz_arrow); if (unlikely(!__pyx_t_17)) __PYX_ERR(1, 262, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_17);
+0263: col_source_t.col_source_dt64us_numpy,
__pyx_t_4 = __Pyx_PyLong_From_enum____pyx_t_7questdb_7ingress_col_source_t(__pyx_e_7questdb_7ingress_col_source_dt64us_numpy); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 263, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4);
+0264: col_source_t.col_source_dt64us_tz_arrow,
__pyx_t_21 = __Pyx_PyLong_From_enum____pyx_t_7questdb_7ingress_col_source_t(__pyx_e_7questdb_7ingress_col_source_dt64us_tz_arrow); if (unlikely(!__pyx_t_21)) __PYX_ERR(1, 264, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_21); __pyx_t_16 = PySet_New(0); if (unlikely(!__pyx_t_16)) __PYX_ERR(1, 261, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_16); if (PySet_Add(__pyx_t_16, __pyx_t_20) < (0)) __PYX_ERR(1, 261, __pyx_L1_error) __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0; if (PySet_Add(__pyx_t_16, __pyx_t_17) < (0)) __PYX_ERR(1, 261, __pyx_L1_error) __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; if (PySet_Add(__pyx_t_16, __pyx_t_4) < (0)) __PYX_ERR(1, 261, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (PySet_Add(__pyx_t_16, __pyx_t_21) < (0)) __PYX_ERR(1, 261, __pyx_L1_error) __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0; if (PyDict_SetItem(__pyx_t_9, __pyx_t_18, __pyx_t_16) < (0)) __PYX_ERR(1, 186, __pyx_L1_error) __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; __Pyx_XGOTREF(__pyx_v_7questdb_7ingress__TARGET_TO_SOURCES); __Pyx_DECREF_SET(__pyx_v_7questdb_7ingress__TARGET_TO_SOURCES, ((PyObject*)__pyx_t_9)); __Pyx_GIVEREF(__pyx_t_9); __pyx_t_9 = 0;
0265: },
0266: }
0267:
0268:
0269: # Targets associated with col_meta_target.field.
0270: cdef tuple _FIELD_TARGETS = (
+0271: col_target_t.col_target_skip,
__pyx_t_9 = __Pyx_PyLong_From_enum____pyx_t_7questdb_7ingress_col_target_t(__pyx_e_7questdb_7ingress_col_target_skip); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 271, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); /* … */ __pyx_t_22 = PyTuple_Pack(8, __pyx_t_9, __pyx_t_16, __pyx_t_18, __pyx_t_21, __pyx_t_4, __pyx_t_17, __pyx_t_20, __pyx_t_19); if (unlikely(!__pyx_t_22)) __PYX_ERR(1, 271, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_22); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0; __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; __Pyx_XGOTREF(__pyx_v_7questdb_7ingress__FIELD_TARGETS); __Pyx_DECREF_SET(__pyx_v_7questdb_7ingress__FIELD_TARGETS, ((PyObject*)__pyx_t_22)); __Pyx_GIVEREF(__pyx_t_22); __pyx_t_22 = 0;
+0272: col_target_t.col_target_column_bool,
__pyx_t_16 = __Pyx_PyLong_From_enum____pyx_t_7questdb_7ingress_col_target_t(__pyx_e_7questdb_7ingress_col_target_column_bool); if (unlikely(!__pyx_t_16)) __PYX_ERR(1, 272, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_16);
+0273: col_target_t.col_target_column_i64,
__pyx_t_18 = __Pyx_PyLong_From_enum____pyx_t_7questdb_7ingress_col_target_t(__pyx_e_7questdb_7ingress_col_target_column_i64); if (unlikely(!__pyx_t_18)) __PYX_ERR(1, 273, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_18);
+0274: col_target_t.col_target_column_f64,
__pyx_t_21 = __Pyx_PyLong_From_enum____pyx_t_7questdb_7ingress_col_target_t(__pyx_e_7questdb_7ingress_col_target_column_f64); if (unlikely(!__pyx_t_21)) __PYX_ERR(1, 274, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_21);
+0275: col_target_t.col_target_column_str,
__pyx_t_4 = __Pyx_PyLong_From_enum____pyx_t_7questdb_7ingress_col_target_t(__pyx_e_7questdb_7ingress_col_target_column_str); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 275, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4);
+0276: col_target_t.col_target_column_ts,
__pyx_t_17 = __Pyx_PyLong_From_enum____pyx_t_7questdb_7ingress_col_target_t(__pyx_e_7questdb_7ingress_col_target_column_ts); if (unlikely(!__pyx_t_17)) __PYX_ERR(1, 276, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_17);
+0277: col_target_t.col_target_column_arr_f64,
__pyx_t_20 = __Pyx_PyLong_From_enum____pyx_t_7questdb_7ingress_col_target_t(__pyx_e_7questdb_7ingress_col_target_column_arr_f64); if (unlikely(!__pyx_t_20)) __PYX_ERR(1, 277, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_20);
+0278: col_target_t.col_target_column_decimal)
__pyx_t_19 = __Pyx_PyLong_From_enum____pyx_t_7questdb_7ingress_col_target_t(__pyx_e_7questdb_7ingress_col_target_column_decimal); if (unlikely(!__pyx_t_19)) __PYX_ERR(1, 278, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_19);
0279:
0280:
0281: # Targets that map directly from a meta target.
0282: cdef set _DIRECT_META_TARGETS = {
+0283: col_target_t.col_target_table,
__pyx_t_22 = __Pyx_PyLong_From_enum____pyx_t_7questdb_7ingress_col_target_t(__pyx_e_7questdb_7ingress_col_target_table); if (unlikely(!__pyx_t_22)) __PYX_ERR(1, 283, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_22);
+0284: col_target_t.col_target_symbol,
__pyx_t_19 = __Pyx_PyLong_From_enum____pyx_t_7questdb_7ingress_col_target_t(__pyx_e_7questdb_7ingress_col_target_symbol); if (unlikely(!__pyx_t_19)) __PYX_ERR(1, 284, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_19);
+0285: col_target_t.col_target_at,
__pyx_t_20 = __Pyx_PyLong_From_enum____pyx_t_7questdb_7ingress_col_target_t(__pyx_e_7questdb_7ingress_col_target_at); if (unlikely(!__pyx_t_20)) __PYX_ERR(1, 285, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_20); __pyx_t_17 = PySet_New(0); if (unlikely(!__pyx_t_17)) __PYX_ERR(1, 283, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_17); if (PySet_Add(__pyx_t_17, __pyx_t_22) < (0)) __PYX_ERR(1, 283, __pyx_L1_error) __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0; if (PySet_Add(__pyx_t_17, __pyx_t_19) < (0)) __PYX_ERR(1, 283, __pyx_L1_error) __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; if (PySet_Add(__pyx_t_17, __pyx_t_20) < (0)) __PYX_ERR(1, 283, __pyx_L1_error) __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0; __Pyx_XGOTREF(__pyx_v_7questdb_7ingress__DIRECT_META_TARGETS); __Pyx_DECREF_SET(__pyx_v_7questdb_7ingress__DIRECT_META_TARGETS, ((PyObject*)__pyx_t_17)); __Pyx_GIVEREF(__pyx_t_17); __pyx_t_17 = 0;
0286: }
0287:
0288:
0289: # This is verbose, but..
0290: # * Enums give us constants.
0291: # * Constants allow unfolding `if` statements into `switch`
0292: # * Switch statements can be more heavily optimized by the C compiler.
+0293: cdef enum col_dispatch_code_t:
enum __pyx_t_7questdb_7ingress_col_dispatch_code_t {
0294: col_dispatch_code_skip_nulls = \
0295: col_target_t.col_target_skip + col_source_t.col_source_nulls
0296:
0297: col_dispatch_code_table__str_pyobj = \
0298: col_target_t.col_target_table + col_source_t.col_source_str_pyobj
0299: col_dispatch_code_table__str_utf8_arrow = \
0300: col_target_t.col_target_table + col_source_t.col_source_str_utf8_arrow
0301: col_dispatch_code_table__str_lrg_utf8_arrow = \
0302: col_target_t.col_target_table + col_source_t.col_source_str_lrg_utf8_arrow
0303: col_dispatch_code_table__str_i8_cat = \
0304: col_target_t.col_target_table + col_source_t.col_source_str_i8_cat
0305: col_dispatch_code_table__str_i16_cat = \
0306: col_target_t.col_target_table + col_source_t.col_source_str_i16_cat
0307: col_dispatch_code_table__str_i32_cat = \
0308: col_target_t.col_target_table + col_source_t.col_source_str_i32_cat
0309:
0310: col_dispatch_code_symbol__str_pyobj = \
0311: col_target_t.col_target_symbol + col_source_t.col_source_str_pyobj
0312: col_dispatch_code_symbol__str_utf8_arrow = \
0313: col_target_t.col_target_symbol + col_source_t.col_source_str_utf8_arrow
0314: col_dispatch_code_symbol__str_lrg_utf8_arrow = \
0315: col_target_t.col_target_symbol + col_source_t.col_source_str_lrg_utf8_arrow
0316: col_dispatch_code_symbol__str_i8_cat = \
0317: col_target_t.col_target_symbol + col_source_t.col_source_str_i8_cat
0318: col_dispatch_code_symbol__str_i16_cat = \
0319: col_target_t.col_target_symbol + col_source_t.col_source_str_i16_cat
0320: col_dispatch_code_symbol__str_i32_cat = \
0321: col_target_t.col_target_symbol + col_source_t.col_source_str_i32_cat
0322:
0323: col_dispatch_code_column_bool__bool_pyobj = \
0324: col_target_t.col_target_column_bool + col_source_t.col_source_bool_pyobj
0325: col_dispatch_code_column_bool__bool_numpy = \
0326: col_target_t.col_target_column_bool + col_source_t.col_source_bool_numpy
0327: col_dispatch_code_column_bool__bool_arrow = \
0328: col_target_t.col_target_column_bool + col_source_t.col_source_bool_arrow
0329:
0330: col_dispatch_code_column_i64__int_pyobj = \
0331: col_target_t.col_target_column_i64 + col_source_t.col_source_int_pyobj
0332: col_dispatch_code_column_i64__u8_numpy = \
0333: col_target_t.col_target_column_i64 + col_source_t.col_source_u8_numpy
0334: col_dispatch_code_column_i64__i8_numpy = \
0335: col_target_t.col_target_column_i64 + col_source_t.col_source_i8_numpy
0336: col_dispatch_code_column_i64__u16_numpy = \
0337: col_target_t.col_target_column_i64 + col_source_t.col_source_u16_numpy
0338: col_dispatch_code_column_i64__i16_numpy = \
0339: col_target_t.col_target_column_i64 + col_source_t.col_source_i16_numpy
0340: col_dispatch_code_column_i64__u32_numpy = \
0341: col_target_t.col_target_column_i64 + col_source_t.col_source_u32_numpy
0342: col_dispatch_code_column_i64__i32_numpy = \
0343: col_target_t.col_target_column_i64 + col_source_t.col_source_i32_numpy
0344: col_dispatch_code_column_i64__u64_numpy = \
0345: col_target_t.col_target_column_i64 + col_source_t.col_source_u64_numpy
0346: col_dispatch_code_column_i64__i64_numpy = \
0347: col_target_t.col_target_column_i64 + col_source_t.col_source_i64_numpy
0348: col_dispatch_code_column_i64__u8_arrow = \
0349: col_target_t.col_target_column_i64 + col_source_t.col_source_u8_arrow
0350: col_dispatch_code_column_i64__i8_arrow = \
0351: col_target_t.col_target_column_i64 + col_source_t.col_source_i8_arrow
0352: col_dispatch_code_column_i64__u16_arrow = \
0353: col_target_t.col_target_column_i64 + col_source_t.col_source_u16_arrow
0354: col_dispatch_code_column_i64__i16_arrow = \
0355: col_target_t.col_target_column_i64 + col_source_t.col_source_i16_arrow
0356: col_dispatch_code_column_i64__u32_arrow = \
0357: col_target_t.col_target_column_i64 + col_source_t.col_source_u32_arrow
0358: col_dispatch_code_column_i64__i32_arrow = \
0359: col_target_t.col_target_column_i64 + col_source_t.col_source_i32_arrow
0360: col_dispatch_code_column_i64__u64_arrow = \
0361: col_target_t.col_target_column_i64 + col_source_t.col_source_u64_arrow
0362: col_dispatch_code_column_i64__i64_arrow = \
0363: col_target_t.col_target_column_i64 + col_source_t.col_source_i64_arrow
0364:
0365: col_dispatch_code_column_f64__float_pyobj = \
0366: col_target_t.col_target_column_f64 + col_source_t.col_source_float_pyobj
0367: col_dispatch_code_column_f64__f32_numpy = \
0368: col_target_t.col_target_column_f64 + col_source_t.col_source_f32_numpy
0369: col_dispatch_code_column_f64__f64_numpy = \
0370: col_target_t.col_target_column_f64 + col_source_t.col_source_f64_numpy
0371: col_dispatch_code_column_f64__f32_arrow = \
0372: col_target_t.col_target_column_f64 + col_source_t.col_source_f32_arrow
0373: col_dispatch_code_column_f64__f64_arrow = \
0374: col_target_t.col_target_column_f64 + col_source_t.col_source_f64_arrow
0375:
0376: col_dispatch_code_column_str__str_pyobj = \
0377: col_target_t.col_target_column_str + col_source_t.col_source_str_pyobj
0378: col_dispatch_code_column_str__str_utf8_arrow = \
0379: col_target_t.col_target_column_str + col_source_t.col_source_str_utf8_arrow
0380: col_dispatch_code_column_str__str_lrg_utf8_arrow = \
0381: col_target_t.col_target_column_str + col_source_t.col_source_str_lrg_utf8_arrow
0382: col_dispatch_code_column_str__str_i8_cat = \
0383: col_target_t.col_target_column_str + col_source_t.col_source_str_i8_cat
0384: col_dispatch_code_column_str__str_i16_cat = \
0385: col_target_t.col_target_column_str + col_source_t.col_source_str_i16_cat
0386: col_dispatch_code_column_str__str_i32_cat = \
0387: col_target_t.col_target_column_str + col_source_t.col_source_str_i32_cat
0388:
0389: col_dispatch_code_column_ts__dt64ns_numpy = \
0390: col_target_t.col_target_column_ts + col_source_t.col_source_dt64ns_numpy
0391: col_dispatch_code_column_ts__dt64ns_tz_arrow = \
0392: col_target_t.col_target_column_ts + \
0393: col_source_t.col_source_dt64ns_tz_arrow
0394:
0395: col_dispatch_code_column_ts__dt64us_numpy = \
0396: col_target_t.col_target_column_ts + col_source_t.col_source_dt64us_numpy
0397: col_dispatch_code_column_ts__dt64us_tz_arrow = \
0398: col_target_t.col_target_column_ts + \
0399: col_source_t.col_source_dt64us_tz_arrow
0400:
0401: col_dispatch_code_at__dt64ns_numpy = \
0402: col_target_t.col_target_at + col_source_t.col_source_dt64ns_numpy
0403: col_dispatch_code_at__dt64ns_tz_arrow = \
0404: col_target_t.col_target_at + col_source_t.col_source_dt64ns_tz_arrow
0405:
0406: col_dispatch_code_at__dt64us_numpy = \
0407: col_target_t.col_target_at + col_source_t.col_source_dt64us_numpy
0408: col_dispatch_code_at__dt64us_tz_arrow = \
0409: col_target_t.col_target_at + col_source_t.col_source_dt64us_tz_arrow
0410:
0411: col_dispatch_code_column_arr_f64__arr_f64_numpyobj = \
0412: col_target_t.col_target_column_arr_f64 + col_source_t.col_source_arr_f64_numpyobj
0413:
0414: col_dispatch_code_column_decimal__decimal_pyobj = \
0415: col_target_t.col_target_column_decimal + col_source_t.col_source_decimal_pyobj
0416: col_dispatch_code_column_decimal__decimal32_arrow = \
0417: col_target_t.col_target_column_decimal + col_source_t.col_source_decimal32_arrow
0418: col_dispatch_code_column_decimal__decimal64_arrow = \
0419: col_target_t.col_target_column_decimal + col_source_t.col_source_decimal64_arrow
0420: col_dispatch_code_column_decimal__decimal128_arrow = \
0421: col_target_t.col_target_column_decimal + col_source_t.col_source_decimal128_arrow
0422: col_dispatch_code_column_decimal__decimal256_arrow = \
+0423: col_target_t.col_target_column_decimal + col_source_t.col_source_decimal256_arrow
__pyx_e_7questdb_7ingress_col_dispatch_code_skip_nulls = (__pyx_e_7questdb_7ingress_col_target_skip + __pyx_e_7questdb_7ingress_col_source_nulls), __pyx_e_7questdb_7ingress_col_dispatch_code_table__str_pyobj = (__pyx_e_7questdb_7ingress_col_target_table + __pyx_e_7questdb_7ingress_col_source_str_pyobj), __pyx_e_7questdb_7ingress_col_dispatch_code_table__str_utf8_arrow = (__pyx_e_7questdb_7ingress_col_target_table + __pyx_e_7questdb_7ingress_col_source_str_utf8_arrow), __pyx_e_7questdb_7ingress_col_dispatch_code_table__str_lrg_utf8_arrow = (__pyx_e_7questdb_7ingress_col_target_table + __pyx_e_7questdb_7ingress_col_source_str_lrg_utf8_arrow), __pyx_e_7questdb_7ingress_col_dispatch_code_table__str_i8_cat = (__pyx_e_7questdb_7ingress_col_target_table + __pyx_e_7questdb_7ingress_col_source_str_i8_cat), __pyx_e_7questdb_7ingress_col_dispatch_code_table__str_i16_cat = (__pyx_e_7questdb_7ingress_col_target_table + __pyx_e_7questdb_7ingress_col_source_str_i16_cat), __pyx_e_7questdb_7ingress_col_dispatch_code_table__str_i32_cat = (__pyx_e_7questdb_7ingress_col_target_table + __pyx_e_7questdb_7ingress_col_source_str_i32_cat), __pyx_e_7questdb_7ingress_col_dispatch_code_symbol__str_pyobj = (__pyx_e_7questdb_7ingress_col_target_symbol + __pyx_e_7questdb_7ingress_col_source_str_pyobj), __pyx_e_7questdb_7ingress_col_dispatch_code_symbol__str_utf8_arrow = (__pyx_e_7questdb_7ingress_col_target_symbol + __pyx_e_7questdb_7ingress_col_source_str_utf8_arrow), __pyx_e_7questdb_7ingress_col_dispatch_code_symbol__str_lrg_utf8_arrow = (__pyx_e_7questdb_7ingress_col_target_symbol + __pyx_e_7questdb_7ingress_col_source_str_lrg_utf8_arrow), __pyx_e_7questdb_7ingress_col_dispatch_code_symbol__str_i8_cat = (__pyx_e_7questdb_7ingress_col_target_symbol + __pyx_e_7questdb_7ingress_col_source_str_i8_cat), __pyx_e_7questdb_7ingress_col_dispatch_code_symbol__str_i16_cat = (__pyx_e_7questdb_7ingress_col_target_symbol + __pyx_e_7questdb_7ingress_col_source_str_i16_cat), __pyx_e_7questdb_7ingress_col_dispatch_code_symbol__str_i32_cat = (__pyx_e_7questdb_7ingress_col_target_symbol + __pyx_e_7questdb_7ingress_col_source_str_i32_cat), __pyx_e_7questdb_7ingress_col_dispatch_code_column_bool__bool_pyobj = (__pyx_e_7questdb_7ingress_col_target_column_bool + __pyx_e_7questdb_7ingress_col_source_bool_pyobj), __pyx_e_7questdb_7ingress_col_dispatch_code_column_bool__bool_numpy = (__pyx_e_7questdb_7ingress_col_target_column_bool + __pyx_e_7questdb_7ingress_col_source_bool_numpy), __pyx_e_7questdb_7ingress_col_dispatch_code_column_bool__bool_arrow = (__pyx_e_7questdb_7ingress_col_target_column_bool + __pyx_e_7questdb_7ingress_col_source_bool_arrow), __pyx_e_7questdb_7ingress_col_dispatch_code_column_i64__int_pyobj = (__pyx_e_7questdb_7ingress_col_target_column_i64 + __pyx_e_7questdb_7ingress_col_source_int_pyobj), __pyx_e_7questdb_7ingress_col_dispatch_code_column_i64__u8_numpy = (__pyx_e_7questdb_7ingress_col_target_column_i64 + __pyx_e_7questdb_7ingress_col_source_u8_numpy), __pyx_e_7questdb_7ingress_col_dispatch_code_column_i64__i8_numpy = (__pyx_e_7questdb_7ingress_col_target_column_i64 + __pyx_e_7questdb_7ingress_col_source_i8_numpy), __pyx_e_7questdb_7ingress_col_dispatch_code_column_i64__u16_numpy = (__pyx_e_7questdb_7ingress_col_target_column_i64 + __pyx_e_7questdb_7ingress_col_source_u16_numpy), __pyx_e_7questdb_7ingress_col_dispatch_code_column_i64__i16_numpy = (__pyx_e_7questdb_7ingress_col_target_column_i64 + __pyx_e_7questdb_7ingress_col_source_i16_numpy), __pyx_e_7questdb_7ingress_col_dispatch_code_column_i64__u32_numpy = (__pyx_e_7questdb_7ingress_col_target_column_i64 + __pyx_e_7questdb_7ingress_col_source_u32_numpy), __pyx_e_7questdb_7ingress_col_dispatch_code_column_i64__i32_numpy = (__pyx_e_7questdb_7ingress_col_target_column_i64 + __pyx_e_7questdb_7ingress_col_source_i32_numpy), __pyx_e_7questdb_7ingress_col_dispatch_code_column_i64__u64_numpy = (__pyx_e_7questdb_7ingress_col_target_column_i64 + __pyx_e_7questdb_7ingress_col_source_u64_numpy), __pyx_e_7questdb_7ingress_col_dispatch_code_column_i64__i64_numpy = (__pyx_e_7questdb_7ingress_col_target_column_i64 + __pyx_e_7questdb_7ingress_col_source_i64_numpy), __pyx_e_7questdb_7ingress_col_dispatch_code_column_i64__u8_arrow = (__pyx_e_7questdb_7ingress_col_target_column_i64 + __pyx_e_7questdb_7ingress_col_source_u8_arrow), __pyx_e_7questdb_7ingress_col_dispatch_code_column_i64__i8_arrow = (__pyx_e_7questdb_7ingress_col_target_column_i64 + __pyx_e_7questdb_7ingress_col_source_i8_arrow), __pyx_e_7questdb_7ingress_col_dispatch_code_column_i64__u16_arrow = (__pyx_e_7questdb_7ingress_col_target_column_i64 + __pyx_e_7questdb_7ingress_col_source_u16_arrow), __pyx_e_7questdb_7ingress_col_dispatch_code_column_i64__i16_arrow = (__pyx_e_7questdb_7ingress_col_target_column_i64 + __pyx_e_7questdb_7ingress_col_source_i16_arrow), __pyx_e_7questdb_7ingress_col_dispatch_code_column_i64__u32_arrow = (__pyx_e_7questdb_7ingress_col_target_column_i64 + __pyx_e_7questdb_7ingress_col_source_u32_arrow), __pyx_e_7questdb_7ingress_col_dispatch_code_column_i64__i32_arrow = (__pyx_e_7questdb_7ingress_col_target_column_i64 + __pyx_e_7questdb_7ingress_col_source_i32_arrow), __pyx_e_7questdb_7ingress_col_dispatch_code_column_i64__u64_arrow = (__pyx_e_7questdb_7ingress_col_target_column_i64 + __pyx_e_7questdb_7ingress_col_source_u64_arrow), __pyx_e_7questdb_7ingress_col_dispatch_code_column_i64__i64_arrow = (__pyx_e_7questdb_7ingress_col_target_column_i64 + __pyx_e_7questdb_7ingress_col_source_i64_arrow), __pyx_e_7questdb_7ingress_col_dispatch_code_column_f64__float_pyobj = (__pyx_e_7questdb_7ingress_col_target_column_f64 + __pyx_e_7questdb_7ingress_col_source_float_pyobj), __pyx_e_7questdb_7ingress_col_dispatch_code_column_f64__f32_numpy = (__pyx_e_7questdb_7ingress_col_target_column_f64 + __pyx_e_7questdb_7ingress_col_source_f32_numpy), __pyx_e_7questdb_7ingress_col_dispatch_code_column_f64__f64_numpy = (__pyx_e_7questdb_7ingress_col_target_column_f64 + __pyx_e_7questdb_7ingress_col_source_f64_numpy), __pyx_e_7questdb_7ingress_col_dispatch_code_column_f64__f32_arrow = (__pyx_e_7questdb_7ingress_col_target_column_f64 + __pyx_e_7questdb_7ingress_col_source_f32_arrow), __pyx_e_7questdb_7ingress_col_dispatch_code_column_f64__f64_arrow = (__pyx_e_7questdb_7ingress_col_target_column_f64 + __pyx_e_7questdb_7ingress_col_source_f64_arrow), __pyx_e_7questdb_7ingress_col_dispatch_code_column_str__str_pyobj = (__pyx_e_7questdb_7ingress_col_target_column_str + __pyx_e_7questdb_7ingress_col_source_str_pyobj), __pyx_e_7questdb_7ingress_col_dispatch_code_column_str__str_utf8_arrow = (__pyx_e_7questdb_7ingress_col_target_column_str + __pyx_e_7questdb_7ingress_col_source_str_utf8_arrow), __pyx_e_7questdb_7ingress_col_dispatch_code_column_str__str_lrg_utf8_arrow = (__pyx_e_7questdb_7ingress_col_target_column_str + __pyx_e_7questdb_7ingress_col_source_str_lrg_utf8_arrow), __pyx_e_7questdb_7ingress_col_dispatch_code_column_str__str_i8_cat = (__pyx_e_7questdb_7ingress_col_target_column_str + __pyx_e_7questdb_7ingress_col_source_str_i8_cat), __pyx_e_7questdb_7ingress_col_dispatch_code_column_str__str_i16_cat = (__pyx_e_7questdb_7ingress_col_target_column_str + __pyx_e_7questdb_7ingress_col_source_str_i16_cat), __pyx_e_7questdb_7ingress_col_dispatch_code_column_str__str_i32_cat = (__pyx_e_7questdb_7ingress_col_target_column_str + __pyx_e_7questdb_7ingress_col_source_str_i32_cat), __pyx_e_7questdb_7ingress_col_dispatch_code_column_ts__dt64ns_numpy = (__pyx_e_7questdb_7ingress_col_target_column_ts + __pyx_e_7questdb_7ingress_col_source_dt64ns_numpy), __pyx_e_7questdb_7ingress_col_dispatch_code_column_ts__dt64ns_tz_arrow = (__pyx_e_7questdb_7ingress_col_target_column_ts + __pyx_e_7questdb_7ingress_col_source_dt64ns_tz_arrow), __pyx_e_7questdb_7ingress_col_dispatch_code_column_ts__dt64us_numpy = (__pyx_e_7questdb_7ingress_col_target_column_ts + __pyx_e_7questdb_7ingress_col_source_dt64us_numpy), __pyx_e_7questdb_7ingress_col_dispatch_code_column_ts__dt64us_tz_arrow = (__pyx_e_7questdb_7ingress_col_target_column_ts + __pyx_e_7questdb_7ingress_col_source_dt64us_tz_arrow), __pyx_e_7questdb_7ingress_col_dispatch_code_at__dt64ns_numpy = (__pyx_e_7questdb_7ingress_col_target_at + __pyx_e_7questdb_7ingress_col_source_dt64ns_numpy), __pyx_e_7questdb_7ingress_col_dispatch_code_at__dt64ns_tz_arrow = (__pyx_e_7questdb_7ingress_col_target_at + __pyx_e_7questdb_7ingress_col_source_dt64ns_tz_arrow), __pyx_e_7questdb_7ingress_col_dispatch_code_at__dt64us_numpy = (__pyx_e_7questdb_7ingress_col_target_at + __pyx_e_7questdb_7ingress_col_source_dt64us_numpy), __pyx_e_7questdb_7ingress_col_dispatch_code_at__dt64us_tz_arrow = (__pyx_e_7questdb_7ingress_col_target_at + __pyx_e_7questdb_7ingress_col_source_dt64us_tz_arrow), __pyx_e_7questdb_7ingress_col_dispatch_code_column_arr_f64__arr_f64_numpyobj = (__pyx_e_7questdb_7ingress_col_target_column_arr_f64 + __pyx_e_7questdb_7ingress_col_source_arr_f64_numpyobj), __pyx_e_7questdb_7ingress_col_dispatch_code_column_decimal__decimal_pyobj = (__pyx_e_7questdb_7ingress_col_target_column_decimal + __pyx_e_7questdb_7ingress_col_source_decimal_pyobj), __pyx_e_7questdb_7ingress_col_dispatch_code_column_decimal__decimal32_arrow = (__pyx_e_7questdb_7ingress_col_target_column_decimal + __pyx_e_7questdb_7ingress_col_source_decimal32_arrow), __pyx_e_7questdb_7ingress_col_dispatch_code_column_decimal__decimal64_arrow = (__pyx_e_7questdb_7ingress_col_target_column_decimal + __pyx_e_7questdb_7ingress_col_source_decimal64_arrow), __pyx_e_7questdb_7ingress_col_dispatch_code_column_decimal__decimal128_arrow = (__pyx_e_7questdb_7ingress_col_target_column_decimal + __pyx_e_7questdb_7ingress_col_source_decimal128_arrow), __pyx_e_7questdb_7ingress_col_dispatch_code_column_decimal__decimal256_arrow = (__pyx_e_7questdb_7ingress_col_target_column_decimal + __pyx_e_7questdb_7ingress_col_source_decimal256_arrow) };
0424:
0425:
0426: # Int values in order for sorting (as needed for API's sequential coupling).
+0427: cdef enum meta_target_t:
enum __pyx_t_7questdb_7ingress_meta_target_t {
0428: meta_target_table = <int>col_target_t.col_target_table
0429: meta_target_symbol = <int>col_target_t.col_target_symbol
0430: meta_target_field = <int>col_target_t.col_target_column_bool
+0431: meta_target_at = <int>col_target_t.col_target_at
__pyx_e_7questdb_7ingress_meta_target_table = ((int)__pyx_e_7questdb_7ingress_col_target_table), __pyx_e_7questdb_7ingress_meta_target_symbol = ((int)__pyx_e_7questdb_7ingress_col_target_symbol), __pyx_e_7questdb_7ingress_meta_target_field = ((int)__pyx_e_7questdb_7ingress_col_target_column_bool), __pyx_e_7questdb_7ingress_meta_target_at = ((int)__pyx_e_7questdb_7ingress_col_target_at) };
0432:
0433:
+0434: cdef struct col_setup_t:
struct __pyx_t_7questdb_7ingress_col_setup_t {
struct __pyx_t_7questdb_7ingress_col_chunks_t chunks;
size_t orig_index;
Py_buffer pybuf;
struct ArrowSchema arrow_schema;
enum __pyx_t_7questdb_7ingress_col_source_t source;
enum __pyx_t_7questdb_7ingress_meta_target_t meta_target;
enum __pyx_t_7questdb_7ingress_col_target_t target;
};
0435: col_chunks_t chunks
0436: size_t orig_index
0437: Py_buffer pybuf
0438: ArrowSchema arrow_schema # Schema of first chunk.
0439: col_source_t source
0440: meta_target_t meta_target
0441: col_target_t target
0442:
0443:
+0444: cdef struct col_t:
struct __pyx_t_7questdb_7ingress_col_t {
enum __pyx_t_7questdb_7ingress_col_dispatch_code_t dispatch_code;
struct line_sender_column_name name;
struct __pyx_t_7questdb_7ingress_col_cursor_t cursor;
struct __pyx_t_7questdb_7ingress_col_setup_t *setup;
uint8_t scale;
};
0445: col_dispatch_code_t dispatch_code # source + target. Determines serializer.
0446: line_sender_column_name name
0447: col_cursor_t cursor
0448: col_setup_t* setup # Grouping to reduce size of struct.
0449: uint8_t scale # For arrow decimal types only, else 0.
0450:
0451:
+0452: cdef void col_t_release(col_t* col) noexcept:
static void __pyx_f_7questdb_7ingress_col_t_release(struct __pyx_t_7questdb_7ingress_col_t *__pyx_v_col) {
size_t __pyx_v_chunk_index;
struct ArrowArray *__pyx_v_chunk;
/* … */
/* function exit code */
}
0453: """
0454: Release a (possibly) initialized column.
0455:
0456: col_t objects are `calloc`ed, so uninitialized (or partially) initialized
0457: objects will have their pointers and other values set to 0.
0458: """
0459: cdef size_t chunk_index
0460: cdef ArrowArray* chunk
0461:
+0462: if Py_buffer_obj_is_set(&col.setup.pybuf):
__pyx_t_1 = Py_buffer_obj_is_set((&__pyx_v_col->setup->pybuf));
if (__pyx_t_1) {
/* … */
}
+0463: PyBuffer_Release(&col.setup.pybuf) # Note: Sets `.pybuf.obj` to NULL.
PyBuffer_Release((&__pyx_v_col->setup->pybuf));
0464:
+0465: for chunk_index in range(col.setup.chunks.n_chunks):
__pyx_t_2 = __pyx_v_col->setup->chunks.n_chunks;
__pyx_t_3 = __pyx_t_2;
for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
__pyx_v_chunk_index = __pyx_t_4;
+0466: chunk = &col.setup.chunks.chunks[chunk_index]
__pyx_v_chunk = (&(__pyx_v_col->setup->chunks.chunks[__pyx_v_chunk_index]));
+0467: if chunk.release != NULL:
__pyx_t_1 = (__pyx_v_chunk->release != NULL);
if (__pyx_t_1) {
/* … */
}
+0468: chunk.release(chunk)
__pyx_v_chunk->release(__pyx_v_chunk);
+0469: memset(chunk, 0, sizeof(ArrowArray))
(void)(memset(__pyx_v_chunk, 0, (sizeof(struct ArrowArray)))); }
0470:
+0471: if col.setup.arrow_schema.release != NULL:
__pyx_t_1 = (__pyx_v_col->setup->arrow_schema.release != NULL);
if (__pyx_t_1) {
/* … */
}
+0472: col.setup.arrow_schema.release(&col.setup.arrow_schema)
__pyx_v_col->setup->arrow_schema.release((&__pyx_v_col->setup->arrow_schema));
0473:
+0474: free(col.setup.chunks.chunks)
free(__pyx_v_col->setup->chunks.chunks);
+0475: col.setup.chunks.chunks = NULL
__pyx_v_col->setup->chunks.chunks = NULL;
+0476: col.setup.chunks.n_chunks = 0
__pyx_v_col->setup->chunks.n_chunks = 0;
0477:
+0478: free(col.setup)
free(__pyx_v_col->setup);
+0479: col.setup = NULL
__pyx_v_col->setup = NULL;
0480:
0481:
0482: # Calloc'd array of col_t.
+0483: cdef struct col_t_arr:
struct __pyx_t_7questdb_7ingress_col_t_arr {
size_t size;
struct __pyx_t_7questdb_7ingress_col_t *d;
};
0484: size_t size
0485: col_t* d
0486:
0487:
+0488: cdef col_t_arr col_t_arr_blank() noexcept nogil:
static struct __pyx_t_7questdb_7ingress_col_t_arr __pyx_f_7questdb_7ingress_col_t_arr_blank(void) {
struct __pyx_t_7questdb_7ingress_col_t_arr __pyx_v_arr;
struct __pyx_t_7questdb_7ingress_col_t_arr __pyx_r;
/* … */
/* function exit code */
__pyx_L0:;
return __pyx_r;
}
0489: cdef col_t_arr arr
+0490: arr.size = 0
__pyx_v_arr.size = 0;
+0491: arr.d = NULL
__pyx_v_arr.d = NULL;
+0492: return arr
__pyx_r = __pyx_v_arr; goto __pyx_L0;
0493:
0494:
+0495: cdef col_t_arr col_t_arr_new(size_t size) noexcept nogil:
static struct __pyx_t_7questdb_7ingress_col_t_arr __pyx_f_7questdb_7ingress_col_t_arr_new(size_t __pyx_v_size) {
struct __pyx_t_7questdb_7ingress_col_t_arr __pyx_v_arr;
size_t __pyx_v_index;
struct __pyx_t_7questdb_7ingress_col_t_arr __pyx_r;
/* … */
/* function exit code */
__pyx_L0:;
return __pyx_r;
}
0496: cdef col_t_arr arr
0497: cdef size_t index
+0498: arr.size = size
__pyx_v_arr.size = __pyx_v_size;
+0499: arr.d = <col_t*>calloc(size, sizeof(col_t))
__pyx_v_arr.d = ((struct __pyx_t_7questdb_7ingress_col_t *)calloc(__pyx_v_size, (sizeof(struct __pyx_t_7questdb_7ingress_col_t))));
+0500: for index in range(size):
__pyx_t_1 = __pyx_v_size;
__pyx_t_2 = __pyx_t_1;
for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
__pyx_v_index = __pyx_t_3;
+0501: arr.d[index].setup = <col_setup_t*>calloc(1, sizeof(col_setup_t))
(__pyx_v_arr.d[__pyx_v_index]).setup = ((struct __pyx_t_7questdb_7ingress_col_setup_t *)calloc(1, (sizeof(struct __pyx_t_7questdb_7ingress_col_setup_t)))); }
+0502: return arr
__pyx_r = __pyx_v_arr; goto __pyx_L0;
0503:
0504:
+0505: cdef void col_t_arr_release(col_t_arr* arr) noexcept:
static void __pyx_f_7questdb_7ingress_col_t_arr_release(struct __pyx_t_7questdb_7ingress_col_t_arr *__pyx_v_arr) {
size_t __pyx_v_index;
/* … */
/* function exit code */
}
0506: cdef size_t index
+0507: if arr.d:
__pyx_t_1 = (__pyx_v_arr->d != 0);
if (__pyx_t_1) {
/* … */
}
+0508: for index in range(arr.size):
__pyx_t_2 = __pyx_v_arr->size;
__pyx_t_3 = __pyx_t_2;
for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
__pyx_v_index = __pyx_t_4;
+0509: col_t_release(&arr.d[index])
__pyx_f_7questdb_7ingress_col_t_release((&(__pyx_v_arr->d[__pyx_v_index])));
}
+0510: free(arr.d)
free(__pyx_v_arr->d);
+0511: arr.size = 0
__pyx_v_arr->size = 0;
+0512: arr.d = NULL
__pyx_v_arr->d = NULL;
0513:
0514:
+0515: cdef object _NUMPY = None # module object
__Pyx_INCREF(Py_None); __Pyx_XGOTREF(__pyx_v_7questdb_7ingress__NUMPY); __Pyx_DECREF_SET(__pyx_v_7questdb_7ingress__NUMPY, Py_None); __Pyx_GIVEREF(Py_None);
+0516: cdef object _NUMPY_BOOL = None
__Pyx_INCREF(Py_None); __Pyx_XGOTREF(__pyx_v_7questdb_7ingress__NUMPY_BOOL); __Pyx_DECREF_SET(__pyx_v_7questdb_7ingress__NUMPY_BOOL, Py_None); __Pyx_GIVEREF(Py_None);
+0517: cdef object _NUMPY_UINT8 = None
__Pyx_INCREF(Py_None); __Pyx_XGOTREF(__pyx_v_7questdb_7ingress__NUMPY_UINT8); __Pyx_DECREF_SET(__pyx_v_7questdb_7ingress__NUMPY_UINT8, Py_None); __Pyx_GIVEREF(Py_None);
+0518: cdef object _NUMPY_INT8 = None
__Pyx_INCREF(Py_None); __Pyx_XGOTREF(__pyx_v_7questdb_7ingress__NUMPY_INT8); __Pyx_DECREF_SET(__pyx_v_7questdb_7ingress__NUMPY_INT8, Py_None); __Pyx_GIVEREF(Py_None);
+0519: cdef object _NUMPY_UINT16 = None
__Pyx_INCREF(Py_None); __Pyx_XGOTREF(__pyx_v_7questdb_7ingress__NUMPY_UINT16); __Pyx_DECREF_SET(__pyx_v_7questdb_7ingress__NUMPY_UINT16, Py_None); __Pyx_GIVEREF(Py_None);
+0520: cdef object _NUMPY_INT16 = None
__Pyx_INCREF(Py_None); __Pyx_XGOTREF(__pyx_v_7questdb_7ingress__NUMPY_INT16); __Pyx_DECREF_SET(__pyx_v_7questdb_7ingress__NUMPY_INT16, Py_None); __Pyx_GIVEREF(Py_None);
+0521: cdef object _NUMPY_UINT32 = None
__Pyx_INCREF(Py_None); __Pyx_XGOTREF(__pyx_v_7questdb_7ingress__NUMPY_UINT32); __Pyx_DECREF_SET(__pyx_v_7questdb_7ingress__NUMPY_UINT32, Py_None); __Pyx_GIVEREF(Py_None);
+0522: cdef object _NUMPY_INT32 = None
__Pyx_INCREF(Py_None); __Pyx_XGOTREF(__pyx_v_7questdb_7ingress__NUMPY_INT32); __Pyx_DECREF_SET(__pyx_v_7questdb_7ingress__NUMPY_INT32, Py_None); __Pyx_GIVEREF(Py_None);
+0523: cdef object _NUMPY_UINT64 = None
__Pyx_INCREF(Py_None); __Pyx_XGOTREF(__pyx_v_7questdb_7ingress__NUMPY_UINT64); __Pyx_DECREF_SET(__pyx_v_7questdb_7ingress__NUMPY_UINT64, Py_None); __Pyx_GIVEREF(Py_None);
+0524: cdef object _NUMPY_INT64 = None
__Pyx_INCREF(Py_None); __Pyx_XGOTREF(__pyx_v_7questdb_7ingress__NUMPY_INT64); __Pyx_DECREF_SET(__pyx_v_7questdb_7ingress__NUMPY_INT64, Py_None); __Pyx_GIVEREF(Py_None);
+0525: cdef object _NUMPY_FLOAT32 = None
__Pyx_INCREF(Py_None); __Pyx_XGOTREF(__pyx_v_7questdb_7ingress__NUMPY_FLOAT32); __Pyx_DECREF_SET(__pyx_v_7questdb_7ingress__NUMPY_FLOAT32, Py_None); __Pyx_GIVEREF(Py_None);
+0526: cdef object _NUMPY_FLOAT64 = None
__Pyx_INCREF(Py_None); __Pyx_XGOTREF(__pyx_v_7questdb_7ingress__NUMPY_FLOAT64); __Pyx_DECREF_SET(__pyx_v_7questdb_7ingress__NUMPY_FLOAT64, Py_None); __Pyx_GIVEREF(Py_None);
+0527: cdef object _NUMPY_DATETIME64_NS = None
__Pyx_INCREF(Py_None); __Pyx_XGOTREF(__pyx_v_7questdb_7ingress__NUMPY_DATETIME64_NS); __Pyx_DECREF_SET(__pyx_v_7questdb_7ingress__NUMPY_DATETIME64_NS, Py_None); __Pyx_GIVEREF(Py_None);
+0528: cdef object _NUMPY_DATETIME64_US = None
__Pyx_INCREF(Py_None); __Pyx_XGOTREF(__pyx_v_7questdb_7ingress__NUMPY_DATETIME64_US); __Pyx_DECREF_SET(__pyx_v_7questdb_7ingress__NUMPY_DATETIME64_US, Py_None); __Pyx_GIVEREF(Py_None);
+0529: cdef object _NUMPY_OBJECT = None
__Pyx_INCREF(Py_None); __Pyx_XGOTREF(__pyx_v_7questdb_7ingress__NUMPY_OBJECT); __Pyx_DECREF_SET(__pyx_v_7questdb_7ingress__NUMPY_OBJECT, Py_None); __Pyx_GIVEREF(Py_None);
+0530: cdef object _PANDAS = None # module object
__Pyx_INCREF(Py_None); __Pyx_XGOTREF(__pyx_v_7questdb_7ingress__PANDAS); __Pyx_DECREF_SET(__pyx_v_7questdb_7ingress__PANDAS, Py_None); __Pyx_GIVEREF(Py_None);
+0531: cdef object _PANDAS_NA = None # pandas.NA
__Pyx_INCREF(Py_None); __Pyx_XGOTREF(__pyx_v_7questdb_7ingress__PANDAS_NA); __Pyx_DECREF_SET(__pyx_v_7questdb_7ingress__PANDAS_NA, Py_None); __Pyx_GIVEREF(Py_None);
+0532: cdef object _PYARROW = None # module object, if available or None
__Pyx_INCREF(Py_None); __Pyx_XGOTREF(__pyx_v_7questdb_7ingress__PYARROW); __Pyx_DECREF_SET(__pyx_v_7questdb_7ingress__PYARROW, Py_None); __Pyx_GIVEREF(Py_None);
0533:
+0534: cdef int64_t _NAT = INT64_MIN # pandas NaT
__pyx_v_7questdb_7ingress__NAT = INT64_MIN;
0535:
0536:
+0537: cdef object _dataframe_may_import_deps():
static PyObject *__pyx_f_7questdb_7ingress__dataframe_may_import_deps(void) {
PyObject *__pyx_v_pandas = NULL;
PyObject *__pyx_v_numpy = NULL;
PyObject *__pyx_v_pyarrow = NULL;
PyObject *__pyx_v_ie = NULL;
PyObject *__pyx_r = NULL;
/* … */
/* function exit code */
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_5);
__Pyx_XDECREF(__pyx_t_8);
__Pyx_XDECREF(__pyx_t_9);
__Pyx_XDECREF(__pyx_t_10);
__Pyx_XDECREF(__pyx_t_11);
__Pyx_AddTraceback("questdb.ingress._dataframe_may_import_deps", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = 0;
__pyx_L0:;
__Pyx_XDECREF(__pyx_v_pandas);
__Pyx_XDECREF(__pyx_v_numpy);
__Pyx_XDECREF(__pyx_v_pyarrow);
__Pyx_XDECREF(__pyx_v_ie);
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
0538: """"
0539: Lazily import module dependencies on first use to avoid startup overhead.
0540:
0541: $ cat imp_test.py
0542: import numpy
0543: import pandas
0544: import pyarrow
0545:
0546: $ time python3 ./imp_test.py
0547: python3 ./imp_test.py 0.56s user 1.60s system 852% cpu 0.254 total
0548: """
0549: global _NUMPY, _PANDAS, _PYARROW, _PANDAS_NA
0550: global _NUMPY_BOOL
0551: global _NUMPY_UINT8
0552: global _NUMPY_INT8
0553: global _NUMPY_UINT16
0554: global _NUMPY_INT16
0555: global _NUMPY_UINT32
0556: global _NUMPY_INT32
0557: global _NUMPY_UINT64
0558: global _NUMPY_INT64
0559: global _NUMPY_FLOAT32
0560: global _NUMPY_FLOAT64
0561: global _NUMPY_DATETIME64_NS
0562: global _NUMPY_DATETIME64_US
0563: global _NUMPY_OBJECT
+0564: if _NUMPY is not None:
__pyx_t_1 = (__pyx_v_7questdb_7ingress__NUMPY != Py_None);
if (__pyx_t_1) {
/* … */
}
+0565: return
__Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0;
+0566: try:
{
/*try:*/ {
/* … */
}
__Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
goto __pyx_L9_try_end;
__pyx_L4_error:;
__Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
/* … */
__pyx_L6_except_error:;
__Pyx_XGIVEREF(__pyx_t_2);
__Pyx_XGIVEREF(__pyx_t_3);
__Pyx_XGIVEREF(__pyx_t_4);
__Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
goto __pyx_L1_error;
__pyx_L9_try_end:;
}
+0567: import pandas
__pyx_t_6 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_pandas, 0, 0, NULL, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 567, __pyx_L4_error) __pyx_t_5 = __pyx_t_6; __Pyx_GOTREF(__pyx_t_5); __pyx_v_pandas = __pyx_t_5; __pyx_t_5 = 0;
+0568: import numpy
__pyx_t_6 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_numpy, 0, 0, NULL, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 568, __pyx_L4_error) __pyx_t_5 = __pyx_t_6; __Pyx_GOTREF(__pyx_t_5); __pyx_v_numpy = __pyx_t_5; __pyx_t_5 = 0;
+0569: import pyarrow
__pyx_t_6 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_pyarrow, 0, 0, NULL, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 569, __pyx_L4_error) __pyx_t_5 = __pyx_t_6; __Pyx_GOTREF(__pyx_t_5); __pyx_v_pyarrow = __pyx_t_5; __pyx_t_5 = 0;
+0570: except ImportError as ie:
__pyx_t_7 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_ImportError)))); if (__pyx_t_7) { __Pyx_AddTraceback("questdb.ingress._dataframe_may_import_deps", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_8, &__pyx_t_9) < 0) __PYX_ERR(1, 570, __pyx_L6_except_error) __Pyx_XGOTREF(__pyx_t_5); __Pyx_XGOTREF(__pyx_t_8); __Pyx_XGOTREF(__pyx_t_9); __Pyx_INCREF(__pyx_t_8); __pyx_v_ie = __pyx_t_8; /*try:*/ { /* … */ /*finally:*/ { __pyx_L15_error:; /*exception exit:*/{ __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __pyx_t_6 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_ExceptionSwap(&__pyx_t_17, &__pyx_t_18, &__pyx_t_19); if ( unlikely(__Pyx_GetException(&__pyx_t_6, &__pyx_t_15, &__pyx_t_16) < 0)) __Pyx_ErrFetch(&__pyx_t_6, &__pyx_t_15, &__pyx_t_16); __Pyx_XGOTREF(__pyx_t_6); __Pyx_XGOTREF(__pyx_t_15); __Pyx_XGOTREF(__pyx_t_16); __Pyx_XGOTREF(__pyx_t_17); __Pyx_XGOTREF(__pyx_t_18); __Pyx_XGOTREF(__pyx_t_19); __pyx_t_7 = __pyx_lineno; __pyx_t_13 = __pyx_clineno; __pyx_t_14 = __pyx_filename; { __Pyx_DECREF(__pyx_v_ie); __pyx_v_ie = 0; } __Pyx_XGIVEREF(__pyx_t_17); __Pyx_XGIVEREF(__pyx_t_18); __Pyx_XGIVEREF(__pyx_t_19); __Pyx_ExceptionReset(__pyx_t_17, __pyx_t_18, __pyx_t_19); __Pyx_XGIVEREF(__pyx_t_6); __Pyx_XGIVEREF(__pyx_t_15); __Pyx_XGIVEREF(__pyx_t_16); __Pyx_ErrRestore(__pyx_t_6, __pyx_t_15, __pyx_t_16); __pyx_t_6 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_lineno = __pyx_t_7; __pyx_clineno = __pyx_t_13; __pyx_filename = __pyx_t_14; goto __pyx_L6_except_error; } } } goto __pyx_L6_except_error;
+0571: raise ImportError(
__pyx_t_11 = NULL;
__pyx_t_12 = 1;
{
PyObject *__pyx_callargs[2] = {__pyx_t_11, __pyx_mstate_global->__pyx_kp_u_Missing_dependencies_pandas_nump};
__pyx_t_10 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ImportError)), __pyx_callargs+__pyx_t_12, (2-__pyx_t_12) | (__pyx_t_12*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
__Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 571, __pyx_L15_error)
__Pyx_GOTREF(__pyx_t_10);
}
0572: 'Missing dependencies: `pandas`, `numpy` and `pyarrow` must all ' +
0573: 'be installed to use the `.dataframe()` method. ' +
0574: 'See: https://py-questdb-client.readthedocs.io/' +
+0575: 'en/latest/installation.html.') from ie
__Pyx_Raise(__pyx_t_10, 0, 0, __pyx_v_ie); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __PYX_ERR(1, 571, __pyx_L15_error) }
+0576: _NUMPY = numpy
__Pyx_INCREF(__pyx_v_numpy); __Pyx_XGOTREF(__pyx_v_7questdb_7ingress__NUMPY); __Pyx_DECREF_SET(__pyx_v_7questdb_7ingress__NUMPY, __pyx_v_numpy); __Pyx_GIVEREF(__pyx_v_numpy);
+0577: _NUMPY_BOOL = type(_NUMPY.dtype('bool'))
__pyx_t_8 = __pyx_v_7questdb_7ingress__NUMPY; __Pyx_INCREF(__pyx_t_8); __pyx_t_12 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_mstate_global->__pyx_n_u_bool}; __pyx_t_9 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_dtype, __pyx_callargs+__pyx_t_12, (2-__pyx_t_12) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 577, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); } __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_t_9))); __Pyx_XGOTREF(__pyx_v_7questdb_7ingress__NUMPY_BOOL); __Pyx_DECREF_SET(__pyx_v_7questdb_7ingress__NUMPY_BOOL, ((PyObject *)Py_TYPE(__pyx_t_9))); __Pyx_GIVEREF(((PyObject *)Py_TYPE(__pyx_t_9))); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+0578: _NUMPY_UINT8 = type(_NUMPY.dtype('uint8'))
__pyx_t_8 = __pyx_v_7questdb_7ingress__NUMPY; __Pyx_INCREF(__pyx_t_8); __pyx_t_12 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_mstate_global->__pyx_n_u_uint8}; __pyx_t_9 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_dtype, __pyx_callargs+__pyx_t_12, (2-__pyx_t_12) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 578, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); } __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_t_9))); __Pyx_XGOTREF(__pyx_v_7questdb_7ingress__NUMPY_UINT8); __Pyx_DECREF_SET(__pyx_v_7questdb_7ingress__NUMPY_UINT8, ((PyObject *)Py_TYPE(__pyx_t_9))); __Pyx_GIVEREF(((PyObject *)Py_TYPE(__pyx_t_9))); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+0579: _NUMPY_INT8 = type(_NUMPY.dtype('int8'))
__pyx_t_8 = __pyx_v_7questdb_7ingress__NUMPY; __Pyx_INCREF(__pyx_t_8); __pyx_t_12 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_mstate_global->__pyx_n_u_int8}; __pyx_t_9 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_dtype, __pyx_callargs+__pyx_t_12, (2-__pyx_t_12) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 579, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); } __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_t_9))); __Pyx_XGOTREF(__pyx_v_7questdb_7ingress__NUMPY_INT8); __Pyx_DECREF_SET(__pyx_v_7questdb_7ingress__NUMPY_INT8, ((PyObject *)Py_TYPE(__pyx_t_9))); __Pyx_GIVEREF(((PyObject *)Py_TYPE(__pyx_t_9))); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+0580: _NUMPY_UINT16 = type(_NUMPY.dtype('uint16'))
__pyx_t_8 = __pyx_v_7questdb_7ingress__NUMPY; __Pyx_INCREF(__pyx_t_8); __pyx_t_12 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_mstate_global->__pyx_n_u_uint16}; __pyx_t_9 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_dtype, __pyx_callargs+__pyx_t_12, (2-__pyx_t_12) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 580, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); } __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_t_9))); __Pyx_XGOTREF(__pyx_v_7questdb_7ingress__NUMPY_UINT16); __Pyx_DECREF_SET(__pyx_v_7questdb_7ingress__NUMPY_UINT16, ((PyObject *)Py_TYPE(__pyx_t_9))); __Pyx_GIVEREF(((PyObject *)Py_TYPE(__pyx_t_9))); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+0581: _NUMPY_INT16 = type(_NUMPY.dtype('int16'))
__pyx_t_8 = __pyx_v_7questdb_7ingress__NUMPY; __Pyx_INCREF(__pyx_t_8); __pyx_t_12 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_mstate_global->__pyx_n_u_int16}; __pyx_t_9 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_dtype, __pyx_callargs+__pyx_t_12, (2-__pyx_t_12) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 581, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); } __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_t_9))); __Pyx_XGOTREF(__pyx_v_7questdb_7ingress__NUMPY_INT16); __Pyx_DECREF_SET(__pyx_v_7questdb_7ingress__NUMPY_INT16, ((PyObject *)Py_TYPE(__pyx_t_9))); __Pyx_GIVEREF(((PyObject *)Py_TYPE(__pyx_t_9))); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+0582: _NUMPY_UINT32 = type(_NUMPY.dtype('uint32'))
__pyx_t_8 = __pyx_v_7questdb_7ingress__NUMPY; __Pyx_INCREF(__pyx_t_8); __pyx_t_12 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_mstate_global->__pyx_n_u_uint32}; __pyx_t_9 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_dtype, __pyx_callargs+__pyx_t_12, (2-__pyx_t_12) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 582, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); } __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_t_9))); __Pyx_XGOTREF(__pyx_v_7questdb_7ingress__NUMPY_UINT32); __Pyx_DECREF_SET(__pyx_v_7questdb_7ingress__NUMPY_UINT32, ((PyObject *)Py_TYPE(__pyx_t_9))); __Pyx_GIVEREF(((PyObject *)Py_TYPE(__pyx_t_9))); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+0583: _NUMPY_INT32 = type(_NUMPY.dtype('int32'))
__pyx_t_8 = __pyx_v_7questdb_7ingress__NUMPY; __Pyx_INCREF(__pyx_t_8); __pyx_t_12 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_mstate_global->__pyx_n_u_int32}; __pyx_t_9 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_dtype, __pyx_callargs+__pyx_t_12, (2-__pyx_t_12) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 583, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); } __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_t_9))); __Pyx_XGOTREF(__pyx_v_7questdb_7ingress__NUMPY_INT32); __Pyx_DECREF_SET(__pyx_v_7questdb_7ingress__NUMPY_INT32, ((PyObject *)Py_TYPE(__pyx_t_9))); __Pyx_GIVEREF(((PyObject *)Py_TYPE(__pyx_t_9))); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+0584: _NUMPY_UINT64 = type(_NUMPY.dtype('uint64'))
__pyx_t_8 = __pyx_v_7questdb_7ingress__NUMPY; __Pyx_INCREF(__pyx_t_8); __pyx_t_12 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_mstate_global->__pyx_n_u_uint64}; __pyx_t_9 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_dtype, __pyx_callargs+__pyx_t_12, (2-__pyx_t_12) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 584, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); } __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_t_9))); __Pyx_XGOTREF(__pyx_v_7questdb_7ingress__NUMPY_UINT64); __Pyx_DECREF_SET(__pyx_v_7questdb_7ingress__NUMPY_UINT64, ((PyObject *)Py_TYPE(__pyx_t_9))); __Pyx_GIVEREF(((PyObject *)Py_TYPE(__pyx_t_9))); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+0585: _NUMPY_INT64 = type(_NUMPY.dtype('int64'))
__pyx_t_8 = __pyx_v_7questdb_7ingress__NUMPY; __Pyx_INCREF(__pyx_t_8); __pyx_t_12 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_mstate_global->__pyx_n_u_int64}; __pyx_t_9 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_dtype, __pyx_callargs+__pyx_t_12, (2-__pyx_t_12) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 585, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); } __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_t_9))); __Pyx_XGOTREF(__pyx_v_7questdb_7ingress__NUMPY_INT64); __Pyx_DECREF_SET(__pyx_v_7questdb_7ingress__NUMPY_INT64, ((PyObject *)Py_TYPE(__pyx_t_9))); __Pyx_GIVEREF(((PyObject *)Py_TYPE(__pyx_t_9))); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+0586: _NUMPY_FLOAT32 = type(_NUMPY.dtype('float32'))
__pyx_t_8 = __pyx_v_7questdb_7ingress__NUMPY; __Pyx_INCREF(__pyx_t_8); __pyx_t_12 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_mstate_global->__pyx_n_u_float32}; __pyx_t_9 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_dtype, __pyx_callargs+__pyx_t_12, (2-__pyx_t_12) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 586, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); } __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_t_9))); __Pyx_XGOTREF(__pyx_v_7questdb_7ingress__NUMPY_FLOAT32); __Pyx_DECREF_SET(__pyx_v_7questdb_7ingress__NUMPY_FLOAT32, ((PyObject *)Py_TYPE(__pyx_t_9))); __Pyx_GIVEREF(((PyObject *)Py_TYPE(__pyx_t_9))); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+0587: _NUMPY_FLOAT64 = type(_NUMPY.dtype('float64'))
__pyx_t_8 = __pyx_v_7questdb_7ingress__NUMPY; __Pyx_INCREF(__pyx_t_8); __pyx_t_12 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_mstate_global->__pyx_n_u_float64}; __pyx_t_9 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_dtype, __pyx_callargs+__pyx_t_12, (2-__pyx_t_12) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 587, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); } __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_t_9))); __Pyx_XGOTREF(__pyx_v_7questdb_7ingress__NUMPY_FLOAT64); __Pyx_DECREF_SET(__pyx_v_7questdb_7ingress__NUMPY_FLOAT64, ((PyObject *)Py_TYPE(__pyx_t_9))); __Pyx_GIVEREF(((PyObject *)Py_TYPE(__pyx_t_9))); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+0588: _NUMPY_DATETIME64_NS = type(_NUMPY.dtype('datetime64[ns]'))
__pyx_t_8 = __pyx_v_7questdb_7ingress__NUMPY; __Pyx_INCREF(__pyx_t_8); __pyx_t_12 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_mstate_global->__pyx_kp_u_datetime64_ns}; __pyx_t_9 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_dtype, __pyx_callargs+__pyx_t_12, (2-__pyx_t_12) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 588, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); } __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_t_9))); __Pyx_XGOTREF(__pyx_v_7questdb_7ingress__NUMPY_DATETIME64_NS); __Pyx_DECREF_SET(__pyx_v_7questdb_7ingress__NUMPY_DATETIME64_NS, ((PyObject *)Py_TYPE(__pyx_t_9))); __Pyx_GIVEREF(((PyObject *)Py_TYPE(__pyx_t_9))); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+0589: _NUMPY_DATETIME64_US = type(_NUMPY.dtype('datetime64[us]'))
__pyx_t_8 = __pyx_v_7questdb_7ingress__NUMPY; __Pyx_INCREF(__pyx_t_8); __pyx_t_12 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_mstate_global->__pyx_kp_u_datetime64_us}; __pyx_t_9 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_dtype, __pyx_callargs+__pyx_t_12, (2-__pyx_t_12) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 589, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); } __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_t_9))); __Pyx_XGOTREF(__pyx_v_7questdb_7ingress__NUMPY_DATETIME64_US); __Pyx_DECREF_SET(__pyx_v_7questdb_7ingress__NUMPY_DATETIME64_US, ((PyObject *)Py_TYPE(__pyx_t_9))); __Pyx_GIVEREF(((PyObject *)Py_TYPE(__pyx_t_9))); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+0590: _NUMPY_OBJECT = type(_NUMPY.dtype('object'))
__pyx_t_8 = __pyx_v_7questdb_7ingress__NUMPY; __Pyx_INCREF(__pyx_t_8); __pyx_t_12 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_mstate_global->__pyx_n_u_object}; __pyx_t_9 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_dtype, __pyx_callargs+__pyx_t_12, (2-__pyx_t_12) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 590, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); } __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_t_9))); __Pyx_XGOTREF(__pyx_v_7questdb_7ingress__NUMPY_OBJECT); __Pyx_DECREF_SET(__pyx_v_7questdb_7ingress__NUMPY_OBJECT, ((PyObject *)Py_TYPE(__pyx_t_9))); __Pyx_GIVEREF(((PyObject *)Py_TYPE(__pyx_t_9))); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+0591: _PANDAS = pandas
__Pyx_INCREF(__pyx_v_pandas); __Pyx_XGOTREF(__pyx_v_7questdb_7ingress__PANDAS); __Pyx_DECREF_SET(__pyx_v_7questdb_7ingress__PANDAS, __pyx_v_pandas); __Pyx_GIVEREF(__pyx_v_pandas);
+0592: _PANDAS_NA = pandas.NA
__pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_pandas, __pyx_mstate_global->__pyx_n_u_NA); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 592, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_XGOTREF(__pyx_v_7questdb_7ingress__PANDAS_NA); __Pyx_DECREF_SET(__pyx_v_7questdb_7ingress__PANDAS_NA, __pyx_t_9); __Pyx_GIVEREF(__pyx_t_9); __pyx_t_9 = 0;
+0593: _PYARROW = pyarrow
__Pyx_INCREF(__pyx_v_pyarrow); __Pyx_XGOTREF(__pyx_v_7questdb_7ingress__PYARROW); __Pyx_DECREF_SET(__pyx_v_7questdb_7ingress__PYARROW, __pyx_v_pyarrow); __Pyx_GIVEREF(__pyx_v_pyarrow);
0594:
0595:
+0596: cdef object _dataframe_check_is_dataframe(object df):
static PyObject *__pyx_f_7questdb_7ingress__dataframe_check_is_dataframe(PyObject *__pyx_v_df) {
PyObject *__pyx_r = NULL;
/* … */
/* function exit code */
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
__Pyx_XDECREF(__pyx_t_4);
__Pyx_XDECREF(__pyx_t_5);
__Pyx_XDECREF(__pyx_t_6);
__Pyx_XDECREF(__pyx_t_7);
__Pyx_XDECREF(__pyx_t_8);
__Pyx_XDECREF(__pyx_t_9);
__Pyx_AddTraceback("questdb.ingress._dataframe_check_is_dataframe", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = 0;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
+0597: if not isinstance(df, _PANDAS.DataFrame):
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_7questdb_7ingress__PANDAS, __pyx_mstate_global->__pyx_n_u_DataFrame); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 597, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyObject_IsInstance(__pyx_v_df, __pyx_t_1); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(1, 597, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = (!__pyx_t_2); if (unlikely(__pyx_t_3)) { /* … */ }
+0598: raise IngressError(
__pyx_t_4 = NULL;
__Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_IngressError); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 598, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
+0599: IngressErrorCode.InvalidApiCall,
__Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_IngressErrorCode); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 599, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_InvalidApiCall); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 599, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+0600: f'Bad argument `df`: Expected {_fqn(_PANDAS.DataFrame)}, ' +
__pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_7questdb_7ingress__PANDAS, __pyx_mstate_global->__pyx_n_u_DataFrame); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 600, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (!(likely(PyType_CheckExact(__pyx_t_6))||((__pyx_t_6) == Py_None) || __Pyx_RaiseUnexpectedTypeError("type", __pyx_t_6))) __PYX_ERR(1, 600, __pyx_L1_error) __pyx_t_8 = __pyx_f_7questdb_7ingress__fqn(((PyTypeObject*)__pyx_t_6)); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 600, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = __Pyx_PyUnicode_Unicode(__pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 600, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; /* … */ __pyx_t_8 = __Pyx_PyUnicode_Join(__pyx_t_10, 5, 28 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6) + 24 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_9) + 1, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9)); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 600, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_11 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_5))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5); assert(__pyx_t_4); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_5, __pyx__function); __pyx_t_11 = 0; } #endif { PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_t_7, __pyx_t_8}; __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_11, (3-__pyx_t_11) | (__pyx_t_11*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 598, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __PYX_ERR(1, 598, __pyx_L1_error)
+0601: f'not an object of type {_fqn(type(df))}.')
__pyx_t_8 = __pyx_f_7questdb_7ingress__fqn(((PyTypeObject*)((PyObject *)Py_TYPE(__pyx_v_df)))); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 601, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = __Pyx_PyUnicode_Unicode(__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 601, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_10[0] = __pyx_mstate_global->__pyx_kp_u_Bad_argument_df_Expected; __pyx_t_10[1] = __pyx_t_6; __pyx_t_10[2] = __pyx_mstate_global->__pyx_kp_u_not_an_object_of_type; __pyx_t_10[3] = __pyx_t_9; __pyx_t_10[4] = __pyx_mstate_global->__pyx_kp_u_;
0602:
0603:
+0604: cdef ssize_t _dataframe_resolve_table_name(
static Py_ssize_t __pyx_f_7questdb_7ingress__dataframe_resolve_table_name(struct qdb_pystr_buf *__pyx_v_b, PyObject *__pyx_v_df, PyObject *__pyx_v_pandas_cols, struct __pyx_t_7questdb_7ingress_col_t_arr *__pyx_v_cols, PyObject *__pyx_v_table_name, PyObject *__pyx_v_table_name_col, size_t __pyx_v_col_count, struct line_sender_table_name *__pyx_v_name_out) {
size_t __pyx_v_col_index;
struct __pyx_obj_7questdb_7ingress_PandasCol *__pyx_v_pandas_col = 0;
struct __pyx_t_7questdb_7ingress_col_t *__pyx_v_col;
PyObject *__pyx_v_ie = NULL;
Py_ssize_t __pyx_r;
/* … */
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_2);
__Pyx_XDECREF(__pyx_t_3);
__Pyx_XDECREF(__pyx_t_9);
__Pyx_XDECREF(__pyx_t_10);
__Pyx_XDECREF(__pyx_t_12);
__Pyx_XDECREF(__pyx_t_13);
__Pyx_XDECREF(__pyx_t_14);
__Pyx_AddTraceback("questdb.ingress._dataframe_resolve_table_name", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = -2L;
__pyx_L0:;
__Pyx_XDECREF((PyObject *)__pyx_v_pandas_col);
__Pyx_XDECREF(__pyx_v_ie);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
0605: qdb_pystr_buf* b,
0606: object df,
0607: list pandas_cols,
0608: col_t_arr* cols,
0609: object table_name,
0610: object table_name_col,
0611: size_t col_count,
0612: line_sender_table_name* name_out) except -2:
0613: """
0614: Resolve the table name string or column.
0615:
0616: Returns -1 if the table name is a string, otherwise the column index.
0617: """
+0618: cdef size_t col_index = 0
__pyx_v_col_index = 0;
0619: cdef PandasCol pandas_col
0620: cdef col_t* col
+0621: if table_name is not None:
__pyx_t_1 = (__pyx_v_table_name != Py_None);
if (__pyx_t_1) {
/* … */
}
+0622: if table_name_col is not None:
__pyx_t_1 = (__pyx_v_table_name_col != Py_None);
if (unlikely(__pyx_t_1)) {
/* … */
}
+0623: raise ValueError(
__pyx_t_3 = NULL;
__pyx_t_4 = 1;
{
PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_Can_specify_only_one_of_table_na};
__pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
__Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 623, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
}
__Pyx_Raise(__pyx_t_2, 0, 0, 0);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__PYX_ERR(1, 623, __pyx_L1_error)
0624: 'Can specify only one of `table_name` or `table_name_col`.')
+0625: if isinstance(table_name, str):
__pyx_t_1 = PyUnicode_Check(__pyx_v_table_name);
if (likely(__pyx_t_1)) {
/* … */
}
+0626: try:
{
/*try:*/ {
/* … */
}
__pyx_L6_error:;
__Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
/* … */
__pyx_L8_except_error:;
__Pyx_XGIVEREF(__pyx_t_5);
__Pyx_XGIVEREF(__pyx_t_6);
__Pyx_XGIVEREF(__pyx_t_7);
__Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7);
goto __pyx_L1_error;
__pyx_L10_try_return:;
__Pyx_XGIVEREF(__pyx_t_5);
__Pyx_XGIVEREF(__pyx_t_6);
__Pyx_XGIVEREF(__pyx_t_7);
__Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7);
goto __pyx_L0;
}
+0627: str_to_table_name_copy(b, <PyObject*>table_name, name_out)
__pyx_t_8 = __pyx_f_7questdb_7ingress_str_to_table_name_copy(__pyx_v_b, ((PyObject *)__pyx_v_table_name), __pyx_v_name_out); if (unlikely(__pyx_t_8 == ((__pyx_t_7questdb_7ingress_void_int)-1))) __PYX_ERR(1, 627, __pyx_L6_error)
+0628: return -1 # Magic value for "no column index".
__pyx_r = -1L;
goto __pyx_L10_try_return;
+0629: except IngressError as ie:
__Pyx_ErrFetch(&__pyx_t_2, &__pyx_t_3, &__pyx_t_9); __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_IngressError); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 629, __pyx_L8_except_error) __Pyx_GOTREF(__pyx_t_10); __pyx_t_11 = __Pyx_PyErr_GivenExceptionMatches(__pyx_t_2, __pyx_t_10); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_ErrRestore(__pyx_t_2, __pyx_t_3, __pyx_t_9); __pyx_t_2 = 0; __pyx_t_3 = 0; __pyx_t_9 = 0; if (__pyx_t_11) { __Pyx_AddTraceback("questdb.ingress._dataframe_resolve_table_name", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_9, &__pyx_t_3, &__pyx_t_2) < 0) __PYX_ERR(1, 629, __pyx_L8_except_error) __Pyx_XGOTREF(__pyx_t_9); __Pyx_XGOTREF(__pyx_t_3); __Pyx_XGOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_v_ie = __pyx_t_3; /*try:*/ { /* … */ /*finally:*/ { __pyx_L17_error:; /*exception exit:*/{ __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_ExceptionSwap(&__pyx_t_20, &__pyx_t_21, &__pyx_t_22); if ( unlikely(__Pyx_GetException(&__pyx_t_17, &__pyx_t_18, &__pyx_t_19) < 0)) __Pyx_ErrFetch(&__pyx_t_17, &__pyx_t_18, &__pyx_t_19); __Pyx_XGOTREF(__pyx_t_17); __Pyx_XGOTREF(__pyx_t_18); __Pyx_XGOTREF(__pyx_t_19); __Pyx_XGOTREF(__pyx_t_20); __Pyx_XGOTREF(__pyx_t_21); __Pyx_XGOTREF(__pyx_t_22); __pyx_t_11 = __pyx_lineno; __pyx_t_15 = __pyx_clineno; __pyx_t_16 = __pyx_filename; { __Pyx_DECREF(__pyx_v_ie); __pyx_v_ie = 0; } __Pyx_XGIVEREF(__pyx_t_20); __Pyx_XGIVEREF(__pyx_t_21); __Pyx_XGIVEREF(__pyx_t_22); __Pyx_ExceptionReset(__pyx_t_20, __pyx_t_21, __pyx_t_22); __Pyx_XGIVEREF(__pyx_t_17); __Pyx_XGIVEREF(__pyx_t_18); __Pyx_XGIVEREF(__pyx_t_19); __Pyx_ErrRestore(__pyx_t_17, __pyx_t_18, __pyx_t_19); __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_lineno = __pyx_t_11; __pyx_clineno = __pyx_t_15; __pyx_filename = __pyx_t_16; goto __pyx_L8_except_error; } } } goto __pyx_L8_except_error;
+0630: raise ValueError(
__pyx_t_12 = NULL;
+0631: f'Bad argument `table_name`: {ie}')
__pyx_t_13 = __Pyx_PyObject_FormatSimple(__pyx_v_ie, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_13)) __PYX_ERR(1, 631, __pyx_L17_error) __Pyx_GOTREF(__pyx_t_13); __pyx_t_14 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_Bad_argument_table_name, __pyx_t_13); if (unlikely(!__pyx_t_14)) __PYX_ERR(1, 631, __pyx_L17_error) __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_4 = 1; { PyObject *__pyx_callargs[2] = {__pyx_t_12, __pyx_t_14}; __pyx_t_10 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 630, __pyx_L17_error) __Pyx_GOTREF(__pyx_t_10); } __Pyx_Raise(__pyx_t_10, 0, 0, 0); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __PYX_ERR(1, 630, __pyx_L17_error) }
0632: else:
+0633: raise TypeError('Bad argument `table_name`: Must be str.')
/*else*/ {
__pyx_t_3 = NULL;
__pyx_t_4 = 1;
{
PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_Bad_argument_table_name_Must_be};
__pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_TypeError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
__Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 633, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
}
__Pyx_Raise(__pyx_t_2, 0, 0, 0);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__PYX_ERR(1, 633, __pyx_L1_error)
}
+0634: elif table_name_col is not None:
__pyx_t_1 = (__pyx_v_table_name_col != Py_None);
if (__pyx_t_1) {
/* … */
}
+0635: if isinstance(table_name_col, str):
__pyx_t_1 = PyUnicode_Check(__pyx_v_table_name_col);
if (__pyx_t_1) {
/* … */
goto __pyx_L23;
}
+0636: _dataframe_get_loc(df, table_name_col, 'table_name_col', &col_index)
__pyx_t_2 = __pyx_v_table_name_col;
__Pyx_INCREF(__pyx_t_2);
if (!(likely(PyUnicode_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_t_2))) __PYX_ERR(1, 636, __pyx_L1_error)
__pyx_t_8 = __pyx_f_7questdb_7ingress__dataframe_get_loc(__pyx_v_df, ((PyObject*)__pyx_t_2), __pyx_mstate_global->__pyx_n_u_table_name_col, (&__pyx_v_col_index)); if (unlikely(__pyx_t_8 == ((__pyx_t_7questdb_7ingress_void_int)-1))) __PYX_ERR(1, 636, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+0637: elif isinstance(table_name_col, int):
__pyx_t_1 = PyLong_Check(__pyx_v_table_name_col);
if (likely(__pyx_t_1)) {
/* … */
goto __pyx_L23;
}
+0638: _bind_col_index(
__pyx_t_8 = __pyx_f_7questdb_7ingress__bind_col_index(__pyx_mstate_global->__pyx_n_u_table_name_col, __pyx_t_15, __pyx_v_col_count, (&__pyx_v_col_index)); if (unlikely(__pyx_t_8 == ((__pyx_t_7questdb_7ingress_void_int)-1))) __PYX_ERR(1, 638, __pyx_L1_error)
+0639: 'table_name_col', table_name_col, col_count, &col_index)
__pyx_t_15 = __Pyx_PyLong_As_int(__pyx_v_table_name_col); if (unlikely((__pyx_t_15 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 639, __pyx_L1_error)
0640: else:
+0641: raise TypeError(
/*else*/ {
__pyx_t_3 = NULL;
__pyx_t_4 = 1;
{
PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_Bad_argument_table_name_col_must};
__pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_TypeError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
__Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 641, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
}
__Pyx_Raise(__pyx_t_2, 0, 0, 0);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__PYX_ERR(1, 641, __pyx_L1_error)
}
__pyx_L23:;
0642: 'Bad argument `table_name_col`: ' +
0643: 'must be a column name (str) or index (int).')
+0644: pandas_col = pandas_cols[col_index]
if (unlikely(__pyx_v_pandas_cols == Py_None)) {
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
__PYX_ERR(1, 644, __pyx_L1_error)
}
__pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_pandas_cols, __pyx_v_col_index, size_t, 0, __Pyx_PyLong_FromSize_t, 1, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 644, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_7questdb_7ingress_PandasCol))))) __PYX_ERR(1, 644, __pyx_L1_error)
__pyx_v_pandas_col = ((struct __pyx_obj_7questdb_7ingress_PandasCol *)__pyx_t_2);
__pyx_t_2 = 0;
+0645: col = &cols.d[col_index]
__pyx_v_col = (&(__pyx_v_cols->d[__pyx_v_col_index]));
+0646: _dataframe_check_column_is_str(
__pyx_t_8 = __pyx_f_7questdb_7ingress__dataframe_check_column_is_str(__pyx_mstate_global->__pyx_kp_u_Bad_argument_table_name_col, __pyx_v_pandas_col, __pyx_v_col->setup->source); if (unlikely(__pyx_t_8 == ((__pyx_t_7questdb_7ingress_void_int)-1))) __PYX_ERR(1, 646, __pyx_L1_error)
0647: 'Bad argument `table_name_col`: ',
0648: pandas_col,
0649: col.setup.source)
+0650: col.setup.meta_target = meta_target_t.meta_target_table
__pyx_v_col->setup->meta_target = __pyx_e_7questdb_7ingress_meta_target_table;
+0651: name_out.len = 0
__pyx_v_name_out->len = 0;
+0652: name_out.buf = NULL
__pyx_v_name_out->buf = NULL;
+0653: return col_index
__pyx_r = __pyx_v_col_index;
goto __pyx_L0;
+0654: elif df.index.name:
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_df, __pyx_mstate_global->__pyx_n_u_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 654, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 654, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(1, 654, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (likely(__pyx_t_1)) { /* … */ }
+0655: if not isinstance(df.index.name, str):
__pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_df, __pyx_mstate_global->__pyx_n_u_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 655, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 655, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_1 = PyUnicode_Check(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_23 = (!__pyx_t_1); if (unlikely(__pyx_t_23)) { /* … */ }
+0656: raise TypeError(
__pyx_t_3 = NULL;
0657: 'Bad dataframe index name as table name: Expected str, ' +
+0658: f'not an object of type {_fqn(type(df.index.name))}.')
__pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_df, __pyx_mstate_global->__pyx_n_u_index); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 658, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_name); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 658, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = __pyx_f_7questdb_7ingress__fqn(((PyTypeObject*)((PyObject *)Py_TYPE(__pyx_t_10)))); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 658, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_10 = __Pyx_PyUnicode_Unicode(__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 658, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_24[0] = __pyx_mstate_global->__pyx_kp_u_Bad_dataframe_index_name_as_tabl; __pyx_t_24[1] = __pyx_t_10; __pyx_t_24[2] = __pyx_mstate_global->__pyx_kp_u_; __pyx_t_9 = __Pyx_PyUnicode_Join(__pyx_t_24, 3, 76 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_10) + 1, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_10)); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 658, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_4 = 1; { PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_9}; __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_TypeError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 656, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(1, 656, __pyx_L1_error)
0659:
0660: # If the index has a name, use that as the table name.
+0661: try:
{
/*try:*/ {
/* … */
}
__pyx_L25_error:;
__Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
__Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
__Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
__Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
__Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
/* … */
__pyx_L27_except_error:;
__Pyx_XGIVEREF(__pyx_t_7);
__Pyx_XGIVEREF(__pyx_t_6);
__Pyx_XGIVEREF(__pyx_t_5);
__Pyx_ExceptionReset(__pyx_t_7, __pyx_t_6, __pyx_t_5);
goto __pyx_L1_error;
__pyx_L29_try_return:;
__Pyx_XGIVEREF(__pyx_t_7);
__Pyx_XGIVEREF(__pyx_t_6);
__Pyx_XGIVEREF(__pyx_t_5);
__Pyx_ExceptionReset(__pyx_t_7, __pyx_t_6, __pyx_t_5);
goto __pyx_L0;
}
+0662: str_to_table_name_copy(b, <PyObject*>df.index.name, name_out)
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_df, __pyx_mstate_global->__pyx_n_u_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 662, __pyx_L25_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_name); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 662, __pyx_L25_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_8 = __pyx_f_7questdb_7ingress_str_to_table_name_copy(__pyx_v_b, ((PyObject *)__pyx_t_9), __pyx_v_name_out); if (unlikely(__pyx_t_8 == ((__pyx_t_7questdb_7ingress_void_int)-1))) __PYX_ERR(1, 662, __pyx_L25_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+0663: return -1 # Magic value for "no column index".
__pyx_r = -1L;
goto __pyx_L29_try_return;
+0664: except IngressError as ie:
__Pyx_ErrFetch(&__pyx_t_9, &__pyx_t_2, &__pyx_t_3); __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_IngressError); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 664, __pyx_L27_except_error) __Pyx_GOTREF(__pyx_t_10); __pyx_t_15 = __Pyx_PyErr_GivenExceptionMatches(__pyx_t_9, __pyx_t_10); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_ErrRestore(__pyx_t_9, __pyx_t_2, __pyx_t_3); __pyx_t_9 = 0; __pyx_t_2 = 0; __pyx_t_3 = 0; if (__pyx_t_15) { __Pyx_AddTraceback("questdb.ingress._dataframe_resolve_table_name", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_2, &__pyx_t_9) < 0) __PYX_ERR(1, 664, __pyx_L27_except_error) __Pyx_XGOTREF(__pyx_t_3); __Pyx_XGOTREF(__pyx_t_2); __Pyx_XGOTREF(__pyx_t_9); __Pyx_INCREF(__pyx_t_2); __pyx_v_ie = __pyx_t_2; /*try:*/ { /* … */ /*finally:*/ { __pyx_L36_error:; /*exception exit:*/{ __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __pyx_t_22 = 0; __pyx_t_21 = 0; __pyx_t_20 = 0; __pyx_t_19 = 0; __pyx_t_18 = 0; __pyx_t_17 = 0; __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_ExceptionSwap(&__pyx_t_19, &__pyx_t_18, &__pyx_t_17); if ( unlikely(__Pyx_GetException(&__pyx_t_22, &__pyx_t_21, &__pyx_t_20) < 0)) __Pyx_ErrFetch(&__pyx_t_22, &__pyx_t_21, &__pyx_t_20); __Pyx_XGOTREF(__pyx_t_22); __Pyx_XGOTREF(__pyx_t_21); __Pyx_XGOTREF(__pyx_t_20); __Pyx_XGOTREF(__pyx_t_19); __Pyx_XGOTREF(__pyx_t_18); __Pyx_XGOTREF(__pyx_t_17); __pyx_t_15 = __pyx_lineno; __pyx_t_11 = __pyx_clineno; __pyx_t_25 = __pyx_filename; { __Pyx_DECREF(__pyx_v_ie); __pyx_v_ie = 0; } __Pyx_XGIVEREF(__pyx_t_19); __Pyx_XGIVEREF(__pyx_t_18); __Pyx_XGIVEREF(__pyx_t_17); __Pyx_ExceptionReset(__pyx_t_19, __pyx_t_18, __pyx_t_17); __Pyx_XGIVEREF(__pyx_t_22); __Pyx_XGIVEREF(__pyx_t_21); __Pyx_XGIVEREF(__pyx_t_20); __Pyx_ErrRestore(__pyx_t_22, __pyx_t_21, __pyx_t_20); __pyx_t_22 = 0; __pyx_t_21 = 0; __pyx_t_20 = 0; __pyx_t_19 = 0; __pyx_t_18 = 0; __pyx_t_17 = 0; __pyx_lineno = __pyx_t_15; __pyx_clineno = __pyx_t_11; __pyx_filename = __pyx_t_25; goto __pyx_L27_except_error; } } } goto __pyx_L27_except_error;
+0665: raise ValueError(
__pyx_t_14 = NULL;
+0666: f'Bad dataframe index name as table name: {ie}')
__pyx_t_12 = __Pyx_PyObject_FormatSimple(__pyx_v_ie, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 666, __pyx_L36_error) __Pyx_GOTREF(__pyx_t_12); __pyx_t_13 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_Bad_dataframe_index_name_as_tabl_2, __pyx_t_12); if (unlikely(!__pyx_t_13)) __PYX_ERR(1, 666, __pyx_L36_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_4 = 1; { PyObject *__pyx_callargs[2] = {__pyx_t_14, __pyx_t_13}; __pyx_t_10 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 665, __pyx_L36_error) __Pyx_GOTREF(__pyx_t_10); } __Pyx_Raise(__pyx_t_10, 0, 0, 0); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __PYX_ERR(1, 665, __pyx_L36_error) }
0667: else:
+0668: raise ValueError(
/*else*/ {
__pyx_t_2 = NULL;
__pyx_t_4 = 1;
{
PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_Must_specify_at_least_one_of_tab};
__pyx_t_9 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
__Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 668, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_9);
}
__Pyx_Raise(__pyx_t_9, 0, 0, 0);
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
__PYX_ERR(1, 668, __pyx_L1_error)
}
0669: 'Must specify at least one of `table_name` or `table_name_col`, ' +
0670: 'or set the dataframe index name (df.index.name = \'tbl_name\').')
0671:
0672:
+0673: cdef void_int _bind_col_index(
static __pyx_t_7questdb_7ingress_void_int __pyx_f_7questdb_7ingress__bind_col_index(PyObject *__pyx_v_arg_name, int __pyx_v_col_num, size_t __pyx_v_col_count, size_t *__pyx_v_col_index) {
int __pyx_v_bad;
int __pyx_v_orig_col_num;
__pyx_t_7questdb_7ingress_void_int __pyx_r;
/* … */
/* function exit code */
__pyx_r = 0;
goto __pyx_L0;
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_3);
__Pyx_XDECREF(__pyx_t_4);
__Pyx_XDECREF(__pyx_t_5);
__Pyx_XDECREF(__pyx_t_6);
__Pyx_XDECREF(__pyx_t_8);
__Pyx_AddTraceback("questdb.ingress._bind_col_index", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = -1;
__pyx_L0:;
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
0674: str arg_name, int col_num, size_t col_count,
0675: size_t* col_index) except -1:
0676: """
0677: Validate that `col_index` is in bounds for `col_count`.
0678: This function also converts negative indicies (e.g. -1 for last column) to
0679: positive indicies.
0680: """
+0681: cdef bint bad = False
__pyx_v_bad = 0;
+0682: cdef int orig_col_num = col_num
__pyx_v_orig_col_num = __pyx_v_col_num;
+0683: if col_num < 0:
__pyx_t_1 = (__pyx_v_col_num < 0);
if (__pyx_t_1) {
/* … */
}
+0684: col_num += col_count # Try convert negative offsets to positive ones.
__pyx_v_col_num = (__pyx_v_col_num + __pyx_v_col_count);
+0685: if col_num < 0:
__pyx_t_1 = (__pyx_v_col_num < 0);
if (__pyx_t_1) {
/* … */
}
+0686: bad = True
__pyx_v_bad = 1;
+0687: if (not bad) and (<size_t>col_num >= col_count):
__pyx_t_2 = (!__pyx_v_bad);
if (__pyx_t_2) {
} else {
__pyx_t_1 = __pyx_t_2;
goto __pyx_L6_bool_binop_done;
}
__pyx_t_2 = (((size_t)__pyx_v_col_num) >= __pyx_v_col_count);
__pyx_t_1 = __pyx_t_2;
__pyx_L6_bool_binop_done:;
if (__pyx_t_1) {
/* … */
}
+0688: bad = True
__pyx_v_bad = 1;
+0689: if bad:
if (unlikely(__pyx_v_bad)) {
/* … */
}
+0690: raise IndexError(
__pyx_t_4 = NULL;
+0691: f'Bad argument `{arg_name}`: {orig_col_num} index out of range')
__pyx_t_5 = __Pyx_PyUnicode_Unicode(__pyx_v_arg_name); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 691, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyUnicode_From_int(__pyx_v_orig_col_num, 0, ' ', 'd'); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 691, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7[0] = __pyx_mstate_global->__pyx_kp_u_Bad_argument; __pyx_t_7[1] = __pyx_t_5; __pyx_t_7[2] = __pyx_mstate_global->__pyx_kp_u__2; __pyx_t_7[3] = __pyx_t_6; __pyx_t_7[4] = __pyx_mstate_global->__pyx_kp_u_index_out_of_range; __pyx_t_8 = __Pyx_PyUnicode_Join(__pyx_t_7, 5, 14 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5) + 3 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6) + 19, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5)); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 691, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_9 = 1; { PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_8}; __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_IndexError)), __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 690, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); } __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(1, 690, __pyx_L1_error)
+0692: col_index[0] = <size_t>col_num
(__pyx_v_col_index[0]) = ((size_t)__pyx_v_col_num);
0693:
0694:
+0695: cdef void_int _dataframe_check_column_is_str(
static __pyx_t_7questdb_7ingress_void_int __pyx_f_7questdb_7ingress__dataframe_check_column_is_str(PyObject *__pyx_v_err_msg_prefix, struct __pyx_obj_7questdb_7ingress_PandasCol *__pyx_v_pandas_col, enum __pyx_t_7questdb_7ingress_col_source_t __pyx_v_source) {
PyObject *__pyx_v_inferred_descr = 0;
__pyx_t_7questdb_7ingress_void_int __pyx_r;
/* … */
/* function exit code */
__pyx_r = 0;
goto __pyx_L0;
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
__Pyx_XDECREF(__pyx_t_3);
__Pyx_XDECREF(__pyx_t_5);
__Pyx_XDECREF(__pyx_t_6);
__Pyx_XDECREF(__pyx_t_7);
__Pyx_XDECREF(__pyx_t_9);
__Pyx_XDECREF(__pyx_t_10);
__Pyx_AddTraceback("questdb.ingress._dataframe_check_column_is_str", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = -1;
__pyx_L0:;
__Pyx_XDECREF(__pyx_v_inferred_descr);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
0696: str err_msg_prefix,
0697: PandasCol pandas_col,
0698: col_source_t source) except -1:
+0699: cdef str inferred_descr = ""
__Pyx_INCREF(__pyx_mstate_global->__pyx_kp_u__3);
__pyx_v_inferred_descr = __pyx_mstate_global->__pyx_kp_u__3;
+0700: if not source in _STR_SOURCES:
__pyx_t_1 = __Pyx_PyLong_From_enum____pyx_t_7questdb_7ingress_col_source_t(__pyx_v_source); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 700, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (unlikely(__pyx_v_7questdb_7ingress__STR_SOURCES == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); __PYX_ERR(1, 700, __pyx_L1_error) } __pyx_t_2 = (__Pyx_PySet_ContainsTF(__pyx_t_1, __pyx_v_7questdb_7ingress__STR_SOURCES, Py_NE)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(1, 700, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_2) { /* … */ }
+0701: if isinstance(pandas_col.dtype, _NUMPY_OBJECT):
__pyx_t_1 = __pyx_v_pandas_col->dtype;
__Pyx_INCREF(__pyx_t_1);
__pyx_t_3 = __pyx_v_7questdb_7ingress__NUMPY_OBJECT;
__Pyx_INCREF(__pyx_t_3);
__pyx_t_2 = PyObject_IsInstance(__pyx_t_1, __pyx_t_3); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(1, 701, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
if (__pyx_t_2) {
/* … */
}
+0702: inferred_descr = f' (inferred type: {_PYOBJ_SOURCE_DESCR[source]})'
if (unlikely(__pyx_v_7questdb_7ingress__PYOBJ_SOURCE_DESCR == Py_None)) {
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
__PYX_ERR(1, 702, __pyx_L1_error)
}
__pyx_t_3 = __Pyx_PyLong_From_enum____pyx_t_7questdb_7ingress_col_source_t(__pyx_v_source); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 702, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_7questdb_7ingress__PYOBJ_SOURCE_DESCR, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 702, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__pyx_t_3 = __Pyx_PyObject_FormatSimple(__pyx_t_1, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 702, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_t_4[0] = __pyx_mstate_global->__pyx_kp_u_inferred_type;
__pyx_t_4[1] = __pyx_t_3;
__pyx_t_4[2] = __pyx_mstate_global->__pyx_kp_u__4;
__pyx_t_1 = __Pyx_PyUnicode_Join(__pyx_t_4, 3, 17 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3) + 1, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3));
if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 702, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_DECREF_SET(__pyx_v_inferred_descr, ((PyObject*)__pyx_t_1));
__pyx_t_1 = 0;
+0703: raise IngressError(
__pyx_t_3 = NULL;
__Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_IngressError); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 703, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
+0704: IngressErrorCode.BadDataFrame,
__Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_IngressErrorCode); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 704, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_BadDataFrame); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 704, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+0705: err_msg_prefix +
__pyx_t_6 = __Pyx_PyUnicode_ConcatSafe(__pyx_v_err_msg_prefix, __pyx_t_9); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 705, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+0706: f'Bad dtype `{pandas_col.dtype}`{inferred_descr} for the ' +
__pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_v_pandas_col->dtype, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 706, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_8[0] = __pyx_mstate_global->__pyx_kp_u_Bad_dtype; __pyx_t_8[1] = __pyx_t_6; __pyx_t_8[2] = __pyx_mstate_global->__pyx_kp_u__5; __pyx_t_8[3] = __pyx_v_inferred_descr; __pyx_t_8[4] = __pyx_mstate_global->__pyx_kp_u_for_the; __pyx_t_9 = __Pyx_PyUnicode_Join(__pyx_t_8, 5, 11 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6) + 1 + __Pyx_PyUnicode_GET_LENGTH(__pyx_v_inferred_descr) + 9, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_v_inferred_descr)); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 706, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* … */ __pyx_t_9 = __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_OwnStrongReferenceInPlace(__pyx_t_6, __pyx_t_10); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 706, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_11 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_5))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5); assert(__pyx_t_3); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_5, __pyx__function); __pyx_t_11 = 0; } #endif { PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_t_7, __pyx_t_9}; __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_11, (3-__pyx_t_11) | (__pyx_t_11*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 703, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __PYX_ERR(1, 703, __pyx_L1_error)
+0707: f'{pandas_col.name!r} column: Must be a strings column.')
__pyx_t_9 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_v_pandas_col->name), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 707, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_10 = __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_OwnStrongReferenceInPlace(__pyx_t_9, __pyx_mstate_global->__pyx_kp_u_column_Must_be_a_strings_column); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 707, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
0708:
0709:
+0710: @cython.internal
struct __pyx_obj_7questdb_7ingress_PandasCol {
PyObject_HEAD
PyObject *name;
PyObject *dtype;
PyObject *series;
};
0711: cdef class PandasCol:
0712: """Python object representing a column to parse .dataframe() arguments."""
0713: cdef str name
0714: cdef object dtype
0715: cdef object series
0716:
+0717: def __init__(
/* Python wrapper */
static int __pyx_pw_7questdb_7ingress_9PandasCol_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_7questdb_7ingress_9PandasCol_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_name = 0;
PyObject *__pyx_v_dtype = 0;
PyObject *__pyx_v_series = 0;
CYTHON_UNUSED Py_ssize_t __pyx_nargs;
CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
int __pyx_r;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
#if CYTHON_ASSUME_SAFE_SIZE
__pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
#else
__pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
#endif
__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
{
PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_name,&__pyx_mstate_global->__pyx_n_u_dtype,&__pyx_mstate_global->__pyx_n_u_series,0};
PyObject* values[3] = {0,0,0};
const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 717, __pyx_L3_error)
if (__pyx_kwds_len > 0) {
switch (__pyx_nargs) {
case 3:
values[2] = __Pyx_ArgRef_VARARGS(__pyx_args, 2);
if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(1, 717, __pyx_L3_error)
CYTHON_FALLTHROUGH;
case 2:
values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1);
if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 717, __pyx_L3_error)
CYTHON_FALLTHROUGH;
case 1:
values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0);
if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 717, __pyx_L3_error)
CYTHON_FALLTHROUGH;
case 0: break;
default: goto __pyx_L5_argtuple_error;
}
const Py_ssize_t kwd_pos_args = __pyx_nargs;
if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < (0)) __PYX_ERR(1, 717, __pyx_L3_error)
for (Py_ssize_t i = __pyx_nargs; i < 3; i++) {
if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, i); __PYX_ERR(1, 717, __pyx_L3_error) }
}
} else if (unlikely(__pyx_nargs != 3)) {
goto __pyx_L5_argtuple_error;
} else {
values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0);
if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 717, __pyx_L3_error)
values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1);
if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 717, __pyx_L3_error)
values[2] = __Pyx_ArgRef_VARARGS(__pyx_args, 2);
if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(1, 717, __pyx_L3_error)
}
__pyx_v_name = ((PyObject*)values[0]);
__pyx_v_dtype = values[1];
__pyx_v_series = values[2];
}
goto __pyx_L6_skip;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, __pyx_nargs); __PYX_ERR(1, 717, __pyx_L3_error)
__pyx_L6_skip:;
goto __pyx_L4_argument_unpacking_done;
__pyx_L3_error:;
for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
Py_XDECREF(values[__pyx_temp]);
}
__Pyx_AddTraceback("questdb.ingress.PandasCol.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return -1;
__pyx_L4_argument_unpacking_done:;
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_name), (&PyUnicode_Type), 1, "name", 1))) __PYX_ERR(1, 719, __pyx_L1_error)
__pyx_r = __pyx_pf_7questdb_7ingress_9PandasCol___init__(((struct __pyx_obj_7questdb_7ingress_PandasCol *)__pyx_v_self), __pyx_v_name, __pyx_v_dtype, __pyx_v_series);
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
/* function exit code */
goto __pyx_L0;
__pyx_L1_error:;
__pyx_r = -1;
for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
Py_XDECREF(values[__pyx_temp]);
}
goto __pyx_L7_cleaned_up;
__pyx_L0:;
for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
Py_XDECREF(values[__pyx_temp]);
}
__pyx_L7_cleaned_up:;
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
static int __pyx_pf_7questdb_7ingress_9PandasCol___init__(struct __pyx_obj_7questdb_7ingress_PandasCol *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_dtype, PyObject *__pyx_v_series) {
int __pyx_r;
/* … */
/* function exit code */
__pyx_r = 0;
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
0718: self,
0719: str name,
0720: object dtype,
0721: object series):
+0722: self.name = name
__Pyx_INCREF(__pyx_v_name); __Pyx_GIVEREF(__pyx_v_name); __Pyx_GOTREF(__pyx_v_self->name); __Pyx_DECREF(__pyx_v_self->name); __pyx_v_self->name = __pyx_v_name;
+0723: self.dtype = dtype
__Pyx_INCREF(__pyx_v_dtype); __Pyx_GIVEREF(__pyx_v_dtype); __Pyx_GOTREF(__pyx_v_self->dtype); __Pyx_DECREF(__pyx_v_self->dtype); __pyx_v_self->dtype = __pyx_v_dtype;
+0724: self.series = series
__Pyx_INCREF(__pyx_v_series); __Pyx_GIVEREF(__pyx_v_series); __Pyx_GOTREF(__pyx_v_self->series); __Pyx_DECREF(__pyx_v_self->series); __pyx_v_self->series = __pyx_v_series;
0725:
+0726: cdef void_int _dataframe_resolve_symbols(
static __pyx_t_7questdb_7ingress_void_int __pyx_f_7questdb_7ingress__dataframe_resolve_symbols(PyObject *__pyx_v_df, PyObject *__pyx_v_pandas_cols, struct __pyx_t_7questdb_7ingress_col_t_arr *__pyx_v_cols, Py_ssize_t __pyx_v_table_name_col, Py_ssize_t __pyx_v_at_col, PyObject *__pyx_v_symbols) {
size_t __pyx_v_col_index;
PyObject *__pyx_v_symbol = 0;
struct __pyx_obj_7questdb_7ingress_PandasCol *__pyx_v_pandas_col = 0;
struct __pyx_t_7questdb_7ingress_col_t *__pyx_v_col;
__pyx_t_7questdb_7ingress_void_int __pyx_r;
/* … */
/* function exit code */
__pyx_r = 0;
goto __pyx_L0;
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_5);
__Pyx_XDECREF(__pyx_t_6);
__Pyx_XDECREF(__pyx_t_12);
__Pyx_XDECREF(__pyx_t_13);
__Pyx_XDECREF(__pyx_t_14);
__Pyx_AddTraceback("questdb.ingress._dataframe_resolve_symbols", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = -1;
__pyx_L0:;
__Pyx_XDECREF(__pyx_v_symbol);
__Pyx_XDECREF((PyObject *)__pyx_v_pandas_col);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
0727: object df,
0728: list pandas_cols,
0729: col_t_arr* cols,
0730: ssize_t table_name_col,
0731: ssize_t at_col,
0732: object symbols) except -1:
+0733: cdef size_t col_index = 0
__pyx_v_col_index = 0;
0734: cdef object symbol
0735: cdef PandasCol pandas_col
0736: cdef col_t* col
+0737: if symbols == 'auto':
__pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_symbols, __pyx_mstate_global->__pyx_n_u_auto, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(1, 737, __pyx_L1_error) if (__pyx_t_1) { /* … */ goto __pyx_L3; }
+0738: for col_index in range(cols.size):
__pyx_t_2 = __pyx_v_cols->size;
__pyx_t_3 = __pyx_t_2;
for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
__pyx_v_col_index = __pyx_t_4;
+0739: pandas_col = pandas_cols[col_index]
if (unlikely(__pyx_v_pandas_cols == Py_None)) {
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
__PYX_ERR(1, 739, __pyx_L1_error)
}
__pyx_t_5 = __Pyx_GetItemInt_List(__pyx_v_pandas_cols, __pyx_v_col_index, size_t, 0, __Pyx_PyLong_FromSize_t, 1, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 739, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_mstate_global->__pyx_ptype_7questdb_7ingress_PandasCol))))) __PYX_ERR(1, 739, __pyx_L1_error)
__Pyx_XDECREF_SET(__pyx_v_pandas_col, ((struct __pyx_obj_7questdb_7ingress_PandasCol *)__pyx_t_5));
__pyx_t_5 = 0;
+0740: col = &cols.d[col_index]
__pyx_v_col = (&(__pyx_v_cols->d[__pyx_v_col_index]));
+0741: if col.setup.meta_target == meta_target_t.meta_target_field:
__pyx_t_1 = (__pyx_v_col->setup->meta_target == __pyx_e_7questdb_7ingress_meta_target_field);
if (__pyx_t_1) {
/* … */
}
}
+0742: if isinstance(pandas_col.dtype, _PANDAS.CategoricalDtype):
__pyx_t_5 = __pyx_v_pandas_col->dtype;
__Pyx_INCREF(__pyx_t_5);
__pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_7questdb_7ingress__PANDAS, __pyx_mstate_global->__pyx_n_u_CategoricalDtype); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 742, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_6);
__pyx_t_1 = PyObject_IsInstance(__pyx_t_5, __pyx_t_6); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(1, 742, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
if (__pyx_t_1) {
/* … */
}
+0743: col.setup.meta_target = meta_target_t.meta_target_symbol
__pyx_v_col->setup->meta_target = __pyx_e_7questdb_7ingress_meta_target_symbol;
+0744: elif symbols is False:
__pyx_t_1 = (__pyx_v_symbols == Py_False);
if (__pyx_t_1) {
goto __pyx_L3;
}
0745: pass
+0746: elif symbols is True:
__pyx_t_1 = (__pyx_v_symbols == Py_True);
if (__pyx_t_1) {
/* … */
goto __pyx_L3;
}
+0747: for col_index in range(cols.size):
__pyx_t_2 = __pyx_v_cols->size;
__pyx_t_3 = __pyx_t_2;
for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
__pyx_v_col_index = __pyx_t_4;
+0748: col = &cols.d[col_index]
__pyx_v_col = (&(__pyx_v_cols->d[__pyx_v_col_index]));
+0749: if col.setup.source in _STR_SOURCES:
__pyx_t_6 = __Pyx_PyLong_From_enum____pyx_t_7questdb_7ingress_col_source_t(__pyx_v_col->setup->source); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 749, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (unlikely(__pyx_v_7questdb_7ingress__STR_SOURCES == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); __PYX_ERR(1, 749, __pyx_L1_error) } __pyx_t_1 = (__Pyx_PySet_ContainsTF(__pyx_t_6, __pyx_v_7questdb_7ingress__STR_SOURCES, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(1, 749, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (__pyx_t_1) { /* … */ } }
+0750: pandas_col = pandas_cols[col_index]
if (unlikely(__pyx_v_pandas_cols == Py_None)) {
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
__PYX_ERR(1, 750, __pyx_L1_error)
}
__pyx_t_6 = __Pyx_GetItemInt_List(__pyx_v_pandas_cols, __pyx_v_col_index, size_t, 0, __Pyx_PyLong_FromSize_t, 1, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 750, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_6);
if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_mstate_global->__pyx_ptype_7questdb_7ingress_PandasCol))))) __PYX_ERR(1, 750, __pyx_L1_error)
__Pyx_XDECREF_SET(__pyx_v_pandas_col, ((struct __pyx_obj_7questdb_7ingress_PandasCol *)__pyx_t_6));
__pyx_t_6 = 0;
+0751: if col.setup.meta_target == meta_target_t.meta_target_field:
__pyx_t_1 = (__pyx_v_col->setup->meta_target == __pyx_e_7questdb_7ingress_meta_target_field);
if (__pyx_t_1) {
/* … */
}
+0752: col.setup.meta_target = meta_target_t.meta_target_symbol
__pyx_v_col->setup->meta_target = __pyx_e_7questdb_7ingress_meta_target_symbol;
0753: else:
+0754: if not isinstance(symbols, (tuple, list)):
/*else*/ {
__pyx_t_7 = PyTuple_Check(__pyx_v_symbols);
if (!__pyx_t_7) {
} else {
__pyx_t_1 = __pyx_t_7;
goto __pyx_L13_bool_binop_done;
}
__pyx_t_7 = PyList_Check(__pyx_v_symbols);
__pyx_t_1 = __pyx_t_7;
__pyx_L13_bool_binop_done:;
__pyx_t_7 = (!__pyx_t_1);
if (unlikely(__pyx_t_7)) {
/* … */
}
+0755: raise TypeError(
__pyx_t_5 = NULL;
__pyx_t_2 = 1;
{
PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_mstate_global->__pyx_kp_u_Bad_argument_symbols_Must_be_a_b};
__pyx_t_6 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_TypeError)), __pyx_callargs+__pyx_t_2, (2-__pyx_t_2) | (__pyx_t_2*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
__Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 755, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_6);
}
__Pyx_Raise(__pyx_t_6, 0, 0, 0);
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
__PYX_ERR(1, 755, __pyx_L1_error)
0756: f'Bad argument `symbols`: Must be a bool or a tuple or list '+
0757: 'of column names (str) or indices (int).')
+0758: for symbol in symbols:
if (likely(PyList_CheckExact(__pyx_v_symbols)) || PyTuple_CheckExact(__pyx_v_symbols)) { __pyx_t_6 = __pyx_v_symbols; __Pyx_INCREF(__pyx_t_6); __pyx_t_8 = 0; __pyx_t_9 = NULL; } else { __pyx_t_8 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_v_symbols); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 758, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_9 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_6); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 758, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_9)) { if (likely(PyList_CheckExact(__pyx_t_6))) { { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_6); #if !CYTHON_ASSUME_SAFE_SIZE if (unlikely((__pyx_temp < 0))) __PYX_ERR(1, 758, __pyx_L1_error) #endif if (__pyx_t_8 >= __pyx_temp) break; } __pyx_t_5 = __Pyx_PyList_GetItemRefFast(__pyx_t_6, __pyx_t_8, __Pyx_ReferenceSharing_OwnStrongReference); ++__pyx_t_8; } else { { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_6); #if !CYTHON_ASSUME_SAFE_SIZE if (unlikely((__pyx_temp < 0))) __PYX_ERR(1, 758, __pyx_L1_error) #endif if (__pyx_t_8 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_5 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_8)); #else __pyx_t_5 = __Pyx_PySequence_ITEM(__pyx_t_6, __pyx_t_8); #endif ++__pyx_t_8; } if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 758, __pyx_L1_error) } else { __pyx_t_5 = __pyx_t_9(__pyx_t_6); if (unlikely(!__pyx_t_5)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(1, 758, __pyx_L1_error) PyErr_Clear(); } break; } } __Pyx_GOTREF(__pyx_t_5); __Pyx_XDECREF_SET(__pyx_v_symbol, __pyx_t_5); __pyx_t_5 = 0; /* … */ } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } __pyx_L3:;
+0759: if isinstance(symbol, str):
__pyx_t_7 = PyUnicode_Check(__pyx_v_symbol);
if (__pyx_t_7) {
/* … */
goto __pyx_L17;
}
+0760: _dataframe_get_loc(df, symbol, 'symbols', &col_index)
__pyx_t_5 = __pyx_v_symbol;
__Pyx_INCREF(__pyx_t_5);
if (!(likely(PyUnicode_CheckExact(__pyx_t_5))||((__pyx_t_5) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_t_5))) __PYX_ERR(1, 760, __pyx_L1_error)
__pyx_t_10 = __pyx_f_7questdb_7ingress__dataframe_get_loc(__pyx_v_df, ((PyObject*)__pyx_t_5), __pyx_mstate_global->__pyx_n_u_symbols, (&__pyx_v_col_index)); if (unlikely(__pyx_t_10 == ((__pyx_t_7questdb_7ingress_void_int)-1))) __PYX_ERR(1, 760, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+0761: elif isinstance(symbol, int):
__pyx_t_7 = PyLong_Check(__pyx_v_symbol);
if (likely(__pyx_t_7)) {
/* … */
goto __pyx_L17;
}
+0762: _bind_col_index('symbol', symbol, cols.size, &col_index)
__pyx_t_11 = __Pyx_PyLong_As_int(__pyx_v_symbol); if (unlikely((__pyx_t_11 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 762, __pyx_L1_error) __pyx_t_10 = __pyx_f_7questdb_7ingress__bind_col_index(__pyx_mstate_global->__pyx_n_u_symbol, __pyx_t_11, __pyx_v_cols->size, (&__pyx_v_col_index)); if (unlikely(__pyx_t_10 == ((__pyx_t_7questdb_7ingress_void_int)-1))) __PYX_ERR(1, 762, __pyx_L1_error)
0763: else:
+0764: raise TypeError(
/*else*/ {
__pyx_t_12 = NULL;
__pyx_t_2 = 1;
{
PyObject *__pyx_callargs[2] = {__pyx_t_12, __pyx_mstate_global->__pyx_kp_u_Bad_argument_symbols_Elements_mu};
__pyx_t_5 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_TypeError)), __pyx_callargs+__pyx_t_2, (2-__pyx_t_2) | (__pyx_t_2*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
__Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 764, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
}
__Pyx_Raise(__pyx_t_5, 0, 0, 0);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
__PYX_ERR(1, 764, __pyx_L1_error)
}
__pyx_L17:;
0765: f'Bad argument `symbols`: Elements must ' +
0766: 'be a column name (str) or index (int).')
+0767: if (table_name_col >= 0) and (col_index == <size_t>table_name_col):
__pyx_t_1 = (__pyx_v_table_name_col >= 0);
if (__pyx_t_1) {
} else {
__pyx_t_7 = __pyx_t_1;
goto __pyx_L19_bool_binop_done;
}
__pyx_t_1 = (__pyx_v_col_index == ((size_t)__pyx_v_table_name_col));
__pyx_t_7 = __pyx_t_1;
__pyx_L19_bool_binop_done:;
if (unlikely(__pyx_t_7)) {
/* … */
}
+0768: raise ValueError(
__pyx_t_12 = NULL;
+0769: f'Bad argument `symbols`: Cannot use the same column ' +
__pyx_t_13 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_Bad_argument_symbols_Cannot_use, __pyx_t_14); if (unlikely(!__pyx_t_13)) __PYX_ERR(1, 769, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __pyx_t_2 = 1; { PyObject *__pyx_callargs[2] = {__pyx_t_12, __pyx_t_13}; __pyx_t_5 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_2, (2-__pyx_t_2) | (__pyx_t_2*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 768, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); } __Pyx_Raise(__pyx_t_5, 0, 0, 0); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __PYX_ERR(1, 768, __pyx_L1_error)
+0770: f'{symbol!r} as both the table_name and as a symbol.')
__pyx_t_13 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_v_symbol), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_13)) __PYX_ERR(1, 770, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __pyx_t_14 = __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_OwnStrongReferenceInPlace(__pyx_t_13, __pyx_mstate_global->__pyx_kp_u_as_both_the_table_name_and_as_a); if (unlikely(!__pyx_t_14)) __PYX_ERR(1, 770, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
+0771: if (at_col >= 0) and (col_index == <size_t>at_col):
__pyx_t_1 = (__pyx_v_at_col >= 0);
if (__pyx_t_1) {
} else {
__pyx_t_7 = __pyx_t_1;
goto __pyx_L22_bool_binop_done;
}
__pyx_t_1 = (__pyx_v_col_index == ((size_t)__pyx_v_at_col));
__pyx_t_7 = __pyx_t_1;
__pyx_L22_bool_binop_done:;
if (unlikely(__pyx_t_7)) {
/* … */
}
+0772: raise ValueError(
__pyx_t_13 = NULL;
0773: f'Bad argument `symbols`: Cannot use the `at` column ' +
+0774: f'({df.columns[at_col]!r}) as a symbol column.')
__pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_df, __pyx_mstate_global->__pyx_n_u_columns); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 774, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); __pyx_t_14 = __Pyx_GetItemInt(__pyx_t_12, __pyx_v_at_col, Py_ssize_t, 1, PyLong_FromSsize_t, 0, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_14)) __PYX_ERR(1, 774, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_12 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_t_14), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 774, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __pyx_t_15[0] = __pyx_mstate_global->__pyx_kp_u_Bad_argument_symbols_Cannot_use_2; __pyx_t_15[1] = __pyx_t_12; __pyx_t_15[2] = __pyx_mstate_global->__pyx_kp_u_as_a_symbol_column; __pyx_t_14 = __Pyx_PyUnicode_Join(__pyx_t_15, 3, 52 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_12) + 21, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_12)); if (unlikely(!__pyx_t_14)) __PYX_ERR(1, 774, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_2 = 1; { PyObject *__pyx_callargs[2] = {__pyx_t_13, __pyx_t_14}; __pyx_t_5 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_2, (2-__pyx_t_2) | (__pyx_t_2*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 772, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); } __Pyx_Raise(__pyx_t_5, 0, 0, 0); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __PYX_ERR(1, 772, __pyx_L1_error)
+0775: pandas_col = pandas_cols[col_index]
if (unlikely(__pyx_v_pandas_cols == Py_None)) {
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
__PYX_ERR(1, 775, __pyx_L1_error)
}
__pyx_t_5 = __Pyx_GetItemInt_List(__pyx_v_pandas_cols, __pyx_v_col_index, size_t, 0, __Pyx_PyLong_FromSize_t, 1, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 775, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_mstate_global->__pyx_ptype_7questdb_7ingress_PandasCol))))) __PYX_ERR(1, 775, __pyx_L1_error)
__Pyx_XDECREF_SET(__pyx_v_pandas_col, ((struct __pyx_obj_7questdb_7ingress_PandasCol *)__pyx_t_5));
__pyx_t_5 = 0;
+0776: col = &cols.d[col_index]
__pyx_v_col = (&(__pyx_v_cols->d[__pyx_v_col_index]));
+0777: _dataframe_check_column_is_str(
__pyx_t_10 = __pyx_f_7questdb_7ingress__dataframe_check_column_is_str(__pyx_mstate_global->__pyx_kp_u_Bad_argument_symbols, __pyx_v_pandas_col, __pyx_v_col->setup->source); if (unlikely(__pyx_t_10 == ((__pyx_t_7questdb_7ingress_void_int)-1))) __PYX_ERR(1, 777, __pyx_L1_error)
0778: 'Bad argument `symbols`: ',
0779: pandas_col,
0780: col.setup.source)
+0781: col.setup.meta_target = meta_target_t.meta_target_symbol
__pyx_v_col->setup->meta_target = __pyx_e_7questdb_7ingress_meta_target_symbol;
0782:
0783:
+0784: cdef void_int _dataframe_get_loc(
static __pyx_t_7questdb_7ingress_void_int __pyx_f_7questdb_7ingress__dataframe_get_loc(PyObject *__pyx_v_df, PyObject *__pyx_v_col_name, PyObject *__pyx_v_arg_name, size_t *__pyx_v_col_index_out) {
__pyx_t_7questdb_7ingress_void_int __pyx_r;
/* … */
/* function exit code */
__pyx_r = 0;
goto __pyx_L0;
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_4);
__Pyx_XDECREF(__pyx_t_5);
__Pyx_XDECREF(__pyx_t_6);
__Pyx_XDECREF(__pyx_t_9);
__Pyx_XDECREF(__pyx_t_10);
__Pyx_XDECREF(__pyx_t_11);
__Pyx_XDECREF(__pyx_t_12);
__Pyx_XDECREF(__pyx_t_14);
__Pyx_AddTraceback("questdb.ingress._dataframe_get_loc", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = -1;
__pyx_L0:;
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
0785: object df, str col_name, str arg_name,
0786: size_t* col_index_out) except -1:
0787: """
0788: Return the column index for `col_name`.
0789: """
+0790: try:
{
/*try:*/ {
/* … */
}
__Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
goto __pyx_L8_try_end;
__pyx_L3_error:;
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
__Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
/* … */
__pyx_L5_except_error:;
__Pyx_XGIVEREF(__pyx_t_1);
__Pyx_XGIVEREF(__pyx_t_2);
__Pyx_XGIVEREF(__pyx_t_3);
__Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
goto __pyx_L1_error;
__pyx_L8_try_end:;
}
+0791: col_index_out[0] = df.columns.get_loc(col_name)
__pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_df, __pyx_mstate_global->__pyx_n_u_columns); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 791, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_5 = __pyx_t_6; __Pyx_INCREF(__pyx_t_5); __pyx_t_7 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_v_col_name}; __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get_loc, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 791, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_4); } __pyx_t_7 = __Pyx_PyLong_As_size_t(__pyx_t_4); if (unlikely((__pyx_t_7 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 791, __pyx_L3_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; (__pyx_v_col_index_out[0]) = __pyx_t_7;
+0792: except KeyError:
__pyx_t_8 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_KeyError)))); if (__pyx_t_8) { __Pyx_AddTraceback("questdb.ingress._dataframe_get_loc", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_5) < 0) __PYX_ERR(1, 792, __pyx_L5_except_error) __Pyx_XGOTREF(__pyx_t_4); __Pyx_XGOTREF(__pyx_t_6); __Pyx_XGOTREF(__pyx_t_5);
+0793: raise KeyError(
__pyx_t_10 = NULL;
+0794: f'Bad argument `{arg_name}`: ' +
__pyx_t_11 = __Pyx_PyUnicode_Unicode(__pyx_v_arg_name); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 794, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_11); /* … */ __pyx_t_14 = __Pyx_PyUnicode_Join(__pyx_t_13, 5, 14 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_11) + 10 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_12) + 28, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_11) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_12)); if (unlikely(!__pyx_t_14)) __PYX_ERR(1, 794, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_7 = 1; { PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_t_14}; __pyx_t_9 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_KeyError)), __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 793, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_9); } __Pyx_Raise(__pyx_t_9, 0, 0, 0); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __PYX_ERR(1, 793, __pyx_L5_except_error) } goto __pyx_L5_except_error;
+0795: f'Column {col_name!r} not found in the dataframe.')
__pyx_t_12 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_v_col_name), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 795, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_12); __pyx_t_13[0] = __pyx_mstate_global->__pyx_kp_u_Bad_argument; __pyx_t_13[1] = __pyx_t_11; __pyx_t_13[2] = __pyx_mstate_global->__pyx_kp_u_Column; __pyx_t_13[3] = __pyx_t_12; __pyx_t_13[4] = __pyx_mstate_global->__pyx_kp_u_not_found_in_the_dataframe;
0796:
0797:
0798: # The values -2 and -1 are safe to use as a sentinel because the TimestampNanos
0799: # type already validates that the value is >= 0.
+0800: cdef int64_t _AT_IS_SERVER_NOW = -2
__pyx_v_7questdb_7ingress__AT_IS_SERVER_NOW = -2L;
+0801: cdef int64_t _AT_IS_SET_BY_COLUMN = -1
__pyx_v_7questdb_7ingress__AT_IS_SET_BY_COLUMN = -1L;
0802:
0803:
+0804: cdef str _SUPPORTED_DATETIMES = 'datetime64[ns], datetime64[us], datetime64[ns, tz], timestamp[ns][pyarrow], or timestamp[us][pyarrow]'
__Pyx_INCREF(__pyx_mstate_global->__pyx_kp_u_datetime64_ns_datetime64_us_date); __Pyx_XGOTREF(__pyx_v_7questdb_7ingress__SUPPORTED_DATETIMES); __Pyx_DECREF_SET(__pyx_v_7questdb_7ingress__SUPPORTED_DATETIMES, __pyx_mstate_global->__pyx_kp_u_datetime64_ns_datetime64_us_date); __Pyx_GIVEREF(__pyx_mstate_global->__pyx_kp_u_datetime64_ns_datetime64_us_date);
0805:
0806:
+0807: cdef int _dataframe_classify_timestamp_dtype(object dtype) except -1:
static int __pyx_f_7questdb_7ingress__dataframe_classify_timestamp_dtype(PyObject *__pyx_v_dtype) {
PyObject *__pyx_v_arrow_type = 0;
int __pyx_r;
/* … */
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_2);
__Pyx_XDECREF(__pyx_t_4);
__Pyx_XDECREF(__pyx_t_5);
__Pyx_XDECREF(__pyx_t_6);
__Pyx_XDECREF(__pyx_t_7);
__Pyx_XDECREF(__pyx_t_8);
__Pyx_XDECREF(__pyx_t_9);
__Pyx_AddTraceback("questdb.ingress._dataframe_classify_timestamp_dtype", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = -1;
__pyx_L0:;
__Pyx_XDECREF(__pyx_v_arrow_type);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
0808: """
0809: Classify the dtype and determine if it's supported for use as a timestamp.
0810:
0811: Returns:
0812: > 0 - a value castable to a `col_source_t`.
0813: 0 - dtype is not a supported timestamp datatype.
0814: """
0815: cdef object arrow_type
+0816: if isinstance(dtype, _NUMPY_DATETIME64_NS) and str(dtype) == "datetime64[ns]":
__pyx_t_2 = __pyx_v_7questdb_7ingress__NUMPY_DATETIME64_NS; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = PyObject_IsInstance(__pyx_v_dtype, __pyx_t_2); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 816, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_3) { } else { __pyx_t_1 = __pyx_t_3; goto __pyx_L4_bool_binop_done; } __pyx_t_2 = __Pyx_PyObject_Unicode(__pyx_v_dtype); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 816, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_datetime64_ns, Py_EQ)); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(1, 816, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_1 = __pyx_t_3; __pyx_L4_bool_binop_done:; if (__pyx_t_1) { /* … */ }
+0817: return col_source_t.col_source_dt64ns_numpy
__pyx_r = __pyx_e_7questdb_7ingress_col_source_dt64ns_numpy;
goto __pyx_L0;
+0818: elif isinstance(dtype, _NUMPY_DATETIME64_US) and str(dtype) == "datetime64[us]":
__pyx_t_2 = __pyx_v_7questdb_7ingress__NUMPY_DATETIME64_US; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = PyObject_IsInstance(__pyx_v_dtype, __pyx_t_2); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 818, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_3) { } else { __pyx_t_1 = __pyx_t_3; goto __pyx_L6_bool_binop_done; } __pyx_t_2 = __Pyx_PyObject_Unicode(__pyx_v_dtype); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 818, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_datetime64_us, Py_EQ)); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(1, 818, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_1 = __pyx_t_3; __pyx_L6_bool_binop_done:; if (__pyx_t_1) { /* … */ }
+0819: return col_source_t.col_source_dt64us_numpy
__pyx_r = __pyx_e_7questdb_7ingress_col_source_dt64us_numpy;
goto __pyx_L0;
+0820: elif isinstance(dtype, _PANDAS.DatetimeTZDtype):
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_7questdb_7ingress__PANDAS, __pyx_mstate_global->__pyx_n_u_DatetimeTZDtype); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 820, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = PyObject_IsInstance(__pyx_v_dtype, __pyx_t_2); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(1, 820, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_1) { /* … */ }
0821: # Docs say this should always be nanos, but best assert in case the API changes in the future.
0822: # https://pandas.pydata.org/docs/reference/api/pandas.DatetimeTZDtype.html
+0823: if dtype.unit == 'ns':
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_dtype, __pyx_mstate_global->__pyx_n_u_unit); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 823, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_ns, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(1, 823, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (likely(__pyx_t_1)) { /* … */ }
+0824: return col_source_t.col_source_dt64ns_tz_arrow
__pyx_r = __pyx_e_7questdb_7ingress_col_source_dt64ns_tz_arrow;
goto __pyx_L0;
0825: else:
+0826: raise IngressError(
/*else*/ {
__pyx_t_4 = NULL;
__Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_IngressError); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 826, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
+0827: IngressErrorCode.BadDataFrame,
__Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_IngressErrorCode); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 827, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_BadDataFrame); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 827, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+0828: f'Unsupported pandas dtype {dtype} unit {dtype.unit}. ' +
__pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_v_dtype, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 828, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_dtype, __pyx_mstate_global->__pyx_n_u_unit); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 828, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = __Pyx_PyObject_FormatSimple(__pyx_t_8, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 828, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_10[0] = __pyx_mstate_global->__pyx_kp_u_Unsupported_pandas_dtype; __pyx_t_10[1] = __pyx_t_6; __pyx_t_10[2] = __pyx_mstate_global->__pyx_kp_u_unit_2; __pyx_t_10[3] = __pyx_t_9; __pyx_t_10[4] = __pyx_mstate_global->__pyx_kp_u_Raise_an_issue_if_you_think_it; __pyx_t_8 = __Pyx_PyUnicode_Join(__pyx_t_10, 5, 25 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6) + 6 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_9) + 106, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9)); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 828, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_11 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_5))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5); assert(__pyx_t_4); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_5, __pyx__function); __pyx_t_11 = 0; } #endif { PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_t_7, __pyx_t_8}; __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_11, (3-__pyx_t_11) | (__pyx_t_11*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 826, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(1, 826, __pyx_L1_error) }
0829: 'Raise an issue if you think it should be supported: ' +
0830: 'https://github.com/questdb/py-questdb-client/issues.')
+0831: elif isinstance(dtype, _PANDAS.ArrowDtype):
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_7questdb_7ingress__PANDAS, __pyx_mstate_global->__pyx_n_u_ArrowDtype); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 831, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = PyObject_IsInstance(__pyx_v_dtype, __pyx_t_2); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(1, 831, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_1) { /* … */ }
+0832: arrow_type = dtype.pyarrow_dtype
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_dtype, __pyx_mstate_global->__pyx_n_u_pyarrow_dtype); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 832, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_arrow_type = __pyx_t_2; __pyx_t_2 = 0;
+0833: if arrow_type.id == _PYARROW.lib.Type_TIMESTAMP:
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_arrow_type, __pyx_mstate_global->__pyx_n_u_id); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 833, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_7questdb_7ingress__PYARROW, __pyx_mstate_global->__pyx_n_u_lib); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 833, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_Type_TIMESTAMP); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 833, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_RichCompare(__pyx_t_2, __pyx_t_8, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 833, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(1, 833, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_1) { /* … */ }
+0834: if arrow_type.unit == "ns":
__pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_arrow_type, __pyx_mstate_global->__pyx_n_u_unit); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 834, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_ns, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(1, 834, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_1) { /* … */ }
+0835: return col_source_t.col_source_dt64ns_tz_arrow
__pyx_r = __pyx_e_7questdb_7ingress_col_source_dt64ns_tz_arrow;
goto __pyx_L0;
+0836: elif arrow_type.unit == "us":
__pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_arrow_type, __pyx_mstate_global->__pyx_n_u_unit); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 836, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_us, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(1, 836, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (likely(__pyx_t_1)) { /* … */ }
+0837: return col_source_t.col_source_dt64us_tz_arrow
__pyx_r = __pyx_e_7questdb_7ingress_col_source_dt64us_tz_arrow;
goto __pyx_L0;
0838: else:
+0839: raise IngressError(
/*else*/ {
__pyx_t_8 = NULL;
__Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_IngressError); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 839, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
+0840: IngressErrorCode.BadDataFrame,
__Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_IngressErrorCode); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 840, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_BadDataFrame); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 840, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+0841: f'Unsupported arrow dtype {dtype} unit {arrow_type.unit}. ' +
__pyx_t_7 = __Pyx_PyObject_FormatSimple(__pyx_v_dtype, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 841, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_arrow_type, __pyx_mstate_global->__pyx_n_u_unit); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 841, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_t_9, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 841, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_10[0] = __pyx_mstate_global->__pyx_kp_u_Unsupported_arrow_dtype; __pyx_t_10[1] = __pyx_t_7; __pyx_t_10[2] = __pyx_mstate_global->__pyx_kp_u_unit_2; __pyx_t_10[3] = __pyx_t_6; __pyx_t_10[4] = __pyx_mstate_global->__pyx_kp_u_Raise_an_issue_if_you_think_it; __pyx_t_9 = __Pyx_PyUnicode_Join(__pyx_t_10, 5, 24 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_7) + 6 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6) + 106, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_7) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6)); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 841, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_11 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_2); assert(__pyx_t_8); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_2, __pyx__function); __pyx_t_11 = 0; } #endif { PyObject *__pyx_callargs[3] = {__pyx_t_8, __pyx_t_4, __pyx_t_9}; __pyx_t_5 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_11, (3-__pyx_t_11) | (__pyx_t_11*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 839, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); } __Pyx_Raise(__pyx_t_5, 0, 0, 0); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __PYX_ERR(1, 839, __pyx_L1_error) }
0842: 'Raise an issue if you think it should be supported: ' +
0843: 'https://github.com/questdb/py-questdb-client/issues.')
+0844: return 0
__pyx_r = 0; goto __pyx_L0;
0845:
0846:
+0847: cdef ssize_t _dataframe_resolve_at(
static Py_ssize_t __pyx_f_7questdb_7ingress__dataframe_resolve_at(PyObject *__pyx_v_df, struct __pyx_t_7questdb_7ingress_col_t_arr *__pyx_v_cols, PyObject *__pyx_v_at, size_t __pyx_v_col_count, int64_t *__pyx_v_at_value_out) {
size_t __pyx_v_col_index;
PyObject *__pyx_v_dtype = 0;
struct __pyx_obj_7questdb_7ingress_TimestampNanos *__pyx_v_at_nanos = 0;
struct __pyx_t_7questdb_7ingress_col_t *__pyx_v_col;
Py_ssize_t __pyx_r;
/* … */
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_2);
__Pyx_XDECREF(__pyx_t_4);
__Pyx_XDECREF(__pyx_t_8);
__Pyx_XDECREF(__pyx_t_9);
__Pyx_XDECREF(__pyx_t_11);
__Pyx_XDECREF(__pyx_t_13);
__Pyx_AddTraceback("questdb.ingress._dataframe_resolve_at", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = -2L;
__pyx_L0:;
__Pyx_XDECREF(__pyx_v_dtype);
__Pyx_XDECREF((PyObject *)__pyx_v_at_nanos);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
0848: object df,
0849: col_t_arr* cols,
0850: object at,
0851: size_t col_count,
0852: int64_t* at_value_out) except -2:
0853: cdef size_t col_index
0854: cdef object dtype
0855: cdef PandasCol pandas_col
0856: cdef TimestampNanos at_nanos
+0857: if at is None:
__pyx_t_1 = (__pyx_v_at == Py_None);
if (__pyx_t_1) {
/* … */
}
+0858: at_value_out[0] = _AT_IS_SERVER_NOW
(__pyx_v_at_value_out[0]) = __pyx_v_7questdb_7ingress__AT_IS_SERVER_NOW;
+0859: return -1
__pyx_r = -1L;
goto __pyx_L0;
+0860: elif isinstance(at, TimestampNanos):
__pyx_t_1 = __Pyx_TypeCheck(__pyx_v_at, __pyx_mstate_global->__pyx_ptype_7questdb_7ingress_TimestampNanos);
if (__pyx_t_1) {
/* … */
}
+0861: at_nanos = at
__pyx_t_2 = __pyx_v_at;
__Pyx_INCREF(__pyx_t_2);
if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_7questdb_7ingress_TimestampNanos))))) __PYX_ERR(1, 861, __pyx_L1_error)
__pyx_v_at_nanos = ((struct __pyx_obj_7questdb_7ingress_TimestampNanos *)__pyx_t_2);
__pyx_t_2 = 0;
+0862: at_value_out[0] = at_nanos._value
__pyx_t_3 = __pyx_v_at_nanos->_value;
(__pyx_v_at_value_out[0]) = __pyx_t_3;
+0863: return -1
__pyx_r = -1L;
goto __pyx_L0;
+0864: elif isinstance(at, cp_datetime):
__pyx_t_1 = __Pyx_TypeCheck(__pyx_v_at, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_datetime);
if (__pyx_t_1) {
/* … */
}
+0865: if at.timestamp() < 0:
__pyx_t_4 = __pyx_v_at;
__Pyx_INCREF(__pyx_t_4);
__pyx_t_5 = 0;
{
PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
__pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_timestamp, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 865, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
}
__pyx_t_4 = PyObject_RichCompare(__pyx_t_2, __pyx_mstate_global->__pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 865, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(1, 865, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
if (unlikely(__pyx_t_1)) {
/* … */
}
+0866: raise ValueError(
__pyx_t_2 = NULL;
__pyx_t_5 = 1;
{
PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_Bad_argument_at_Cannot_use_a_dat};
__pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
__Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 866, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
}
__Pyx_Raise(__pyx_t_4, 0, 0, 0);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__PYX_ERR(1, 866, __pyx_L1_error)
0867: 'Bad argument `at`: Cannot use a datetime before the ' +
0868: 'Unix epoch (1970-01-01 00:00:00).')
+0869: at_value_out[0] = datetime_to_nanos(at)
if (!(likely(((__pyx_v_at) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_at, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_datetime))))) __PYX_ERR(1, 869, __pyx_L1_error) __pyx_t_3 = __pyx_f_7questdb_7ingress_datetime_to_nanos(((PyDateTime_DateTime *)__pyx_v_at)); if (unlikely(__pyx_t_3 == ((int64_t)-1L) && PyErr_Occurred())) __PYX_ERR(1, 869, __pyx_L1_error) (__pyx_v_at_value_out[0]) = __pyx_t_3;
+0870: return -1
__pyx_r = -1L;
goto __pyx_L0;
+0871: elif isinstance(at, str):
__pyx_t_1 = PyUnicode_Check(__pyx_v_at);
if (__pyx_t_1) {
/* … */
goto __pyx_L3;
}
+0872: _dataframe_get_loc(df, at, 'at', &col_index)
__pyx_t_4 = __pyx_v_at;
__Pyx_INCREF(__pyx_t_4);
if (!(likely(PyUnicode_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_t_4))) __PYX_ERR(1, 872, __pyx_L1_error)
__pyx_t_6 = __pyx_f_7questdb_7ingress__dataframe_get_loc(__pyx_v_df, ((PyObject*)__pyx_t_4), __pyx_mstate_global->__pyx_n_u_at, (&__pyx_v_col_index)); if (unlikely(__pyx_t_6 == ((__pyx_t_7questdb_7ingress_void_int)-1))) __PYX_ERR(1, 872, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+0873: elif isinstance(at, int):
__pyx_t_1 = PyLong_Check(__pyx_v_at);
if (likely(__pyx_t_1)) {
/* … */
goto __pyx_L3;
}
+0874: _bind_col_index('at', at, col_count, &col_index)
__pyx_t_7 = __Pyx_PyLong_As_int(__pyx_v_at); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 874, __pyx_L1_error) __pyx_t_6 = __pyx_f_7questdb_7ingress__bind_col_index(__pyx_mstate_global->__pyx_n_u_at, __pyx_t_7, __pyx_v_col_count, (&__pyx_v_col_index)); if (unlikely(__pyx_t_6 == ((__pyx_t_7questdb_7ingress_void_int)-1))) __PYX_ERR(1, 874, __pyx_L1_error)
0875: else:
+0876: raise TypeError(
/*else*/ {
__pyx_t_2 = NULL;
+0877: f'Bad argument `at`: Unsupported type {_fqn(type(at))}. ' +
__pyx_t_8 = __pyx_f_7questdb_7ingress__fqn(((PyTypeObject*)((PyObject *)Py_TYPE(__pyx_v_at)))); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 877, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = __Pyx_PyUnicode_Unicode(__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 877, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_10[0] = __pyx_mstate_global->__pyx_kp_u_Bad_argument_at_Unsupported_type; __pyx_t_10[1] = __pyx_t_9; __pyx_t_10[2] = __pyx_mstate_global->__pyx_kp_u_Must_be_one_of_None_TimestampNa; __pyx_t_8 = __Pyx_PyUnicode_Join(__pyx_t_10, 3, 36 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_9) + 86, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9)); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 877, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_5 = 1; { PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_8}; __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_TypeError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 876, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); } __Pyx_Raise(__pyx_t_4, 0, 0, 0); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __PYX_ERR(1, 876, __pyx_L1_error) } __pyx_L3:;
0878: 'Must be one of: None, TimestampNanos, datetime, ' +
0879: 'int (column index), str (colum name)')
+0880: dtype = df.dtypes.iloc[col_index]
__pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_df, __pyx_mstate_global->__pyx_n_u_dtypes); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 880, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_iloc); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 880, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_8, __pyx_v_col_index, size_t, 0, __Pyx_PyLong_FromSize_t, 0, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 880, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_v_dtype = __pyx_t_4; __pyx_t_4 = 0;
+0881: if _dataframe_classify_timestamp_dtype(dtype) != 0:
__pyx_t_7 = __pyx_f_7questdb_7ingress__dataframe_classify_timestamp_dtype(__pyx_v_dtype); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(1, 881, __pyx_L1_error)
__pyx_t_1 = (__pyx_t_7 != 0);
if (likely(__pyx_t_1)) {
/* … */
}
+0882: at_value_out[0] = _AT_IS_SET_BY_COLUMN
(__pyx_v_at_value_out[0]) = __pyx_v_7questdb_7ingress__AT_IS_SET_BY_COLUMN;
+0883: col = &cols.d[col_index]
__pyx_v_col = (&(__pyx_v_cols->d[__pyx_v_col_index]));
+0884: col.setup.meta_target = meta_target_t.meta_target_at
__pyx_v_col->setup->meta_target = __pyx_e_7questdb_7ingress_meta_target_at;
+0885: return col_index
__pyx_r = __pyx_v_col_index;
goto __pyx_L0;
0886: else:
+0887: raise TypeError(
/*else*/ {
__pyx_t_8 = NULL;
+0888: f'Bad argument `at`: Bad dtype `{dtype}` ' +
__pyx_t_2 = __Pyx_PyObject_FormatSimple(__pyx_v_dtype, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 888, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); /* … */ __pyx_t_13 = __Pyx_PyUnicode_Join(__pyx_t_12, 7, 30 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2) + 10 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_9) + 19 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_11) + 8, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_11)); if (unlikely(!__pyx_t_13)) __PYX_ERR(1, 888, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_t_5 = 1; { PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_13}; __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_TypeError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 887, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); } __Pyx_Raise(__pyx_t_4, 0, 0, 0); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __PYX_ERR(1, 887, __pyx_L1_error) }
+0889: f'for the {at!r} column: Must be a {_SUPPORTED_DATETIMES} column.')
__pyx_t_9 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_v_at), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 889, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_11 = __Pyx_PyUnicode_Unicode(__pyx_v_7questdb_7ingress__SUPPORTED_DATETIMES); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 889, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __pyx_t_12[0] = __pyx_mstate_global->__pyx_kp_u_Bad_argument_at_Bad_dtype; __pyx_t_12[1] = __pyx_t_2; __pyx_t_12[2] = __pyx_mstate_global->__pyx_kp_u_for_the_2; __pyx_t_12[3] = __pyx_t_9; __pyx_t_12[4] = __pyx_mstate_global->__pyx_kp_u_column_Must_be_a; __pyx_t_12[5] = __pyx_t_11; __pyx_t_12[6] = __pyx_mstate_global->__pyx_kp_u_column;
0890:
0891:
+0892: cdef void_int _dataframe_alloc_chunks(
static __pyx_t_7questdb_7ingress_void_int __pyx_f_7questdb_7ingress__dataframe_alloc_chunks(size_t __pyx_v_n_chunks, struct __pyx_t_7questdb_7ingress_col_t *__pyx_v_col) {
__pyx_t_7questdb_7ingress_void_int __pyx_r;
/* … */
/* function exit code */
__pyx_r = 0;
goto __pyx_L0;
__pyx_L1_error:;
__Pyx_AddTraceback("questdb.ingress._dataframe_alloc_chunks", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = -1;
__pyx_L0:;
return __pyx_r;
}
0893: size_t n_chunks, col_t* col) except -1:
+0894: col.setup.chunks.n_chunks = n_chunks
__pyx_v_col->setup->chunks.n_chunks = __pyx_v_n_chunks;
+0895: col.setup.chunks.chunks = <ArrowArray*>calloc(
__pyx_v_col->setup->chunks.chunks = ((struct ArrowArray *)calloc((__pyx_v_col->setup->chunks.n_chunks + 1), (sizeof(struct ArrowArray))));
0896: col.setup.chunks.n_chunks + 1, # See `_dataframe_col_advance` on why +1.
0897: sizeof(ArrowArray))
+0898: if col.setup.chunks.chunks == NULL:
__pyx_t_1 = (__pyx_v_col->setup->chunks.chunks == NULL);
if (unlikely(__pyx_t_1)) {
/* … */
}
+0899: raise MemoryError()
PyErr_NoMemory(); __PYX_ERR(1, 899, __pyx_L1_error)
0900:
0901:
+0902: cdef void _dataframe_free_mapped_arrow(ArrowArray* arr) noexcept nogil:
static void __pyx_f_7questdb_7ingress__dataframe_free_mapped_arrow(struct ArrowArray *__pyx_v_arr) {
/* … */
/* function exit code */
}
+0903: free(arr.buffers)
free(__pyx_v_arr->buffers);
+0904: arr.buffers = NULL
__pyx_v_arr->buffers = NULL;
+0905: arr.release = NULL
__pyx_v_arr->release = NULL;
0906:
0907:
+0908: cdef void_int _dataframe_series_as_pybuf(
static __pyx_t_7questdb_7ingress_void_int __pyx_f_7questdb_7ingress__dataframe_series_as_pybuf(struct __pyx_obj_7questdb_7ingress_PandasCol *__pyx_v_pandas_col, struct __pyx_t_7questdb_7ingress_col_t *__pyx_v_col, struct __pyx_opt_args_7questdb_7ingress__dataframe_series_as_pybuf *__pyx_optional_args) {
/* … */
/* function exit code */
__pyx_r = 0;
goto __pyx_L0;
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
__Pyx_XDECREF(__pyx_t_2);
__Pyx_XDECREF(__pyx_t_4);
__Pyx_XDECREF(__pyx_t_6);
__Pyx_XDECREF(__pyx_t_7);
__Pyx_XDECREF(__pyx_t_8);
__Pyx_XDECREF(__pyx_t_14);
__Pyx_XDECREF(__pyx_t_15);
__Pyx_XDECREF(__pyx_t_16);
__Pyx_XDECREF(__pyx_t_18);
__Pyx_XDECREF(__pyx_t_27);
__Pyx_AddTraceback("questdb.ingress._dataframe_series_as_pybuf", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = -1;
__pyx_L0:;
__Pyx_XDECREF(__pyx_v_nparr);
__Pyx_XDECREF(__pyx_v_ve);
__Pyx_XDECREF(__pyx_v_be);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* … */
struct __pyx_opt_args_7questdb_7ingress__dataframe_series_as_pybuf {
int __pyx_n;
PyObject *fallback_dtype;
};
+0909: PandasCol pandas_col, col_t* col, str fallback_dtype=None) except -1:
PyObject *__pyx_v_fallback_dtype = ((PyObject*)Py_None);
PyObject *__pyx_v_nparr = 0;
struct ArrowArray *__pyx_v_mapped;
CYTHON_UNUSED int __pyx_v_get_buf_ret;
PyObject *__pyx_v_ve = NULL;
PyObject *__pyx_v_be = NULL;
__pyx_t_7questdb_7ingress_void_int __pyx_r;
if (__pyx_optional_args) {
if (__pyx_optional_args->__pyx_n > 0) {
__pyx_v_fallback_dtype = __pyx_optional_args->fallback_dtype;
}
}
+0910: cdef object nparr = pandas_col.series.to_numpy(dtype=fallback_dtype)
__pyx_t_2 = __pyx_v_pandas_col->series; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0; { PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_2, NULL}; __pyx_t_4 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 910, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_dtype, __pyx_v_fallback_dtype, __pyx_t_4, __pyx_callargs+1, 0) < (0)) __PYX_ERR(1, 910, __pyx_L1_error) __pyx_t_1 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_to_numpy, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_4); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 910, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __pyx_v_nparr = __pyx_t_1; __pyx_t_1 = 0;
0911: cdef ArrowArray* mapped
0912: cdef int get_buf_ret
+0913: if not PyObject_CheckBuffer(nparr):
__pyx_t_5 = (!PyObject_CheckBuffer(__pyx_v_nparr));
if (unlikely(__pyx_t_5)) {
/* … */
}
+0914: raise TypeError(
__pyx_t_4 = NULL;
+0915: f'Bad column {pandas_col.name!r}: Expected a buffer, got ' +
__pyx_t_2 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_v_pandas_col->name), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 915, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); /* … */ __pyx_t_7 = __Pyx_PyUnicode_Join(__pyx_t_9, 7, 11 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2) + 25 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6) + 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_8) + 1, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_8)); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 915, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_3 = 1; { PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_7}; __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_TypeError)), __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 914, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __PYX_ERR(1, 914, __pyx_L1_error)
+0916: f'{pandas_col.series!r} ({_fqn(type(pandas_col.series))})')
__pyx_t_6 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_v_pandas_col->series), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 916, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = __pyx_f_7questdb_7ingress__fqn(((PyTypeObject*)((PyObject *)Py_TYPE(__pyx_v_pandas_col->series)))); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 916, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = __Pyx_PyUnicode_Unicode(__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 916, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_9[0] = __pyx_mstate_global->__pyx_kp_u_Bad_column; __pyx_t_9[1] = __pyx_t_2; __pyx_t_9[2] = __pyx_mstate_global->__pyx_kp_u_Expected_a_buffer_got; __pyx_t_9[3] = __pyx_t_6; __pyx_t_9[4] = __pyx_mstate_global->__pyx_kp_u__6; __pyx_t_9[5] = __pyx_t_8; __pyx_t_9[6] = __pyx_mstate_global->__pyx_kp_u__4;
+0917: try:
{
/*try:*/ {
/* … */
}
__Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
__Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
__Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
goto __pyx_L9_try_end;
__pyx_L4_error:;
__Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
__Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
__Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
/* … */
__pyx_L6_except_error:;
__Pyx_XGIVEREF(__pyx_t_10);
__Pyx_XGIVEREF(__pyx_t_11);
__Pyx_XGIVEREF(__pyx_t_12);
__Pyx_ExceptionReset(__pyx_t_10, __pyx_t_11, __pyx_t_12);
goto __pyx_L1_error;
__pyx_L9_try_end:;
}
0918: # Note! We don't need to support numpy strides since Pandas doesn't.
0919: # Also note that this guarantees a 1D buffer.
+0920: get_buf_ret = PyObject_GetBuffer(nparr, &col.setup.pybuf, PyBUF_SIMPLE)
__pyx_t_13 = PyObject_GetBuffer(__pyx_v_nparr, (&__pyx_v_col->setup->pybuf), PyBUF_SIMPLE); if (unlikely(__pyx_t_13 == ((int)-1))) __PYX_ERR(1, 920, __pyx_L4_error) __pyx_v_get_buf_ret = __pyx_t_13;
+0921: except ValueError as ve:
__pyx_t_13 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_ValueError)))); if (__pyx_t_13) { __Pyx_AddTraceback("questdb.ingress._dataframe_series_as_pybuf", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_7, &__pyx_t_4) < 0) __PYX_ERR(1, 921, __pyx_L6_except_error) __Pyx_XGOTREF(__pyx_t_1); __Pyx_XGOTREF(__pyx_t_7); __Pyx_XGOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_t_7); __pyx_v_ve = __pyx_t_7; /*try:*/ { /* … */ /*finally:*/ { __pyx_L15_error:; /*exception exit:*/{ __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0; __pyx_t_24 = 0; __pyx_t_25 = 0; __pyx_t_26 = 0; __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0; __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_ExceptionSwap(&__pyx_t_24, &__pyx_t_25, &__pyx_t_26); if ( unlikely(__Pyx_GetException(&__pyx_t_21, &__pyx_t_22, &__pyx_t_23) < 0)) __Pyx_ErrFetch(&__pyx_t_21, &__pyx_t_22, &__pyx_t_23); __Pyx_XGOTREF(__pyx_t_21); __Pyx_XGOTREF(__pyx_t_22); __Pyx_XGOTREF(__pyx_t_23); __Pyx_XGOTREF(__pyx_t_24); __Pyx_XGOTREF(__pyx_t_25); __Pyx_XGOTREF(__pyx_t_26); __pyx_t_13 = __pyx_lineno; __pyx_t_19 = __pyx_clineno; __pyx_t_20 = __pyx_filename; { __Pyx_DECREF(__pyx_v_ve); __pyx_v_ve = 0; } __Pyx_XGIVEREF(__pyx_t_24); __Pyx_XGIVEREF(__pyx_t_25); __Pyx_XGIVEREF(__pyx_t_26); __Pyx_ExceptionReset(__pyx_t_24, __pyx_t_25, __pyx_t_26); __Pyx_XGIVEREF(__pyx_t_21); __Pyx_XGIVEREF(__pyx_t_22); __Pyx_XGIVEREF(__pyx_t_23); __Pyx_ErrRestore(__pyx_t_21, __pyx_t_22, __pyx_t_23); __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0; __pyx_t_24 = 0; __pyx_t_25 = 0; __pyx_t_26 = 0; __pyx_lineno = __pyx_t_13; __pyx_clineno = __pyx_t_19; __pyx_filename = __pyx_t_20; goto __pyx_L6_except_error; } } }
+0922: raise IngressError(
__pyx_t_6 = NULL;
__Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_IngressError); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 922, __pyx_L15_error)
__Pyx_GOTREF(__pyx_t_2);
+0923: IngressErrorCode.BadDataFrame,
__Pyx_GetModuleGlobalName(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_IngressErrorCode); if (unlikely(!__pyx_t_14)) __PYX_ERR(1, 923, __pyx_L15_error) __Pyx_GOTREF(__pyx_t_14); __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_BadDataFrame); if (unlikely(!__pyx_t_15)) __PYX_ERR(1, 923, __pyx_L15_error) __Pyx_GOTREF(__pyx_t_15); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
+0924: f'Bad column {pandas_col.name!r}: {ve}') from ve
__pyx_t_14 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_v_pandas_col->name), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_14)) __PYX_ERR(1, 924, __pyx_L15_error) __Pyx_GOTREF(__pyx_t_14); __pyx_t_16 = __Pyx_PyObject_FormatSimple(__pyx_v_ve, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_16)) __PYX_ERR(1, 924, __pyx_L15_error) __Pyx_GOTREF(__pyx_t_16); __pyx_t_17[0] = __pyx_mstate_global->__pyx_kp_u_Bad_column; __pyx_t_17[1] = __pyx_t_14; __pyx_t_17[2] = __pyx_mstate_global->__pyx_kp_u__7; __pyx_t_17[3] = __pyx_t_16; __pyx_t_18 = __Pyx_PyUnicode_Join(__pyx_t_17, 4, 11 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_14) + 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_16), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_14) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_16)); if (unlikely(!__pyx_t_18)) __PYX_ERR(1, 924, __pyx_L15_error) __Pyx_GOTREF(__pyx_t_18); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; __pyx_t_3 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2); assert(__pyx_t_6); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_2, __pyx__function); __pyx_t_3 = 0; } #endif { PyObject *__pyx_callargs[3] = {__pyx_t_6, __pyx_t_15, __pyx_t_18}; __pyx_t_8 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_3, (3-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 922, __pyx_L15_error) __Pyx_GOTREF(__pyx_t_8); } __Pyx_Raise(__pyx_t_8, 0, 0, __pyx_v_ve); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __PYX_ERR(1, 922, __pyx_L15_error) }
+0925: except BufferError as be:
__pyx_t_19 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_BufferError)))); if (__pyx_t_19) { __Pyx_AddTraceback("questdb.ingress._dataframe_series_as_pybuf", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_7, &__pyx_t_1) < 0) __PYX_ERR(1, 925, __pyx_L6_except_error) __Pyx_XGOTREF(__pyx_t_4); __Pyx_XGOTREF(__pyx_t_7); __Pyx_XGOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_t_7); __pyx_v_be = __pyx_t_7; /*try:*/ { /* … */ /*finally:*/ { __pyx_L26_error:; /*exception exit:*/{ __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __pyx_t_26 = 0; __pyx_t_25 = 0; __pyx_t_24 = 0; __pyx_t_23 = 0; __pyx_t_22 = 0; __pyx_t_21 = 0; __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0; __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_27); __pyx_t_27 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_ExceptionSwap(&__pyx_t_23, &__pyx_t_22, &__pyx_t_21); if ( unlikely(__Pyx_GetException(&__pyx_t_26, &__pyx_t_25, &__pyx_t_24) < 0)) __Pyx_ErrFetch(&__pyx_t_26, &__pyx_t_25, &__pyx_t_24); __Pyx_XGOTREF(__pyx_t_26); __Pyx_XGOTREF(__pyx_t_25); __Pyx_XGOTREF(__pyx_t_24); __Pyx_XGOTREF(__pyx_t_23); __Pyx_XGOTREF(__pyx_t_22); __Pyx_XGOTREF(__pyx_t_21); __pyx_t_19 = __pyx_lineno; __pyx_t_13 = __pyx_clineno; __pyx_t_28 = __pyx_filename; { __Pyx_DECREF(__pyx_v_be); __pyx_v_be = 0; } __Pyx_XGIVEREF(__pyx_t_23); __Pyx_XGIVEREF(__pyx_t_22); __Pyx_XGIVEREF(__pyx_t_21); __Pyx_ExceptionReset(__pyx_t_23, __pyx_t_22, __pyx_t_21); __Pyx_XGIVEREF(__pyx_t_26); __Pyx_XGIVEREF(__pyx_t_25); __Pyx_XGIVEREF(__pyx_t_24); __Pyx_ErrRestore(__pyx_t_26, __pyx_t_25, __pyx_t_24); __pyx_t_26 = 0; __pyx_t_25 = 0; __pyx_t_24 = 0; __pyx_t_23 = 0; __pyx_t_22 = 0; __pyx_t_21 = 0; __pyx_lineno = __pyx_t_19; __pyx_clineno = __pyx_t_13; __pyx_filename = __pyx_t_28; goto __pyx_L6_except_error; } } } goto __pyx_L6_except_error;
+0926: raise IngressError(
__pyx_t_2 = NULL;
__Pyx_GetModuleGlobalName(__pyx_t_18, __pyx_mstate_global->__pyx_n_u_IngressError); if (unlikely(!__pyx_t_18)) __PYX_ERR(1, 926, __pyx_L26_error)
__Pyx_GOTREF(__pyx_t_18);
+0927: IngressErrorCode.BadDataFrame,
__Pyx_GetModuleGlobalName(__pyx_t_15, __pyx_mstate_global->__pyx_n_u_IngressErrorCode); if (unlikely(!__pyx_t_15)) __PYX_ERR(1, 927, __pyx_L26_error) __Pyx_GOTREF(__pyx_t_15); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_15, __pyx_mstate_global->__pyx_n_u_BadDataFrame); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 927, __pyx_L26_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
+0928: f'Bad column {pandas_col.name!r}: Expected a buffer, got ' +
__pyx_t_15 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_v_pandas_col->name), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_15)) __PYX_ERR(1, 928, __pyx_L26_error) __Pyx_GOTREF(__pyx_t_15); /* … */ __pyx_t_14 = __Pyx_PyUnicode_Join(__pyx_t_9, 7, 11 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_15) + 25 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_16) + 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_27) + 1, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_15) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_16) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_27)); if (unlikely(!__pyx_t_14)) __PYX_ERR(1, 928, __pyx_L26_error) __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; __Pyx_DECREF(__pyx_t_27); __pyx_t_27 = 0; __pyx_t_3 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_18))) { __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_18); assert(__pyx_t_2); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_18); __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_18, __pyx__function); __pyx_t_3 = 0; } #endif { PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_t_6, __pyx_t_14}; __pyx_t_8 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_18, __pyx_callargs+__pyx_t_3, (3-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 926, __pyx_L26_error) __Pyx_GOTREF(__pyx_t_8); }
+0929: f'{pandas_col.series!r} ({_fqn(type(pandas_col.series))})') from be
__pyx_t_16 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_v_pandas_col->series), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_16)) __PYX_ERR(1, 929, __pyx_L26_error) __Pyx_GOTREF(__pyx_t_16); __pyx_t_14 = __pyx_f_7questdb_7ingress__fqn(((PyTypeObject*)((PyObject *)Py_TYPE(__pyx_v_pandas_col->series)))); if (unlikely(!__pyx_t_14)) __PYX_ERR(1, 929, __pyx_L26_error) __Pyx_GOTREF(__pyx_t_14); __pyx_t_27 = __Pyx_PyUnicode_Unicode(__pyx_t_14); if (unlikely(!__pyx_t_27)) __PYX_ERR(1, 929, __pyx_L26_error) __Pyx_GOTREF(__pyx_t_27); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __pyx_t_9[0] = __pyx_mstate_global->__pyx_kp_u_Bad_column; __pyx_t_9[1] = __pyx_t_15; __pyx_t_9[2] = __pyx_mstate_global->__pyx_kp_u_Expected_a_buffer_got; __pyx_t_9[3] = __pyx_t_16; __pyx_t_9[4] = __pyx_mstate_global->__pyx_kp_u__6; __pyx_t_9[5] = __pyx_t_27; __pyx_t_9[6] = __pyx_mstate_global->__pyx_kp_u__4; /* … */ __Pyx_Raise(__pyx_t_8, 0, 0, __pyx_v_be); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __PYX_ERR(1, 926, __pyx_L26_error) }
+0930: _dataframe_alloc_chunks(1, col)
__pyx_t_29 = __pyx_f_7questdb_7ingress__dataframe_alloc_chunks(1, __pyx_v_col); if (unlikely(__pyx_t_29 == ((__pyx_t_7questdb_7ingress_void_int)-1))) __PYX_ERR(1, 930, __pyx_L1_error)
+0931: mapped = &col.setup.chunks.chunks[0]
__pyx_v_mapped = (&(__pyx_v_col->setup->chunks.chunks[0]));
0932:
0933: # Total number of elements.
+0934: mapped.length = (
__pyx_v_mapped->length = __Pyx_div_int64_t(((int64_t)__pyx_v_col->setup->pybuf.len), ((int64_t)__pyx_v_col->setup->pybuf.itemsize), 0);
+0935: <int64_t>col.setup.pybuf.len // <int64_t>col.setup.pybuf.itemsize)
if (unlikely(((int64_t)__pyx_v_col->setup->pybuf.itemsize) == 0)) {
PyErr_SetString(PyExc_ZeroDivisionError, "integer division or modulo by zero");
__PYX_ERR(1, 935, __pyx_L1_error)
}
else if (sizeof(int64_t) == sizeof(long) && (!(((int64_t)-1) > 0)) && unlikely(((int64_t)__pyx_v_col->setup->pybuf.itemsize) == (int64_t)-1) && unlikely(__Pyx_UNARY_NEG_WOULD_OVERFLOW(((int64_t)__pyx_v_col->setup->pybuf.len)))) {
PyErr_SetString(PyExc_OverflowError, "value too large to perform division");
__PYX_ERR(1, 935, __pyx_L1_error)
}
+0936: mapped.null_count = 0
__pyx_v_mapped->null_count = 0;
+0937: mapped.offset = 0
__pyx_v_mapped->offset = 0;
+0938: mapped.n_buffers = 2
__pyx_v_mapped->n_buffers = 2;
+0939: mapped.n_children = 0
__pyx_v_mapped->n_children = 0;
+0940: mapped.buffers = <const void**>calloc(2, sizeof(const void*))
__pyx_v_mapped->buffers = ((void const **)calloc(2, (sizeof(void const *))));
+0941: mapped.buffers[0] = NULL
(__pyx_v_mapped->buffers[0]) = NULL;
+0942: mapped.buffers[1] = <const void*>col.setup.pybuf.buf
(__pyx_v_mapped->buffers[1]) = ((void const *)__pyx_v_col->setup->pybuf.buf);
+0943: mapped.children = NULL
__pyx_v_mapped->children = NULL;
+0944: mapped.dictionary = NULL
__pyx_v_mapped->dictionary = NULL;
+0945: mapped.release = _dataframe_free_mapped_arrow # to cleanup allocated array.
__pyx_v_mapped->release = __pyx_f_7questdb_7ingress__dataframe_free_mapped_arrow;
0946:
+0947: cdef void_int _dataframe_series_as_arrow(
static __pyx_t_7questdb_7ingress_void_int __pyx_f_7questdb_7ingress__dataframe_series_as_arrow(struct __pyx_obj_7questdb_7ingress_PandasCol *__pyx_v_pandas_col, struct __pyx_t_7questdb_7ingress_col_t *__pyx_v_col) {
PyObject *__pyx_v_array = 0;
PyObject *__pyx_v_chunks = 0;
size_t __pyx_v_n_chunks;
size_t __pyx_v_chunk_index;
__pyx_t_7questdb_7ingress_void_int __pyx_r;
/* … */
/* function exit code */
__pyx_r = 0;
goto __pyx_L0;
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
__Pyx_XDECREF(__pyx_t_2);
__Pyx_XDECREF(__pyx_t_3);
__Pyx_XDECREF(__pyx_t_10);
__Pyx_XDECREF(__pyx_t_11);
__Pyx_AddTraceback("questdb.ingress._dataframe_series_as_arrow", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = -1;
__pyx_L0:;
__Pyx_XDECREF(__pyx_v_array);
__Pyx_XDECREF(__pyx_v_chunks);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
0948: PandasCol pandas_col,
0949: col_t* col) except -1:
0950: cdef object array
0951: cdef list chunks
0952: cdef size_t n_chunks
0953: cdef size_t chunk_index
+0954: array = _PYARROW.Array.from_pandas(pandas_col.series)
__pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_7questdb_7ingress__PYARROW, __pyx_mstate_global->__pyx_n_u_Array); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 954, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __pyx_t_3; __Pyx_INCREF(__pyx_t_2); __pyx_t_4 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_pandas_col->series}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_from_pandas, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 954, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __pyx_v_array = __pyx_t_1; __pyx_t_1 = 0;
+0955: if isinstance(array, _PYARROW.ChunkedArray):
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_7questdb_7ingress__PYARROW, __pyx_mstate_global->__pyx_n_u_ChunkedArray); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 955, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = PyObject_IsInstance(__pyx_v_array, __pyx_t_1); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(1, 955, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_5) { /* … */ goto __pyx_L3; }
+0956: chunks = array.chunks
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_array, __pyx_mstate_global->__pyx_n_u_chunks); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 956, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!(likely(PyList_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("list", __pyx_t_1))) __PYX_ERR(1, 956, __pyx_L1_error) __pyx_v_chunks = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0;
0957: else:
+0958: chunks = [array]
/*else*/ {
__pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 958, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__Pyx_INCREF(__pyx_v_array);
__Pyx_GIVEREF(__pyx_v_array);
if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 0, __pyx_v_array) != (0)) __PYX_ERR(1, 958, __pyx_L1_error);
__pyx_v_chunks = ((PyObject*)__pyx_t_1);
__pyx_t_1 = 0;
}
__pyx_L3:;
0959:
+0960: n_chunks = len(chunks)
if (unlikely(__pyx_v_chunks == Py_None)) {
PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
__PYX_ERR(1, 960, __pyx_L1_error)
}
__pyx_t_6 = __Pyx_PyList_GET_SIZE(__pyx_v_chunks); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(1, 960, __pyx_L1_error)
__pyx_v_n_chunks = __pyx_t_6;
+0961: _dataframe_alloc_chunks(n_chunks, col)
__pyx_t_7 = __pyx_f_7questdb_7ingress__dataframe_alloc_chunks(__pyx_v_n_chunks, __pyx_v_col); if (unlikely(__pyx_t_7 == ((__pyx_t_7questdb_7ingress_void_int)-1))) __PYX_ERR(1, 961, __pyx_L1_error)
0962:
+0963: for chunk_index in range(n_chunks):
__pyx_t_4 = __pyx_v_n_chunks;
__pyx_t_8 = __pyx_t_4;
for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_8; __pyx_t_9+=1) {
__pyx_v_chunk_index = __pyx_t_9;
+0964: array = chunks[chunk_index]
if (unlikely(__pyx_v_chunks == Py_None)) {
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
__PYX_ERR(1, 964, __pyx_L1_error)
}
__pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_chunks, __pyx_v_chunk_index, size_t, 0, __Pyx_PyLong_FromSize_t, 1, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 964, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF_SET(__pyx_v_array, __pyx_t_1);
__pyx_t_1 = 0;
+0965: if chunk_index == 0:
__pyx_t_5 = (__pyx_v_chunk_index == 0);
if (__pyx_t_5) {
/* … */
goto __pyx_L6;
}
+0966: chunks[chunk_index]._export_to_c(
if (unlikely(__pyx_v_chunks == Py_None)) {
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
__PYX_ERR(1, 966, __pyx_L1_error)
}
__pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_chunks, __pyx_v_chunk_index, size_t, 0, __Pyx_PyLong_FromSize_t, 1, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 966, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__pyx_t_3 = __pyx_t_2;
__Pyx_INCREF(__pyx_t_3);
+0967: <uintptr_t>&col.setup.chunks.chunks[chunk_index],
__pyx_t_10 = __Pyx_PyLong_FromSize_t(((uintptr_t)(&(__pyx_v_col->setup->chunks.chunks[__pyx_v_chunk_index])))); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 967, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10);
+0968: <uintptr_t>&col.setup.arrow_schema)
__pyx_t_11 = __Pyx_PyLong_FromSize_t(((uintptr_t)(&__pyx_v_col->setup->arrow_schema))); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 968, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __pyx_t_12 = 0; { PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_t_10, __pyx_t_11}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_export_to_c, __pyx_callargs+__pyx_t_12, (3-__pyx_t_12) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 966, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
0969: else:
+0970: chunks[chunk_index]._export_to_c(
/*else*/ {
if (unlikely(__pyx_v_chunks == Py_None)) {
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
__PYX_ERR(1, 970, __pyx_L1_error)
}
__pyx_t_11 = __Pyx_GetItemInt_List(__pyx_v_chunks, __pyx_v_chunk_index, size_t, 0, __Pyx_PyLong_FromSize_t, 1, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 970, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_11);
__pyx_t_2 = __pyx_t_11;
__Pyx_INCREF(__pyx_t_2);
+0971: <uintptr_t>&col.setup.chunks.chunks[chunk_index])
__pyx_t_10 = __Pyx_PyLong_FromSize_t(((uintptr_t)(&(__pyx_v_col->setup->chunks.chunks[__pyx_v_chunk_index])))); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 971, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __pyx_t_12 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_10}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_export_to_c, __pyx_callargs+__pyx_t_12, (2-__pyx_t_12) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 970, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } __pyx_L6:; }
0972:
0973:
+0974: cdef const char* _ARROW_FMT_INT8 = "c"
__pyx_v_7questdb_7ingress__ARROW_FMT_INT8 = ((char const *)"c");
+0975: cdef const char* _ARROW_FMT_INT16 = "s"
__pyx_v_7questdb_7ingress__ARROW_FMT_INT16 = ((char const *)"s");
+0976: cdef const char* _ARROW_FMT_INT32 = "i"
__pyx_v_7questdb_7ingress__ARROW_FMT_INT32 = ((char const *)"i");
+0977: cdef const char* _ARROW_FMT_UTF8_STRING = 'u'
__pyx_v_7questdb_7ingress__ARROW_FMT_UTF8_STRING = ((char const *)"u");
+0978: cdef const char* _ARROW_FMT_LRG_UTF8_STRING = 'U'
__pyx_v_7questdb_7ingress__ARROW_FMT_LRG_UTF8_STRING = ((char const *)"U");
0979:
0980:
+0981: cdef void_int _dataframe_category_series_as_arrow(
static __pyx_t_7questdb_7ingress_void_int __pyx_f_7questdb_7ingress__dataframe_category_series_as_arrow(struct __pyx_obj_7questdb_7ingress_PandasCol *__pyx_v_pandas_col, struct __pyx_t_7questdb_7ingress_col_t *__pyx_v_col) {
char const *__pyx_v_format;
__pyx_t_7questdb_7ingress_void_int __pyx_r;
/* … */
/* function exit code */
__pyx_r = 0;
goto __pyx_L0;
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_4);
__Pyx_XDECREF(__pyx_t_5);
__Pyx_XDECREF(__pyx_t_6);
__Pyx_XDECREF(__pyx_t_7);
__Pyx_XDECREF(__pyx_t_8);
__Pyx_XDECREF(__pyx_t_9);
__Pyx_XDECREF(__pyx_t_10);
__Pyx_AddTraceback("questdb.ingress._dataframe_category_series_as_arrow", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = -1;
__pyx_L0:;
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
0982: PandasCol pandas_col, col_t* col) except -1:
0983: cdef const char* format
+0984: _dataframe_series_as_arrow(pandas_col, col)
__pyx_t_1 = __pyx_f_7questdb_7ingress__dataframe_series_as_arrow(__pyx_v_pandas_col, __pyx_v_col); if (unlikely(__pyx_t_1 == ((__pyx_t_7questdb_7ingress_void_int)-1))) __PYX_ERR(1, 984, __pyx_L1_error)
+0985: format = col.setup.arrow_schema.format
__pyx_t_2 = __pyx_v_col->setup->arrow_schema.format; __pyx_v_format = __pyx_t_2;
+0986: if strncmp(format, _ARROW_FMT_INT8, 1) == 0:
__pyx_t_3 = (strncmp(__pyx_v_format, __pyx_v_7questdb_7ingress__ARROW_FMT_INT8, 1) == 0);
if (__pyx_t_3) {
/* … */
goto __pyx_L3;
}
+0987: col.setup.source = col_source_t.col_source_str_i8_cat
__pyx_v_col->setup->source = __pyx_e_7questdb_7ingress_col_source_str_i8_cat;
+0988: elif strncmp(format, _ARROW_FMT_INT16, 1) == 0:
__pyx_t_3 = (strncmp(__pyx_v_format, __pyx_v_7questdb_7ingress__ARROW_FMT_INT16, 1) == 0);
if (__pyx_t_3) {
/* … */
goto __pyx_L3;
}
+0989: col.setup.source = col_source_t.col_source_str_i16_cat
__pyx_v_col->setup->source = __pyx_e_7questdb_7ingress_col_source_str_i16_cat;
+0990: elif strncmp(format, _ARROW_FMT_INT32, 1) == 0:
__pyx_t_3 = (strncmp(__pyx_v_format, __pyx_v_7questdb_7ingress__ARROW_FMT_INT32, 1) == 0);
if (likely(__pyx_t_3)) {
/* … */
goto __pyx_L3;
}
+0991: col.setup.source = col_source_t.col_source_str_i32_cat
__pyx_v_col->setup->source = __pyx_e_7questdb_7ingress_col_source_str_i32_cat;
0992: else:
+0993: raise IngressError(
/*else*/ {
__pyx_t_5 = NULL;
__Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_IngressError); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 993, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_6);
+0994: IngressErrorCode.BadDataFrame,
__Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_IngressErrorCode); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 994, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_BadDataFrame); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 994, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+0995: f'Bad column {pandas_col.name!r}: ' +
__pyx_t_7 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_v_pandas_col->name), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 995, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); /* … */ __pyx_t_10 = __Pyx_PyUnicode_Join(__pyx_t_11, 5, 11 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_7) + 45 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_9) + 1, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_7) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9)); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 995, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_12 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_6))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6); assert(__pyx_t_5); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_6, __pyx__function); __pyx_t_12 = 0; } #endif { PyObject *__pyx_callargs[3] = {__pyx_t_5, __pyx_t_8, __pyx_t_10}; __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_12, (3-__pyx_t_12) | (__pyx_t_12*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 993, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); } __Pyx_Raise(__pyx_t_4, 0, 0, 0); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __PYX_ERR(1, 993, __pyx_L1_error) } __pyx_L3:;
0996: 'Unsupported arrow category index type. ' +
+0997: f'Got {(<bytes>format).decode("utf-8")!r}.')
__pyx_t_9 = __Pyx_PyBytes_FromString(__pyx_v_format); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 997, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); if (unlikely(__pyx_t_9 == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "decode"); __PYX_ERR(1, 997, __pyx_L1_error) } __pyx_t_10 = __Pyx_decode_bytes(((PyObject*)__pyx_t_9), 0, PY_SSIZE_T_MAX, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 997, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_t_10), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 997, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_11[0] = __pyx_mstate_global->__pyx_kp_u_Bad_column; __pyx_t_11[1] = __pyx_t_7; __pyx_t_11[2] = __pyx_mstate_global->__pyx_kp_u_Unsupported_arrow_category_inde; __pyx_t_11[3] = __pyx_t_9; __pyx_t_11[4] = __pyx_mstate_global->__pyx_kp_u_;
0998:
+0999: format = col.setup.arrow_schema.dictionary.format
__pyx_t_2 = __pyx_v_col->setup->arrow_schema.dictionary->format; __pyx_v_format = __pyx_t_2;
+1000: if (strncmp(format, _ARROW_FMT_UTF8_STRING, 1) != 0):
__pyx_t_3 = (strncmp(__pyx_v_format, __pyx_v_7questdb_7ingress__ARROW_FMT_UTF8_STRING, 1) != 0);
if (unlikely(__pyx_t_3)) {
/* … */
}
+1001: raise IngressError(
__pyx_t_6 = NULL;
__Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_IngressError); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 1001, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_10);
+1002: IngressErrorCode.BadDataFrame,
__Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_IngressErrorCode); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1002, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_BadDataFrame); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1002, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+1003: f'Bad column {pandas_col.name!r}: ' +
__pyx_t_8 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_v_pandas_col->name), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1003, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); /* … */ __pyx_t_9 = __Pyx_PyUnicode_Join(__pyx_t_11, 5, 11 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_8) + 52 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_7) + 1, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_8) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_7)); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 1003, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_12 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_10))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_10); assert(__pyx_t_6); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_10); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_10, __pyx__function); __pyx_t_12 = 0; } #endif { PyObject *__pyx_callargs[3] = {__pyx_t_6, __pyx_t_5, __pyx_t_9}; __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_10, __pyx_callargs+__pyx_t_12, (3-__pyx_t_12) | (__pyx_t_12*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1001, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); } __Pyx_Raise(__pyx_t_4, 0, 0, 0); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __PYX_ERR(1, 1001, __pyx_L1_error)
1004: 'Expected a category of strings, ' +
+1005: f'got a category of {pandas_col.series.dtype.categories.dtype}.')
__pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_pandas_col->series, __pyx_mstate_global->__pyx_n_u_dtype); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 1005, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_categories); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1005, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_dtype); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 1005, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = __Pyx_PyObject_FormatSimple(__pyx_t_9, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1005, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_11[0] = __pyx_mstate_global->__pyx_kp_u_Bad_column; __pyx_t_11[1] = __pyx_t_8; __pyx_t_11[2] = __pyx_mstate_global->__pyx_kp_u_Expected_a_category_of_strings; __pyx_t_11[3] = __pyx_t_7; __pyx_t_11[4] = __pyx_mstate_global->__pyx_kp_u_;
1006:
+1007: cdef void_int _dataframe_series_resolve_arrow(PandasCol pandas_col, object arrowtype, col_t *col) except -1:
static __pyx_t_7questdb_7ingress_void_int __pyx_f_7questdb_7ingress__dataframe_series_resolve_arrow(struct __pyx_obj_7questdb_7ingress_PandasCol *__pyx_v_pandas_col, PyObject *__pyx_v_arrowtype, struct __pyx_t_7questdb_7ingress_col_t *__pyx_v_col) {
int __pyx_v_is_decimal_col;
__pyx_t_7questdb_7ingress_void_int __pyx_r;
/* … */
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_2);
__Pyx_XDECREF(__pyx_t_3);
__Pyx_XDECREF(__pyx_t_4);
__Pyx_XDECREF(__pyx_t_6);
__Pyx_XDECREF(__pyx_t_7);
__Pyx_XDECREF(__pyx_t_8);
__Pyx_XDECREF(__pyx_t_10);
__Pyx_AddTraceback("questdb.ingress._dataframe_series_resolve_arrow", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = -1;
__pyx_L0:;
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
+1008: cdef bint is_decimal_col = False
__pyx_v_is_decimal_col = 0;
+1009: _dataframe_series_as_arrow(pandas_col, col)
__pyx_t_1 = __pyx_f_7questdb_7ingress__dataframe_series_as_arrow(__pyx_v_pandas_col, __pyx_v_col); if (unlikely(__pyx_t_1 == ((__pyx_t_7questdb_7ingress_void_int)-1))) __PYX_ERR(1, 1009, __pyx_L1_error)
+1010: if arrowtype.id == _PYARROW.lib.Type_DECIMAL32:
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_arrowtype, __pyx_mstate_global->__pyx_n_u_id); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1010, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_7questdb_7ingress__PYARROW, __pyx_mstate_global->__pyx_n_u_lib); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1010, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Type_DECIMAL32); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1010, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_RichCompare(__pyx_t_2, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1010, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(1, 1010, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_5) { /* … */ goto __pyx_L3; }
+1011: col.setup.source = col_source_t.col_source_decimal32_arrow
__pyx_v_col->setup->source = __pyx_e_7questdb_7ingress_col_source_decimal32_arrow;
+1012: is_decimal_col = True
__pyx_v_is_decimal_col = 1;
+1013: elif arrowtype.id == _PYARROW.lib.Type_DECIMAL64:
__pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_arrowtype, __pyx_mstate_global->__pyx_n_u_id); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1013, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_7questdb_7ingress__PYARROW, __pyx_mstate_global->__pyx_n_u_lib); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1013, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_Type_DECIMAL64); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1013, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_RichCompare(__pyx_t_3, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1013, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(1, 1013, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_5) { /* … */ goto __pyx_L3; }
+1014: col.setup.source = col_source_t.col_source_decimal64_arrow
__pyx_v_col->setup->source = __pyx_e_7questdb_7ingress_col_source_decimal64_arrow;
+1015: is_decimal_col = True
__pyx_v_is_decimal_col = 1;
+1016: elif arrowtype.id == _PYARROW.lib.Type_DECIMAL128:
__pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_arrowtype, __pyx_mstate_global->__pyx_n_u_id); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1016, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_7questdb_7ingress__PYARROW, __pyx_mstate_global->__pyx_n_u_lib); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1016, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_Type_DECIMAL128); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1016, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_RichCompare(__pyx_t_4, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1016, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(1, 1016, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_5) { /* … */ goto __pyx_L3; }
+1017: col.setup.source = col_source_t.col_source_decimal128_arrow
__pyx_v_col->setup->source = __pyx_e_7questdb_7ingress_col_source_decimal128_arrow;
+1018: is_decimal_col = True
__pyx_v_is_decimal_col = 1;
+1019: elif arrowtype.id == _PYARROW.lib.Type_DECIMAL256:
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_arrowtype, __pyx_mstate_global->__pyx_n_u_id); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1019, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_7questdb_7ingress__PYARROW, __pyx_mstate_global->__pyx_n_u_lib); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1019, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Type_DECIMAL256); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1019, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_RichCompare(__pyx_t_2, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1019, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(1, 1019, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_5) { /* … */ goto __pyx_L3; }
+1020: col.setup.source = col_source_t.col_source_decimal256_arrow
__pyx_v_col->setup->source = __pyx_e_7questdb_7ingress_col_source_decimal256_arrow;
+1021: is_decimal_col = True
__pyx_v_is_decimal_col = 1;
+1022: elif arrowtype.id == _PYARROW.lib.Type_BOOL:
__pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_arrowtype, __pyx_mstate_global->__pyx_n_u_id); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1022, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_7questdb_7ingress__PYARROW, __pyx_mstate_global->__pyx_n_u_lib); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1022, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_Type_BOOL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1022, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_RichCompare(__pyx_t_3, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1022, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(1, 1022, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_5) { /* … */ goto __pyx_L3; }
+1023: col.setup.source = col_source_t.col_source_bool_arrow
__pyx_v_col->setup->source = __pyx_e_7questdb_7ingress_col_source_bool_arrow;
+1024: elif arrowtype.id == _PYARROW.lib.Type_LARGE_STRING:
__pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_arrowtype, __pyx_mstate_global->__pyx_n_u_id); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1024, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_7questdb_7ingress__PYARROW, __pyx_mstate_global->__pyx_n_u_lib); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1024, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_Type_LARGE_STRING); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1024, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_RichCompare(__pyx_t_4, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1024, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(1, 1024, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_5) { /* … */ goto __pyx_L3; }
+1025: col.setup.source = col_source_t.col_source_str_lrg_utf8_arrow
__pyx_v_col->setup->source = __pyx_e_7questdb_7ingress_col_source_str_lrg_utf8_arrow;
+1026: elif arrowtype.id == _PYARROW.lib.Type_FLOAT:
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_arrowtype, __pyx_mstate_global->__pyx_n_u_id); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1026, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_7questdb_7ingress__PYARROW, __pyx_mstate_global->__pyx_n_u_lib); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1026, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Type_FLOAT); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1026, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_RichCompare(__pyx_t_2, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1026, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(1, 1026, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_5) { /* … */ goto __pyx_L3; }
+1027: col.setup.source = col_source_t.col_source_f32_arrow
__pyx_v_col->setup->source = __pyx_e_7questdb_7ingress_col_source_f32_arrow;
+1028: elif arrowtype.id == _PYARROW.lib.Type_DOUBLE:
__pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_arrowtype, __pyx_mstate_global->__pyx_n_u_id); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1028, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_7questdb_7ingress__PYARROW, __pyx_mstate_global->__pyx_n_u_lib); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1028, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_Type_DOUBLE); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1028, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_RichCompare(__pyx_t_3, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1028, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(1, 1028, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_5) { /* … */ goto __pyx_L3; }
+1029: col.setup.source = col_source_t.col_source_f64_arrow
__pyx_v_col->setup->source = __pyx_e_7questdb_7ingress_col_source_f64_arrow;
+1030: elif arrowtype.id == _PYARROW.lib.Type_INT8:
__pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_arrowtype, __pyx_mstate_global->__pyx_n_u_id); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1030, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_7questdb_7ingress__PYARROW, __pyx_mstate_global->__pyx_n_u_lib); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1030, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_Type_INT8); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1030, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_RichCompare(__pyx_t_4, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1030, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(1, 1030, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_5) { /* … */ goto __pyx_L3; }
+1031: col.setup.source = col_source_t.col_source_i8_arrow
__pyx_v_col->setup->source = __pyx_e_7questdb_7ingress_col_source_i8_arrow;
+1032: elif arrowtype.id == _PYARROW.lib.Type_INT16:
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_arrowtype, __pyx_mstate_global->__pyx_n_u_id); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1032, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_7questdb_7ingress__PYARROW, __pyx_mstate_global->__pyx_n_u_lib); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1032, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Type_INT16); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1032, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_RichCompare(__pyx_t_2, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1032, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(1, 1032, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_5) { /* … */ goto __pyx_L3; }
+1033: col.setup.source = col_source_t.col_source_i16_arrow
__pyx_v_col->setup->source = __pyx_e_7questdb_7ingress_col_source_i16_arrow;
+1034: elif arrowtype.id == _PYARROW.lib.Type_INT32:
__pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_arrowtype, __pyx_mstate_global->__pyx_n_u_id); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1034, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_7questdb_7ingress__PYARROW, __pyx_mstate_global->__pyx_n_u_lib); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1034, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_Type_INT32); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1034, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_RichCompare(__pyx_t_3, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1034, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(1, 1034, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_5) { /* … */ goto __pyx_L3; }
+1035: col.setup.source = col_source_t.col_source_i32_arrow
__pyx_v_col->setup->source = __pyx_e_7questdb_7ingress_col_source_i32_arrow;
+1036: elif arrowtype.id == _PYARROW.lib.Type_INT64:
__pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_arrowtype, __pyx_mstate_global->__pyx_n_u_id); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1036, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_7questdb_7ingress__PYARROW, __pyx_mstate_global->__pyx_n_u_lib); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1036, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_Type_INT64); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1036, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_RichCompare(__pyx_t_4, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1036, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(1, 1036, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (likely(__pyx_t_5)) { /* … */ goto __pyx_L3; }
+1037: col.setup.source = col_source_t.col_source_i64_arrow
__pyx_v_col->setup->source = __pyx_e_7questdb_7ingress_col_source_i64_arrow;
1038: else:
+1039: raise IngressError(
/*else*/ {
__pyx_t_3 = NULL;
__Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_IngressError); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1039, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
+1040: IngressErrorCode.BadDataFrame,
__Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_IngressErrorCode); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1040, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_BadDataFrame); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1040, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+1041: f'Unsupported arrow type {arrowtype} for column {pandas_col.name!r}. ' +
__pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_v_arrowtype, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1041, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_8 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_v_pandas_col->name), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1041, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_9[0] = __pyx_mstate_global->__pyx_kp_u_Unsupported_arrow_type; __pyx_t_9[1] = __pyx_t_6; __pyx_t_9[2] = __pyx_mstate_global->__pyx_kp_u_for_column; __pyx_t_9[3] = __pyx_t_8; __pyx_t_9[4] = __pyx_mstate_global->__pyx_kp_u_Raise_an_issue_if_you_think_it; __pyx_t_10 = __Pyx_PyUnicode_Join(__pyx_t_9, 5, 23 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6) + 12 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_8) + 106, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_8)); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 1041, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_11 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); assert(__pyx_t_3); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); __pyx_t_11 = 0; } #endif { PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_t_7, __pyx_t_10}; __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_11, (3-__pyx_t_11) | (__pyx_t_11*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1039, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(1, 1039, __pyx_L1_error) } __pyx_L3:;
1042: 'Raise an issue if you think it should be supported: ' +
1043: 'https://github.com/questdb/py-questdb-client/issues.')
+1044: if is_decimal_col:
if (__pyx_v_is_decimal_col) {
/* … */
goto __pyx_L4;
}
+1045: if arrowtype.scale < 0 or arrowtype.scale > 76:
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_arrowtype, __pyx_mstate_global->__pyx_n_u_scale); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1045, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyObject_RichCompare(__pyx_t_2, __pyx_mstate_global->__pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1045, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_12 < 0))) __PYX_ERR(1, 1045, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!__pyx_t_12) { } else { __pyx_t_5 = __pyx_t_12; goto __pyx_L6_bool_binop_done; } __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_arrowtype, __pyx_mstate_global->__pyx_n_u_scale); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1045, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = PyObject_RichCompare(__pyx_t_4, __pyx_mstate_global->__pyx_int_76, Py_GT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1045, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_12 < 0))) __PYX_ERR(1, 1045, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_5 = __pyx_t_12; __pyx_L6_bool_binop_done:; if (unlikely(__pyx_t_5)) { /* … */ }
+1046: raise IngressError(
__pyx_t_4 = NULL;
__Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_IngressError); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 1046, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_10);
+1047: IngressErrorCode.BadDataFrame,
__Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_IngressErrorCode); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1047, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_BadDataFrame); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1047, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+1048: f'Bad column {pandas_col.name!r}: ' +
__pyx_t_7 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_v_pandas_col->name), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1048, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); /* … */ __pyx_t_8 = __Pyx_PyUnicode_Join(__pyx_t_9, 5, 11 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_7) + 28 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6) + 41, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_7) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6)); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1048, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_11 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_10))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_10); assert(__pyx_t_4); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_10); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_10, __pyx__function); __pyx_t_11 = 0; } #endif { PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_t_3, __pyx_t_8}; __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_10, __pyx_callargs+__pyx_t_11, (3-__pyx_t_11) | (__pyx_t_11*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1046, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(1, 1046, __pyx_L1_error)
+1049: f'Unsupported decimal scale {arrowtype.scale}: ' +
__pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_arrowtype, __pyx_mstate_global->__pyx_n_u_scale); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1049, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_t_8, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1049, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_9[0] = __pyx_mstate_global->__pyx_kp_u_Bad_column; __pyx_t_9[1] = __pyx_t_7; __pyx_t_9[2] = __pyx_mstate_global->__pyx_kp_u_Unsupported_decimal_scale; __pyx_t_9[3] = __pyx_t_6; __pyx_t_9[4] = __pyx_mstate_global->__pyx_kp_u_Must_be_in_the_range_0_to_76_in;
1050: 'Must be in the range 0 to 76 inclusive.')
+1051: col.scale = <uint8_t>arrowtype.scale
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_arrowtype, __pyx_mstate_global->__pyx_n_u_scale); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1051, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_13 = __Pyx_PyLong_As_uint8_t(__pyx_t_2); if (unlikely((__pyx_t_13 == ((uint8_t)-1)) && PyErr_Occurred())) __PYX_ERR(1, 1051, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_col->scale = ((uint8_t)__pyx_t_13);
1052: else:
+1053: col.scale = 0
/*else*/ {
__pyx_v_col->scale = 0;
}
__pyx_L4:;
+1054: return 0
__pyx_r = 0; goto __pyx_L0;
1055:
+1056: cdef inline bint _dataframe_is_float_nan(PyObject* obj) noexcept:
static CYTHON_INLINE int __pyx_f_7questdb_7ingress__dataframe_is_float_nan(PyObject *__pyx_v_obj) {
int __pyx_r;
/* … */
/* function exit code */
__pyx_L0:;
return __pyx_r;
}
+1057: return PyFloat_CheckExact(obj) and isnan(PyFloat_AS_DOUBLE(obj))
__pyx_t_2 = PyFloat_CheckExact(__pyx_v_obj); if (__pyx_t_2) { } else { __pyx_t_1 = __pyx_t_2; goto __pyx_L3_bool_binop_done; } __pyx_t_2 = isnan(PyFloat_AS_DOUBLE(__pyx_v_obj)); __pyx_t_1 = __pyx_t_2; __pyx_L3_bool_binop_done:; __pyx_r = __pyx_t_1; goto __pyx_L0;
1058:
1059:
+1060: cdef inline bint _dataframe_is_null_pyobj(PyObject* obj) noexcept:
static CYTHON_INLINE int __pyx_f_7questdb_7ingress__dataframe_is_null_pyobj(PyObject *__pyx_v_obj) {
int __pyx_r;
/* … */
/* function exit code */
__pyx_L0:;
return __pyx_r;
}
1061: return (
+1062: (obj == Py_None) or
__pyx_t_2 = (__pyx_v_obj == Py_None);
if (!__pyx_t_2) {
} else {
__pyx_t_1 = __pyx_t_2;
goto __pyx_L3_bool_binop_done;
}
+1063: (obj == <PyObject*>_PANDAS_NA) or
__pyx_t_2 = (__pyx_v_obj == ((PyObject *)__pyx_v_7questdb_7ingress__PANDAS_NA));
if (!__pyx_t_2) {
} else {
__pyx_t_1 = __pyx_t_2;
goto __pyx_L3_bool_binop_done;
}
+1064: _dataframe_is_float_nan(obj))
__pyx_t_2 = __pyx_f_7questdb_7ingress__dataframe_is_float_nan(__pyx_v_obj); __pyx_t_1 = __pyx_t_2; __pyx_L3_bool_binop_done:; __pyx_r = __pyx_t_1; goto __pyx_L0;
1065:
1066: # noinspection PyUnreachableCode
+1067: cdef void_int _dataframe_series_sniff_pyobj(
static __pyx_t_7questdb_7ingress_void_int __pyx_f_7questdb_7ingress__dataframe_series_sniff_pyobj(struct __pyx_obj_7questdb_7ingress_PandasCol *__pyx_v_pandas_col, struct __pyx_t_7questdb_7ingress_col_t *__pyx_v_col) {
size_t __pyx_v_el_index;
size_t __pyx_v_n_elements;
PyObject **__pyx_v_obj_arr;
PyObject *__pyx_v_obj;
PyArrayObject *__pyx_v_arr;
npy_int __pyx_v_arr_type;
PyArray_Descr *__pyx_v_arr_descr = 0;
PyObject *__pyx_v_arr_type_name = 0;
__pyx_t_7questdb_7ingress_void_int __pyx_r;
/* … */
/* function exit code */
__pyx_r = 0;
goto __pyx_L0;
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
__Pyx_XDECREF(__pyx_t_8);
__Pyx_XDECREF(__pyx_t_9);
__Pyx_XDECREF(__pyx_t_11);
__Pyx_XDECREF(__pyx_t_12);
__Pyx_XDECREF(__pyx_t_13);
__Pyx_XDECREF(__pyx_t_15);
__Pyx_AddTraceback("questdb.ingress._dataframe_series_sniff_pyobj", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = -1;
__pyx_L0:;
__Pyx_XDECREF((PyObject *)__pyx_v_arr_descr);
__Pyx_XDECREF(__pyx_v_arr_type_name);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
1068: PandasCol pandas_col, col_t* col) except -1:
1069: """
1070: Deduct the type of the object column.
1071: Object columns can contain pretty much anything, but they usually don't.
1072: We make an educated guess by finding the first non-null value in the column.
1073: """
1074: # To access elements.
1075: cdef size_t el_index
+1076: cdef size_t n_elements = len(pandas_col.series)
__pyx_t_1 = __pyx_v_pandas_col->series; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(1, 1076, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_n_elements = __pyx_t_2;
1077: cdef PyObject** obj_arr
1078: cdef PyObject* obj
1079:
1080: # To access elements which are themselves arrays.
1081: cdef PyArrayObject* arr
1082: cdef npy_int arr_type
1083: cdef cnp.dtype arr_descr # A cython defn for `PyArray_Descr*`
1084: cdef str arr_type_name
1085:
+1086: _dataframe_series_as_pybuf(pandas_col, col)
__pyx_t_3 = __pyx_f_7questdb_7ingress__dataframe_series_as_pybuf(__pyx_v_pandas_col, __pyx_v_col, NULL); if (unlikely(__pyx_t_3 == ((__pyx_t_7questdb_7ingress_void_int)-1))) __PYX_ERR(1, 1086, __pyx_L1_error)
+1087: obj_arr = <PyObject**>(col.setup.pybuf.buf)
__pyx_v_obj_arr = ((PyObject **)__pyx_v_col->setup->pybuf.buf);
+1088: for el_index in range(n_elements):
__pyx_t_4 = __pyx_v_n_elements;
__pyx_t_5 = __pyx_t_4;
for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
__pyx_v_el_index = __pyx_t_6;
+1089: obj = obj_arr[el_index]
__pyx_v_obj = (__pyx_v_obj_arr[__pyx_v_el_index]);
+1090: if not _dataframe_is_null_pyobj(obj):
__pyx_t_7 = (!__pyx_f_7questdb_7ingress__dataframe_is_null_pyobj(__pyx_v_obj));
if (__pyx_t_7) {
/* … */
}
}
+1091: if PyBool_Check(obj):
__pyx_t_7 = PyBool_Check(__pyx_v_obj);
if (__pyx_t_7) {
/* … */
goto __pyx_L6;
}
+1092: col.setup.source = col_source_t.col_source_bool_pyobj
__pyx_v_col->setup->source = __pyx_e_7questdb_7ingress_col_source_bool_pyobj;
+1093: elif PyLong_CheckExact(obj):
__pyx_t_7 = PyLong_CheckExact(__pyx_v_obj);
if (__pyx_t_7) {
/* … */
goto __pyx_L6;
}
+1094: col.setup.source = col_source_t.col_source_int_pyobj
__pyx_v_col->setup->source = __pyx_e_7questdb_7ingress_col_source_int_pyobj;
+1095: elif PyFloat_CheckExact(obj):
__pyx_t_7 = PyFloat_CheckExact(__pyx_v_obj);
if (__pyx_t_7) {
/* … */
goto __pyx_L6;
}
+1096: col.setup.source = col_source_t.col_source_float_pyobj
__pyx_v_col->setup->source = __pyx_e_7questdb_7ingress_col_source_float_pyobj;
+1097: elif PyUnicode_CheckExact(obj):
__pyx_t_7 = PyUnicode_CheckExact(__pyx_v_obj);
if (__pyx_t_7) {
/* … */
goto __pyx_L6;
}
+1098: col.setup.source = col_source_t.col_source_str_pyobj
__pyx_v_col->setup->source = __pyx_e_7questdb_7ingress_col_source_str_pyobj;
+1099: elif PyArray_CheckExact(obj):
__pyx_t_7 = PyArray_CheckExact(__pyx_v_obj);
if (__pyx_t_7) {
/* … */
goto __pyx_L6;
}
+1100: arr = <PyArrayObject*>obj
__pyx_v_arr = ((PyArrayObject *)__pyx_v_obj);
+1101: arr_type = PyArray_TYPE(arr)
__pyx_v_arr_type = PyArray_TYPE(__pyx_v_arr);
+1102: if arr_type == NPY_DOUBLE:
__pyx_t_7 = (__pyx_v_arr_type == NPY_DOUBLE);
if (__pyx_t_7) {
/* … */
goto __pyx_L7;
}
+1103: col.setup.source = col_source_t.col_source_arr_f64_numpyobj
__pyx_v_col->setup->source = __pyx_e_7questdb_7ingress_col_source_arr_f64_numpyobj;
1104: else:
+1105: arr_type_name = '??unknown??'
/*else*/ {
__Pyx_INCREF(__pyx_mstate_global->__pyx_kp_u_unknown);
__pyx_v_arr_type_name = __pyx_mstate_global->__pyx_kp_u_unknown;
+1106: arr_descr = cnp.PyArray_DescrFromType(arr_type)
__pyx_t_1 = ((PyObject *)PyArray_DescrFromType(__pyx_v_arr_type)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1106, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_arr_descr = ((PyArray_Descr *)__pyx_t_1); __pyx_t_1 = 0;
+1107: if arr_descr is not None:
__pyx_t_7 = (((PyObject *)__pyx_v_arr_descr) != Py_None);
if (__pyx_t_7) {
/* … */
}
+1108: arr_type_name = arr_descr.name.decode('ascii')
__pyx_t_9 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_arr_descr), __pyx_mstate_global->__pyx_n_u_name); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 1108, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_8 = __pyx_t_9; __Pyx_INCREF(__pyx_t_8); __pyx_t_10 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_mstate_global->__pyx_n_u_ascii}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_decode, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1108, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } if (!(likely(PyUnicode_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_t_1))) __PYX_ERR(1, 1108, __pyx_L1_error) __Pyx_DECREF_SET(__pyx_v_arr_type_name, ((PyObject*)__pyx_t_1)); __pyx_t_1 = 0;
+1109: raise IngressError(
__pyx_t_9 = NULL;
__Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_IngressError); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1109, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_8);
+1110: IngressErrorCode.BadDataFrame,
__Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_IngressErrorCode); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 1110, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_BadDataFrame); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 1110, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+1111: f'Bad column {pandas_col.name!r}: ' +
__pyx_t_11 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_v_pandas_col->name), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 1111, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); /* … */ __pyx_t_15 = __Pyx_PyUnicode_Join(__pyx_t_14, 5, 11 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_11) + 84 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_13) + 1, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_11) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_13)); if (unlikely(!__pyx_t_15)) __PYX_ERR(1, 1111, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_15); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_10 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_8))) { __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8); assert(__pyx_t_9); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_8); __Pyx_INCREF(__pyx_t_9); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_8, __pyx__function); __pyx_t_10 = 0; } #endif { PyObject *__pyx_callargs[3] = {__pyx_t_9, __pyx_t_12, __pyx_t_15}; __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_8, __pyx_callargs+__pyx_t_10, (3-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1109, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __PYX_ERR(1, 1109, __pyx_L1_error) } __pyx_L7:;
1112: 'Unsupported object column containing a numpy array ' +
+1113: f'of an unsupported element type {arr_type_name}.')
__pyx_t_13 = __Pyx_PyUnicode_Unicode(__pyx_v_arr_type_name); if (unlikely(!__pyx_t_13)) __PYX_ERR(1, 1113, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __pyx_t_14[0] = __pyx_mstate_global->__pyx_kp_u_Bad_column; __pyx_t_14[1] = __pyx_t_11; __pyx_t_14[2] = __pyx_mstate_global->__pyx_kp_u_Unsupported_object_column_conta; __pyx_t_14[3] = __pyx_t_13; __pyx_t_14[4] = __pyx_mstate_global->__pyx_kp_u_;
+1114: elif PyBytes_CheckExact(obj):
__pyx_t_7 = PyBytes_CheckExact(__pyx_v_obj);
if (unlikely(__pyx_t_7)) {
/* … */
}
+1115: raise IngressError(
__pyx_t_8 = NULL;
__Pyx_GetModuleGlobalName(__pyx_t_15, __pyx_mstate_global->__pyx_n_u_IngressError); if (unlikely(!__pyx_t_15)) __PYX_ERR(1, 1115, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_15);
+1116: IngressErrorCode.BadDataFrame,
__Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_IngressErrorCode); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 1116, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_BadDataFrame); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 1116, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+1117: f'Bad column {pandas_col.name!r}: ' +
__pyx_t_12 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_v_pandas_col->name), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 1117, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); __pyx_t_16[0] = __pyx_mstate_global->__pyx_kp_u_Bad_column; __pyx_t_16[1] = __pyx_t_12; __pyx_t_16[2] = __pyx_mstate_global->__pyx_kp_u_Unsupported_object_column_conta_2; __pyx_t_13 = __Pyx_PyUnicode_Join(__pyx_t_16, 3, 11 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_12) + 140, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_12)); if (unlikely(!__pyx_t_13)) __PYX_ERR(1, 1117, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_10 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_15))) { __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_15); assert(__pyx_t_8); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_15); __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_15, __pyx__function); __pyx_t_10 = 0; } #endif { PyObject *__pyx_callargs[3] = {__pyx_t_8, __pyx_t_9, __pyx_t_13}; __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_15, __pyx_callargs+__pyx_t_10, (3-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1115, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __PYX_ERR(1, 1115, __pyx_L1_error)
1118: 'Unsupported object column containing bytes.' +
1119: 'If this is a string column, decode it first. ' +
1120: 'See: https://stackoverflow.com/questions/40389764/')
+1121: elif isinstance(<object>obj, Decimal):
__Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_Decimal); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1121, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_7 = PyObject_IsInstance(((PyObject *)__pyx_v_obj), __pyx_t_1); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(1, 1121, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (likely(__pyx_t_7)) { /* … */ goto __pyx_L6; }
+1122: col.setup.source = col_source_t.col_source_decimal_pyobj
__pyx_v_col->setup->source = __pyx_e_7questdb_7ingress_col_source_decimal_pyobj;
1123: else:
+1124: raise IngressError(
/*else*/ {
__pyx_t_15 = NULL;
__Pyx_GetModuleGlobalName(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_IngressError); if (unlikely(!__pyx_t_13)) __PYX_ERR(1, 1124, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_13);
+1125: IngressErrorCode.BadDataFrame,
__Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_IngressErrorCode); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 1125, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_BadDataFrame); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1125, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+1126: f'Bad column {pandas_col.name!r}: ' +
__pyx_t_9 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_v_pandas_col->name), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 1126, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_16[0] = __pyx_mstate_global->__pyx_kp_u_Bad_column; __pyx_t_16[1] = __pyx_t_9; __pyx_t_16[2] = __pyx_mstate_global->__pyx_kp_u_Unsupported_object_column_conta_3; __pyx_t_12 = __Pyx_PyUnicode_Join(__pyx_t_16, 3, 11 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_9) + 57, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9)); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 1126, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+1127: f'Unsupported object column containing an object of type ' +
__pyx_t_11 = __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_OwnStrongReferenceInPlaceSafe(__pyx_t_12, __pyx_t_9); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 1127, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+1128: _fqn(type(<object>obj)) + '.')
__pyx_t_9 = __pyx_f_7questdb_7ingress__fqn(((PyTypeObject*)((PyObject *)Py_TYPE(((PyObject *)__pyx_v_obj))))); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 1128, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); /* … */ __pyx_t_9 = __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_OwnStrongReferenceInPlace(__pyx_t_11, __pyx_mstate_global->__pyx_kp_u_); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 1128, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_t_10 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_13))) { __pyx_t_15 = PyMethod_GET_SELF(__pyx_t_13); assert(__pyx_t_15); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_13); __Pyx_INCREF(__pyx_t_15); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_13, __pyx__function); __pyx_t_10 = 0; } #endif { PyObject *__pyx_callargs[3] = {__pyx_t_15, __pyx_t_8, __pyx_t_9}; __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_13, __pyx_callargs+__pyx_t_10, (3-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1124, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __PYX_ERR(1, 1124, __pyx_L1_error) } __pyx_L6:;
+1129: return 0
__pyx_r = 0;
goto __pyx_L0;
1130:
1131: # We haven't returned yet, so we've hit an object column that
1132: # exclusively has null values. We will just skip this column.
+1133: col.setup.source = col_source_t.col_source_nulls
__pyx_v_col->setup->source = __pyx_e_7questdb_7ingress_col_source_nulls;
1134:
1135:
+1136: cdef void_int _dataframe_resolve_source_and_buffers(
static __pyx_t_7questdb_7ingress_void_int __pyx_f_7questdb_7ingress__dataframe_resolve_source_and_buffers(struct __pyx_obj_7questdb_7ingress_PandasCol *__pyx_v_pandas_col, struct __pyx_t_7questdb_7ingress_col_t *__pyx_v_col) {
PyObject *__pyx_v_dtype = 0;
int __pyx_v_ts_col_source;
__pyx_t_7questdb_7ingress_void_int __pyx_r;
/* … */
/* function exit code */
__pyx_r = 0;
goto __pyx_L0;
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
__Pyx_XDECREF(__pyx_t_5);
__Pyx_XDECREF(__pyx_t_6);
__Pyx_XDECREF(__pyx_t_7);
__Pyx_XDECREF(__pyx_t_8);
__Pyx_XDECREF(__pyx_t_9);
__Pyx_XDECREF(__pyx_t_10);
__Pyx_XDECREF(__pyx_t_12);
__Pyx_AddTraceback("questdb.ingress._dataframe_resolve_source_and_buffers", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = -1;
__pyx_L0:;
__Pyx_XDECREF(__pyx_v_dtype);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
1137: PandasCol pandas_col, col_t* col) except -1:
+1138: cdef object dtype = pandas_col.dtype
__pyx_t_1 = __pyx_v_pandas_col->dtype;
__Pyx_INCREF(__pyx_t_1);
__pyx_v_dtype = __pyx_t_1;
__pyx_t_1 = 0;
+1139: cdef int ts_col_source = _dataframe_classify_timestamp_dtype(dtype)
__pyx_t_2 = __pyx_f_7questdb_7ingress__dataframe_classify_timestamp_dtype(__pyx_v_dtype); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(1, 1139, __pyx_L1_error)
__pyx_v_ts_col_source = __pyx_t_2;
+1140: if ts_col_source != 0:
__pyx_t_3 = (__pyx_v_ts_col_source != 0);
if (__pyx_t_3) {
/* … */
goto __pyx_L3;
}
+1141: col.setup.source = <col_source_t>ts_col_source
__pyx_v_col->setup->source = ((enum __pyx_t_7questdb_7ingress_col_source_t)__pyx_v_ts_col_source);
+1142: if ((col.setup.source == col_source_t.col_source_dt64ns_numpy) or
switch (__pyx_v_col->setup->source) {
case __pyx_e_7questdb_7ingress_col_source_dt64ns_numpy:
case __pyx_e_7questdb_7ingress_col_source_dt64us_numpy:
/* … */
break;
default:
1143: (col.setup.source == col_source_t.col_source_dt64us_numpy)):
+1144: _dataframe_series_as_pybuf(pandas_col, col)
__pyx_t_4 = __pyx_f_7questdb_7ingress__dataframe_series_as_pybuf(__pyx_v_pandas_col, __pyx_v_col, NULL); if (unlikely(__pyx_t_4 == ((__pyx_t_7questdb_7ingress_void_int)-1))) __PYX_ERR(1, 1144, __pyx_L1_error)
1145: else:
+1146: _dataframe_series_as_arrow(pandas_col, col)
__pyx_t_4 = __pyx_f_7questdb_7ingress__dataframe_series_as_arrow(__pyx_v_pandas_col, __pyx_v_col); if (unlikely(__pyx_t_4 == ((__pyx_t_7questdb_7ingress_void_int)-1))) __PYX_ERR(1, 1146, __pyx_L1_error)
break;
}
+1147: elif isinstance(dtype, _NUMPY_BOOL):
__pyx_t_1 = __pyx_v_7questdb_7ingress__NUMPY_BOOL; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = PyObject_IsInstance(__pyx_v_dtype, __pyx_t_1); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 1147, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_3) { /* … */ goto __pyx_L3; }
+1148: col.setup.source = col_source_t.col_source_bool_numpy
__pyx_v_col->setup->source = __pyx_e_7questdb_7ingress_col_source_bool_numpy;
+1149: _dataframe_series_as_pybuf(pandas_col, col)
__pyx_t_4 = __pyx_f_7questdb_7ingress__dataframe_series_as_pybuf(__pyx_v_pandas_col, __pyx_v_col, NULL); if (unlikely(__pyx_t_4 == ((__pyx_t_7questdb_7ingress_void_int)-1))) __PYX_ERR(1, 1149, __pyx_L1_error)
+1150: elif isinstance(dtype, _PANDAS.BooleanDtype):
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_7questdb_7ingress__PANDAS, __pyx_mstate_global->__pyx_n_u_BooleanDtype); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1150, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyObject_IsInstance(__pyx_v_dtype, __pyx_t_1); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 1150, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_3) { /* … */ goto __pyx_L3; }
+1151: col.setup.source = col_source_t.col_source_bool_arrow
__pyx_v_col->setup->source = __pyx_e_7questdb_7ingress_col_source_bool_arrow;
+1152: _dataframe_series_as_arrow(pandas_col, col)
__pyx_t_4 = __pyx_f_7questdb_7ingress__dataframe_series_as_arrow(__pyx_v_pandas_col, __pyx_v_col); if (unlikely(__pyx_t_4 == ((__pyx_t_7questdb_7ingress_void_int)-1))) __PYX_ERR(1, 1152, __pyx_L1_error)
+1153: elif isinstance(dtype, _NUMPY_UINT8):
__pyx_t_1 = __pyx_v_7questdb_7ingress__NUMPY_UINT8; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = PyObject_IsInstance(__pyx_v_dtype, __pyx_t_1); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 1153, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_3) { /* … */ goto __pyx_L3; }
+1154: col.setup.source = col_source_t.col_source_u8_numpy
__pyx_v_col->setup->source = __pyx_e_7questdb_7ingress_col_source_u8_numpy;
+1155: _dataframe_series_as_pybuf(pandas_col, col)
__pyx_t_4 = __pyx_f_7questdb_7ingress__dataframe_series_as_pybuf(__pyx_v_pandas_col, __pyx_v_col, NULL); if (unlikely(__pyx_t_4 == ((__pyx_t_7questdb_7ingress_void_int)-1))) __PYX_ERR(1, 1155, __pyx_L1_error)
+1156: elif isinstance(dtype, _NUMPY_INT8):
__pyx_t_1 = __pyx_v_7questdb_7ingress__NUMPY_INT8; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = PyObject_IsInstance(__pyx_v_dtype, __pyx_t_1); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 1156, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_3) { /* … */ goto __pyx_L3; }
+1157: col.setup.source = col_source_t.col_source_i8_numpy
__pyx_v_col->setup->source = __pyx_e_7questdb_7ingress_col_source_i8_numpy;
+1158: _dataframe_series_as_pybuf(pandas_col, col)
__pyx_t_4 = __pyx_f_7questdb_7ingress__dataframe_series_as_pybuf(__pyx_v_pandas_col, __pyx_v_col, NULL); if (unlikely(__pyx_t_4 == ((__pyx_t_7questdb_7ingress_void_int)-1))) __PYX_ERR(1, 1158, __pyx_L1_error)
+1159: elif isinstance(dtype, _NUMPY_UINT16):
__pyx_t_1 = __pyx_v_7questdb_7ingress__NUMPY_UINT16; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = PyObject_IsInstance(__pyx_v_dtype, __pyx_t_1); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 1159, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_3) { /* … */ goto __pyx_L3; }
+1160: col.setup.source = col_source_t.col_source_u16_numpy
__pyx_v_col->setup->source = __pyx_e_7questdb_7ingress_col_source_u16_numpy;
+1161: _dataframe_series_as_pybuf(pandas_col, col)
__pyx_t_4 = __pyx_f_7questdb_7ingress__dataframe_series_as_pybuf(__pyx_v_pandas_col, __pyx_v_col, NULL); if (unlikely(__pyx_t_4 == ((__pyx_t_7questdb_7ingress_void_int)-1))) __PYX_ERR(1, 1161, __pyx_L1_error)
+1162: elif isinstance(dtype, _NUMPY_INT16):
__pyx_t_1 = __pyx_v_7questdb_7ingress__NUMPY_INT16; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = PyObject_IsInstance(__pyx_v_dtype, __pyx_t_1); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 1162, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_3) { /* … */ goto __pyx_L3; }
+1163: col.setup.source = col_source_t.col_source_i16_numpy
__pyx_v_col->setup->source = __pyx_e_7questdb_7ingress_col_source_i16_numpy;
+1164: _dataframe_series_as_pybuf(pandas_col, col)
__pyx_t_4 = __pyx_f_7questdb_7ingress__dataframe_series_as_pybuf(__pyx_v_pandas_col, __pyx_v_col, NULL); if (unlikely(__pyx_t_4 == ((__pyx_t_7questdb_7ingress_void_int)-1))) __PYX_ERR(1, 1164, __pyx_L1_error)
+1165: elif isinstance(dtype, _NUMPY_UINT32):
__pyx_t_1 = __pyx_v_7questdb_7ingress__NUMPY_UINT32; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = PyObject_IsInstance(__pyx_v_dtype, __pyx_t_1); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 1165, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_3) { /* … */ goto __pyx_L3; }
+1166: col.setup.source = col_source_t.col_source_u32_numpy
__pyx_v_col->setup->source = __pyx_e_7questdb_7ingress_col_source_u32_numpy;
+1167: _dataframe_series_as_pybuf(pandas_col, col)
__pyx_t_4 = __pyx_f_7questdb_7ingress__dataframe_series_as_pybuf(__pyx_v_pandas_col, __pyx_v_col, NULL); if (unlikely(__pyx_t_4 == ((__pyx_t_7questdb_7ingress_void_int)-1))) __PYX_ERR(1, 1167, __pyx_L1_error)
+1168: elif isinstance(dtype, _NUMPY_INT32):
__pyx_t_1 = __pyx_v_7questdb_7ingress__NUMPY_INT32; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = PyObject_IsInstance(__pyx_v_dtype, __pyx_t_1); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 1168, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_3) { /* … */ goto __pyx_L3; }
+1169: col.setup.source = col_source_t.col_source_i32_numpy
__pyx_v_col->setup->source = __pyx_e_7questdb_7ingress_col_source_i32_numpy;
+1170: _dataframe_series_as_pybuf(pandas_col, col)
__pyx_t_4 = __pyx_f_7questdb_7ingress__dataframe_series_as_pybuf(__pyx_v_pandas_col, __pyx_v_col, NULL); if (unlikely(__pyx_t_4 == ((__pyx_t_7questdb_7ingress_void_int)-1))) __PYX_ERR(1, 1170, __pyx_L1_error)
+1171: elif isinstance(dtype, _NUMPY_UINT64):
__pyx_t_1 = __pyx_v_7questdb_7ingress__NUMPY_UINT64; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = PyObject_IsInstance(__pyx_v_dtype, __pyx_t_1); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 1171, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_3) { /* … */ goto __pyx_L3; }
+1172: col.setup.source = col_source_t.col_source_u64_numpy
__pyx_v_col->setup->source = __pyx_e_7questdb_7ingress_col_source_u64_numpy;
+1173: _dataframe_series_as_pybuf(pandas_col, col)
__pyx_t_4 = __pyx_f_7questdb_7ingress__dataframe_series_as_pybuf(__pyx_v_pandas_col, __pyx_v_col, NULL); if (unlikely(__pyx_t_4 == ((__pyx_t_7questdb_7ingress_void_int)-1))) __PYX_ERR(1, 1173, __pyx_L1_error)
+1174: elif isinstance(dtype, _NUMPY_INT64):
__pyx_t_1 = __pyx_v_7questdb_7ingress__NUMPY_INT64; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = PyObject_IsInstance(__pyx_v_dtype, __pyx_t_1); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 1174, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_3) { /* … */ goto __pyx_L3; }
+1175: col.setup.source = col_source_t.col_source_i64_numpy
__pyx_v_col->setup->source = __pyx_e_7questdb_7ingress_col_source_i64_numpy;
+1176: _dataframe_series_as_pybuf(pandas_col, col)
__pyx_t_4 = __pyx_f_7questdb_7ingress__dataframe_series_as_pybuf(__pyx_v_pandas_col, __pyx_v_col, NULL); if (unlikely(__pyx_t_4 == ((__pyx_t_7questdb_7ingress_void_int)-1))) __PYX_ERR(1, 1176, __pyx_L1_error)
+1177: elif isinstance(dtype, _PANDAS.UInt8Dtype):
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_7questdb_7ingress__PANDAS, __pyx_mstate_global->__pyx_n_u_UInt8Dtype); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1177, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyObject_IsInstance(__pyx_v_dtype, __pyx_t_1); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 1177, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_3) { /* … */ goto __pyx_L3; }
+1178: col.setup.source = col_source_t.col_source_u8_arrow
__pyx_v_col->setup->source = __pyx_e_7questdb_7ingress_col_source_u8_arrow;
+1179: _dataframe_series_as_arrow(pandas_col, col)
__pyx_t_4 = __pyx_f_7questdb_7ingress__dataframe_series_as_arrow(__pyx_v_pandas_col, __pyx_v_col); if (unlikely(__pyx_t_4 == ((__pyx_t_7questdb_7ingress_void_int)-1))) __PYX_ERR(1, 1179, __pyx_L1_error)
+1180: elif isinstance(dtype, _PANDAS.Int8Dtype):
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_7questdb_7ingress__PANDAS, __pyx_mstate_global->__pyx_n_u_Int8Dtype); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1180, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyObject_IsInstance(__pyx_v_dtype, __pyx_t_1); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 1180, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_3) { /* … */ goto __pyx_L3; }
+1181: col.setup.source = col_source_t.col_source_i8_arrow
__pyx_v_col->setup->source = __pyx_e_7questdb_7ingress_col_source_i8_arrow;
+1182: _dataframe_series_as_arrow(pandas_col, col)
__pyx_t_4 = __pyx_f_7questdb_7ingress__dataframe_series_as_arrow(__pyx_v_pandas_col, __pyx_v_col); if (unlikely(__pyx_t_4 == ((__pyx_t_7questdb_7ingress_void_int)-1))) __PYX_ERR(1, 1182, __pyx_L1_error)
+1183: elif isinstance(dtype, _PANDAS.UInt16Dtype):
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_7questdb_7ingress__PANDAS, __pyx_mstate_global->__pyx_n_u_UInt16Dtype); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1183, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyObject_IsInstance(__pyx_v_dtype, __pyx_t_1); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 1183, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_3) { /* … */ goto __pyx_L3; }
+1184: col.setup.source = col_source_t.col_source_u16_arrow
__pyx_v_col->setup->source = __pyx_e_7questdb_7ingress_col_source_u16_arrow;
+1185: _dataframe_series_as_arrow(pandas_col, col)
__pyx_t_4 = __pyx_f_7questdb_7ingress__dataframe_series_as_arrow(__pyx_v_pandas_col, __pyx_v_col); if (unlikely(__pyx_t_4 == ((__pyx_t_7questdb_7ingress_void_int)-1))) __PYX_ERR(1, 1185, __pyx_L1_error)
+1186: elif isinstance(dtype, _PANDAS.Int16Dtype):
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_7questdb_7ingress__PANDAS, __pyx_mstate_global->__pyx_n_u_Int16Dtype); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1186, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyObject_IsInstance(__pyx_v_dtype, __pyx_t_1); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 1186, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_3) { /* … */ goto __pyx_L3; }
+1187: col.setup.source = col_source_t.col_source_i16_arrow
__pyx_v_col->setup->source = __pyx_e_7questdb_7ingress_col_source_i16_arrow;
+1188: _dataframe_series_as_arrow(pandas_col, col)
__pyx_t_4 = __pyx_f_7questdb_7ingress__dataframe_series_as_arrow(__pyx_v_pandas_col, __pyx_v_col); if (unlikely(__pyx_t_4 == ((__pyx_t_7questdb_7ingress_void_int)-1))) __PYX_ERR(1, 1188, __pyx_L1_error)
+1189: elif isinstance(dtype, _PANDAS.UInt32Dtype):
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_7questdb_7ingress__PANDAS, __pyx_mstate_global->__pyx_n_u_UInt32Dtype); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1189, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyObject_IsInstance(__pyx_v_dtype, __pyx_t_1); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 1189, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_3) { /* … */ goto __pyx_L3; }
+1190: col.setup.source = col_source_t.col_source_u32_arrow
__pyx_v_col->setup->source = __pyx_e_7questdb_7ingress_col_source_u32_arrow;
+1191: _dataframe_series_as_arrow(pandas_col, col)
__pyx_t_4 = __pyx_f_7questdb_7ingress__dataframe_series_as_arrow(__pyx_v_pandas_col, __pyx_v_col); if (unlikely(__pyx_t_4 == ((__pyx_t_7questdb_7ingress_void_int)-1))) __PYX_ERR(1, 1191, __pyx_L1_error)
+1192: elif isinstance(dtype, _PANDAS.Int32Dtype):
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_7questdb_7ingress__PANDAS, __pyx_mstate_global->__pyx_n_u_Int32Dtype); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1192, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyObject_IsInstance(__pyx_v_dtype, __pyx_t_1); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 1192, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_3) { /* … */ goto __pyx_L3; }
+1193: col.setup.source = col_source_t.col_source_i32_arrow
__pyx_v_col->setup->source = __pyx_e_7questdb_7ingress_col_source_i32_arrow;
+1194: _dataframe_series_as_arrow(pandas_col, col)
__pyx_t_4 = __pyx_f_7questdb_7ingress__dataframe_series_as_arrow(__pyx_v_pandas_col, __pyx_v_col); if (unlikely(__pyx_t_4 == ((__pyx_t_7questdb_7ingress_void_int)-1))) __PYX_ERR(1, 1194, __pyx_L1_error)
+1195: elif isinstance(dtype, _PANDAS.UInt64Dtype):
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_7questdb_7ingress__PANDAS, __pyx_mstate_global->__pyx_n_u_UInt64Dtype); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1195, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyObject_IsInstance(__pyx_v_dtype, __pyx_t_1); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 1195, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_3) { /* … */ goto __pyx_L3; }
+1196: col.setup.source = col_source_t.col_source_u64_arrow
__pyx_v_col->setup->source = __pyx_e_7questdb_7ingress_col_source_u64_arrow;
+1197: _dataframe_series_as_arrow(pandas_col, col)
__pyx_t_4 = __pyx_f_7questdb_7ingress__dataframe_series_as_arrow(__pyx_v_pandas_col, __pyx_v_col); if (unlikely(__pyx_t_4 == ((__pyx_t_7questdb_7ingress_void_int)-1))) __PYX_ERR(1, 1197, __pyx_L1_error)
+1198: elif isinstance(dtype, _PANDAS.Int64Dtype):
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_7questdb_7ingress__PANDAS, __pyx_mstate_global->__pyx_n_u_Int64Dtype); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1198, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyObject_IsInstance(__pyx_v_dtype, __pyx_t_1); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 1198, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_3) { /* … */ goto __pyx_L3; }
+1199: col.setup.source = col_source_t.col_source_i64_arrow
__pyx_v_col->setup->source = __pyx_e_7questdb_7ingress_col_source_i64_arrow;
+1200: _dataframe_series_as_arrow(pandas_col, col)
__pyx_t_4 = __pyx_f_7questdb_7ingress__dataframe_series_as_arrow(__pyx_v_pandas_col, __pyx_v_col); if (unlikely(__pyx_t_4 == ((__pyx_t_7questdb_7ingress_void_int)-1))) __PYX_ERR(1, 1200, __pyx_L1_error)
+1201: elif isinstance(dtype, _NUMPY_FLOAT32):
__pyx_t_1 = __pyx_v_7questdb_7ingress__NUMPY_FLOAT32; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = PyObject_IsInstance(__pyx_v_dtype, __pyx_t_1); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 1201, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_3) { /* … */ goto __pyx_L3; }
+1202: col.setup.source = col_source_t.col_source_f32_numpy
__pyx_v_col->setup->source = __pyx_e_7questdb_7ingress_col_source_f32_numpy;
+1203: _dataframe_series_as_pybuf(pandas_col, col)
__pyx_t_4 = __pyx_f_7questdb_7ingress__dataframe_series_as_pybuf(__pyx_v_pandas_col, __pyx_v_col, NULL); if (unlikely(__pyx_t_4 == ((__pyx_t_7questdb_7ingress_void_int)-1))) __PYX_ERR(1, 1203, __pyx_L1_error)
+1204: elif isinstance(dtype, _NUMPY_FLOAT64):
__pyx_t_1 = __pyx_v_7questdb_7ingress__NUMPY_FLOAT64; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = PyObject_IsInstance(__pyx_v_dtype, __pyx_t_1); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 1204, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_3) { /* … */ goto __pyx_L3; }
+1205: col.setup.source = col_source_t.col_source_f64_numpy
__pyx_v_col->setup->source = __pyx_e_7questdb_7ingress_col_source_f64_numpy;
+1206: _dataframe_series_as_pybuf(pandas_col, col)
__pyx_t_4 = __pyx_f_7questdb_7ingress__dataframe_series_as_pybuf(__pyx_v_pandas_col, __pyx_v_col, NULL); if (unlikely(__pyx_t_4 == ((__pyx_t_7questdb_7ingress_void_int)-1))) __PYX_ERR(1, 1206, __pyx_L1_error)
+1207: elif isinstance(dtype, _PANDAS.Float32Dtype):
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_7questdb_7ingress__PANDAS, __pyx_mstate_global->__pyx_n_u_Float32Dtype); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1207, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyObject_IsInstance(__pyx_v_dtype, __pyx_t_1); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 1207, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_3) { /* … */ goto __pyx_L3; }
+1208: col.setup.source = col_source_t.col_source_f32_arrow
__pyx_v_col->setup->source = __pyx_e_7questdb_7ingress_col_source_f32_arrow;
+1209: _dataframe_series_as_arrow(pandas_col, col)
__pyx_t_4 = __pyx_f_7questdb_7ingress__dataframe_series_as_arrow(__pyx_v_pandas_col, __pyx_v_col); if (unlikely(__pyx_t_4 == ((__pyx_t_7questdb_7ingress_void_int)-1))) __PYX_ERR(1, 1209, __pyx_L1_error)
+1210: elif isinstance(dtype, _PANDAS.Float64Dtype):
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_7questdb_7ingress__PANDAS, __pyx_mstate_global->__pyx_n_u_Float64Dtype); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1210, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyObject_IsInstance(__pyx_v_dtype, __pyx_t_1); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 1210, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_3) { /* … */ goto __pyx_L3; }
+1211: col.setup.source = col_source_t.col_source_f64_arrow
__pyx_v_col->setup->source = __pyx_e_7questdb_7ingress_col_source_f64_arrow;
+1212: _dataframe_series_as_arrow(pandas_col, col)
__pyx_t_4 = __pyx_f_7questdb_7ingress__dataframe_series_as_arrow(__pyx_v_pandas_col, __pyx_v_col); if (unlikely(__pyx_t_4 == ((__pyx_t_7questdb_7ingress_void_int)-1))) __PYX_ERR(1, 1212, __pyx_L1_error)
+1213: elif isinstance(dtype, _PANDAS.StringDtype):
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_7questdb_7ingress__PANDAS, __pyx_mstate_global->__pyx_n_u_StringDtype); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1213, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyObject_IsInstance(__pyx_v_dtype, __pyx_t_1); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 1213, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_3) { /* … */ goto __pyx_L3; }
+1214: if dtype.storage == 'pyarrow':
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_dtype, __pyx_mstate_global->__pyx_n_u_storage); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1214, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_pyarrow, Py_EQ)); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(1, 1214, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_3) { /* … */ goto __pyx_L4; }
+1215: _dataframe_series_as_arrow(pandas_col, col)
__pyx_t_4 = __pyx_f_7questdb_7ingress__dataframe_series_as_arrow(__pyx_v_pandas_col, __pyx_v_col); if (unlikely(__pyx_t_4 == ((__pyx_t_7questdb_7ingress_void_int)-1))) __PYX_ERR(1, 1215, __pyx_L1_error)
+1216: if strncmp(col.setup.arrow_schema.format, _ARROW_FMT_UTF8_STRING, 1) == 0:
__pyx_t_3 = (strncmp(__pyx_v_col->setup->arrow_schema.format, __pyx_v_7questdb_7ingress__ARROW_FMT_UTF8_STRING, 1) == 0);
if (__pyx_t_3) {
/* … */
goto __pyx_L5;
}
+1217: col.setup.source = col_source_t.col_source_str_utf8_arrow
__pyx_v_col->setup->source = __pyx_e_7questdb_7ingress_col_source_str_utf8_arrow;
+1218: elif strncmp(col.setup.arrow_schema.format, _ARROW_FMT_LRG_UTF8_STRING, 1) == 0:
__pyx_t_3 = (strncmp(__pyx_v_col->setup->arrow_schema.format, __pyx_v_7questdb_7ingress__ARROW_FMT_LRG_UTF8_STRING, 1) == 0);
if (likely(__pyx_t_3)) {
/* … */
goto __pyx_L5;
}
+1219: col.setup.source = col_source_t.col_source_str_lrg_utf8_arrow
__pyx_v_col->setup->source = __pyx_e_7questdb_7ingress_col_source_str_lrg_utf8_arrow;
1220: else:
+1221: raise IngressError(
/*else*/ {
__pyx_t_5 = NULL;
__Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_IngressError); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1221, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_6);
+1222: IngressErrorCode.BadDataFrame,
__Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_IngressErrorCode); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1222, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_BadDataFrame); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1222, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+1223: f'Unknown string dtype storage: {dtype.storage} ' +
__pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_dtype, __pyx_mstate_global->__pyx_n_u_storage); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1223, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_9 = __Pyx_PyObject_FormatSimple(__pyx_t_7, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 1223, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* … */ __pyx_t_12 = __Pyx_PyUnicode_Join(__pyx_t_11, 7, 30 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_9) + 12 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_7) + 10 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_10) + 20, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_7) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_10)); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 1223, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+1224: f'for column {pandas_col.name} of dtype {dtype}. ' +
__pyx_t_7 = __Pyx_PyUnicode_Unicode(__pyx_v_pandas_col->name); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1224, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_10 = __Pyx_PyObject_FormatSimple(__pyx_v_dtype, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 1224, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __pyx_t_11[0] = __pyx_mstate_global->__pyx_kp_u_Unknown_string_dtype_storage; __pyx_t_11[1] = __pyx_t_9; __pyx_t_11[2] = __pyx_mstate_global->__pyx_kp_u_for_column; __pyx_t_11[3] = __pyx_t_7; __pyx_t_11[4] = __pyx_mstate_global->__pyx_kp_u_of_dtype; __pyx_t_11[5] = __pyx_t_10; __pyx_t_11[6] = __pyx_mstate_global->__pyx_kp_u_Format_specifier;
+1225: f'Format specifier: ' + repr(bytes(col.setup.arrow_schema.format).decode('latin-1')))
__pyx_t_7 = NULL;
__pyx_t_9 = __Pyx_PyBytes_FromString(__pyx_v_col->setup->arrow_schema.format); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 1225, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_9);
__pyx_t_13 = 1;
{
PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_9};
__pyx_t_10 = __Pyx_PyObject_FastCall((PyObject*)(&PyBytes_Type), __pyx_callargs+__pyx_t_13, (2-__pyx_t_13) | (__pyx_t_13*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
__Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 1225, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_10);
}
__pyx_t_9 = __Pyx_decode_bytes(__pyx_t_10, 0, PY_SSIZE_T_MAX, NULL, NULL, PyUnicode_DecodeLatin1); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 1225, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_9);
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
__pyx_t_10 = PyObject_Repr(__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 1225, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_10);
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
__pyx_t_9 = __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_OwnStrongReferenceInPlaceSafe(__pyx_t_12, __pyx_t_10); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 1225, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_9);
__Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
__pyx_t_13 = 1;
#if CYTHON_UNPACK_METHODS
if (unlikely(PyMethod_Check(__pyx_t_6))) {
__pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
assert(__pyx_t_5);
PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6);
__Pyx_INCREF(__pyx_t_5);
__Pyx_INCREF(__pyx__function);
__Pyx_DECREF_SET(__pyx_t_6, __pyx__function);
__pyx_t_13 = 0;
}
#endif
{
PyObject *__pyx_callargs[3] = {__pyx_t_5, __pyx_t_8, __pyx_t_9};
__pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_13, (3-__pyx_t_13) | (__pyx_t_13*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
__Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1221, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
}
__Pyx_Raise(__pyx_t_1, 0, 0, 0);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__PYX_ERR(1, 1221, __pyx_L1_error)
}
__pyx_L5:;
+1226: elif dtype.storage == 'python':
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_dtype, __pyx_mstate_global->__pyx_n_u_storage); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1226, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_python, Py_EQ)); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(1, 1226, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (likely(__pyx_t_3)) { /* … */ goto __pyx_L4; }
+1227: col.setup.source = col_source_t.col_source_str_pyobj
__pyx_v_col->setup->source = __pyx_e_7questdb_7ingress_col_source_str_pyobj;
+1228: _dataframe_series_as_pybuf(pandas_col, col)
__pyx_t_4 = __pyx_f_7questdb_7ingress__dataframe_series_as_pybuf(__pyx_v_pandas_col, __pyx_v_col, NULL); if (unlikely(__pyx_t_4 == ((__pyx_t_7questdb_7ingress_void_int)-1))) __PYX_ERR(1, 1228, __pyx_L1_error)
1229: else:
+1230: raise IngressError(
/*else*/ {
__pyx_t_6 = NULL;
__Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_IngressError); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 1230, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_9);
+1231: IngressErrorCode.BadDataFrame,
__Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_IngressErrorCode); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1231, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_BadDataFrame); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1231, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+1232: f'Unknown string dtype storage: f{dtype.storage} ' +
__pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_dtype, __pyx_mstate_global->__pyx_n_u_storage); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1232, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_10 = __Pyx_PyObject_FormatSimple(__pyx_t_8, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 1232, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; /* … */ __pyx_t_7 = __Pyx_PyUnicode_Join(__pyx_t_11, 7, 31 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_10) + 12 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_8) + 10 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_12) + 1, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_10) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_8) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_12)); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1232, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_13 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_9))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_9); assert(__pyx_t_6); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_9); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_9, __pyx__function); __pyx_t_13 = 0; } #endif { PyObject *__pyx_callargs[3] = {__pyx_t_6, __pyx_t_5, __pyx_t_7}; __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_9, __pyx_callargs+__pyx_t_13, (3-__pyx_t_13) | (__pyx_t_13*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1230, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __PYX_ERR(1, 1230, __pyx_L1_error) } __pyx_L4:;
+1233: f'for column {pandas_col.name} of dtype {dtype}.')
__pyx_t_8 = __Pyx_PyUnicode_Unicode(__pyx_v_pandas_col->name); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1233, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_12 = __Pyx_PyObject_FormatSimple(__pyx_v_dtype, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 1233, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); __pyx_t_11[0] = __pyx_mstate_global->__pyx_kp_u_Unknown_string_dtype_storage_f; __pyx_t_11[1] = __pyx_t_10; __pyx_t_11[2] = __pyx_mstate_global->__pyx_kp_u_for_column; __pyx_t_11[3] = __pyx_t_8; __pyx_t_11[4] = __pyx_mstate_global->__pyx_kp_u_of_dtype; __pyx_t_11[5] = __pyx_t_12; __pyx_t_11[6] = __pyx_mstate_global->__pyx_kp_u_;
+1234: elif isinstance(dtype, _PANDAS.CategoricalDtype):
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_7questdb_7ingress__PANDAS, __pyx_mstate_global->__pyx_n_u_CategoricalDtype); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1234, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyObject_IsInstance(__pyx_v_dtype, __pyx_t_1); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 1234, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_3) { /* … */ goto __pyx_L3; }
+1235: _dataframe_category_series_as_arrow(pandas_col, col)
__pyx_t_4 = __pyx_f_7questdb_7ingress__dataframe_category_series_as_arrow(__pyx_v_pandas_col, __pyx_v_col); if (unlikely(__pyx_t_4 == ((__pyx_t_7questdb_7ingress_void_int)-1))) __PYX_ERR(1, 1235, __pyx_L1_error)
+1236: elif isinstance(dtype, _NUMPY_OBJECT):
__pyx_t_1 = __pyx_v_7questdb_7ingress__NUMPY_OBJECT; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = PyObject_IsInstance(__pyx_v_dtype, __pyx_t_1); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 1236, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_3) { /* … */ goto __pyx_L3; }
+1237: _dataframe_series_sniff_pyobj(pandas_col, col)
__pyx_t_4 = __pyx_f_7questdb_7ingress__dataframe_series_sniff_pyobj(__pyx_v_pandas_col, __pyx_v_col); if (unlikely(__pyx_t_4 == ((__pyx_t_7questdb_7ingress_void_int)-1))) __PYX_ERR(1, 1237, __pyx_L1_error)
+1238: elif isinstance(dtype, _PANDAS.ArrowDtype):
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_7questdb_7ingress__PANDAS, __pyx_mstate_global->__pyx_n_u_ArrowDtype); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1238, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyObject_IsInstance(__pyx_v_dtype, __pyx_t_1); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 1238, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (likely(__pyx_t_3)) { /* … */ goto __pyx_L3; }
+1239: _dataframe_series_resolve_arrow(pandas_col, dtype.pyarrow_dtype, col)
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_dtype, __pyx_mstate_global->__pyx_n_u_pyarrow_dtype); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1239, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = __pyx_f_7questdb_7ingress__dataframe_series_resolve_arrow(__pyx_v_pandas_col, __pyx_t_1, __pyx_v_col); if (unlikely(__pyx_t_4 == ((__pyx_t_7questdb_7ingress_void_int)-1))) __PYX_ERR(1, 1239, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
1240: else:
+1241: raise IngressError(
/*else*/ {
__pyx_t_9 = NULL;
__Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_IngressError); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1241, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_7);
+1242: IngressErrorCode.BadDataFrame,
__Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_IngressErrorCode); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1242, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_BadDataFrame); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1242, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+1243: f'Unsupported dtype {dtype} for column {pandas_col.name!r}. ' +
__pyx_t_5 = __Pyx_PyObject_FormatSimple(__pyx_v_dtype, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1243, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_12 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_v_pandas_col->name), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 1243, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); __pyx_t_14[0] = __pyx_mstate_global->__pyx_kp_u_Unsupported_dtype; __pyx_t_14[1] = __pyx_t_5; __pyx_t_14[2] = __pyx_mstate_global->__pyx_kp_u_for_column; __pyx_t_14[3] = __pyx_t_12; __pyx_t_14[4] = __pyx_mstate_global->__pyx_kp_u_Raise_an_issue_if_you_think_it; __pyx_t_8 = __Pyx_PyUnicode_Join(__pyx_t_14, 5, 18 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5) + 12 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_12) + 106, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_12)); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1243, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_13 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_7))) { __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_7); assert(__pyx_t_9); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7); __Pyx_INCREF(__pyx_t_9); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_7, __pyx__function); __pyx_t_13 = 0; } #endif { PyObject *__pyx_callargs[3] = {__pyx_t_9, __pyx_t_6, __pyx_t_8}; __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_13, (3-__pyx_t_13) | (__pyx_t_13*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1241, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __PYX_ERR(1, 1241, __pyx_L1_error) } __pyx_L3:;
1244: 'Raise an issue if you think it should be supported: ' +
1245: 'https://github.com/questdb/py-questdb-client/issues.')
1246:
+1247: cdef void_int _dataframe_resolve_target(
static __pyx_t_7questdb_7ingress_void_int __pyx_f_7questdb_7ingress__dataframe_resolve_target(struct __pyx_obj_7questdb_7ingress_PandasCol *__pyx_v_pandas_col, struct __pyx_t_7questdb_7ingress_col_t *__pyx_v_col) {
enum __pyx_t_7questdb_7ingress_col_target_t __pyx_v_target;
PyObject *__pyx_v_target_sources = 0;
__pyx_t_7questdb_7ingress_void_int __pyx_r;
/* … */
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
__Pyx_XDECREF(__pyx_t_4);
__Pyx_XDECREF(__pyx_t_6);
__Pyx_XDECREF(__pyx_t_7);
__Pyx_XDECREF(__pyx_t_8);
__Pyx_XDECREF(__pyx_t_9);
__Pyx_XDECREF(__pyx_t_10);
__Pyx_XDECREF(__pyx_t_12);
__Pyx_AddTraceback("questdb.ingress._dataframe_resolve_target", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = -1;
__pyx_L0:;
__Pyx_XDECREF(__pyx_v_target_sources);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
1248: PandasCol pandas_col, col_t* col) except -1:
1249: cdef col_target_t target
1250: cdef set target_sources
+1251: if col.setup.meta_target in _DIRECT_META_TARGETS:
__pyx_t_1 = __Pyx_PyLong_From_enum____pyx_t_7questdb_7ingress_meta_target_t(__pyx_v_col->setup->meta_target); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1251, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (unlikely(__pyx_v_7questdb_7ingress__DIRECT_META_TARGETS == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); __PYX_ERR(1, 1251, __pyx_L1_error) } __pyx_t_2 = (__Pyx_PySet_ContainsTF(__pyx_t_1, __pyx_v_7questdb_7ingress__DIRECT_META_TARGETS, Py_EQ)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(1, 1251, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_2) { /* … */ }
+1252: col.setup.target = <col_target_t><int>col.setup.meta_target
__pyx_v_col->setup->target = ((enum __pyx_t_7questdb_7ingress_col_target_t)((int)__pyx_v_col->setup->meta_target));
+1253: return 0
__pyx_r = 0;
goto __pyx_L0;
+1254: for target in _FIELD_TARGETS:
if (unlikely(__pyx_v_7questdb_7ingress__FIELD_TARGETS == Py_None)) {
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
__PYX_ERR(1, 1254, __pyx_L1_error)
}
__pyx_t_1 = __pyx_v_7questdb_7ingress__FIELD_TARGETS; __Pyx_INCREF(__pyx_t_1);
__pyx_t_3 = 0;
for (;;) {
{
Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1);
#if !CYTHON_ASSUME_SAFE_SIZE
if (unlikely((__pyx_temp < 0))) __PYX_ERR(1, 1254, __pyx_L1_error)
#endif
if (__pyx_t_3 >= __pyx_temp) break;
}
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
__pyx_t_4 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_3));
#else
__pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_3);
#endif
++__pyx_t_3;
if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1254, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__pyx_t_5 = ((enum __pyx_t_7questdb_7ingress_col_target_t)__Pyx_PyLong_As_enum____pyx_t_7questdb_7ingress_col_target_t(__pyx_t_4)); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1254, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__pyx_v_target = __pyx_t_5;
/* … */
}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+1255: target_sources = _TARGET_TO_SOURCES[target]
if (unlikely(__pyx_v_7questdb_7ingress__TARGET_TO_SOURCES == Py_None)) {
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
__PYX_ERR(1, 1255, __pyx_L1_error)
}
__pyx_t_4 = __Pyx_PyLong_From_enum____pyx_t_7questdb_7ingress_col_target_t(__pyx_v_target); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1255, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__pyx_t_6 = __Pyx_PyDict_GetItem(__pyx_v_7questdb_7ingress__TARGET_TO_SOURCES, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1255, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_6);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
if (!(likely(PySet_CheckExact(__pyx_t_6))||((__pyx_t_6) == Py_None) || __Pyx_RaiseUnexpectedTypeError("set", __pyx_t_6))) __PYX_ERR(1, 1255, __pyx_L1_error)
__Pyx_XDECREF_SET(__pyx_v_target_sources, ((PyObject*)__pyx_t_6));
__pyx_t_6 = 0;
+1256: if col.setup.source in target_sources:
__pyx_t_6 = __Pyx_PyLong_From_enum____pyx_t_7questdb_7ingress_col_source_t(__pyx_v_col->setup->source); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1256, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (unlikely(__pyx_v_target_sources == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); __PYX_ERR(1, 1256, __pyx_L1_error) } __pyx_t_2 = (__Pyx_PySet_ContainsTF(__pyx_t_6, __pyx_v_target_sources, Py_EQ)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(1, 1256, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (__pyx_t_2) { /* … */ }
+1257: col.setup.target = target
__pyx_v_col->setup->target = __pyx_v_target;
+1258: return 0
__pyx_r = 0;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
goto __pyx_L0;
+1259: raise IngressError(
__pyx_t_6 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_IngressError); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1259, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4);
+1260: IngressErrorCode.BadDataFrame,
__Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_IngressErrorCode); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1260, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_BadDataFrame); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1260, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+1261: f'Could not map column source type (code {col.setup.source} for ' +
__pyx_t_7 = __Pyx_PyUnicode_From_enum____pyx_t_7questdb_7ingress_col_source_t(__pyx_v_col->setup->source, 0, ' ', 'd'); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1261, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); /* … */ __pyx_t_12 = __Pyx_PyUnicode_Join(__pyx_t_11, 7, 39 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_7) + 12 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_9) + 3 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_10) + 18, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_7) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_10)); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 1261, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_13 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4); assert(__pyx_t_6); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); __pyx_t_13 = 0; } #endif { PyObject *__pyx_callargs[3] = {__pyx_t_6, __pyx_t_8, __pyx_t_12}; __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_13, (3-__pyx_t_13) | (__pyx_t_13*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1259, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __PYX_ERR(1, 1259, __pyx_L1_error)
+1262: f'column {pandas_col.name!r} ' +
__pyx_t_9 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_v_pandas_col->name), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 1262, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9);
+1263: f' ({pandas_col.dtype}) to any ILP type.')
__pyx_t_10 = __Pyx_PyObject_FormatSimple(__pyx_v_pandas_col->dtype, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 1263, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __pyx_t_11[0] = __pyx_mstate_global->__pyx_kp_u_Could_not_map_column_source_type; __pyx_t_11[1] = __pyx_t_7; __pyx_t_11[2] = __pyx_mstate_global->__pyx_kp_u_for_column; __pyx_t_11[3] = __pyx_t_9; __pyx_t_11[4] = __pyx_mstate_global->__pyx_kp_u__8; __pyx_t_11[5] = __pyx_t_10; __pyx_t_11[6] = __pyx_mstate_global->__pyx_kp_u_to_any_ILP_type;
1264:
1265:
+1266: cdef void _dataframe_init_cursor(col_t* col) noexcept nogil:
static void __pyx_f_7questdb_7ingress__dataframe_init_cursor(struct __pyx_t_7questdb_7ingress_col_t *__pyx_v_col) {
/* … */
/* function exit code */
}
+1267: col.cursor.chunk = col.setup.chunks.chunks
__pyx_t_1 = __pyx_v_col->setup->chunks.chunks; __pyx_v_col->cursor.chunk = __pyx_t_1;
+1268: col.cursor.chunk_index = 0
__pyx_v_col->cursor.chunk_index = 0;
+1269: col.cursor.offset = col.cursor.chunk.offset
__pyx_t_2 = __pyx_v_col->cursor.chunk->offset; __pyx_v_col->cursor.offset = __pyx_t_2;
1270:
1271:
+1272: cdef void_int _dataframe_resolve_cols(
static __pyx_t_7questdb_7ingress_void_int __pyx_f_7questdb_7ingress__dataframe_resolve_cols(CYTHON_UNUSED struct qdb_pystr_buf *__pyx_v_b, PyObject *__pyx_v_pandas_cols, struct __pyx_t_7questdb_7ingress_col_t_arr *__pyx_v_cols, int *__pyx_v_any_cols_need_gil_out) {
size_t __pyx_v_index;
size_t __pyx_v_len_dataframe_cols;
struct __pyx_obj_7questdb_7ingress_PandasCol *__pyx_v_pandas_col = 0;
struct __pyx_t_7questdb_7ingress_col_t *__pyx_v_col;
__pyx_t_7questdb_7ingress_void_int __pyx_r;
/* … */
/* function exit code */
__pyx_r = 0;
goto __pyx_L0;
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_5);
__Pyx_AddTraceback("questdb.ingress._dataframe_resolve_cols", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = -1;
__pyx_L0:;
__Pyx_XDECREF((PyObject *)__pyx_v_pandas_col);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
1273: qdb_pystr_buf* b,
1274: list pandas_cols,
1275: col_t_arr* cols,
1276: bint* any_cols_need_gil_out) except -1:
1277: cdef size_t index
+1278: cdef size_t len_dataframe_cols = len(pandas_cols)
if (unlikely(__pyx_v_pandas_cols == Py_None)) {
PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
__PYX_ERR(1, 1278, __pyx_L1_error)
}
__pyx_t_1 = __Pyx_PyList_GET_SIZE(__pyx_v_pandas_cols); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(1, 1278, __pyx_L1_error)
__pyx_v_len_dataframe_cols = __pyx_t_1;
1279: cdef PandasCol pandas_col
1280: cdef col_t* col
+1281: any_cols_need_gil_out[0] = False
(__pyx_v_any_cols_need_gil_out[0]) = 0;
+1282: for index in range(len_dataframe_cols):
__pyx_t_2 = __pyx_v_len_dataframe_cols;
__pyx_t_3 = __pyx_t_2;
for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
__pyx_v_index = __pyx_t_4;
+1283: pandas_col = pandas_cols[index]
if (unlikely(__pyx_v_pandas_cols == Py_None)) {
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
__PYX_ERR(1, 1283, __pyx_L1_error)
}
__pyx_t_5 = __Pyx_GetItemInt_List(__pyx_v_pandas_cols, __pyx_v_index, size_t, 0, __Pyx_PyLong_FromSize_t, 1, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1283, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_mstate_global->__pyx_ptype_7questdb_7ingress_PandasCol))))) __PYX_ERR(1, 1283, __pyx_L1_error)
__Pyx_XDECREF_SET(__pyx_v_pandas_col, ((struct __pyx_obj_7questdb_7ingress_PandasCol *)__pyx_t_5));
__pyx_t_5 = 0;
+1284: col = &cols.d[index]
__pyx_v_col = (&(__pyx_v_cols->d[__pyx_v_index]));
1285:
1286: # The target is resolved in stages:
1287: # * We first assign all column `.meta_target`s to be fields.
1288: # * Then, depending on argument parsing some/none of the columns
1289: # obtain a meta-target of "table", "symbol" or "at".
1290: # * Finally, based on the source, any remaining "meta_target_field"
1291: # columns are converted to the appropriate target.
1292: # See: _dataframe_resolve_col_targets_and_dc(..).
+1293: col.setup.meta_target = meta_target_t.meta_target_field
__pyx_v_col->setup->meta_target = __pyx_e_7questdb_7ingress_meta_target_field;
1294:
1295: # We will sort columns later. The index will be used to achieve a stable
1296: # sort among columns with the same `.meta_target`.
+1297: col.setup.orig_index = index
__pyx_v_col->setup->orig_index = __pyx_v_index;
1298:
+1299: _dataframe_resolve_source_and_buffers(pandas_col, col)
__pyx_t_6 = __pyx_f_7questdb_7ingress__dataframe_resolve_source_and_buffers(__pyx_v_pandas_col, __pyx_v_col); if (unlikely(__pyx_t_6 == ((__pyx_t_7questdb_7ingress_void_int)-1))) __PYX_ERR(1, 1299, __pyx_L1_error)
+1300: _dataframe_init_cursor(col)
__pyx_f_7questdb_7ingress__dataframe_init_cursor(__pyx_v_col);
+1301: if col_source_needs_gil(col.setup.source):
__pyx_t_7 = __pyx_f_7questdb_7ingress_col_source_needs_gil(__pyx_v_col->setup->source);
if (__pyx_t_7) {
/* … */
}
}
+1302: any_cols_need_gil_out[0] = True
(__pyx_v_any_cols_need_gil_out[0]) = 1;
1303:
1304:
+1305: cdef void_int _dataframe_resolve_cols_target_name_and_dc(
static __pyx_t_7questdb_7ingress_void_int __pyx_f_7questdb_7ingress__dataframe_resolve_cols_target_name_and_dc(struct qdb_pystr_buf *__pyx_v_b, PyObject *__pyx_v_pandas_cols, struct __pyx_t_7questdb_7ingress_col_t_arr *__pyx_v_cols) {
size_t __pyx_v_index;
struct __pyx_t_7questdb_7ingress_col_t *__pyx_v_col;
struct __pyx_obj_7questdb_7ingress_PandasCol *__pyx_v_pandas_col = 0;
__pyx_t_7questdb_7ingress_void_int __pyx_r;
/* … */
/* function exit code */
__pyx_r = 0;
goto __pyx_L0;
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_4);
__Pyx_XDECREF(__pyx_t_6);
__Pyx_XDECREF(__pyx_t_7);
__Pyx_XDECREF(__pyx_t_9);
__Pyx_XDECREF(__pyx_t_10);
__Pyx_XDECREF(__pyx_t_11);
__Pyx_AddTraceback("questdb.ingress._dataframe_resolve_cols_target_name_and_dc", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = -1;
__pyx_L0:;
__Pyx_XDECREF((PyObject *)__pyx_v_pandas_col);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
1306: qdb_pystr_buf* b,
1307: list pandas_cols,
1308: col_t_arr* cols) except -1:
1309: cdef size_t index
1310: cdef col_t* col
1311: cdef PandasCol pandas_col
+1312: for index in range(cols.size):
__pyx_t_1 = __pyx_v_cols->size;
__pyx_t_2 = __pyx_t_1;
for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
__pyx_v_index = __pyx_t_3;
+1313: col = &cols.d[index]
__pyx_v_col = (&(__pyx_v_cols->d[__pyx_v_index]));
+1314: pandas_col = pandas_cols[index]
if (unlikely(__pyx_v_pandas_cols == Py_None)) {
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
__PYX_ERR(1, 1314, __pyx_L1_error)
}
__pyx_t_4 = __Pyx_GetItemInt_List(__pyx_v_pandas_cols, __pyx_v_index, size_t, 0, __Pyx_PyLong_FromSize_t, 1, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1314, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_mstate_global->__pyx_ptype_7questdb_7ingress_PandasCol))))) __PYX_ERR(1, 1314, __pyx_L1_error)
__Pyx_XDECREF_SET(__pyx_v_pandas_col, ((struct __pyx_obj_7questdb_7ingress_PandasCol *)__pyx_t_4));
__pyx_t_4 = 0;
+1315: _dataframe_resolve_target(pandas_col, col)
__pyx_t_5 = __pyx_f_7questdb_7ingress__dataframe_resolve_target(__pyx_v_pandas_col, __pyx_v_col); if (unlikely(__pyx_t_5 == ((__pyx_t_7questdb_7ingress_void_int)-1))) __PYX_ERR(1, 1315, __pyx_L1_error)
+1316: if col.setup.source not in _TARGET_TO_SOURCES[col.setup.target]:
__pyx_t_4 = __Pyx_PyLong_From_enum____pyx_t_7questdb_7ingress_col_source_t(__pyx_v_col->setup->source); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1316, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (unlikely(__pyx_v_7questdb_7ingress__TARGET_TO_SOURCES == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(1, 1316, __pyx_L1_error) } __pyx_t_6 = __Pyx_PyLong_From_enum____pyx_t_7questdb_7ingress_col_target_t(__pyx_v_col->setup->target); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1316, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = __Pyx_PyDict_GetItem(__pyx_v_7questdb_7ingress__TARGET_TO_SOURCES, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1316, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_8 = (__Pyx_PySequence_ContainsTF(__pyx_t_4, __pyx_t_7, Py_NE)); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(1, 1316, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (unlikely(__pyx_t_8)) { /* … */ }
+1317: raise ValueError(
__pyx_t_4 = NULL;
+1318: f'Bad value: Column {pandas_col.name!r} ' +
__pyx_t_6 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_v_pandas_col->name), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1318, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); /* … */ __pyx_t_11 = __Pyx_PyUnicode_Join(__pyx_t_12, 7, 18 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6) + 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_9) + 24 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_10) + 8, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_10)); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 1318, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_13 = 1; { PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_11}; __pyx_t_7 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_13, (2-__pyx_t_13) | (__pyx_t_13*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1317, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); } __Pyx_Raise(__pyx_t_7, 0, 0, 0); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __PYX_ERR(1, 1317, __pyx_L1_error)
+1319: f'({pandas_col.dtype}) is not ' +
__pyx_t_9 = __Pyx_PyObject_FormatSimple(__pyx_v_pandas_col->dtype, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 1319, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9);
+1320: f'supported as a {_TARGET_NAMES[col.setup.target]} column.')
if (unlikely(__pyx_v_7questdb_7ingress__TARGET_NAMES == Py_None)) {
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
__PYX_ERR(1, 1320, __pyx_L1_error)
}
__pyx_t_10 = __Pyx_PyLong_From_enum____pyx_t_7questdb_7ingress_col_target_t(__pyx_v_col->setup->target); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 1320, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_10);
__pyx_t_11 = __Pyx_PyDict_GetItem(__pyx_v_7questdb_7ingress__TARGET_NAMES, __pyx_t_10); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 1320, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_11);
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
__pyx_t_10 = __Pyx_PyObject_FormatSimple(__pyx_t_11, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 1320, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_10);
__Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
__pyx_t_12[0] = __pyx_mstate_global->__pyx_kp_u_Bad_value_Column;
__pyx_t_12[1] = __pyx_t_6;
__pyx_t_12[2] = __pyx_mstate_global->__pyx_kp_u__6;
__pyx_t_12[3] = __pyx_t_9;
__pyx_t_12[4] = __pyx_mstate_global->__pyx_kp_u_is_not_supported_as_a;
__pyx_t_12[5] = __pyx_t_10;
__pyx_t_12[6] = __pyx_mstate_global->__pyx_kp_u_column;
+1321: col.dispatch_code = <col_dispatch_code_t>(
__pyx_v_col->dispatch_code = ((enum __pyx_t_7questdb_7ingress_col_dispatch_code_t)(((int)__pyx_v_col->setup->source) + ((int)__pyx_v_col->setup->target)));
1322: <int>col.setup.source + <int>col.setup.target)
1323:
1324: # Since we don't need to send the column names for 'table' and
1325: # 'at' columns, we don't need to validate and encode them as
1326: # column names. This allows unsupported names for these columns.
+1327: if ((col.setup.meta_target != meta_target_t.meta_target_table) and
switch (__pyx_v_col->setup->meta_target) {
case __pyx_e_7questdb_7ingress_meta_target_table:
case __pyx_e_7questdb_7ingress_meta_target_at:
/* … */
__pyx_t_8 = 0;
/* … */
break;
default:
__pyx_t_8 = 1;
break;
}
if (__pyx_t_8) {
/* … */
}
}
1328: (col.setup.meta_target != meta_target_t.meta_target_at)):
+1329: str_to_column_name_copy(b, pandas_col.name, &col.name)
__pyx_t_7 = __pyx_v_pandas_col->name;
__Pyx_INCREF(__pyx_t_7);
__pyx_t_5 = __pyx_f_7questdb_7ingress_str_to_column_name_copy(__pyx_v_b, ((PyObject*)__pyx_t_7), (&__pyx_v_col->name)); if (unlikely(__pyx_t_5 == ((__pyx_t_7questdb_7ingress_void_int)-1))) __PYX_ERR(1, 1329, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
1330:
1331:
+1332: cdef int _dataframe_compare_cols(const void* lhs, const void* rhs) noexcept nogil:
static int __pyx_f_7questdb_7ingress__dataframe_compare_cols(void const *__pyx_v_lhs, void const *__pyx_v_rhs) {
struct __pyx_t_7questdb_7ingress_col_t *__pyx_v_lhs_col;
struct __pyx_t_7questdb_7ingress_col_t *__pyx_v_rhs_col;
int __pyx_v_source_diff;
int __pyx_r;
/* … */
/* function exit code */
__pyx_L0:;
return __pyx_r;
}
+1333: cdef col_t* lhs_col = <col_t*>lhs
__pyx_v_lhs_col = ((struct __pyx_t_7questdb_7ingress_col_t *)__pyx_v_lhs);
+1334: cdef col_t* rhs_col = <col_t*>rhs
__pyx_v_rhs_col = ((struct __pyx_t_7questdb_7ingress_col_t *)__pyx_v_rhs);
+1335: cdef int source_diff = lhs_col.setup.meta_target - rhs_col.setup.meta_target
__pyx_v_source_diff = (__pyx_v_lhs_col->setup->meta_target - __pyx_v_rhs_col->setup->meta_target);
+1336: if source_diff != 0:
__pyx_t_1 = (__pyx_v_source_diff != 0);
if (__pyx_t_1) {
/* … */
}
+1337: return source_diff
__pyx_r = __pyx_v_source_diff;
goto __pyx_L0;
+1338: return <int>lhs_col.setup.orig_index - <int>rhs_col.setup.orig_index
__pyx_r = (((int)__pyx_v_lhs_col->setup->orig_index) - ((int)__pyx_v_rhs_col->setup->orig_index)); goto __pyx_L0;
1339:
1340: # noinspection PyUnreachableCode
+1341: cdef void_int _dataframe_resolve_args(
static __pyx_t_7questdb_7ingress_void_int __pyx_f_7questdb_7ingress__dataframe_resolve_args(PyObject *__pyx_v_df, PyObject *__pyx_v_table_name, PyObject *__pyx_v_table_name_col, PyObject *__pyx_v_symbols, PyObject *__pyx_v_at, struct qdb_pystr_buf *__pyx_v_b, size_t __pyx_v_col_count, struct line_sender_table_name *__pyx_v_c_table_name_out, int64_t *__pyx_v_at_value_out, struct __pyx_t_7questdb_7ingress_col_t_arr *__pyx_v_cols, int *__pyx_v_any_cols_need_gil_out) {
Py_ssize_t __pyx_v_name_col;
Py_ssize_t __pyx_v_at_col;
PyObject *__pyx_v_pandas_cols = 0;
PyObject *__pyx_7genexpr__pyx_v_index = NULL;
PyObject *__pyx_7genexpr__pyx_v_name = NULL;
PyObject *__pyx_7genexpr__pyx_v_series = NULL;
__pyx_t_7questdb_7ingress_void_int __pyx_r;
/* … */
/* function exit code */
__pyx_r = 0;
goto __pyx_L0;
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
__Pyx_XDECREF(__pyx_t_2);
__Pyx_XDECREF(__pyx_t_3);
__Pyx_XDECREF(__pyx_t_7);
__Pyx_XDECREF(__pyx_t_8);
__Pyx_XDECREF(__pyx_t_10);
__Pyx_XDECREF(__pyx_t_11);
__Pyx_AddTraceback("questdb.ingress._dataframe_resolve_args", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = -1;
__pyx_L0:;
__Pyx_XDECREF(__pyx_v_pandas_cols);
__Pyx_XDECREF(__pyx_7genexpr__pyx_v_index);
__Pyx_XDECREF(__pyx_7genexpr__pyx_v_name);
__Pyx_XDECREF(__pyx_7genexpr__pyx_v_series);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
1342: object df,
1343: object table_name,
1344: object table_name_col,
1345: object symbols,
1346: object at,
1347: qdb_pystr_buf* b,
1348: size_t col_count,
1349: line_sender_table_name* c_table_name_out,
1350: int64_t* at_value_out,
1351: col_t_arr* cols,
1352: bint* any_cols_need_gil_out) except -1:
1353: cdef ssize_t name_col
1354: cdef ssize_t at_col
1355:
+1356: cdef list pandas_cols = [
{ /* enter inner scope */
__pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1356, __pyx_L5_error)
__Pyx_GOTREF(__pyx_t_1);
__Pyx_INCREF(__pyx_mstate_global->__pyx_int_0);
__pyx_t_2 = __pyx_mstate_global->__pyx_int_0;
+1357: PandasCol(name, df.dtypes.iloc[index], series)
__pyx_t_7 = NULL;
__pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_df, __pyx_mstate_global->__pyx_n_u_dtypes); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 1357, __pyx_L5_error)
__Pyx_GOTREF(__pyx_t_10);
__pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_iloc); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 1357, __pyx_L5_error)
__Pyx_GOTREF(__pyx_t_11);
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
__pyx_t_10 = __Pyx_PyObject_GetItem(__pyx_t_11, __pyx_7genexpr__pyx_v_index); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 1357, __pyx_L5_error)
__Pyx_GOTREF(__pyx_t_10);
__Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
__pyx_t_12 = 1;
{
PyObject *__pyx_callargs[4] = {__pyx_t_7, __pyx_7genexpr__pyx_v_name, __pyx_t_10, __pyx_7genexpr__pyx_v_series};
__pyx_t_8 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_7questdb_7ingress_PandasCol, __pyx_callargs+__pyx_t_12, (4-__pyx_t_12) | (__pyx_t_12*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
__Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1357, __pyx_L5_error)
__Pyx_GOTREF((PyObject *)__pyx_t_8);
}
if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_8))) __PYX_ERR(1, 1356, __pyx_L5_error)
__Pyx_DECREF((PyObject *)__pyx_t_8); __pyx_t_8 = 0;
}
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_XDECREF(__pyx_7genexpr__pyx_v_index); __pyx_7genexpr__pyx_v_index = 0;
__Pyx_XDECREF(__pyx_7genexpr__pyx_v_name); __pyx_7genexpr__pyx_v_name = 0;
__Pyx_XDECREF(__pyx_7genexpr__pyx_v_series); __pyx_7genexpr__pyx_v_series = 0;
goto __pyx_L8_exit_scope;
__pyx_L5_error:;
__Pyx_XDECREF(__pyx_7genexpr__pyx_v_index); __pyx_7genexpr__pyx_v_index = 0;
__Pyx_XDECREF(__pyx_7genexpr__pyx_v_name); __pyx_7genexpr__pyx_v_name = 0;
__Pyx_XDECREF(__pyx_7genexpr__pyx_v_series); __pyx_7genexpr__pyx_v_series = 0;
goto __pyx_L1_error;
__pyx_L8_exit_scope:;
} /* exit inner scope */
__pyx_v_pandas_cols = ((PyObject*)__pyx_t_1);
__pyx_t_1 = 0;
+1358: for index, (name, series) in enumerate(df.items())]
__pyx_t_4 = 0;
if (unlikely(__pyx_v_df == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "items");
__PYX_ERR(1, 1358, __pyx_L5_error)
}
__pyx_t_7 = __Pyx_dict_iterator(__pyx_v_df, 0, __pyx_mstate_global->__pyx_n_u_items, (&__pyx_t_5), (&__pyx_t_6)); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1358, __pyx_L5_error)
__Pyx_GOTREF(__pyx_t_7);
__Pyx_XDECREF(__pyx_t_3);
__pyx_t_3 = __pyx_t_7;
__pyx_t_7 = 0;
while (1) {
__pyx_t_9 = __Pyx_dict_iter_next(__pyx_t_3, __pyx_t_5, &__pyx_t_4, &__pyx_t_7, &__pyx_t_8, NULL, __pyx_t_6);
if (unlikely(__pyx_t_9 == 0)) break;
if (unlikely(__pyx_t_9 == -1)) __PYX_ERR(1, 1358, __pyx_L5_error)
__Pyx_GOTREF(__pyx_t_7);
__Pyx_GOTREF(__pyx_t_8);
__Pyx_XDECREF_SET(__pyx_7genexpr__pyx_v_name, __pyx_t_7);
__pyx_t_7 = 0;
__Pyx_XDECREF_SET(__pyx_7genexpr__pyx_v_series, __pyx_t_8);
__pyx_t_8 = 0;
__Pyx_INCREF(__pyx_t_2);
__Pyx_XDECREF_SET(__pyx_7genexpr__pyx_v_index, __pyx_t_2);
__pyx_t_8 = __Pyx_PyLong_AddObjC(__pyx_t_2, __pyx_mstate_global->__pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1358, __pyx_L5_error)
__Pyx_GOTREF(__pyx_t_8);
__Pyx_DECREF(__pyx_t_2);
__pyx_t_2 = __pyx_t_8;
__pyx_t_8 = 0;
+1359: _dataframe_resolve_cols(b, pandas_cols, cols, any_cols_need_gil_out)
__pyx_t_13 = __pyx_f_7questdb_7ingress__dataframe_resolve_cols(__pyx_v_b, __pyx_v_pandas_cols, __pyx_v_cols, __pyx_v_any_cols_need_gil_out); if (unlikely(__pyx_t_13 == ((__pyx_t_7questdb_7ingress_void_int)-1))) __PYX_ERR(1, 1359, __pyx_L1_error)
+1360: name_col = _dataframe_resolve_table_name(
__pyx_t_14 = __pyx_f_7questdb_7ingress__dataframe_resolve_table_name(__pyx_v_b, __pyx_v_df, __pyx_v_pandas_cols, __pyx_v_cols, __pyx_v_table_name, __pyx_v_table_name_col, __pyx_v_col_count, __pyx_v_c_table_name_out); if (unlikely(__pyx_t_14 == ((Py_ssize_t)-2L))) __PYX_ERR(1, 1360, __pyx_L1_error)
__pyx_v_name_col = __pyx_t_14;
1361: b,
1362: df,
1363: pandas_cols,
1364: cols,
1365: table_name,
1366: table_name_col,
1367: col_count,
1368: c_table_name_out)
+1369: at_col = _dataframe_resolve_at(df, cols, at, col_count, at_value_out)
__pyx_t_14 = __pyx_f_7questdb_7ingress__dataframe_resolve_at(__pyx_v_df, __pyx_v_cols, __pyx_v_at, __pyx_v_col_count, __pyx_v_at_value_out); if (unlikely(__pyx_t_14 == ((Py_ssize_t)-2L))) __PYX_ERR(1, 1369, __pyx_L1_error)
__pyx_v_at_col = __pyx_t_14;
+1370: _dataframe_resolve_symbols(df, pandas_cols, cols, name_col, at_col, symbols)
__pyx_t_13 = __pyx_f_7questdb_7ingress__dataframe_resolve_symbols(__pyx_v_df, __pyx_v_pandas_cols, __pyx_v_cols, __pyx_v_name_col, __pyx_v_at_col, __pyx_v_symbols); if (unlikely(__pyx_t_13 == ((__pyx_t_7questdb_7ingress_void_int)-1))) __PYX_ERR(1, 1370, __pyx_L1_error)
+1371: _dataframe_resolve_cols_target_name_and_dc(b, pandas_cols, cols)
__pyx_t_13 = __pyx_f_7questdb_7ingress__dataframe_resolve_cols_target_name_and_dc(__pyx_v_b, __pyx_v_pandas_cols, __pyx_v_cols); if (unlikely(__pyx_t_13 == ((__pyx_t_7questdb_7ingress_void_int)-1))) __PYX_ERR(1, 1371, __pyx_L1_error)
+1372: qsort(cols.d, col_count, sizeof(col_t), _dataframe_compare_cols)
qsort(__pyx_v_cols->d, __pyx_v_col_count, (sizeof(struct __pyx_t_7questdb_7ingress_col_t)), __pyx_f_7questdb_7ingress__dataframe_compare_cols);
1373:
1374:
+1375: cdef inline bint _dataframe_arrow_get_bool(col_cursor_t* cursor) noexcept nogil:
static CYTHON_INLINE int __pyx_f_7questdb_7ingress__dataframe_arrow_get_bool(struct __pyx_t_7questdb_7ingress_col_cursor_t *__pyx_v_cursor) {
int __pyx_r;
/* … */
/* function exit code */
__pyx_L0:;
return __pyx_r;
}
1376: return (
+1377: (<uint8_t*>cursor.chunk.buffers[1])[cursor.offset // 8] &
__pyx_r = ((((uint8_t *)(__pyx_v_cursor->chunk->buffers[1]))[(__pyx_v_cursor->offset / 8)]) & (1 << (__pyx_v_cursor->offset % 8))); goto __pyx_L0;
1378: (1 << (cursor.offset % 8))
1379: )
1380:
1381:
+1382: cdef inline bint _dataframe_arrow_is_valid(col_cursor_t* cursor) noexcept nogil:
static CYTHON_INLINE int __pyx_f_7questdb_7ingress__dataframe_arrow_is_valid(struct __pyx_t_7questdb_7ingress_col_cursor_t *__pyx_v_cursor) {
int __pyx_r;
/* … */
/* function exit code */
__pyx_L0:;
return __pyx_r;
}
1383: """Check if the value is set according to the validity bitmap."""
1384: return (
+1385: cursor.chunk.null_count == 0 or
__pyx_t_2 = (__pyx_v_cursor->chunk->null_count == 0);
if (!__pyx_t_2) {
} else {
__pyx_t_1 = __pyx_t_2;
goto __pyx_L3_bool_binop_done;
}
1386: (
+1387: (<uint8_t*>cursor.chunk.buffers[0])[cursor.offset // 8] &
__pyx_t_2 = (((((uint8_t *)(__pyx_v_cursor->chunk->buffers[0]))[(__pyx_v_cursor->offset / 8)]) & (1 << (__pyx_v_cursor->offset % 8))) != 0); __pyx_t_1 = __pyx_t_2; __pyx_L3_bool_binop_done:; __pyx_r = __pyx_t_1; goto __pyx_L0;
1388: (1 << (cursor.offset % 8))
1389: )
1390: )
1391:
1392:
+1393: cdef inline void _dataframe_arrow_get_cat_value(
static CYTHON_INLINE void __pyx_f_7questdb_7ingress__dataframe_arrow_get_cat_value(struct __pyx_t_7questdb_7ingress_col_cursor_t *__pyx_v_cursor, size_t __pyx_v_key, size_t *__pyx_v_len_out, char const **__pyx_v_buf_out) {
int32_t *__pyx_v_value_index_access;
int32_t __pyx_v_value_begin;
uint8_t *__pyx_v_value_char_access;
/* … */
/* function exit code */
}
1394: col_cursor_t* cursor,
1395: size_t key,
1396: size_t* len_out,
1397: const char** buf_out) noexcept nogil:
1398: cdef int32_t* value_index_access
1399: cdef int32_t value_begin
1400: cdef uint8_t* value_char_access
+1401: value_index_access = <int32_t*>cursor.chunk.dictionary.buffers[1]
__pyx_v_value_index_access = ((int32_t *)(__pyx_v_cursor->chunk->dictionary->buffers[1]));
+1402: value_begin = value_index_access[key]
__pyx_v_value_begin = (__pyx_v_value_index_access[__pyx_v_key]);
+1403: len_out[0] = value_index_access[key + 1] - value_begin
(__pyx_v_len_out[0]) = ((__pyx_v_value_index_access[(__pyx_v_key + 1)]) - __pyx_v_value_begin);
+1404: value_char_access = <uint8_t*>cursor.chunk.dictionary.buffers[2]
__pyx_v_value_char_access = ((uint8_t *)(__pyx_v_cursor->chunk->dictionary->buffers[2]));
+1405: buf_out[0] = <const char*>&value_char_access[value_begin]
(__pyx_v_buf_out[0]) = ((char const *)(&(__pyx_v_value_char_access[__pyx_v_value_begin])));
1406:
1407:
+1408: cdef inline bint _dataframe_arrow_get_cat_i8(
static CYTHON_INLINE int __pyx_f_7questdb_7ingress__dataframe_arrow_get_cat_i8(struct __pyx_t_7questdb_7ingress_col_cursor_t *__pyx_v_cursor, size_t *__pyx_v_len_out, char const **__pyx_v_buf_out) {
int __pyx_v_valid;
int8_t *__pyx_v_key_access;
int8_t __pyx_v_key;
int __pyx_r;
/* … */
/* function exit code */
__pyx_L0:;
return __pyx_r;
}
1409: col_cursor_t* cursor, size_t* len_out, const char** buf_out) noexcept nogil:
+1410: cdef bint valid = _dataframe_arrow_is_valid(cursor)
__pyx_v_valid = __pyx_f_7questdb_7ingress__dataframe_arrow_is_valid(__pyx_v_cursor);
1411: cdef int8_t* key_access
1412: cdef int8_t key
+1413: if valid:
if (__pyx_v_valid) {
/* … */
}
+1414: key_access = <int8_t*>cursor.chunk.buffers[1]
__pyx_v_key_access = ((int8_t *)(__pyx_v_cursor->chunk->buffers[1]));
+1415: key = key_access[cursor.offset]
__pyx_v_key = (__pyx_v_key_access[__pyx_v_cursor->offset]);
+1416: _dataframe_arrow_get_cat_value(cursor, <size_t>key, len_out, buf_out)
__pyx_f_7questdb_7ingress__dataframe_arrow_get_cat_value(__pyx_v_cursor, ((size_t)__pyx_v_key), __pyx_v_len_out, __pyx_v_buf_out);
+1417: return valid
__pyx_r = __pyx_v_valid; goto __pyx_L0;
1418:
1419:
+1420: cdef inline bint _dataframe_arrow_get_cat_i16(
static CYTHON_INLINE int __pyx_f_7questdb_7ingress__dataframe_arrow_get_cat_i16(struct __pyx_t_7questdb_7ingress_col_cursor_t *__pyx_v_cursor, size_t *__pyx_v_len_out, char const **__pyx_v_buf_out) {
int __pyx_v_valid;
int16_t *__pyx_v_key_access;
int16_t __pyx_v_key;
int __pyx_r;
/* … */
/* function exit code */
__pyx_L0:;
return __pyx_r;
}
1421: col_cursor_t* cursor, size_t* len_out, const char** buf_out) noexcept nogil:
+1422: cdef bint valid = _dataframe_arrow_is_valid(cursor)
__pyx_v_valid = __pyx_f_7questdb_7ingress__dataframe_arrow_is_valid(__pyx_v_cursor);
1423: cdef int16_t* key_access
1424: cdef int16_t key
+1425: if valid:
if (__pyx_v_valid) {
/* … */
}
+1426: key_access = <int16_t*>cursor.chunk.buffers[1]
__pyx_v_key_access = ((int16_t *)(__pyx_v_cursor->chunk->buffers[1]));
+1427: key = key_access[cursor.offset]
__pyx_v_key = (__pyx_v_key_access[__pyx_v_cursor->offset]);
+1428: _dataframe_arrow_get_cat_value(cursor, <size_t>key, len_out, buf_out)
__pyx_f_7questdb_7ingress__dataframe_arrow_get_cat_value(__pyx_v_cursor, ((size_t)__pyx_v_key), __pyx_v_len_out, __pyx_v_buf_out);
+1429: return valid
__pyx_r = __pyx_v_valid; goto __pyx_L0;
1430:
1431:
+1432: cdef inline bint _dataframe_arrow_get_cat_i32(
static CYTHON_INLINE int __pyx_f_7questdb_7ingress__dataframe_arrow_get_cat_i32(struct __pyx_t_7questdb_7ingress_col_cursor_t *__pyx_v_cursor, size_t *__pyx_v_len_out, char const **__pyx_v_buf_out) {
int __pyx_v_valid;
int32_t *__pyx_v_key_access;
int32_t __pyx_v_key;
int __pyx_r;
/* … */
/* function exit code */
__pyx_L0:;
return __pyx_r;
}
1433: col_cursor_t* cursor, size_t* len_out, const char** buf_out) noexcept nogil:
+1434: cdef bint valid = _dataframe_arrow_is_valid(cursor)
__pyx_v_valid = __pyx_f_7questdb_7ingress__dataframe_arrow_is_valid(__pyx_v_cursor);
1435: cdef int32_t* key_access
1436: cdef int32_t key
+1437: if valid:
if (__pyx_v_valid) {
/* … */
}
+1438: key_access = <int32_t*>cursor.chunk.buffers[1]
__pyx_v_key_access = ((int32_t *)(__pyx_v_cursor->chunk->buffers[1]));
+1439: key = key_access[cursor.offset]
__pyx_v_key = (__pyx_v_key_access[__pyx_v_cursor->offset]);
+1440: _dataframe_arrow_get_cat_value(cursor, <size_t>key, len_out, buf_out)
__pyx_f_7questdb_7ingress__dataframe_arrow_get_cat_value(__pyx_v_cursor, ((size_t)__pyx_v_key), __pyx_v_len_out, __pyx_v_buf_out);
+1441: return valid
__pyx_r = __pyx_v_valid; goto __pyx_L0;
1442:
1443:
+1444: cdef inline bint _dataframe_arrow_str_utf8(
static CYTHON_INLINE int __pyx_f_7questdb_7ingress__dataframe_arrow_str_utf8(struct __pyx_t_7questdb_7ingress_col_cursor_t *__pyx_v_cursor, size_t *__pyx_v_len_out, char const **__pyx_v_buf_out) {
int32_t *__pyx_v_index_access;
uint8_t *__pyx_v_char_access;
int32_t __pyx_v_begin;
int __pyx_v_valid;
int __pyx_r;
/* … */
/* function exit code */
__pyx_L0:;
return __pyx_r;
}
1445: col_cursor_t* cursor,
1446: size_t* len_out,
1447: const char** buf_out) noexcept nogil:
1448: cdef int32_t* index_access
1449: cdef uint8_t* char_access
1450: cdef int32_t begin
+1451: cdef bint valid = _dataframe_arrow_is_valid(cursor)
__pyx_v_valid = __pyx_f_7questdb_7ingress__dataframe_arrow_is_valid(__pyx_v_cursor);
+1452: if valid:
if (__pyx_v_valid) {
/* … */
}
+1453: index_access = <int32_t*>cursor.chunk.buffers[1]
__pyx_v_index_access = ((int32_t *)(__pyx_v_cursor->chunk->buffers[1]));
+1454: char_access = <uint8_t*>cursor.chunk.buffers[2]
__pyx_v_char_access = ((uint8_t *)(__pyx_v_cursor->chunk->buffers[2]));
+1455: begin = index_access[cursor.offset]
__pyx_v_begin = (__pyx_v_index_access[__pyx_v_cursor->offset]);
+1456: len_out[0] = index_access[cursor.offset + 1] - begin
(__pyx_v_len_out[0]) = ((__pyx_v_index_access[(__pyx_v_cursor->offset + 1)]) - __pyx_v_begin);
+1457: buf_out[0] = <const char*>&char_access[begin]
(__pyx_v_buf_out[0]) = ((char const *)(&(__pyx_v_char_access[__pyx_v_begin])));
+1458: return valid
__pyx_r = __pyx_v_valid; goto __pyx_L0;
1459:
+1460: cdef inline bint _dataframe_arrow_str_utf8_lrg(
static CYTHON_INLINE int __pyx_f_7questdb_7ingress__dataframe_arrow_str_utf8_lrg(struct __pyx_t_7questdb_7ingress_col_cursor_t *__pyx_v_cursor, size_t *__pyx_v_len_out, char const **__pyx_v_buf_out) {
int64_t *__pyx_v_index_access;
uint8_t *__pyx_v_char_access;
int64_t __pyx_v_begin;
int __pyx_v_valid;
int __pyx_r;
/* … */
/* function exit code */
__pyx_L0:;
return __pyx_r;
}
1461: col_cursor_t* cursor,
1462: size_t* len_out,
1463: const char** buf_out) noexcept nogil:
1464: cdef int64_t* index_access
1465: cdef uint8_t* char_access
1466: cdef int64_t begin
+1467: cdef bint valid = _dataframe_arrow_is_valid(cursor)
__pyx_v_valid = __pyx_f_7questdb_7ingress__dataframe_arrow_is_valid(__pyx_v_cursor);
+1468: if valid:
if (__pyx_v_valid) {
/* … */
}
+1469: index_access = <int64_t*>cursor.chunk.buffers[1]
__pyx_v_index_access = ((int64_t *)(__pyx_v_cursor->chunk->buffers[1]));
+1470: char_access = <uint8_t*>cursor.chunk.buffers[2]
__pyx_v_char_access = ((uint8_t *)(__pyx_v_cursor->chunk->buffers[2]));
+1471: begin = index_access[cursor.offset]
__pyx_v_begin = (__pyx_v_index_access[__pyx_v_cursor->offset]);
+1472: len_out[0] = index_access[cursor.offset + 1] - begin
(__pyx_v_len_out[0]) = ((__pyx_v_index_access[(__pyx_v_cursor->offset + 1)]) - __pyx_v_begin);
+1473: buf_out[0] = <const char*>&char_access[begin]
(__pyx_v_buf_out[0]) = ((char const *)(&(__pyx_v_char_access[__pyx_v_begin])));
+1474: return valid
__pyx_r = __pyx_v_valid; goto __pyx_L0;
1475:
1476:
+1477: cdef inline void_int _dataframe_cell_str_pyobj_to_utf8(
static CYTHON_INLINE __pyx_t_7questdb_7ingress_void_int __pyx_f_7questdb_7ingress__dataframe_cell_str_pyobj_to_utf8(struct qdb_pystr_buf *__pyx_v_b, struct __pyx_t_7questdb_7ingress_col_cursor_t *__pyx_v_cursor, int *__pyx_v_valid_out, struct line_sender_utf8 *__pyx_v_utf8_out) {
PyObject **__pyx_v_access;
PyObject *__pyx_v_cell;
__pyx_t_7questdb_7ingress_void_int __pyx_r;
/* … */
/* function exit code */
__pyx_r = 0;
goto __pyx_L0;
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_3);
__Pyx_XDECREF(__pyx_t_4);
__Pyx_XDECREF(__pyx_t_5);
__Pyx_XDECREF(__pyx_t_6);
__Pyx_AddTraceback("questdb.ingress._dataframe_cell_str_pyobj_to_utf8", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = -1;
__pyx_L0:;
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
1478: qdb_pystr_buf* b,
1479: col_cursor_t* cursor,
1480: bint* valid_out,
1481: line_sender_utf8* utf8_out) except -1:
+1482: cdef PyObject** access = <PyObject**>cursor.chunk.buffers[1]
__pyx_v_access = ((PyObject **)(__pyx_v_cursor->chunk->buffers[1]));
+1483: cdef PyObject* cell = access[cursor.offset]
__pyx_v_cell = (__pyx_v_access[__pyx_v_cursor->offset]);
+1484: if PyUnicode_CheckExact(cell):
__pyx_t_1 = PyUnicode_CheckExact(__pyx_v_cell);
if (__pyx_t_1) {
/* … */
goto __pyx_L3;
}
+1485: str_to_utf8(b, cell, utf8_out)
__pyx_t_2 = __pyx_f_7questdb_7ingress_str_to_utf8(__pyx_v_b, __pyx_v_cell, __pyx_v_utf8_out); if (unlikely(__pyx_t_2 == ((__pyx_t_7questdb_7ingress_void_int)-1))) __PYX_ERR(1, 1485, __pyx_L1_error)
+1486: valid_out[0] = True
(__pyx_v_valid_out[0]) = 1;
+1487: elif _dataframe_is_null_pyobj(cell):
__pyx_t_1 = __pyx_f_7questdb_7ingress__dataframe_is_null_pyobj(__pyx_v_cell);
if (likely(__pyx_t_1)) {
/* … */
goto __pyx_L3;
}
+1488: valid_out[0] = False
(__pyx_v_valid_out[0]) = 0;
1489: else:
+1490: raise ValueError(
/*else*/ {
__pyx_t_4 = NULL;
1491: 'Expected a string, ' +
+1492: f'got an object of type {_fqn(type(<object>cell))}.')
__pyx_t_5 = __pyx_f_7questdb_7ingress__fqn(((PyTypeObject*)((PyObject *)Py_TYPE(((PyObject *)__pyx_v_cell))))); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1492, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyUnicode_Unicode(__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1492, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_7[0] = __pyx_mstate_global->__pyx_kp_u_Expected_a_string_got_an_object; __pyx_t_7[1] = __pyx_t_6; __pyx_t_7[2] = __pyx_mstate_global->__pyx_kp_u_; __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_7, 3, 41 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6) + 1, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6)); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1492, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_8 = 1; { PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_5}; __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1490, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); } __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(1, 1490, __pyx_L1_error) } __pyx_L3:;
1493:
1494:
+1495: cdef void_int _dataframe_serialize_cell_table__str_pyobj(
static __pyx_t_7questdb_7ingress_void_int __pyx_f_7questdb_7ingress__dataframe_serialize_cell_table__str_pyobj(struct line_sender_buffer *__pyx_v_ls_buf, struct qdb_pystr_buf *__pyx_v_b, struct __pyx_t_7questdb_7ingress_col_t *__pyx_v_col) {
struct line_sender_error *__pyx_v_err;
PyObject **__pyx_v_access;
PyObject *__pyx_v_cell;
struct line_sender_table_name __pyx_v_c_table_name;
__pyx_t_7questdb_7ingress_void_int __pyx_r;
/* … */
/* function exit code */
__pyx_r = 0;
goto __pyx_L0;
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_2);
__Pyx_XDECREF(__pyx_t_3);
__Pyx_XDECREF(__pyx_t_5);
__Pyx_XDECREF(__pyx_t_6);
__Pyx_AddTraceback("questdb.ingress._dataframe_serialize_cell_table__str_pyobj", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = -1;
__pyx_L0:;
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
1496: line_sender_buffer* ls_buf,
1497: qdb_pystr_buf* b,
1498: col_t* col) except -1:
+1499: cdef line_sender_error* err = NULL
__pyx_v_err = NULL;
+1500: cdef PyObject** access = <PyObject**>col.cursor.chunk.buffers[1]
__pyx_v_access = ((PyObject **)(__pyx_v_col->cursor.chunk->buffers[1]));
+1501: cdef PyObject* cell = access[col.cursor.offset]
__pyx_v_cell = (__pyx_v_access[__pyx_v_col->cursor.offset]);
1502: cdef line_sender_table_name c_table_name
+1503: if not PyUnicode_CheckExact(cell):
__pyx_t_1 = (!PyUnicode_CheckExact(__pyx_v_cell));
if (__pyx_t_1) {
/* … */
}
+1504: if _dataframe_is_null_pyobj(cell):
__pyx_t_1 = __pyx_f_7questdb_7ingress__dataframe_is_null_pyobj(__pyx_v_cell);
if (unlikely(__pyx_t_1)) {
/* … */
}
+1505: raise ValueError('Expected a table name, got a null value')
__pyx_t_3 = NULL;
__pyx_t_4 = 1;
{
PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_Expected_a_table_name_got_a_null};
__pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
__Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1505, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
}
__Pyx_Raise(__pyx_t_2, 0, 0, 0);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__PYX_ERR(1, 1505, __pyx_L1_error)
1506: else:
+1507: raise ValueError(
/*else*/ {
__pyx_t_3 = NULL;
1508: 'Expected a table name (str object), ' +
+1509: f'got an object of type {_fqn(type(<object>cell))}.')
__pyx_t_5 = __pyx_f_7questdb_7ingress__fqn(((PyTypeObject*)((PyObject *)Py_TYPE(((PyObject *)__pyx_v_cell))))); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1509, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyUnicode_Unicode(__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1509, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_7[0] = __pyx_mstate_global->__pyx_kp_u_Expected_a_table_name_str_object; __pyx_t_7[1] = __pyx_t_6; __pyx_t_7[2] = __pyx_mstate_global->__pyx_kp_u_; __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_7, 3, 58 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6) + 1, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6)); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1509, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_4 = 1; { PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5}; __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1507, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(1, 1507, __pyx_L1_error) }
+1510: str_to_table_name(b, cell, &c_table_name)
__pyx_t_8 = __pyx_f_7questdb_7ingress_str_to_table_name(__pyx_v_b, __pyx_v_cell, (&__pyx_v_c_table_name)); if (unlikely(__pyx_t_8 == ((__pyx_t_7questdb_7ingress_void_int)-1))) __PYX_ERR(1, 1510, __pyx_L1_error)
+1511: if not line_sender_buffer_table(ls_buf, c_table_name, &err):
__pyx_t_1 = (!line_sender_buffer_table(__pyx_v_ls_buf, __pyx_v_c_table_name, (&__pyx_v_err)));
if (unlikely(__pyx_t_1)) {
/* … */
}
+1512: raise c_err_to_py(err)
__pyx_t_2 = __pyx_f_7questdb_7ingress_c_err_to_py(__pyx_v_err); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1512, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(1, 1512, __pyx_L1_error)
1513:
1514:
+1515: cdef void_int _dataframe_serialize_cell_table__str_utf8_arrow(
static __pyx_t_7questdb_7ingress_void_int __pyx_f_7questdb_7ingress__dataframe_serialize_cell_table__str_utf8_arrow(struct line_sender_buffer *__pyx_v_ls_buf, CYTHON_UNUSED struct qdb_pystr_buf *__pyx_v_b, struct __pyx_t_7questdb_7ingress_col_t *__pyx_v_col, PyThreadState **__pyx_v_gs) {
struct line_sender_error *__pyx_v_err;
size_t __pyx_v_c_len;
char const *__pyx_v_buf;
struct line_sender_table_name __pyx_v_c_table_name;
__pyx_t_7questdb_7ingress_void_int __pyx_r;
/* … */
/* function exit code */
__pyx_r = 0;
goto __pyx_L0;
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_2);
__Pyx_XDECREF(__pyx_t_3);
__Pyx_AddTraceback("questdb.ingress._dataframe_serialize_cell_table__str_utf8_arrow", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = -1;
__pyx_L0:;
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
1516: line_sender_buffer* ls_buf,
1517: qdb_pystr_buf* b,
1518: col_t* col,
1519: PyThreadState** gs) except -1:
+1520: cdef line_sender_error* err = NULL
__pyx_v_err = NULL;
1521: cdef size_t c_len
1522: cdef const char* buf
1523: cdef line_sender_table_name c_table_name
+1524: if _dataframe_arrow_str_utf8(&col.cursor, &c_len, &buf):
__pyx_t_1 = __pyx_f_7questdb_7ingress__dataframe_arrow_str_utf8((&__pyx_v_col->cursor), (&__pyx_v_c_len), (&__pyx_v_buf));
if (likely(__pyx_t_1)) {
/* … */
goto __pyx_L3;
}
+1525: if not line_sender_table_name_init(&c_table_name, c_len, buf, &err):
__pyx_t_1 = (!line_sender_table_name_init((&__pyx_v_c_table_name), __pyx_v_c_len, __pyx_v_buf, (&__pyx_v_err)));
if (unlikely(__pyx_t_1)) {
/* … */
}
+1526: _ensure_has_gil(gs)
__pyx_f_7questdb_7ingress__ensure_has_gil(__pyx_v_gs); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1526, __pyx_L1_error)
+1527: raise c_err_to_py(err)
__pyx_t_2 = __pyx_f_7questdb_7ingress_c_err_to_py(__pyx_v_err); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1527, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(1, 1527, __pyx_L1_error)
+1528: if not line_sender_buffer_table(ls_buf, c_table_name, &err):
__pyx_t_1 = (!line_sender_buffer_table(__pyx_v_ls_buf, __pyx_v_c_table_name, (&__pyx_v_err)));
if (unlikely(__pyx_t_1)) {
/* … */
}
+1529: _ensure_has_gil(gs)
__pyx_f_7questdb_7ingress__ensure_has_gil(__pyx_v_gs); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1529, __pyx_L1_error)
+1530: raise c_err_to_py(err)
__pyx_t_2 = __pyx_f_7questdb_7ingress_c_err_to_py(__pyx_v_err); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1530, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(1, 1530, __pyx_L1_error)
1531: else:
+1532: _ensure_has_gil(gs)
/*else*/ {
__pyx_f_7questdb_7ingress__ensure_has_gil(__pyx_v_gs); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1532, __pyx_L1_error)
+1533: raise ValueError('Table name cannot be null')
__pyx_t_3 = NULL;
__pyx_t_4 = 1;
{
PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_Table_name_cannot_be_null};
__pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
__Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1533, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
}
__Pyx_Raise(__pyx_t_2, 0, 0, 0);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__PYX_ERR(1, 1533, __pyx_L1_error)
}
__pyx_L3:;
1534:
+1535: cdef void_int _dataframe_serialize_cell_table__str_lrg_utf8_arrow(
static __pyx_t_7questdb_7ingress_void_int __pyx_f_7questdb_7ingress__dataframe_serialize_cell_table__str_lrg_utf8_arrow(struct line_sender_buffer *__pyx_v_ls_buf, CYTHON_UNUSED struct qdb_pystr_buf *__pyx_v_b, struct __pyx_t_7questdb_7ingress_col_t *__pyx_v_col, PyThreadState **__pyx_v_gs) {
struct line_sender_error *__pyx_v_err;
size_t __pyx_v_c_len;
char const *__pyx_v_buf;
struct line_sender_table_name __pyx_v_c_table_name;
__pyx_t_7questdb_7ingress_void_int __pyx_r;
/* … */
/* function exit code */
__pyx_r = 0;
goto __pyx_L0;
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_2);
__Pyx_XDECREF(__pyx_t_3);
__Pyx_AddTraceback("questdb.ingress._dataframe_serialize_cell_table__str_lrg_utf8_arrow", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = -1;
__pyx_L0:;
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
1536: line_sender_buffer* ls_buf,
1537: qdb_pystr_buf* b,
1538: col_t* col,
1539: PyThreadState** gs) except -1:
+1540: cdef line_sender_error* err = NULL
__pyx_v_err = NULL;
1541: cdef size_t c_len
1542: cdef const char* buf
1543: cdef line_sender_table_name c_table_name
+1544: if _dataframe_arrow_str_utf8_lrg(&col.cursor, &c_len, &buf):
__pyx_t_1 = __pyx_f_7questdb_7ingress__dataframe_arrow_str_utf8_lrg((&__pyx_v_col->cursor), (&__pyx_v_c_len), (&__pyx_v_buf));
if (likely(__pyx_t_1)) {
/* … */
goto __pyx_L3;
}
+1545: if not line_sender_table_name_init(&c_table_name, c_len, buf, &err):
__pyx_t_1 = (!line_sender_table_name_init((&__pyx_v_c_table_name), __pyx_v_c_len, __pyx_v_buf, (&__pyx_v_err)));
if (unlikely(__pyx_t_1)) {
/* … */
}
+1546: _ensure_has_gil(gs)
__pyx_f_7questdb_7ingress__ensure_has_gil(__pyx_v_gs); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1546, __pyx_L1_error)
+1547: raise c_err_to_py(err)
__pyx_t_2 = __pyx_f_7questdb_7ingress_c_err_to_py(__pyx_v_err); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1547, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(1, 1547, __pyx_L1_error)
+1548: if not line_sender_buffer_table(ls_buf, c_table_name, &err):
__pyx_t_1 = (!line_sender_buffer_table(__pyx_v_ls_buf, __pyx_v_c_table_name, (&__pyx_v_err)));
if (unlikely(__pyx_t_1)) {
/* … */
}
+1549: _ensure_has_gil(gs)
__pyx_f_7questdb_7ingress__ensure_has_gil(__pyx_v_gs); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1549, __pyx_L1_error)
+1550: raise c_err_to_py(err)
__pyx_t_2 = __pyx_f_7questdb_7ingress_c_err_to_py(__pyx_v_err); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1550, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(1, 1550, __pyx_L1_error)
1551: else:
+1552: _ensure_has_gil(gs)
/*else*/ {
__pyx_f_7questdb_7ingress__ensure_has_gil(__pyx_v_gs); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1552, __pyx_L1_error)
+1553: raise ValueError('Table name cannot be null')
__pyx_t_3 = NULL;
__pyx_t_4 = 1;
{
PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_Table_name_cannot_be_null};
__pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
__Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1553, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
}
__Pyx_Raise(__pyx_t_2, 0, 0, 0);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__PYX_ERR(1, 1553, __pyx_L1_error)
}
__pyx_L3:;
1554:
1555:
+1556: cdef void_int _dataframe_serialize_cell_table__str_i8_cat(
static __pyx_t_7questdb_7ingress_void_int __pyx_f_7questdb_7ingress__dataframe_serialize_cell_table__str_i8_cat(struct line_sender_buffer *__pyx_v_ls_buf, CYTHON_UNUSED struct qdb_pystr_buf *__pyx_v_b, struct __pyx_t_7questdb_7ingress_col_t *__pyx_v_col, PyThreadState **__pyx_v_gs) {
struct line_sender_error *__pyx_v_err;
size_t __pyx_v_c_len;
char const *__pyx_v_c_buf;
struct line_sender_table_name __pyx_v_c_table_name;
__pyx_t_7questdb_7ingress_void_int __pyx_r;
/* … */
/* function exit code */
__pyx_r = 0;
goto __pyx_L0;
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_2);
__Pyx_XDECREF(__pyx_t_3);
__Pyx_AddTraceback("questdb.ingress._dataframe_serialize_cell_table__str_i8_cat", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = -1;
__pyx_L0:;
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
1557: line_sender_buffer* ls_buf,
1558: qdb_pystr_buf* b,
1559: col_t* col,
1560: PyThreadState** gs) except -1:
+1561: cdef line_sender_error* err = NULL
__pyx_v_err = NULL;
1562: cdef size_t c_len
1563: cdef const char* c_buf
1564: cdef line_sender_table_name c_table_name
+1565: if _dataframe_arrow_get_cat_i8(&col.cursor, &c_len, &c_buf):
__pyx_t_1 = __pyx_f_7questdb_7ingress__dataframe_arrow_get_cat_i8((&__pyx_v_col->cursor), (&__pyx_v_c_len), (&__pyx_v_c_buf));
if (likely(__pyx_t_1)) {
/* … */
goto __pyx_L3;
}
+1566: if not line_sender_table_name_init(&c_table_name, c_len, c_buf, &err):
__pyx_t_1 = (!line_sender_table_name_init((&__pyx_v_c_table_name), __pyx_v_c_len, __pyx_v_c_buf, (&__pyx_v_err)));
if (unlikely(__pyx_t_1)) {
/* … */
}
+1567: _ensure_has_gil(gs)
__pyx_f_7questdb_7ingress__ensure_has_gil(__pyx_v_gs); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1567, __pyx_L1_error)
+1568: raise c_err_to_py(err)
__pyx_t_2 = __pyx_f_7questdb_7ingress_c_err_to_py(__pyx_v_err); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1568, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(1, 1568, __pyx_L1_error)
+1569: if not line_sender_buffer_table(ls_buf, c_table_name, &err):
__pyx_t_1 = (!line_sender_buffer_table(__pyx_v_ls_buf, __pyx_v_c_table_name, (&__pyx_v_err)));
if (unlikely(__pyx_t_1)) {
/* … */
}
+1570: _ensure_has_gil(gs)
__pyx_f_7questdb_7ingress__ensure_has_gil(__pyx_v_gs); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1570, __pyx_L1_error)
+1571: raise c_err_to_py(err)
__pyx_t_2 = __pyx_f_7questdb_7ingress_c_err_to_py(__pyx_v_err); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1571, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(1, 1571, __pyx_L1_error)
1572: else:
+1573: _ensure_has_gil(gs)
/*else*/ {
__pyx_f_7questdb_7ingress__ensure_has_gil(__pyx_v_gs); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1573, __pyx_L1_error)
+1574: raise ValueError('Table name cannot be null')
__pyx_t_3 = NULL;
__pyx_t_4 = 1;
{
PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_Table_name_cannot_be_null};
__pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
__Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1574, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
}
__Pyx_Raise(__pyx_t_2, 0, 0, 0);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__PYX_ERR(1, 1574, __pyx_L1_error)
}
__pyx_L3:;
1575:
1576:
+1577: cdef void_int _dataframe_serialize_cell_table__str_i16_cat(
static __pyx_t_7questdb_7ingress_void_int __pyx_f_7questdb_7ingress__dataframe_serialize_cell_table__str_i16_cat(struct line_sender_buffer *__pyx_v_ls_buf, CYTHON_UNUSED struct qdb_pystr_buf *__pyx_v_b, struct __pyx_t_7questdb_7ingress_col_t *__pyx_v_col, PyThreadState **__pyx_v_gs) {
struct line_sender_error *__pyx_v_err;
size_t __pyx_v_c_len;
char const *__pyx_v_c_buf;
struct line_sender_table_name __pyx_v_c_table_name;
__pyx_t_7questdb_7ingress_void_int __pyx_r;
/* … */
/* function exit code */
__pyx_r = 0;
goto __pyx_L0;
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_2);
__Pyx_XDECREF(__pyx_t_3);
__Pyx_AddTraceback("questdb.ingress._dataframe_serialize_cell_table__str_i16_cat", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = -1;
__pyx_L0:;
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
1578: line_sender_buffer* ls_buf,
1579: qdb_pystr_buf* b,
1580: col_t* col,
1581: PyThreadState** gs) except -1:
+1582: cdef line_sender_error* err = NULL
__pyx_v_err = NULL;
1583: cdef size_t c_len
1584: cdef const char* c_buf
1585: cdef line_sender_table_name c_table_name
+1586: if _dataframe_arrow_get_cat_i16(&col.cursor, &c_len, &c_buf):
__pyx_t_1 = __pyx_f_7questdb_7ingress__dataframe_arrow_get_cat_i16((&__pyx_v_col->cursor), (&__pyx_v_c_len), (&__pyx_v_c_buf));
if (likely(__pyx_t_1)) {
/* … */
goto __pyx_L3;
}
+1587: if not line_sender_table_name_init(&c_table_name, c_len, c_buf, &err):
__pyx_t_1 = (!line_sender_table_name_init((&__pyx_v_c_table_name), __pyx_v_c_len, __pyx_v_c_buf, (&__pyx_v_err)));
if (unlikely(__pyx_t_1)) {
/* … */
}
+1588: _ensure_has_gil(gs)
__pyx_f_7questdb_7ingress__ensure_has_gil(__pyx_v_gs); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1588, __pyx_L1_error)
+1589: raise c_err_to_py(err)
__pyx_t_2 = __pyx_f_7questdb_7ingress_c_err_to_py(__pyx_v_err); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1589, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(1, 1589, __pyx_L1_error)
+1590: if not line_sender_buffer_table(ls_buf, c_table_name, &err):
__pyx_t_1 = (!line_sender_buffer_table(__pyx_v_ls_buf, __pyx_v_c_table_name, (&__pyx_v_err)));
if (unlikely(__pyx_t_1)) {
/* … */
}
+1591: _ensure_has_gil(gs)
__pyx_f_7questdb_7ingress__ensure_has_gil(__pyx_v_gs); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1591, __pyx_L1_error)
+1592: raise c_err_to_py(err)
__pyx_t_2 = __pyx_f_7questdb_7ingress_c_err_to_py(__pyx_v_err); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1592, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(1, 1592, __pyx_L1_error)
1593: else:
+1594: _ensure_has_gil(gs)
/*else*/ {
__pyx_f_7questdb_7ingress__ensure_has_gil(__pyx_v_gs); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1594, __pyx_L1_error)
+1595: raise ValueError('Table name cannot be null')
__pyx_t_3 = NULL;
__pyx_t_4 = 1;
{
PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_Table_name_cannot_be_null};
__pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
__Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1595, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
}
__Pyx_Raise(__pyx_t_2, 0, 0, 0);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__PYX_ERR(1, 1595, __pyx_L1_error)
}
__pyx_L3:;
1596:
1597:
+1598: cdef void_int _dataframe_serialize_cell_table__str_i32_cat(
static __pyx_t_7questdb_7ingress_void_int __pyx_f_7questdb_7ingress__dataframe_serialize_cell_table__str_i32_cat(struct line_sender_buffer *__pyx_v_ls_buf, CYTHON_UNUSED struct qdb_pystr_buf *__pyx_v_b, struct __pyx_t_7questdb_7ingress_col_t *__pyx_v_col, PyThreadState **__pyx_v_gs) {
struct line_sender_error *__pyx_v_err;
size_t __pyx_v_c_len;
char const *__pyx_v_c_buf;
struct line_sender_table_name __pyx_v_c_table_name;
__pyx_t_7questdb_7ingress_void_int __pyx_r;
/* … */
/* function exit code */
__pyx_r = 0;
goto __pyx_L0;
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_2);
__Pyx_XDECREF(__pyx_t_3);
__Pyx_AddTraceback("questdb.ingress._dataframe_serialize_cell_table__str_i32_cat", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = -1;
__pyx_L0:;
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
1599: line_sender_buffer* ls_buf,
1600: qdb_pystr_buf* b,
1601: col_t* col,
1602: PyThreadState** gs) except -1:
+1603: cdef line_sender_error* err = NULL
__pyx_v_err = NULL;
1604: cdef size_t c_len
1605: cdef const char* c_buf
1606: cdef line_sender_table_name c_table_name
+1607: if _dataframe_arrow_get_cat_i32(&col.cursor, &c_len, &c_buf):
__pyx_t_1 = __pyx_f_7questdb_7ingress__dataframe_arrow_get_cat_i32((&__pyx_v_col->cursor), (&__pyx_v_c_len), (&__pyx_v_c_buf));
if (likely(__pyx_t_1)) {
/* … */
goto __pyx_L3;
}
+1608: if not line_sender_table_name_init(&c_table_name, c_len, c_buf, &err):
__pyx_t_1 = (!line_sender_table_name_init((&__pyx_v_c_table_name), __pyx_v_c_len, __pyx_v_c_buf, (&__pyx_v_err)));
if (unlikely(__pyx_t_1)) {
/* … */
}
+1609: _ensure_has_gil(gs)
__pyx_f_7questdb_7ingress__ensure_has_gil(__pyx_v_gs); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1609, __pyx_L1_error)
+1610: raise c_err_to_py(err)
__pyx_t_2 = __pyx_f_7questdb_7ingress_c_err_to_py(__pyx_v_err); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1610, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(1, 1610, __pyx_L1_error)
+1611: if not line_sender_buffer_table(ls_buf, c_table_name, &err):
__pyx_t_1 = (!line_sender_buffer_table(__pyx_v_ls_buf, __pyx_v_c_table_name, (&__pyx_v_err)));
if (unlikely(__pyx_t_1)) {
/* … */
}
+1612: _ensure_has_gil(gs)
__pyx_f_7questdb_7ingress__ensure_has_gil(__pyx_v_gs); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1612, __pyx_L1_error)
+1613: raise c_err_to_py(err)
__pyx_t_2 = __pyx_f_7questdb_7ingress_c_err_to_py(__pyx_v_err); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1613, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(1, 1613, __pyx_L1_error)
1614: else:
+1615: _ensure_has_gil(gs)
/*else*/ {
__pyx_f_7questdb_7ingress__ensure_has_gil(__pyx_v_gs); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1615, __pyx_L1_error)
+1616: raise ValueError('Table name cannot be null')
__pyx_t_3 = NULL;
__pyx_t_4 = 1;
{
PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_Table_name_cannot_be_null};
__pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
__Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1616, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
}
__Pyx_Raise(__pyx_t_2, 0, 0, 0);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__PYX_ERR(1, 1616, __pyx_L1_error)
}
__pyx_L3:;
1617:
1618:
+1619: cdef void_int _dataframe_serialize_cell_symbol__str_pyobj(
static __pyx_t_7questdb_7ingress_void_int __pyx_f_7questdb_7ingress__dataframe_serialize_cell_symbol__str_pyobj(struct line_sender_buffer *__pyx_v_ls_buf, struct qdb_pystr_buf *__pyx_v_b, struct __pyx_t_7questdb_7ingress_col_t *__pyx_v_col) {
struct line_sender_error *__pyx_v_err;
int __pyx_v_valid;
struct line_sender_utf8 __pyx_v_utf8;
__pyx_t_7questdb_7ingress_void_int __pyx_r;
/* … */
/* function exit code */
__pyx_r = 0;
goto __pyx_L0;
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_4);
__Pyx_AddTraceback("questdb.ingress._dataframe_serialize_cell_symbol__str_pyobj", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = -1;
__pyx_L0:;
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
1620: line_sender_buffer* ls_buf,
1621: qdb_pystr_buf* b,
1622: col_t* col) except -1:
+1623: cdef line_sender_error* err = NULL
__pyx_v_err = NULL;
+1624: cdef bint valid = False
__pyx_v_valid = 0;
1625: cdef line_sender_utf8 utf8
+1626: _dataframe_cell_str_pyobj_to_utf8(b, &col.cursor, &valid, &utf8)
__pyx_t_1 = __pyx_f_7questdb_7ingress__dataframe_cell_str_pyobj_to_utf8(__pyx_v_b, (&__pyx_v_col->cursor), (&__pyx_v_valid), (&__pyx_v_utf8)); if (unlikely(__pyx_t_1 == ((__pyx_t_7questdb_7ingress_void_int)-1))) __PYX_ERR(1, 1626, __pyx_L1_error)
+1627: if valid and not line_sender_buffer_symbol(ls_buf, col.name, utf8, &err):
if (__pyx_v_valid) {
} else {
__pyx_t_2 = __pyx_v_valid;
goto __pyx_L4_bool_binop_done;
}
__pyx_t_3 = (!line_sender_buffer_symbol(__pyx_v_ls_buf, __pyx_v_col->name, __pyx_v_utf8, (&__pyx_v_err)));
__pyx_t_2 = __pyx_t_3;
__pyx_L4_bool_binop_done:;
if (unlikely(__pyx_t_2)) {
/* … */
}
+1628: raise c_err_to_py(err)
__pyx_t_4 = __pyx_f_7questdb_7ingress_c_err_to_py(__pyx_v_err); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1628, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_Raise(__pyx_t_4, 0, 0, 0); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __PYX_ERR(1, 1628, __pyx_L1_error)
1629:
1630:
+1631: cdef void_int _dataframe_serialize_cell_symbol__str_utf8_arrow(
static __pyx_t_7questdb_7ingress_void_int __pyx_f_7questdb_7ingress__dataframe_serialize_cell_symbol__str_utf8_arrow(struct line_sender_buffer *__pyx_v_ls_buf, CYTHON_UNUSED struct qdb_pystr_buf *__pyx_v_b, struct __pyx_t_7questdb_7ingress_col_t *__pyx_v_col, PyThreadState **__pyx_v_gs) {
struct line_sender_error *__pyx_v_err;
struct line_sender_utf8 __pyx_v_utf8;
__pyx_t_7questdb_7ingress_void_int __pyx_r;
/* … */
/* function exit code */
__pyx_r = 0;
goto __pyx_L0;
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_2);
__Pyx_AddTraceback("questdb.ingress._dataframe_serialize_cell_symbol__str_utf8_arrow", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = -1;
__pyx_L0:;
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
1632: line_sender_buffer* ls_buf,
1633: qdb_pystr_buf* b,
1634: col_t* col,
1635: PyThreadState** gs) except -1:
+1636: cdef line_sender_error* err = NULL
__pyx_v_err = NULL;
1637: cdef line_sender_utf8 utf8
+1638: if _dataframe_arrow_str_utf8(&col.cursor, &utf8.len, &utf8.buf):
__pyx_t_1 = __pyx_f_7questdb_7ingress__dataframe_arrow_str_utf8((&__pyx_v_col->cursor), (&__pyx_v_utf8.len), (&__pyx_v_utf8.buf));
if (__pyx_t_1) {
/* … */
}
+1639: if not line_sender_buffer_symbol(ls_buf, col.name, utf8, &err):
__pyx_t_1 = (!line_sender_buffer_symbol(__pyx_v_ls_buf, __pyx_v_col->name, __pyx_v_utf8, (&__pyx_v_err)));
if (unlikely(__pyx_t_1)) {
/* … */
}
+1640: _ensure_has_gil(gs)
__pyx_f_7questdb_7ingress__ensure_has_gil(__pyx_v_gs); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1640, __pyx_L1_error)
+1641: raise c_err_to_py(err)
__pyx_t_2 = __pyx_f_7questdb_7ingress_c_err_to_py(__pyx_v_err); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1641, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(1, 1641, __pyx_L1_error)
1642:
+1643: cdef void_int _dataframe_serialize_cell_symbol__str_lrg_utf8_arrow(
static __pyx_t_7questdb_7ingress_void_int __pyx_f_7questdb_7ingress__dataframe_serialize_cell_symbol__str_lrg_utf8_arrow(struct line_sender_buffer *__pyx_v_ls_buf, CYTHON_UNUSED struct qdb_pystr_buf *__pyx_v_b, struct __pyx_t_7questdb_7ingress_col_t *__pyx_v_col, PyThreadState **__pyx_v_gs) {
struct line_sender_error *__pyx_v_err;
struct line_sender_utf8 __pyx_v_utf8;
__pyx_t_7questdb_7ingress_void_int __pyx_r;
/* … */
/* function exit code */
__pyx_r = 0;
goto __pyx_L0;
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_2);
__Pyx_AddTraceback("questdb.ingress._dataframe_serialize_cell_symbol__str_lrg_utf8_arrow", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = -1;
__pyx_L0:;
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
1644: line_sender_buffer* ls_buf,
1645: qdb_pystr_buf* b,
1646: col_t* col,
1647: PyThreadState** gs) except -1:
+1648: cdef line_sender_error* err = NULL
__pyx_v_err = NULL;
1649: cdef line_sender_utf8 utf8
+1650: if _dataframe_arrow_str_utf8_lrg(&col.cursor, &utf8.len, &utf8.buf):
__pyx_t_1 = __pyx_f_7questdb_7ingress__dataframe_arrow_str_utf8_lrg((&__pyx_v_col->cursor), (&__pyx_v_utf8.len), (&__pyx_v_utf8.buf));
if (__pyx_t_1) {
/* … */
}
+1651: if not line_sender_buffer_symbol(ls_buf, col.name, utf8, &err):
__pyx_t_1 = (!line_sender_buffer_symbol(__pyx_v_ls_buf, __pyx_v_col->name, __pyx_v_utf8, (&__pyx_v_err)));
if (unlikely(__pyx_t_1)) {
/* … */
}
+1652: _ensure_has_gil(gs)
__pyx_f_7questdb_7ingress__ensure_has_gil(__pyx_v_gs); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1652, __pyx_L1_error)
+1653: raise c_err_to_py(err)
__pyx_t_2 = __pyx_f_7questdb_7ingress_c_err_to_py(__pyx_v_err); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1653, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(1, 1653, __pyx_L1_error)
1654:
1655:
+1656: cdef void_int _dataframe_serialize_cell_symbol__str_i8_cat(
static __pyx_t_7questdb_7ingress_void_int __pyx_f_7questdb_7ingress__dataframe_serialize_cell_symbol__str_i8_cat(struct line_sender_buffer *__pyx_v_ls_buf, CYTHON_UNUSED struct qdb_pystr_buf *__pyx_v_b, struct __pyx_t_7questdb_7ingress_col_t *__pyx_v_col, PyThreadState **__pyx_v_gs) {
struct line_sender_error *__pyx_v_err;
struct line_sender_utf8 __pyx_v_utf8;
__pyx_t_7questdb_7ingress_void_int __pyx_r;
/* … */
/* function exit code */
__pyx_r = 0;
goto __pyx_L0;
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_2);
__Pyx_AddTraceback("questdb.ingress._dataframe_serialize_cell_symbol__str_i8_cat", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = -1;
__pyx_L0:;
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
1657: line_sender_buffer* ls_buf,
1658: qdb_pystr_buf* b,
1659: col_t* col,
1660: PyThreadState** gs) except -1:
+1661: cdef line_sender_error* err = NULL
__pyx_v_err = NULL;
1662: cdef line_sender_utf8 utf8
+1663: if _dataframe_arrow_get_cat_i8(&col.cursor, &utf8.len, &utf8.buf):
__pyx_t_1 = __pyx_f_7questdb_7ingress__dataframe_arrow_get_cat_i8((&__pyx_v_col->cursor), (&__pyx_v_utf8.len), (&__pyx_v_utf8.buf));
if (__pyx_t_1) {
/* … */
}
+1664: if not line_sender_buffer_symbol(ls_buf, col.name, utf8, &err):
__pyx_t_1 = (!line_sender_buffer_symbol(__pyx_v_ls_buf, __pyx_v_col->name, __pyx_v_utf8, (&__pyx_v_err)));
if (unlikely(__pyx_t_1)) {
/* … */
}
+1665: _ensure_has_gil(gs)
__pyx_f_7questdb_7ingress__ensure_has_gil(__pyx_v_gs); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1665, __pyx_L1_error)
+1666: raise c_err_to_py(err)
__pyx_t_2 = __pyx_f_7questdb_7ingress_c_err_to_py(__pyx_v_err); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1666, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(1, 1666, __pyx_L1_error)
1667:
1668:
+1669: cdef void_int _dataframe_serialize_cell_symbol__str_i16_cat(
static __pyx_t_7questdb_7ingress_void_int __pyx_f_7questdb_7ingress__dataframe_serialize_cell_symbol__str_i16_cat(struct line_sender_buffer *__pyx_v_ls_buf, CYTHON_UNUSED struct qdb_pystr_buf *__pyx_v_b, struct __pyx_t_7questdb_7ingress_col_t *__pyx_v_col, PyThreadState **__pyx_v_gs) {
struct line_sender_error *__pyx_v_err;
struct line_sender_utf8 __pyx_v_utf8;
__pyx_t_7questdb_7ingress_void_int __pyx_r;
/* … */
/* function exit code */
__pyx_r = 0;
goto __pyx_L0;
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_2);
__Pyx_AddTraceback("questdb.ingress._dataframe_serialize_cell_symbol__str_i16_cat", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = -1;
__pyx_L0:;
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
1670: line_sender_buffer* ls_buf,
1671: qdb_pystr_buf* b,
1672: col_t* col,
1673: PyThreadState** gs) except -1:
+1674: cdef line_sender_error* err = NULL
__pyx_v_err = NULL;
1675: cdef line_sender_utf8 utf8
+1676: if _dataframe_arrow_get_cat_i16(&col.cursor, &utf8.len, &utf8.buf):
__pyx_t_1 = __pyx_f_7questdb_7ingress__dataframe_arrow_get_cat_i16((&__pyx_v_col->cursor), (&__pyx_v_utf8.len), (&__pyx_v_utf8.buf));
if (__pyx_t_1) {
/* … */
}
+1677: if not line_sender_buffer_symbol(ls_buf, col.name, utf8, &err):
__pyx_t_1 = (!line_sender_buffer_symbol(__pyx_v_ls_buf, __pyx_v_col->name, __pyx_v_utf8, (&__pyx_v_err)));
if (unlikely(__pyx_t_1)) {
/* … */
}
+1678: _ensure_has_gil(gs)
__pyx_f_7questdb_7ingress__ensure_has_gil(__pyx_v_gs); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1678, __pyx_L1_error)
+1679: raise c_err_to_py(err)
__pyx_t_2 = __pyx_f_7questdb_7ingress_c_err_to_py(__pyx_v_err); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1679, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(1, 1679, __pyx_L1_error)
1680:
1681:
+1682: cdef void_int _dataframe_serialize_cell_symbol__str_i32_cat(
static __pyx_t_7questdb_7ingress_void_int __pyx_f_7questdb_7ingress__dataframe_serialize_cell_symbol__str_i32_cat(struct line_sender_buffer *__pyx_v_ls_buf, CYTHON_UNUSED struct qdb_pystr_buf *__pyx_v_b, struct __pyx_t_7questdb_7ingress_col_t *__pyx_v_col, PyThreadState **__pyx_v_gs) {
struct line_sender_error *__pyx_v_err;
struct line_sender_utf8 __pyx_v_utf8;
__pyx_t_7questdb_7ingress_void_int __pyx_r;
/* … */
/* function exit code */
__pyx_r = 0;
goto __pyx_L0;
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_2);
__Pyx_AddTraceback("questdb.ingress._dataframe_serialize_cell_symbol__str_i32_cat", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = -1;
__pyx_L0:;
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
1683: line_sender_buffer* ls_buf,
1684: qdb_pystr_buf* b,
1685: col_t* col,
1686: PyThreadState** gs) except -1:
+1687: cdef line_sender_error* err = NULL
__pyx_v_err = NULL;
1688: cdef line_sender_utf8 utf8
+1689: if _dataframe_arrow_get_cat_i32(&col.cursor, &utf8.len, &utf8.buf):
__pyx_t_1 = __pyx_f_7questdb_7ingress__dataframe_arrow_get_cat_i32((&__pyx_v_col->cursor), (&__pyx_v_utf8.len), (&__pyx_v_utf8.buf));
if (__pyx_t_1) {
/* … */
}
+1690: if not line_sender_buffer_symbol(ls_buf, col.name, utf8, &err):
__pyx_t_1 = (!line_sender_buffer_symbol(__pyx_v_ls_buf, __pyx_v_col->name, __pyx_v_utf8, (&__pyx_v_err)));
if (unlikely(__pyx_t_1)) {
/* … */
}
+1691: _ensure_has_gil(gs)
__pyx_f_7questdb_7ingress__ensure_has_gil(__pyx_v_gs); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1691, __pyx_L1_error)
+1692: raise c_err_to_py(err)
__pyx_t_2 = __pyx_f_7questdb_7ingress_c_err_to_py(__pyx_v_err); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1692, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(1, 1692, __pyx_L1_error)
1693:
1694:
+1695: cdef void_int _dataframe_serialize_cell_column_bool__bool_pyobj(
static __pyx_t_7questdb_7ingress_void_int __pyx_f_7questdb_7ingress__dataframe_serialize_cell_column_bool__bool_pyobj(struct line_sender_buffer *__pyx_v_ls_buf, CYTHON_UNUSED struct qdb_pystr_buf *__pyx_v_b, struct __pyx_t_7questdb_7ingress_col_t *__pyx_v_col) {
struct line_sender_error *__pyx_v_err;
PyObject **__pyx_v_access;
PyObject *__pyx_v_cell;
__pyx_t_7questdb_7ingress_void_int __pyx_r;
/* … */
/* function exit code */
__pyx_r = 0;
goto __pyx_L0;
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_2);
__Pyx_XDECREF(__pyx_t_3);
__Pyx_XDECREF(__pyx_t_5);
__Pyx_XDECREF(__pyx_t_6);
__Pyx_AddTraceback("questdb.ingress._dataframe_serialize_cell_column_bool__bool_pyobj", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = -1;
__pyx_L0:;
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
1696: line_sender_buffer* ls_buf,
1697: qdb_pystr_buf* b,
1698: col_t* col) except -1:
+1699: cdef line_sender_error* err = NULL
__pyx_v_err = NULL;
+1700: cdef PyObject** access = <PyObject**>col.cursor.chunk.buffers[1]
__pyx_v_access = ((PyObject **)(__pyx_v_col->cursor.chunk->buffers[1]));
+1701: cdef PyObject* cell = access[col.cursor.offset]
__pyx_v_cell = (__pyx_v_access[__pyx_v_col->cursor.offset]);
+1702: if PyBool_Check(cell):
__pyx_t_1 = PyBool_Check(__pyx_v_cell);
if (likely(__pyx_t_1)) {
/* … */
goto __pyx_L3;
}
+1703: if not line_sender_buffer_column_bool(
__pyx_t_1 = (!line_sender_buffer_column_bool(__pyx_v_ls_buf, __pyx_v_col->name, (__pyx_v_cell == Py_True), (&__pyx_v_err)));
if (unlikely(__pyx_t_1)) {
/* … */
}
1704: ls_buf, col.name, cell == Py_True, &err):
+1705: raise c_err_to_py(err)
__pyx_t_2 = __pyx_f_7questdb_7ingress_c_err_to_py(__pyx_v_err); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1705, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(1, 1705, __pyx_L1_error)
+1706: elif _dataframe_is_null_pyobj(cell):
__pyx_t_1 = __pyx_f_7questdb_7ingress__dataframe_is_null_pyobj(__pyx_v_cell);
if (unlikely(__pyx_t_1)) {
/* … */
}
+1707: raise ValueError('Cannot insert null values into a boolean column.')
__pyx_t_3 = NULL;
__pyx_t_4 = 1;
{
PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_Cannot_insert_null_values_into_a};
__pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
__Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1707, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
}
__Pyx_Raise(__pyx_t_2, 0, 0, 0);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__PYX_ERR(1, 1707, __pyx_L1_error)
1708: else:
+1709: raise ValueError(
/*else*/ {
__pyx_t_3 = NULL;
+1710: 'Expected an object of type bool, got a ' +
__pyx_t_6 = __Pyx_PyUnicode_ConcatSafe(__pyx_mstate_global->__pyx_kp_u_Expected_an_object_of_type_bool, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1710, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+1711: _fqn(type(<object>cell)) + '.')
__pyx_t_5 = __pyx_f_7questdb_7ingress__fqn(((PyTypeObject*)((PyObject *)Py_TYPE(((PyObject *)__pyx_v_cell))))); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1711, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); /* … */ __pyx_t_5 = __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_OwnStrongReferenceInPlace(__pyx_t_6, __pyx_mstate_global->__pyx_kp_u_); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1711, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_4 = 1; { PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5}; __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1709, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(1, 1709, __pyx_L1_error) } __pyx_L3:;
1712:
1713:
+1714: cdef void_int _dataframe_serialize_cell_column_bool__bool_numpy(
static __pyx_t_7questdb_7ingress_void_int __pyx_f_7questdb_7ingress__dataframe_serialize_cell_column_bool__bool_numpy(struct line_sender_buffer *__pyx_v_ls_buf, CYTHON_UNUSED struct qdb_pystr_buf *__pyx_v_b, struct __pyx_t_7questdb_7ingress_col_t *__pyx_v_col, PyThreadState **__pyx_v_gs) {
struct line_sender_error *__pyx_v_err;
uint8_t *__pyx_v_access;
uint8_t __pyx_v_cell;
__pyx_t_7questdb_7ingress_void_int __pyx_r;
/* … */
/* function exit code */
__pyx_r = 0;
goto __pyx_L0;
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_2);
__Pyx_AddTraceback("questdb.ingress._dataframe_serialize_cell_column_bool__bool_numpy", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = -1;
__pyx_L0:;
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
1715: line_sender_buffer* ls_buf,
1716: qdb_pystr_buf* b,
1717: col_t* col,
1718: PyThreadState** gs) except -1:
+1719: cdef line_sender_error* err = NULL
__pyx_v_err = NULL;
+1720: cdef uint8_t* access = <uint8_t*>col.cursor.chunk.buffers[1]
__pyx_v_access = ((uint8_t *)(__pyx_v_col->cursor.chunk->buffers[1]));
+1721: cdef uint8_t cell = access[col.cursor.offset]
__pyx_v_cell = (__pyx_v_access[__pyx_v_col->cursor.offset]);
+1722: if not line_sender_buffer_column_bool(ls_buf, col.name, not not cell, &err):
__pyx_t_1 = (!line_sender_buffer_column_bool(__pyx_v_ls_buf, __pyx_v_col->name, (!(!(__pyx_v_cell != 0))), (&__pyx_v_err)));
if (unlikely(__pyx_t_1)) {
/* … */
}
+1723: _ensure_has_gil(gs)
__pyx_f_7questdb_7ingress__ensure_has_gil(__pyx_v_gs); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1723, __pyx_L1_error)
+1724: raise c_err_to_py(err)
__pyx_t_2 = __pyx_f_7questdb_7ingress_c_err_to_py(__pyx_v_err); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1724, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(1, 1724, __pyx_L1_error)
1725:
1726:
+1727: cdef void_int _dataframe_serialize_cell_column_bool__bool_arrow(
static __pyx_t_7questdb_7ingress_void_int __pyx_f_7questdb_7ingress__dataframe_serialize_cell_column_bool__bool_arrow(struct line_sender_buffer *__pyx_v_ls_buf, CYTHON_UNUSED struct qdb_pystr_buf *__pyx_v_b, struct __pyx_t_7questdb_7ingress_col_t *__pyx_v_col, PyThreadState **__pyx_v_gs) {
struct line_sender_error *__pyx_v_err;
int __pyx_v_valid;
int __pyx_v_value;
__pyx_t_7questdb_7ingress_void_int __pyx_r;
/* … */
/* function exit code */
__pyx_r = 0;
goto __pyx_L0;
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_2);
__Pyx_XDECREF(__pyx_t_3);
__Pyx_AddTraceback("questdb.ingress._dataframe_serialize_cell_column_bool__bool_arrow", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = -1;
__pyx_L0:;
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
1728: line_sender_buffer* ls_buf,
1729: qdb_pystr_buf* b,
1730: col_t* col,
1731: PyThreadState** gs) except -1:
+1732: cdef line_sender_error* err = NULL
__pyx_v_err = NULL;
+1733: cdef bint valid = _dataframe_arrow_is_valid(&col.cursor)
__pyx_v_valid = __pyx_f_7questdb_7ingress__dataframe_arrow_is_valid((&__pyx_v_col->cursor));
1734: cdef bint value
+1735: if valid:
if (likely(__pyx_v_valid)) {
/* … */
goto __pyx_L3;
}
+1736: value = _dataframe_arrow_get_bool(&col.cursor)
__pyx_v_value = __pyx_f_7questdb_7ingress__dataframe_arrow_get_bool((&__pyx_v_col->cursor));
+1737: if not line_sender_buffer_column_bool(ls_buf, col.name, value, &err):
__pyx_t_1 = (!line_sender_buffer_column_bool(__pyx_v_ls_buf, __pyx_v_col->name, __pyx_v_value, (&__pyx_v_err)));
if (unlikely(__pyx_t_1)) {
/* … */
}
+1738: _ensure_has_gil(gs)
__pyx_f_7questdb_7ingress__ensure_has_gil(__pyx_v_gs); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1738, __pyx_L1_error)
+1739: raise c_err_to_py(err)
__pyx_t_2 = __pyx_f_7questdb_7ingress_c_err_to_py(__pyx_v_err); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1739, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(1, 1739, __pyx_L1_error)
1740: else:
+1741: _ensure_has_gil(gs)
/*else*/ {
__pyx_f_7questdb_7ingress__ensure_has_gil(__pyx_v_gs); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1741, __pyx_L1_error)
+1742: raise ValueError('Cannot insert null values into a boolean column.')
__pyx_t_3 = NULL;
__pyx_t_4 = 1;
{
PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_Cannot_insert_null_values_into_a};
__pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
__Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1742, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
}
__Pyx_Raise(__pyx_t_2, 0, 0, 0);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__PYX_ERR(1, 1742, __pyx_L1_error)
}
__pyx_L3:;
1743:
1744:
+1745: cdef void_int _dataframe_serialize_cell_column_i64__int_pyobj(
static __pyx_t_7questdb_7ingress_void_int __pyx_f_7questdb_7ingress__dataframe_serialize_cell_column_i64__int_pyobj(struct line_sender_buffer *__pyx_v_ls_buf, CYTHON_UNUSED struct qdb_pystr_buf *__pyx_v_b, struct __pyx_t_7questdb_7ingress_col_t *__pyx_v_col) {
struct line_sender_error *__pyx_v_err;
PyObject **__pyx_v_access;
PyObject *__pyx_v_cell;
int64_t __pyx_v_value;
__pyx_t_7questdb_7ingress_void_int __pyx_r;
/* … */
/* function exit code */
__pyx_r = 0;
goto __pyx_L0;
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_3);
__Pyx_XDECREF(__pyx_t_4);
__Pyx_XDECREF(__pyx_t_5);
__Pyx_XDECREF(__pyx_t_6);
__Pyx_AddTraceback("questdb.ingress._dataframe_serialize_cell_column_i64__int_pyobj", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = -1;
__pyx_L0:;
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
1746: line_sender_buffer* ls_buf,
1747: qdb_pystr_buf* b,
1748: col_t* col) except -1:
+1749: cdef line_sender_error* err = NULL
__pyx_v_err = NULL;
+1750: cdef PyObject** access = <PyObject**>col.cursor.chunk.buffers[1]
__pyx_v_access = ((PyObject **)(__pyx_v_col->cursor.chunk->buffers[1]));
+1751: cdef PyObject* cell = access[col.cursor.offset]
__pyx_v_cell = (__pyx_v_access[__pyx_v_col->cursor.offset]);
1752: cdef int64_t value
+1753: if PyLong_CheckExact(cell):
__pyx_t_1 = PyLong_CheckExact(__pyx_v_cell);
if (__pyx_t_1) {
/* … */
goto __pyx_L3;
}
+1754: value = PyLong_AsLongLong(cell)
__pyx_t_2 = PyLong_AsLongLong(__pyx_v_cell); if (unlikely(__pyx_t_2 == ((PY_LONG_LONG)-1LL) && PyErr_Occurred())) __PYX_ERR(1, 1754, __pyx_L1_error) __pyx_v_value = __pyx_t_2;
+1755: if not line_sender_buffer_column_i64(ls_buf, col.name, value, &err):
__pyx_t_1 = (!line_sender_buffer_column_i64(__pyx_v_ls_buf, __pyx_v_col->name, __pyx_v_value, (&__pyx_v_err)));
if (unlikely(__pyx_t_1)) {
/* … */
}
+1756: raise c_err_to_py(err)
__pyx_t_3 = __pyx_f_7questdb_7ingress_c_err_to_py(__pyx_v_err); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1756, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(1, 1756, __pyx_L1_error)
+1757: elif _dataframe_is_null_pyobj(cell):
__pyx_t_1 = __pyx_f_7questdb_7ingress__dataframe_is_null_pyobj(__pyx_v_cell);
if (likely(__pyx_t_1)) {
goto __pyx_L3;
}
1758: pass
1759: else:
+1760: raise ValueError(
/*else*/ {
__pyx_t_4 = NULL;
+1761: 'Expected an object of type int, got an object of type ' +
__pyx_t_6 = __Pyx_PyUnicode_ConcatSafe(__pyx_mstate_global->__pyx_kp_u_Expected_an_object_of_type_int_g, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1761, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+1762: _fqn(type(<object>cell)) + '.')
__pyx_t_5 = __pyx_f_7questdb_7ingress__fqn(((PyTypeObject*)((PyObject *)Py_TYPE(((PyObject *)__pyx_v_cell))))); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1762, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); /* … */ __pyx_t_5 = __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_OwnStrongReferenceInPlace(__pyx_t_6, __pyx_mstate_global->__pyx_kp_u_); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1762, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_7 = 1; { PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_5}; __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1760, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); } __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(1, 1760, __pyx_L1_error) } __pyx_L3:;
1763:
1764:
+1765: cdef void_int _dataframe_serialize_cell_column_i64__u8_numpy(
static __pyx_t_7questdb_7ingress_void_int __pyx_f_7questdb_7ingress__dataframe_serialize_cell_column_i64__u8_numpy(struct line_sender_buffer *__pyx_v_ls_buf, CYTHON_UNUSED struct qdb_pystr_buf *__pyx_v_b, struct __pyx_t_7questdb_7ingress_col_t *__pyx_v_col, PyThreadState **__pyx_v_gs) {
struct line_sender_error *__pyx_v_err;
uint8_t *__pyx_v_access;
uint8_t __pyx_v_cell;
__pyx_t_7questdb_7ingress_void_int __pyx_r;
/* … */
/* function exit code */
__pyx_r = 0;
goto __pyx_L0;
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_2);
__Pyx_AddTraceback("questdb.ingress._dataframe_serialize_cell_column_i64__u8_numpy", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = -1;
__pyx_L0:;
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
1766: line_sender_buffer* ls_buf,
1767: qdb_pystr_buf* b,
1768: col_t* col,
1769: PyThreadState** gs) except -1:
+1770: cdef line_sender_error* err = NULL
__pyx_v_err = NULL;
+1771: cdef uint8_t* access = <uint8_t*>col.cursor.chunk.buffers[1]
__pyx_v_access = ((uint8_t *)(__pyx_v_col->cursor.chunk->buffers[1]));
+1772: cdef uint8_t cell = access[col.cursor.offset]
__pyx_v_cell = (__pyx_v_access[__pyx_v_col->cursor.offset]);
+1773: if not line_sender_buffer_column_i64(ls_buf, col.name, <int64_t>cell, &err):
__pyx_t_1 = (!line_sender_buffer_column_i64(__pyx_v_ls_buf, __pyx_v_col->name, ((int64_t)__pyx_v_cell), (&__pyx_v_err)));
if (unlikely(__pyx_t_1)) {
/* … */
}
+1774: _ensure_has_gil(gs)
__pyx_f_7questdb_7ingress__ensure_has_gil(__pyx_v_gs); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1774, __pyx_L1_error)
+1775: raise c_err_to_py(err)
__pyx_t_2 = __pyx_f_7questdb_7ingress_c_err_to_py(__pyx_v_err); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1775, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(1, 1775, __pyx_L1_error)
1776:
1777:
+1778: cdef void_int _dataframe_serialize_cell_column_i64__i8_numpy(
static __pyx_t_7questdb_7ingress_void_int __pyx_f_7questdb_7ingress__dataframe_serialize_cell_column_i64__i8_numpy(struct line_sender_buffer *__pyx_v_ls_buf, CYTHON_UNUSED struct qdb_pystr_buf *__pyx_v_b, struct __pyx_t_7questdb_7ingress_col_t *__pyx_v_col, PyThreadState **__pyx_v_gs) {
struct line_sender_error *__pyx_v_err;
int8_t *__pyx_v_access;
int8_t __pyx_v_cell;
__pyx_t_7questdb_7ingress_void_int __pyx_r;
/* … */
/* function exit code */
__pyx_r = 0;
goto __pyx_L0;
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_2);
__Pyx_AddTraceback("questdb.ingress._dataframe_serialize_cell_column_i64__i8_numpy", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = -1;
__pyx_L0:;
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
1779: line_sender_buffer* ls_buf,
1780: qdb_pystr_buf* b,
1781: col_t* col,
1782: PyThreadState** gs) except -1:
+1783: cdef line_sender_error* err = NULL
__pyx_v_err = NULL;
+1784: cdef int8_t* access = <int8_t*>col.cursor.chunk.buffers[1]
__pyx_v_access = ((int8_t *)(__pyx_v_col->cursor.chunk->buffers[1]));
+1785: cdef int8_t cell = access[col.cursor.offset]
__pyx_v_cell = (__pyx_v_access[__pyx_v_col->cursor.offset]);
+1786: if not line_sender_buffer_column_i64(ls_buf, col.name, <int64_t>cell, &err):
__pyx_t_1 = (!line_sender_buffer_column_i64(__pyx_v_ls_buf, __pyx_v_col->name, ((int64_t)__pyx_v_cell), (&__pyx_v_err)));
if (unlikely(__pyx_t_1)) {
/* … */
}
+1787: _ensure_has_gil(gs)
__pyx_f_7questdb_7ingress__ensure_has_gil(__pyx_v_gs); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1787, __pyx_L1_error)
+1788: raise c_err_to_py(err)
__pyx_t_2 = __pyx_f_7questdb_7ingress_c_err_to_py(__pyx_v_err); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1788, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(1, 1788, __pyx_L1_error)
1789:
1790:
+1791: cdef void_int _dataframe_serialize_cell_column_i64__u16_numpy(
static __pyx_t_7questdb_7ingress_void_int __pyx_f_7questdb_7ingress__dataframe_serialize_cell_column_i64__u16_numpy(struct line_sender_buffer *__pyx_v_ls_buf, CYTHON_UNUSED struct qdb_pystr_buf *__pyx_v_b, struct __pyx_t_7questdb_7ingress_col_t *__pyx_v_col, PyThreadState **__pyx_v_gs) {
struct line_sender_error *__pyx_v_err;
uint16_t *__pyx_v_access;
uint16_t __pyx_v_cell;
__pyx_t_7questdb_7ingress_void_int __pyx_r;
/* … */
/* function exit code */
__pyx_r = 0;
goto __pyx_L0;
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_2);
__Pyx_AddTraceback("questdb.ingress._dataframe_serialize_cell_column_i64__u16_numpy", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = -1;
__pyx_L0:;
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
1792: line_sender_buffer* ls_buf,
1793: qdb_pystr_buf* b,
1794: col_t* col,
1795: PyThreadState** gs) except -1:
+1796: cdef line_sender_error* err = NULL
__pyx_v_err = NULL;
+1797: cdef uint16_t* access = <uint16_t*>col.cursor.chunk.buffers[1]
__pyx_v_access = ((uint16_t *)(__pyx_v_col->cursor.chunk->buffers[1]));
+1798: cdef uint16_t cell = access[col.cursor.offset]
__pyx_v_cell = (__pyx_v_access[__pyx_v_col->cursor.offset]);
+1799: if not line_sender_buffer_column_i64(ls_buf, col.name, <int64_t>cell, &err):
__pyx_t_1 = (!line_sender_buffer_column_i64(__pyx_v_ls_buf, __pyx_v_col->name, ((int64_t)__pyx_v_cell), (&__pyx_v_err)));
if (unlikely(__pyx_t_1)) {
/* … */
}
+1800: _ensure_has_gil(gs)
__pyx_f_7questdb_7ingress__ensure_has_gil(__pyx_v_gs); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1800, __pyx_L1_error)
+1801: raise c_err_to_py(err)
__pyx_t_2 = __pyx_f_7questdb_7ingress_c_err_to_py(__pyx_v_err); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1801, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(1, 1801, __pyx_L1_error)
1802:
1803:
+1804: cdef void_int _dataframe_serialize_cell_column_i64__i16_numpy(
static __pyx_t_7questdb_7ingress_void_int __pyx_f_7questdb_7ingress__dataframe_serialize_cell_column_i64__i16_numpy(struct line_sender_buffer *__pyx_v_ls_buf, CYTHON_UNUSED struct qdb_pystr_buf *__pyx_v_b, struct __pyx_t_7questdb_7ingress_col_t *__pyx_v_col, PyThreadState **__pyx_v_gs) {
struct line_sender_error *__pyx_v_err;
int16_t *__pyx_v_access;
int16_t __pyx_v_cell;
__pyx_t_7questdb_7ingress_void_int __pyx_r;
/* … */
/* function exit code */
__pyx_r = 0;
goto __pyx_L0;
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_2);
__Pyx_AddTraceback("questdb.ingress._dataframe_serialize_cell_column_i64__i16_numpy", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = -1;
__pyx_L0:;
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
1805: line_sender_buffer* ls_buf,
1806: qdb_pystr_buf* b,
1807: col_t* col,
1808: PyThreadState** gs) except -1:
+1809: cdef line_sender_error* err = NULL
__pyx_v_err = NULL;
+1810: cdef int16_t* access = <int16_t*>col.cursor.chunk.buffers[1]
__pyx_v_access = ((int16_t *)(__pyx_v_col->cursor.chunk->buffers[1]));
+1811: cdef int16_t cell = access[col.cursor.offset]
__pyx_v_cell = (__pyx_v_access[__pyx_v_col->cursor.offset]);
+1812: if not line_sender_buffer_column_i64(ls_buf, col.name, <int64_t>cell, &err):
__pyx_t_1 = (!line_sender_buffer_column_i64(__pyx_v_ls_buf, __pyx_v_col->name, ((int64_t)__pyx_v_cell), (&__pyx_v_err)));
if (unlikely(__pyx_t_1)) {
/* … */
}
+1813: _ensure_has_gil(gs)
__pyx_f_7questdb_7ingress__ensure_has_gil(__pyx_v_gs); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1813, __pyx_L1_error)
+1814: raise c_err_to_py(err)
__pyx_t_2 = __pyx_f_7questdb_7ingress_c_err_to_py(__pyx_v_err); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1814, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(1, 1814, __pyx_L1_error)
1815:
1816:
+1817: cdef void_int _dataframe_serialize_cell_column_i64__u32_numpy(
static __pyx_t_7questdb_7ingress_void_int __pyx_f_7questdb_7ingress__dataframe_serialize_cell_column_i64__u32_numpy(struct line_sender_buffer *__pyx_v_ls_buf, CYTHON_UNUSED struct qdb_pystr_buf *__pyx_v_b, struct __pyx_t_7questdb_7ingress_col_t *__pyx_v_col, PyThreadState **__pyx_v_gs) {
struct line_sender_error *__pyx_v_err;
uint32_t *__pyx_v_access;
uint32_t __pyx_v_cell;
__pyx_t_7questdb_7ingress_void_int __pyx_r;
/* … */
/* function exit code */
__pyx_r = 0;
goto __pyx_L0;
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_2);
__Pyx_AddTraceback("questdb.ingress._dataframe_serialize_cell_column_i64__u32_numpy", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = -1;
__pyx_L0:;
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
1818: line_sender_buffer* ls_buf,
1819: qdb_pystr_buf* b,
1820: col_t* col,
1821: PyThreadState** gs) except -1:
+1822: cdef line_sender_error* err = NULL
__pyx_v_err = NULL;
+1823: cdef uint32_t* access = <uint32_t*>col.cursor.chunk.buffers[1]
__pyx_v_access = ((uint32_t *)(__pyx_v_col->cursor.chunk->buffers[1]));
+1824: cdef uint32_t cell = access[col.cursor.offset]
__pyx_v_cell = (__pyx_v_access[__pyx_v_col->cursor.offset]);
+1825: if not line_sender_buffer_column_i64(ls_buf, col.name, <int64_t>cell, &err):
__pyx_t_1 = (!line_sender_buffer_column_i64(__pyx_v_ls_buf, __pyx_v_col->name, ((int64_t)__pyx_v_cell), (&__pyx_v_err)));
if (unlikely(__pyx_t_1)) {
/* … */
}
+1826: _ensure_has_gil(gs)
__pyx_f_7questdb_7ingress__ensure_has_gil(__pyx_v_gs); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1826, __pyx_L1_error)
+1827: raise c_err_to_py(err)
__pyx_t_2 = __pyx_f_7questdb_7ingress_c_err_to_py(__pyx_v_err); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1827, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(1, 1827, __pyx_L1_error)
1828:
1829:
+1830: cdef void_int _dataframe_serialize_cell_column_i64__i32_numpy(
static __pyx_t_7questdb_7ingress_void_int __pyx_f_7questdb_7ingress__dataframe_serialize_cell_column_i64__i32_numpy(struct line_sender_buffer *__pyx_v_ls_buf, CYTHON_UNUSED struct qdb_pystr_buf *__pyx_v_b, struct __pyx_t_7questdb_7ingress_col_t *__pyx_v_col, PyThreadState **__pyx_v_gs) {
struct line_sender_error *__pyx_v_err;
int32_t *__pyx_v_access;
int32_t __pyx_v_cell;
__pyx_t_7questdb_7ingress_void_int __pyx_r;
/* … */
/* function exit code */
__pyx_r = 0;
goto __pyx_L0;
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_2);
__Pyx_AddTraceback("questdb.ingress._dataframe_serialize_cell_column_i64__i32_numpy", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = -1;
__pyx_L0:;
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
1831: line_sender_buffer* ls_buf,
1832: qdb_pystr_buf* b,
1833: col_t* col,
1834: PyThreadState** gs) except -1:
+1835: cdef line_sender_error* err = NULL
__pyx_v_err = NULL;
+1836: cdef int32_t* access = <int32_t*>col.cursor.chunk.buffers[1]
__pyx_v_access = ((int32_t *)(__pyx_v_col->cursor.chunk->buffers[1]));
+1837: cdef int32_t cell = access[col.cursor.offset]
__pyx_v_cell = (__pyx_v_access[__pyx_v_col->cursor.offset]);
+1838: if not line_sender_buffer_column_i64(ls_buf, col.name, <int64_t>cell, &err):
__pyx_t_1 = (!line_sender_buffer_column_i64(__pyx_v_ls_buf, __pyx_v_col->name, ((int64_t)__pyx_v_cell), (&__pyx_v_err)));
if (unlikely(__pyx_t_1)) {
/* … */
}
+1839: _ensure_has_gil(gs)
__pyx_f_7questdb_7ingress__ensure_has_gil(__pyx_v_gs); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1839, __pyx_L1_error)
+1840: raise c_err_to_py(err)
__pyx_t_2 = __pyx_f_7questdb_7ingress_c_err_to_py(__pyx_v_err); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1840, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(1, 1840, __pyx_L1_error)
1841:
1842:
+1843: cdef void_int _dataframe_serialize_cell_column_i64__u64_numpy(
static __pyx_t_7questdb_7ingress_void_int __pyx_f_7questdb_7ingress__dataframe_serialize_cell_column_i64__u64_numpy(struct line_sender_buffer *__pyx_v_ls_buf, CYTHON_UNUSED struct qdb_pystr_buf *__pyx_v_b, struct __pyx_t_7questdb_7ingress_col_t *__pyx_v_col, PyThreadState **__pyx_v_gs) {
struct line_sender_error *__pyx_v_err;
uint64_t *__pyx_v_access;
uint64_t __pyx_v_cell;
__pyx_t_7questdb_7ingress_void_int __pyx_r;
/* … */
/* function exit code */
__pyx_r = 0;
goto __pyx_L0;
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_2);
__Pyx_XDECREF(__pyx_t_3);
__Pyx_AddTraceback("questdb.ingress._dataframe_serialize_cell_column_i64__u64_numpy", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = -1;
__pyx_L0:;
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
1844: line_sender_buffer* ls_buf,
1845: qdb_pystr_buf* b,
1846: col_t* col,
1847: PyThreadState** gs) except -1:
+1848: cdef line_sender_error* err = NULL
__pyx_v_err = NULL;
+1849: cdef uint64_t* access = <uint64_t*>col.cursor.chunk.buffers[1]
__pyx_v_access = ((uint64_t *)(__pyx_v_col->cursor.chunk->buffers[1]));
+1850: cdef uint64_t cell = access[col.cursor.offset]
__pyx_v_cell = (__pyx_v_access[__pyx_v_col->cursor.offset]);
+1851: if cell > <uint64_t>INT64_MAX:
__pyx_t_1 = (__pyx_v_cell > ((uint64_t)INT64_MAX));
if (unlikely(__pyx_t_1)) {
/* … */
}
+1852: _ensure_has_gil(gs)
__pyx_f_7questdb_7ingress__ensure_has_gil(__pyx_v_gs); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1852, __pyx_L1_error)
+1853: raise OverflowError('uint64 value too large for int64 column type.')
__pyx_t_3 = NULL;
__pyx_t_4 = 1;
{
PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_uint64_value_too_large_for_int64};
__pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_OverflowError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
__Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1853, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
}
__Pyx_Raise(__pyx_t_2, 0, 0, 0);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__PYX_ERR(1, 1853, __pyx_L1_error)
+1854: if not line_sender_buffer_column_i64(ls_buf, col.name, <int64_t>cell, &err):
__pyx_t_1 = (!line_sender_buffer_column_i64(__pyx_v_ls_buf, __pyx_v_col->name, ((int64_t)__pyx_v_cell), (&__pyx_v_err)));
if (unlikely(__pyx_t_1)) {
/* … */
}
+1855: _ensure_has_gil(gs)
__pyx_f_7questdb_7ingress__ensure_has_gil(__pyx_v_gs); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1855, __pyx_L1_error)
+1856: raise c_err_to_py(err)
__pyx_t_2 = __pyx_f_7questdb_7ingress_c_err_to_py(__pyx_v_err); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1856, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(1, 1856, __pyx_L1_error)
1857:
1858:
+1859: cdef void_int _dataframe_serialize_cell_column_i64__i64_numpy(
static __pyx_t_7questdb_7ingress_void_int __pyx_f_7questdb_7ingress__dataframe_serialize_cell_column_i64__i64_numpy(struct line_sender_buffer *__pyx_v_ls_buf, CYTHON_UNUSED struct qdb_pystr_buf *__pyx_v_b, struct __pyx_t_7questdb_7ingress_col_t *__pyx_v_col, PyThreadState **__pyx_v_gs) {
struct line_sender_error *__pyx_v_err;
int64_t *__pyx_v_access;
int64_t __pyx_v_cell;
__pyx_t_7questdb_7ingress_void_int __pyx_r;
/* … */
/* function exit code */
__pyx_r = 0;
goto __pyx_L0;
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_2);
__Pyx_AddTraceback("questdb.ingress._dataframe_serialize_cell_column_i64__i64_numpy", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = -1;
__pyx_L0:;
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
1860: line_sender_buffer* ls_buf,
1861: qdb_pystr_buf* b,
1862: col_t* col,
1863: PyThreadState** gs) except -1:
+1864: cdef line_sender_error* err = NULL
__pyx_v_err = NULL;
+1865: cdef int64_t* access = <int64_t*>col.cursor.chunk.buffers[1]
__pyx_v_access = ((int64_t *)(__pyx_v_col->cursor.chunk->buffers[1]));
+1866: cdef int64_t cell = access[col.cursor.offset]
__pyx_v_cell = (__pyx_v_access[__pyx_v_col->cursor.offset]);
+1867: if not line_sender_buffer_column_i64(ls_buf, col.name, cell, &err):
__pyx_t_1 = (!line_sender_buffer_column_i64(__pyx_v_ls_buf, __pyx_v_col->name, __pyx_v_cell, (&__pyx_v_err)));
if (unlikely(__pyx_t_1)) {
/* … */
}
+1868: _ensure_has_gil(gs)
__pyx_f_7questdb_7ingress__ensure_has_gil(__pyx_v_gs); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1868, __pyx_L1_error)
+1869: raise c_err_to_py(err)
__pyx_t_2 = __pyx_f_7questdb_7ingress_c_err_to_py(__pyx_v_err); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1869, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(1, 1869, __pyx_L1_error)
1870:
1871:
+1872: cdef void_int _dataframe_serialize_cell_column_i64__u8_arrow(
static __pyx_t_7questdb_7ingress_void_int __pyx_f_7questdb_7ingress__dataframe_serialize_cell_column_i64__u8_arrow(struct line_sender_buffer *__pyx_v_ls_buf, CYTHON_UNUSED struct qdb_pystr_buf *__pyx_v_b, struct __pyx_t_7questdb_7ingress_col_t *__pyx_v_col, PyThreadState **__pyx_v_gs) {
struct line_sender_error *__pyx_v_err;
int __pyx_v_valid;
uint8_t *__pyx_v_access;
__pyx_t_7questdb_7ingress_void_int __pyx_r;
/* … */
/* function exit code */
__pyx_r = 0;
goto __pyx_L0;
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_2);
__Pyx_AddTraceback("questdb.ingress._dataframe_serialize_cell_column_i64__u8_arrow", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = -1;
__pyx_L0:;
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
1873: line_sender_buffer* ls_buf,
1874: qdb_pystr_buf* b,
1875: col_t* col,
1876: PyThreadState** gs) except -1:
+1877: cdef line_sender_error* err = NULL
__pyx_v_err = NULL;
+1878: cdef bint valid = _dataframe_arrow_is_valid(&col.cursor)
__pyx_v_valid = __pyx_f_7questdb_7ingress__dataframe_arrow_is_valid((&__pyx_v_col->cursor));
1879: cdef uint8_t* access
+1880: if valid:
if (__pyx_v_valid) {
/* … */
}
+1881: access = <uint8_t*>col.cursor.chunk.buffers[1]
__pyx_v_access = ((uint8_t *)(__pyx_v_col->cursor.chunk->buffers[1]));
+1882: if not line_sender_buffer_column_i64(
__pyx_t_1 = (!line_sender_buffer_column_i64(__pyx_v_ls_buf, __pyx_v_col->name, ((int64_t)(__pyx_v_access[__pyx_v_col->cursor.offset])), (&__pyx_v_err)));
if (unlikely(__pyx_t_1)) {
/* … */
}
1883: ls_buf,
1884: col.name,
1885: <int64_t>access[col.cursor.offset],
1886: &err):
+1887: _ensure_has_gil(gs)
__pyx_f_7questdb_7ingress__ensure_has_gil(__pyx_v_gs); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1887, __pyx_L1_error)
+1888: raise c_err_to_py(err)
__pyx_t_2 = __pyx_f_7questdb_7ingress_c_err_to_py(__pyx_v_err); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1888, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(1, 1888, __pyx_L1_error)
1889:
1890:
+1891: cdef void_int _dataframe_serialize_cell_column_i64__i8_arrow(
static __pyx_t_7questdb_7ingress_void_int __pyx_f_7questdb_7ingress__dataframe_serialize_cell_column_i64__i8_arrow(struct line_sender_buffer *__pyx_v_ls_buf, CYTHON_UNUSED struct qdb_pystr_buf *__pyx_v_b, struct __pyx_t_7questdb_7ingress_col_t *__pyx_v_col, PyThreadState **__pyx_v_gs) {
struct line_sender_error *__pyx_v_err;
int __pyx_v_valid;
int8_t *__pyx_v_access;
__pyx_t_7questdb_7ingress_void_int __pyx_r;
/* … */
/* function exit code */
__pyx_r = 0;
goto __pyx_L0;
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_2);
__Pyx_AddTraceback("questdb.ingress._dataframe_serialize_cell_column_i64__i8_arrow", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = -1;
__pyx_L0:;
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
1892: line_sender_buffer* ls_buf,
1893: qdb_pystr_buf* b,
1894: col_t* col,
1895: PyThreadState** gs) except -1:
+1896: cdef line_sender_error* err = NULL
__pyx_v_err = NULL;
+1897: cdef bint valid = _dataframe_arrow_is_valid(&col.cursor)
__pyx_v_valid = __pyx_f_7questdb_7ingress__dataframe_arrow_is_valid((&__pyx_v_col->cursor));
1898: cdef int8_t* access
+1899: if valid:
if (__pyx_v_valid) {
/* … */
}
+1900: access = <int8_t*>col.cursor.chunk.buffers[1]
__pyx_v_access = ((int8_t *)(__pyx_v_col->cursor.chunk->buffers[1]));
+1901: if not line_sender_buffer_column_i64(
__pyx_t_1 = (!line_sender_buffer_column_i64(__pyx_v_ls_buf, __pyx_v_col->name, ((int64_t)(__pyx_v_access[__pyx_v_col->cursor.offset])), (&__pyx_v_err)));
if (unlikely(__pyx_t_1)) {
/* … */
}
1902: ls_buf,
1903: col.name,
1904: <int64_t>access[col.cursor.offset],
1905: &err):
+1906: _ensure_has_gil(gs)
__pyx_f_7questdb_7ingress__ensure_has_gil(__pyx_v_gs); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1906, __pyx_L1_error)
+1907: raise c_err_to_py(err)
__pyx_t_2 = __pyx_f_7questdb_7ingress_c_err_to_py(__pyx_v_err); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1907, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(1, 1907, __pyx_L1_error)
1908:
1909:
+1910: cdef void_int _dataframe_serialize_cell_column_i64__u16_arrow(
static __pyx_t_7questdb_7ingress_void_int __pyx_f_7questdb_7ingress__dataframe_serialize_cell_column_i64__u16_arrow(struct line_sender_buffer *__pyx_v_ls_buf, CYTHON_UNUSED struct qdb_pystr_buf *__pyx_v_b, struct __pyx_t_7questdb_7ingress_col_t *__pyx_v_col, PyThreadState **__pyx_v_gs) {
struct line_sender_error *__pyx_v_err;
int __pyx_v_valid;
uint16_t *__pyx_v_access;
__pyx_t_7questdb_7ingress_void_int __pyx_r;
/* … */
/* function exit code */
__pyx_r = 0;
goto __pyx_L0;
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_2);
__Pyx_AddTraceback("questdb.ingress._dataframe_serialize_cell_column_i64__u16_arrow", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = -1;
__pyx_L0:;
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
1911: line_sender_buffer* ls_buf,
1912: qdb_pystr_buf* b,
1913: col_t* col,
1914: PyThreadState** gs) except -1:
+1915: cdef line_sender_error* err = NULL
__pyx_v_err = NULL;
+1916: cdef bint valid = _dataframe_arrow_is_valid(&col.cursor)
__pyx_v_valid = __pyx_f_7questdb_7ingress__dataframe_arrow_is_valid((&__pyx_v_col->cursor));
1917: cdef uint16_t* access
+1918: if valid:
if (__pyx_v_valid) {
/* … */
}
+1919: access = <uint16_t*>col.cursor.chunk.buffers[1]
__pyx_v_access = ((uint16_t *)(__pyx_v_col->cursor.chunk->buffers[1]));
+1920: if not line_sender_buffer_column_i64(
__pyx_t_1 = (!line_sender_buffer_column_i64(__pyx_v_ls_buf, __pyx_v_col->name, ((int64_t)(__pyx_v_access[__pyx_v_col->cursor.offset])), (&__pyx_v_err)));
if (unlikely(__pyx_t_1)) {
/* … */
}
1921: ls_buf,
1922: col.name,
1923: <int64_t>access[col.cursor.offset],
1924: &err):
+1925: _ensure_has_gil(gs)
__pyx_f_7questdb_7ingress__ensure_has_gil(__pyx_v_gs); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1925, __pyx_L1_error)
+1926: raise c_err_to_py(err)
__pyx_t_2 = __pyx_f_7questdb_7ingress_c_err_to_py(__pyx_v_err); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1926, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(1, 1926, __pyx_L1_error)
1927:
1928:
+1929: cdef void_int _dataframe_serialize_cell_column_i64__i16_arrow(
static __pyx_t_7questdb_7ingress_void_int __pyx_f_7questdb_7ingress__dataframe_serialize_cell_column_i64__i16_arrow(struct line_sender_buffer *__pyx_v_ls_buf, CYTHON_UNUSED struct qdb_pystr_buf *__pyx_v_b, struct __pyx_t_7questdb_7ingress_col_t *__pyx_v_col, PyThreadState **__pyx_v_gs) {
struct line_sender_error *__pyx_v_err;
int __pyx_v_valid;
int16_t *__pyx_v_access;
__pyx_t_7questdb_7ingress_void_int __pyx_r;
/* … */
/* function exit code */
__pyx_r = 0;
goto __pyx_L0;
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_2);
__Pyx_AddTraceback("questdb.ingress._dataframe_serialize_cell_column_i64__i16_arrow", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = -1;
__pyx_L0:;
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
1930: line_sender_buffer* ls_buf,
1931: qdb_pystr_buf* b,
1932: col_t* col,
1933: PyThreadState** gs) except -1:
+1934: cdef line_sender_error* err = NULL
__pyx_v_err = NULL;
+1935: cdef bint valid = _dataframe_arrow_is_valid(&col.cursor)
__pyx_v_valid = __pyx_f_7questdb_7ingress__dataframe_arrow_is_valid((&__pyx_v_col->cursor));
1936: cdef int16_t* access
+1937: if valid:
if (__pyx_v_valid) {
/* … */
}
+1938: access = <int16_t*>col.cursor.chunk.buffers[1]
__pyx_v_access = ((int16_t *)(__pyx_v_col->cursor.chunk->buffers[1]));
+1939: if not line_sender_buffer_column_i64(
__pyx_t_1 = (!line_sender_buffer_column_i64(__pyx_v_ls_buf, __pyx_v_col->name, ((int64_t)(__pyx_v_access[__pyx_v_col->cursor.offset])), (&__pyx_v_err)));
if (unlikely(__pyx_t_1)) {
/* … */
}
1940: ls_buf,
1941: col.name,
1942: <int64_t>access[col.cursor.offset],
1943: &err):
+1944: _ensure_has_gil(gs)
__pyx_f_7questdb_7ingress__ensure_has_gil(__pyx_v_gs); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1944, __pyx_L1_error)
+1945: raise c_err_to_py(err)
__pyx_t_2 = __pyx_f_7questdb_7ingress_c_err_to_py(__pyx_v_err); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1945, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(1, 1945, __pyx_L1_error)
1946:
1947:
+1948: cdef void_int _dataframe_serialize_cell_column_i64__u32_arrow(
static __pyx_t_7questdb_7ingress_void_int __pyx_f_7questdb_7ingress__dataframe_serialize_cell_column_i64__u32_arrow(struct line_sender_buffer *__pyx_v_ls_buf, CYTHON_UNUSED struct qdb_pystr_buf *__pyx_v_b, struct __pyx_t_7questdb_7ingress_col_t *__pyx_v_col, PyThreadState **__pyx_v_gs) {
struct line_sender_error *__pyx_v_err;
int __pyx_v_valid;
uint32_t *__pyx_v_access;
__pyx_t_7questdb_7ingress_void_int __pyx_r;
/* … */
/* function exit code */
__pyx_r = 0;
goto __pyx_L0;
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_2);
__Pyx_AddTraceback("questdb.ingress._dataframe_serialize_cell_column_i64__u32_arrow", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = -1;
__pyx_L0:;
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
1949: line_sender_buffer* ls_buf,
1950: qdb_pystr_buf* b,
1951: col_t* col,
1952: PyThreadState** gs) except -1:
+1953: cdef line_sender_error* err = NULL
__pyx_v_err = NULL;
+1954: cdef bint valid = _dataframe_arrow_is_valid(&col.cursor)
__pyx_v_valid = __pyx_f_7questdb_7ingress__dataframe_arrow_is_valid((&__pyx_v_col->cursor));
1955: cdef uint32_t* access
+1956: if valid:
if (__pyx_v_valid) {
/* … */
}
+1957: access = <uint32_t*>col.cursor.chunk.buffers[1]
__pyx_v_access = ((uint32_t *)(__pyx_v_col->cursor.chunk->buffers[1]));
+1958: if not line_sender_buffer_column_i64(
__pyx_t_1 = (!line_sender_buffer_column_i64(__pyx_v_ls_buf, __pyx_v_col->name, ((int64_t)(__pyx_v_access[__pyx_v_col->cursor.offset])), (&__pyx_v_err)));
if (unlikely(__pyx_t_1)) {
/* … */
}
1959: ls_buf,
1960: col.name,
1961: <int64_t>access[col.cursor.offset],
1962: &err):
+1963: _ensure_has_gil(gs)
__pyx_f_7questdb_7ingress__ensure_has_gil(__pyx_v_gs); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1963, __pyx_L1_error)
+1964: raise c_err_to_py(err)
__pyx_t_2 = __pyx_f_7questdb_7ingress_c_err_to_py(__pyx_v_err); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1964, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(1, 1964, __pyx_L1_error)
1965:
1966:
+1967: cdef void_int _dataframe_serialize_cell_column_i64__i32_arrow(
static __pyx_t_7questdb_7ingress_void_int __pyx_f_7questdb_7ingress__dataframe_serialize_cell_column_i64__i32_arrow(struct line_sender_buffer *__pyx_v_ls_buf, CYTHON_UNUSED struct qdb_pystr_buf *__pyx_v_b, struct __pyx_t_7questdb_7ingress_col_t *__pyx_v_col, PyThreadState **__pyx_v_gs) {
struct line_sender_error *__pyx_v_err;
int __pyx_v_valid;
int32_t *__pyx_v_access;
__pyx_t_7questdb_7ingress_void_int __pyx_r;
/* … */
/* function exit code */
__pyx_r = 0;
goto __pyx_L0;
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_2);
__Pyx_AddTraceback("questdb.ingress._dataframe_serialize_cell_column_i64__i32_arrow", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = -1;
__pyx_L0:;
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
1968: line_sender_buffer* ls_buf,
1969: qdb_pystr_buf* b,
1970: col_t* col,
1971: PyThreadState** gs) except -1:
+1972: cdef line_sender_error* err = NULL
__pyx_v_err = NULL;
+1973: cdef bint valid = _dataframe_arrow_is_valid(&col.cursor)
__pyx_v_valid = __pyx_f_7questdb_7ingress__dataframe_arrow_is_valid((&__pyx_v_col->cursor));
1974: cdef int32_t* access
+1975: if valid:
if (__pyx_v_valid) {
/* … */
}
+1976: access = <int32_t*>col.cursor.chunk.buffers[1]
__pyx_v_access = ((int32_t *)(__pyx_v_col->cursor.chunk->buffers[1]));
+1977: if not line_sender_buffer_column_i64(
__pyx_t_1 = (!line_sender_buffer_column_i64(__pyx_v_ls_buf, __pyx_v_col->name, ((int64_t)(__pyx_v_access[__pyx_v_col->cursor.offset])), (&__pyx_v_err)));
if (unlikely(__pyx_t_1)) {
/* … */
}
1978: ls_buf,
1979: col.name,
1980: <int64_t>access[col.cursor.offset],
1981: &err):
+1982: _ensure_has_gil(gs)
__pyx_f_7questdb_7ingress__ensure_has_gil(__pyx_v_gs); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1982, __pyx_L1_error)
+1983: raise c_err_to_py(err)
__pyx_t_2 = __pyx_f_7questdb_7ingress_c_err_to_py(__pyx_v_err); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1983, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(1, 1983, __pyx_L1_error)
1984:
1985:
+1986: cdef void_int _dataframe_serialize_cell_column_i64__u64_arrow(
static __pyx_t_7questdb_7ingress_void_int __pyx_f_7questdb_7ingress__dataframe_serialize_cell_column_i64__u64_arrow(struct line_sender_buffer *__pyx_v_ls_buf, CYTHON_UNUSED struct qdb_pystr_buf *__pyx_v_b, struct __pyx_t_7questdb_7ingress_col_t *__pyx_v_col, PyThreadState **__pyx_v_gs) {
struct line_sender_error *__pyx_v_err;
int __pyx_v_valid;
uint64_t *__pyx_v_access;
uint64_t __pyx_v_cell;
__pyx_t_7questdb_7ingress_void_int __pyx_r;
/* … */
/* function exit code */
__pyx_r = 0;
goto __pyx_L0;
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_2);
__Pyx_XDECREF(__pyx_t_3);
__Pyx_AddTraceback("questdb.ingress._dataframe_serialize_cell_column_i64__u64_arrow", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = -1;
__pyx_L0:;
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
1987: line_sender_buffer* ls_buf,
1988: qdb_pystr_buf* b,
1989: col_t* col,
1990: PyThreadState** gs) except -1:
+1991: cdef line_sender_error* err = NULL
__pyx_v_err = NULL;
+1992: cdef bint valid = _dataframe_arrow_is_valid(&col.cursor)
__pyx_v_valid = __pyx_f_7questdb_7ingress__dataframe_arrow_is_valid((&__pyx_v_col->cursor));
1993: cdef uint64_t* access
1994: cdef uint64_t cell
+1995: if valid:
if (__pyx_v_valid) {
/* … */
}
+1996: access = <uint64_t*>col.cursor.chunk.buffers[1]
__pyx_v_access = ((uint64_t *)(__pyx_v_col->cursor.chunk->buffers[1]));
+1997: cell = access[col.cursor.offset]
__pyx_v_cell = (__pyx_v_access[__pyx_v_col->cursor.offset]);
+1998: if cell > <uint64_t>INT64_MAX:
__pyx_t_1 = (__pyx_v_cell > ((uint64_t)INT64_MAX));
if (unlikely(__pyx_t_1)) {
/* … */
}
+1999: _ensure_has_gil(gs)
__pyx_f_7questdb_7ingress__ensure_has_gil(__pyx_v_gs); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1999, __pyx_L1_error)
+2000: raise OverflowError('uint64 value too large for int64 column type.')
__pyx_t_3 = NULL;
__pyx_t_4 = 1;
{
PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_uint64_value_too_large_for_int64};
__pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_OverflowError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
__Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2000, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
}
__Pyx_Raise(__pyx_t_2, 0, 0, 0);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__PYX_ERR(1, 2000, __pyx_L1_error)
+2001: if not line_sender_buffer_column_i64(
__pyx_t_1 = (!line_sender_buffer_column_i64(__pyx_v_ls_buf, __pyx_v_col->name, ((int64_t)__pyx_v_cell), (&__pyx_v_err)));
if (unlikely(__pyx_t_1)) {
/* … */
}
2002: ls_buf,
2003: col.name,
2004: <int64_t>cell,
2005: &err):
+2006: _ensure_has_gil(gs)
__pyx_f_7questdb_7ingress__ensure_has_gil(__pyx_v_gs); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 2006, __pyx_L1_error)
+2007: raise c_err_to_py(err)
__pyx_t_2 = __pyx_f_7questdb_7ingress_c_err_to_py(__pyx_v_err); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2007, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(1, 2007, __pyx_L1_error)
2008:
2009:
+2010: cdef void_int _dataframe_serialize_cell_column_i64__i64_arrow(
static __pyx_t_7questdb_7ingress_void_int __pyx_f_7questdb_7ingress__dataframe_serialize_cell_column_i64__i64_arrow(struct line_sender_buffer *__pyx_v_ls_buf, CYTHON_UNUSED struct qdb_pystr_buf *__pyx_v_b, struct __pyx_t_7questdb_7ingress_col_t *__pyx_v_col, PyThreadState **__pyx_v_gs) {
struct line_sender_error *__pyx_v_err;
int __pyx_v_valid;
int64_t *__pyx_v_access;
__pyx_t_7questdb_7ingress_void_int __pyx_r;
/* … */
/* function exit code */
__pyx_r = 0;
goto __pyx_L0;
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_2);
__Pyx_AddTraceback("questdb.ingress._dataframe_serialize_cell_column_i64__i64_arrow", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = -1;
__pyx_L0:;
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
2011: line_sender_buffer* ls_buf,
2012: qdb_pystr_buf* b,
2013: col_t* col,
2014: PyThreadState** gs) except -1:
+2015: cdef line_sender_error* err = NULL
__pyx_v_err = NULL;
+2016: cdef bint valid = _dataframe_arrow_is_valid(&col.cursor)
__pyx_v_valid = __pyx_f_7questdb_7ingress__dataframe_arrow_is_valid((&__pyx_v_col->cursor));
2017: cdef int64_t* access
+2018: if valid:
if (__pyx_v_valid) {
/* … */
}
+2019: access = <int64_t*>col.cursor.chunk.buffers[1]
__pyx_v_access = ((int64_t *)(__pyx_v_col->cursor.chunk->buffers[1]));
+2020: if not line_sender_buffer_column_i64(
__pyx_t_1 = (!line_sender_buffer_column_i64(__pyx_v_ls_buf, __pyx_v_col->name, (__pyx_v_access[__pyx_v_col->cursor.offset]), (&__pyx_v_err)));
if (unlikely(__pyx_t_1)) {
/* … */
}
2021: ls_buf,
2022: col.name,
2023: access[col.cursor.offset],
2024: &err):
+2025: _ensure_has_gil(gs)
__pyx_f_7questdb_7ingress__ensure_has_gil(__pyx_v_gs); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 2025, __pyx_L1_error)
+2026: raise c_err_to_py(err)
__pyx_t_2 = __pyx_f_7questdb_7ingress_c_err_to_py(__pyx_v_err); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2026, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(1, 2026, __pyx_L1_error)
2027:
2028:
+2029: cdef void_int _dataframe_serialize_cell_column_f64__float_pyobj(
static __pyx_t_7questdb_7ingress_void_int __pyx_f_7questdb_7ingress__dataframe_serialize_cell_column_f64__float_pyobj(struct line_sender_buffer *__pyx_v_ls_buf, CYTHON_UNUSED struct qdb_pystr_buf *__pyx_v_b, struct __pyx_t_7questdb_7ingress_col_t *__pyx_v_col) {
struct line_sender_error *__pyx_v_err;
PyObject **__pyx_v_access;
PyObject *__pyx_v_cell;
double __pyx_v_value;
__pyx_t_7questdb_7ingress_void_int __pyx_r;
/* … */
/* function exit code */
__pyx_r = 0;
goto __pyx_L0;
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_2);
__Pyx_XDECREF(__pyx_t_3);
__Pyx_XDECREF(__pyx_t_4);
__Pyx_XDECREF(__pyx_t_5);
__Pyx_AddTraceback("questdb.ingress._dataframe_serialize_cell_column_f64__float_pyobj", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = -1;
__pyx_L0:;
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
2030: line_sender_buffer* ls_buf,
2031: qdb_pystr_buf* b,
2032: col_t* col) except -1:
+2033: cdef line_sender_error* err = NULL
__pyx_v_err = NULL;
+2034: cdef PyObject** access = <PyObject**>col.cursor.chunk.buffers[1]
__pyx_v_access = ((PyObject **)(__pyx_v_col->cursor.chunk->buffers[1]));
+2035: cdef PyObject* cell = access[col.cursor.offset]
__pyx_v_cell = (__pyx_v_access[__pyx_v_col->cursor.offset]);
2036: cdef double value
+2037: if PyFloat_CheckExact(cell):
__pyx_t_1 = PyFloat_CheckExact(__pyx_v_cell);
if (__pyx_t_1) {
/* … */
goto __pyx_L3;
}
+2038: value = PyFloat_AS_DOUBLE(cell)
__pyx_v_value = PyFloat_AS_DOUBLE(__pyx_v_cell);
+2039: if not line_sender_buffer_column_f64(ls_buf, col.name, value, &err):
__pyx_t_1 = (!line_sender_buffer_column_f64(__pyx_v_ls_buf, __pyx_v_col->name, __pyx_v_value, (&__pyx_v_err)));
if (unlikely(__pyx_t_1)) {
/* … */
}
+2040: raise c_err_to_py(err)
__pyx_t_2 = __pyx_f_7questdb_7ingress_c_err_to_py(__pyx_v_err); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2040, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(1, 2040, __pyx_L1_error)
+2041: elif _dataframe_is_null_pyobj(cell):
__pyx_t_1 = __pyx_f_7questdb_7ingress__dataframe_is_null_pyobj(__pyx_v_cell);
if (likely(__pyx_t_1)) {
goto __pyx_L3;
}
2042: pass
2043: else:
+2044: raise ValueError(
/*else*/ {
__pyx_t_3 = NULL;
+2045: 'Expected an object of type float, got an object of type ' +
__pyx_t_5 = __Pyx_PyUnicode_ConcatSafe(__pyx_mstate_global->__pyx_kp_u_Expected_an_object_of_type_float, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2045, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+2046: _fqn(type(<object>cell)) + '.')
__pyx_t_4 = __pyx_f_7questdb_7ingress__fqn(((PyTypeObject*)((PyObject *)Py_TYPE(((PyObject *)__pyx_v_cell))))); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2046, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); /* … */ __pyx_t_4 = __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_OwnStrongReferenceInPlace(__pyx_t_5, __pyx_mstate_global->__pyx_kp_u_); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2046, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_6 = 1; { PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_4}; __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2044, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(1, 2044, __pyx_L1_error) } __pyx_L3:;
2047:
2048:
+2049: cdef void_int _dataframe_serialize_cell_column_f64__f32_numpy(
static __pyx_t_7questdb_7ingress_void_int __pyx_f_7questdb_7ingress__dataframe_serialize_cell_column_f64__f32_numpy(struct line_sender_buffer *__pyx_v_ls_buf, CYTHON_UNUSED struct qdb_pystr_buf *__pyx_v_b, struct __pyx_t_7questdb_7ingress_col_t *__pyx_v_col, PyThreadState **__pyx_v_gs) {
struct line_sender_error *__pyx_v_err;
float *__pyx_v_access;
float __pyx_v_cell;
__pyx_t_7questdb_7ingress_void_int __pyx_r;
/* … */
/* function exit code */
__pyx_r = 0;
goto __pyx_L0;
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_2);
__Pyx_AddTraceback("questdb.ingress._dataframe_serialize_cell_column_f64__f32_numpy", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = -1;
__pyx_L0:;
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
2050: line_sender_buffer* ls_buf,
2051: qdb_pystr_buf* b,
2052: col_t* col,
2053: PyThreadState** gs) except -1:
+2054: cdef line_sender_error* err = NULL
__pyx_v_err = NULL;
2055: # Note: This is the C `float` type, not the Python `float` type.
+2056: cdef float* access = <float*>col.cursor.chunk.buffers[1]
__pyx_v_access = ((float *)(__pyx_v_col->cursor.chunk->buffers[1]));
+2057: cdef float cell = access[col.cursor.offset]
__pyx_v_cell = (__pyx_v_access[__pyx_v_col->cursor.offset]);
+2058: if not line_sender_buffer_column_f64(ls_buf, col.name, <double>cell, &err):
__pyx_t_1 = (!line_sender_buffer_column_f64(__pyx_v_ls_buf, __pyx_v_col->name, ((double)__pyx_v_cell), (&__pyx_v_err)));
if (unlikely(__pyx_t_1)) {
/* … */
}
+2059: _ensure_has_gil(gs)
__pyx_f_7questdb_7ingress__ensure_has_gil(__pyx_v_gs); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 2059, __pyx_L1_error)
+2060: raise c_err_to_py(err)
__pyx_t_2 = __pyx_f_7questdb_7ingress_c_err_to_py(__pyx_v_err); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2060, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(1, 2060, __pyx_L1_error)
2061:
2062:
+2063: cdef void_int _dataframe_serialize_cell_column_f64__f64_numpy(
static __pyx_t_7questdb_7ingress_void_int __pyx_f_7questdb_7ingress__dataframe_serialize_cell_column_f64__f64_numpy(struct line_sender_buffer *__pyx_v_ls_buf, CYTHON_UNUSED struct qdb_pystr_buf *__pyx_v_b, struct __pyx_t_7questdb_7ingress_col_t *__pyx_v_col, PyThreadState **__pyx_v_gs) {
struct line_sender_error *__pyx_v_err;
double *__pyx_v_access;
double __pyx_v_cell;
__pyx_t_7questdb_7ingress_void_int __pyx_r;
/* … */
/* function exit code */
__pyx_r = 0;
goto __pyx_L0;
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_2);
__Pyx_AddTraceback("questdb.ingress._dataframe_serialize_cell_column_f64__f64_numpy", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = -1;
__pyx_L0:;
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
2064: line_sender_buffer* ls_buf,
2065: qdb_pystr_buf* b,
2066: col_t* col,
2067: PyThreadState** gs) except -1:
+2068: cdef line_sender_error* err = NULL
__pyx_v_err = NULL;
+2069: cdef double* access = <double*>col.cursor.chunk.buffers[1]
__pyx_v_access = ((double *)(__pyx_v_col->cursor.chunk->buffers[1]));
+2070: cdef double cell = access[col.cursor.offset]
__pyx_v_cell = (__pyx_v_access[__pyx_v_col->cursor.offset]);
+2071: if not line_sender_buffer_column_f64(ls_buf, col.name, cell, &err):
__pyx_t_1 = (!line_sender_buffer_column_f64(__pyx_v_ls_buf, __pyx_v_col->name, __pyx_v_cell, (&__pyx_v_err)));
if (unlikely(__pyx_t_1)) {
/* … */
}
+2072: _ensure_has_gil(gs)
__pyx_f_7questdb_7ingress__ensure_has_gil(__pyx_v_gs); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 2072, __pyx_L1_error)
+2073: raise c_err_to_py(err)
__pyx_t_2 = __pyx_f_7questdb_7ingress_c_err_to_py(__pyx_v_err); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2073, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(1, 2073, __pyx_L1_error)
2074:
2075:
+2076: cdef void_int _dataframe_serialize_cell_column_f64__f32_arrow(
static __pyx_t_7questdb_7ingress_void_int __pyx_f_7questdb_7ingress__dataframe_serialize_cell_column_f64__f32_arrow(struct line_sender_buffer *__pyx_v_ls_buf, CYTHON_UNUSED struct qdb_pystr_buf *__pyx_v_b, struct __pyx_t_7questdb_7ingress_col_t *__pyx_v_col, PyThreadState **__pyx_v_gs) {
struct line_sender_error *__pyx_v_err;
int __pyx_v_valid;
float *__pyx_v_access;
__pyx_t_7questdb_7ingress_void_int __pyx_r;
/* … */
/* function exit code */
__pyx_r = 0;
goto __pyx_L0;
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_2);
__Pyx_AddTraceback("questdb.ingress._dataframe_serialize_cell_column_f64__f32_arrow", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = -1;
__pyx_L0:;
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
2077: line_sender_buffer* ls_buf,
2078: qdb_pystr_buf* b,
2079: col_t* col,
2080: PyThreadState** gs) except -1:
+2081: cdef line_sender_error* err = NULL
__pyx_v_err = NULL;
+2082: cdef bint valid = _dataframe_arrow_is_valid(&col.cursor)
__pyx_v_valid = __pyx_f_7questdb_7ingress__dataframe_arrow_is_valid((&__pyx_v_col->cursor));
2083: cdef float* access
+2084: if valid:
if (__pyx_v_valid) {
/* … */
}
+2085: access = <float*>col.cursor.chunk.buffers[1]
__pyx_v_access = ((float *)(__pyx_v_col->cursor.chunk->buffers[1]));
+2086: if not line_sender_buffer_column_f64(
__pyx_t_1 = (!line_sender_buffer_column_f64(__pyx_v_ls_buf, __pyx_v_col->name, ((double)(__pyx_v_access[__pyx_v_col->cursor.offset])), (&__pyx_v_err)));
if (unlikely(__pyx_t_1)) {
/* … */
}
2087: ls_buf,
2088: col.name,
2089: <double>access[col.cursor.offset],
2090: &err):
+2091: _ensure_has_gil(gs)
__pyx_f_7questdb_7ingress__ensure_has_gil(__pyx_v_gs); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 2091, __pyx_L1_error)
+2092: raise c_err_to_py(err)
__pyx_t_2 = __pyx_f_7questdb_7ingress_c_err_to_py(__pyx_v_err); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2092, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(1, 2092, __pyx_L1_error)
2093:
2094:
+2095: cdef void_int _dataframe_serialize_cell_column_f64__f64_arrow(
static __pyx_t_7questdb_7ingress_void_int __pyx_f_7questdb_7ingress__dataframe_serialize_cell_column_f64__f64_arrow(struct line_sender_buffer *__pyx_v_ls_buf, CYTHON_UNUSED struct qdb_pystr_buf *__pyx_v_b, struct __pyx_t_7questdb_7ingress_col_t *__pyx_v_col, PyThreadState **__pyx_v_gs) {
struct line_sender_error *__pyx_v_err;
int __pyx_v_valid;
double *__pyx_v_access;
__pyx_t_7questdb_7ingress_void_int __pyx_r;
/* … */
/* function exit code */
__pyx_r = 0;
goto __pyx_L0;
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_2);
__Pyx_AddTraceback("questdb.ingress._dataframe_serialize_cell_column_f64__f64_arrow", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = -1;
__pyx_L0:;
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
2096: line_sender_buffer* ls_buf,
2097: qdb_pystr_buf* b,
2098: col_t* col,
2099: PyThreadState** gs) except -1:
+2100: cdef line_sender_error* err = NULL
__pyx_v_err = NULL;
+2101: cdef bint valid = _dataframe_arrow_is_valid(&col.cursor)
__pyx_v_valid = __pyx_f_7questdb_7ingress__dataframe_arrow_is_valid((&__pyx_v_col->cursor));
2102: cdef double* access
+2103: if valid:
if (__pyx_v_valid) {
/* … */
}
+2104: access = <double*>col.cursor.chunk.buffers[1]
__pyx_v_access = ((double *)(__pyx_v_col->cursor.chunk->buffers[1]));
+2105: if not line_sender_buffer_column_f64(
__pyx_t_1 = (!line_sender_buffer_column_f64(__pyx_v_ls_buf, __pyx_v_col->name, (__pyx_v_access[__pyx_v_col->cursor.offset]), (&__pyx_v_err)));
if (unlikely(__pyx_t_1)) {
/* … */
}
2106: ls_buf,
2107: col.name,
2108: access[col.cursor.offset],
2109: &err):
+2110: _ensure_has_gil(gs)
__pyx_f_7questdb_7ingress__ensure_has_gil(__pyx_v_gs); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 2110, __pyx_L1_error)
+2111: raise c_err_to_py(err)
__pyx_t_2 = __pyx_f_7questdb_7ingress_c_err_to_py(__pyx_v_err); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2111, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(1, 2111, __pyx_L1_error)
2112:
2113:
+2114: cdef void_int _dataframe_serialize_cell_column_str__str_pyobj(
static __pyx_t_7questdb_7ingress_void_int __pyx_f_7questdb_7ingress__dataframe_serialize_cell_column_str__str_pyobj(struct line_sender_buffer *__pyx_v_ls_buf, struct qdb_pystr_buf *__pyx_v_b, struct __pyx_t_7questdb_7ingress_col_t *__pyx_v_col) {
struct line_sender_error *__pyx_v_err;
int __pyx_v_valid;
struct line_sender_utf8 __pyx_v_utf8;
__pyx_t_7questdb_7ingress_void_int __pyx_r;
/* … */
/* function exit code */
__pyx_r = 0;
goto __pyx_L0;
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_4);
__Pyx_AddTraceback("questdb.ingress._dataframe_serialize_cell_column_str__str_pyobj", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = -1;
__pyx_L0:;
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
2115: line_sender_buffer* ls_buf,
2116: qdb_pystr_buf* b,
2117: col_t* col) except -1:
+2118: cdef line_sender_error* err = NULL
__pyx_v_err = NULL;
+2119: cdef bint valid = False
__pyx_v_valid = 0;
2120: cdef line_sender_utf8 utf8
+2121: _dataframe_cell_str_pyobj_to_utf8(b, &col.cursor, &valid, &utf8)
__pyx_t_1 = __pyx_f_7questdb_7ingress__dataframe_cell_str_pyobj_to_utf8(__pyx_v_b, (&__pyx_v_col->cursor), (&__pyx_v_valid), (&__pyx_v_utf8)); if (unlikely(__pyx_t_1 == ((__pyx_t_7questdb_7ingress_void_int)-1))) __PYX_ERR(1, 2121, __pyx_L1_error)
+2122: if valid and not line_sender_buffer_column_str(
if (__pyx_v_valid) {
} else {
__pyx_t_2 = __pyx_v_valid;
goto __pyx_L4_bool_binop_done;
}
/* … */
__pyx_t_3 = (!line_sender_buffer_column_str(__pyx_v_ls_buf, __pyx_v_col->name, __pyx_v_utf8, (&__pyx_v_err)));
__pyx_t_2 = __pyx_t_3;
__pyx_L4_bool_binop_done:;
/* … */
if (unlikely(__pyx_t_2)) {
/* … */
}
2123: ls_buf, col.name, utf8, &err):
+2124: raise c_err_to_py(err)
__pyx_t_4 = __pyx_f_7questdb_7ingress_c_err_to_py(__pyx_v_err); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2124, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_Raise(__pyx_t_4, 0, 0, 0); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __PYX_ERR(1, 2124, __pyx_L1_error)
2125:
2126:
+2127: cdef void_int _dataframe_serialize_cell_column_str__str_utf8_arrow(
static __pyx_t_7questdb_7ingress_void_int __pyx_f_7questdb_7ingress__dataframe_serialize_cell_column_str__str_utf8_arrow(struct line_sender_buffer *__pyx_v_ls_buf, CYTHON_UNUSED struct qdb_pystr_buf *__pyx_v_b, struct __pyx_t_7questdb_7ingress_col_t *__pyx_v_col, PyThreadState **__pyx_v_gs) {
struct line_sender_error *__pyx_v_err;
struct line_sender_utf8 __pyx_v_utf8;
__pyx_t_7questdb_7ingress_void_int __pyx_r;
/* … */
/* function exit code */
__pyx_r = 0;
goto __pyx_L0;
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_2);
__Pyx_AddTraceback("questdb.ingress._dataframe_serialize_cell_column_str__str_utf8_arrow", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = -1;
__pyx_L0:;
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
2128: line_sender_buffer* ls_buf,
2129: qdb_pystr_buf* b,
2130: col_t* col,
2131: PyThreadState** gs) except -1:
+2132: cdef line_sender_error* err = NULL
__pyx_v_err = NULL;
2133: cdef line_sender_utf8 utf8
+2134: if _dataframe_arrow_str_utf8(&col.cursor, &utf8.len, &utf8.buf):
__pyx_t_1 = __pyx_f_7questdb_7ingress__dataframe_arrow_str_utf8((&__pyx_v_col->cursor), (&__pyx_v_utf8.len), (&__pyx_v_utf8.buf));
if (__pyx_t_1) {
/* … */
}
+2135: if not line_sender_buffer_column_str(ls_buf, col.name, utf8, &err):
__pyx_t_1 = (!line_sender_buffer_column_str(__pyx_v_ls_buf, __pyx_v_col->name, __pyx_v_utf8, (&__pyx_v_err)));
if (unlikely(__pyx_t_1)) {
/* … */
}
+2136: _ensure_has_gil(gs)
__pyx_f_7questdb_7ingress__ensure_has_gil(__pyx_v_gs); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 2136, __pyx_L1_error)
+2137: raise c_err_to_py(err)
__pyx_t_2 = __pyx_f_7questdb_7ingress_c_err_to_py(__pyx_v_err); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2137, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(1, 2137, __pyx_L1_error)
2138:
+2139: cdef void_int _dataframe_serialize_cell_column_str__str_lrg_utf8_arrow(
static __pyx_t_7questdb_7ingress_void_int __pyx_f_7questdb_7ingress__dataframe_serialize_cell_column_str__str_lrg_utf8_arrow(struct line_sender_buffer *__pyx_v_ls_buf, CYTHON_UNUSED struct qdb_pystr_buf *__pyx_v_b, struct __pyx_t_7questdb_7ingress_col_t *__pyx_v_col, PyThreadState **__pyx_v_gs) {
struct line_sender_error *__pyx_v_err;
struct line_sender_utf8 __pyx_v_utf8;
__pyx_t_7questdb_7ingress_void_int __pyx_r;
/* … */
/* function exit code */
__pyx_r = 0;
goto __pyx_L0;
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_2);
__Pyx_AddTraceback("questdb.ingress._dataframe_serialize_cell_column_str__str_lrg_utf8_arrow", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = -1;
__pyx_L0:;
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
2140: line_sender_buffer* ls_buf,
2141: qdb_pystr_buf* b,
2142: col_t* col,
2143: PyThreadState** gs) except -1:
+2144: cdef line_sender_error* err = NULL
__pyx_v_err = NULL;
2145: cdef line_sender_utf8 utf8
+2146: if _dataframe_arrow_str_utf8_lrg(&col.cursor, &utf8.len, &utf8.buf):
__pyx_t_1 = __pyx_f_7questdb_7ingress__dataframe_arrow_str_utf8_lrg((&__pyx_v_col->cursor), (&__pyx_v_utf8.len), (&__pyx_v_utf8.buf));
if (__pyx_t_1) {
/* … */
}
+2147: if not line_sender_buffer_column_str(ls_buf, col.name, utf8, &err):
__pyx_t_1 = (!line_sender_buffer_column_str(__pyx_v_ls_buf, __pyx_v_col->name, __pyx_v_utf8, (&__pyx_v_err)));
if (unlikely(__pyx_t_1)) {
/* … */
}
+2148: _ensure_has_gil(gs)
__pyx_f_7questdb_7ingress__ensure_has_gil(__pyx_v_gs); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 2148, __pyx_L1_error)
+2149: raise c_err_to_py(err)
__pyx_t_2 = __pyx_f_7questdb_7ingress_c_err_to_py(__pyx_v_err); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2149, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(1, 2149, __pyx_L1_error)
2150:
2151:
+2152: cdef void_int _dataframe_serialize_cell_column_str__str_i8_cat(
static __pyx_t_7questdb_7ingress_void_int __pyx_f_7questdb_7ingress__dataframe_serialize_cell_column_str__str_i8_cat(struct line_sender_buffer *__pyx_v_ls_buf, CYTHON_UNUSED struct qdb_pystr_buf *__pyx_v_b, struct __pyx_t_7questdb_7ingress_col_t *__pyx_v_col, PyThreadState **__pyx_v_gs) {
struct line_sender_error *__pyx_v_err;
struct line_sender_utf8 __pyx_v_utf8;
__pyx_t_7questdb_7ingress_void_int __pyx_r;
/* … */
/* function exit code */
__pyx_r = 0;
goto __pyx_L0;
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_2);
__Pyx_AddTraceback("questdb.ingress._dataframe_serialize_cell_column_str__str_i8_cat", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = -1;
__pyx_L0:;
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
2153: line_sender_buffer* ls_buf,
2154: qdb_pystr_buf* b,
2155: col_t* col,
2156: PyThreadState** gs) except -1:
+2157: cdef line_sender_error* err = NULL
__pyx_v_err = NULL;
2158: cdef line_sender_utf8 utf8
+2159: if _dataframe_arrow_get_cat_i8(&col.cursor, &utf8.len, &utf8.buf):
__pyx_t_1 = __pyx_f_7questdb_7ingress__dataframe_arrow_get_cat_i8((&__pyx_v_col->cursor), (&__pyx_v_utf8.len), (&__pyx_v_utf8.buf));
if (__pyx_t_1) {
/* … */
}
+2160: if not line_sender_buffer_column_str(ls_buf, col.name, utf8, &err):
__pyx_t_1 = (!line_sender_buffer_column_str(__pyx_v_ls_buf, __pyx_v_col->name, __pyx_v_utf8, (&__pyx_v_err)));
if (unlikely(__pyx_t_1)) {
/* … */
}
+2161: _ensure_has_gil(gs)
__pyx_f_7questdb_7ingress__ensure_has_gil(__pyx_v_gs); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 2161, __pyx_L1_error)
+2162: raise c_err_to_py(err)
__pyx_t_2 = __pyx_f_7questdb_7ingress_c_err_to_py(__pyx_v_err); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2162, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(1, 2162, __pyx_L1_error)
2163:
2164:
+2165: cdef void_int _dataframe_serialize_cell_column_str__str_i16_cat(
static __pyx_t_7questdb_7ingress_void_int __pyx_f_7questdb_7ingress__dataframe_serialize_cell_column_str__str_i16_cat(struct line_sender_buffer *__pyx_v_ls_buf, CYTHON_UNUSED struct qdb_pystr_buf *__pyx_v_b, struct __pyx_t_7questdb_7ingress_col_t *__pyx_v_col, PyThreadState **__pyx_v_gs) {
struct line_sender_error *__pyx_v_err;
struct line_sender_utf8 __pyx_v_utf8;
__pyx_t_7questdb_7ingress_void_int __pyx_r;
/* … */
/* function exit code */
__pyx_r = 0;
goto __pyx_L0;
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_2);
__Pyx_AddTraceback("questdb.ingress._dataframe_serialize_cell_column_str__str_i16_cat", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = -1;
__pyx_L0:;
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
2166: line_sender_buffer* ls_buf,
2167: qdb_pystr_buf* b,
2168: col_t* col,
2169: PyThreadState** gs) except -1:
+2170: cdef line_sender_error* err = NULL
__pyx_v_err = NULL;
2171: cdef line_sender_utf8 utf8
+2172: if _dataframe_arrow_get_cat_i16(&col.cursor, &utf8.len, &utf8.buf):
__pyx_t_1 = __pyx_f_7questdb_7ingress__dataframe_arrow_get_cat_i16((&__pyx_v_col->cursor), (&__pyx_v_utf8.len), (&__pyx_v_utf8.buf));
if (__pyx_t_1) {
/* … */
}
+2173: if not line_sender_buffer_column_str(ls_buf, col.name, utf8, &err):
__pyx_t_1 = (!line_sender_buffer_column_str(__pyx_v_ls_buf, __pyx_v_col->name, __pyx_v_utf8, (&__pyx_v_err)));
if (unlikely(__pyx_t_1)) {
/* … */
}
+2174: _ensure_has_gil(gs)
__pyx_f_7questdb_7ingress__ensure_has_gil(__pyx_v_gs); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 2174, __pyx_L1_error)
+2175: raise c_err_to_py(err)
__pyx_t_2 = __pyx_f_7questdb_7ingress_c_err_to_py(__pyx_v_err); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2175, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(1, 2175, __pyx_L1_error)
2176:
2177:
+2178: cdef void_int _dataframe_serialize_cell_column_str__str_i32_cat(
static __pyx_t_7questdb_7ingress_void_int __pyx_f_7questdb_7ingress__dataframe_serialize_cell_column_str__str_i32_cat(struct line_sender_buffer *__pyx_v_ls_buf, CYTHON_UNUSED struct qdb_pystr_buf *__pyx_v_b, struct __pyx_t_7questdb_7ingress_col_t *__pyx_v_col, PyThreadState **__pyx_v_gs) {
struct line_sender_error *__pyx_v_err;
struct line_sender_utf8 __pyx_v_utf8;
__pyx_t_7questdb_7ingress_void_int __pyx_r;
/* … */
/* function exit code */
__pyx_r = 0;
goto __pyx_L0;
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_2);
__Pyx_AddTraceback("questdb.ingress._dataframe_serialize_cell_column_str__str_i32_cat", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = -1;
__pyx_L0:;
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
2179: line_sender_buffer* ls_buf,
2180: qdb_pystr_buf* b,
2181: col_t* col,
2182: PyThreadState** gs) except -1:
+2183: cdef line_sender_error* err = NULL
__pyx_v_err = NULL;
2184: cdef line_sender_utf8 utf8
+2185: if _dataframe_arrow_get_cat_i32(&col.cursor, &utf8.len, &utf8.buf):
__pyx_t_1 = __pyx_f_7questdb_7ingress__dataframe_arrow_get_cat_i32((&__pyx_v_col->cursor), (&__pyx_v_utf8.len), (&__pyx_v_utf8.buf));
if (__pyx_t_1) {
/* … */
}
+2186: if not line_sender_buffer_column_str(ls_buf, col.name, utf8, &err):
__pyx_t_1 = (!line_sender_buffer_column_str(__pyx_v_ls_buf, __pyx_v_col->name, __pyx_v_utf8, (&__pyx_v_err)));
if (unlikely(__pyx_t_1)) {
/* … */
}
+2187: _ensure_has_gil(gs)
__pyx_f_7questdb_7ingress__ensure_has_gil(__pyx_v_gs); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 2187, __pyx_L1_error)
+2188: raise c_err_to_py(err)
__pyx_t_2 = __pyx_f_7questdb_7ingress_c_err_to_py(__pyx_v_err); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2188, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(1, 2188, __pyx_L1_error)
2189:
2190:
+2191: cdef void_int _dataframe_serialize_cell_column_ts__dt64ns_numpy(
static __pyx_t_7questdb_7ingress_void_int __pyx_f_7questdb_7ingress__dataframe_serialize_cell_column_ts__dt64ns_numpy(struct line_sender_buffer *__pyx_v_ls_buf, CYTHON_UNUSED struct qdb_pystr_buf *__pyx_v_b, struct __pyx_t_7questdb_7ingress_col_t *__pyx_v_col, PyThreadState **__pyx_v_gs) {
struct line_sender_error *__pyx_v_err;
int64_t *__pyx_v_access;
int64_t __pyx_v_cell;
__pyx_t_7questdb_7ingress_void_int __pyx_r;
/* … */
/* function exit code */
__pyx_r = 0;
goto __pyx_L0;
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_2);
__Pyx_AddTraceback("questdb.ingress._dataframe_serialize_cell_column_ts__dt64ns_numpy", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = -1;
__pyx_L0:;
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
2192: line_sender_buffer* ls_buf,
2193: qdb_pystr_buf* b,
2194: col_t* col,
2195: PyThreadState** gs) except -1:
+2196: cdef line_sender_error* err = NULL
__pyx_v_err = NULL;
+2197: cdef int64_t* access = <int64_t*>col.cursor.chunk.buffers[1]
__pyx_v_access = ((int64_t *)(__pyx_v_col->cursor.chunk->buffers[1]));
+2198: cdef int64_t cell = access[col.cursor.offset]
__pyx_v_cell = (__pyx_v_access[__pyx_v_col->cursor.offset]);
+2199: if cell != _NAT:
__pyx_t_1 = (__pyx_v_cell != __pyx_v_7questdb_7ingress__NAT);
if (__pyx_t_1) {
/* … */
}
+2200: if not line_sender_buffer_column_ts_nanos(ls_buf, col.name, cell, &err):
__pyx_t_1 = (!line_sender_buffer_column_ts_nanos(__pyx_v_ls_buf, __pyx_v_col->name, __pyx_v_cell, (&__pyx_v_err)));
if (unlikely(__pyx_t_1)) {
/* … */
}
+2201: _ensure_has_gil(gs)
__pyx_f_7questdb_7ingress__ensure_has_gil(__pyx_v_gs); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 2201, __pyx_L1_error)
+2202: raise c_err_to_py(err)
__pyx_t_2 = __pyx_f_7questdb_7ingress_c_err_to_py(__pyx_v_err); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2202, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(1, 2202, __pyx_L1_error)
2203:
2204:
+2205: cdef void_int _dataframe_serialize_cell_column_ts__dt64us_numpy(
static __pyx_t_7questdb_7ingress_void_int __pyx_f_7questdb_7ingress__dataframe_serialize_cell_column_ts__dt64us_numpy(struct line_sender_buffer *__pyx_v_ls_buf, CYTHON_UNUSED struct qdb_pystr_buf *__pyx_v_b, struct __pyx_t_7questdb_7ingress_col_t *__pyx_v_col, PyThreadState **__pyx_v_gs) {
struct line_sender_error *__pyx_v_err;
int64_t *__pyx_v_access;
int64_t __pyx_v_cell;
__pyx_t_7questdb_7ingress_void_int __pyx_r;
/* … */
/* function exit code */
__pyx_r = 0;
goto __pyx_L0;
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_2);
__Pyx_AddTraceback("questdb.ingress._dataframe_serialize_cell_column_ts__dt64us_numpy", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = -1;
__pyx_L0:;
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
2206: line_sender_buffer* ls_buf,
2207: qdb_pystr_buf* b,
2208: col_t* col,
2209: PyThreadState** gs) except -1:
+2210: cdef line_sender_error* err = NULL
__pyx_v_err = NULL;
+2211: cdef int64_t* access = <int64_t*>col.cursor.chunk.buffers[1]
__pyx_v_access = ((int64_t *)(__pyx_v_col->cursor.chunk->buffers[1]));
+2212: cdef int64_t cell = access[col.cursor.offset]
__pyx_v_cell = (__pyx_v_access[__pyx_v_col->cursor.offset]);
+2213: if cell != _NAT:
__pyx_t_1 = (__pyx_v_cell != __pyx_v_7questdb_7ingress__NAT);
if (__pyx_t_1) {
/* … */
}
+2214: if not line_sender_buffer_column_ts_micros(ls_buf, col.name, cell, &err):
__pyx_t_1 = (!line_sender_buffer_column_ts_micros(__pyx_v_ls_buf, __pyx_v_col->name, __pyx_v_cell, (&__pyx_v_err)));
if (unlikely(__pyx_t_1)) {
/* … */
}
+2215: _ensure_has_gil(gs)
__pyx_f_7questdb_7ingress__ensure_has_gil(__pyx_v_gs); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 2215, __pyx_L1_error)
+2216: raise c_err_to_py(err)
__pyx_t_2 = __pyx_f_7questdb_7ingress_c_err_to_py(__pyx_v_err); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2216, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(1, 2216, __pyx_L1_error)
2217:
2218:
+2219: cdef void_int _dataframe_serialize_cell_column_arr_f64__arr_f64_numpyobj(
static __pyx_t_7questdb_7ingress_void_int __pyx_f_7questdb_7ingress__dataframe_serialize_cell_column_arr_f64__arr_f64_numpyobj(struct line_sender_buffer *__pyx_v_ls_buf, CYTHON_UNUSED struct qdb_pystr_buf *__pyx_v_b, struct __pyx_t_7questdb_7ingress_col_t *__pyx_v_col) {
PyObject **__pyx_v_access;
PyObject *__pyx_v_cell;
PyArrayObject *__pyx_v_arr;
npy_int __pyx_v_arr_type;
PyArray_Descr *__pyx_v_arr_descr = 0;
size_t __pyx_v_rank;
double const *__pyx_v_data_ptr;
struct line_sender_error *__pyx_v_err;
__pyx_t_7questdb_7ingress_void_int __pyx_r;
/* … */
/* function exit code */
__pyx_r = 0;
goto __pyx_L0;
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_2);
__Pyx_XDECREF(__pyx_t_3);
__Pyx_XDECREF(__pyx_t_4);
__Pyx_XDECREF(__pyx_t_5);
__Pyx_XDECREF(__pyx_t_6);
__Pyx_XDECREF(__pyx_t_7);
__Pyx_AddTraceback("questdb.ingress._dataframe_serialize_cell_column_arr_f64__arr_f64_numpyobj", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = -1;
__pyx_L0:;
__Pyx_XDECREF((PyObject *)__pyx_v_arr_descr);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
2220: line_sender_buffer* ls_buf,
2221: qdb_pystr_buf* b,
2222: col_t* col) except -1:
+2223: cdef PyObject** access = <PyObject**>col.cursor.chunk.buffers[1]
__pyx_v_access = ((PyObject **)(__pyx_v_col->cursor.chunk->buffers[1]));
+2224: cdef PyObject* cell = access[col.cursor.offset]
__pyx_v_cell = (__pyx_v_access[__pyx_v_col->cursor.offset]);
+2225: cdef PyArrayObject* arr = <PyArrayObject*> cell
__pyx_v_arr = ((PyArrayObject *)__pyx_v_cell);
+2226: cdef npy_int arr_type = PyArray_TYPE(arr)
__pyx_v_arr_type = PyArray_TYPE(__pyx_v_arr);
2227: cdef cnp.dtype arr_descr
+2228: if arr_type != NPY_DOUBLE:
__pyx_t_1 = (__pyx_v_arr_type != NPY_DOUBLE);
if (unlikely(__pyx_t_1)) {
/* … */
}
+2229: arr_descr = cnp.PyArray_DescrFromType(arr_type)
__pyx_t_2 = ((PyObject *)PyArray_DescrFromType(__pyx_v_arr_type)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2229, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_arr_descr = ((PyArray_Descr *)__pyx_t_2); __pyx_t_2 = 0;
+2230: raise IngressError(
__pyx_t_3 = NULL;
__Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_IngressError); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2230, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
+2231: IngressErrorCode.ArrayWriteToBufferError,
__Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_IngressErrorCode); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2231, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_ArrayWriteToBufferError); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 2231, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+2232: f'Only float64 numpy arrays are supported, got dtype: {arr_descr}')
__pyx_t_5 = __Pyx_PyObject_FormatSimple(((PyObject *)__pyx_v_arr_descr), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2232, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_7 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_Only_float64_numpy_arrays_are_su, __pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 2232, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_8 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); assert(__pyx_t_3); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); __pyx_t_8 = 0; } #endif { PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_t_6, __pyx_t_7}; __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_8, (3-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2230, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(1, 2230, __pyx_L1_error)
2233: cdef:
+2234: size_t rank = PyArray_NDIM(arr)
__pyx_v_rank = PyArray_NDIM(__pyx_v_arr);
+2235: const double* data_ptr = <const double *> PyArray_DATA(arr)
__pyx_v_data_ptr = ((double const *)PyArray_DATA(__pyx_v_arr));
+2236: line_sender_error * err = NULL
__pyx_v_err = NULL;
2237:
+2238: if PyArray_FLAGS(arr) & NPY_ARRAY_C_CONTIGUOUS != 0:
__pyx_t_1 = ((PyArray_FLAGS(__pyx_v_arr) & NPY_ARRAY_C_CONTIGUOUS) != 0);
if (__pyx_t_1) {
/* … */
goto __pyx_L4;
}
+2239: if not line_sender_buffer_column_f64_arr_c_major(
__pyx_t_1 = (!line_sender_buffer_column_f64_arr_c_major(__pyx_v_ls_buf, __pyx_v_col->name, __pyx_v_rank, ((size_t const *)PyArray_DIMS(__pyx_v_arr)), __pyx_v_data_ptr, PyArray_SIZE(__pyx_v_arr), (&__pyx_v_err))); if (unlikely(__pyx_t_1)) { /* … */ }
2240: ls_buf,
2241: col.name,
2242: rank,
2243: <const size_t *> PyArray_DIMS(arr),
2244: data_ptr,
2245: PyArray_SIZE(arr),
2246: &err):
+2247: raise c_err_to_py(err)
__pyx_t_2 = __pyx_f_7questdb_7ingress_c_err_to_py(__pyx_v_err); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2247, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(1, 2247, __pyx_L1_error)
2248: else:
+2249: if not line_sender_buffer_column_f64_arr_byte_strides(
/*else*/ {
/* … */
__pyx_t_1 = (!line_sender_buffer_column_f64_arr_byte_strides(__pyx_v_ls_buf, __pyx_v_col->name, __pyx_v_rank, ((size_t const *)PyArray_DIMS(__pyx_v_arr)), ((Py_ssize_t const *)PyArray_STRIDES(__pyx_v_arr)), __pyx_v_data_ptr, PyArray_SIZE(__pyx_v_arr), (&__pyx_v_err)));
/* … */
if (unlikely(__pyx_t_1)) {
/* … */
}
}
__pyx_L4:;
2250: ls_buf,
2251: col.name,
2252: rank,
2253: <const size_t*> PyArray_DIMS(arr),
2254: <const ssize_t*> PyArray_STRIDES(arr), # N.B.: Strides expressed as byte jumps
2255: data_ptr,
2256: PyArray_SIZE(arr),
2257: &err):
+2258: raise c_err_to_py(err)
__pyx_t_2 = __pyx_f_7questdb_7ingress_c_err_to_py(__pyx_v_err); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2258, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(1, 2258, __pyx_L1_error)
2259:
+2260: cdef void_int serialize_decimal_py_obj(line_sender_buffer *buf, line_sender_column_name c_name, PyObject* value) except -1:
static __pyx_t_7questdb_7ingress_void_int __pyx_f_7questdb_7ingress_serialize_decimal_py_obj(struct line_sender_buffer *__pyx_v_buf, struct line_sender_column_name __pyx_v_c_name, PyObject *__pyx_v_value) {
struct line_sender_error *__pyx_v_err;
unsigned int __pyx_v_scale;
uint8_t __pyx_v_unscaled[32];
int __pyx_v_unscaled_length;
__pyx_t_7questdb_7ingress_void_int __pyx_r;
/* … */
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
__Pyx_XDECREF(__pyx_t_2);
__Pyx_XDECREF(__pyx_t_3);
__Pyx_AddTraceback("questdb.ingress.serialize_decimal_py_obj", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = -1;
__pyx_L0:;
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
+2261: cdef line_sender_error* err = NULL
__pyx_v_err = NULL;
+2262: cdef unsigned int scale = 0
__pyx_v_scale = 0;
2263: cdef uint8_t[32] unscaled
2264: cdef int unscaled_length
2265:
+2266: unscaled_length = decimal_pyobj_to_binary(
__pyx_t_4 = __pyx_f_7questdb_16mpdecimal_compat_decimal_pyobj_to_binary(__pyx_v_value, __pyx_v_unscaled, (&__pyx_v_scale), __pyx_t_1, __pyx_t_3); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 2266, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_unscaled_length = __pyx_t_4;
2267: value,
2268: unscaled,
2269: &scale,
+2270: IngressError,
__Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_IngressError); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2270, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1);
+2271: IngressErrorCode.BadDataFrame)
__Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_IngressErrorCode); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2271, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_BadDataFrame); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2271, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+2272: if unscaled_length == 0:
__pyx_t_5 = (__pyx_v_unscaled_length == 0);
if (__pyx_t_5) {
/* … */
}
+2273: return 0
__pyx_r = 0;
goto __pyx_L0;
2274:
+2275: if not line_sender_buffer_column_dec(buf, c_name, scale, unscaled, <size_t>unscaled_length, &err):
__pyx_t_5 = (!line_sender_buffer_column_dec(__pyx_v_buf, __pyx_v_c_name, __pyx_v_scale, __pyx_v_unscaled, ((size_t)__pyx_v_unscaled_length), (&__pyx_v_err)));
if (unlikely(__pyx_t_5)) {
/* … */
}
+2276: raise c_err_to_py(err)
__pyx_t_3 = __pyx_f_7questdb_7ingress_c_err_to_py(__pyx_v_err); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2276, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(1, 2276, __pyx_L1_error)
2277:
+2278: return 0
__pyx_r = 0; goto __pyx_L0;
2279:
2280:
+2281: cdef void_int _dataframe_serialize_cell_column_decimal__decimal_pyobj(
static __pyx_t_7questdb_7ingress_void_int __pyx_f_7questdb_7ingress__dataframe_serialize_cell_column_decimal__decimal_pyobj(struct line_sender_buffer *__pyx_v_ls_buf, CYTHON_UNUSED struct qdb_pystr_buf *__pyx_v_b, struct __pyx_t_7questdb_7ingress_col_t *__pyx_v_col) {
PyObject **__pyx_v_access;
PyObject *__pyx_v_cell;
__pyx_t_7questdb_7ingress_void_int __pyx_r;
/* … */
/* function exit code */
__pyx_L1_error:;
__Pyx_AddTraceback("questdb.ingress._dataframe_serialize_cell_column_decimal__decimal_pyobj", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = -1;
__pyx_L0:;
return __pyx_r;
}
2282: line_sender_buffer* ls_buf,
2283: qdb_pystr_buf* b,
2284: col_t* col) except -1:
+2285: cdef PyObject** access = <PyObject**>col.cursor.chunk.buffers[1]
__pyx_v_access = ((PyObject **)(__pyx_v_col->cursor.chunk->buffers[1]));
+2286: cdef PyObject* cell = access[col.cursor.offset]
__pyx_v_cell = (__pyx_v_access[__pyx_v_col->cursor.offset]);
2287:
+2288: if _dataframe_is_null_pyobj(cell):
__pyx_t_1 = __pyx_f_7questdb_7ingress__dataframe_is_null_pyobj(__pyx_v_cell);
if (__pyx_t_1) {
/* … */
}
+2289: return 0
__pyx_r = 0;
goto __pyx_L0;
2290:
+2291: return serialize_decimal_py_obj(ls_buf, col.name, cell)
__pyx_t_2 = __pyx_f_7questdb_7ingress_serialize_decimal_py_obj(__pyx_v_ls_buf, __pyx_v_col->name, __pyx_v_cell); if (unlikely(__pyx_t_2 == ((__pyx_t_7questdb_7ingress_void_int)-1))) __PYX_ERR(1, 2291, __pyx_L1_error)
__pyx_r = __pyx_t_2;
goto __pyx_L0;
2292:
2293:
+2294: cdef void_int _dataframe_serialize_cell_column_decimal__decimal32_arrow(
static __pyx_t_7questdb_7ingress_void_int __pyx_f_7questdb_7ingress__dataframe_serialize_cell_column_decimal__decimal32_arrow(struct line_sender_buffer *__pyx_v_ls_buf, CYTHON_UNUSED struct qdb_pystr_buf *__pyx_v_b, struct __pyx_t_7questdb_7ingress_col_t *__pyx_v_col, PyThreadState **__pyx_v_gs) {
struct line_sender_error *__pyx_v_err;
int __pyx_v_valid;
uint32_t __pyx_v_value;
__pyx_t_7questdb_7ingress_void_int __pyx_r;
/* … */
/* function exit code */
__pyx_r = 0;
goto __pyx_L0;
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_2);
__Pyx_AddTraceback("questdb.ingress._dataframe_serialize_cell_column_decimal__decimal32_arrow", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = -1;
__pyx_L0:;
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
2295: line_sender_buffer* ls_buf,
2296: qdb_pystr_buf* b,
2297: col_t* col,
2298: PyThreadState** gs) except -1:
+2299: cdef line_sender_error* err = NULL
__pyx_v_err = NULL;
+2300: cdef bint valid = _dataframe_arrow_is_valid(&col.cursor)
__pyx_v_valid = __pyx_f_7questdb_7ingress__dataframe_arrow_is_valid((&__pyx_v_col->cursor));
2301: cdef uint32_t value
+2302: if valid:
if (__pyx_v_valid) {
/* … */
}
+2303: value = bswap32((<uint32_t*>col.cursor.chunk.buffers[1])[col.cursor.offset])
__pyx_v_value = __pyx_f_7questdb_7ingress_bswap32((((uint32_t *)(__pyx_v_col->cursor.chunk->buffers[1]))[__pyx_v_col->cursor.offset]));
+2304: if not line_sender_buffer_column_dec(ls_buf, col.name, col.scale, <uint8_t *> &value, sizeof(value), &err):
__pyx_t_1 = (!line_sender_buffer_column_dec(__pyx_v_ls_buf, __pyx_v_col->name, __pyx_v_col->scale, ((uint8_t *)(&__pyx_v_value)), (sizeof(__pyx_v_value)), (&__pyx_v_err)));
if (unlikely(__pyx_t_1)) {
/* … */
}
+2305: _ensure_has_gil(gs)
__pyx_f_7questdb_7ingress__ensure_has_gil(__pyx_v_gs); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 2305, __pyx_L1_error)
+2306: raise c_err_to_py(err)
__pyx_t_2 = __pyx_f_7questdb_7ingress_c_err_to_py(__pyx_v_err); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2306, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(1, 2306, __pyx_L1_error)
2307:
+2308: cdef void_int _dataframe_serialize_cell_column_decimal__decimal64_arrow(
static __pyx_t_7questdb_7ingress_void_int __pyx_f_7questdb_7ingress__dataframe_serialize_cell_column_decimal__decimal64_arrow(struct line_sender_buffer *__pyx_v_ls_buf, CYTHON_UNUSED struct qdb_pystr_buf *__pyx_v_b, struct __pyx_t_7questdb_7ingress_col_t *__pyx_v_col, PyThreadState **__pyx_v_gs) {
struct line_sender_error *__pyx_v_err;
int __pyx_v_valid;
uint64_t __pyx_v_value;
__pyx_t_7questdb_7ingress_void_int __pyx_r;
/* … */
/* function exit code */
__pyx_r = 0;
goto __pyx_L0;
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_2);
__Pyx_AddTraceback("questdb.ingress._dataframe_serialize_cell_column_decimal__decimal64_arrow", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = -1;
__pyx_L0:;
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
2309: line_sender_buffer* ls_buf,
2310: qdb_pystr_buf* b,
2311: col_t* col,
2312: PyThreadState** gs) except -1:
+2313: cdef line_sender_error* err = NULL
__pyx_v_err = NULL;
+2314: cdef bint valid = _dataframe_arrow_is_valid(&col.cursor)
__pyx_v_valid = __pyx_f_7questdb_7ingress__dataframe_arrow_is_valid((&__pyx_v_col->cursor));
2315: cdef uint64_t value
+2316: if valid:
if (__pyx_v_valid) {
/* … */
}
+2317: value = bswap64((<uint64_t*>col.cursor.chunk.buffers[1])[col.cursor.offset])
__pyx_v_value = __pyx_f_7questdb_7ingress_bswap64((((uint64_t *)(__pyx_v_col->cursor.chunk->buffers[1]))[__pyx_v_col->cursor.offset]));
+2318: if not line_sender_buffer_column_dec(ls_buf, col.name, col.scale, <uint8_t *> &value, sizeof(value), &err):
__pyx_t_1 = (!line_sender_buffer_column_dec(__pyx_v_ls_buf, __pyx_v_col->name, __pyx_v_col->scale, ((uint8_t *)(&__pyx_v_value)), (sizeof(__pyx_v_value)), (&__pyx_v_err)));
if (unlikely(__pyx_t_1)) {
/* … */
}
+2319: _ensure_has_gil(gs)
__pyx_f_7questdb_7ingress__ensure_has_gil(__pyx_v_gs); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 2319, __pyx_L1_error)
+2320: raise c_err_to_py(err)
__pyx_t_2 = __pyx_f_7questdb_7ingress_c_err_to_py(__pyx_v_err); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2320, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(1, 2320, __pyx_L1_error)
2321:
+2322: cdef void_int _dataframe_serialize_cell_column_decimal__decimal128_arrow(
static __pyx_t_7questdb_7ingress_void_int __pyx_f_7questdb_7ingress__dataframe_serialize_cell_column_decimal__decimal128_arrow(struct line_sender_buffer *__pyx_v_ls_buf, CYTHON_UNUSED struct qdb_pystr_buf *__pyx_v_b, struct __pyx_t_7questdb_7ingress_col_t *__pyx_v_col, PyThreadState **__pyx_v_gs) {
struct line_sender_error *__pyx_v_err;
int __pyx_v_valid;
uint64_t *__pyx_v_cell;
uint64_t __pyx_v_value[2];
__pyx_t_7questdb_7ingress_void_int __pyx_r;
/* … */
/* function exit code */
__pyx_r = 0;
goto __pyx_L0;
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_2);
__Pyx_AddTraceback("questdb.ingress._dataframe_serialize_cell_column_decimal__decimal128_arrow", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = -1;
__pyx_L0:;
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
2323: line_sender_buffer* ls_buf,
2324: qdb_pystr_buf* b,
2325: col_t* col,
2326: PyThreadState** gs) except -1:
+2327: cdef line_sender_error* err = NULL
__pyx_v_err = NULL;
+2328: cdef bint valid = _dataframe_arrow_is_valid(&col.cursor)
__pyx_v_valid = __pyx_f_7questdb_7ingress__dataframe_arrow_is_valid((&__pyx_v_col->cursor));
2329: cdef uint64_t *cell
2330: cdef uint64_t[2] value
+2331: if valid:
if (__pyx_v_valid) {
/* … */
}
+2332: cell = &(<uint64_t*>col.cursor.chunk.buffers[1])[col.cursor.offset << 1]
__pyx_v_cell = (&(((uint64_t *)(__pyx_v_col->cursor.chunk->buffers[1]))[(__pyx_v_col->cursor.offset << 1)]));
+2333: value[0] = bswap64(cell[1])
(__pyx_v_value[0]) = __pyx_f_7questdb_7ingress_bswap64((__pyx_v_cell[1]));
+2334: value[1] = bswap64(cell[0])
(__pyx_v_value[1]) = __pyx_f_7questdb_7ingress_bswap64((__pyx_v_cell[0]));
+2335: if not line_sender_buffer_column_dec(ls_buf, col.name, col.scale, <uint8_t *> value, 16, &err):
__pyx_t_1 = (!line_sender_buffer_column_dec(__pyx_v_ls_buf, __pyx_v_col->name, __pyx_v_col->scale, ((uint8_t *)__pyx_v_value), 16, (&__pyx_v_err)));
if (unlikely(__pyx_t_1)) {
/* … */
}
+2336: _ensure_has_gil(gs)
__pyx_f_7questdb_7ingress__ensure_has_gil(__pyx_v_gs); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 2336, __pyx_L1_error)
+2337: raise c_err_to_py(err)
__pyx_t_2 = __pyx_f_7questdb_7ingress_c_err_to_py(__pyx_v_err); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2337, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(1, 2337, __pyx_L1_error)
2338:
+2339: cdef void_int _dataframe_serialize_cell_column_decimal__decimal256_arrow(
static __pyx_t_7questdb_7ingress_void_int __pyx_f_7questdb_7ingress__dataframe_serialize_cell_column_decimal__decimal256_arrow(struct line_sender_buffer *__pyx_v_ls_buf, CYTHON_UNUSED struct qdb_pystr_buf *__pyx_v_b, struct __pyx_t_7questdb_7ingress_col_t *__pyx_v_col, PyThreadState **__pyx_v_gs) {
struct line_sender_error *__pyx_v_err;
int __pyx_v_valid;
uint64_t *__pyx_v_cell;
uint64_t __pyx_v_value[4];
__pyx_t_7questdb_7ingress_void_int __pyx_r;
/* … */
/* function exit code */
__pyx_r = 0;
goto __pyx_L0;
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_2);
__Pyx_AddTraceback("questdb.ingress._dataframe_serialize_cell_column_decimal__decimal256_arrow", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = -1;
__pyx_L0:;
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
2340: line_sender_buffer* ls_buf,
2341: qdb_pystr_buf* b,
2342: col_t* col,
2343: PyThreadState** gs) except -1:
+2344: cdef line_sender_error* err = NULL
__pyx_v_err = NULL;
+2345: cdef bint valid = _dataframe_arrow_is_valid(&col.cursor)
__pyx_v_valid = __pyx_f_7questdb_7ingress__dataframe_arrow_is_valid((&__pyx_v_col->cursor));
2346: cdef uint64_t *cell
2347: cdef uint64_t[4] value
+2348: if valid:
if (__pyx_v_valid) {
/* … */
}
+2349: cell = &(<uint64_t*>col.cursor.chunk.buffers[1])[col.cursor.offset << 2]
__pyx_v_cell = (&(((uint64_t *)(__pyx_v_col->cursor.chunk->buffers[1]))[(__pyx_v_col->cursor.offset << 2)]));
+2350: value[0] = bswap64(cell[3])
(__pyx_v_value[0]) = __pyx_f_7questdb_7ingress_bswap64((__pyx_v_cell[3]));
+2351: value[1] = bswap64(cell[2])
(__pyx_v_value[1]) = __pyx_f_7questdb_7ingress_bswap64((__pyx_v_cell[2]));
+2352: value[2] = bswap64(cell[1])
(__pyx_v_value[2]) = __pyx_f_7questdb_7ingress_bswap64((__pyx_v_cell[1]));
+2353: value[3] = bswap64(cell[0])
(__pyx_v_value[3]) = __pyx_f_7questdb_7ingress_bswap64((__pyx_v_cell[0]));
+2354: if not line_sender_buffer_column_dec(ls_buf, col.name, col.scale, <uint8_t *> value, 32, &err):
__pyx_t_1 = (!line_sender_buffer_column_dec(__pyx_v_ls_buf, __pyx_v_col->name, __pyx_v_col->scale, ((uint8_t *)__pyx_v_value), 32, (&__pyx_v_err)));
if (unlikely(__pyx_t_1)) {
/* … */
}
+2355: _ensure_has_gil(gs)
__pyx_f_7questdb_7ingress__ensure_has_gil(__pyx_v_gs); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 2355, __pyx_L1_error)
+2356: raise c_err_to_py(err)
__pyx_t_2 = __pyx_f_7questdb_7ingress_c_err_to_py(__pyx_v_err); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2356, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(1, 2356, __pyx_L1_error)
2357:
2358:
+2359: cdef void_int _dataframe_serialize_cell_column_ts__dt64ns_tz_arrow(
static __pyx_t_7questdb_7ingress_void_int __pyx_f_7questdb_7ingress__dataframe_serialize_cell_column_ts__dt64ns_tz_arrow(struct line_sender_buffer *__pyx_v_ls_buf, CYTHON_UNUSED struct qdb_pystr_buf *__pyx_v_b, struct __pyx_t_7questdb_7ingress_col_t *__pyx_v_col, PyThreadState **__pyx_v_gs) {
struct line_sender_error *__pyx_v_err;
int __pyx_v_valid;
int64_t __pyx_v_cell;
int64_t *__pyx_v_access;
__pyx_t_7questdb_7ingress_void_int __pyx_r;
/* … */
/* function exit code */
__pyx_r = 0;
goto __pyx_L0;
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_2);
__Pyx_AddTraceback("questdb.ingress._dataframe_serialize_cell_column_ts__dt64ns_tz_arrow", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = -1;
__pyx_L0:;
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
2360: line_sender_buffer* ls_buf,
2361: qdb_pystr_buf* b,
2362: col_t* col,
2363: PyThreadState** gs) except -1:
+2364: cdef line_sender_error* err = NULL
__pyx_v_err = NULL;
+2365: cdef bint valid = _dataframe_arrow_is_valid(&col.cursor)
__pyx_v_valid = __pyx_f_7questdb_7ingress__dataframe_arrow_is_valid((&__pyx_v_col->cursor));
2366: cdef int64_t cell
2367: cdef int64_t* access
+2368: if valid:
if (__pyx_v_valid) {
/* … */
}
+2369: access = <int64_t*>col.cursor.chunk.buffers[1]
__pyx_v_access = ((int64_t *)(__pyx_v_col->cursor.chunk->buffers[1]));
+2370: cell = access[col.cursor.offset]
__pyx_v_cell = (__pyx_v_access[__pyx_v_col->cursor.offset]);
+2371: if not line_sender_buffer_column_ts_nanos(ls_buf, col.name, cell, &err):
__pyx_t_1 = (!line_sender_buffer_column_ts_nanos(__pyx_v_ls_buf, __pyx_v_col->name, __pyx_v_cell, (&__pyx_v_err)));
if (unlikely(__pyx_t_1)) {
/* … */
}
+2372: _ensure_has_gil(gs)
__pyx_f_7questdb_7ingress__ensure_has_gil(__pyx_v_gs); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 2372, __pyx_L1_error)
+2373: raise c_err_to_py(err)
__pyx_t_2 = __pyx_f_7questdb_7ingress_c_err_to_py(__pyx_v_err); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2373, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(1, 2373, __pyx_L1_error)
2374:
2375:
+2376: cdef void_int _dataframe_serialize_cell_column_ts__dt64us_tz_arrow(
static __pyx_t_7questdb_7ingress_void_int __pyx_f_7questdb_7ingress__dataframe_serialize_cell_column_ts__dt64us_tz_arrow(struct line_sender_buffer *__pyx_v_ls_buf, CYTHON_UNUSED struct qdb_pystr_buf *__pyx_v_b, struct __pyx_t_7questdb_7ingress_col_t *__pyx_v_col, PyThreadState **__pyx_v_gs) {
struct line_sender_error *__pyx_v_err;
int __pyx_v_valid;
int64_t __pyx_v_cell;
int64_t *__pyx_v_access;
__pyx_t_7questdb_7ingress_void_int __pyx_r;
/* … */
/* function exit code */
__pyx_r = 0;
goto __pyx_L0;
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_2);
__Pyx_AddTraceback("questdb.ingress._dataframe_serialize_cell_column_ts__dt64us_tz_arrow", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = -1;
__pyx_L0:;
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
2377: line_sender_buffer* ls_buf,
2378: qdb_pystr_buf* b,
2379: col_t* col,
2380: PyThreadState** gs) except -1:
+2381: cdef line_sender_error* err = NULL
__pyx_v_err = NULL;
+2382: cdef bint valid = _dataframe_arrow_is_valid(&col.cursor)
__pyx_v_valid = __pyx_f_7questdb_7ingress__dataframe_arrow_is_valid((&__pyx_v_col->cursor));
2383: cdef int64_t cell
2384: cdef int64_t* access
+2385: if valid:
if (__pyx_v_valid) {
/* … */
}
+2386: access = <int64_t*>col.cursor.chunk.buffers[1]
__pyx_v_access = ((int64_t *)(__pyx_v_col->cursor.chunk->buffers[1]));
+2387: cell = access[col.cursor.offset]
__pyx_v_cell = (__pyx_v_access[__pyx_v_col->cursor.offset]);
+2388: if not line_sender_buffer_column_ts_micros(ls_buf, col.name, cell, &err):
__pyx_t_1 = (!line_sender_buffer_column_ts_micros(__pyx_v_ls_buf, __pyx_v_col->name, __pyx_v_cell, (&__pyx_v_err)));
if (unlikely(__pyx_t_1)) {
/* … */
}
+2389: _ensure_has_gil(gs)
__pyx_f_7questdb_7ingress__ensure_has_gil(__pyx_v_gs); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 2389, __pyx_L1_error)
+2390: raise c_err_to_py(err)
__pyx_t_2 = __pyx_f_7questdb_7ingress_c_err_to_py(__pyx_v_err); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2390, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(1, 2390, __pyx_L1_error)
2391:
2392:
+2393: cdef void_int _dataframe_serialize_cell_at_dt64ns_numpy(
static __pyx_t_7questdb_7ingress_void_int __pyx_f_7questdb_7ingress__dataframe_serialize_cell_at_dt64ns_numpy(struct line_sender_buffer *__pyx_v_ls_buf, CYTHON_UNUSED struct qdb_pystr_buf *__pyx_v_b, struct __pyx_t_7questdb_7ingress_col_t *__pyx_v_col, PyThreadState **__pyx_v_gs) {
struct line_sender_error *__pyx_v_err;
int64_t *__pyx_v_access;
int64_t __pyx_v_cell;
__pyx_t_7questdb_7ingress_void_int __pyx_r;
/* … */
/* function exit code */
__pyx_r = 0;
goto __pyx_L0;
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_2);
__Pyx_AddTraceback("questdb.ingress._dataframe_serialize_cell_at_dt64ns_numpy", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = -1;
__pyx_L0:;
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
2394: line_sender_buffer* ls_buf,
2395: qdb_pystr_buf* b,
2396: col_t* col,
2397: PyThreadState** gs) except -1:
+2398: cdef line_sender_error* err = NULL
__pyx_v_err = NULL;
+2399: cdef int64_t* access = <int64_t*>col.cursor.chunk.buffers[1]
__pyx_v_access = ((int64_t *)(__pyx_v_col->cursor.chunk->buffers[1]));
+2400: cdef int64_t cell = access[col.cursor.offset]
__pyx_v_cell = (__pyx_v_access[__pyx_v_col->cursor.offset]);
+2401: if cell == _NAT:
__pyx_t_1 = (__pyx_v_cell == __pyx_v_7questdb_7ingress__NAT);
if (__pyx_t_1) {
/* … */
goto __pyx_L3;
}
+2402: if not line_sender_buffer_at_now(ls_buf, &err):
__pyx_t_1 = (!line_sender_buffer_at_now(__pyx_v_ls_buf, (&__pyx_v_err)));
if (unlikely(__pyx_t_1)) {
/* … */
}
+2403: _ensure_has_gil(gs)
__pyx_f_7questdb_7ingress__ensure_has_gil(__pyx_v_gs); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 2403, __pyx_L1_error)
+2404: raise c_err_to_py(err)
__pyx_t_2 = __pyx_f_7questdb_7ingress_c_err_to_py(__pyx_v_err); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2404, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(1, 2404, __pyx_L1_error)
2405: else:
2406: # Note: ls_buf will validate against negative numbers.
+2407: if not line_sender_buffer_at_nanos(ls_buf, cell, &err):
/*else*/ {
__pyx_t_1 = (!line_sender_buffer_at_nanos(__pyx_v_ls_buf, __pyx_v_cell, (&__pyx_v_err)));
if (unlikely(__pyx_t_1)) {
/* … */
}
}
__pyx_L3:;
+2408: _ensure_has_gil(gs)
__pyx_f_7questdb_7ingress__ensure_has_gil(__pyx_v_gs); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 2408, __pyx_L1_error)
+2409: raise c_err_to_py(err)
__pyx_t_2 = __pyx_f_7questdb_7ingress_c_err_to_py(__pyx_v_err); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2409, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(1, 2409, __pyx_L1_error)
2410:
2411:
+2412: cdef void_int _dataframe_serialize_cell_at_dt64us_numpy(
static __pyx_t_7questdb_7ingress_void_int __pyx_f_7questdb_7ingress__dataframe_serialize_cell_at_dt64us_numpy(struct line_sender_buffer *__pyx_v_ls_buf, CYTHON_UNUSED struct qdb_pystr_buf *__pyx_v_b, struct __pyx_t_7questdb_7ingress_col_t *__pyx_v_col, PyThreadState **__pyx_v_gs) {
struct line_sender_error *__pyx_v_err;
int64_t *__pyx_v_access;
int64_t __pyx_v_cell;
__pyx_t_7questdb_7ingress_void_int __pyx_r;
/* … */
/* function exit code */
__pyx_r = 0;
goto __pyx_L0;
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_2);
__Pyx_AddTraceback("questdb.ingress._dataframe_serialize_cell_at_dt64us_numpy", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = -1;
__pyx_L0:;
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
2413: line_sender_buffer* ls_buf,
2414: qdb_pystr_buf* b,
2415: col_t* col,
2416: PyThreadState** gs) except -1:
+2417: cdef line_sender_error* err = NULL
__pyx_v_err = NULL;
+2418: cdef int64_t* access = <int64_t*>col.cursor.chunk.buffers[1]
__pyx_v_access = ((int64_t *)(__pyx_v_col->cursor.chunk->buffers[1]));
+2419: cdef int64_t cell = access[col.cursor.offset]
__pyx_v_cell = (__pyx_v_access[__pyx_v_col->cursor.offset]);
+2420: if cell == _NAT:
__pyx_t_1 = (__pyx_v_cell == __pyx_v_7questdb_7ingress__NAT);
if (__pyx_t_1) {
/* … */
goto __pyx_L3;
}
+2421: if not line_sender_buffer_at_now(ls_buf, &err):
__pyx_t_1 = (!line_sender_buffer_at_now(__pyx_v_ls_buf, (&__pyx_v_err)));
if (unlikely(__pyx_t_1)) {
/* … */
}
+2422: _ensure_has_gil(gs)
__pyx_f_7questdb_7ingress__ensure_has_gil(__pyx_v_gs); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 2422, __pyx_L1_error)
+2423: raise c_err_to_py(err)
__pyx_t_2 = __pyx_f_7questdb_7ingress_c_err_to_py(__pyx_v_err); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2423, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(1, 2423, __pyx_L1_error)
2424: else:
2425: # Note: ls_buf will validate against negative numbers.
+2426: if not line_sender_buffer_at_micros(ls_buf, cell, &err):
/*else*/ {
__pyx_t_1 = (!line_sender_buffer_at_micros(__pyx_v_ls_buf, __pyx_v_cell, (&__pyx_v_err)));
if (unlikely(__pyx_t_1)) {
/* … */
}
}
__pyx_L3:;
+2427: _ensure_has_gil(gs)
__pyx_f_7questdb_7ingress__ensure_has_gil(__pyx_v_gs); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 2427, __pyx_L1_error)
+2428: raise c_err_to_py(err)
__pyx_t_2 = __pyx_f_7questdb_7ingress_c_err_to_py(__pyx_v_err); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2428, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(1, 2428, __pyx_L1_error)
2429:
2430:
+2431: cdef void_int _dataframe_serialize_cell_at_dt64ns_tz_arrow(
static __pyx_t_7questdb_7ingress_void_int __pyx_f_7questdb_7ingress__dataframe_serialize_cell_at_dt64ns_tz_arrow(struct line_sender_buffer *__pyx_v_ls_buf, CYTHON_UNUSED struct qdb_pystr_buf *__pyx_v_b, struct __pyx_t_7questdb_7ingress_col_t *__pyx_v_col, PyThreadState **__pyx_v_gs) {
struct line_sender_error *__pyx_v_err;
int __pyx_v_valid;
int64_t *__pyx_v_access;
int64_t __pyx_v_cell;
__pyx_t_7questdb_7ingress_void_int __pyx_r;
/* … */
/* function exit code */
__pyx_r = 0;
goto __pyx_L0;
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_2);
__Pyx_AddTraceback("questdb.ingress._dataframe_serialize_cell_at_dt64ns_tz_arrow", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = -1;
__pyx_L0:;
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
2432: line_sender_buffer* ls_buf,
2433: qdb_pystr_buf* b,
2434: col_t* col,
2435: PyThreadState** gs) except -1:
+2436: cdef line_sender_error* err = NULL
__pyx_v_err = NULL;
+2437: cdef bint valid = _dataframe_arrow_is_valid(&col.cursor)
__pyx_v_valid = __pyx_f_7questdb_7ingress__dataframe_arrow_is_valid((&__pyx_v_col->cursor));
2438: cdef int64_t* access
2439: cdef int64_t cell
+2440: if valid:
if (__pyx_v_valid) {
/* … */
goto __pyx_L3;
}
+2441: access = <int64_t*>col.cursor.chunk.buffers[1]
__pyx_v_access = ((int64_t *)(__pyx_v_col->cursor.chunk->buffers[1]));
+2442: cell = access[col.cursor.offset]
__pyx_v_cell = (__pyx_v_access[__pyx_v_col->cursor.offset]);
2443: # Note: ls_buf will validate against negative numbers.
+2444: if not line_sender_buffer_at_nanos(ls_buf, cell, &err):
__pyx_t_1 = (!line_sender_buffer_at_nanos(__pyx_v_ls_buf, __pyx_v_cell, (&__pyx_v_err)));
if (unlikely(__pyx_t_1)) {
/* … */
}
+2445: _ensure_has_gil(gs)
__pyx_f_7questdb_7ingress__ensure_has_gil(__pyx_v_gs); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 2445, __pyx_L1_error)
+2446: raise c_err_to_py(err)
__pyx_t_2 = __pyx_f_7questdb_7ingress_c_err_to_py(__pyx_v_err); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2446, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(1, 2446, __pyx_L1_error)
2447: else:
+2448: if not line_sender_buffer_at_now(ls_buf, &err):
/*else*/ {
__pyx_t_1 = (!line_sender_buffer_at_now(__pyx_v_ls_buf, (&__pyx_v_err)));
if (unlikely(__pyx_t_1)) {
/* … */
}
}
__pyx_L3:;
+2449: _ensure_has_gil(gs)
__pyx_f_7questdb_7ingress__ensure_has_gil(__pyx_v_gs); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 2449, __pyx_L1_error)
+2450: raise c_err_to_py(err)
__pyx_t_2 = __pyx_f_7questdb_7ingress_c_err_to_py(__pyx_v_err); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2450, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(1, 2450, __pyx_L1_error)
2451:
2452:
+2453: cdef void_int _dataframe_serialize_cell_at_dt64us_tz_arrow(
static __pyx_t_7questdb_7ingress_void_int __pyx_f_7questdb_7ingress__dataframe_serialize_cell_at_dt64us_tz_arrow(struct line_sender_buffer *__pyx_v_ls_buf, CYTHON_UNUSED struct qdb_pystr_buf *__pyx_v_b, struct __pyx_t_7questdb_7ingress_col_t *__pyx_v_col, PyThreadState **__pyx_v_gs) {
struct line_sender_error *__pyx_v_err;
int __pyx_v_valid;
int64_t *__pyx_v_access;
int64_t __pyx_v_cell;
__pyx_t_7questdb_7ingress_void_int __pyx_r;
/* … */
/* function exit code */
__pyx_r = 0;
goto __pyx_L0;
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_2);
__Pyx_AddTraceback("questdb.ingress._dataframe_serialize_cell_at_dt64us_tz_arrow", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = -1;
__pyx_L0:;
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
2454: line_sender_buffer* ls_buf,
2455: qdb_pystr_buf* b,
2456: col_t* col,
2457: PyThreadState** gs) except -1:
+2458: cdef line_sender_error* err = NULL
__pyx_v_err = NULL;
+2459: cdef bint valid = _dataframe_arrow_is_valid(&col.cursor)
__pyx_v_valid = __pyx_f_7questdb_7ingress__dataframe_arrow_is_valid((&__pyx_v_col->cursor));
2460: cdef int64_t* access
2461: cdef int64_t cell
+2462: if valid:
if (__pyx_v_valid) {
/* … */
goto __pyx_L3;
}
+2463: access = <int64_t*>col.cursor.chunk.buffers[1]
__pyx_v_access = ((int64_t *)(__pyx_v_col->cursor.chunk->buffers[1]));
+2464: cell = access[col.cursor.offset]
__pyx_v_cell = (__pyx_v_access[__pyx_v_col->cursor.offset]);
2465: # Note: ls_buf will validate against negative numbers.
+2466: if not line_sender_buffer_at_micros(ls_buf, cell, &err):
__pyx_t_1 = (!line_sender_buffer_at_micros(__pyx_v_ls_buf, __pyx_v_cell, (&__pyx_v_err)));
if (unlikely(__pyx_t_1)) {
/* … */
}
+2467: _ensure_has_gil(gs)
__pyx_f_7questdb_7ingress__ensure_has_gil(__pyx_v_gs); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 2467, __pyx_L1_error)
+2468: raise c_err_to_py(err)
__pyx_t_2 = __pyx_f_7questdb_7ingress_c_err_to_py(__pyx_v_err); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2468, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(1, 2468, __pyx_L1_error)
2469: else:
+2470: if not line_sender_buffer_at_now(ls_buf, &err):
/*else*/ {
__pyx_t_1 = (!line_sender_buffer_at_now(__pyx_v_ls_buf, (&__pyx_v_err)));
if (unlikely(__pyx_t_1)) {
/* … */
}
}
__pyx_L3:;
+2471: _ensure_has_gil(gs)
__pyx_f_7questdb_7ingress__ensure_has_gil(__pyx_v_gs); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 2471, __pyx_L1_error)
+2472: raise c_err_to_py(err)
__pyx_t_2 = __pyx_f_7questdb_7ingress_c_err_to_py(__pyx_v_err); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2472, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(1, 2472, __pyx_L1_error)
2473:
2474:
+2475: cdef void_int _dataframe_serialize_cell(
static __pyx_t_7questdb_7ingress_void_int __pyx_f_7questdb_7ingress__dataframe_serialize_cell(struct line_sender_buffer *__pyx_v_ls_buf, struct qdb_pystr_buf *__pyx_v_b, struct __pyx_t_7questdb_7ingress_col_t *__pyx_v_col, PyThreadState **__pyx_v_gs) {
enum __pyx_t_7questdb_7ingress_col_dispatch_code_t __pyx_v_dc;
__pyx_t_7questdb_7ingress_void_int __pyx_r;
/* … */
/* function exit code */
__pyx_r = 0;
goto __pyx_L0;
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_3);
__Pyx_XDECREF(__pyx_t_4);
__Pyx_XDECREF(__pyx_t_5);
__Pyx_XDECREF(__pyx_t_6);
__Pyx_AddTraceback("questdb.ingress._dataframe_serialize_cell", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = -1;
__pyx_L0:;
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
2476: line_sender_buffer* ls_buf,
2477: qdb_pystr_buf* b,
2478: col_t* col,
2479: PyThreadState** gs) except -1:
+2480: cdef col_dispatch_code_t dc = col.dispatch_code
__pyx_t_1 = __pyx_v_col->dispatch_code; __pyx_v_dc = __pyx_t_1;
2481: # Note!: Code below will generate a `switch` statement.
2482: # Ensure this happens! Don't break the `dc == ...` pattern.
+2483: if dc == col_dispatch_code_t.col_dispatch_code_skip_nulls:
switch (__pyx_v_dc) {
case __pyx_e_7questdb_7ingress_col_dispatch_code_skip_nulls:
break;
case __pyx_e_7questdb_7ingress_col_dispatch_code_table__str_pyobj:
2484: pass # We skip a null column. Nothing to do.
+2485: elif dc == col_dispatch_code_t.col_dispatch_code_table__str_pyobj:
break;
case __pyx_e_7questdb_7ingress_col_dispatch_code_table__str_utf8_arrow:
+2486: _dataframe_serialize_cell_table__str_pyobj(ls_buf, b, col)
__pyx_t_2 = __pyx_f_7questdb_7ingress__dataframe_serialize_cell_table__str_pyobj(__pyx_v_ls_buf, __pyx_v_b, __pyx_v_col); if (unlikely(__pyx_t_2 == ((__pyx_t_7questdb_7ingress_void_int)-1))) __PYX_ERR(1, 2486, __pyx_L1_error)
+2487: elif dc == col_dispatch_code_t.col_dispatch_code_table__str_utf8_arrow:
break;
case __pyx_e_7questdb_7ingress_col_dispatch_code_table__str_lrg_utf8_arrow:
+2488: _dataframe_serialize_cell_table__str_utf8_arrow(ls_buf, b, col, gs)
__pyx_t_2 = __pyx_f_7questdb_7ingress__dataframe_serialize_cell_table__str_utf8_arrow(__pyx_v_ls_buf, __pyx_v_b, __pyx_v_col, __pyx_v_gs); if (unlikely(__pyx_t_2 == ((__pyx_t_7questdb_7ingress_void_int)-1))) __PYX_ERR(1, 2488, __pyx_L1_error)
+2489: elif dc == col_dispatch_code_t.col_dispatch_code_table__str_lrg_utf8_arrow:
break;
case __pyx_e_7questdb_7ingress_col_dispatch_code_table__str_i8_cat:
+2490: _dataframe_serialize_cell_table__str_lrg_utf8_arrow(ls_buf, b, col, gs)
__pyx_t_2 = __pyx_f_7questdb_7ingress__dataframe_serialize_cell_table__str_lrg_utf8_arrow(__pyx_v_ls_buf, __pyx_v_b, __pyx_v_col, __pyx_v_gs); if (unlikely(__pyx_t_2 == ((__pyx_t_7questdb_7ingress_void_int)-1))) __PYX_ERR(1, 2490, __pyx_L1_error)
+2491: elif dc == col_dispatch_code_t.col_dispatch_code_table__str_i8_cat:
break;
case __pyx_e_7questdb_7ingress_col_dispatch_code_table__str_i16_cat:
+2492: _dataframe_serialize_cell_table__str_i8_cat(ls_buf, b, col, gs)
__pyx_t_2 = __pyx_f_7questdb_7ingress__dataframe_serialize_cell_table__str_i8_cat(__pyx_v_ls_buf, __pyx_v_b, __pyx_v_col, __pyx_v_gs); if (unlikely(__pyx_t_2 == ((__pyx_t_7questdb_7ingress_void_int)-1))) __PYX_ERR(1, 2492, __pyx_L1_error)
+2493: elif dc == col_dispatch_code_t.col_dispatch_code_table__str_i16_cat:
break;
case __pyx_e_7questdb_7ingress_col_dispatch_code_table__str_i32_cat:
+2494: _dataframe_serialize_cell_table__str_i16_cat(ls_buf, b, col, gs)
__pyx_t_2 = __pyx_f_7questdb_7ingress__dataframe_serialize_cell_table__str_i16_cat(__pyx_v_ls_buf, __pyx_v_b, __pyx_v_col, __pyx_v_gs); if (unlikely(__pyx_t_2 == ((__pyx_t_7questdb_7ingress_void_int)-1))) __PYX_ERR(1, 2494, __pyx_L1_error)
+2495: elif dc == col_dispatch_code_t.col_dispatch_code_table__str_i32_cat:
break;
case __pyx_e_7questdb_7ingress_col_dispatch_code_symbol__str_pyobj:
+2496: _dataframe_serialize_cell_table__str_i32_cat(ls_buf, b, col, gs)
__pyx_t_2 = __pyx_f_7questdb_7ingress__dataframe_serialize_cell_table__str_i32_cat(__pyx_v_ls_buf, __pyx_v_b, __pyx_v_col, __pyx_v_gs); if (unlikely(__pyx_t_2 == ((__pyx_t_7questdb_7ingress_void_int)-1))) __PYX_ERR(1, 2496, __pyx_L1_error)
+2497: elif dc == col_dispatch_code_t.col_dispatch_code_symbol__str_pyobj:
break;
case __pyx_e_7questdb_7ingress_col_dispatch_code_symbol__str_utf8_arrow:
+2498: _dataframe_serialize_cell_symbol__str_pyobj(ls_buf, b, col)
__pyx_t_2 = __pyx_f_7questdb_7ingress__dataframe_serialize_cell_symbol__str_pyobj(__pyx_v_ls_buf, __pyx_v_b, __pyx_v_col); if (unlikely(__pyx_t_2 == ((__pyx_t_7questdb_7ingress_void_int)-1))) __PYX_ERR(1, 2498, __pyx_L1_error)
+2499: elif dc == col_dispatch_code_t.col_dispatch_code_symbol__str_utf8_arrow:
break;
case __pyx_e_7questdb_7ingress_col_dispatch_code_symbol__str_lrg_utf8_arrow:
+2500: _dataframe_serialize_cell_symbol__str_utf8_arrow(ls_buf, b, col, gs)
__pyx_t_2 = __pyx_f_7questdb_7ingress__dataframe_serialize_cell_symbol__str_utf8_arrow(__pyx_v_ls_buf, __pyx_v_b, __pyx_v_col, __pyx_v_gs); if (unlikely(__pyx_t_2 == ((__pyx_t_7questdb_7ingress_void_int)-1))) __PYX_ERR(1, 2500, __pyx_L1_error)
+2501: elif dc == col_dispatch_code_t.col_dispatch_code_symbol__str_lrg_utf8_arrow:
break;
case __pyx_e_7questdb_7ingress_col_dispatch_code_symbol__str_i8_cat:
+2502: _dataframe_serialize_cell_symbol__str_lrg_utf8_arrow(ls_buf, b, col, gs)
__pyx_t_2 = __pyx_f_7questdb_7ingress__dataframe_serialize_cell_symbol__str_lrg_utf8_arrow(__pyx_v_ls_buf, __pyx_v_b, __pyx_v_col, __pyx_v_gs); if (unlikely(__pyx_t_2 == ((__pyx_t_7questdb_7ingress_void_int)-1))) __PYX_ERR(1, 2502, __pyx_L1_error)
+2503: elif dc == col_dispatch_code_t.col_dispatch_code_symbol__str_i8_cat:
break;
case __pyx_e_7questdb_7ingress_col_dispatch_code_symbol__str_i16_cat:
+2504: _dataframe_serialize_cell_symbol__str_i8_cat(ls_buf, b, col, gs)
__pyx_t_2 = __pyx_f_7questdb_7ingress__dataframe_serialize_cell_symbol__str_i8_cat(__pyx_v_ls_buf, __pyx_v_b, __pyx_v_col, __pyx_v_gs); if (unlikely(__pyx_t_2 == ((__pyx_t_7questdb_7ingress_void_int)-1))) __PYX_ERR(1, 2504, __pyx_L1_error)
+2505: elif dc == col_dispatch_code_t.col_dispatch_code_symbol__str_i16_cat:
break;
case __pyx_e_7questdb_7ingress_col_dispatch_code_symbol__str_i32_cat:
+2506: _dataframe_serialize_cell_symbol__str_i16_cat(ls_buf, b, col, gs)
__pyx_t_2 = __pyx_f_7questdb_7ingress__dataframe_serialize_cell_symbol__str_i16_cat(__pyx_v_ls_buf, __pyx_v_b, __pyx_v_col, __pyx_v_gs); if (unlikely(__pyx_t_2 == ((__pyx_t_7questdb_7ingress_void_int)-1))) __PYX_ERR(1, 2506, __pyx_L1_error)
+2507: elif dc == col_dispatch_code_t.col_dispatch_code_symbol__str_i32_cat:
break;
case __pyx_e_7questdb_7ingress_col_dispatch_code_column_bool__bool_pyobj:
+2508: _dataframe_serialize_cell_symbol__str_i32_cat(ls_buf, b, col, gs)
__pyx_t_2 = __pyx_f_7questdb_7ingress__dataframe_serialize_cell_symbol__str_i32_cat(__pyx_v_ls_buf, __pyx_v_b, __pyx_v_col, __pyx_v_gs); if (unlikely(__pyx_t_2 == ((__pyx_t_7questdb_7ingress_void_int)-1))) __PYX_ERR(1, 2508, __pyx_L1_error)
+2509: elif dc == col_dispatch_code_t.col_dispatch_code_column_bool__bool_pyobj:
break;
case __pyx_e_7questdb_7ingress_col_dispatch_code_column_bool__bool_numpy:
+2510: _dataframe_serialize_cell_column_bool__bool_pyobj(ls_buf, b, col)
__pyx_t_2 = __pyx_f_7questdb_7ingress__dataframe_serialize_cell_column_bool__bool_pyobj(__pyx_v_ls_buf, __pyx_v_b, __pyx_v_col); if (unlikely(__pyx_t_2 == ((__pyx_t_7questdb_7ingress_void_int)-1))) __PYX_ERR(1, 2510, __pyx_L1_error)
+2511: elif dc == col_dispatch_code_t.col_dispatch_code_column_bool__bool_numpy:
break;
case __pyx_e_7questdb_7ingress_col_dispatch_code_column_bool__bool_arrow:
+2512: _dataframe_serialize_cell_column_bool__bool_numpy(ls_buf, b, col, gs)
__pyx_t_2 = __pyx_f_7questdb_7ingress__dataframe_serialize_cell_column_bool__bool_numpy(__pyx_v_ls_buf, __pyx_v_b, __pyx_v_col, __pyx_v_gs); if (unlikely(__pyx_t_2 == ((__pyx_t_7questdb_7ingress_void_int)-1))) __PYX_ERR(1, 2512, __pyx_L1_error)
+2513: elif dc == col_dispatch_code_t.col_dispatch_code_column_bool__bool_arrow:
break;
case __pyx_e_7questdb_7ingress_col_dispatch_code_column_i64__int_pyobj:
+2514: _dataframe_serialize_cell_column_bool__bool_arrow(ls_buf, b, col, gs)
__pyx_t_2 = __pyx_f_7questdb_7ingress__dataframe_serialize_cell_column_bool__bool_arrow(__pyx_v_ls_buf, __pyx_v_b, __pyx_v_col, __pyx_v_gs); if (unlikely(__pyx_t_2 == ((__pyx_t_7questdb_7ingress_void_int)-1))) __PYX_ERR(1, 2514, __pyx_L1_error)
+2515: elif dc == col_dispatch_code_t.col_dispatch_code_column_i64__int_pyobj:
break;
case __pyx_e_7questdb_7ingress_col_dispatch_code_column_i64__u8_numpy:
+2516: _dataframe_serialize_cell_column_i64__int_pyobj(ls_buf, b, col)
__pyx_t_2 = __pyx_f_7questdb_7ingress__dataframe_serialize_cell_column_i64__int_pyobj(__pyx_v_ls_buf, __pyx_v_b, __pyx_v_col); if (unlikely(__pyx_t_2 == ((__pyx_t_7questdb_7ingress_void_int)-1))) __PYX_ERR(1, 2516, __pyx_L1_error)
+2517: elif dc == col_dispatch_code_t.col_dispatch_code_column_i64__u8_numpy:
break;
case __pyx_e_7questdb_7ingress_col_dispatch_code_column_i64__i8_numpy:
+2518: _dataframe_serialize_cell_column_i64__u8_numpy(ls_buf, b, col, gs)
__pyx_t_2 = __pyx_f_7questdb_7ingress__dataframe_serialize_cell_column_i64__u8_numpy(__pyx_v_ls_buf, __pyx_v_b, __pyx_v_col, __pyx_v_gs); if (unlikely(__pyx_t_2 == ((__pyx_t_7questdb_7ingress_void_int)-1))) __PYX_ERR(1, 2518, __pyx_L1_error)
+2519: elif dc == col_dispatch_code_t.col_dispatch_code_column_i64__i8_numpy:
break;
case __pyx_e_7questdb_7ingress_col_dispatch_code_column_i64__u16_numpy:
+2520: _dataframe_serialize_cell_column_i64__i8_numpy(ls_buf, b, col, gs)
__pyx_t_2 = __pyx_f_7questdb_7ingress__dataframe_serialize_cell_column_i64__i8_numpy(__pyx_v_ls_buf, __pyx_v_b, __pyx_v_col, __pyx_v_gs); if (unlikely(__pyx_t_2 == ((__pyx_t_7questdb_7ingress_void_int)-1))) __PYX_ERR(1, 2520, __pyx_L1_error)
+2521: elif dc == col_dispatch_code_t.col_dispatch_code_column_i64__u16_numpy:
break;
case __pyx_e_7questdb_7ingress_col_dispatch_code_column_i64__i16_numpy:
+2522: _dataframe_serialize_cell_column_i64__u16_numpy(ls_buf, b, col, gs)
__pyx_t_2 = __pyx_f_7questdb_7ingress__dataframe_serialize_cell_column_i64__u16_numpy(__pyx_v_ls_buf, __pyx_v_b, __pyx_v_col, __pyx_v_gs); if (unlikely(__pyx_t_2 == ((__pyx_t_7questdb_7ingress_void_int)-1))) __PYX_ERR(1, 2522, __pyx_L1_error)
+2523: elif dc == col_dispatch_code_t.col_dispatch_code_column_i64__i16_numpy:
break;
case __pyx_e_7questdb_7ingress_col_dispatch_code_column_i64__u32_numpy:
+2524: _dataframe_serialize_cell_column_i64__i16_numpy(ls_buf, b, col, gs)
__pyx_t_2 = __pyx_f_7questdb_7ingress__dataframe_serialize_cell_column_i64__i16_numpy(__pyx_v_ls_buf, __pyx_v_b, __pyx_v_col, __pyx_v_gs); if (unlikely(__pyx_t_2 == ((__pyx_t_7questdb_7ingress_void_int)-1))) __PYX_ERR(1, 2524, __pyx_L1_error)
+2525: elif dc == col_dispatch_code_t.col_dispatch_code_column_i64__u32_numpy:
break;
case __pyx_e_7questdb_7ingress_col_dispatch_code_column_i64__i32_numpy:
+2526: _dataframe_serialize_cell_column_i64__u32_numpy(ls_buf, b, col, gs)
__pyx_t_2 = __pyx_f_7questdb_7ingress__dataframe_serialize_cell_column_i64__u32_numpy(__pyx_v_ls_buf, __pyx_v_b, __pyx_v_col, __pyx_v_gs); if (unlikely(__pyx_t_2 == ((__pyx_t_7questdb_7ingress_void_int)-1))) __PYX_ERR(1, 2526, __pyx_L1_error)
+2527: elif dc == col_dispatch_code_t.col_dispatch_code_column_i64__i32_numpy:
break;
case __pyx_e_7questdb_7ingress_col_dispatch_code_column_i64__u64_numpy:
+2528: _dataframe_serialize_cell_column_i64__i32_numpy(ls_buf, b, col, gs)
__pyx_t_2 = __pyx_f_7questdb_7ingress__dataframe_serialize_cell_column_i64__i32_numpy(__pyx_v_ls_buf, __pyx_v_b, __pyx_v_col, __pyx_v_gs); if (unlikely(__pyx_t_2 == ((__pyx_t_7questdb_7ingress_void_int)-1))) __PYX_ERR(1, 2528, __pyx_L1_error)
+2529: elif dc == col_dispatch_code_t.col_dispatch_code_column_i64__u64_numpy:
break;
case __pyx_e_7questdb_7ingress_col_dispatch_code_column_i64__i64_numpy:
+2530: _dataframe_serialize_cell_column_i64__u64_numpy(ls_buf, b, col, gs)
__pyx_t_2 = __pyx_f_7questdb_7ingress__dataframe_serialize_cell_column_i64__u64_numpy(__pyx_v_ls_buf, __pyx_v_b, __pyx_v_col, __pyx_v_gs); if (unlikely(__pyx_t_2 == ((__pyx_t_7questdb_7ingress_void_int)-1))) __PYX_ERR(1, 2530, __pyx_L1_error)
+2531: elif dc == col_dispatch_code_t.col_dispatch_code_column_i64__i64_numpy:
break;
case __pyx_e_7questdb_7ingress_col_dispatch_code_column_i64__u8_arrow:
+2532: _dataframe_serialize_cell_column_i64__i64_numpy(ls_buf, b, col, gs)
__pyx_t_2 = __pyx_f_7questdb_7ingress__dataframe_serialize_cell_column_i64__i64_numpy(__pyx_v_ls_buf, __pyx_v_b, __pyx_v_col, __pyx_v_gs); if (unlikely(__pyx_t_2 == ((__pyx_t_7questdb_7ingress_void_int)-1))) __PYX_ERR(1, 2532, __pyx_L1_error)
+2533: elif dc == col_dispatch_code_t.col_dispatch_code_column_i64__u8_arrow:
break;
case __pyx_e_7questdb_7ingress_col_dispatch_code_column_i64__i8_arrow:
+2534: _dataframe_serialize_cell_column_i64__u8_arrow(ls_buf, b, col, gs)
__pyx_t_2 = __pyx_f_7questdb_7ingress__dataframe_serialize_cell_column_i64__u8_arrow(__pyx_v_ls_buf, __pyx_v_b, __pyx_v_col, __pyx_v_gs); if (unlikely(__pyx_t_2 == ((__pyx_t_7questdb_7ingress_void_int)-1))) __PYX_ERR(1, 2534, __pyx_L1_error)
+2535: elif dc == col_dispatch_code_t.col_dispatch_code_column_i64__i8_arrow:
break;
case __pyx_e_7questdb_7ingress_col_dispatch_code_column_i64__u16_arrow:
+2536: _dataframe_serialize_cell_column_i64__i8_arrow(ls_buf, b, col, gs)
__pyx_t_2 = __pyx_f_7questdb_7ingress__dataframe_serialize_cell_column_i64__i8_arrow(__pyx_v_ls_buf, __pyx_v_b, __pyx_v_col, __pyx_v_gs); if (unlikely(__pyx_t_2 == ((__pyx_t_7questdb_7ingress_void_int)-1))) __PYX_ERR(1, 2536, __pyx_L1_error)
+2537: elif dc == col_dispatch_code_t.col_dispatch_code_column_i64__u16_arrow:
break;
case __pyx_e_7questdb_7ingress_col_dispatch_code_column_i64__i16_arrow:
+2538: _dataframe_serialize_cell_column_i64__u16_arrow(ls_buf, b, col, gs)
__pyx_t_2 = __pyx_f_7questdb_7ingress__dataframe_serialize_cell_column_i64__u16_arrow(__pyx_v_ls_buf, __pyx_v_b, __pyx_v_col, __pyx_v_gs); if (unlikely(__pyx_t_2 == ((__pyx_t_7questdb_7ingress_void_int)-1))) __PYX_ERR(1, 2538, __pyx_L1_error)
+2539: elif dc == col_dispatch_code_t.col_dispatch_code_column_i64__i16_arrow:
break;
case __pyx_e_7questdb_7ingress_col_dispatch_code_column_i64__u32_arrow:
+2540: _dataframe_serialize_cell_column_i64__i16_arrow(ls_buf, b, col, gs)
__pyx_t_2 = __pyx_f_7questdb_7ingress__dataframe_serialize_cell_column_i64__i16_arrow(__pyx_v_ls_buf, __pyx_v_b, __pyx_v_col, __pyx_v_gs); if (unlikely(__pyx_t_2 == ((__pyx_t_7questdb_7ingress_void_int)-1))) __PYX_ERR(1, 2540, __pyx_L1_error)
+2541: elif dc == col_dispatch_code_t.col_dispatch_code_column_i64__u32_arrow:
break;
case __pyx_e_7questdb_7ingress_col_dispatch_code_column_i64__i32_arrow:
+2542: _dataframe_serialize_cell_column_i64__u32_arrow(ls_buf, b, col, gs)
__pyx_t_2 = __pyx_f_7questdb_7ingress__dataframe_serialize_cell_column_i64__u32_arrow(__pyx_v_ls_buf, __pyx_v_b, __pyx_v_col, __pyx_v_gs); if (unlikely(__pyx_t_2 == ((__pyx_t_7questdb_7ingress_void_int)-1))) __PYX_ERR(1, 2542, __pyx_L1_error)
+2543: elif dc == col_dispatch_code_t.col_dispatch_code_column_i64__i32_arrow:
break;
case __pyx_e_7questdb_7ingress_col_dispatch_code_column_i64__u64_arrow:
+2544: _dataframe_serialize_cell_column_i64__i32_arrow(ls_buf, b, col, gs)
__pyx_t_2 = __pyx_f_7questdb_7ingress__dataframe_serialize_cell_column_i64__i32_arrow(__pyx_v_ls_buf, __pyx_v_b, __pyx_v_col, __pyx_v_gs); if (unlikely(__pyx_t_2 == ((__pyx_t_7questdb_7ingress_void_int)-1))) __PYX_ERR(1, 2544, __pyx_L1_error)
+2545: elif dc == col_dispatch_code_t.col_dispatch_code_column_i64__u64_arrow:
break;
case __pyx_e_7questdb_7ingress_col_dispatch_code_column_i64__i64_arrow:
+2546: _dataframe_serialize_cell_column_i64__u64_arrow(ls_buf, b, col, gs)
__pyx_t_2 = __pyx_f_7questdb_7ingress__dataframe_serialize_cell_column_i64__u64_arrow(__pyx_v_ls_buf, __pyx_v_b, __pyx_v_col, __pyx_v_gs); if (unlikely(__pyx_t_2 == ((__pyx_t_7questdb_7ingress_void_int)-1))) __PYX_ERR(1, 2546, __pyx_L1_error)
+2547: elif dc == col_dispatch_code_t.col_dispatch_code_column_i64__i64_arrow:
break;
case __pyx_e_7questdb_7ingress_col_dispatch_code_column_f64__float_pyobj:
+2548: _dataframe_serialize_cell_column_i64__i64_arrow(ls_buf, b, col, gs)
__pyx_t_2 = __pyx_f_7questdb_7ingress__dataframe_serialize_cell_column_i64__i64_arrow(__pyx_v_ls_buf, __pyx_v_b, __pyx_v_col, __pyx_v_gs); if (unlikely(__pyx_t_2 == ((__pyx_t_7questdb_7ingress_void_int)-1))) __PYX_ERR(1, 2548, __pyx_L1_error)
+2549: elif dc == col_dispatch_code_t.col_dispatch_code_column_f64__float_pyobj:
break;
case __pyx_e_7questdb_7ingress_col_dispatch_code_column_f64__f32_numpy:
+2550: _dataframe_serialize_cell_column_f64__float_pyobj(ls_buf, b, col)
__pyx_t_2 = __pyx_f_7questdb_7ingress__dataframe_serialize_cell_column_f64__float_pyobj(__pyx_v_ls_buf, __pyx_v_b, __pyx_v_col); if (unlikely(__pyx_t_2 == ((__pyx_t_7questdb_7ingress_void_int)-1))) __PYX_ERR(1, 2550, __pyx_L1_error)
+2551: elif dc == col_dispatch_code_t.col_dispatch_code_column_f64__f32_numpy:
break;
case __pyx_e_7questdb_7ingress_col_dispatch_code_column_f64__f64_numpy:
+2552: _dataframe_serialize_cell_column_f64__f32_numpy(ls_buf, b, col, gs)
__pyx_t_2 = __pyx_f_7questdb_7ingress__dataframe_serialize_cell_column_f64__f32_numpy(__pyx_v_ls_buf, __pyx_v_b, __pyx_v_col, __pyx_v_gs); if (unlikely(__pyx_t_2 == ((__pyx_t_7questdb_7ingress_void_int)-1))) __PYX_ERR(1, 2552, __pyx_L1_error)
+2553: elif dc == col_dispatch_code_t.col_dispatch_code_column_f64__f64_numpy:
break;
case __pyx_e_7questdb_7ingress_col_dispatch_code_column_f64__f32_arrow:
+2554: _dataframe_serialize_cell_column_f64__f64_numpy(ls_buf, b, col, gs)
__pyx_t_2 = __pyx_f_7questdb_7ingress__dataframe_serialize_cell_column_f64__f64_numpy(__pyx_v_ls_buf, __pyx_v_b, __pyx_v_col, __pyx_v_gs); if (unlikely(__pyx_t_2 == ((__pyx_t_7questdb_7ingress_void_int)-1))) __PYX_ERR(1, 2554, __pyx_L1_error)
+2555: elif dc == col_dispatch_code_t.col_dispatch_code_column_f64__f32_arrow:
break;
case __pyx_e_7questdb_7ingress_col_dispatch_code_column_f64__f64_arrow:
+2556: _dataframe_serialize_cell_column_f64__f32_arrow(ls_buf, b, col, gs)
__pyx_t_2 = __pyx_f_7questdb_7ingress__dataframe_serialize_cell_column_f64__f32_arrow(__pyx_v_ls_buf, __pyx_v_b, __pyx_v_col, __pyx_v_gs); if (unlikely(__pyx_t_2 == ((__pyx_t_7questdb_7ingress_void_int)-1))) __PYX_ERR(1, 2556, __pyx_L1_error)
+2557: elif dc == col_dispatch_code_t.col_dispatch_code_column_f64__f64_arrow:
break;
case __pyx_e_7questdb_7ingress_col_dispatch_code_column_str__str_pyobj:
+2558: _dataframe_serialize_cell_column_f64__f64_arrow(ls_buf, b, col, gs)
__pyx_t_2 = __pyx_f_7questdb_7ingress__dataframe_serialize_cell_column_f64__f64_arrow(__pyx_v_ls_buf, __pyx_v_b, __pyx_v_col, __pyx_v_gs); if (unlikely(__pyx_t_2 == ((__pyx_t_7questdb_7ingress_void_int)-1))) __PYX_ERR(1, 2558, __pyx_L1_error)
+2559: elif dc == col_dispatch_code_t.col_dispatch_code_column_str__str_pyobj:
break;
case __pyx_e_7questdb_7ingress_col_dispatch_code_column_str__str_utf8_arrow:
+2560: _dataframe_serialize_cell_column_str__str_pyobj(ls_buf, b, col)
__pyx_t_2 = __pyx_f_7questdb_7ingress__dataframe_serialize_cell_column_str__str_pyobj(__pyx_v_ls_buf, __pyx_v_b, __pyx_v_col); if (unlikely(__pyx_t_2 == ((__pyx_t_7questdb_7ingress_void_int)-1))) __PYX_ERR(1, 2560, __pyx_L1_error)
+2561: elif dc == col_dispatch_code_t.col_dispatch_code_column_str__str_utf8_arrow:
break;
case __pyx_e_7questdb_7ingress_col_dispatch_code_column_str__str_lrg_utf8_arrow:
+2562: _dataframe_serialize_cell_column_str__str_utf8_arrow(ls_buf, b, col, gs)
__pyx_t_2 = __pyx_f_7questdb_7ingress__dataframe_serialize_cell_column_str__str_utf8_arrow(__pyx_v_ls_buf, __pyx_v_b, __pyx_v_col, __pyx_v_gs); if (unlikely(__pyx_t_2 == ((__pyx_t_7questdb_7ingress_void_int)-1))) __PYX_ERR(1, 2562, __pyx_L1_error)
+2563: elif dc == col_dispatch_code_t.col_dispatch_code_column_str__str_lrg_utf8_arrow:
break;
case __pyx_e_7questdb_7ingress_col_dispatch_code_column_str__str_i8_cat:
+2564: _dataframe_serialize_cell_column_str__str_lrg_utf8_arrow(ls_buf, b, col, gs)
__pyx_t_2 = __pyx_f_7questdb_7ingress__dataframe_serialize_cell_column_str__str_lrg_utf8_arrow(__pyx_v_ls_buf, __pyx_v_b, __pyx_v_col, __pyx_v_gs); if (unlikely(__pyx_t_2 == ((__pyx_t_7questdb_7ingress_void_int)-1))) __PYX_ERR(1, 2564, __pyx_L1_error)
+2565: elif dc == col_dispatch_code_t.col_dispatch_code_column_str__str_i8_cat:
break;
case __pyx_e_7questdb_7ingress_col_dispatch_code_column_str__str_i16_cat:
+2566: _dataframe_serialize_cell_column_str__str_i8_cat(ls_buf, b, col, gs)
__pyx_t_2 = __pyx_f_7questdb_7ingress__dataframe_serialize_cell_column_str__str_i8_cat(__pyx_v_ls_buf, __pyx_v_b, __pyx_v_col, __pyx_v_gs); if (unlikely(__pyx_t_2 == ((__pyx_t_7questdb_7ingress_void_int)-1))) __PYX_ERR(1, 2566, __pyx_L1_error)
+2567: elif dc == col_dispatch_code_t.col_dispatch_code_column_str__str_i16_cat:
break;
case __pyx_e_7questdb_7ingress_col_dispatch_code_column_str__str_i32_cat:
+2568: _dataframe_serialize_cell_column_str__str_i16_cat(ls_buf, b, col, gs)
__pyx_t_2 = __pyx_f_7questdb_7ingress__dataframe_serialize_cell_column_str__str_i16_cat(__pyx_v_ls_buf, __pyx_v_b, __pyx_v_col, __pyx_v_gs); if (unlikely(__pyx_t_2 == ((__pyx_t_7questdb_7ingress_void_int)-1))) __PYX_ERR(1, 2568, __pyx_L1_error)
+2569: elif dc == col_dispatch_code_t.col_dispatch_code_column_str__str_i32_cat:
break;
case __pyx_e_7questdb_7ingress_col_dispatch_code_column_ts__dt64ns_numpy:
+2570: _dataframe_serialize_cell_column_str__str_i32_cat(ls_buf, b, col, gs)
__pyx_t_2 = __pyx_f_7questdb_7ingress__dataframe_serialize_cell_column_str__str_i32_cat(__pyx_v_ls_buf, __pyx_v_b, __pyx_v_col, __pyx_v_gs); if (unlikely(__pyx_t_2 == ((__pyx_t_7questdb_7ingress_void_int)-1))) __PYX_ERR(1, 2570, __pyx_L1_error)
+2571: elif dc == col_dispatch_code_t.col_dispatch_code_column_ts__dt64ns_numpy:
break;
case __pyx_e_7questdb_7ingress_col_dispatch_code_column_ts__dt64us_numpy:
+2572: _dataframe_serialize_cell_column_ts__dt64ns_numpy(ls_buf, b, col, gs)
__pyx_t_2 = __pyx_f_7questdb_7ingress__dataframe_serialize_cell_column_ts__dt64ns_numpy(__pyx_v_ls_buf, __pyx_v_b, __pyx_v_col, __pyx_v_gs); if (unlikely(__pyx_t_2 == ((__pyx_t_7questdb_7ingress_void_int)-1))) __PYX_ERR(1, 2572, __pyx_L1_error)
+2573: elif dc == col_dispatch_code_t.col_dispatch_code_column_ts__dt64us_numpy:
break;
case __pyx_e_7questdb_7ingress_col_dispatch_code_column_arr_f64__arr_f64_numpyobj:
+2574: _dataframe_serialize_cell_column_ts__dt64us_numpy(ls_buf, b, col, gs)
__pyx_t_2 = __pyx_f_7questdb_7ingress__dataframe_serialize_cell_column_ts__dt64us_numpy(__pyx_v_ls_buf, __pyx_v_b, __pyx_v_col, __pyx_v_gs); if (unlikely(__pyx_t_2 == ((__pyx_t_7questdb_7ingress_void_int)-1))) __PYX_ERR(1, 2574, __pyx_L1_error)
+2575: elif dc == col_dispatch_code_t.col_dispatch_code_column_arr_f64__arr_f64_numpyobj:
break;
case __pyx_e_7questdb_7ingress_col_dispatch_code_column_decimal__decimal_pyobj:
+2576: _dataframe_serialize_cell_column_arr_f64__arr_f64_numpyobj(ls_buf, b, col)
__pyx_t_2 = __pyx_f_7questdb_7ingress__dataframe_serialize_cell_column_arr_f64__arr_f64_numpyobj(__pyx_v_ls_buf, __pyx_v_b, __pyx_v_col); if (unlikely(__pyx_t_2 == ((__pyx_t_7questdb_7ingress_void_int)-1))) __PYX_ERR(1, 2576, __pyx_L1_error)
+2577: elif dc == col_dispatch_code_t.col_dispatch_code_column_decimal__decimal_pyobj:
break;
case __pyx_e_7questdb_7ingress_col_dispatch_code_column_decimal__decimal32_arrow:
+2578: _dataframe_serialize_cell_column_decimal__decimal_pyobj(ls_buf, b, col)
__pyx_t_2 = __pyx_f_7questdb_7ingress__dataframe_serialize_cell_column_decimal__decimal_pyobj(__pyx_v_ls_buf, __pyx_v_b, __pyx_v_col); if (unlikely(__pyx_t_2 == ((__pyx_t_7questdb_7ingress_void_int)-1))) __PYX_ERR(1, 2578, __pyx_L1_error)
+2579: elif dc == col_dispatch_code_t.col_dispatch_code_column_decimal__decimal32_arrow:
break;
case __pyx_e_7questdb_7ingress_col_dispatch_code_column_decimal__decimal64_arrow:
+2580: _dataframe_serialize_cell_column_decimal__decimal32_arrow(ls_buf, b, col, gs)
__pyx_t_2 = __pyx_f_7questdb_7ingress__dataframe_serialize_cell_column_decimal__decimal32_arrow(__pyx_v_ls_buf, __pyx_v_b, __pyx_v_col, __pyx_v_gs); if (unlikely(__pyx_t_2 == ((__pyx_t_7questdb_7ingress_void_int)-1))) __PYX_ERR(1, 2580, __pyx_L1_error)
+2581: elif dc == col_dispatch_code_t.col_dispatch_code_column_decimal__decimal64_arrow:
break;
case __pyx_e_7questdb_7ingress_col_dispatch_code_column_decimal__decimal128_arrow:
+2582: _dataframe_serialize_cell_column_decimal__decimal64_arrow(ls_buf, b, col, gs)
__pyx_t_2 = __pyx_f_7questdb_7ingress__dataframe_serialize_cell_column_decimal__decimal64_arrow(__pyx_v_ls_buf, __pyx_v_b, __pyx_v_col, __pyx_v_gs); if (unlikely(__pyx_t_2 == ((__pyx_t_7questdb_7ingress_void_int)-1))) __PYX_ERR(1, 2582, __pyx_L1_error)
+2583: elif dc == col_dispatch_code_t.col_dispatch_code_column_decimal__decimal128_arrow:
break;
case __pyx_e_7questdb_7ingress_col_dispatch_code_column_decimal__decimal256_arrow:
+2584: _dataframe_serialize_cell_column_decimal__decimal128_arrow(ls_buf, b, col, gs)
__pyx_t_2 = __pyx_f_7questdb_7ingress__dataframe_serialize_cell_column_decimal__decimal128_arrow(__pyx_v_ls_buf, __pyx_v_b, __pyx_v_col, __pyx_v_gs); if (unlikely(__pyx_t_2 == ((__pyx_t_7questdb_7ingress_void_int)-1))) __PYX_ERR(1, 2584, __pyx_L1_error)
+2585: elif dc == col_dispatch_code_t.col_dispatch_code_column_decimal__decimal256_arrow:
break;
case __pyx_e_7questdb_7ingress_col_dispatch_code_column_ts__dt64ns_tz_arrow:
+2586: _dataframe_serialize_cell_column_decimal__decimal256_arrow(ls_buf, b, col, gs)
__pyx_t_2 = __pyx_f_7questdb_7ingress__dataframe_serialize_cell_column_decimal__decimal256_arrow(__pyx_v_ls_buf, __pyx_v_b, __pyx_v_col, __pyx_v_gs); if (unlikely(__pyx_t_2 == ((__pyx_t_7questdb_7ingress_void_int)-1))) __PYX_ERR(1, 2586, __pyx_L1_error)
+2587: elif dc == col_dispatch_code_t.col_dispatch_code_column_ts__dt64ns_tz_arrow:
break;
case __pyx_e_7questdb_7ingress_col_dispatch_code_column_ts__dt64us_tz_arrow:
+2588: _dataframe_serialize_cell_column_ts__dt64ns_tz_arrow(ls_buf, b, col, gs)
__pyx_t_2 = __pyx_f_7questdb_7ingress__dataframe_serialize_cell_column_ts__dt64ns_tz_arrow(__pyx_v_ls_buf, __pyx_v_b, __pyx_v_col, __pyx_v_gs); if (unlikely(__pyx_t_2 == ((__pyx_t_7questdb_7ingress_void_int)-1))) __PYX_ERR(1, 2588, __pyx_L1_error)
+2589: elif dc == col_dispatch_code_t.col_dispatch_code_column_ts__dt64us_tz_arrow:
break;
case __pyx_e_7questdb_7ingress_col_dispatch_code_at__dt64ns_numpy:
+2590: _dataframe_serialize_cell_column_ts__dt64us_tz_arrow(ls_buf, b, col, gs)
__pyx_t_2 = __pyx_f_7questdb_7ingress__dataframe_serialize_cell_column_ts__dt64us_tz_arrow(__pyx_v_ls_buf, __pyx_v_b, __pyx_v_col, __pyx_v_gs); if (unlikely(__pyx_t_2 == ((__pyx_t_7questdb_7ingress_void_int)-1))) __PYX_ERR(1, 2590, __pyx_L1_error)
+2591: elif dc == col_dispatch_code_t.col_dispatch_code_at__dt64ns_numpy:
break;
case __pyx_e_7questdb_7ingress_col_dispatch_code_at__dt64us_numpy:
+2592: _dataframe_serialize_cell_at_dt64ns_numpy(ls_buf, b, col, gs)
__pyx_t_2 = __pyx_f_7questdb_7ingress__dataframe_serialize_cell_at_dt64ns_numpy(__pyx_v_ls_buf, __pyx_v_b, __pyx_v_col, __pyx_v_gs); if (unlikely(__pyx_t_2 == ((__pyx_t_7questdb_7ingress_void_int)-1))) __PYX_ERR(1, 2592, __pyx_L1_error)
+2593: elif dc == col_dispatch_code_t.col_dispatch_code_at__dt64us_numpy:
break;
case __pyx_e_7questdb_7ingress_col_dispatch_code_at__dt64ns_tz_arrow:
+2594: _dataframe_serialize_cell_at_dt64us_numpy(ls_buf, b, col, gs)
__pyx_t_2 = __pyx_f_7questdb_7ingress__dataframe_serialize_cell_at_dt64us_numpy(__pyx_v_ls_buf, __pyx_v_b, __pyx_v_col, __pyx_v_gs); if (unlikely(__pyx_t_2 == ((__pyx_t_7questdb_7ingress_void_int)-1))) __PYX_ERR(1, 2594, __pyx_L1_error)
+2595: elif dc == col_dispatch_code_t.col_dispatch_code_at__dt64ns_tz_arrow:
break;
case __pyx_e_7questdb_7ingress_col_dispatch_code_at__dt64us_tz_arrow:
+2596: _dataframe_serialize_cell_at_dt64ns_tz_arrow(ls_buf, b, col, gs)
__pyx_t_2 = __pyx_f_7questdb_7ingress__dataframe_serialize_cell_at_dt64ns_tz_arrow(__pyx_v_ls_buf, __pyx_v_b, __pyx_v_col, __pyx_v_gs); if (unlikely(__pyx_t_2 == ((__pyx_t_7questdb_7ingress_void_int)-1))) __PYX_ERR(1, 2596, __pyx_L1_error)
+2597: elif dc == col_dispatch_code_t.col_dispatch_code_at__dt64us_tz_arrow:
break;
default:
+2598: _dataframe_serialize_cell_at_dt64us_tz_arrow(ls_buf, b, col, gs)
__pyx_t_2 = __pyx_f_7questdb_7ingress__dataframe_serialize_cell_at_dt64us_tz_arrow(__pyx_v_ls_buf, __pyx_v_b, __pyx_v_col, __pyx_v_gs); if (unlikely(__pyx_t_2 == ((__pyx_t_7questdb_7ingress_void_int)-1))) __PYX_ERR(1, 2598, __pyx_L1_error)
2599: else:
+2600: _ensure_has_gil(gs)
__pyx_f_7questdb_7ingress__ensure_has_gil(__pyx_v_gs); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 2600, __pyx_L1_error)
+2601: raise RuntimeError(f"Unknown column dispatch code: {dc}")
__pyx_t_4 = NULL;
__pyx_t_5 = __Pyx_PyUnicode_From_enum____pyx_t_7questdb_7ingress_col_dispatch_code_t(__pyx_v_dc, 0, ' ', 'd'); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2601, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
__pyx_t_6 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_Unknown_column_dispatch_code, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 2601, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_6);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
__pyx_t_7 = 1;
{
PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_6};
__pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2601, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
}
__Pyx_Raise(__pyx_t_3, 0, 0, 0);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__PYX_ERR(1, 2601, __pyx_L1_error)
break;
}
2602: # See earlier note about switch statement generation.
2603: # Don't add complex conditions above!
2604:
2605:
+2606: cdef void _dataframe_col_advance(col_t* col) noexcept nogil:
static void __pyx_f_7questdb_7ingress__dataframe_col_advance(struct __pyx_t_7questdb_7ingress_col_t *__pyx_v_col) {
struct __pyx_t_7questdb_7ingress_col_cursor_t *__pyx_v_cursor;
size_t __pyx_v_new_chunk;
/* … */
/* function exit code */
}
2607: # Branchless version of:
2608: # cdef bint new_chunk = cursor.offset == <size_t>cursor.chunk.length
2609: # if new_chunk == 0:
2610: # cursor.chunk_index += 1
2611: # cursor.chunk += 1 # pointer advance
2612: #
2613: # if new_chunk:
2614: # cursor.offset = cursor.chunk.offset
2615: # else:
2616: # cursor.offset += 1
2617: #
2618: # (Checked with Godbolt, GCC -O3 code was rather "jumpy")
+2619: cdef col_cursor_t* cursor = &col.cursor
__pyx_v_cursor = (&__pyx_v_col->cursor);
2620: cdef size_t new_chunk # disguised bint. Either 0 or 1.
+2621: cursor.offset += 1
__pyx_v_cursor->offset = (__pyx_v_cursor->offset + 1);
+2622: new_chunk = cursor.offset == <size_t>cursor.chunk.length
__pyx_v_new_chunk = (__pyx_v_cursor->offset == ((size_t)__pyx_v_cursor->chunk->length));
+2623: cursor.chunk_index += new_chunk
__pyx_v_cursor->chunk_index = (__pyx_v_cursor->chunk_index + __pyx_v_new_chunk);
+2624: cursor.chunk += new_chunk
__pyx_v_cursor->chunk = (__pyx_v_cursor->chunk + __pyx_v_new_chunk);
2625: # Note: We get away with this because we've allocated one extra blank chunk.
2626: # This ensures that accessing `cursor.chunk.offset` doesn't segfault.
+2627: cursor.offset = (
__pyx_v_cursor->offset = ((__pyx_v_new_chunk * __pyx_v_cursor->chunk->offset) + ((!(__pyx_v_new_chunk != 0)) * __pyx_v_cursor->offset));
2628: (new_chunk * cursor.chunk.offset) +
2629: ((not new_chunk) * cursor.offset))
2630:
2631:
+2632: cdef void_int _dataframe_handle_auto_flush(
static __pyx_t_7questdb_7ingress_void_int __pyx_f_7questdb_7ingress__dataframe_handle_auto_flush(struct __pyx_t_7questdb_7ingress_auto_flush_t const *__pyx_v_af, struct line_sender_buffer *__pyx_v_ls_buf, PyThreadState **__pyx_v_gs) {
struct line_sender_error *__pyx_v_flush_err;
struct line_sender_error *__pyx_v_marker_err;
int __pyx_v_flush_ok;
int __pyx_v_marker_ok;
int __pyx_v_had_gil;
__pyx_t_7questdb_7ingress_void_int __pyx_r;
/* … */
/* function exit code */
__pyx_r = 0;
goto __pyx_L0;
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_4);
__Pyx_XDECREF(__pyx_t_5);
__Pyx_AddTraceback("questdb.ingress._dataframe_handle_auto_flush", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = -1;
__pyx_L0:;
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
2633: const auto_flush_t* af,
2634: line_sender_buffer* ls_buf,
2635: PyThreadState** gs) except -1:
2636: cdef line_sender_error* flush_err
2637: cdef line_sender_error* marker_err
2638: cdef bint flush_ok
2639: cdef bint marker_ok
+2640: if (af.sender == NULL) or (not should_auto_flush(&af.mode, ls_buf, af.last_flush_ms[0])):
__pyx_t_2 = (__pyx_v_af->sender == NULL);
if (!__pyx_t_2) {
} else {
__pyx_t_1 = __pyx_t_2;
goto __pyx_L4_bool_binop_done;
}
__pyx_t_2 = __pyx_f_7questdb_7ingress_should_auto_flush((&__pyx_v_af->mode), __pyx_v_ls_buf, (__pyx_v_af->last_flush_ms[0])); if (unlikely(__pyx_t_2 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(1, 2640, __pyx_L1_error)
__pyx_t_3 = (!__pyx_t_2);
__pyx_t_1 = __pyx_t_3;
__pyx_L4_bool_binop_done:;
if (__pyx_t_1) {
/* … */
}
+2641: return 0
__pyx_r = 0;
goto __pyx_L0;
2642:
2643: # Always temporarily release GIL during a flush.
+2644: had_gil = _ensure_doesnt_have_gil(gs)
__pyx_t_1 = __pyx_f_7questdb_7ingress__ensure_doesnt_have_gil(__pyx_v_gs); if (unlikely(__pyx_t_1 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(1, 2644, __pyx_L1_error) __pyx_v_had_gil = __pyx_t_1;
+2645: flush_ok = line_sender_flush(af.sender, ls_buf, &flush_err)
__pyx_v_flush_ok = line_sender_flush(__pyx_v_af->sender, __pyx_v_ls_buf, (&__pyx_v_flush_err));
+2646: if flush_ok:
if (__pyx_v_flush_ok) {
/* … */
goto __pyx_L6;
}
+2647: af.last_flush_ms[0] = line_sender_now_micros() // 1000
(__pyx_v_af->last_flush_ms[0]) = __Pyx_div_int64_t(line_sender_now_micros(), 0x3E8, 1);
2648: else:
2649: # To avoid flush reattempt on Sender.__exit__.
+2650: line_sender_buffer_clear(ls_buf)
/*else*/ {
line_sender_buffer_clear(__pyx_v_ls_buf);
}
__pyx_L6:;
2651:
2652: # Flushing will have cleared the marker: We need to set it again
2653: # We need this also on error due to our error handling logic which will
2654: # try to rewind the buffer on error and fail if the marker is unset.
+2655: marker_ok = line_sender_buffer_set_marker(ls_buf, &marker_err)
__pyx_v_marker_ok = line_sender_buffer_set_marker(__pyx_v_ls_buf, (&__pyx_v_marker_err));
2656:
+2657: if had_gil or (not flush_ok) or (not marker_ok):
if (!__pyx_v_had_gil) {
} else {
__pyx_t_1 = __pyx_v_had_gil;
goto __pyx_L8_bool_binop_done;
}
__pyx_t_3 = (!__pyx_v_flush_ok);
if (!__pyx_t_3) {
} else {
__pyx_t_1 = __pyx_t_3;
goto __pyx_L8_bool_binop_done;
}
__pyx_t_3 = (!__pyx_v_marker_ok);
__pyx_t_1 = __pyx_t_3;
__pyx_L8_bool_binop_done:;
if (__pyx_t_1) {
/* … */
}
+2658: _ensure_has_gil(gs)
__pyx_f_7questdb_7ingress__ensure_has_gil(__pyx_v_gs); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 2658, __pyx_L1_error)
2659:
+2660: if not flush_ok:
__pyx_t_1 = (!__pyx_v_flush_ok);
if (unlikely(__pyx_t_1)) {
/* … */
}
+2661: raise c_err_to_py_fmt(flush_err, _FLUSH_FMT)
__Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_FLUSH_FMT); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2661, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (!(likely(PyUnicode_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_t_4))) __PYX_ERR(1, 2661, __pyx_L1_error) __pyx_t_5 = __pyx_f_7questdb_7ingress_c_err_to_py_fmt(__pyx_v_flush_err, ((PyObject*)__pyx_t_4)); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2661, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_Raise(__pyx_t_5, 0, 0, 0); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __PYX_ERR(1, 2661, __pyx_L1_error)
2662:
2663: # The flush error takes precedence over the marker error.
+2664: if not marker_ok:
__pyx_t_1 = (!__pyx_v_marker_ok);
if (unlikely(__pyx_t_1)) {
/* … */
}
+2665: raise c_err_to_py(marker_err)
__pyx_t_5 = __pyx_f_7questdb_7ingress_c_err_to_py(__pyx_v_marker_err); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2665, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_Raise(__pyx_t_5, 0, 0, 0); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __PYX_ERR(1, 2665, __pyx_L1_error)
2666:
2667:
2668: # Every how many cells to release and re-acquire the Python GIL.
2669: #
2670: # We've done some perf testing with some mixed column dtypes.
2671: # On a modern CPU we're doing over 8 million pandas cells per second.
2672: # By default, `sys.getswitchinterval()` is 0.005 seconds.
2673: # To accomodate this, we'd need to release the GIL every 40,000 cells.
2674: # This will be divided by the column count to get the row gil blip interval.
+2675: cdef size_t _CELL_GIL_BLIP_INTERVAL = 40000
__pyx_v_7questdb_7ingress__CELL_GIL_BLIP_INTERVAL = 0x9C40;
2676:
2677:
+2678: cdef void_int _dataframe(
static __pyx_t_7questdb_7ingress_void_int __pyx_f_7questdb_7ingress__dataframe(struct __pyx_t_7questdb_7ingress_auto_flush_t __pyx_v_af, struct line_sender_buffer *__pyx_v_ls_buf, struct qdb_pystr_buf *__pyx_v_b, PyObject *__pyx_v_df, PyObject *__pyx_v_table_name, PyObject *__pyx_v_table_name_col, PyObject *__pyx_v_symbols, PyObject *__pyx_v_at) {
size_t __pyx_v_col_count;
struct line_sender_table_name __pyx_v_c_table_name;
int64_t __pyx_v_at_value;
struct __pyx_t_7questdb_7ingress_col_t_arr __pyx_v_cols;
int __pyx_v_any_cols_need_gil;
struct qdb_pystr_pos __pyx_v_str_buf_marker;
size_t __pyx_v_row_count;
struct line_sender_error *__pyx_v_err;
size_t __pyx_v_row_index;
size_t __pyx_v_col_index;
struct __pyx_t_7questdb_7ingress_col_t *__pyx_v_col;
size_t __pyx_v_row_gil_blip_interval;
PyThreadState *__pyx_v_gs;
int __pyx_v_was_serializing_cell;
int __pyx_v_was_auto_flush;
PyObject *__pyx_v_e = NULL;
__pyx_t_7questdb_7ingress_void_int __pyx_r;
/* … */
/* function exit code */
__pyx_r = 0;
goto __pyx_L0;
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
__Pyx_XDECREF(__pyx_t_8);
__Pyx_XDECREF(__pyx_t_20);
__Pyx_XDECREF(__pyx_t_21);
__Pyx_XDECREF(__pyx_t_22);
__Pyx_XDECREF(__pyx_t_23);
__Pyx_XDECREF(__pyx_t_24);
__Pyx_XDECREF(__pyx_t_25);
__Pyx_XDECREF(__pyx_t_27);
__Pyx_XDECREF(__pyx_t_28);
__Pyx_XDECREF(__pyx_t_29);
__Pyx_XDECREF(__pyx_t_30);
__Pyx_AddTraceback("questdb.ingress._dataframe", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = -1;
__pyx_L0:;
__Pyx_XDECREF(__pyx_v_e);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
2679: auto_flush_t af,
2680: line_sender_buffer* ls_buf,
2681: qdb_pystr_buf* b,
2682: object df,
2683: object table_name,
2684: object table_name_col,
2685: object symbols,
2686: object at) except -1:
2687: cdef size_t col_count
2688: cdef line_sender_table_name c_table_name
+2689: cdef int64_t at_value = _AT_IS_SET_BY_COLUMN
__pyx_v_at_value = __pyx_v_7questdb_7ingress__AT_IS_SET_BY_COLUMN;
+2690: cdef col_t_arr cols = col_t_arr_blank()
__pyx_v_cols = __pyx_f_7questdb_7ingress_col_t_arr_blank();
+2691: cdef bint any_cols_need_gil = False
__pyx_v_any_cols_need_gil = 0;
2692: cdef qdb_pystr_pos str_buf_marker
2693: cdef size_t row_count
+2694: cdef line_sender_error* err = NULL
__pyx_v_err = NULL;
2695: cdef size_t row_index
2696: cdef size_t col_index
2697: cdef col_t* col
2698: cdef size_t row_gil_blip_interval
+2699: cdef PyThreadState* gs = NULL # GIL state. NULL means we have the GIL.
__pyx_v_gs = NULL;
2700: cdef bint had_gil
+2701: cdef bint was_serializing_cell = False
__pyx_v_was_serializing_cell = 0;
2702:
+2703: _dataframe_may_import_deps()
__pyx_t_1 = __pyx_f_7questdb_7ingress__dataframe_may_import_deps(); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2703, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+2704: _dataframe_check_is_dataframe(df)
__pyx_t_1 = __pyx_f_7questdb_7ingress__dataframe_check_is_dataframe(__pyx_v_df); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2704, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+2705: row_count = len(df)
__pyx_t_2 = PyObject_Length(__pyx_v_df); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(1, 2705, __pyx_L1_error) __pyx_v_row_count = __pyx_t_2;
+2706: col_count = len(df.columns)
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_df, __pyx_mstate_global->__pyx_n_u_columns); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2706, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(1, 2706, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_col_count = __pyx_t_2;
+2707: if (col_count == 0) or (row_count == 0):
__pyx_t_4 = (__pyx_v_col_count == 0);
if (!__pyx_t_4) {
} else {
__pyx_t_3 = __pyx_t_4;
goto __pyx_L4_bool_binop_done;
}
__pyx_t_4 = (__pyx_v_row_count == 0);
__pyx_t_3 = __pyx_t_4;
__pyx_L4_bool_binop_done:;
if (__pyx_t_3) {
/* … */
}
+2708: return 0 # Nothing to do.
__pyx_r = 0;
goto __pyx_L0;
2709:
+2710: try:
/*try:*/ {
{
/*try:*/ {
/* … */
}
__Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
__Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
__Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
goto __pyx_L14_try_end;
__pyx_L9_error:;
__Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_XDECREF(__pyx_t_20); __pyx_t_20 = 0;
__Pyx_XDECREF(__pyx_t_21); __pyx_t_21 = 0;
__Pyx_XDECREF(__pyx_t_22); __pyx_t_22 = 0;
__Pyx_XDECREF(__pyx_t_23); __pyx_t_23 = 0;
__Pyx_XDECREF(__pyx_t_24); __pyx_t_24 = 0;
__Pyx_XDECREF(__pyx_t_25); __pyx_t_25 = 0;
__Pyx_XDECREF(__pyx_t_27); __pyx_t_27 = 0;
__Pyx_XDECREF(__pyx_t_28); __pyx_t_28 = 0;
__Pyx_XDECREF(__pyx_t_29); __pyx_t_29 = 0;
__Pyx_XDECREF(__pyx_t_30); __pyx_t_30 = 0;
__Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
/* … */
__pyx_L11_except_error:;
__Pyx_XGIVEREF(__pyx_t_5);
__Pyx_XGIVEREF(__pyx_t_6);
__Pyx_XGIVEREF(__pyx_t_7);
__Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7);
goto __pyx_L7_error;
__pyx_L14_try_end:;
}
}
+2711: qdb_pystr_buf_clear(b)
qdb_pystr_buf_clear(__pyx_v_b);
+2712: cols = col_t_arr_new(col_count)
__pyx_v_cols = __pyx_f_7questdb_7ingress_col_t_arr_new(__pyx_v_col_count);
+2713: _dataframe_resolve_args(
__pyx_t_9 = __pyx_f_7questdb_7ingress__dataframe_resolve_args(__pyx_v_df, __pyx_v_table_name, __pyx_v_table_name_col, __pyx_v_symbols, __pyx_t_1, __pyx_v_b, __pyx_v_col_count, (&__pyx_v_c_table_name), (&__pyx_v_at_value), (&__pyx_v_cols), (&__pyx_v_any_cols_need_gil)); if (unlikely(__pyx_t_9 == ((__pyx_t_7questdb_7ingress_void_int)-1))) __PYX_ERR(1, 2713, __pyx_L9_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
2714: df,
2715: table_name,
2716: table_name_col,
2717: symbols,
+2718: at if not isinstance(at, ServerTimestampType) else None,
__Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_ServerTimestampType); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 2718, __pyx_L9_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_3 = PyObject_IsInstance(__pyx_v_at, __pyx_t_8); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 2718, __pyx_L9_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_4 = (!__pyx_t_3); if (__pyx_t_4) { __Pyx_INCREF(__pyx_v_at); __pyx_t_1 = __pyx_v_at; } else { __Pyx_INCREF(Py_None); __pyx_t_1 = Py_None; }
2719: b,
2720: col_count,
2721: &c_table_name,
2722: &at_value,
2723: &cols,
2724: &any_cols_need_gil)
2725:
2726: # We've used the str buffer up to a point for the headers.
2727: # Instead of clearing it (which would clear the headers' memory)
2728: # we will truncate (rewind) back to this position.
+2729: str_buf_marker = qdb_pystr_buf_tell(b)
__pyx_v_str_buf_marker = qdb_pystr_buf_tell(__pyx_v_b);
+2730: line_sender_buffer_clear_marker(ls_buf)
line_sender_buffer_clear_marker(__pyx_v_ls_buf);
2731:
2732: # On error, undo all added lines.
+2733: if not line_sender_buffer_set_marker(ls_buf, &err):
__pyx_t_4 = (!line_sender_buffer_set_marker(__pyx_v_ls_buf, (&__pyx_v_err)));
if (unlikely(__pyx_t_4)) {
/* … */
}
+2734: raise c_err_to_py(err)
__pyx_t_1 = __pyx_f_7questdb_7ingress_c_err_to_py(__pyx_v_err); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2734, __pyx_L9_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __PYX_ERR(1, 2734, __pyx_L9_error)
2735:
+2736: row_gil_blip_interval = _CELL_GIL_BLIP_INTERVAL // col_count
if (unlikely(__pyx_v_col_count == 0)) {
PyErr_SetString(PyExc_ZeroDivisionError, "integer division or modulo by zero");
__PYX_ERR(1, 2736, __pyx_L9_error)
}
__pyx_v_row_gil_blip_interval = (__pyx_v_7questdb_7ingress__CELL_GIL_BLIP_INTERVAL / __pyx_v_col_count);
+2737: if row_gil_blip_interval < 400: # ceiling reached at 100 columns
__pyx_t_4 = (__pyx_v_row_gil_blip_interval < 0x190);
if (__pyx_t_4) {
/* … */
}
+2738: row_gil_blip_interval = 400
__pyx_v_row_gil_blip_interval = 0x190;
+2739: try:
{
/*try:*/ {
/* … */
}
__Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
__Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
__Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
goto __pyx_L22_try_end;
__pyx_L17_error:;
__Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
/* … */
__pyx_L19_except_error:;
__Pyx_XGIVEREF(__pyx_t_10);
__Pyx_XGIVEREF(__pyx_t_11);
__Pyx_XGIVEREF(__pyx_t_12);
__Pyx_ExceptionReset(__pyx_t_10, __pyx_t_11, __pyx_t_12);
goto __pyx_L9_error;
__pyx_L22_try_end:;
}
2740: # Don't move this logic up! We need the GIL to execute a `try`.
2741: # Also we can't have any other `try` blocks between here and the
2742: # `finally` block.
+2743: if not any_cols_need_gil:
__pyx_t_4 = (!__pyx_v_any_cols_need_gil);
if (__pyx_t_4) {
/* … */
}
+2744: _ensure_doesnt_have_gil(&gs)
__pyx_t_4 = __pyx_f_7questdb_7ingress__ensure_doesnt_have_gil((&__pyx_v_gs)); if (unlikely(__pyx_t_4 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(1, 2744, __pyx_L17_error)
2745:
+2746: for row_index in range(row_count):
__pyx_t_13 = __pyx_v_row_count;
__pyx_t_14 = __pyx_t_13;
for (__pyx_t_15 = 0; __pyx_t_15 < __pyx_t_14; __pyx_t_15+=1) {
__pyx_v_row_index = __pyx_t_15;
+2747: if (gs == NULL) and (row_index % row_gil_blip_interval == 0):
__pyx_t_3 = (__pyx_v_gs == NULL);
if (__pyx_t_3) {
} else {
__pyx_t_4 = __pyx_t_3;
goto __pyx_L27_bool_binop_done;
}
if (unlikely(__pyx_v_row_gil_blip_interval == 0)) {
PyErr_SetString(PyExc_ZeroDivisionError, "integer division or modulo by zero");
__PYX_ERR(1, 2747, __pyx_L17_error)
}
__pyx_t_3 = ((__pyx_v_row_index % __pyx_v_row_gil_blip_interval) == 0);
__pyx_t_4 = __pyx_t_3;
__pyx_L27_bool_binop_done:;
if (__pyx_t_4) {
/* … */
}
2748: # Release and re-acquire the GIL every so often.
2749: # This is to allow other python threads to run.
2750: # If we hold the GIL for too long, we can starve other
2751: # threads, for example timing out network activity.
+2752: _ensure_doesnt_have_gil(&gs)
__pyx_t_4 = __pyx_f_7questdb_7ingress__ensure_doesnt_have_gil((&__pyx_v_gs)); if (unlikely(__pyx_t_4 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(1, 2752, __pyx_L17_error)
+2753: _ensure_has_gil(&gs)
__pyx_f_7questdb_7ingress__ensure_has_gil((&__pyx_v_gs)); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 2753, __pyx_L17_error)
2754:
+2755: qdb_pystr_buf_truncate(b, str_buf_marker)
qdb_pystr_buf_truncate(__pyx_v_b, __pyx_v_str_buf_marker);
2756:
2757: # Table-name from `table_name` arg in Python.
+2758: if c_table_name.buf != NULL:
__pyx_t_4 = (__pyx_v_c_table_name.buf != NULL);
if (__pyx_t_4) {
/* … */
}
+2759: if not line_sender_buffer_table(ls_buf, c_table_name, &err):
__pyx_t_4 = (!line_sender_buffer_table(__pyx_v_ls_buf, __pyx_v_c_table_name, (&__pyx_v_err)));
if (unlikely(__pyx_t_4)) {
/* … */
}
+2760: _ensure_has_gil(&gs)
__pyx_f_7questdb_7ingress__ensure_has_gil((&__pyx_v_gs)); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 2760, __pyx_L17_error)
+2761: raise c_err_to_py(err)
__pyx_t_1 = __pyx_f_7questdb_7ingress_c_err_to_py(__pyx_v_err); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2761, __pyx_L17_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __PYX_ERR(1, 2761, __pyx_L17_error)
2762:
2763: # Serialize columns cells.
2764: # Note: Columns are sorted: table name, symbols, fields, at.
+2765: was_serializing_cell = True
__pyx_v_was_serializing_cell = 1;
+2766: for col_index in range(col_count):
__pyx_t_16 = __pyx_v_col_count;
__pyx_t_17 = __pyx_t_16;
for (__pyx_t_18 = 0; __pyx_t_18 < __pyx_t_17; __pyx_t_18+=1) {
__pyx_v_col_index = __pyx_t_18;
+2767: col = &cols.d[col_index]
__pyx_v_col = (&(__pyx_v_cols.d[__pyx_v_col_index]));
+2768: _dataframe_serialize_cell(ls_buf, b, col, &gs) # may raise
__pyx_t_9 = __pyx_f_7questdb_7ingress__dataframe_serialize_cell(__pyx_v_ls_buf, __pyx_v_b, __pyx_v_col, (&__pyx_v_gs)); if (unlikely(__pyx_t_9 == ((__pyx_t_7questdb_7ingress_void_int)-1))) __PYX_ERR(1, 2768, __pyx_L17_error)
+2769: _dataframe_col_advance(col)
__pyx_f_7questdb_7ingress__dataframe_col_advance(__pyx_v_col);
}
+2770: was_serializing_cell = False
__pyx_v_was_serializing_cell = 0;
2771:
2772: # Fixed "at" value (not from a column).
+2773: if at_value == _AT_IS_SERVER_NOW:
__pyx_t_4 = (__pyx_v_at_value == __pyx_v_7questdb_7ingress__AT_IS_SERVER_NOW);
if (__pyx_t_4) {
/* … */
goto __pyx_L33;
}
+2774: if not line_sender_buffer_at_now(ls_buf, &err):
__pyx_t_4 = (!line_sender_buffer_at_now(__pyx_v_ls_buf, (&__pyx_v_err)));
if (unlikely(__pyx_t_4)) {
/* … */
}
+2775: _ensure_has_gil(&gs)
__pyx_f_7questdb_7ingress__ensure_has_gil((&__pyx_v_gs)); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 2775, __pyx_L17_error)
+2776: raise c_err_to_py(err)
__pyx_t_1 = __pyx_f_7questdb_7ingress_c_err_to_py(__pyx_v_err); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2776, __pyx_L17_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __PYX_ERR(1, 2776, __pyx_L17_error)
+2777: elif at_value >= 0:
__pyx_t_4 = (__pyx_v_at_value >= 0);
if (__pyx_t_4) {
/* … */
}
__pyx_L33:;
+2778: if not line_sender_buffer_at_nanos(ls_buf, at_value, &err):
__pyx_t_4 = (!line_sender_buffer_at_nanos(__pyx_v_ls_buf, __pyx_v_at_value, (&__pyx_v_err)));
if (unlikely(__pyx_t_4)) {
/* … */
}
+2779: _ensure_has_gil(&gs)
__pyx_f_7questdb_7ingress__ensure_has_gil((&__pyx_v_gs)); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 2779, __pyx_L17_error)
+2780: raise c_err_to_py(err)
__pyx_t_1 = __pyx_f_7questdb_7ingress_c_err_to_py(__pyx_v_err); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2780, __pyx_L17_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __PYX_ERR(1, 2780, __pyx_L17_error)
2781:
+2782: was_auto_flush = True
__pyx_v_was_auto_flush = 1;
+2783: _dataframe_handle_auto_flush(&af, ls_buf, &gs)
__pyx_t_9 = __pyx_f_7questdb_7ingress__dataframe_handle_auto_flush((&__pyx_v_af), __pyx_v_ls_buf, (&__pyx_v_gs)); if (unlikely(__pyx_t_9 == ((__pyx_t_7questdb_7ingress_void_int)-1))) __PYX_ERR(1, 2783, __pyx_L17_error)
+2784: was_auto_flush = False
__pyx_v_was_auto_flush = 0;
}
+2785: except Exception as e:
__pyx_t_19 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_Exception)))); if (__pyx_t_19) { __Pyx_AddTraceback("questdb.ingress._dataframe", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_8, &__pyx_t_20) < 0) __PYX_ERR(1, 2785, __pyx_L19_except_error) __Pyx_XGOTREF(__pyx_t_1); __Pyx_XGOTREF(__pyx_t_8); __Pyx_XGOTREF(__pyx_t_20); __Pyx_INCREF(__pyx_t_8); __pyx_v_e = __pyx_t_8; /*try:*/ { /* … */ /*finally:*/ { __pyx_L41_error:; /*exception exit:*/{ __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __pyx_t_34 = 0; __pyx_t_35 = 0; __pyx_t_36 = 0; __pyx_t_37 = 0; __pyx_t_38 = 0; __pyx_t_39 = 0; __Pyx_XDECREF(__pyx_t_21); __pyx_t_21 = 0; __Pyx_XDECREF(__pyx_t_22); __pyx_t_22 = 0; __Pyx_XDECREF(__pyx_t_23); __pyx_t_23 = 0; __Pyx_XDECREF(__pyx_t_24); __pyx_t_24 = 0; __Pyx_XDECREF(__pyx_t_25); __pyx_t_25 = 0; __Pyx_XDECREF(__pyx_t_27); __pyx_t_27 = 0; __Pyx_XDECREF(__pyx_t_28); __pyx_t_28 = 0; __Pyx_XDECREF(__pyx_t_29); __pyx_t_29 = 0; __Pyx_XDECREF(__pyx_t_30); __pyx_t_30 = 0; __Pyx_ExceptionSwap(&__pyx_t_37, &__pyx_t_38, &__pyx_t_39); if ( unlikely(__Pyx_GetException(&__pyx_t_34, &__pyx_t_35, &__pyx_t_36) < 0)) __Pyx_ErrFetch(&__pyx_t_34, &__pyx_t_35, &__pyx_t_36); __Pyx_XGOTREF(__pyx_t_34); __Pyx_XGOTREF(__pyx_t_35); __Pyx_XGOTREF(__pyx_t_36); __Pyx_XGOTREF(__pyx_t_37); __Pyx_XGOTREF(__pyx_t_38); __Pyx_XGOTREF(__pyx_t_39); __pyx_t_19 = __pyx_lineno; __pyx_t_32 = __pyx_clineno; __pyx_t_33 = __pyx_filename; { __Pyx_DECREF(__pyx_v_e); __pyx_v_e = 0; } __Pyx_XGIVEREF(__pyx_t_37); __Pyx_XGIVEREF(__pyx_t_38); __Pyx_XGIVEREF(__pyx_t_39); __Pyx_ExceptionReset(__pyx_t_37, __pyx_t_38, __pyx_t_39); __Pyx_XGIVEREF(__pyx_t_34); __Pyx_XGIVEREF(__pyx_t_35); __Pyx_XGIVEREF(__pyx_t_36); __Pyx_ErrRestore(__pyx_t_34, __pyx_t_35, __pyx_t_36); __pyx_t_34 = 0; __pyx_t_35 = 0; __pyx_t_36 = 0; __pyx_t_37 = 0; __pyx_t_38 = 0; __pyx_t_39 = 0; __pyx_lineno = __pyx_t_19; __pyx_clineno = __pyx_t_32; __pyx_filename = __pyx_t_33; goto __pyx_L19_except_error; } } } goto __pyx_L19_except_error;
2786: # It would be an internal bug for this to raise.
+2787: if not line_sender_buffer_rewind_to_marker(ls_buf, &err):
__pyx_t_4 = (!line_sender_buffer_rewind_to_marker(__pyx_v_ls_buf, (&__pyx_v_err)));
if (unlikely(__pyx_t_4)) {
/* … */
}
+2788: raise c_err_to_py(err)
__pyx_t_21 = __pyx_f_7questdb_7ingress_c_err_to_py(__pyx_v_err); if (unlikely(!__pyx_t_21)) __PYX_ERR(1, 2788, __pyx_L41_error) __Pyx_GOTREF(__pyx_t_21); __Pyx_Raise(__pyx_t_21, 0, 0, 0); __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0; __PYX_ERR(1, 2788, __pyx_L41_error)
2789:
+2790: if (isinstance(e, IngressError) and
__Pyx_GetModuleGlobalName(__pyx_t_21, __pyx_mstate_global->__pyx_n_u_IngressError); if (unlikely(!__pyx_t_21)) __PYX_ERR(1, 2790, __pyx_L41_error) __Pyx_GOTREF(__pyx_t_21); __pyx_t_3 = PyObject_IsInstance(__pyx_v_e, __pyx_t_21); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 2790, __pyx_L41_error) __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0; if (__pyx_t_3) { } else { __pyx_t_4 = __pyx_t_3; goto __pyx_L45_bool_binop_done; } /* … */ if (unlikely(__pyx_t_4)) { /* … */ }
+2791: (e.code == IngressErrorCode.InvalidApiCall) and not was_auto_flush):
__pyx_t_21 = __Pyx_PyObject_GetAttrStr(__pyx_v_e, __pyx_mstate_global->__pyx_n_u_code); if (unlikely(!__pyx_t_21)) __PYX_ERR(1, 2791, __pyx_L41_error) __Pyx_GOTREF(__pyx_t_21); __Pyx_GetModuleGlobalName(__pyx_t_22, __pyx_mstate_global->__pyx_n_u_IngressErrorCode); if (unlikely(!__pyx_t_22)) __PYX_ERR(1, 2791, __pyx_L41_error) __Pyx_GOTREF(__pyx_t_22); __pyx_t_23 = __Pyx_PyObject_GetAttrStr(__pyx_t_22, __pyx_mstate_global->__pyx_n_u_InvalidApiCall); if (unlikely(!__pyx_t_23)) __PYX_ERR(1, 2791, __pyx_L41_error) __Pyx_GOTREF(__pyx_t_23); __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0; __pyx_t_22 = PyObject_RichCompare(__pyx_t_21, __pyx_t_23, Py_EQ); __Pyx_XGOTREF(__pyx_t_22); if (unlikely(!__pyx_t_22)) __PYX_ERR(1, 2791, __pyx_L41_error) __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0; __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0; __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_22); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(1, 2791, __pyx_L41_error) __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0; if (__pyx_t_3) { } else { __pyx_t_4 = __pyx_t_3; goto __pyx_L45_bool_binop_done; } __pyx_t_3 = (!__pyx_v_was_auto_flush); __pyx_t_4 = __pyx_t_3; __pyx_L45_bool_binop_done:;
2792: # TODO: This should be allowed by the database.
2793: # It currently isn't so we have to raise an error.
+2794: raise IngressError(
__pyx_t_23 = NULL;
__Pyx_GetModuleGlobalName(__pyx_t_21, __pyx_mstate_global->__pyx_n_u_IngressError); if (unlikely(!__pyx_t_21)) __PYX_ERR(1, 2794, __pyx_L41_error)
__Pyx_GOTREF(__pyx_t_21);
+2795: IngressErrorCode.BadDataFrame,
__Pyx_GetModuleGlobalName(__pyx_t_24, __pyx_mstate_global->__pyx_n_u_IngressErrorCode); if (unlikely(!__pyx_t_24)) __PYX_ERR(1, 2795, __pyx_L41_error) __Pyx_GOTREF(__pyx_t_24); __pyx_t_25 = __Pyx_PyObject_GetAttrStr(__pyx_t_24, __pyx_mstate_global->__pyx_n_u_BadDataFrame); if (unlikely(!__pyx_t_25)) __PYX_ERR(1, 2795, __pyx_L41_error) __Pyx_GOTREF(__pyx_t_25); __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0;
+2796: f'Bad dataframe row at index {row_index}: ' +
__pyx_t_24 = __Pyx_PyUnicode_From_size_t(__pyx_v_row_index, 0, ' ', 'd'); if (unlikely(!__pyx_t_24)) __PYX_ERR(1, 2796, __pyx_L41_error) __Pyx_GOTREF(__pyx_t_24); __pyx_t_26[0] = __pyx_mstate_global->__pyx_kp_u_Bad_dataframe_row_at_index; __pyx_t_26[1] = __pyx_t_24; __pyx_t_26[2] = __pyx_mstate_global->__pyx_kp_u_All_values_are_nulls_Ensure_at; __pyx_t_27 = __Pyx_PyUnicode_Join(__pyx_t_26, 3, 27 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_24) + 63, 127); if (unlikely(!__pyx_t_27)) __PYX_ERR(1, 2796, __pyx_L41_error) __Pyx_GOTREF(__pyx_t_27); __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0; __pyx_t_13 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_21))) { __pyx_t_23 = PyMethod_GET_SELF(__pyx_t_21); assert(__pyx_t_23); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_21); __Pyx_INCREF(__pyx_t_23); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_21, __pyx__function); __pyx_t_13 = 0; } #endif { PyObject *__pyx_callargs[3] = {__pyx_t_23, __pyx_t_25, __pyx_t_27}; __pyx_t_22 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_21, __pyx_callargs+__pyx_t_13, (3-__pyx_t_13) | (__pyx_t_13*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_23); __pyx_t_23 = 0; __Pyx_DECREF(__pyx_t_25); __pyx_t_25 = 0; __Pyx_DECREF(__pyx_t_27); __pyx_t_27 = 0; __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0; if (unlikely(!__pyx_t_22)) __PYX_ERR(1, 2794, __pyx_L41_error) __Pyx_GOTREF(__pyx_t_22); }
2797: 'All values are nulls. '+
+2798: 'Ensure at least one column is not null.') from e
__Pyx_Raise(__pyx_t_22, 0, 0, __pyx_v_e); __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0; __PYX_ERR(1, 2794, __pyx_L41_error)
+2799: elif was_serializing_cell:
if (unlikely(__pyx_v_was_serializing_cell)) {
/* … */
}
+2800: raise IngressError(
__pyx_t_21 = NULL;
__Pyx_GetModuleGlobalName(__pyx_t_27, __pyx_mstate_global->__pyx_n_u_IngressError); if (unlikely(!__pyx_t_27)) __PYX_ERR(1, 2800, __pyx_L41_error)
__Pyx_GOTREF(__pyx_t_27);
+2801: IngressErrorCode.BadDataFrame,
__Pyx_GetModuleGlobalName(__pyx_t_25, __pyx_mstate_global->__pyx_n_u_IngressErrorCode); if (unlikely(!__pyx_t_25)) __PYX_ERR(1, 2801, __pyx_L41_error) __Pyx_GOTREF(__pyx_t_25); __pyx_t_23 = __Pyx_PyObject_GetAttrStr(__pyx_t_25, __pyx_mstate_global->__pyx_n_u_BadDataFrame); if (unlikely(!__pyx_t_23)) __PYX_ERR(1, 2801, __pyx_L41_error) __Pyx_GOTREF(__pyx_t_23); __Pyx_DECREF(__pyx_t_25); __pyx_t_25 = 0;
+2802: 'Failed to serialize value of column ' +
__pyx_t_24 = __Pyx_PyUnicode_ConcatSafe(__pyx_mstate_global->__pyx_kp_u_Failed_to_serialize_value_of_col, __pyx_t_25); if (unlikely(!__pyx_t_24)) __PYX_ERR(1, 2802, __pyx_L41_error) __Pyx_GOTREF(__pyx_t_24); __Pyx_DECREF(__pyx_t_25); __pyx_t_25 = 0;
+2803: repr(df.columns[col.setup.orig_index]) +
__pyx_t_25 = __Pyx_PyObject_GetAttrStr(__pyx_v_df, __pyx_mstate_global->__pyx_n_u_columns); if (unlikely(!__pyx_t_25)) __PYX_ERR(1, 2803, __pyx_L41_error) __Pyx_GOTREF(__pyx_t_25); __pyx_t_24 = __Pyx_GetItemInt(__pyx_t_25, __pyx_v_col->setup->orig_index, size_t, 0, __Pyx_PyLong_FromSize_t, 0, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_24)) __PYX_ERR(1, 2803, __pyx_L41_error) __Pyx_GOTREF(__pyx_t_24); __Pyx_DECREF(__pyx_t_25); __pyx_t_25 = 0; __pyx_t_25 = PyObject_Repr(__pyx_t_24); if (unlikely(!__pyx_t_25)) __PYX_ERR(1, 2803, __pyx_L41_error) __Pyx_GOTREF(__pyx_t_25); __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0; /* … */ __pyx_t_25 = __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_OwnStrongReferenceInPlace(__pyx_t_24, __pyx_t_28); if (unlikely(!__pyx_t_25)) __PYX_ERR(1, 2803, __pyx_L41_error) __Pyx_GOTREF(__pyx_t_25); __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0; __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0;
+2804: f' at row index {row_index} (' +
__pyx_t_25 = __Pyx_PyUnicode_From_size_t(__pyx_v_row_index, 0, ' ', 'd'); if (unlikely(!__pyx_t_25)) __PYX_ERR(1, 2804, __pyx_L41_error) __Pyx_GOTREF(__pyx_t_25); __pyx_t_26[0] = __pyx_mstate_global->__pyx_kp_u_at_row_index; __pyx_t_26[1] = __pyx_t_25; __pyx_t_26[2] = __pyx_mstate_global->__pyx_kp_u__6; __pyx_t_28 = __Pyx_PyUnicode_Join(__pyx_t_26, 3, 14 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_25) + 2, 127); if (unlikely(!__pyx_t_28)) __PYX_ERR(1, 2804, __pyx_L41_error) __Pyx_GOTREF(__pyx_t_28); __Pyx_DECREF(__pyx_t_25); __pyx_t_25 = 0; /* … */ __pyx_t_29 = __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_OwnStrongReferenceInPlaceSafe(__pyx_t_25, __pyx_t_30); if (unlikely(!__pyx_t_29)) __PYX_ERR(1, 2804, __pyx_L41_error) __Pyx_GOTREF(__pyx_t_29); __Pyx_DECREF(__pyx_t_25); __pyx_t_25 = 0; __Pyx_DECREF(__pyx_t_30); __pyx_t_30 = 0;
+2805: repr(df.iloc[row_index, col.setup.orig_index]) +
__pyx_t_28 = __Pyx_PyObject_GetAttrStr(__pyx_v_df, __pyx_mstate_global->__pyx_n_u_iloc); if (unlikely(!__pyx_t_28)) __PYX_ERR(1, 2805, __pyx_L41_error) __Pyx_GOTREF(__pyx_t_28); __pyx_t_24 = __Pyx_PyLong_FromSize_t(__pyx_v_row_index); if (unlikely(!__pyx_t_24)) __PYX_ERR(1, 2805, __pyx_L41_error) __Pyx_GOTREF(__pyx_t_24); __pyx_t_29 = __Pyx_PyLong_FromSize_t(__pyx_v_col->setup->orig_index); if (unlikely(!__pyx_t_29)) __PYX_ERR(1, 2805, __pyx_L41_error) __Pyx_GOTREF(__pyx_t_29); __pyx_t_30 = PyTuple_New(2); if (unlikely(!__pyx_t_30)) __PYX_ERR(1, 2805, __pyx_L41_error) __Pyx_GOTREF(__pyx_t_30); __Pyx_GIVEREF(__pyx_t_24); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_30, 0, __pyx_t_24) != (0)) __PYX_ERR(1, 2805, __pyx_L41_error); __Pyx_GIVEREF(__pyx_t_29); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_30, 1, __pyx_t_29) != (0)) __PYX_ERR(1, 2805, __pyx_L41_error); __pyx_t_24 = 0; __pyx_t_29 = 0; __pyx_t_29 = __Pyx_PyObject_GetItem(__pyx_t_28, __pyx_t_30); if (unlikely(!__pyx_t_29)) __PYX_ERR(1, 2805, __pyx_L41_error) __Pyx_GOTREF(__pyx_t_29); __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0; __Pyx_DECREF(__pyx_t_30); __pyx_t_30 = 0; __pyx_t_30 = PyObject_Repr(__pyx_t_29); if (unlikely(!__pyx_t_30)) __PYX_ERR(1, 2805, __pyx_L41_error) __Pyx_GOTREF(__pyx_t_30); __Pyx_DECREF(__pyx_t_29); __pyx_t_29 = 0; /* … */ __pyx_t_25 = __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_OwnStrongReferenceInPlace(__pyx_t_29, __pyx_t_28); if (unlikely(!__pyx_t_25)) __PYX_ERR(1, 2805, __pyx_L41_error) __Pyx_GOTREF(__pyx_t_25); __Pyx_DECREF(__pyx_t_29); __pyx_t_29 = 0; __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0; __pyx_t_13 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_27))) { __pyx_t_21 = PyMethod_GET_SELF(__pyx_t_27); assert(__pyx_t_21); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_27); __Pyx_INCREF(__pyx_t_21); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_27, __pyx__function); __pyx_t_13 = 0; } #endif { PyObject *__pyx_callargs[3] = {__pyx_t_21, __pyx_t_23, __pyx_t_25}; __pyx_t_22 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_27, __pyx_callargs+__pyx_t_13, (3-__pyx_t_13) | (__pyx_t_13*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_21); __pyx_t_21 = 0; __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0; __Pyx_DECREF(__pyx_t_25); __pyx_t_25 = 0; __Pyx_DECREF(__pyx_t_27); __pyx_t_27 = 0; if (unlikely(!__pyx_t_22)) __PYX_ERR(1, 2800, __pyx_L41_error) __Pyx_GOTREF(__pyx_t_22); }
+2806: f'): {e} [dc={<int>col.dispatch_code}]') from e
__pyx_t_30 = __Pyx_PyObject_FormatSimple(__pyx_v_e, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_30)) __PYX_ERR(1, 2806, __pyx_L41_error) __Pyx_GOTREF(__pyx_t_30); __pyx_t_25 = __Pyx_PyUnicode_From_int(((int)__pyx_v_col->dispatch_code), 0, ' ', 'd'); if (unlikely(!__pyx_t_25)) __PYX_ERR(1, 2806, __pyx_L41_error) __Pyx_GOTREF(__pyx_t_25); __pyx_t_31[0] = __pyx_mstate_global->__pyx_kp_u__9; __pyx_t_31[1] = __pyx_t_30; __pyx_t_31[2] = __pyx_mstate_global->__pyx_kp_u_dc; __pyx_t_31[3] = __pyx_t_25; __pyx_t_31[4] = __pyx_mstate_global->__pyx_kp_u__10; __pyx_t_28 = __Pyx_PyUnicode_Join(__pyx_t_31, 5, 3 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_30) + 6 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_25) + 1, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_30)); if (unlikely(!__pyx_t_28)) __PYX_ERR(1, 2806, __pyx_L41_error) __Pyx_GOTREF(__pyx_t_28); __Pyx_DECREF(__pyx_t_30); __pyx_t_30 = 0; __Pyx_DECREF(__pyx_t_25); __pyx_t_25 = 0; /* … */ __Pyx_Raise(__pyx_t_22, 0, 0, __pyx_v_e); __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0; __PYX_ERR(1, 2800, __pyx_L41_error)
2807: else:
+2808: raise
/*else*/ {
__Pyx_GIVEREF(__pyx_t_1);
__Pyx_GIVEREF(__pyx_t_8);
__Pyx_XGIVEREF(__pyx_t_20);
__Pyx_ErrRestoreWithState(__pyx_t_1, __pyx_t_8, __pyx_t_20);
__pyx_t_1 = 0; __pyx_t_8 = 0; __pyx_t_20 = 0;
__PYX_ERR(1, 2808, __pyx_L41_error)
}
}
+2809: except Exception as e:
__pyx_t_32 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_Exception)))); if (__pyx_t_32) { __Pyx_AddTraceback("questdb.ingress._dataframe", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_20, &__pyx_t_8, &__pyx_t_1) < 0) __PYX_ERR(1, 2809, __pyx_L11_except_error) __Pyx_XGOTREF(__pyx_t_20); __Pyx_XGOTREF(__pyx_t_8); __Pyx_XGOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_t_8); __Pyx_XDECREF_SET(__pyx_v_e, __pyx_t_8); /*try:*/ { /* … */ /*finally:*/ { __pyx_L57_error:; /*exception exit:*/{ __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __pyx_t_12 = 0; __pyx_t_11 = 0; __pyx_t_10 = 0; __pyx_t_39 = 0; __pyx_t_38 = 0; __pyx_t_37 = 0; __Pyx_XDECREF(__pyx_t_21); __pyx_t_21 = 0; __Pyx_XDECREF(__pyx_t_22); __pyx_t_22 = 0; __Pyx_XDECREF(__pyx_t_23); __pyx_t_23 = 0; __Pyx_XDECREF(__pyx_t_24); __pyx_t_24 = 0; __Pyx_XDECREF(__pyx_t_25); __pyx_t_25 = 0; __Pyx_XDECREF(__pyx_t_27); __pyx_t_27 = 0; __Pyx_XDECREF(__pyx_t_28); __pyx_t_28 = 0; __Pyx_XDECREF(__pyx_t_29); __pyx_t_29 = 0; __Pyx_XDECREF(__pyx_t_30); __pyx_t_30 = 0; __Pyx_ExceptionSwap(&__pyx_t_39, &__pyx_t_38, &__pyx_t_37); if ( unlikely(__Pyx_GetException(&__pyx_t_12, &__pyx_t_11, &__pyx_t_10) < 0)) __Pyx_ErrFetch(&__pyx_t_12, &__pyx_t_11, &__pyx_t_10); __Pyx_XGOTREF(__pyx_t_12); __Pyx_XGOTREF(__pyx_t_11); __Pyx_XGOTREF(__pyx_t_10); __Pyx_XGOTREF(__pyx_t_39); __Pyx_XGOTREF(__pyx_t_38); __Pyx_XGOTREF(__pyx_t_37); __pyx_t_32 = __pyx_lineno; __pyx_t_19 = __pyx_clineno; __pyx_t_40 = __pyx_filename; { __Pyx_DECREF(__pyx_v_e); __pyx_v_e = 0; } __Pyx_XGIVEREF(__pyx_t_39); __Pyx_XGIVEREF(__pyx_t_38); __Pyx_XGIVEREF(__pyx_t_37); __Pyx_ExceptionReset(__pyx_t_39, __pyx_t_38, __pyx_t_37); __Pyx_XGIVEREF(__pyx_t_12); __Pyx_XGIVEREF(__pyx_t_11); __Pyx_XGIVEREF(__pyx_t_10); __Pyx_ErrRestore(__pyx_t_12, __pyx_t_11, __pyx_t_10); __pyx_t_12 = 0; __pyx_t_11 = 0; __pyx_t_10 = 0; __pyx_t_39 = 0; __pyx_t_38 = 0; __pyx_t_37 = 0; __pyx_lineno = __pyx_t_32; __pyx_clineno = __pyx_t_19; __pyx_filename = __pyx_t_40; goto __pyx_L11_except_error; } } } goto __pyx_L11_except_error;
+2810: if not isinstance(e, IngressError):
__Pyx_GetModuleGlobalName(__pyx_t_22, __pyx_mstate_global->__pyx_n_u_IngressError); if (unlikely(!__pyx_t_22)) __PYX_ERR(1, 2810, __pyx_L57_error) __Pyx_GOTREF(__pyx_t_22); __pyx_t_4 = PyObject_IsInstance(__pyx_v_e, __pyx_t_22); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 2810, __pyx_L57_error) __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0; __pyx_t_3 = (!__pyx_t_4); if (unlikely(__pyx_t_3)) { /* … */ }
+2811: raise IngressError(
__pyx_t_27 = NULL;
__Pyx_GetModuleGlobalName(__pyx_t_25, __pyx_mstate_global->__pyx_n_u_IngressError); if (unlikely(!__pyx_t_25)) __PYX_ERR(1, 2811, __pyx_L57_error)
__Pyx_GOTREF(__pyx_t_25);
+2812: IngressErrorCode.InvalidApiCall,
__Pyx_GetModuleGlobalName(__pyx_t_23, __pyx_mstate_global->__pyx_n_u_IngressErrorCode); if (unlikely(!__pyx_t_23)) __PYX_ERR(1, 2812, __pyx_L57_error) __Pyx_GOTREF(__pyx_t_23); __pyx_t_21 = __Pyx_PyObject_GetAttrStr(__pyx_t_23, __pyx_mstate_global->__pyx_n_u_InvalidApiCall); if (unlikely(!__pyx_t_21)) __PYX_ERR(1, 2812, __pyx_L57_error) __Pyx_GOTREF(__pyx_t_21); __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0;
+2813: str(e)) from e
__pyx_t_23 = __Pyx_PyObject_Unicode(__pyx_v_e); if (unlikely(!__pyx_t_23)) __PYX_ERR(1, 2813, __pyx_L57_error) __Pyx_GOTREF(__pyx_t_23); __pyx_t_13 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_25))) { __pyx_t_27 = PyMethod_GET_SELF(__pyx_t_25); assert(__pyx_t_27); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_25); __Pyx_INCREF(__pyx_t_27); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_25, __pyx__function); __pyx_t_13 = 0; } #endif { PyObject *__pyx_callargs[3] = {__pyx_t_27, __pyx_t_21, __pyx_t_23}; __pyx_t_22 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_25, __pyx_callargs+__pyx_t_13, (3-__pyx_t_13) | (__pyx_t_13*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_27); __pyx_t_27 = 0; __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0; __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0; __Pyx_DECREF(__pyx_t_25); __pyx_t_25 = 0; if (unlikely(!__pyx_t_22)) __PYX_ERR(1, 2811, __pyx_L57_error) __Pyx_GOTREF(__pyx_t_22); } __Pyx_Raise(__pyx_t_22, 0, 0, __pyx_v_e); __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0; __PYX_ERR(1, 2811, __pyx_L57_error)
2814: else:
+2815: raise
/*else*/ {
__Pyx_GIVEREF(__pyx_t_20);
__Pyx_GIVEREF(__pyx_t_8);
__Pyx_XGIVEREF(__pyx_t_1);
__Pyx_ErrRestoreWithState(__pyx_t_20, __pyx_t_8, __pyx_t_1);
__pyx_t_20 = 0; __pyx_t_8 = 0; __pyx_t_1 = 0;
__PYX_ERR(1, 2815, __pyx_L57_error)
}
}
2816: finally:
+2817: _ensure_has_gil(&gs) # Note: We need the GIL for cleanup.
/*finally:*/ {
/*normal exit:*/{
__pyx_f_7questdb_7ingress__ensure_has_gil((&__pyx_v_gs)); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 2817, __pyx_L1_error)
/* … */
__pyx_f_7questdb_7ingress__ensure_has_gil((&__pyx_v_gs)); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 2817, __pyx_L65_error)
+2818: line_sender_buffer_clear_marker(ls_buf)
line_sender_buffer_clear_marker(__pyx_v_ls_buf);
/* … */
line_sender_buffer_clear_marker(__pyx_v_ls_buf);
+2819: col_t_arr_release(&cols)
__pyx_f_7questdb_7ingress_col_t_arr_release((&__pyx_v_cols));
/* … */
__pyx_f_7questdb_7ingress_col_t_arr_release((&__pyx_v_cols));
+2820: qdb_pystr_buf_clear(b)
qdb_pystr_buf_clear(__pyx_v_b);
goto __pyx_L8;
}
__pyx_L7_error:;
/*exception exit:*/{
__Pyx_PyThreadState_declare
__Pyx_PyThreadState_assign
__pyx_t_7 = 0; __pyx_t_6 = 0; __pyx_t_5 = 0; __pyx_t_37 = 0; __pyx_t_38 = 0; __pyx_t_39 = 0;
__Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_XDECREF(__pyx_t_20); __pyx_t_20 = 0;
__Pyx_XDECREF(__pyx_t_21); __pyx_t_21 = 0;
__Pyx_XDECREF(__pyx_t_22); __pyx_t_22 = 0;
__Pyx_XDECREF(__pyx_t_23); __pyx_t_23 = 0;
__Pyx_XDECREF(__pyx_t_24); __pyx_t_24 = 0;
__Pyx_XDECREF(__pyx_t_25); __pyx_t_25 = 0;
__Pyx_XDECREF(__pyx_t_27); __pyx_t_27 = 0;
__Pyx_XDECREF(__pyx_t_28); __pyx_t_28 = 0;
__Pyx_XDECREF(__pyx_t_29); __pyx_t_29 = 0;
__Pyx_XDECREF(__pyx_t_30); __pyx_t_30 = 0;
__Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
__Pyx_ExceptionSwap(&__pyx_t_37, &__pyx_t_38, &__pyx_t_39);
if ( unlikely(__Pyx_GetException(&__pyx_t_7, &__pyx_t_6, &__pyx_t_5) < 0)) __Pyx_ErrFetch(&__pyx_t_7, &__pyx_t_6, &__pyx_t_5);
__Pyx_XGOTREF(__pyx_t_7);
__Pyx_XGOTREF(__pyx_t_6);
__Pyx_XGOTREF(__pyx_t_5);
__Pyx_XGOTREF(__pyx_t_37);
__Pyx_XGOTREF(__pyx_t_38);
__Pyx_XGOTREF(__pyx_t_39);
__pyx_t_19 = __pyx_lineno; __pyx_t_32 = __pyx_clineno; __pyx_t_41 = __pyx_filename;
{
/* … */
qdb_pystr_buf_clear(__pyx_v_b);
}
__Pyx_XGIVEREF(__pyx_t_37);
__Pyx_XGIVEREF(__pyx_t_38);
__Pyx_XGIVEREF(__pyx_t_39);
__Pyx_ExceptionReset(__pyx_t_37, __pyx_t_38, __pyx_t_39);
__Pyx_XGIVEREF(__pyx_t_7);
__Pyx_XGIVEREF(__pyx_t_6);
__Pyx_XGIVEREF(__pyx_t_5);
__Pyx_ErrRestore(__pyx_t_7, __pyx_t_6, __pyx_t_5);
__pyx_t_7 = 0; __pyx_t_6 = 0; __pyx_t_5 = 0; __pyx_t_37 = 0; __pyx_t_38 = 0; __pyx_t_39 = 0;
__pyx_lineno = __pyx_t_19; __pyx_clineno = __pyx_t_32; __pyx_filename = __pyx_t_41;
goto __pyx_L1_error;
__pyx_L65_error:;
__Pyx_XGIVEREF(__pyx_t_37);
__Pyx_XGIVEREF(__pyx_t_38);
__Pyx_XGIVEREF(__pyx_t_39);
__Pyx_ExceptionReset(__pyx_t_37, __pyx_t_38, __pyx_t_39);
__Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
__Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
__Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
__pyx_t_37 = 0; __pyx_t_38 = 0; __pyx_t_39 = 0;
goto __pyx_L1_error;
}
__pyx_L8:;
}