Package org.apache.drill.exec.record

Examples of org.apache.drill.exec.record.RecordBatchLoader.clear()


      for (int i = 0; i < batchLoader.getRecordCount(); i++) {
        recordsWritten += recordWrittenV.getAccessor().get(i);
      }

      batchLoader.clear();
      batch.release();
    }

//    assertTrue(fs.exists(tableLocation));
    assertEquals(expectedOutputCount, recordsWritten);
View Full Code Here


            NullableBigIntVector.class,
            batchLoader.getValueVectorId(new SchemaPath(new PathSegment.NameSegment("sum"))).getFieldIds()[0]
        );
        assertEquals(sumArr[r], wrapper.getValueVector().getAccessor().getObject(r));
      }
      batchLoader.clear();
      batch.release();

      assertEquals(4, recordCount);
    }
  }
View Full Code Here

        assertEquals("Count, Row " + r, groupCounter, cnt.getObject(r - 1));
        assertEquals("Sum, Row " + r, s, sum.getObject(r - 1));
        assertEquals("Output, Row " + r, s, output.getObject(r - 1));
      }
      batchLoader.clear();
      batch.release();

      assertEquals(1000, recordCount);
    }
  }
View Full Code Here

      for (int i =0; i < c1.getAccessor().getValueCount(); i++) {
        recordCount++;
        assertTrue(String.format("%d > %d", previousBigInt, a1.get(i)), previousBigInt >= a1.get(i));
        previousBigInt = a1.get(i);
      }
      loader.clear();
      b.release();
    }

    System.out.println(String.format("Sorted %,d records in %d batches.", recordCount, batchCount));
  }
View Full Code Here

      for (int i =0; i < c1.getAccessor().getValueCount(); i++) {
        recordCount++;
        assertTrue(String.format("%d > %d", previousBigInt, a1.get(i)), previousBigInt >= a1.get(i));
        previousBigInt = a1.get(i);
      }
      loader.clear();
      b.release();
    }

    System.out.println(String.format("Sorted %,d records in %d batches.", recordCount, batchCount));
  }
View Full Code Here

        for (int i =0; i < c1.getAccessor().getValueCount(); i++) {
          recordCount++;
          assertTrue(String.format("%d < %d", previousBigInt, a1.get(i)), previousBigInt >= a1.get(i));
          previousBigInt = a1.get(i);
        }
        loader.clear();
        b.release();
      }
      System.out.println(String.format("Sorted %,d records in %d batches.", recordCount, batchCount));

    }
View Full Code Here

          recordCount++;
          assertTrue(String.format("%d < %d", previousBigInt, a1.get(i)), previousBigInt >= a1.get(i));
          previousBigInt = a1.get(i);
        }
        assertTrue(String.format("%d == %d", a1.get(0), a1.get(a1.getValueCount() - 1)), a1.get(0) != a1.get(a1.getValueCount() - 1));
        loader.clear();
        b.release();
      }
      System.out.println(String.format("Sorted %,d records in %d batches.", recordCount, batchCount));

    }
View Full Code Here

              partitionRecordCounts.add(partitionRecordCount);
              partitionRecordCount = 0;
            }
          }
          partitionRecordCounts.add(partitionRecordCount);
          loader.clear();
        }

        b.release();
      }
      double[] values = new double[partitionRecordCounts.size()];
View Full Code Here

                assertEquals(dec18Accessor.getObject(i).toString(), decimal18Output[i]);
            }
            assertEquals(6, dec9Accessor.getValueCount());
            assertEquals(6, dec18Accessor.getValueCount());

            batchLoader.clear();
            for (QueryResultBatch result : results) {
              result.release();
            }
        }
    }
View Full Code Here

                assertEquals(dec38Accessor.getObject(i).toString(), decimal38Output[i]);
            }
            assertEquals(6, dec9Accessor.getValueCount());
            assertEquals(6, dec38Accessor.getValueCount());

            batchLoader.clear();
            for (QueryResultBatch result : results) {
              result.release();
            }
        }
    }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.