-
Notifications
You must be signed in to change notification settings - Fork 1.1k
perf: Optimize wide table write performance #16699
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
Merged
Changes from all commits
Commits
Show all changes
56 commits
Select commit
Hold shift + click to select a range
b5ac4a5
Refactor TableSchema handling to reduce conversion overhead
luoluoyuyu a0a5051
update
luoluoyuyu 5a91fcb
update
luoluoyuyu 022d92e
update
luoluoyuyu c4cdae2
update
luoluoyuyu aa406fd
update
luoluoyuyu 514e9e7
update
luoluoyuyu a5a51e3
update
luoluoyuyu 195b767
update
luoluoyuyu 6392beb
fix
luoluoyuyu 995b3c5
update semanticCheck
luoluoyuyu 626ceb3
fix: cache table schema by database and table
luoluoyuyu ceb4609
spotless
luoluoyuyu bcab1cf
update
luoluoyuyu 4a796fb
update
luoluoyuyu 81ed8ba
update
luoluoyuyu 21be63e
update
luoluoyuyu f512f0f
update
luoluoyuyu 5d268cd
fix InsertStatementTest
luoluoyuyu f604a7f
update
luoluoyuyu 8f8a4e4
update
luoluoyuyu d987788
update
luoluoyuyu 7eb3b3a
update
luoluoyuyu 4b5e22a
Revert "update"
luoluoyuyu 439e9b7
ignore object type
luoluoyuyu da03b50
update
luoluoyuyu 54ab6cc
update
luoluoyuyu c81fd1b
update
luoluoyuyu decbd85
update
luoluoyuyu 1a8b375
update
luoluoyuyu 886f371
update
luoluoyuyu 3247c93
update
luoluoyuyu 35c77f3
update
luoluoyuyu 9d2c9ce
update
luoluoyuyu 3238c75
update
luoluoyuyu f4d1f73
update
luoluoyuyu d2157ad
update
luoluoyuyu ea6e650
update
luoluoyuyu ad1d0d5
fix it
luoluoyuyu 72357e8
Merge branch 'master' into impl-table-util
luoluoyuyu 0f84272
fix it
luoluoyuyu 84aa436
fix
luoluoyuyu 16085a2
fix
luoluoyuyu 1d43168
fix
luoluoyuyu 4e2a960
fix
luoluoyuyu a46a6b9
fix
luoluoyuyu 97a6418
fix
luoluoyuyu 9a08ca8
update
luoluoyuyu e6a5abf
fix
luoluoyuyu 1f05cff
fix
luoluoyuyu 1633337
fix
luoluoyuyu c22f6ab
fix
luoluoyuyu e611862
fix
luoluoyuyu 30af377
fix
luoluoyuyu ece8fc3
fix
luoluoyuyu f229c30
fix
luoluoyuyu File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
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
113 changes: 113 additions & 0 deletions
113
integration-test/src/test/java/org/apache/iotdb/db/it/utils/TSDataTypeTestUtils.java
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,113 @@ | ||
| /* | ||
| * Licensed to the Apache Software Foundation (ASF) under one | ||
| * or more contributor license agreements. See the NOTICE file | ||
| * distributed with this work for additional information | ||
| * regarding copyright ownership. The ASF licenses this file | ||
| * to you under the Apache License, Version 2.0 (the | ||
| * "License"); you may not use this file except in compliance | ||
| * with the License. You may obtain a copy of the License at | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, | ||
| * software distributed under the License is distributed on an | ||
| * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
| * KIND, either express or implied. See the License for the | ||
| * specific language governing permissions and limitations | ||
| * under the License. | ||
| */ | ||
| package org.apache.iotdb.db.it.utils; | ||
|
|
||
| import org.apache.tsfile.enums.TSDataType; | ||
|
|
||
| import java.util.Arrays; | ||
| import java.util.HashSet; | ||
| import java.util.List; | ||
| import java.util.Set; | ||
| import java.util.stream.Collectors; | ||
|
|
||
| /** | ||
| * Utility class for TSDataType operations in integration tests. This class provides helper methods | ||
| * to filter out unsupported data types that should not be used in tests. | ||
| * | ||
| * <p>Usage in IT tests: | ||
| * | ||
| * <pre>{@code | ||
| * Set<TSDataType> dataTypes = TSDataTypeTestUtils.getSupportedTypes(); | ||
| * for (TSDataType from : dataTypes) { | ||
| * for (TSDataType to : dataTypes) { | ||
| * // test logic | ||
| * } | ||
| * } | ||
| * }</pre> | ||
| * | ||
| * <p>To find this utility class quickly, search for: "TSDataTypeTestUtils" or "getSupportedTypes" | ||
| */ | ||
| public class TSDataTypeTestUtils { | ||
|
|
||
| private TSDataTypeTestUtils() { | ||
| // utility class | ||
| } | ||
|
|
||
| /** | ||
| * Get the set of unsupported TSDataType values that should be filtered out in tests. | ||
| * | ||
| * <p>Currently includes: VECTOR, UNKNOWN, OBJECT | ||
| * | ||
| * @return Set of unsupported TSDataType values | ||
| */ | ||
| public static Set<TSDataType> getUnsupportedTypes() { | ||
| Set<TSDataType> unsupported = new HashSet<>(); | ||
| unsupported.add(TSDataType.VECTOR); | ||
| unsupported.add(TSDataType.UNKNOWN); | ||
| unsupported.add(TSDataType.OBJECT); | ||
| return unsupported; | ||
| } | ||
|
|
||
| /** | ||
| * Check if a TSDataType is supported for general use (not an internal type). | ||
| * | ||
| * @param dataType the TSDataType to check | ||
| * @return true if the type is supported, false otherwise | ||
| */ | ||
| public static boolean isSupportedType(TSDataType dataType) { | ||
| return !getUnsupportedTypes().contains(dataType); | ||
| } | ||
|
|
||
| /** | ||
| * Get all supported TSDataType values (filters out unsupported types). | ||
| * | ||
| * <p>This method filters out VECTOR, UNKNOWN, and any other types returned by {@link | ||
| * #getUnsupportedTypes()}. | ||
| * | ||
| * @return Set of supported TSDataType values | ||
| */ | ||
| public static Set<TSDataType> getSupportedTypes() { | ||
| Set<TSDataType> allTypes = new HashSet<>(Arrays.asList(TSDataType.values())); | ||
| allTypes.removeAll(getUnsupportedTypes()); | ||
| return allTypes; | ||
| } | ||
|
|
||
| /** | ||
| * Get all supported TSDataType values as a List (filters out unsupported types). | ||
| * | ||
| * @return List of supported TSDataType values | ||
| */ | ||
| public static List<TSDataType> getSupportedTypesList() { | ||
| return Arrays.stream(TSDataType.values()) | ||
| .filter(TSDataTypeTestUtils::isSupportedType) | ||
| .collect(Collectors.toList()); | ||
| } | ||
|
|
||
| /** | ||
| * Filter a collection of TSDataType values to only include supported types. | ||
| * | ||
| * @param dataTypes collection of TSDataType values to filter | ||
| * @return Set containing only supported types | ||
| */ | ||
| public static Set<TSDataType> filterSupportedTypes(Set<TSDataType> dataTypes) { | ||
| Set<TSDataType> result = new HashSet<>(dataTypes); | ||
| result.removeAll(getUnsupportedTypes()); | ||
| return result; | ||
| } | ||
| } |
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
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
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
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
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
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
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
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
| Original file line number | Diff line number | Diff line change | ||||||
|---|---|---|---|---|---|---|---|---|
|
|
@@ -24,6 +24,7 @@ | |||||||
| import org.apache.iotdb.commons.partition.DataPartition; | ||||||||
| import org.apache.iotdb.commons.partition.DataPartitionQueryParam; | ||||||||
| import org.apache.iotdb.commons.partition.SchemaPartition; | ||||||||
| import org.apache.iotdb.commons.schema.table.InsertNodeMeasurementInfo; | ||||||||
| import org.apache.iotdb.commons.schema.table.TreeViewSchema; | ||||||||
| import org.apache.iotdb.commons.schema.table.TsTable; | ||||||||
| import org.apache.iotdb.commons.udf.builtin.relational.TableBuiltinAggregationFunction; | ||||||||
|
|
@@ -1397,6 +1398,24 @@ public Optional<TableSchema> validateTableHeaderSchema( | |||||||
| database, tableSchema, context, allowCreateTable, isStrictTagColumn); | ||||||||
| } | ||||||||
|
|
||||||||
|
||||||||
| @Override |
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reset configurations when the test is done.