public StringWriter(bool shouldAlignLengths, bool shouldAlignDictionaryLookup, double uniqueStringThresholdRatio, long strideLength, OrcCompressedBufferFactory bufferFactory, uint columnId) { _shouldAlignLengths = shouldAlignLengths; _shouldAlignDictionaryLookup = shouldAlignDictionaryLookup; _uniqueStringThresholdRatio = uniqueStringThresholdRatio; _strideLength = strideLength; ColumnId = columnId; _presentBuffer = bufferFactory.CreateBuffer(StreamKind.Present); _presentBuffer.MustBeIncluded = false; _dataBuffer = bufferFactory.CreateBuffer(StreamKind.Data); _lengthBuffer = bufferFactory.CreateBuffer(StreamKind.Length); _dictionaryDataBuffer = bufferFactory.CreateBuffer(StreamKind.DictionaryData); }
public StripeWriter(Type pocoType, Stream outputStream, bool shouldAlignNumericValues, double uniqueStringThresholdRatio, int defaultDecimalPrecision, int defaultDecimalScale, OrcCompressedBufferFactory bufferFactory, int strideLength, long stripeLength) { _typeName = pocoType.Name; _outputStream = outputStream; _shouldAlignNumericValues = shouldAlignNumericValues; _uniqueStringThresholdRatio = uniqueStringThresholdRatio; _defaultDecimalPrecision = defaultDecimalPrecision; _defaultDecimalScale = defaultDecimalScale; _bufferFactory = bufferFactory; _strideLength = strideLength; _stripeLength = stripeLength; CreateColumnWriters(pocoType); }
public OrcWriter(Stream outputStream, WriterConfiguration configuration) { _outputStream = outputStream; _bufferFactory = new OrcCompressedBufferFactory(configuration); _stripeWriter = new StripeWriter( typeof(T), outputStream, configuration.EncodingStrategy == EncodingStrategy.Speed, configuration.DictionaryKeySizeThreshold, configuration.DefaultDecimalPrecision, configuration.DefaultDecimalScale, _bufferFactory, configuration.RowIndexStride, configuration.StripeSize ); WriteHeader(); }
public DecimalWriter(bool isNullable, bool shouldAlignEncodedValues, int precision, int scale, OrcCompressedBufferFactory bufferFactory, uint columnId) { _isNullable = isNullable; _shouldAlignEncodedValues = shouldAlignEncodedValues; _scale = scale; ColumnId = columnId; if (precision > 18) { throw new NotSupportedException( "This implementation of DecimalWriter does not support precision greater than 18 digits (2^63)"); } if (_isNullable) { _presentBuffer = bufferFactory.CreateBuffer(StreamKind.Present); _presentBuffer.MustBeIncluded = false; } _dataBuffer = bufferFactory.CreateBuffer(StreamKind.Data); _secondaryBuffer = bufferFactory.CreateBuffer(StreamKind.Secondary); }
//Assume all root values are present public StructWriter(OrcCompressedBufferFactory bufferFactory, uint columnId) { ColumnId = columnId; }