jihoonson commented on pull request #9883: URL: https://github.com/apache/druid/pull/9883#issuecomment-646219869
Oh I meant adding them as new columns but without serialization. For example, we can change [this code](https://github.com/apache/druid/blob/master/sql/src/main/java/org/apache/druid/sql/calcite/schema/SystemSchema.java#L308-L323) as below: ```java return new Object[]{ segment.getId(), segment.getDataSource(), segment.getInterval().getStart().toString(), segment.getInterval().getEnd().toString(), segment.getSize(), segment.getVersion(), Long.valueOf(segment.getShardSpec().getPartitionNum()), numReplicas, numRows, IS_PUBLISHED_TRUE, //is_published is true for published segments isAvailable, isRealtime, val.isOvershadowed() ? IS_OVERSHADOWED_TRUE : IS_OVERSHADOWED_FALSE, segment.getShardSpec(), // new column segment.getDimensions(), // new column segment.getMetrics() // new column }; ``` > Can we add these fields when they are needed? I think we are already using them. The purpose of the "Segments" table or system table is mostly for operators to easily debug their druid cluster. Dimensions and metrics are needed to see if the schema has changed. ShardSpec is needed to see how segments are partitioned so that you can repartition them if needed. ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
