gianm commented on code in PR #16841:
URL: https://github.com/apache/druid/pull/16841#discussion_r1704680192


##########
sql/src/main/java/org/apache/druid/sql/calcite/schema/SystemSchema.java:
##########
@@ -157,6 +161,11 @@ public class SystemSchema extends AbstractSchema
       .add("replication_factor", ColumnType.LONG)
       .build();
 
+  static final int SEGMENTS_SHARD_SPEC_INDEX = 
SEGMENTS_SIGNATURE.indexOf("shard_spec");
+  static final int SEGMENTS_DIMENSIONS_INDEX = 
SEGMENTS_SIGNATURE.indexOf("dimensions");
+  static final int SEGMENTS_METRICS_INDEX = 
SEGMENTS_SIGNATURE.indexOf("metrics");
+  static final int SEGMENTS_LAST_COMPACTION_STATE_INDEX = 
SEGMENTS_SIGNATURE.indexOf("last_compaction_state");

Review Comment:
   I did a refactor that makes these unnecessary. The new logic moves 
`writeValueAsString` to `projectSegmentsRow`, and avoids both 
`ObjectMapper.writeValueAsString(o)` and `o.toString()` when `o` isn't being 
selected.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to