siddharthteotia commented on a change in pull request #6719: URL: https://github.com/apache/incubator-pinot/pull/6719#discussion_r620627441
########## File path: pinot-spi/src/main/java/org/apache/pinot/spi/data/FieldSpec.java ########## @@ -352,13 +368,41 @@ public int hashCode() { public enum DataType { // LIST is for complex lists which is different from multi-value column of primitives // STRUCT, MAP and LIST are composable to form a COMPLEX field - INT, LONG, FLOAT, DOUBLE, BOOLEAN/* Stored as STRING */, STRING, BYTES, STRUCT, MAP, LIST; + INT, + LONG, + FLOAT, + DOUBLE, + BOOLEAN /* Stored as INT */, + TIMESTAMP /* Stored as LONG */, + STRING, + BYTES, + STRUCT, + MAP, + LIST; /** * Returns the data type stored in Pinot. + * <p>Pinot internally stores data (physical) in INT, LONG, FLOAT, DOUBLE, STRING, BYTES type, other data types + * (logical) will be stored as one of these types. + * <p>Stored type should be used when reading the physical stored values from Dictionary, Forward Index etc. */ public DataType getStoredType() { - return this == BOOLEAN ? STRING : this; + switch (this) { + case BOOLEAN: + return INT; Review comment: Not necessarily in this PR, but would it make sense to store this is a bit / byte as opposed to 32 bits in future ? If there is a plan to do so, may be we can write a property to segment metadata (BOOLEAN_STORED_TYPE= INT) to support evolution -- 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: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org For additional commands, e-mail: commits-h...@pinot.apache.org