fixing date type in pinot-connector
@@ -22,6 +22,7 @@ import com.facebook.presto.spi.PageBuilder;
import com.facebook.presto.spi.block.BlockBuilder;
import com.facebook.presto.spi.type.BigintType;
import com.facebook.presto.spi.type.BooleanType;
+import com.facebook.presto.spi.type.DateType;
import com.facebook.presto.spi.type.DecimalType;
import com.facebook.presto.spi.type.DoubleType;
import com.facebook.presto.spi.type.FixedWidthType;
@@ -147,6 +148,9 @@ public class PinotBrokerPageSource
else if (type instanceof TimestampType) {
type.writeLong(blockBuilder, parseLong(value));
}
+ else if (type instanceof DateType) {
+ type.writeLong(blockBuilder, parseLong(value));
+ }
else {
throw new PinotException(PINOT_UNSUPPORTED_COLUMN_TYPE, Optional.empty(), "type '" + type + "' not supported");
}
