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

Renamed ID->TAG, MEASUREMENT->FIELD in create/desc table sql #472

Merged
merged 1 commit into from
Dec 27, 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
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public long pointNum() {
// Count the number of measurements
List<Sensor> sensors = deviceSchema.getSensors();
for (Sensor sensor : sensors) {
if (sensor.getColumnCategory() == ColumnCategory.MEASUREMENT) {
if (sensor.getColumnCategory() == ColumnCategory.FIELD) {
measureNum++;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public long pointNum() {
long measureNum = 0;
List<Sensor> sensors = deviceSchemas.get(0).getSensors();
for (Sensor sensor : sensors) {
if (sensor.getColumnCategory() == ColumnCategory.MEASUREMENT) {
if (sensor.getColumnCategory() == ColumnCategory.FIELD) {
measureNum++;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public Sensor() {}
public Sensor(String name, SensorType sensorType) {
this.name = name;
this.sensorType = sensorType;
this.columnCategory = ColumnCategory.MEASUREMENT;
this.columnCategory = ColumnCategory.FIELD;
}

public Sensor(String name, SensorType sensorType, ColumnCategory columnCategory) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@
package cn.edu.tsinghua.iot.benchmark.entity.enums;

public enum ColumnCategory {
ID("ID"),
TAG("TAG"),
ATTRIBUTE("ATTRIBUTE"),
MEASUREMENT("MEASUREMENT");
FIELD("FIELD");

public String name;

Expand All @@ -37,6 +37,6 @@ public static ColumnCategory getType(int ordinal) {
}
}
// default type
return ColumnCategory.MEASUREMENT;
return ColumnCategory.FIELD;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
import cn.edu.tsinghua.iot.benchmark.entity.Batch.IBatch;
import cn.edu.tsinghua.iot.benchmark.entity.Record;
import cn.edu.tsinghua.iot.benchmark.entity.Sensor;
import cn.edu.tsinghua.iot.benchmark.entity.enums.ColumnCategory;
import cn.edu.tsinghua.iot.benchmark.entity.enums.SensorType;
import cn.edu.tsinghua.iot.benchmark.iotdb200.IoTDB;
import cn.edu.tsinghua.iot.benchmark.iotdb200.TimeseriesSchema;
Expand Down Expand Up @@ -118,15 +119,15 @@ private void registerTable(Session metaSession, List<TimeseriesSchema> timeserie
.append(" ")
.append(SensorType.STRING)
.append(" ")
.append(Tablet.ColumnCategory.ID);
.append(ColumnCategory.TAG);
for (String key : deviceSchema.getTags().keySet()) {
builder
.append(", ")
.append(key)
.append(" ")
.append(SensorType.STRING)
.append(" ")
.append(Tablet.ColumnCategory.ID);
.append(ColumnCategory.TAG);
}
builder.append(")");
tables
Expand Down
Loading