Skip to content

Commit

Permalink
Fix compile issue
Browse files Browse the repository at this point in the history
  • Loading branch information
HTHou authored Dec 30, 2024
1 parent c2e8e1a commit 2e6ffbf
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -472,16 +472,16 @@ public void addIDColumnIfNecessary(
List<Tablet.ColumnCategory> columnTypes, List<Sensor> sensors, IBatch batch) {
// All sensors are of type measurement
for (int i = 0; i < sensors.size(); i++) {
columnTypes.add(Tablet.ColumnCategory.MEASUREMENT);
columnTypes.add(Tablet.ColumnCategory.FIELD);
}
// tag and device as ID column
// Add Identity Column Information to Schema
sensors.add(new Sensor("device_id", SensorType.STRING));
columnTypes.add(Tablet.ColumnCategory.ID);
columnTypes.add(Tablet.ColumnCategory.TAG);
for (String key : batch.getDeviceSchema().getTags().keySet()) {
// Currently, the identity column can only be String
sensors.add(new Sensor(key, SensorType.STRING));
columnTypes.add(Tablet.ColumnCategory.ID);
columnTypes.add(Tablet.ColumnCategory.TAG);
}
// Add the value of the identity column to the value of each record
for (int loop = 0; loop < config.getDEVICE_NUM_PER_WRITE(); loop++) {
Expand Down

0 comments on commit 2e6ffbf

Please sign in to comment.