@@ -78,9 +78,14 @@ const char *col_names[] = {
78
78
" 176" , " 177" , " 178" , " 179" , " 180" , " 181" , " 182" , " 183" , " 184" , " 185" , " 186" ,
79
79
" 187" , " 188" , " 189" , " 190" , " 191" , " 192" , " 193" , " 194" , " 195" , " 196" , " 197" ,
80
80
" 198" , " 199" ,
81
+ " 200" , " 201" , " 202" , " 203" , " 204" , " 205" , " 206" , " 207" , " 208" , " 209" , " 210" ,
82
+ " 211" , " 212" , " 213" , " 214" , " 215" , " 216" , " 217" , " 218" , " 219" , " 220" , " 221" ,
83
+ " 222" , " 223" , " 224" , " 225" , " 226" , " 227" , " 228" , " 229" , " 230" , " 231" , " 232" ,
84
+ " 233" , " 234" , " 235" , " 236" , " 237" , " 238" , " 239" , " 240" , " 241" , " 242" , " 243" ,
85
+ " 244" , " 245" , " 246" , " 247" , " 248" , " 249" ,
81
86
};
82
- #define COLS 200
83
- #define ROWS 20
87
+ #define COLS 250
88
+ #define ROWS 80
84
89
85
90
// We use alignas(8) because Arrow mandates all buffers to be 8-byte aligned
86
91
struct RecordBatchBody {
@@ -286,6 +291,56 @@ struct RecordBatchBody {
286
291
alignas (8 ) int32_t col197[ROWS];
287
292
alignas (8 ) int32_t col198[ROWS];
288
293
alignas (8 ) int32_t col199[ROWS];
294
+ alignas (8 ) int32_t col200[ROWS];
295
+ alignas (8 ) int32_t col201[ROWS];
296
+ alignas (8 ) int32_t col202[ROWS];
297
+ alignas (8 ) int32_t col203[ROWS];
298
+ alignas (8 ) int32_t col204[ROWS];
299
+ alignas (8 ) int32_t col205[ROWS];
300
+ alignas (8 ) int32_t col206[ROWS];
301
+ alignas (8 ) int32_t col207[ROWS];
302
+ alignas (8 ) int32_t col208[ROWS];
303
+ alignas (8 ) int32_t col209[ROWS];
304
+ alignas (8 ) int32_t col210[ROWS];
305
+ alignas (8 ) int32_t col211[ROWS];
306
+ alignas (8 ) int32_t col212[ROWS];
307
+ alignas (8 ) int32_t col213[ROWS];
308
+ alignas (8 ) int32_t col214[ROWS];
309
+ alignas (8 ) int32_t col215[ROWS];
310
+ alignas (8 ) int32_t col216[ROWS];
311
+ alignas (8 ) int32_t col217[ROWS];
312
+ alignas (8 ) int32_t col218[ROWS];
313
+ alignas (8 ) int32_t col219[ROWS];
314
+ alignas (8 ) int32_t col220[ROWS];
315
+ alignas (8 ) int32_t col221[ROWS];
316
+ alignas (8 ) int32_t col222[ROWS];
317
+ alignas (8 ) int32_t col223[ROWS];
318
+ alignas (8 ) int32_t col224[ROWS];
319
+ alignas (8 ) int32_t col225[ROWS];
320
+ alignas (8 ) int32_t col226[ROWS];
321
+ alignas (8 ) int32_t col227[ROWS];
322
+ alignas (8 ) int32_t col228[ROWS];
323
+ alignas (8 ) int32_t col229[ROWS];
324
+ alignas (8 ) int32_t col230[ROWS];
325
+ alignas (8 ) int32_t col231[ROWS];
326
+ alignas (8 ) int32_t col232[ROWS];
327
+ alignas (8 ) int32_t col233[ROWS];
328
+ alignas (8 ) int32_t col234[ROWS];
329
+ alignas (8 ) int32_t col235[ROWS];
330
+ alignas (8 ) int32_t col236[ROWS];
331
+ alignas (8 ) int32_t col237[ROWS];
332
+ alignas (8 ) int32_t col238[ROWS];
333
+ alignas (8 ) int32_t col239[ROWS];
334
+ alignas (8 ) int32_t col240[ROWS];
335
+ alignas (8 ) int32_t col241[ROWS];
336
+ alignas (8 ) int32_t col242[ROWS];
337
+ alignas (8 ) int32_t col243[ROWS];
338
+ alignas (8 ) int32_t col244[ROWS];
339
+ alignas (8 ) int32_t col245[ROWS];
340
+ alignas (8 ) int32_t col246[ROWS];
341
+ alignas (8 ) int32_t col247[ROWS];
342
+ alignas (8 ) int32_t col248[ROWS];
343
+ alignas (8 ) int32_t col249[ROWS];
289
344
};
290
345
291
346
void arrow_flatcc_build_schema (flatcc_builder_t *b) {
@@ -417,21 +472,21 @@ void arrow_stream_write_message_to_file(void *flatbuf, size_t flatbuf_size, void
417
472
}
418
473
}
419
474
420
- // TODO: experiment with a custom emitter that writes directly to a FILE*
421
- int dbg_emitter (void *emit_context, const flatcc_iovec_t *iov, int iov_count, flatbuffers_soffset_t offset, size_t len) {
422
- printf (" dbg: emit: iov_count: %d, offset: %d, len: %d\n " , iov_count, offset, len);
423
-
424
- for (int i = 0 ; i < iov_count; ++i) {
425
- if (iov[i].iov_base == flatcc_builder_padding_base) {
426
- printf (" dbg: padding at: %d, len: %d\n " , offset, iov[i].iov_len );
427
- }
428
- if (iov[i].iov_base == 0 ) {
429
- printf (" dbg: null vector reserved at: %d, len: %d\n " , offset, iov[i].iov_len );
430
- }
431
- offset += (flatbuffers_soffset_t )iov[i].iov_len ;
432
- }
433
- return 0 ;
434
- }
475
+ // // TODO: experiment with a custom emitter that writes directly to a FILE*
476
+ // int dbg_emitter(void *emit_context, const flatcc_iovec_t *iov, int iov_count, flatbuffers_soffset_t offset, size_t len) {
477
+ // printf("dbg: emit: iov_count: %d, offset: %d, len: %d\n", iov_count, offset, len);
478
+ //
479
+ // for (int i = 0; i < iov_count; ++i) {
480
+ // if (iov[i].iov_base == flatcc_builder_padding_base) {
481
+ // printf("dbg: padding at: %d, len: %d\n", offset, iov[i].iov_len);
482
+ // }
483
+ // if (iov[i].iov_base == 0) {
484
+ // printf("dbg: null vector reserved at: %d, len: %d\n", offset, iov[i].iov_len);
485
+ // }
486
+ // offset += (flatbuffers_soffset_t)iov[i].iov_len;
487
+ // }
488
+ // return 0;
489
+ // }
435
490
436
491
RecordBatchBody values;
437
492
int32_t *cols[] = {
@@ -520,6 +575,7 @@ int main(int argc, char *argv[]) {
520
575
flatcc_builder_t b, *B;
521
576
B = &b;
522
577
578
+
523
579
flatcc_builder_init (B);
524
580
// flatcc_builder_custom_init(B, dbg_emitter, 0, 0, 0);
525
581
@@ -551,7 +607,6 @@ int main(int argc, char *argv[]) {
551
607
552
608
size_t record_batch_flatbuf_size;
553
609
void *record_batch_flatbuf = flatcc_builder_finalize_buffer (B, &record_batch_flatbuf_size);
554
- // void *record_batch_flatbuf = flatcc_builder_get_direct_buffer(B, &record_batch_flatbuf_size);
555
610
556
611
printf (" record batch flatbuf size: %d" , record_batch_flatbuf_size);
557
612
MBED_ASSERT (record_batch_flatbuf_size != 0 && record_batch_flatbuf);
0 commit comments