Package org.apache.sqoop.schema.type

Examples of org.apache.sqoop.schema.type.Array


    Type type = Type.valueOf((String) obj.get(TYPE));
    Column output = null;
    switch (type) {
      case ARRAY:
        output = new Array(key);
        break;
      case BINARY:
        output = new Binary().setSize(size);
        break;
      case BIT:
View Full Code Here


*/
public class TestSchemaSerialization {

  @Test
  public void testArray() {
    Schema array = new Schema("array").addColumn(new Array("a", new Decimal()));
    transferAndAssert(array);
  }
View Full Code Here

  }

  @Test
  public void testAllTypes() {
    Schema allTypes = new Schema("all-types")
      .addColumn(new Array("a", new Text()))
      .addColumn(new Binary("b"))
      .addColumn(new Bit("c"))
      .addColumn(new Date("d"))
      .addColumn(new DateTime("e"))
      .addColumn(new Decimal("f"))
View Full Code Here

  }

  @Test
  public void testComplex() {
    Schema complex = new Schema("complex")
      .addColumn(new Map(new Array(new Enum(new Text())), new Set(new Array(new Text()))).setName("a"))
    ;
    transferAndAssert(complex);
  }
View Full Code Here

TOP

Related Classes of org.apache.sqoop.schema.type.Array

Copyright © 2018 www.massapicom. 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.