@@ -14,27 +14,26 @@ enum class TypeKind : int8_t {
1414 kBool = 1 ,
1515 kI8 = 2 ,
1616 kI16 = 3 ,
17- kI32 = 5 ,
18- kI64 = 7 ,
19- kFp32 = 10 ,
20- kFp64 = 11 ,
21- kString = 12 ,
22- kBinary = 13 ,
23- kTimestamp = 14 ,
24- kDate = 16 ,
25- kTime = 17 ,
26- kIntervalYear = 19 ,
27- kIntervalDay = 20 ,
28- kTimestampTz = 29 ,
29- kUuid = 32 ,
30- kFixedChar = 21 ,
31- kVarchar = 22 ,
32- kFixedBinary = 23 ,
33- kDecimal = 24 ,
34- kStruct = 25 ,
35- kList = 27 ,
36- kMap = 28 ,
37- kUserDefined = 30 ,
17+ kI32 = 4 ,
18+ kI64 = 5 ,
19+ kFp32 = 6 ,
20+ kFp64 = 7 ,
21+ kString = 8 ,
22+ kBinary = 9 ,
23+ kTimestamp = 10 ,
24+ kDate = 11 ,
25+ kTime = 12 ,
26+ kIntervalYear = 13 ,
27+ kIntervalDay = 14 ,
28+ kTimestampTz = 15 ,
29+ kUuid = 16 ,
30+ kFixedChar = 17 ,
31+ kVarchar = 18 ,
32+ kFixedBinary = 19 ,
33+ kDecimal = 20 ,
34+ kStruct = 21 ,
35+ kList = 22 ,
36+ kMap = 23 ,
3837 KIND_NOT_SET = 0 ,
3938};
4039
@@ -179,12 +178,6 @@ struct TypeTraits<TypeKind::kMap> {
179178 static constexpr const char * typeString = " map" ;
180179};
181180
182- template <>
183- struct TypeTraits <TypeKind::kUserDefined > {
184- static constexpr const char * signature = " u!name" ;
185- static constexpr const char * typeString = " user defined type" ;
186- };
187-
188181class ParameterizedType {
189182 public:
190183 explicit ParameterizedType (bool nullable = false ) : nullable_(nullable) {}
@@ -400,31 +393,6 @@ class ParameterizedTypeBase : public ParameterizedType {
400393 : ParameterizedType(nullable) {}
401394};
402395
403- class UsedDefinedType : public ParameterizedTypeBase {
404- public:
405- UsedDefinedType (std::string value, bool nullable)
406- : ParameterizedTypeBase(nullable), value_(std::move(value)) {}
407-
408- [[nodiscard]] const std::string& value () const {
409- return value_;
410- }
411-
412- [[nodiscard]] TypeKind kind () const override {
413- return TypeKind::kUserDefined ;
414- }
415-
416- [[nodiscard]] std::string signature () const override {
417- return TypeTraits<TypeKind::kUserDefined >::signature;
418- }
419-
420- [[nodiscard]] bool isMatch (
421- const std::shared_ptr<const ParameterizedType>& type) const override ;
422-
423- private:
424- // / raw string of wildcard type.
425- const std::string value_;
426- };
427-
428396// / A string literal type can present the 'any1'.
429397class StringLiteral : public ParameterizedTypeBase {
430398 public:
@@ -673,16 +641,16 @@ std::shared_ptr<const Decimal> DECIMAL(int precision, int scale);
673641
674642std::shared_ptr<const Varchar> VARCHAR (int len);
675643
676- std::shared_ptr<const FixedChar> FChar (int len);
644+ std::shared_ptr<const FixedChar> FIXED_CHAR (int len);
677645
678- std::shared_ptr<const FixedBinary> FBinary (int len);
646+ std::shared_ptr<const FixedBinary> FIXED_BINARY (int len);
679647
680648std::shared_ptr<const List> LIST (const TypePtr& elementType);
681649
682650std::shared_ptr<const Map> MAP (
683651 const TypePtr& keyType,
684652 const TypePtr& valueType);
685653
686- std::shared_ptr<const Struct> ROW (const std::vector<TypePtr>& children);
654+ std::shared_ptr<const Struct> STRUCT (const std::vector<TypePtr>& children);
687655
688656} // namespace substrait
0 commit comments