Examples of SimpleColumnMetadata


Examples of uk.org.ogsadai.tuple.SimpleColumnMetadata

{
    @Test
    public void testSimple() throws Exception
    {
        List<ColumnMetadata> columns = new ArrayList<ColumnMetadata>();
        columns.add(new SimpleColumnMetadata("A", TupleTypes._INT, 0, 0, 0));
        columns.add(new SimpleColumnMetadata("B", TupleTypes._INT, 0, 0, 0));
        TupleMetadata metadata = new SimpleTupleMetadata(columns);
        MockInputPipe dataInput = new MockInputPipe(new Object[] {
                ControlBlock.LIST_BEGIN,
                new MetadataWrapper(metadata),
                new SimpleTuple(Arrays.asList(0, 1)),
View Full Code Here

Examples of uk.org.ogsadai.tuple.SimpleColumnMetadata

   
    @Test
    public void testReplaceNulls() throws Exception
    {
        List<ColumnMetadata> columns = new ArrayList<ColumnMetadata>();
        columns.add(new SimpleColumnMetadata("A", TupleTypes._INT, 0, 0, 0));
        columns.add(new SimpleColumnMetadata("B", TupleTypes._INT, 0, 0, 0));
        TupleMetadata metadata = new SimpleTupleMetadata(columns);
        MockInputPipe dataInput = new MockInputPipe(new Object[] {
                ControlBlock.LIST_BEGIN,
                new MetadataWrapper(metadata),
                new SimpleTuple(Arrays.asList(Null.VALUE, "a")),
View Full Code Here

Examples of uk.org.ogsadai.tuple.SimpleColumnMetadata

          boolean isNumeric = classifiers.get(0).classifier.classIsNumeric();
            mOutput.write(ControlBlock.LIST_BEGIN);
            ColumnMetadata column;
            if (isNumeric)
            {
                column = new SimpleColumnMetadata("class", TupleTypes._DOUBLE, 0, 0, 0);               
            }
            else
            {
                column = new SimpleColumnMetadata("class", TupleTypes._STRING, 0, 0, 0);
            }
           
            TupleMetadata outMetadata = new SimpleTupleMetadata(Collections.singletonList(column));
            mOutput.write(new MetadataWrapper(outMetadata));
            Tuple tuple;
View Full Code Here

Examples of uk.org.ogsadai.tuple.SimpleColumnMetadata

{
    @Test
    public void testSimple() throws Exception
    {
        List<ColumnMetadata> columns = new ArrayList<ColumnMetadata>();
        columns.add(new SimpleColumnMetadata("A", TupleTypes._STRING, 0, 0, 0));
        TupleMetadata metadata = new SimpleTupleMetadata(columns);
        MockInputPipe data1Input = new MockInputPipe(new Object[] {
                ControlBlock.LIST_BEGIN,
                new MetadataWrapper(metadata),
                new SimpleTuple(Arrays.asList("Rupert")),
View Full Code Here

Examples of uk.org.ogsadai.tuple.SimpleColumnMetadata

    public void testSimple() throws Exception
    {
       
        MockInputPipe inputSize = new MockInputPipe(2);
       
        ColumnMetadata colA = new SimpleColumnMetadata("A", TupleTypes._STRING, 0, 0, 0);
        ColumnMetadata colB = new SimpleColumnMetadata("B", TupleTypes._DOUBLE, 0, 0, 0);
        TupleMetadata metadata = new SimpleTupleMetadata(Arrays.asList(colA, colB));
        Tuple tuple1 = new SimpleTuple(Arrays.<Object>asList("Amy", 0));
        Tuple tuple2 = new SimpleTuple(Arrays.<Object>asList("Ally", 1.0));
        Tuple tuple3 = new SimpleTuple(Arrays.<Object>asList("Radek", 2.0));
        Tuple tuple4 = new SimpleTuple(Arrays.<Object>asList("Adrian", 3.0));
View Full Code Here

Examples of uk.org.ogsadai.tuple.SimpleColumnMetadata

    public void testSimple() throws Exception
    {
       
        MockInputPipe inputTemplate = new MockInputPipe("Hello $REPLACE(A)$, hello $REPLACE(B)$!");
       
        ColumnMetadata colA = new SimpleColumnMetadata("A", TupleTypes._STRING, 0, 0, 0);
        ColumnMetadata colB = new SimpleColumnMetadata("B", TupleTypes._DOUBLE, 0, 0, 0);
        TupleMetadata metadata = new SimpleTupleMetadata(Arrays.asList(colA, colB));
        Tuple tuple1 = new SimpleTuple(Arrays.<Object>asList("Amy", 0));
        Tuple tuple2 = new SimpleTuple(Arrays.<Object>asList("Ally", 1.0));
        Tuple tuple3 = new SimpleTuple(Arrays.<Object>asList("Radek", 2.0));
        MockInputPipe inputData = new MockInputPipe(new Object[] {
View Full Code Here

Examples of uk.org.ogsadai.tuple.SimpleColumnMetadata

    public void testUnknownColumn() throws Exception
    {
       
        MockInputPipe inputTemplate = new MockInputPipe("Hello $REPLACE(A)$, hello $REPLACE(B)$!");
       
        ColumnMetadata colA = new SimpleColumnMetadata("A", TupleTypes._STRING, 0, 0, 0);
        TupleMetadata metadata = new SimpleTupleMetadata(Arrays.asList(colA));
        Tuple tuple1 = new SimpleTuple(Arrays.<Object>asList("Amy", 0));
        Tuple tuple2 = new SimpleTuple(Arrays.<Object>asList("Ally", 1.0));
        Tuple tuple3 = new SimpleTuple(Arrays.<Object>asList("Radek", 2.0));
        MockInputPipe inputData = new MockInputPipe(new Object[] {
View Full Code Here

Examples of uk.org.ogsadai.tuple.SimpleColumnMetadata

            throws UnsupportedOperandTypeException
    {
        mChild.configure(metadata);
        int type = mChild.getMetadata().getType();
        mEval = NumericEvaluators.getEvaluator(type);
        mType = new SimpleColumnMetadata(
                null,
                type,
                0,
                ColumnMetadata.COLUMN_NO_NULLS,
                0);
View Full Code Here

Examples of uk.org.ogsadai.tuple.SimpleColumnMetadata

        mChild1.configure(metadata);
        mChild2.configure(metadata);
        ColumnMetadata col1 = mChild1.getMetadata();
        ColumnMetadata col2 = mChild2.getMetadata();
        int type = BinaryExpressionHelper.getType(col1.getType(), col2.getType());
        mType = new SimpleColumnMetadata(
                null,
                type,
                getPrecision(col1.getPrecision(), col2.getPrecision()),
                isNullable(col1.isNullable(), col2.isNullable()),
                0);
View Full Code Here

Examples of uk.org.ogsadai.tuple.SimpleColumnMetadata

    {
        List<ColumnMetadata> cols = new ArrayList<ColumnMetadata>();
        for (int i = 0; i < calc.length; i++)
        {
            ColumnMetadata column =
                new SimpleColumnMetadata(
                        calc[i].getName(),
                        calc[i].getType(),
                        0,
                        ColumnMetadata.COLUMN_NULLABLE,
                        0);
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.