[Table Model] Create table device#12746
[Table Model] Create table device#12746JackieTien97 merged 9 commits intoapache:ty/TableModelGrammarfrom
Conversation
| PathPatternTree patternTree = new PathPatternTree(); | ||
| for (PartialPath devicePath : devicePathList) { | ||
| patternTree.appendFullPath(devicePath.concatNode(ONE_LEVEL_PATH_WILDCARD)); | ||
| } | ||
| SchemaPartition partition = | ||
| partitionFetcher.getOrCreateSchemaPartition( | ||
| patternTree, context.getSession().getUserName()); |
There was a problem hiding this comment.
directly add interface in Metadata use Map<String, List as parameter to fetch SchemaPartition.
There was a problem hiding this comment.
String databaseName, List<IDeviceId>
[database, table, , , , ]
There was a problem hiding this comment.
Already set interface in Metadata, but a todo is left waiting for implementation.
| import java.util.Objects; | ||
|
|
||
| public class CreateTableDeviceNode extends WritePlanNode { | ||
| private final List<PartialPath> devicePathList; |
There was a problem hiding this comment.
why not using List<String[]> + String databaseName + String tableName;
while serializing, we only need to serialize index 1+ and index 0 is db.tableName won't de serialized.
index 0 can be derialized from String databaseName + String tableName
There was a problem hiding this comment.
The db name and table name have been separated from the device id, Object[].
| TRegionReplicaSet regionReplicaSet = | ||
| analysis | ||
| .getSchemaPartitionInfo() | ||
| .getSchemaRegionReplicaSet(new StringArrayDeviceID(devicePathList.get(i).getNodes())); |
There was a problem hiding this comment.
pass String database and use IDeviceID.Factory.create(String[]) to create IDeviceId.
There was a problem hiding this comment.
add new method in getSchemaRegionReplicaSet(String database, IDeviceId)
There was a problem hiding this comment.
Fixed implementation.
Description
Support Create Table Device, including:
Local execution result