Tabnine Logo
ATypeTag.equals
Code IndexAdd Tabnine 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)

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

  • Reactive rest calls using spring rest template
  • putExtra (Intent)
  • getSupportFragmentManager (FragmentActivity)
  • getApplicationContext (Context)
  • BigDecimal (java.math)
    An immutable arbitrary-precision signed decimal.A value is represented by an arbitrary-precision "un
  • Charset (java.nio.charset)
    A charset is a named mapping between Unicode characters and byte sequences. Every Charset can decode
  • Permission (java.security)
    Legacy security code; do not use.
  • GregorianCalendar (java.util)
    GregorianCalendar is a concrete subclass of Calendarand provides the standard calendar used by most
  • ConcurrentHashMap (java.util.concurrent)
    A plug-in replacement for JDK1.5 java.util.concurrent.ConcurrentHashMap. This version is based on or
  • Notification (javax.management)
  • Github Copilot 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