Exemplo n.º 1
0
        /// <summary>
        /// Constructor for the Row class.
        /// </summary>
        /// <param name="values">Column values for a row</param>
        /// <param name="schema">Schema associated with a row</param>
        internal Row(object[] values, StructType schema)
        {
            _genericRow = new GenericRow(values);
            Schema      = schema;

            int schemaColumnCount = Schema.Fields.Count;

            if (Size() != schemaColumnCount)
            {
                throw new Exception(
                          $"Column count mismatches: data:{Size()}, schema:{schemaColumnCount}");
            }

            Convert();
        }
Exemplo n.º 2
0
 /// <summary>
 /// Constructor for the schema-less Row class used for chained UDFs.
 /// </summary>
 /// <param name="genericRow">GenericRow object</param>
 internal Row(GenericRow genericRow)
 {
     _genericRow = genericRow;
 }