File tree Expand file tree Collapse file tree 6 files changed +37
-35
lines changed Expand file tree Collapse file tree 6 files changed +37
-35
lines changed Original file line number Diff line number Diff line change 11import pyarrow as pa
2- from .scalar import ScalarInvalidTypeError
2+
3+ from cloudquery .sdk .types import UUIDType , JSONType
34from .binary import Binary
45from .bool import Bool
56from .date32 import Date32
67from .date64 import Date64
78from .float import Float
89from .int import Int
910from .list import List
11+ from .scalar import ScalarInvalidTypeError
1012from .string import String
1113from .timestamp import Timestamp
1214from .uint import Uint
1315from .uuid import UUID
14- from cloudquery .sdk .types import UUIDType , JSONType
1516
1617
1718class ScalarFactory :
@@ -85,9 +86,9 @@ def new_scalar(self, dt: pa.DataType):
8586 # return ()
8687 elif dt_id == pa .types .lib .Type_TIMESTAMP :
8788 return Timestamp ()
88- elif dt == UUIDType :
89+ elif dt == UUIDType () :
8990 return UUID ()
90- elif dt == JSONType :
91+ elif dt == JSONType () :
9192 return String ()
9293 else :
9394 raise ScalarInvalidTypeError ("Invalid type {} for scalar" .format (dt ))
Original file line number Diff line number Diff line change 1- from typing import List , Generator , Any
21import queue
3- import time
2+ from concurrent import futures
3+ from typing import List , Generator , Any
4+
45import structlog
5- from enum import Enum
6- from cloudquery .sdk .schema import Table , Resource
6+
77from cloudquery .sdk .message import (
88 SyncMessage ,
99 SyncInsertMessage ,
1010 SyncMigrateTableMessage ,
1111)
12- from concurrent import futures
13- from typing import Generator
12+ from cloudquery .sdk .schema import Resource
1413from .table_resolver import TableResolver
15- import traceback
1614
1715QUEUE_PER_WORKER = 100
1816
@@ -192,4 +190,4 @@ def sync(
192190 break
193191 continue
194192 yield message
195- thread .shutdown ()
193+ thread .shutdown (wait = True )
Original file line number Diff line number Diff line change 1- cloudquery-plugin-pb == 0.0.14
2- exceptiongroup == 1.1.2
3- black == 23.7.0
4- grpcio == 1.56.2
5- grpcio-tools == 1.56.2
6- iniconfig == 2.0.0
7- Jinja2 == 3.1.2
8- MarkupSafe == 2.1.3
9- numpy == 1.25.2
10- packaging == 23.1
11- pandas == 2.0.3
12- pluggy == 1.2.0
13- protobuf == 4.23.4
14- pyarrow == 12.0.1
15- pytest == 7.4.0
16- python-dateutil == 2.8.2
17- pytz == 2023.3
18- six == 1.16.0
19- structlog == 23.1.0
20- tomli == 2.0.1
21- tzdata == 2023.3
1+ .
Original file line number Diff line number Diff line change 1111
1212dependencies = [
1313 "cloudquery-plugin-pb==0.0.14" ,
14- "pyarrow==12.0.1" ,
14+ "exceptiongroup==1.1.2" ,
15+ "black==23.7.0" ,
16+ "grpcio==1.56.2" ,
17+ "grpcio-tools==1.56.2" ,
18+ "iniconfig==2.0.0" ,
1519 "Jinja2==3.1.2" ,
16- "structlog==23.1.0" ,
20+ "MarkupSafe==2.1.3" ,
21+ "numpy==1.25.2" ,
22+ "packaging==23.1" ,
1723 "pandas==2.0.3" ,
24+ "pluggy==1.2.0" ,
25+ "protobuf==4.23.4" ,
26+ "pyarrow==12.0.1" ,
27+ "pytest==7.4.0" ,
28+ "python-dateutil==2.8.2" ,
29+ "pytz==2023.3" ,
30+ "six==1.16.0" ,
31+ "structlog==23.1.0" ,
32+ "tomli==2.0.1" ,
33+ "tzdata==2023.3" ,
1834]
1935url = "https://github.com/cloudquery/plugin-sdk-python"
2036
Original file line number Diff line number Diff line change 1+ from cloudquery .sdk .types import JSONType
2+
3+
4+ def test_json_type ():
5+ j = JSONType ()
6+ # test equality
7+ assert j == JSONType ()
You can’t perform that action at this time.
0 commit comments