commit | 7e70d3df1d8f68646402756acdd074b1a2984ed8 | [log] [tgz] |
---|---|---|
author | vinayakb <vinayakb@123451ca-8445-de46-9d55-352943316053> | Mon Oct 25 23:55:45 2010 +0000 |
committer | vinayakb <vinayakb@123451ca-8445-de46-9d55-352943316053> | Mon Oct 25 23:55:45 2010 +0000 |
tree | daf6727e99a898cf186e93367749106902b7e031 | |
parent | 4cba9d7b80fbe37697276bfcac3befeb7ef432f9 [diff] |
Fixed ExternalSortOperatorDescriptor to work correctly on empty input git-svn-id: https://hyracks.googlecode.com/svn/trunk@158 123451ca-8445-de46-9d55-352943316053
diff --git a/hyracks/hyracks-dataflow-std/src/main/java/edu/uci/ics/hyracks/dataflow/std/sort/ExternalSortOperatorDescriptor.java b/hyracks/hyracks-dataflow-std/src/main/java/edu/uci/ics/hyracks/dataflow/std/sort/ExternalSortOperatorDescriptor.java index a408d85..228d22b 100644 --- a/hyracks/hyracks-dataflow-std/src/main/java/edu/uci/ics/hyracks/dataflow/std/sort/ExternalSortOperatorDescriptor.java +++ b/hyracks/hyracks-dataflow-std/src/main/java/edu/uci/ics/hyracks/dataflow/std/sort/ExternalSortOperatorDescriptor.java
@@ -193,7 +193,9 @@ try { if (runs.size() <= 0) { FrameSorter frameSorter = (FrameSorter) env.get(FRAMESORTER); - frameSorter.flushFrames(writer); + if (frameSorter != null) { + frameSorter.flushFrames(writer); + } env.set(FRAMESORTER, null); } else { inFrames = new ArrayList<ByteBuffer>();