Codota Logo
ATypeTag.equals
Code IndexAdd Codota to your IDE (free)

How to use
equals
method
in
org.apache.asterix.om.types.ATypeTag

Best Java code snippets using org.apache.asterix.om.types.ATypeTag.equals (Showing top 15 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
List l =
  • Codota Iconnew LinkedList()
  • Codota IconCollections.emptyList()
  • Codota Iconnew ArrayList()
  • Smart code suggestions by Codota
}
origin: apache/asterixdb

public static IAType getDefaultOpenFieldType(ATypeTag tag) {
  if (tag.equals(ATypeTag.OBJECT))
    return NESTED_OPEN_RECORD_TYPE;
  if (tag.equals(ATypeTag.ARRAY))
    return NESTED_OPEN_AORDERED_LIST_TYPE;
  if (tag.equals(ATypeTag.MULTISET))
    return NESTED_OPEN_AUNORDERED_LIST_TYPE;
  else
    return null;
}
origin: apache/asterixdb

@Override
public boolean deepEqual(IAObject obj) {
  if (obj == this) {
    return true;
  }
  if (!(obj instanceof BuiltinType)) {
    return false;
  }
  return ((BuiltinType) obj).getTypeTag().equals(getTypeTag());
}
origin: apache/asterixdb

@Override
public Void visit(ARecordVisitablePointable accessor, Triple<IVisitablePointable, IAType, Boolean> arg)
    throws HyracksDataException {
  ARecordCaster caster = raccessorToCaster.get(accessor);
  if (caster == null) {
    caster = new ARecordCaster();
    raccessorToCaster.put(accessor, caster);
  }
  if (arg.second.getTypeTag().equals(ATypeTag.ANY)) {
    arg.second = DefaultOpenFieldType.NESTED_OPEN_RECORD_TYPE;
  }
  ARecordType resultType = (ARecordType) arg.second;
  caster.castRecord(accessor, arg.first, resultType, this);
  return null;
}
origin: apache/asterixdb

/**
 * allocate closed part value pointable
 *
 * @param type
 * @return the pointable object
 */
public IVisitablePointable allocateFieldValue(IAType type) {
  if (type == null)
    return flatValueAllocator.allocate(null);
  else if (type.getTypeTag().equals(ATypeTag.OBJECT))
    return recordValueAllocator.allocate(type);
  else if (type.getTypeTag().equals(ATypeTag.MULTISET) || type.getTypeTag().equals(ATypeTag.ARRAY))
    return listValueAllocator.allocate(type);
  else
    return flatValueAllocator.allocate(null);
}
origin: apache/asterixdb

@Override
public Void visit(AListVisitablePointable accessor, Triple<IVisitablePointable, IAType, Boolean> arg)
    throws HyracksDataException {
  AListCaster caster = laccessorToCaster.get(accessor);
  if (caster == null) {
    caster = new AListCaster();
    laccessorToCaster.put(accessor, caster);
  }
  if (arg.second.getTypeTag().equals(ATypeTag.ANY)) {
    arg.second = accessor.ordered() ? DefaultOpenFieldType.NESTED_OPEN_AORDERED_LIST_TYPE
        : DefaultOpenFieldType.NESTED_OPEN_AUNORDERED_LIST_TYPE;
  }
  caster.castList(accessor, arg.first, (AbstractCollectionType) arg.second, this);
  return null;
}
origin: apache/asterixdb

  @Override
  public void infer(ILogicalExpression expr, IFunctionDescriptor fd, IVariableTypeEnvironment context,
      CompilerProperties compilerProps) throws AlgebricksException {
    AbstractFunctionCallExpression fce = (AbstractFunctionCallExpression) expr;
    IAType t = (IAType) context.getType(fce.getArguments().get(0).getValue());
    ATypeTag typeTag = t.getTypeTag();
    if (typeTag.equals(ATypeTag.OBJECT)) {
      fd.setImmutableStates(t);
    } else if (typeTag.equals(ATypeTag.ANY)) {
      fd.setImmutableStates(RecordUtil.FULLY_OPEN_RECORD_TYPE);
    } else {
      throw new NotImplementedException("parse-geojson for data of type " + t);
    }
  }
}
origin: apache/asterixdb

  @Override
  public void infer(ILogicalExpression expr, IFunctionDescriptor fd, IVariableTypeEnvironment context,
      CompilerProperties compilerProps) throws AlgebricksException {
    AbstractFunctionCallExpression f = (AbstractFunctionCallExpression) expr;
    IAType outType = (IAType) context.getType(expr);
    IAType type0 = (IAType) context.getType(f.getArguments().get(0).getValue());
    ILogicalExpression le = f.getArguments().get(1).getValue();
    IAType type1 = (IAType) context.getType(le);
    if (type0.getTypeTag().equals(ATypeTag.ANY)) {
      type0 = DefaultOpenFieldType.NESTED_OPEN_RECORD_TYPE;
    }
    if (type1.getTypeTag().equals(ATypeTag.ANY)) {
      type1 = DefaultOpenFieldType.NESTED_OPEN_AORDERED_LIST_TYPE;
    }
    fd.setImmutableStates(outType, type0, type1);
  }
}
origin: apache/asterixdb

  @Override
  public void infer(ILogicalExpression expr, IFunctionDescriptor fd, IVariableTypeEnvironment context,
      CompilerProperties compilerProps) throws AlgebricksException {
    AbstractFunctionCallExpression f = (AbstractFunctionCallExpression) expr;
    IAType outType = (IAType) context.getType(expr);
    IAType type0 = (IAType) context.getType(f.getArguments().get(0).getValue());
    ILogicalExpression listExpr = f.getArguments().get(1).getValue();
    IAType type1 = (IAType) context.getType(listExpr);
    if (type0.getTypeTag().equals(ATypeTag.ANY)) {
      type0 = DefaultOpenFieldType.NESTED_OPEN_RECORD_TYPE;
    }
    if (type1.getTypeTag().equals(ATypeTag.ANY)) {
      type1 = DefaultOpenFieldType.NESTED_OPEN_AORDERED_LIST_TYPE;
    }
    fd.setImmutableStates(outType, type0, type1);
  }
}
origin: apache/asterixdb

/**
 * @param subFieldName
 *            The full pathname of the child
 * @return the type of the child
 * @throws AsterixException
 */
public IAType getSubFieldType(List<String> subFieldName) throws AlgebricksException {
  IAType subRecordType = getFieldType(subFieldName.get(0));
  for (int i = 1; i < subFieldName.size(); i++) {
    if (subRecordType == null) {
      return null;
    }
    if (subRecordType.getTypeTag().equals(ATypeTag.UNION)) {
      //enforced SubType
      subRecordType = ((AUnionType) subRecordType).getActualType();
      if (subRecordType.getTypeTag() != ATypeTag.OBJECT) {
        throw new AsterixException(
            "Field accessor is not defined for values of type " + subRecordType.getTypeTag());
      }
    }
    subRecordType = ((ARecordType) subRecordType).getFieldType(subFieldName.get(i));
  }
  return subRecordType;
}
origin: apache/asterixdb

public void castList(AListVisitablePointable listAccessor, IVisitablePointable resultAccessor,
    AbstractCollectionType reqType, ACastVisitor visitor) throws HyracksDataException {
  if (reqType.getTypeTag().equals(ATypeTag.MULTISET)) {
    unOrderedListBuilder.reset(reqType);
    reqItemType = reqType.getItemType();
  if (reqType.getTypeTag().equals(ATypeTag.ARRAY)) {
    orderedListBuilder.reset(reqType);
    reqItemType = reqType.getItemType();
    ATypeTag typeTag = EnumDeserializer.ATYPETAGDESERIALIZER
        .deserialize(itemTypeTag.getByteArray()[itemTypeTag.getStartOffset()]);
    if (reqItemType == null || reqItemType.getTypeTag().equals(ATypeTag.ANY)) {
      itemVisitorArg.second = DefaultOpenFieldType.getDefaultOpenFieldType(typeTag);
    } else {
    if (reqType.getTypeTag().equals(ATypeTag.ARRAY)) {
      orderedListBuilder.addItem(itemVisitorArg.first);
    if (reqType.getTypeTag().equals(ATypeTag.MULTISET)) {
      unOrderedListBuilder.addItem(itemVisitorArg.first);
  if (reqType.getTypeTag().equals(ATypeTag.ARRAY)) {
    orderedListBuilder.write(dataDos, true);
  if (reqType.getTypeTag().equals(ATypeTag.MULTISET)) {
    unOrderedListBuilder.write(dataDos, true);
origin: apache/asterixdb

if (subRecordType.getTypeTag().equals(ATypeTag.UNION)) {
  if (NonTaggedFormatUtil.isOptional(subRecordType)) {
    return true;
origin: apache/asterixdb

} else if (inputType.getTypeTag().equals(ATypeTag.OBJECT)) {
  if (reqType.equals(BuiltinType.ANY)) {
    reqType = DefaultOpenFieldType.NESTED_OPEN_RECORD_TYPE;
origin: apache/asterixdb

if (typeTag == null)
  return flatValueAllocator.allocate(null);
else if (typeTag.equals(ATypeTag.OBJECT))
  return recordValueAllocator.allocate(DefaultOpenFieldType.NESTED_OPEN_RECORD_TYPE);
else if (typeTag.equals(ATypeTag.MULTISET)) {
  ATypeTag listItemType = EnumDeserializer.ATYPETAGDESERIALIZER.deserialize(b[offset]);
  if (listItemType == ATypeTag.ANY)
          unorederedListTypeAllocator.allocate(TypeTagUtil.getBuiltinTypeByTag(listItemType)));
} else if (typeTag.equals(ATypeTag.ARRAY)) {
  ATypeTag listItemType = EnumDeserializer.ATYPETAGDESERIALIZER.deserialize(b[offset]);
  if (listItemType == ATypeTag.ANY)
origin: apache/asterixdb

if (fieldValueType.getTypeTag().equals(ATypeTag.UNION)) {
  if (((AUnionType) fieldValueType).isUnknownableType()) {
    fieldValueTypeTag = ((AUnionType) fieldValueType).getActualType().getTypeTag();
origin: apache/asterixdb

if (subType.getTypeTag().equals(ATypeTag.UNION)) {
if (subType.getTypeTag().equals(ATypeTag.UNION)) {
  subTypeTag = ((AUnionType) subType).getActualType().getTypeTag();
  subFieldLength = NonTaggedFormatUtil.getFieldValueLength(serRecord, subFieldOffset,
org.apache.asterix.om.typesATypeTagequals

Popular methods of ATypeTag

  • serialize
  • isDerivedType
  • ordinal
  • isListType
  • toString
  • hashCode
  • name
  • values

Popular in Java

  • Creating JSON documents from java classes using gson
  • notifyDataSetChanged (ArrayAdapter)
  • getSystemService (Context)
  • getExternalFilesDir (Context)
  • GridLayout (java.awt)
    The GridLayout class is a layout manager that lays out a container's components in a rectangular gri
  • BufferedReader (java.io)
    Reads text from a character-input stream, buffering characters so as to provide for the efficient re
  • MalformedURLException (java.net)
    Thrown to indicate that a malformed URL has occurred. Either no legal protocol could be found in a s
  • Logger (org.apache.log4j)
    This is the central class in the log4j package. Most logging operations, except configuration, are d
  • DateTimeFormat (org.joda.time.format)
    Factory that creates instances of DateTimeFormatter from patterns and styles. Datetime formatting i
  • Location (org.springframework.beans.factory.parsing)
    Class that models an arbitrary location in a Resource.Typically used to track the location of proble
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now