Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.2.1, 2.2.0, 2.3.2, 3.0.0
-
None
Description
2018-04-19T18:57:24,268 DEBUG [67259108-c184-4c92-9e18-9e2969244442 HiveServer2-Handler-Pool: Thread-73]: optimizer.StatsOptimizer (StatsOptimizer.java:process(614)) - Unsupported type: date encountered in metadata optimizer for column : jour
if (udaf instanceof GenericUDAFMin) { ExprNodeColumnDesc colDesc = (ExprNodeColumnDesc)exprMap.get(((ExprNodeColumnDesc)aggr.getParameters().get(0)).getColumn()); String colName = colDesc.getColumn(); StatType type = getType(colDesc.getTypeString()); if (!tbl.isPartitioned()) { if (!StatsSetupConst.areColumnStatsUptoDate(tbl.getParameters(), colName)) { Logger.debug("Stats for table : " + tbl.getTableName() + " column " + colName + " are not up to date."); return null; } ColumnStatisticsData statData = hive.getMSC().getTableColumnStatistics( tbl.getDbName(), tbl.getTableName(), Lists.newArrayList(colName)) .get(0).getStatsData(); String name = colDesc.getTypeString().toUpperCase(); switch (type) { case Integeral: { LongSubType subType = LongSubType.valueOf(name); LongColumnStatsData lstats = statData.getLongStats(); if (lstats.isSetLowValue()) { oneRow.add(subType.cast(lstats.getLowValue())); } else { oneRow.add(null); } break; } case Double: { DoubleSubType subType = DoubleSubType.valueOf(name); DoubleColumnStatsData dstats = statData.getDoubleStats(); if (dstats.isSetLowValue()) { oneRow.add(subType.cast(dstats.getLowValue())); } else { oneRow.add(null); } break; } default: // unsupported type Logger.debug("Unsupported type: " + colDesc.getTypeString() + " encountered in " + "metadata optimizer for column : " + colName); return null; } }
enum StatType{ Integeral, Double, String, Boolean, Binary, Unsupported } enum LongSubType { BIGINT { @Override Object cast(long longValue) { return longValue; } }, INT { @Override Object cast(long longValue) { return (int)longValue; } }, SMALLINT { @Override Object cast(long longValue) { return (short)longValue; } }, TINYINT { @Override Object cast(long longValue) { return (byte)longValue; } }; abstract Object cast(long longValue); }
Date is stored in stats (& also the typo there).
Attachments
Attachments
Issue Links
- is related to
-
HIVE-19290 Statistics: Timestamp statistics support
- Open