Skip to content

Commit

Permalink
1.7.x (#542)
Browse files Browse the repository at this point in the history
* Raise maximum pyarrow version to 17 (the latest) (#538)

[ML-7946](https://iguazio.atlassian.net/browse/ML-7946)

* Fix parsing of results from TDEngine DESCRIBE [1.7.x] (#541)

[ML-7985](https://iguazio.atlassian.net/browse/ML-7985)
  • Loading branch information
gtopper authored Sep 30, 2024
1 parent e04f142 commit 9bdebf4
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 11 deletions.
24 changes: 14 additions & 10 deletions storey/dtypes.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

from datetime import datetime, timezone
from enum import Enum
from typing import Callable, List, Literal, NamedTuple, Optional, Union
from typing import Callable, List, Optional, Union

import numpy

Expand Down Expand Up @@ -456,12 +456,16 @@ class FixedWindowType(Enum):
LastClosedWindow = 2


class _TDEngineField(NamedTuple):
field: str
# https://docs.tdengine.com/reference/taos-sql/data-type/
type: Literal["TIMESTAMP", "INT", "FLOAT", "DOUBLE", "BINARY", "BOOL", "NCHAR", "JSON", "VARCHAR"]
length: int
note: Literal["", "TAG"]
encode: str
compress: str
level: str
class _TDEngineField:
def __init__(
self,
field: str,
field_type: str,
length: int,
note: str,
*args,
):
self.field = field
self.field_type = field_type
self.length = length
self.note = note
2 changes: 1 addition & 1 deletion storey/targets.py
Original file line number Diff line number Diff line change
Expand Up @@ -948,7 +948,7 @@ def _get_table_schema(
reg_cols_schema = []
for field in fields:
field_name = field.field
field_type = field.type
field_type = field.field_type

if field.note == "TAG":
if field_type in self._tdengine_type_to_tag_func:
Expand Down

0 comments on commit 9bdebf4

Please sign in to comment.