-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Alter column and timeseries datatype with ANSI SQL statement #16027
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
Merged
jt2594838
merged 139 commits into
apache:master
from
zerolbsony:alter_column_datatype_draft
Jan 5, 2026
Merged
Alter column and timeseries datatype with ANSI SQL statement #16027
jt2594838
merged 139 commits into
apache:master
from
zerolbsony:alter_column_datatype_draft
Jan 5, 2026
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Conflicts: # iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/consensus/request/ConfigPhysicalPlanType.java # pom.xml
# Conflicts: # integration-test/src/main/java/org/apache/iotdb/it/env/cluster/config/MppDataNodeConfig.java # integration-test/src/main/java/org/apache/iotdb/it/env/remote/config/RemoteDataNodeConfig.java # integration-test/src/main/java/org/apache/iotdb/itbase/env/DataNodeConfig.java # iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/ProcedureManager.java # iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/schema/table/column/TsTableColumnSchema.java # pom.xml
# Conflicts: # iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/AstVisitor.java
# Conflicts: # iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/memtable/AlignedWritableMemChunk.java
# Conflicts: # iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/execution/config/TableConfigTaskVisitor.java
# Conflicts: # integration-test/src/test/java/org/apache/iotdb/relational/it/db/it/IoTDBSetSystemStatusTableIT.java
(cherry picked from commit ea9f726)
# Conflicts: # iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/modification/ModificationFile.java
# Conflicts: # iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/plan/node/write/RelationalInsertRowNode.java # iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/plan/node/write/RelationalInsertTabletNode.java # iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/memtable/AbstractMemTable.java # iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/memtable/AlignedWritableMemChunk.java # iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/memtable/AlignedWritableMemChunkGroup.java # iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/read/reader/chunk/MemAlignedPageReader.java # iotdb-core/datanode/src/main/java/org/apache/iotdb/db/utils/datastructure/AlignedTVList.java
# Conflicts: # iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/schema/ClusterSchemaManager.java # iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/persistence/schema/ClusterSchemaInfo.java # iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/plan/node/write/RelationalInsertTabletNode.java # iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/memtable/AlignedWritableMemChunkGroup.java # iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/memtable/WritableMemChunkGroup.java
…ccumulator query among tree and table model.
jt2594838
requested changes
Dec 30, 2025
...gration-test/src/test/java/org/apache/iotdb/relational/it/schema/IoTDBAlterColumnTypeIT.java
Outdated
Show resolved
Hide resolved
...gration-test/src/test/java/org/apache/iotdb/relational/it/schema/IoTDBAlterColumnTypeIT.java
Show resolved
Hide resolved
integration-test/src/test/java/org/apache/iotdb/db/it/schema/IoTDBAlterTimeSeriesTypeIT.java
Show resolved
Hide resolved
integration-test/src/test/java/org/apache/iotdb/session/it/IoTDBSessionSchemaTemplateIT.java
Outdated
Show resolved
Hide resolved
iotdb-client/session/src/main/java/org/apache/iotdb/session/Session.java
Outdated
Show resolved
Hide resolved
...de/src/main/java/org/apache/iotdb/db/storageengine/dataregion/memtable/AbstractMemTable.java
Outdated
Show resolved
Hide resolved
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/utils/SchemaUtils.java
Outdated
Show resolved
Hide resolved
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/utils/SchemaUtils.java
Outdated
Show resolved
Hide resolved
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/utils/SchemaUtils.java
Outdated
Show resolved
Hide resolved
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/utils/datastructure/AlignedTVList.java
Show resolved
Hide resolved
…nstead of AlterTimeSeriesStatement, can resolve other alter timeseries statement can run normally.
…a type cause by AlterTimeSeriesDataTypeProcedure won't run.
Repair all accumulator query logics about TEXT、STRING、BLOB on IoTDBAlterColumnTypeIT; Remove unuseful and incorrect code
jt2594838
reviewed
Jan 5, 2026
integration-test/src/test/java/org/apache/iotdb/db/it/schema/IoTDBAlterTimeSeriesTypeIT.java
Outdated
Show resolved
Hide resolved
...gration-test/src/test/java/org/apache/iotdb/relational/it/schema/IoTDBAlterColumnTypeIT.java
Outdated
Show resolved
Hide resolved
.../src/main/java/org/apache/iotdb/db/queryengine/execution/operator/source/SeriesScanUtil.java
Outdated
Show resolved
Hide resolved
...rg/apache/iotdb/db/queryengine/plan/execution/config/executor/ClusterConfigTaskExecutor.java
Show resolved
Hide resolved
...java/org/apache/iotdb/db/queryengine/plan/execution/config/metadata/AlterTimeSeriesTask.java
Outdated
Show resolved
Hide resolved
...java/org/apache/iotdb/db/queryengine/plan/execution/config/metadata/AlterTimeSeriesTask.java
Outdated
Show resolved
Hide resolved
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/parser/ASTVisitor.java
Outdated
Show resolved
Hide resolved
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/utils/SchemaUtils.java
Outdated
Show resolved
Hide resolved
jt2594838
approved these changes
Jan 5, 2026
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
CHN doc:
https://timechor.feishu.cn/docx/AugedrYLqoybsbxzgEZc2eTinTg?from=from_copylink
IoTDB> alter timeseries root.db.battery.b0.current SET DATA TYPE DOUBLE;
Msg: The statement is executed successfully.
IoTDB> show timeseries root.db.battery.b0.current;
+--------------------------+-----+--------+--------+--------+-----------+----+----------+--------+------------------+--------+
| Timeseries|Alias|Database|DataType|Encoding|Compression|Tags|Attributes|Deadband|DeadbandParameters|ViewType|
+--------------------------+-----+--------+--------+--------+-----------+----+----------+--------+------------------+--------+
|root.db.battery.b0.current| null| root.db| DOUBLE| GORILLA| LZ4|null| null| null| null| BASE|
+--------------------------+-----+--------+--------+--------+-----------+----+----------+--------+------------------+--------+
Total line number = 1
It costs 0.043s
IoTDB> alter timeseries root.db.battery.b0.current SET DATA TYPE STRING;
Msg: The statement is executed successfully.
IoTDB> show timeseries root.db.battery.b0.current;
+--------------------------+-----+--------+--------+--------+-----------+----+----------+--------+------------------+--------+
| Timeseries|Alias|Database|DataType|Encoding|Compression|Tags|Attributes|Deadband|DeadbandParameters|ViewType|
+--------------------------+-----+--------+--------+--------+-----------+----+----------+--------+------------------+--------+
|root.db.battery.b0.current| null| root.db| STRING| GORILLA| LZ4|null| null| null| null| BASE|
+--------------------------+-----+--------+--------+--------+-----------+----+----------+--------+------------------+--------+
Total line number = 1
It costs 0.009s