Jackie-Jiang commented on a change in pull request #6719: URL: https://github.com/apache/incubator-pinot/pull/6719#discussion_r620727402
########## 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: I don't see it very necessary to support bit/byte/short natively. With dictionary encoding, it should perform almost identical to `INT`. If we do want to add them in the future, we can add the metadata then, and make it default to `INT` for backward-compatibility. -- 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