Skip to content

Commit 51d96cc

Browse files
committed
0.0.197
1 parent 41552ef commit 51d96cc

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

orso/schema.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@
6868
from typing import Tuple
6969
from typing import Type
7070
from typing import Union
71+
from warnings import warn
7172

7273
import numpy
7374
import orjson
@@ -179,6 +180,8 @@ def __init__(self, **kwargs):
179180
# map literals to OrsoTypes
180181
if self.type.__class__ is not OrsoTypes:
181182
self.type, _length, _precision, _scale, _element_type = OrsoTypes.from_name(self.type)
183+
if self.type == OrsoTypes._MISSING_TYPE:
184+
warn(f"Column '{self.name}' type not recognized.")
182185
if isinstance(self.type, OrsoTypes):
183186
if self.element_type is None:
184187
self.element_type = _element_type

orso/types.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,9 @@ def from_name(name: str) -> tuple:
125125
_scale = None
126126
_element_type = None
127127

128+
if name is None:
129+
return (OrsoTypes._MISSING_TYPE, _length, _precision, _scale, _element_type)
130+
128131
type_name = str(name).upper()
129132
parsed_types = _parse_type(type_name)
130133
if isinstance(parsed_types, str):

orso/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,5 @@
1010
# See the License for the specific language governing permissions and
1111
# limitations under the License.
1212

13-
__version__: str = "0.0.196"
13+
__version__: str = "0.0.197"
1414
__author__: str = "@joocer"

0 commit comments

Comments
 (0)