Tabnine Logo
FloatStatistics.setMinMax
Code IndexAdd Tabnine to your IDE (free)

How to use
setMinMax
method
in
org.apache.parquet.column.statistics.FloatStatistics

Best Java code snippets using org.apache.parquet.column.statistics.FloatStatistics.setMinMax (Showing top 5 results out of 315)

origin: org.apache.drill.exec/drill-java-exec

@SuppressWarnings("unchecked")
private Statistics<T> getStatistics(float min, float max) {
 final Statistics<T> statistics = Statistics.getStatsBasedOnType(PrimitiveType.PrimitiveTypeName.FLOAT);
 ((FloatStatistics) statistics).setMinMax(min, max);
 return statistics;
}
origin: org.apache.parquet/parquet-column

 @Override
 public Statistics<?> build() {
  FloatStatistics stats = (FloatStatistics) super.build();
  if (stats.hasNonNullValue()) {
   Float min = stats.genericGetMin();
   Float max = stats.genericGetMax();
   // Drop min/max values in case of NaN as the sorting order of values is undefined for this case
   if (min.isNaN() || max.isNaN()) {
    stats.setMinMax(0.0f, 0.0f);
    ((Statistics<?>) stats).hasNonNullValue = false;
   } else {
    // Updating min to -0.0 and max to +0.0 to ensure that no 0.0 values would be skipped
    if (Float.compare(min, 0.0f) == 0) {
     min = -0.0f;
     stats.setMinMax(min, max);
    }
    if (Float.compare(max, -0.0f) == 0) {
     max = 0.0f;
     stats.setMinMax(min, max);
    }
   }
  }
  return stats;
 }
}
origin: org.lasersonlab.apache.parquet/parquet-column

 @Override
 public Statistics<?> build() {
  FloatStatistics stats = (FloatStatistics) super.build();
  if (stats.hasNonNullValue()) {
   Float min = stats.genericGetMin();
   Float max = stats.genericGetMax();
   // Drop min/max values in case of NaN as the sorting order of values is undefined for this case
   if (min.isNaN() || max.isNaN()) {
    stats.setMinMax(0.0f, 0.0f);
    ((Statistics<?>) stats).hasNonNullValue = false;
   } else {
    // Updating min to -0.0 and max to +0.0 to ensure that no 0.0 values would be skipped
    if (Float.compare(min, 0.0f) == 0) {
     min = -0.0f;
     stats.setMinMax(min, max);
    }
    if (Float.compare(max, -0.0f) == 0) {
     max = 0.0f;
     stats.setMinMax(min, max);
    }
   }
  }
  return stats;
 }
}
origin: prestosql/presto

private static FloatStatistics floatColumnStats(float minimum, float maximum)
{
  FloatStatistics statistics = new FloatStatistics();
  statistics.setMinMax(minimum, maximum);
  return statistics;
}
origin: org.apache.drill.exec/drill-java-exec

 break;
case FLOAT4:
 ((FloatStatistics) stat).setMinMax(Float.parseFloat(min.toString()), Float.parseFloat(max.toString()));
 break;
case FLOAT8:
org.apache.parquet.column.statisticsFloatStatisticssetMinMax

Popular methods of FloatStatistics

  • getMax
  • getMin
  • <init>
  • genericGetMax
  • genericGetMin
  • comparator
  • getNumNulls
  • hasNonNullValue
  • initializeStats
  • markAsNotEmpty
  • setNumNulls
  • type
  • setNumNulls,
  • type,
  • updateStats

Popular in Java

  • Finding current android device location
  • setRequestProperty (URLConnection)
  • getContentResolver (Context)
  • notifyDataSetChanged (ArrayAdapter)
  • BufferedImage (java.awt.image)
    The BufferedImage subclass describes an java.awt.Image with an accessible buffer of image data. All
  • Kernel (java.awt.image)
  • BufferedInputStream (java.io)
    A BufferedInputStream adds functionality to another input stream-namely, the ability to buffer the i
  • OutputStream (java.io)
    A writable sink for bytes.Most clients will use output streams that write data to the file system (
  • SortedSet (java.util)
    SortedSet is a Set which iterates over its elements in a sorted order. The order is determined eithe
  • Manifest (java.util.jar)
    The Manifest class is used to obtain attribute information for a JarFile and its entries.
  • CodeWhisperer alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now