while ((packedRow = ftOp.getNextRow()) != null) { if (packedRow.oi.getCategory() != ObjectInspector.Category.STRUCT) { throw new HiveException("Unexpected object type encountered while unpacking row");
private boolean next(Integer current) throws IOException, HiveException { if (keyFields == null) { byte tag = tagForAlias(alias); // joinKeys/joinKeysOI are initialized after making merge queue, so setup lazily at runtime keyFields = joinKeys[tag]; keyFieldOIs = joinKeysObjectInspectors[tag]; } InspectableObject nextRow = segments[current].getNextRow(); while (nextRow != null) { sinkOp.reset(); if (keys[current] == null) { keys[current] = new ObjectPair<List<Object>, InspectableObject>(); } // Pass the row though the operator tree. It is guaranteed that not more than 1 row can // be produced from a input row. forwardOp.process(nextRow.o, 0); nextRow = sinkOp.getResult(); // It is possible that the row got absorbed in the operator tree. if (nextRow.o != null) { // todo this should be changed to be evaluated lazily, especially for single segment case keys[current].setFirst(JoinUtil.computeKeys(nextRow.o, keyFields, keyFieldOIs)); keys[current].setSecond(nextRow); return true; } nextRow = segments[current].getNextRow(); } keys[current] = null; return false; } }
InspectableObject row = fetchOp.getNextRow(); if (row == null) { break;
private boolean next(Integer current) throws IOException, HiveException { if (keyFields == null) { byte tag = tagForAlias(alias); // joinKeys/joinKeysOI are initialized after making merge queue, so setup lazily at runtime keyFields = joinKeys[tag]; keyFieldOIs = joinKeysObjectInspectors[tag]; } InspectableObject nextRow = segments[current].getNextRow(); while (nextRow != null) { sinkOp.reset(); if (keys[current] == null) { keys[current] = new ObjectPair<List<Object>, InspectableObject>(); } // Pass the row though the operator tree. It is guaranteed that not more than 1 row can // be produced from a input row. forwardOp.process(nextRow.o, 0); nextRow = sinkOp.getResult(); // It is possible that the row got absorbed in the operator tree. if (nextRow.o != null) { // todo this should be changed to be evaluated lazily, especially for single segment case keys[current].setFirst(JoinUtil.computeKeys(nextRow.o, keyFields, keyFieldOIs)); keys[current].setSecond(nextRow); return true; } nextRow = segments[current].getNextRow(); } keys[current] = null; return false; } }
InspectableObject row = fetchOp.getNextRow(); if (row == null) { break;
InspectableObject packedRow; Table tbl = db.getTable(currentDb, tableName); while ((packedRow = ftOp.getNextRow()) != null) { if (packedRow.oi.getCategory() != ObjectInspector.Category.STRUCT) { throw new HiveException("Unexpected object type encountered while unpacking row");
/** * Get the next row and push down it to operator tree. * Currently only used by FetchTask. **/ public boolean pushRow() throws IOException, HiveException { if (operator == null) { return false; } if (work.getRowsComputedUsingStats() != null) { for (List<Object> row : work.getRowsComputedUsingStats()) { operator.process(row, 0); } flushRow(); return true; } InspectableObject row = getNextRow(); if (row != null) { pushRow(row); } else { flushRow(); } return row != null; }
/** * Get the next row and push down it to operator tree. * Currently only used by FetchTask. **/ public boolean pushRow() throws IOException, HiveException { if (operator == null) { return false; } if (work.getRowsComputedUsingStats() != null) { for (List<Object> row : work.getRowsComputedUsingStats()) { operator.process(row, 0); } flushRow(); return true; } InspectableObject row = getNextRow(); if (row != null) { pushRow(row); } else { flushRow(); } return row != null; }
private void fetchOneRow(byte tag) { if (fetchOperators != null) { String tble = this.tagToAlias.get(tag); FetchOperator fetchOp = fetchOperators.get(tble); Operator<? extends Serializable> forwardOp = localWork.getAliasToWork() .get(tble); try { InspectableObject row = fetchOp.getNextRow(); if (row == null) { this.fetchOpDone[tag] = true; return; } forwardOp.process(row.o, 0); // check if any operator had a fatal error or early exit during // execution if (forwardOp.getDone()) { this.fetchOpDone[tag] = true; } } catch (Throwable e) { if (e instanceof OutOfMemoryError) { // Don't create a new object if we are already out of memory throw (OutOfMemoryError) e; } else { throw new RuntimeException("Map local work failed", e); } } } }
InspectableObject io = ftOp.getNextRow(); if (io == null) { if (numRows == 0) {
private boolean next(Integer current) throws IOException, HiveException { if (keyFields == null) { byte tag = tagForAlias(alias); // joinKeys/joinKeysOI are initialized after making merge queue, so setup lazily at runtime keyFields = joinKeys[tag]; keyFieldOIs = joinKeysObjectInspectors[tag]; } InspectableObject nextRow = segments[current].getNextRow(); while (nextRow != null) { sinkOp.reset(); if (keys[current] == null) { keys[current] = new ObjectPair<List<Object>, InspectableObject>(); } // Pass the row though the operator tree. It is guaranteed that not more than 1 row can // be produced from a input row. forwardOp.process(nextRow.o, 0); nextRow = sinkOp.getResult(); // It is possible that the row got absorbed in the operator tree. if (nextRow.o != null) { // todo this should be changed to be evaluated lazily, especially for single segment case keys[current].setFirst(JoinUtil.computeKeys(nextRow.o, keyFields, keyFieldOIs)); keys[current].setSecond(nextRow); return true; } nextRow = segments[current].getNextRow(); } keys[current] = null; return false; } }
InspectableObject row = fetchOp.getNextRow(); if (row == null) { break;
InspectableObject row = fetchOp.getNextRow(); if (row == null) { if (inputFileChangeSenstive) {
while ((packedRow = ftOp.getNextRow()) != null) { if (packedRow.oi.getCategory() != ObjectInspector.Category.STRUCT) { throw new HiveException("Unexpected object type encountered while unpacking row");
/** * Get the next row and push down it to operator tree. * Currently only used by FetchTask. **/ public boolean pushRow() throws IOException, HiveException { if (work.getRowsComputedUsingStats() != null) { for (List<Object> row : work.getRowsComputedUsingStats()) { operator.process(row, 0); } flushRow(); return true; } InspectableObject row = getNextRow(); if (row != null) { pushRow(row); } else { flushRow(); } return row != null; }