internal static ColumnWriter Create(IntPtr handle, RowGroupWriter rowGroupWriter, int columnIndex) { var type = ExceptionInfo.Return <PhysicalType>(handle, ColumnWriter_Type); switch (type) { case PhysicalType.Boolean: return(new ColumnWriter <bool>(handle, rowGroupWriter, columnIndex)); case PhysicalType.Int32: return(new ColumnWriter <int>(handle, rowGroupWriter, columnIndex)); case PhysicalType.Int64: return(new ColumnWriter <long>(handle, rowGroupWriter, columnIndex)); case PhysicalType.Int96: return(new ColumnWriter <Int96>(handle, rowGroupWriter, columnIndex)); case PhysicalType.Float: return(new ColumnWriter <float>(handle, rowGroupWriter, columnIndex)); case PhysicalType.Double: return(new ColumnWriter <double>(handle, rowGroupWriter, columnIndex)); case PhysicalType.ByteArray: return(new ColumnWriter <ByteArray>(handle, rowGroupWriter, columnIndex)); case PhysicalType.FixedLenByteArray: return(new ColumnWriter <FixedLenByteArray>(handle, rowGroupWriter, columnIndex)); default: throw new NotSupportedException($"Physical type {type} is not supported"); } }
internal ColumnWriter(IntPtr handle, RowGroupWriter rowGroupWriter, int columnIndex) { Handle = handle; RowGroupWriter = rowGroupWriter; ColumnIndex = columnIndex; }