Examples of TypeInfo


Examples of org.apache.cassandra.db.TypeInfo

        indexIn.reset(indexOut.getData(), indexOut.getLength());
        String columnName;
        int position;
        int numCols;
       
        TypeInfo typeInfo = DatabaseDescriptor.getTypeInfo(cfName);
        if ( DatabaseDescriptor.getColumnFamilyType(cfName).equals("Super") || DatabaseDescriptor.isNameSortingEnabled(cfName) )
        {
            typeInfo = TypeInfo.STRING;
        }
       
View Full Code Here

Examples of org.apache.cxf.jaxrs.ext.search.Beanspector.TypeInfo

   
    private TypeInfoObject parseType(String originalName, String setter, String value) throws SearchParseException {
        String name = getSetter(setter);
       
        try {
            TypeInfo typeInfo =
                beanspector != null ? beanspector.getAccessorTypeInfo(name)
                    : new TypeInfo(String.class, String.class);
            Object object = parseType(originalName, null, null, setter, typeInfo, value);
            return new TypeInfoObject(object, typeInfo);
        } catch (Exception e) {
            throw new SearchParseException(e);
        }
View Full Code Here

Examples of org.apache.cxf.service.model.TypeInfo

    public void testSchema() {
        XmlSchemaCollection schemas = serviceInfo.getProperty(WSDLServiceBuilder.WSDL_SCHEMA_LIST,
                XmlSchemaCollection.class);
        assertNotNull(schemas);
        TypeInfo typeInfo = serviceInfo.getTypeInfo();
        assertNotNull(typeInfo);
        assertEquals(typeInfo.getSchemas().size(), 1);
        SchemaInfo schemaInfo = typeInfo.getSchemas().iterator().next();
        assertNotNull(schemaInfo);
        assertEquals(schemaInfo.getNamespaceURI(), "http://apache.org/hello_world_soap_http/types");
        assertEquals(schemas.read(schemaInfo.getElement()).getTargetNamespace(),
                "http://apache.org/hello_world_soap_http/types");
        // add below code to test the creation of javax.xml.validation.Schema
View Full Code Here

Examples of org.apache.geronimo.axis.client.TypeInfo

       
        // one must register the TypeDesc before to deserialize the JavaServiceDesc
        // as it contains a bunch of BeanXXXFactory instances which need
        // them registered to properly recreate the state of the factories.
        for (Iterator iter = typeInfo.iterator(); iter.hasNext();) {
            TypeInfo info = (TypeInfo) iter.next();
            TypeDesc.registerTypeDescForClass(info.getClazz(), info.buildTypeDesc());
        }
       
        serviceDesc = (JavaServiceDesc) in.readObject();
    }
View Full Code Here

Examples of org.apache.hadoop.hive.ql.typeinfo.TypeInfo

      exprNodeConstantDesc fieldName = (exprNodeConstantDesc)children.get(1);
      assert(fieldName.getValue() instanceof String);
     
      // Calculate result TypeInfo
      String fieldNameString = (String)fieldName.getValue();
      TypeInfo objectTypeInfo = object.getTypeInfo();
     
      // Allow accessing a field of list element structs directly from a list 
      boolean isList = (object.getTypeInfo().getCategory() == ObjectInspector.Category.LIST);
      if (isList) {
        objectTypeInfo = objectTypeInfo.getListElementTypeInfo();
      }
      if (objectTypeInfo.getCategory() != Category.STRUCT) {
        throw new SemanticException(ErrorMsg.INVALID_DOT.getMsg(expr));
      }
      TypeInfo t = objectTypeInfo.getStructFieldTypeInfo(fieldNameString);
      if (isList) {
        t = TypeInfoFactory.getListTypeInfo(t);
      }
     
      desc = new exprNodeFieldDesc(t, children.get(0), fieldNameString, isList);
     
    } else if (funcText.equals("[")){
      // "[]" : LSQUARE/INDEX Expression
      assert(children.size() == 2);
     
      // Check whether this is a list or a map
      TypeInfo myt = children.get(0).getTypeInfo();

      if (myt.getCategory() == Category.LIST) {
        // Only allow constant integer index for now
        if (!(children.get(1) instanceof exprNodeConstantDesc)
            || !(((exprNodeConstantDesc)children.get(1)).getValue() instanceof Integer)) {
          throw new SemanticException(ErrorMsg.INVALID_ARRAYINDEX_CONSTANT.getMsg(expr));
        }
     
        // Calculate TypeInfo
        TypeInfo t = myt.getListElementTypeInfo();
        desc = new exprNodeIndexDesc(t, children.get(0), children.get(1));
      }
      else if (myt.getCategory() == Category.MAP) {
        // Only allow only constant indexes for now
        if (!(children.get(1) instanceof exprNodeConstantDesc)) {
          throw new SemanticException(ErrorMsg.INVALID_MAPINDEX_CONSTANT.getMsg(expr));
        }
        if (!(((exprNodeConstantDesc)children.get(1)).getValue().getClass() ==
              myt.getMapKeyTypeInfo().getPrimitiveClass())) {
          throw new SemanticException(ErrorMsg.INVALID_MAPINDEX_TYPE.getMsg(expr));
        }
        // Calculate TypeInfo
        TypeInfo t = myt.getMapValueTypeInfo();
       
        desc = new exprNodeIndexDesc(t, children.get(0), children.get(1));
      }
      else {
        throw new SemanticException(ErrorMsg.NON_COLLECTION_TYPE.getMsg(expr));
View Full Code Here

Examples of org.apache.hadoop.hive.serde2.typeinfo.TypeInfo

    assertEquals(st1, st2);
  }

  @Test
  public void testInspectorFromTypeInfo() throws Exception {
    TypeInfo typeInfo =
        TypeInfoUtils.getTypeInfoFromTypeString("struct<c1:boolean,c2:tinyint" +
            ",c3:smallint,c4:int,c5:bigint,c6:float,c7:double,c8:binary," +
            "c9:string,c10:struct<c1:int>,c11:map<int,int>,c12:uniontype<int>" +
            ",c13:array<timestamp>>");
    StructObjectInspector inspector = (StructObjectInspector)
View Full Code Here

Examples of org.apache.hadoop.hive.serde2.typeinfo.TypeInfo

    public void verify(DmdlSemantics environment, ModelDeclaration declaration, AstAttribute attribute) {
        for (PropertyDeclaration property : declaration.getDeclaredProperties()) {
            if (HiveFieldTrait.get(property).isColumnPresent() == false) {
                continue;
            }
            TypeInfo typeInfo = HiveFieldTrait.getTypeInfo(property);
            if ((typeInfo instanceof PrimitiveTypeInfo) == false) {
                environment.report(new Diagnostic(Diagnostic.Level.ERROR,
                        property.getOriginalAst(),
                        Messages.getString("OrcFileDriver.diagnosticUnsupportedPropertyType"), //$NON-NLS-1$
                        typeInfo.getQualifiedName(),
                        property.getName().identifier,
                        property.getType()));
            }
        }
    }
View Full Code Here

Examples of org.apache.hadoop.hive.serde2.typeinfo.TypeInfo

        }
        if (model.getTrait(HiveDataModelTrait.class) == null) {
            return Collections.emptyList();
        }
        String name = HiveFieldTrait.getColumnName(property);
        TypeInfo type = HiveFieldTrait.getTypeInfo(property);
        boolean present = HiveFieldTrait.get(property).isColumnPresent();
        ModelFactory f = context.getModelFactory();
        return new AttributeBuilder(f)
            .annotation(context.resolve(HiveField.class),
                    "name", Models.toLiteral(f, name), //$NON-NLS-1$
                    "type", Models.toLiteral(f, type.getQualifiedName()), //$NON-NLS-1$
                    "ignore", Models.toLiteral(f, present == false)) //$NON-NLS-1$
            .toAnnotations();
    }
View Full Code Here

Examples of org.apache.hadoop.hive.serde2.typeinfo.TypeInfo

        for (PropertyDeclaration property : declaration.getDeclaredProperties()) {
            if (HiveFieldTrait.get(property).isColumnPresent() == false) {
                continue;
            }
            Class<?> valueClass = EmitContext.getFieldTypeAsClass(property);
            TypeInfo typeInfo = HiveFieldTrait.getTypeInfo(property);
            ParquetValueDriver driver = ParquetValueDrivers.find(typeInfo, valueClass);
            if (driver == null) {
                environment.report(new Diagnostic(Diagnostic.Level.ERROR,
                        property.getOriginalAst(),
                        Messages.getString("ParquetFileDriver.diagnosticUnsupportedPropertyType"), //$NON-NLS-1$
                        typeInfo.getQualifiedName(),
                        property.getName().identifier,
                        property.getType()));
            }
        }
    }
View Full Code Here

Examples of org.apache.imperius.spl.core.TypeInfo

   
    public boolean validate() throws SPLException
    {
        logger.entering(sourceClass,Thread.currentThread().getName()+" "+ "validate");

        TypeInfo eType = _exp.getType();
       
      
        if (!eType.getIsArray() && TypeResolver.isCalendar(eType))
        {
            logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "validate");
            _dataType.setType(TypeConstants.intType);
            return true;
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.