Github user CarbonDataQA commented on the issue:
https://github.com/apache/carbondata/pull/1792 Build Success with Spark 2.2.1, Please check CI http://88.99.58.216:8080/job/ApacheCarbonPRBuilder/1697/ --- |
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:
https://github.com/apache/carbondata/pull/1792 Build Success with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/2930/ --- |
In reply to this post by qiuchenjian-2
Github user ravipesala commented on the issue:
https://github.com/apache/carbondata/pull/1792 SDV Build Fail , Please check CI http://144.76.159.231:8080/job/ApacheSDVTests/2965/ --- |
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:
https://github.com/apache/carbondata/pull/1792 Build Failed with Spark 2.2.1, Please check CI http://88.99.58.216:8080/job/ApacheCarbonPRBuilder/1704/ --- |
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:
https://github.com/apache/carbondata/pull/1792 Build Failed with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/2938/ --- |
In reply to this post by qiuchenjian-2
Github user jackylk commented on the issue:
https://github.com/apache/carbondata/pull/1792 retest this please --- |
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:
https://github.com/apache/carbondata/pull/1792 Build Success with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/2955/ --- |
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:
https://github.com/apache/carbondata/pull/1792 Build Success with Spark 2.2.1, Please check CI http://88.99.58.216:8080/job/ApacheCarbonPRBuilder/1726/ --- |
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:
https://github.com/apache/carbondata/pull/1792 Build Failed with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/2965/ --- |
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:
https://github.com/apache/carbondata/pull/1792 Build Success with Spark 2.2.1, Please check CI http://88.99.58.216:8080/job/ApacheCarbonPRBuilder/1738/ --- |
In reply to this post by qiuchenjian-2
Github user xuchuanyin commented on the issue:
https://github.com/apache/carbondata/pull/1792 retest this please --- |
In reply to this post by qiuchenjian-2
Github user ravipesala commented on the issue:
https://github.com/apache/carbondata/pull/1792 SDV Build Success , Please check CI http://144.76.159.231:8080/job/ApacheSDVTests/2985/ --- |
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:
https://github.com/apache/carbondata/pull/1792 Build Success with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/2971/ --- |
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:
https://github.com/apache/carbondata/pull/1792 Build Success with Spark 2.2.1, Please check CI http://88.99.58.216:8080/job/ApacheCarbonPRBuilder/1741/ --- |
In reply to this post by qiuchenjian-2
Github user jackylk commented on a diff in the pull request:
https://github.com/apache/carbondata/pull/1792#discussion_r164681706 --- Diff: processing/src/main/java/org/apache/carbondata/processing/loading/sort/unsafe/UnsafeCarbonRowPage.java --- @@ -80,255 +63,43 @@ public UnsafeCarbonRowPage(boolean[] noDictionaryDimensionMapping, this.managerType = MemoryManagerType.UNSAFE_MEMORY_MANAGER; } - public int addRow(Object[] row) { - int size = addRow(row, dataBlock.getBaseOffset() + lastSize); + public int addRow(Object[] row, ByteBuffer rowBuffer) { + int size = addRow(row, dataBlock.getBaseOffset() + lastSize, rowBuffer); buffer.set(lastSize); lastSize = lastSize + size; return size; } - private int addRow(Object[] row, long address) { - if (row == null) { - throw new RuntimeException("Row is null ??"); - } - int dimCount = 0; - int size = 0; - Object baseObject = dataBlock.getBaseObject(); - for (; dimCount < noDictionaryDimensionMapping.length; dimCount++) { - if (noDictionaryDimensionMapping[dimCount]) { - byte[] col = (byte[]) row[dimCount]; - CarbonUnsafe.getUnsafe() - .putShort(baseObject, address + size, (short) col.length); - size += 2; - CarbonUnsafe.getUnsafe().copyMemory(col, CarbonUnsafe.BYTE_ARRAY_OFFSET, baseObject, - address + size, col.length); - size += col.length; - } else { - int value = (int) row[dimCount]; - CarbonUnsafe.getUnsafe().putInt(baseObject, address + size, value); - size += 4; - } - } - - // write complex dimensions here. - for (; dimCount < dimensionSize; dimCount++) { - byte[] col = (byte[]) row[dimCount]; - CarbonUnsafe.getUnsafe().putShort(baseObject, address + size, (short) col.length); - size += 2; - CarbonUnsafe.getUnsafe().copyMemory(col, CarbonUnsafe.BYTE_ARRAY_OFFSET, baseObject, - address + size, col.length); - size += col.length; - } - Arrays.fill(nullSetWords, 0); - int nullSetSize = nullSetWords.length * 8; - int nullWordLoc = size; - size += nullSetSize; - for (int mesCount = 0; mesCount < measureSize; mesCount++) { - Object value = row[mesCount + dimensionSize]; - if (null != value) { - DataType dataType = measureDataType[mesCount]; - if (dataType == DataTypes.BOOLEAN) { - Boolean bval = (Boolean) value; - CarbonUnsafe.getUnsafe().putBoolean(baseObject, address + size, bval); - size += 1; - } else if (dataType == DataTypes.SHORT) { - Short sval = (Short) value; - CarbonUnsafe.getUnsafe().putShort(baseObject, address + size, sval); - size += 2; - } else if (dataType == DataTypes.INT) { - Integer ival = (Integer) value; - CarbonUnsafe.getUnsafe().putInt(baseObject, address + size, ival); - size += 4; - } else if (dataType == DataTypes.LONG) { - Long val = (Long) value; - CarbonUnsafe.getUnsafe().putLong(baseObject, address + size, val); - size += 8; - } else if (dataType == DataTypes.DOUBLE) { - Double doubleVal = (Double) value; - CarbonUnsafe.getUnsafe().putDouble(baseObject, address + size, doubleVal); - size += 8; - } else if (DataTypes.isDecimal(dataType)) { - BigDecimal decimalVal = (BigDecimal) value; - byte[] bigDecimalInBytes = DataTypeUtil.bigDecimalToByte(decimalVal); - CarbonUnsafe.getUnsafe() - .putShort(baseObject, address + size, (short) bigDecimalInBytes.length); - size += 2; - CarbonUnsafe.getUnsafe() - .copyMemory(bigDecimalInBytes, CarbonUnsafe.BYTE_ARRAY_OFFSET, baseObject, - address + size, bigDecimalInBytes.length); - size += bigDecimalInBytes.length; - } else { - throw new IllegalArgumentException("unsupported data type:" + measureDataType[mesCount]); - } - set(nullSetWords, mesCount); - } else { - unset(nullSetWords, mesCount); - } - } - CarbonUnsafe.getUnsafe().copyMemory(nullSetWords, CarbonUnsafe.LONG_ARRAY_OFFSET, baseObject, - address + nullWordLoc, nullSetSize); - return size; + /** + * add row as 3 parts + * @param row + * @param address + * @return + */ + private int addRow(Object[] row, long address, ByteBuffer rowBuffer) { + return sortStepRowHandler.writeRawRowAsIntermediateSortTempRowToUnsafeMemory(row, --- End diff -- Can you add a conversion function to convert row to IntermediateSortTempRow, then add call sortStepRowHandler --- |
In reply to this post by qiuchenjian-2
Github user jackylk commented on a diff in the pull request:
https://github.com/apache/carbondata/pull/1792#discussion_r164682124 --- Diff: processing/src/main/java/org/apache/carbondata/processing/loading/sort/unsafe/UnsafeCarbonRowPage.java --- @@ -80,255 +63,43 @@ public UnsafeCarbonRowPage(boolean[] noDictionaryDimensionMapping, this.managerType = MemoryManagerType.UNSAFE_MEMORY_MANAGER; } - public int addRow(Object[] row) { - int size = addRow(row, dataBlock.getBaseOffset() + lastSize); + public int addRow(Object[] row, ByteBuffer rowBuffer) { + int size = addRow(row, dataBlock.getBaseOffset() + lastSize, rowBuffer); buffer.set(lastSize); lastSize = lastSize + size; return size; } - private int addRow(Object[] row, long address) { - if (row == null) { - throw new RuntimeException("Row is null ??"); - } - int dimCount = 0; - int size = 0; - Object baseObject = dataBlock.getBaseObject(); - for (; dimCount < noDictionaryDimensionMapping.length; dimCount++) { - if (noDictionaryDimensionMapping[dimCount]) { - byte[] col = (byte[]) row[dimCount]; - CarbonUnsafe.getUnsafe() - .putShort(baseObject, address + size, (short) col.length); - size += 2; - CarbonUnsafe.getUnsafe().copyMemory(col, CarbonUnsafe.BYTE_ARRAY_OFFSET, baseObject, - address + size, col.length); - size += col.length; - } else { - int value = (int) row[dimCount]; - CarbonUnsafe.getUnsafe().putInt(baseObject, address + size, value); - size += 4; - } - } - - // write complex dimensions here. - for (; dimCount < dimensionSize; dimCount++) { - byte[] col = (byte[]) row[dimCount]; - CarbonUnsafe.getUnsafe().putShort(baseObject, address + size, (short) col.length); - size += 2; - CarbonUnsafe.getUnsafe().copyMemory(col, CarbonUnsafe.BYTE_ARRAY_OFFSET, baseObject, - address + size, col.length); - size += col.length; - } - Arrays.fill(nullSetWords, 0); - int nullSetSize = nullSetWords.length * 8; - int nullWordLoc = size; - size += nullSetSize; - for (int mesCount = 0; mesCount < measureSize; mesCount++) { - Object value = row[mesCount + dimensionSize]; - if (null != value) { - DataType dataType = measureDataType[mesCount]; - if (dataType == DataTypes.BOOLEAN) { - Boolean bval = (Boolean) value; - CarbonUnsafe.getUnsafe().putBoolean(baseObject, address + size, bval); - size += 1; - } else if (dataType == DataTypes.SHORT) { - Short sval = (Short) value; - CarbonUnsafe.getUnsafe().putShort(baseObject, address + size, sval); - size += 2; - } else if (dataType == DataTypes.INT) { - Integer ival = (Integer) value; - CarbonUnsafe.getUnsafe().putInt(baseObject, address + size, ival); - size += 4; - } else if (dataType == DataTypes.LONG) { - Long val = (Long) value; - CarbonUnsafe.getUnsafe().putLong(baseObject, address + size, val); - size += 8; - } else if (dataType == DataTypes.DOUBLE) { - Double doubleVal = (Double) value; - CarbonUnsafe.getUnsafe().putDouble(baseObject, address + size, doubleVal); - size += 8; - } else if (DataTypes.isDecimal(dataType)) { - BigDecimal decimalVal = (BigDecimal) value; - byte[] bigDecimalInBytes = DataTypeUtil.bigDecimalToByte(decimalVal); - CarbonUnsafe.getUnsafe() - .putShort(baseObject, address + size, (short) bigDecimalInBytes.length); - size += 2; - CarbonUnsafe.getUnsafe() - .copyMemory(bigDecimalInBytes, CarbonUnsafe.BYTE_ARRAY_OFFSET, baseObject, - address + size, bigDecimalInBytes.length); - size += bigDecimalInBytes.length; - } else { - throw new IllegalArgumentException("unsupported data type:" + measureDataType[mesCount]); - } - set(nullSetWords, mesCount); - } else { - unset(nullSetWords, mesCount); - } - } - CarbonUnsafe.getUnsafe().copyMemory(nullSetWords, CarbonUnsafe.LONG_ARRAY_OFFSET, baseObject, - address + nullWordLoc, nullSetSize); - return size; + /** + * add row as 3 parts --- End diff -- The input row is 3 part row? Can you wrap it by some class? It is hard to understand what is inside Object[] --- |
In reply to this post by qiuchenjian-2
Github user jackylk commented on a diff in the pull request:
https://github.com/apache/carbondata/pull/1792#discussion_r164683831 --- Diff: processing/src/main/java/org/apache/carbondata/processing/sort/sortdata/NewIntermediateSortTempRowComparator.java --- @@ -0,0 +1,73 @@ +/* + * 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.processing.sort.sortdata; + +import java.util.Comparator; + +import org.apache.carbondata.core.util.ByteUtil.UnsafeComparer; +import org.apache.carbondata.processing.loading.row.IntermediateSortTempRow; + +/** + * This class is used as comparator for comparing intermediate sort temp row + */ +public class NewIntermediateSortTempRowComparator implements Comparator<IntermediateSortTempRow> { --- End diff -- Why not call it `IntermediateSortTempRowComparator` --- |
In reply to this post by qiuchenjian-2
Github user xuchuanyin commented on a diff in the pull request:
https://github.com/apache/carbondata/pull/1792#discussion_r164712900 --- Diff: processing/src/main/java/org/apache/carbondata/processing/loading/sort/unsafe/UnsafeCarbonRowPage.java --- @@ -80,255 +63,43 @@ public UnsafeCarbonRowPage(boolean[] noDictionaryDimensionMapping, this.managerType = MemoryManagerType.UNSAFE_MEMORY_MANAGER; } - public int addRow(Object[] row) { - int size = addRow(row, dataBlock.getBaseOffset() + lastSize); + public int addRow(Object[] row, ByteBuffer rowBuffer) { + int size = addRow(row, dataBlock.getBaseOffset() + lastSize, rowBuffer); buffer.set(lastSize); lastSize = lastSize + size; return size; } - private int addRow(Object[] row, long address) { - if (row == null) { - throw new RuntimeException("Row is null ??"); - } - int dimCount = 0; - int size = 0; - Object baseObject = dataBlock.getBaseObject(); - for (; dimCount < noDictionaryDimensionMapping.length; dimCount++) { - if (noDictionaryDimensionMapping[dimCount]) { - byte[] col = (byte[]) row[dimCount]; - CarbonUnsafe.getUnsafe() - .putShort(baseObject, address + size, (short) col.length); - size += 2; - CarbonUnsafe.getUnsafe().copyMemory(col, CarbonUnsafe.BYTE_ARRAY_OFFSET, baseObject, - address + size, col.length); - size += col.length; - } else { - int value = (int) row[dimCount]; - CarbonUnsafe.getUnsafe().putInt(baseObject, address + size, value); - size += 4; - } - } - - // write complex dimensions here. - for (; dimCount < dimensionSize; dimCount++) { - byte[] col = (byte[]) row[dimCount]; - CarbonUnsafe.getUnsafe().putShort(baseObject, address + size, (short) col.length); - size += 2; - CarbonUnsafe.getUnsafe().copyMemory(col, CarbonUnsafe.BYTE_ARRAY_OFFSET, baseObject, - address + size, col.length); - size += col.length; - } - Arrays.fill(nullSetWords, 0); - int nullSetSize = nullSetWords.length * 8; - int nullWordLoc = size; - size += nullSetSize; - for (int mesCount = 0; mesCount < measureSize; mesCount++) { - Object value = row[mesCount + dimensionSize]; - if (null != value) { - DataType dataType = measureDataType[mesCount]; - if (dataType == DataTypes.BOOLEAN) { - Boolean bval = (Boolean) value; - CarbonUnsafe.getUnsafe().putBoolean(baseObject, address + size, bval); - size += 1; - } else if (dataType == DataTypes.SHORT) { - Short sval = (Short) value; - CarbonUnsafe.getUnsafe().putShort(baseObject, address + size, sval); - size += 2; - } else if (dataType == DataTypes.INT) { - Integer ival = (Integer) value; - CarbonUnsafe.getUnsafe().putInt(baseObject, address + size, ival); - size += 4; - } else if (dataType == DataTypes.LONG) { - Long val = (Long) value; - CarbonUnsafe.getUnsafe().putLong(baseObject, address + size, val); - size += 8; - } else if (dataType == DataTypes.DOUBLE) { - Double doubleVal = (Double) value; - CarbonUnsafe.getUnsafe().putDouble(baseObject, address + size, doubleVal); - size += 8; - } else if (DataTypes.isDecimal(dataType)) { - BigDecimal decimalVal = (BigDecimal) value; - byte[] bigDecimalInBytes = DataTypeUtil.bigDecimalToByte(decimalVal); - CarbonUnsafe.getUnsafe() - .putShort(baseObject, address + size, (short) bigDecimalInBytes.length); - size += 2; - CarbonUnsafe.getUnsafe() - .copyMemory(bigDecimalInBytes, CarbonUnsafe.BYTE_ARRAY_OFFSET, baseObject, - address + size, bigDecimalInBytes.length); - size += bigDecimalInBytes.length; - } else { - throw new IllegalArgumentException("unsupported data type:" + measureDataType[mesCount]); - } - set(nullSetWords, mesCount); - } else { - unset(nullSetWords, mesCount); - } - } - CarbonUnsafe.getUnsafe().copyMemory(nullSetWords, CarbonUnsafe.LONG_ARRAY_OFFSET, baseObject, - address + nullWordLoc, nullSetSize); - return size; + /** + * add row as 3 parts --- End diff -- It is raw row, I'll fix the comment. --- |
In reply to this post by qiuchenjian-2
Github user xuchuanyin commented on a diff in the pull request:
https://github.com/apache/carbondata/pull/1792#discussion_r164714917 --- Diff: processing/src/main/java/org/apache/carbondata/processing/sort/sortdata/NewIntermediateSortTempRowComparator.java --- @@ -0,0 +1,73 @@ +/* + * 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.processing.sort.sortdata; + +import java.util.Comparator; + +import org.apache.carbondata.core.util.ByteUtil.UnsafeComparer; +import org.apache.carbondata.processing.loading.row.IntermediateSortTempRow; + +/** + * This class is used as comparator for comparing intermediate sort temp row + */ +public class NewIntermediateSortTempRowComparator implements Comparator<IntermediateSortTempRow> { --- End diff -- OK, I'll fix it --- |
In reply to this post by qiuchenjian-2
Github user xuchuanyin commented on the issue:
https://github.com/apache/carbondata/pull/1792 retest this please --- |
Free forum by Nabble | Edit this page |