Tabnine Logo
ColumnIO.getIndex
Code IndexAdd Tabnine to your IDE (free)

How to use
getIndex
method
in
org.apache.parquet.io.ColumnIO

Best Java code snippets using org.apache.parquet.io.ColumnIO.getIndex (Showing top 8 results out of 315)

origin: org.apache.parquet/parquet-thrift

@Override
public void start() {
 recordConsumer.startField(value.getName(), value.getIndex());
}
@Override
origin: org.apache.parquet/parquet-thrift

 @Override
 public void end() {
  recordConsumer.endField(key.getName(), key.getIndex());
  currentProtocol = valueProtocol;
 }
});
origin: org.apache.parquet/parquet-thrift

 @Override
 public void writeFieldEnd() throws TException {
  recordConsumer.endField(currentType.getName(), currentType.getIndex());
 }
}
origin: org.apache.parquet/parquet-thrift

@Override
public void start() {
 recordConsumer.startGroup();
 recordConsumer.startField(key.getName(), key.getIndex());
}
@Override
origin: org.apache.parquet/parquet-thrift

 @Override
 public void end() {
  consumed ++;
  recordConsumer.endField(value.getName(), value.getIndex());
  recordConsumer.endGroup();
  if (consumed == countToConsume) {
   currentProtocol = MapWriteProtocol.this;
   consumed = 0;
  } else {
   currentProtocol = keyProtocol;
  }
 }
});
origin: org.apache.parquet/parquet-column

@Override
void setLevels(int r, int d, String[] fieldPath, int[] indexFieldPath, List<ColumnIO> repetition, List<ColumnIO> path) {
 super.setLevels(r, d, fieldPath, indexFieldPath, repetition, path);
 for (ColumnIO child : this.children) {
  String[] newFieldPath = Arrays.copyOf(fieldPath, fieldPath.length + 1);
  int[] newIndexFieldPath = Arrays.copyOf(indexFieldPath, indexFieldPath.length + 1);
  newFieldPath[fieldPath.length] = child.getType().getName();
  newIndexFieldPath[indexFieldPath.length] = child.getIndex();
  List<ColumnIO> newRepetition;
  if (child.getType().isRepetition(REPEATED)) {
   newRepetition = new ArrayList<ColumnIO>(repetition);
   newRepetition.add(child);
  } else {
   newRepetition = repetition;
  }
  List<ColumnIO> newPath = new ArrayList<ColumnIO>(path);
  newPath.add(child);
  child.setLevels(
    // the type repetition level increases whenever there's a possible repetition
    child.getType().isRepetition(REPEATED) ? r + 1 : r,
    // the type definition level increases whenever a field can be missing (not required)
    !child.getType().isRepetition(REQUIRED) ? d + 1 : d,
    newFieldPath,
    newIndexFieldPath,
    newRepetition,
    newPath
    );
 }
}
origin: org.lasersonlab.apache.parquet/parquet-column

@Override
void setLevels(int r, int d, String[] fieldPath, int[] indexFieldPath, List<ColumnIO> repetition, List<ColumnIO> path) {
 super.setLevels(r, d, fieldPath, indexFieldPath, repetition, path);
 for (ColumnIO child : this.children) {
  String[] newFieldPath = Arrays.copyOf(fieldPath, fieldPath.length + 1);
  int[] newIndexFieldPath = Arrays.copyOf(indexFieldPath, indexFieldPath.length + 1);
  newFieldPath[fieldPath.length] = child.getType().getName();
  newIndexFieldPath[indexFieldPath.length] = child.getIndex();
  List<ColumnIO> newRepetition;
  if (child.getType().isRepetition(REPEATED)) {
   newRepetition = new ArrayList<ColumnIO>(repetition);
   newRepetition.add(child);
  } else {
   newRepetition = repetition;
  }
  List<ColumnIO> newPath = new ArrayList<ColumnIO>(path);
  newPath.add(child);
  child.setLevels(
    // the type repetition level increases whenever there's a possible repetition
    child.getType().isRepetition(REPEATED) ? r + 1 : r,
    // the type definition level increases whenever a field can be missing (not required)
    !child.getType().isRepetition(REQUIRED) ? d + 1 : d,
    newFieldPath,
    newIndexFieldPath,
    newRepetition,
    newPath
    );
 }
}
origin: org.apache.parquet/parquet-thrift

@Override
public void writeFieldBegin(TField field) throws TException {
 if (field.type == TType.STOP) {
  return;
 }
 try {
  currentType = thriftFieldIdToParquetField[field.id];
  if (currentType == null) {
   throw new ParquetEncodingException("field " + field.id + " was not found in " + thriftType + " and " + schema.getType());
  }
  final int index = currentType.getIndex();
  recordConsumer.startField(currentType.getName(), index);
  currentProtocol = children[index];
 } catch (ArrayIndexOutOfBoundsException e) {
  throw new ParquetEncodingException("field " + field.id + " was not found in " + thriftType + " and " + schema.getType());
 }
}
org.apache.parquet.ioColumnIOgetIndex

Popular methods of ColumnIO

  • getType
  • getParent
  • getColumnNames
  • getDefinitionLevel
  • getFieldPath
  • getFirst
  • getLast
  • getName
  • getRepetitionLevel
  • setDefinitionLevel
  • setFieldPath
  • setLevels
  • setFieldPath,
  • setLevels,
  • setRepetitionLevel

Popular in Java

  • Start an intent from android
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • putExtra (Intent)
  • setScale (BigDecimal)
  • Component (java.awt)
    A component is an object having a graphical representation that can be displayed on the screen and t
  • MessageDigest (java.security)
    Uses a one-way hash function to turn an arbitrary number of bytes into a fixed-length byte sequence.
  • TreeSet (java.util)
    TreeSet is an implementation of SortedSet. All optional operations (adding and removing) are support
  • ServletException (javax.servlet)
    Defines a general exception a servlet can throw when it encounters difficulty.
  • JButton (javax.swing)
  • Logger (org.slf4j)
    The org.slf4j.Logger interface is the main user entry point of SLF4J API. It is expected that loggin
  • Top PhpStorm plugins
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