Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Py-client] rename table concept #14531

Merged
merged 1 commit into from
Dec 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion iotdb-client/client-py/iotdb/utils/NumpyTablet.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ def __init__(
self.bitmaps = bitmaps
if column_types is None:
self.__column_types = ColumnType.n_copy(
ColumnType.MEASUREMENT, self.__column_number
ColumnType.FIELD, self.__column_number
)
else:
self.__column_types = column_types
Expand Down
6 changes: 3 additions & 3 deletions iotdb-client/client-py/iotdb/utils/Tablet.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@

@unique
class ColumnType(IntEnum):
ID = 0
MEASUREMENT = 1
TAG = 0
FIELD = 1
ATTRIBUTE = 2

def n_copy(self, n):
Expand Down Expand Up @@ -88,7 +88,7 @@ def __init__(
self.__column_number = len(column_names)
if column_types is None:
self.__column_types = ColumnType.n_copy(
ColumnType.MEASUREMENT, self.__column_number
ColumnType.FIELD, self.__column_number
)
else:
self.__column_types = column_types
Expand Down
2 changes: 1 addition & 1 deletion iotdb-client/client-py/table_model_session_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@
TSDataType.STRING,
TSDataType.DOUBLE,
]
column_types = [ColumnType.ID, ColumnType.ATTRIBUTE, ColumnType.MEASUREMENT]
column_types = [ColumnType.TAG, ColumnType.ATTRIBUTE, ColumnType.FIELD]
timestamps = []
values = []
for row in range(15):
Expand Down
2 changes: 1 addition & 1 deletion iotdb-client/client-py/table_model_session_pool_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def insert_data(num: int):
TSDataType.STRING,
TSDataType.DOUBLE,
]
column_types = [ColumnType.ID, ColumnType.ATTRIBUTE, ColumnType.MEASUREMENT]
column_types = [ColumnType.TAG, ColumnType.ATTRIBUTE, ColumnType.FIELD]
timestamps = []
values = []
for row in range(15):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def session_test(use_session_pool=False):
TSDataType.STRING,
TSDataType.DOUBLE,
]
column_types = [ColumnType.ID, ColumnType.ATTRIBUTE, ColumnType.MEASUREMENT]
column_types = [ColumnType.TAG, ColumnType.ATTRIBUTE, ColumnType.FIELD]
timestamps = []
values = []
for row in range(15):
Expand Down
156 changes: 78 additions & 78 deletions iotdb-client/client-py/tests/integration/test_tablemodel_insert.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,22 +95,22 @@ def test_insert_use_tablet():
TSDataType.STRING,
]
column_types = [
ColumnType.ID,
ColumnType.ID,
ColumnType.ID,
ColumnType.TAG,
ColumnType.TAG,
ColumnType.TAG,
ColumnType.ATTRIBUTE,
ColumnType.ATTRIBUTE,
ColumnType.ATTRIBUTE,
ColumnType.MEASUREMENT,
ColumnType.MEASUREMENT,
ColumnType.MEASUREMENT,
ColumnType.MEASUREMENT,
ColumnType.MEASUREMENT,
ColumnType.MEASUREMENT,
ColumnType.MEASUREMENT,
ColumnType.MEASUREMENT,
ColumnType.MEASUREMENT,
ColumnType.MEASUREMENT,
ColumnType.FIELD,
ColumnType.FIELD,
ColumnType.FIELD,
ColumnType.FIELD,
ColumnType.FIELD,
ColumnType.FIELD,
ColumnType.FIELD,
ColumnType.FIELD,
ColumnType.FIELD,
ColumnType.FIELD,
]
timestamps = []
values = []
Expand Down Expand Up @@ -374,22 +374,22 @@ def test_insert_use_tablet():
TSDataType.STRING,
]
column_types = [
ColumnType.ID,
ColumnType.ID,
ColumnType.ID,
ColumnType.TAG,
ColumnType.TAG,
ColumnType.TAG,
ColumnType.ATTRIBUTE,
ColumnType.ATTRIBUTE,
ColumnType.ATTRIBUTE,
ColumnType.MEASUREMENT,
ColumnType.MEASUREMENT,
ColumnType.MEASUREMENT,
ColumnType.MEASUREMENT,
ColumnType.MEASUREMENT,
ColumnType.MEASUREMENT,
ColumnType.MEASUREMENT,
ColumnType.MEASUREMENT,
ColumnType.MEASUREMENT,
ColumnType.MEASUREMENT,
ColumnType.FIELD,
ColumnType.FIELD,
ColumnType.FIELD,
ColumnType.FIELD,
ColumnType.FIELD,
ColumnType.FIELD,
ColumnType.FIELD,
ColumnType.FIELD,
ColumnType.FIELD,
ColumnType.FIELD,
]
timestamps = []
values = []
Expand Down Expand Up @@ -687,22 +687,22 @@ def test_insert_relational_tablet_use_numpy_tablet():
TSDataType.STRING,
]
column_types = [
ColumnType.ID,
ColumnType.ID,
ColumnType.ID,
ColumnType.TAG,
ColumnType.TAG,
ColumnType.TAG,
ColumnType.ATTRIBUTE,
ColumnType.ATTRIBUTE,
ColumnType.ATTRIBUTE,
ColumnType.MEASUREMENT,
ColumnType.MEASUREMENT,
ColumnType.MEASUREMENT,
ColumnType.MEASUREMENT,
ColumnType.MEASUREMENT,
ColumnType.MEASUREMENT,
ColumnType.MEASUREMENT,
ColumnType.MEASUREMENT,
ColumnType.MEASUREMENT,
ColumnType.MEASUREMENT,
ColumnType.FIELD,
ColumnType.FIELD,
ColumnType.FIELD,
ColumnType.FIELD,
ColumnType.FIELD,
ColumnType.FIELD,
ColumnType.FIELD,
ColumnType.FIELD,
ColumnType.FIELD,
ColumnType.FIELD,
]
np_timestamps = np.arange(0, 10, dtype=np.dtype(">i8"))
np_values = [
Expand Down Expand Up @@ -904,22 +904,22 @@ def test_insert_relational_tablet_use_numpy_tablet():
TSDataType.STRING,
]
column_types = [
ColumnType.ID,
ColumnType.ID,
ColumnType.ID,
ColumnType.TAG,
ColumnType.TAG,
ColumnType.TAG,
ColumnType.ATTRIBUTE,
ColumnType.ATTRIBUTE,
ColumnType.ATTRIBUTE,
ColumnType.MEASUREMENT,
ColumnType.MEASUREMENT,
ColumnType.MEASUREMENT,
ColumnType.MEASUREMENT,
ColumnType.MEASUREMENT,
ColumnType.MEASUREMENT,
ColumnType.MEASUREMENT,
ColumnType.MEASUREMENT,
ColumnType.MEASUREMENT,
ColumnType.MEASUREMENT,
ColumnType.FIELD,
ColumnType.FIELD,
ColumnType.FIELD,
ColumnType.FIELD,
ColumnType.FIELD,
ColumnType.FIELD,
ColumnType.FIELD,
ColumnType.FIELD,
ColumnType.FIELD,
ColumnType.FIELD,
]
np_timestamps = np.arange(0, 10, dtype=np.dtype(">i8"))
np_values = [
Expand Down Expand Up @@ -1155,22 +1155,22 @@ def test_insert_relational_tablet_auto_create():
TSDataType.STRING,
]
column_types = [
ColumnType.ID,
ColumnType.ID,
ColumnType.ID,
ColumnType.TAG,
ColumnType.TAG,
ColumnType.TAG,
ColumnType.ATTRIBUTE,
ColumnType.ATTRIBUTE,
ColumnType.ATTRIBUTE,
ColumnType.MEASUREMENT,
ColumnType.MEASUREMENT,
ColumnType.MEASUREMENT,
ColumnType.MEASUREMENT,
ColumnType.MEASUREMENT,
ColumnType.MEASUREMENT,
ColumnType.MEASUREMENT,
ColumnType.MEASUREMENT,
ColumnType.MEASUREMENT,
ColumnType.MEASUREMENT,
ColumnType.FIELD,
ColumnType.FIELD,
ColumnType.FIELD,
ColumnType.FIELD,
ColumnType.FIELD,
ColumnType.FIELD,
ColumnType.FIELD,
ColumnType.FIELD,
ColumnType.FIELD,
ColumnType.FIELD,
]
timestamps = []
values = []
Expand Down Expand Up @@ -1423,22 +1423,22 @@ def test_insert_relational_tablet_auto_create():
TSDataType.STRING,
]
column_types = [
ColumnType.ID,
ColumnType.ID,
ColumnType.ID,
ColumnType.TAG,
ColumnType.TAG,
ColumnType.TAG,
ColumnType.ATTRIBUTE,
ColumnType.ATTRIBUTE,
ColumnType.ATTRIBUTE,
ColumnType.MEASUREMENT,
ColumnType.MEASUREMENT,
ColumnType.MEASUREMENT,
ColumnType.MEASUREMENT,
ColumnType.MEASUREMENT,
ColumnType.MEASUREMENT,
ColumnType.MEASUREMENT,
ColumnType.MEASUREMENT,
ColumnType.MEASUREMENT,
ColumnType.MEASUREMENT,
ColumnType.FIELD,
ColumnType.FIELD,
ColumnType.FIELD,
ColumnType.FIELD,
ColumnType.FIELD,
ColumnType.FIELD,
ColumnType.FIELD,
ColumnType.FIELD,
ColumnType.FIELD,
ColumnType.FIELD,
]
np_timestamps = np.arange(0, 10, dtype=np.dtype(">i8"))
np_values = [
Expand Down
Loading