public void writeToFuncArgs(List<Mutable<ILogicalExpression>> funcArgs) { funcArgs.add(new MutableObject<>(AccessMethodUtils.createStringConstant(indexName))); funcArgs.add(new MutableObject<>(AccessMethodUtils.createInt32Constant(indexType.ordinal()))); funcArgs.add(new MutableObject<>(AccessMethodUtils.createStringConstant(dataverseName))); funcArgs.add(new MutableObject<>(AccessMethodUtils.createStringConstant(datasetName))); funcArgs.add(new MutableObject<>(AccessMethodUtils.createBooleanConstant(retainInput))); funcArgs.add(new MutableObject<>(AccessMethodUtils.createBooleanConstant(requiresBroadcast))); }
private static int[] secondaryFilterFields(Dataset dataset, Index index, ITypeTraits[] filterTypeTraits) throws CompilationException { if (filterTypeTraits == null) { return empty; } int numPrimaryKeys = dataset.getPrimaryKeys().size(); int numSecondaryKeys = index.getKeyFieldNames().size(); switch (index.getIndexType()) { case BTREE: return new int[] { numPrimaryKeys + numSecondaryKeys }; case RTREE: case LENGTH_PARTITIONED_NGRAM_INVIX: case LENGTH_PARTITIONED_WORD_INVIX: case SINGLE_PARTITION_NGRAM_INVIX: case SINGLE_PARTITION_WORD_INVIX: break; default: throw new CompilationException(ErrorCode.COMPILATION_UNKNOWN_INDEX_TYPE, index.getIndexType().toString()); } return empty; }
public void readFromFuncArgs(List<Mutable<ILogicalExpression>> funcArgs) { indexName = AccessMethodUtils.getStringConstant(funcArgs.get(0)); indexType = IndexType.values()[AccessMethodUtils.getInt32Constant(funcArgs.get(1))]; dataverseName = AccessMethodUtils.getStringConstant(funcArgs.get(2)); datasetName = AccessMethodUtils.getStringConstant(funcArgs.get(3)); retainInput = AccessMethodUtils.getBooleanConstant(funcArgs.get(4)); requiresBroadcast = AccessMethodUtils.getBooleanConstant(funcArgs.get(5)); isPrimaryIndex = datasetName.equals(indexName); }
aString.setValue(instance.getIndexType().toString()); stringSerde.serialize(aString, fieldValue.getDataOutput()); recordBuilder.addField(MetadataRecordTypes.INDEX_ARECORD_INDEXSTRUCTURE_FIELD_INDEX, fieldValue);
((AString) rec.getValueByPos(MetadataRecordTypes.INDEX_ARECORD_INDEXNAME_FIELD_INDEX)).getStringValue(); IndexType indexStructure = IndexType .valueOf(((AString) rec.getValueByPos(MetadataRecordTypes.INDEX_ARECORD_INDEXSTRUCTURE_FIELD_INDEX)) .getStringValue()); IACursor fieldNameCursor =
index.getIndexType().name(), dataset.getDatasetType());
default: throw new CompilationException(ErrorCode.COMPILATION_UNKNOWN_INDEX_TYPE, index.getIndexType().toString());