@@ -97,8 +97,6 @@ class AtomicType(DataType):
9797 """An internal type used to represent everything that is not
9898 null, UDTs, arrays, structs, and maps."""
9999
100- __metaclass__ = DataTypeSingleton
101-
102100
103101class NumericType (AtomicType ):
104102 """Numeric data types.
@@ -109,6 +107,8 @@ class IntegralType(NumericType):
109107 """Integral data types.
110108 """
111109
110+ __metaclass__ = DataTypeSingleton
111+
112112
113113class FractionalType (NumericType ):
114114 """Fractional data types.
@@ -119,26 +119,36 @@ class StringType(AtomicType):
119119 """String data type.
120120 """
121121
122+ __metaclass__ = DataTypeSingleton
123+
122124
123125class BinaryType (AtomicType ):
124126 """Binary (byte array) data type.
125127 """
126128
129+ __metaclass__ = DataTypeSingleton
130+
127131
128132class BooleanType (AtomicType ):
129133 """Boolean data type.
130134 """
131135
136+ __metaclass__ = DataTypeSingleton
137+
132138
133139class DateType (AtomicType ):
134140 """Date (datetime.date) data type.
135141 """
136142
143+ __metaclass__ = DataTypeSingleton
144+
137145
138146class TimestampType (AtomicType ):
139147 """Timestamp (datetime.datetime) data type.
140148 """
141149
150+ __metaclass__ = DataTypeSingleton
151+
142152
143153class DecimalType (FractionalType ):
144154 """Decimal (decimal.Decimal) data type.
@@ -172,11 +182,15 @@ class DoubleType(FractionalType):
172182 """Double data type, representing double precision floats.
173183 """
174184
185+ __metaclass__ = DataTypeSingleton
186+
175187
176188class FloatType (FractionalType ):
177189 """Float data type, representing single precision floats.
178190 """
179191
192+ __metaclass__ = DataTypeSingleton
193+
180194
181195class ByteType (IntegralType ):
182196 """Byte data type, i.e. a signed integer in a single byte.
0 commit comments