File tree Expand file tree Collapse file tree
iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/schema/table Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -141,6 +141,19 @@ public TsTableColumnSchema getColumnSchema(final String columnName) {
141141 }
142142 }
143143
144+ // No need to acquire lock, because the time column is fixed after table creation
145+ // And the inner name is protected by the volatile keyword
146+ public TsTableColumnSchema getTimeColumnSchema () {
147+ if (Objects .isNull (timeColumnSchema )) {
148+ timeColumnSchema =
149+ columnSchemaMap .values ().stream ()
150+ .filter (column -> column instanceof TimeColumnSchema )
151+ .findFirst ()
152+ .orElse (null );
153+ }
154+ return timeColumnSchema ;
155+ }
156+
144157 /**
145158 * Execute a write operation with optimistic lock support. This method handles the write flag and
146159 * version increment automatically.
You can’t perform that action at this time.
0 commit comments