diff --git ql/src/java/org/apache/hadoop/hive/ql/exec/HashTableSinkOperator.java ql/src/java/org/apache/hadoop/hive/ql/exec/HashTableSinkOperator.java index 8a5c009..4352ffe 100644 --- ql/src/java/org/apache/hadoop/hive/ql/exec/HashTableSinkOperator.java +++ ql/src/java/org/apache/hadoop/hive/ql/exec/HashTableSinkOperator.java @@ -96,12 +96,9 @@ protected transient MapJoinPersistableTableContainer[] mapJoinTables; protected transient MapJoinTableContainerSerDe[] mapJoinTableSerdes; - private static final Object[] EMPTY_OBJECT_ARRAY = new Object[0]; - private static final MapJoinEagerRowContainer EMPTY_ROW_CONTAINER = new MapJoinEagerRowContainer(); - static { - EMPTY_ROW_CONTAINER.addRow(EMPTY_OBJECT_ARRAY); - } - + private final Object[] EMPTY_OBJECT_ARRAY = new Object[0]; + private final MapJoinEagerRowContainer EMPTY_ROW_CONTAINER = new MapJoinEagerRowContainer(); + private long rowNumber = 0; protected transient LogHelper console; private long hashTableScale; @@ -121,6 +118,7 @@ protected void initializeOp(Configuration hconf) throws HiveException { boolean isSilent = HiveConf.getBoolVar(hconf, HiveConf.ConfVars.HIVESESSIONSILENT); console = new LogHelper(LOG, isSilent); memoryExhaustionHandler = new MapJoinMemoryExhaustionHandler(console, conf.getHashtableMemoryUsage()); + EMPTY_ROW_CONTAINER.addRow(EMPTY_OBJECT_ARRAY); // for small tables only; so get the big table position first posBigTableAlias = conf.getPosBigTable();