@@ -426,10 +426,9 @@ struct Literal FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
426
426
enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
427
427
VT_SHAPE_TYPE = 4 ,
428
428
VT_SHAPE = 6 ,
429
- VT_TYPE_TYPE = 8 ,
430
- VT_TYPE = 10 ,
431
- VT_BUFFERS = 12 ,
432
- VT_DICTIONARY = 14
429
+ VT_FIELD = 8 ,
430
+ VT_BUFFERS = 10 ,
431
+ VT_DICTIONARY = 12
433
432
};
434
433
org::apache::arrow::flatbuf::computeir::Shape shape_type () const {
435
434
return static_cast <org::apache::arrow::flatbuf::computeir::Shape>(GetField<uint8_t >(VT_SHAPE_TYPE, 0 ));
@@ -438,7 +437,7 @@ struct Literal FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
438
437
// /
439
438
// / Note that this is orthogonal to type and refers to the number
440
439
// / of rows spanned by this Literal - a Literal may be Scalar shaped
441
- // / with multiple "columns" if ` type` happens to be Struct.
440
+ // / with multiple "columns" if the type happens to be Struct.
442
441
const void *shape () const {
443
442
return GetPointer<const void *>(VT_SHAPE);
444
443
}
@@ -449,76 +448,10 @@ struct Literal FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
449
448
const org::apache::arrow::flatbuf::computeir::Scalar *shape_as_Scalar () const {
450
449
return shape_type () == org::apache::arrow::flatbuf::computeir::Shape::Scalar ? static_cast <const org::apache::arrow::flatbuf::computeir::Scalar *>(shape ()) : nullptr ;
451
450
}
452
- org::apache::arrow::flatbuf::Type type_type () const {
453
- return static_cast <org::apache::arrow::flatbuf::Type>(GetField<uint8_t >(VT_TYPE_TYPE, 0 ));
454
- }
455
- // / The type of this literal.
456
- const void *type () const {
457
- return GetPointer<const void *>(VT_TYPE);
458
- }
459
- template <typename T> const T *type_as () const ;
460
- const org::apache::arrow::flatbuf::Null *type_as_Null () const {
461
- return type_type () == org::apache::arrow::flatbuf::Type::Null ? static_cast <const org::apache::arrow::flatbuf::Null *>(type ()) : nullptr ;
462
- }
463
- const org::apache::arrow::flatbuf::Int *type_as_Int () const {
464
- return type_type () == org::apache::arrow::flatbuf::Type::Int ? static_cast <const org::apache::arrow::flatbuf::Int *>(type ()) : nullptr ;
465
- }
466
- const org::apache::arrow::flatbuf::FloatingPoint *type_as_FloatingPoint () const {
467
- return type_type () == org::apache::arrow::flatbuf::Type::FloatingPoint ? static_cast <const org::apache::arrow::flatbuf::FloatingPoint *>(type ()) : nullptr ;
468
- }
469
- const org::apache::arrow::flatbuf::Binary *type_as_Binary () const {
470
- return type_type () == org::apache::arrow::flatbuf::Type::Binary ? static_cast <const org::apache::arrow::flatbuf::Binary *>(type ()) : nullptr ;
471
- }
472
- const org::apache::arrow::flatbuf::Utf8 *type_as_Utf8 () const {
473
- return type_type () == org::apache::arrow::flatbuf::Type::Utf8 ? static_cast <const org::apache::arrow::flatbuf::Utf8 *>(type ()) : nullptr ;
474
- }
475
- const org::apache::arrow::flatbuf::Bool *type_as_Bool () const {
476
- return type_type () == org::apache::arrow::flatbuf::Type::Bool ? static_cast <const org::apache::arrow::flatbuf::Bool *>(type ()) : nullptr ;
477
- }
478
- const org::apache::arrow::flatbuf::Decimal *type_as_Decimal () const {
479
- return type_type () == org::apache::arrow::flatbuf::Type::Decimal ? static_cast <const org::apache::arrow::flatbuf::Decimal *>(type ()) : nullptr ;
480
- }
481
- const org::apache::arrow::flatbuf::Date *type_as_Date () const {
482
- return type_type () == org::apache::arrow::flatbuf::Type::Date ? static_cast <const org::apache::arrow::flatbuf::Date *>(type ()) : nullptr ;
483
- }
484
- const org::apache::arrow::flatbuf::Time *type_as_Time () const {
485
- return type_type () == org::apache::arrow::flatbuf::Type::Time ? static_cast <const org::apache::arrow::flatbuf::Time *>(type ()) : nullptr ;
486
- }
487
- const org::apache::arrow::flatbuf::Timestamp *type_as_Timestamp () const {
488
- return type_type () == org::apache::arrow::flatbuf::Type::Timestamp ? static_cast <const org::apache::arrow::flatbuf::Timestamp *>(type ()) : nullptr ;
489
- }
490
- const org::apache::arrow::flatbuf::Interval *type_as_Interval () const {
491
- return type_type () == org::apache::arrow::flatbuf::Type::Interval ? static_cast <const org::apache::arrow::flatbuf::Interval *>(type ()) : nullptr ;
492
- }
493
- const org::apache::arrow::flatbuf::List *type_as_List () const {
494
- return type_type () == org::apache::arrow::flatbuf::Type::List ? static_cast <const org::apache::arrow::flatbuf::List *>(type ()) : nullptr ;
495
- }
496
- const org::apache::arrow::flatbuf::Struct_ *type_as_Struct_ () const {
497
- return type_type () == org::apache::arrow::flatbuf::Type::Struct_ ? static_cast <const org::apache::arrow::flatbuf::Struct_ *>(type ()) : nullptr ;
498
- }
499
- const org::apache::arrow::flatbuf::Union *type_as_Union () const {
500
- return type_type () == org::apache::arrow::flatbuf::Type::Union ? static_cast <const org::apache::arrow::flatbuf::Union *>(type ()) : nullptr ;
501
- }
502
- const org::apache::arrow::flatbuf::FixedSizeBinary *type_as_FixedSizeBinary () const {
503
- return type_type () == org::apache::arrow::flatbuf::Type::FixedSizeBinary ? static_cast <const org::apache::arrow::flatbuf::FixedSizeBinary *>(type ()) : nullptr ;
504
- }
505
- const org::apache::arrow::flatbuf::FixedSizeList *type_as_FixedSizeList () const {
506
- return type_type () == org::apache::arrow::flatbuf::Type::FixedSizeList ? static_cast <const org::apache::arrow::flatbuf::FixedSizeList *>(type ()) : nullptr ;
507
- }
508
- const org::apache::arrow::flatbuf::Map *type_as_Map () const {
509
- return type_type () == org::apache::arrow::flatbuf::Type::Map ? static_cast <const org::apache::arrow::flatbuf::Map *>(type ()) : nullptr ;
510
- }
511
- const org::apache::arrow::flatbuf::Duration *type_as_Duration () const {
512
- return type_type () == org::apache::arrow::flatbuf::Type::Duration ? static_cast <const org::apache::arrow::flatbuf::Duration *>(type ()) : nullptr ;
513
- }
514
- const org::apache::arrow::flatbuf::LargeBinary *type_as_LargeBinary () const {
515
- return type_type () == org::apache::arrow::flatbuf::Type::LargeBinary ? static_cast <const org::apache::arrow::flatbuf::LargeBinary *>(type ()) : nullptr ;
516
- }
517
- const org::apache::arrow::flatbuf::LargeUtf8 *type_as_LargeUtf8 () const {
518
- return type_type () == org::apache::arrow::flatbuf::Type::LargeUtf8 ? static_cast <const org::apache::arrow::flatbuf::LargeUtf8 *>(type ()) : nullptr ;
519
- }
520
- const org::apache::arrow::flatbuf::LargeList *type_as_LargeList () const {
521
- return type_type () == org::apache::arrow::flatbuf::Type::LargeList ? static_cast <const org::apache::arrow::flatbuf::LargeList *>(type ()) : nullptr ;
451
+ // / The type of this literal. Field is used instead of Type to pick
452
+ // / up child fields, dictionary encoding, etc.
453
+ const org::apache::arrow::flatbuf::Field *field () const {
454
+ return GetPointer<const org::apache::arrow::flatbuf::Field *>(VT_FIELD);
522
455
}
523
456
// / Buffers containing N elements of arrow-formatted data, where N
524
457
// / is Array.length if shape is Array or 1 if shape is Scalar.
@@ -536,9 +469,8 @@ struct Literal FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
536
469
VerifyField<uint8_t >(verifier, VT_SHAPE_TYPE) &&
537
470
VerifyOffsetRequired (verifier, VT_SHAPE) &&
538
471
VerifyShape (verifier, shape (), shape_type ()) &&
539
- VerifyField<uint8_t >(verifier, VT_TYPE_TYPE) &&
540
- VerifyOffsetRequired (verifier, VT_TYPE) &&
541
- VerifyType (verifier, type (), type_type ()) &&
472
+ VerifyOffsetRequired (verifier, VT_FIELD) &&
473
+ verifier.VerifyTable (field ()) &&
542
474
VerifyOffset (verifier, VT_BUFFERS) &&
543
475
verifier.VerifyVector (buffers ()) &&
544
476
verifier.VerifyVectorOfTables (buffers ()) &&
@@ -556,90 +488,6 @@ template<> inline const org::apache::arrow::flatbuf::computeir::Scalar *Literal:
556
488
return shape_as_Scalar ();
557
489
}
558
490
559
- template <> inline const org::apache::arrow::flatbuf::Null *Literal::type_as<org::apache::arrow::flatbuf::Null>() const {
560
- return type_as_Null ();
561
- }
562
-
563
- template <> inline const org::apache::arrow::flatbuf::Int *Literal::type_as<org::apache::arrow::flatbuf::Int>() const {
564
- return type_as_Int ();
565
- }
566
-
567
- template <> inline const org::apache::arrow::flatbuf::FloatingPoint *Literal::type_as<org::apache::arrow::flatbuf::FloatingPoint>() const {
568
- return type_as_FloatingPoint ();
569
- }
570
-
571
- template <> inline const org::apache::arrow::flatbuf::Binary *Literal::type_as<org::apache::arrow::flatbuf::Binary>() const {
572
- return type_as_Binary ();
573
- }
574
-
575
- template <> inline const org::apache::arrow::flatbuf::Utf8 *Literal::type_as<org::apache::arrow::flatbuf::Utf8>() const {
576
- return type_as_Utf8 ();
577
- }
578
-
579
- template <> inline const org::apache::arrow::flatbuf::Bool *Literal::type_as<org::apache::arrow::flatbuf::Bool>() const {
580
- return type_as_Bool ();
581
- }
582
-
583
- template <> inline const org::apache::arrow::flatbuf::Decimal *Literal::type_as<org::apache::arrow::flatbuf::Decimal>() const {
584
- return type_as_Decimal ();
585
- }
586
-
587
- template <> inline const org::apache::arrow::flatbuf::Date *Literal::type_as<org::apache::arrow::flatbuf::Date>() const {
588
- return type_as_Date ();
589
- }
590
-
591
- template <> inline const org::apache::arrow::flatbuf::Time *Literal::type_as<org::apache::arrow::flatbuf::Time>() const {
592
- return type_as_Time ();
593
- }
594
-
595
- template <> inline const org::apache::arrow::flatbuf::Timestamp *Literal::type_as<org::apache::arrow::flatbuf::Timestamp>() const {
596
- return type_as_Timestamp ();
597
- }
598
-
599
- template <> inline const org::apache::arrow::flatbuf::Interval *Literal::type_as<org::apache::arrow::flatbuf::Interval>() const {
600
- return type_as_Interval ();
601
- }
602
-
603
- template <> inline const org::apache::arrow::flatbuf::List *Literal::type_as<org::apache::arrow::flatbuf::List>() const {
604
- return type_as_List ();
605
- }
606
-
607
- template <> inline const org::apache::arrow::flatbuf::Struct_ *Literal::type_as<org::apache::arrow::flatbuf::Struct_>() const {
608
- return type_as_Struct_ ();
609
- }
610
-
611
- template <> inline const org::apache::arrow::flatbuf::Union *Literal::type_as<org::apache::arrow::flatbuf::Union>() const {
612
- return type_as_Union ();
613
- }
614
-
615
- template <> inline const org::apache::arrow::flatbuf::FixedSizeBinary *Literal::type_as<org::apache::arrow::flatbuf::FixedSizeBinary>() const {
616
- return type_as_FixedSizeBinary ();
617
- }
618
-
619
- template <> inline const org::apache::arrow::flatbuf::FixedSizeList *Literal::type_as<org::apache::arrow::flatbuf::FixedSizeList>() const {
620
- return type_as_FixedSizeList ();
621
- }
622
-
623
- template <> inline const org::apache::arrow::flatbuf::Map *Literal::type_as<org::apache::arrow::flatbuf::Map>() const {
624
- return type_as_Map ();
625
- }
626
-
627
- template <> inline const org::apache::arrow::flatbuf::Duration *Literal::type_as<org::apache::arrow::flatbuf::Duration>() const {
628
- return type_as_Duration ();
629
- }
630
-
631
- template <> inline const org::apache::arrow::flatbuf::LargeBinary *Literal::type_as<org::apache::arrow::flatbuf::LargeBinary>() const {
632
- return type_as_LargeBinary ();
633
- }
634
-
635
- template <> inline const org::apache::arrow::flatbuf::LargeUtf8 *Literal::type_as<org::apache::arrow::flatbuf::LargeUtf8>() const {
636
- return type_as_LargeUtf8 ();
637
- }
638
-
639
- template <> inline const org::apache::arrow::flatbuf::LargeList *Literal::type_as<org::apache::arrow::flatbuf::LargeList>() const {
640
- return type_as_LargeList ();
641
- }
642
-
643
491
struct LiteralBuilder {
644
492
typedef Literal Table;
645
493
flatbuffers::FlatBufferBuilder &fbb_;
@@ -650,11 +498,8 @@ struct LiteralBuilder {
650
498
void add_shape (flatbuffers::Offset<void > shape) {
651
499
fbb_.AddOffset (Literal::VT_SHAPE, shape);
652
500
}
653
- void add_type_type (org::apache::arrow::flatbuf::Type type_type) {
654
- fbb_.AddElement <uint8_t >(Literal::VT_TYPE_TYPE, static_cast <uint8_t >(type_type), 0 );
655
- }
656
- void add_type (flatbuffers::Offset<void > type) {
657
- fbb_.AddOffset (Literal::VT_TYPE, type);
501
+ void add_field (flatbuffers::Offset<org::apache::arrow::flatbuf::Field> field) {
502
+ fbb_.AddOffset (Literal::VT_FIELD, field);
658
503
}
659
504
void add_buffers (flatbuffers::Offset<flatbuffers::Vector<flatbuffers::Offset<org::apache::arrow::flatbuf::computeir::InlineBuffer>>> buffers) {
660
505
fbb_.AddOffset (Literal::VT_BUFFERS, buffers);
@@ -671,7 +516,7 @@ struct LiteralBuilder {
671
516
const auto end = fbb_.EndTable (start_);
672
517
auto o = flatbuffers::Offset<Literal>(end);
673
518
fbb_.Required (o, Literal::VT_SHAPE);
674
- fbb_.Required (o, Literal::VT_TYPE );
519
+ fbb_.Required (o, Literal::VT_FIELD );
675
520
return o;
676
521
}
677
522
};
@@ -680,16 +525,14 @@ inline flatbuffers::Offset<Literal> CreateLiteral(
680
525
flatbuffers::FlatBufferBuilder &_fbb,
681
526
org::apache::arrow::flatbuf::computeir::Shape shape_type = org::apache::arrow::flatbuf::computeir::Shape::NONE,
682
527
flatbuffers::Offset<void > shape = 0 ,
683
- org::apache::arrow::flatbuf::Type type_type = org::apache::arrow::flatbuf::Type::NONE,
684
- flatbuffers::Offset<void > type = 0 ,
528
+ flatbuffers::Offset<org::apache::arrow::flatbuf::Field> field = 0 ,
685
529
flatbuffers::Offset<flatbuffers::Vector<flatbuffers::Offset<org::apache::arrow::flatbuf::computeir::InlineBuffer>>> buffers = 0 ,
686
530
flatbuffers::Offset<org::apache::arrow::flatbuf::computeir::Literal> dictionary = 0 ) {
687
531
LiteralBuilder builder_ (_fbb);
688
532
builder_.add_dictionary (dictionary);
689
533
builder_.add_buffers (buffers);
690
- builder_.add_type (type );
534
+ builder_.add_field (field );
691
535
builder_.add_shape (shape);
692
- builder_.add_type_type (type_type);
693
536
builder_.add_shape_type (shape_type);
694
537
return builder_.Finish ();
695
538
}
@@ -698,17 +541,15 @@ inline flatbuffers::Offset<Literal> CreateLiteralDirect(
698
541
flatbuffers::FlatBufferBuilder &_fbb,
699
542
org::apache::arrow::flatbuf::computeir::Shape shape_type = org::apache::arrow::flatbuf::computeir::Shape::NONE,
700
543
flatbuffers::Offset<void > shape = 0 ,
701
- org::apache::arrow::flatbuf::Type type_type = org::apache::arrow::flatbuf::Type::NONE,
702
- flatbuffers::Offset<void > type = 0 ,
544
+ flatbuffers::Offset<org::apache::arrow::flatbuf::Field> field = 0 ,
703
545
const std::vector<flatbuffers::Offset<org::apache::arrow::flatbuf::computeir::InlineBuffer>> *buffers = nullptr ,
704
546
flatbuffers::Offset<org::apache::arrow::flatbuf::computeir::Literal> dictionary = 0 ) {
705
547
auto buffers__ = buffers ? _fbb.CreateVector <flatbuffers::Offset<org::apache::arrow::flatbuf::computeir::InlineBuffer>>(*buffers) : 0 ;
706
548
return org::apache::arrow::flatbuf::computeir::CreateLiteral (
707
549
_fbb,
708
550
shape_type,
709
551
shape,
710
- type_type,
711
- type,
552
+ field,
712
553
buffers__,
713
554
dictionary);
714
555
}
0 commit comments