Github user kumarvishal09 commented on a diff in the pull request:
https://github.com/apache/carbondata/pull/2872#discussion_r235059766 --- Diff: core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveIntegralCodec.java --- @@ -119,24 +120,34 @@ public ColumnPage decode(byte[] input, int offset, int length) return LazyColumnPage.newPage(page, converter); } - @Override - public void decodeAndFillVector(byte[] input, int offset, int length, - ColumnVectorInfo vectorInfo, BitSet nullBits, boolean isLVEncoded) - throws MemoryException, IOException { - ColumnPage page = null; - if (DataTypes.isDecimal(meta.getSchemaDataType())) { - page = ColumnPage.decompressDecimalPage(meta, input, offset, length); - vectorInfo.decimalConverter = ((DecimalColumnPage) page).getDecimalConverter(); + @Override public void decodeAndFillVector(byte[] input, int offset, int length, + ColumnVectorInfo vectorInfo, BitSet nullBits, boolean isLVEncoded, int pageSize, + ReusableDataBuffer reusableDataBuffer) throws MemoryException, IOException { + Compressor compressor = + CompressorFactory.getInstance().getCompressor(meta.getCompressorName()); + byte[] unCompressData; + if (null != reusableDataBuffer && compressor.supportReusableBuffer()) { + int uncompressedLength = compressor.unCompressedLength(input, offset, length); + unCompressData = reusableDataBuffer.getDataBuffer(uncompressedLength); } else { - page = ColumnPage.decompress(meta, input, offset, length, isLVEncoded); + unCompressData = compressor.unCompressByte(input, offset, length); } - page.setNullBits(nullBits); - converter.decodeAndFillVector(page, vectorInfo); + compressor.rawUncompress(input, offset, length, unCompressData); --- End diff -- Fixed --- |
In reply to this post by qiuchenjian-2
Github user kumarvishal09 commented on a diff in the pull request:
https://github.com/apache/carbondata/pull/2872#discussion_r235059822 --- Diff: core/src/main/java/org/apache/carbondata/core/datastore/ReusableDataBuffer.java --- @@ -0,0 +1,33 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.carbondata.core.datastore; + +public class ReusableDataBuffer { + + private byte[] dataBuffer; + + private int size; + + public byte[] getDataBuffer(int requestedSize) { --- End diff -- ok --- |
In reply to this post by qiuchenjian-2
Github user kumarvishal09 commented on a diff in the pull request:
https://github.com/apache/carbondata/pull/2872#discussion_r235059863 --- Diff: core/src/main/java/org/apache/carbondata/core/datastore/compression/ZstdCompressor.java --- @@ -74,4 +74,16 @@ public long maxCompressedLength(long inputSize) { public boolean supportUnsafe() { return false; } + + @Override public int unCompressedLength(byte[] data, int offset, int length) { + throw new RuntimeException("Unsupported operation Exception"); + } + + @Override public int rawUncompress(byte[] data, int offset, int length, byte[] output) { + throw new RuntimeException("Unsupported operation Exception"); + } + + @Override public boolean supportReusableBuffer() { + return false; --- End diff -- ok --- |
In reply to this post by qiuchenjian-2
Github user kumarvishal09 commented on a diff in the pull request:
https://github.com/apache/carbondata/pull/2872#discussion_r235060209 --- Diff: core/src/main/java/org/apache/carbondata/core/datastore/chunk/reader/MeasureColumnChunkReader.java --- @@ -56,13 +57,14 @@ MeasureRawColumnChunk readRawMeasureChunk(FileReader fileReader, int columnIndex * @return * @throws IOException */ - ColumnPage decodeColumnPage(MeasureRawColumnChunk measureRawColumnChunk, - int pageNumber) throws IOException, MemoryException; + ColumnPage decodeColumnPage(MeasureRawColumnChunk measureRawColumnChunk, int pageNumber, + ReusableDataBuffer reusableDataBuffer) throws IOException, MemoryException; /** * Decode raw data and fill the vector */ - void decodeColumnPageAndFillVector(MeasureRawColumnChunk measureRawColumnChunk, - int pageNumber, ColumnVectorInfo vectorInfo) throws IOException, MemoryException; + void decodeColumnPageAndFillVector(MeasureRawColumnChunk measureRawColumnChunk, int pageNumber, + ColumnVectorInfo vectorInfo, ReusableDataBuffer reusableDataBuffer) + throws IOException, MemoryException; --- End diff -- I have remove resuableBuffer from other two method for now as Reusable buffer code was only added for direct fill (new flow) --- |
In reply to this post by qiuchenjian-2
Github user kumarvishal09 commented on a diff in the pull request:
https://github.com/apache/carbondata/pull/2872#discussion_r235060261 --- Diff: core/src/main/java/org/apache/carbondata/core/datastore/ReusableDataBuffer.java --- @@ -0,0 +1,33 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.carbondata.core.datastore; + +public class ReusableDataBuffer { --- End diff -- ok --- |
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:
https://github.com/apache/carbondata/pull/2872 Build Success with Spark 2.2.1, Please check CI http://95.216.28.178:8080/job/ApacheCarbonPRBuilder1/1678/ --- |
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:
https://github.com/apache/carbondata/pull/2872 Build Success with Spark 2.3.1, Please check CI http://136.243.101.176:8080/job/carbondataprbuilder2.3/9726/ --- |
In reply to this post by qiuchenjian-2
Github user jackylk commented on the issue:
https://github.com/apache/carbondata/pull/2872 LGTM please change the title to incluce jira ticket number --- |
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:
https://github.com/apache/carbondata/pull/2872 Build Failed with Spark 2.2.1, Please check CI http://95.216.28.178:8080/job/ApacheCarbonPRBuilder1/1686/ --- |
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:
https://github.com/apache/carbondata/pull/2872 Build Failed with Spark 2.3.1, Please check CI http://136.243.101.176:8080/job/carbondataprbuilder2.3/9734/ --- |
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:
https://github.com/apache/carbondata/pull/2872 Build Failed with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder2.1/1477/ --- |
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:
https://github.com/apache/carbondata/pull/2872 Build Success with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder2.1/1478/ --- |
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:
https://github.com/apache/carbondata/pull/2872 Build Success with Spark 2.2.1, Please check CI http://95.216.28.178:8080/job/ApacheCarbonPRBuilder1/1688/ --- |
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:
https://github.com/apache/carbondata/pull/2872 Build Success with Spark 2.3.1, Please check CI http://136.243.101.176:8080/job/carbondataprbuilder2.3/9736/ --- |
In reply to this post by qiuchenjian-2
Github user manishgupta88 commented on the issue:
https://github.com/apache/carbondata/pull/2872 LGTM --- |
In reply to this post by qiuchenjian-2
|
Free forum by Nabble | Edit this page |