public MetadataPpdResult deepCopy() { return new MetadataPpdResult(this); }
/** * Performs a deep copy on <i>other</i>. */ public GetFileMetadataByExprResult(GetFileMetadataByExprResult other) { __isset_bitfield = other.__isset_bitfield; if (other.isSetMetadata()) { Map<Long,MetadataPpdResult> __this__metadata = new HashMap<Long,MetadataPpdResult>(other.metadata.size()); for (Map.Entry<Long, MetadataPpdResult> other_element : other.metadata.entrySet()) { Long other_element_key = other_element.getKey(); MetadataPpdResult other_element_value = other_element.getValue(); Long __this__metadata_copy_key = other_element_key; MetadataPpdResult __this__metadata_copy_value = new MetadataPpdResult(other_element_value); __this__metadata.put(__this__metadata_copy_key, __this__metadata_copy_value); } this.metadata = __this__metadata; } this.isSupported = other.isSupported; }
_val814 = new MetadataPpdResult(); _val814.read(iprot); struct.metadata.put(_key813, _val814);
@Override public void read(org.apache.thrift.protocol.TProtocol prot, GetFileMetadataByExprResult struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; { org.apache.thrift.protocol.TMap _map818 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.I64, org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); struct.metadata = new HashMap<Long,MetadataPpdResult>(2*_map818.size); long _key819; MetadataPpdResult _val820; for (int _i821 = 0; _i821 < _map818.size; ++_i821) { _key819 = iprot.readI64(); _val820 = new MetadataPpdResult(); _val820.read(iprot); struct.metadata.put(_key819, _val820); } } struct.setMetadataIsSet(true); struct.isSupported = iprot.readBool(); struct.setIsSupportedIsSet(true); } }
@Override public Iterator<Entry<Long, MetadataPpdResult>> getFileMetadataByExpr( List<Long> fileIds, ByteBuffer sarg, boolean doGetFooters) throws HiveException { getByExprCount.incrementAndGet(); ByteBuffer[] metadatas = new ByteBuffer[fileIds.size()]; ByteBuffer[] ppdResults = new ByteBuffer[fileIds.size()]; boolean[] eliminated = new boolean[fileIds.size()]; try { byte[] bb = new byte[sarg.remaining()]; System.arraycopy(sarg.array(), sarg.arrayOffset(), bb, 0, sarg.remaining()); handler.getFileMetadataByExpr(fileIds, bb, metadatas, ppdResults, eliminated); } catch (IOException e) { throw new HiveException(e); } Map<Long, MetadataPpdResult> result = new HashMap<>(); for (int i = 0; i < metadatas.length; ++i) { long fileId = fileIds.get(i); ByteBuffer metadata = metadatas[i]; if (metadata == null) continue; getHitByExprCount.incrementAndGet(); metadata = eliminated[i] ? null : metadata; MetadataPpdResult mpr = new MetadataPpdResult(); ByteBuffer bitset = eliminated[i] ? null : ppdResults[i]; mpr.setMetadata(doGetFooters ? metadata : null); mpr.setIncludeBitset(bitset); result.put(fileId, mpr); } return result.entrySet().iterator(); }
MetadataPpdResult mpr = new MetadataPpdResult(); ByteBuffer ppdResult = eliminated[i] ? null : handleReadOnlyBufferForThrift(ppdResults[i]); mpr.setIncludeBitset(ppdResult);
public MetadataPpdResult deepCopy() { return new MetadataPpdResult(this); }
/** * Performs a deep copy on <i>other</i>. */ public GetFileMetadataByExprResult(GetFileMetadataByExprResult other) { __isset_bitfield = other.__isset_bitfield; if (other.isSetMetadata()) { Map<Long,MetadataPpdResult> __this__metadata = new HashMap<Long,MetadataPpdResult>(other.metadata.size()); for (Map.Entry<Long, MetadataPpdResult> other_element : other.metadata.entrySet()) { Long other_element_key = other_element.getKey(); MetadataPpdResult other_element_value = other_element.getValue(); Long __this__metadata_copy_key = other_element_key; MetadataPpdResult __this__metadata_copy_value = new MetadataPpdResult(other_element_value); __this__metadata.put(__this__metadata_copy_key, __this__metadata_copy_value); } this.metadata = __this__metadata; } this.isSupported = other.isSupported; }
_val750 = new MetadataPpdResult(); _val750.read(iprot); struct.metadata.put(_key749, _val750);
@Override public void read(org.apache.thrift.protocol.TProtocol prot, GetFileMetadataByExprResult struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; { org.apache.thrift.protocol.TMap _map754 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.I64, org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); struct.metadata = new HashMap<Long,MetadataPpdResult>(2*_map754.size); long _key755; MetadataPpdResult _val756; for (int _i757 = 0; _i757 < _map754.size; ++_i757) { _key755 = iprot.readI64(); _val756 = new MetadataPpdResult(); _val756.read(iprot); struct.metadata.put(_key755, _val756); } } struct.setMetadataIsSet(true); struct.isSupported = iprot.readBool(); struct.setIsSupportedIsSet(true); } }
MetadataPpdResult mpr = new MetadataPpdResult(); ByteBuffer ppdResult = eliminated[i] ? null : handleReadOnlyBufferForThrift(ppdResults[i]); mpr.setIncludeBitset(ppdResult);