Github user CarbonDataQA commented on the issue:
https://github.com/apache/carbondata/pull/2654 Build Success with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/8136/ --- |
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:
https://github.com/apache/carbondata/pull/2654 Build Success with Spark 2.2.1, Please check CI http://95.216.28.178:8080/job/ApacheCarbonPRBuilder1/65/ --- |
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:
https://github.com/apache/carbondata/pull/2654 Build Failed with Spark 2.2.1, Please check CI http://95.216.28.178:8080/job/ApacheCarbonPRBuilder1/85/ --- |
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:
https://github.com/apache/carbondata/pull/2654 Build Failed with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/8156/ --- |
In reply to this post by qiuchenjian-2
Github user ravipesala commented on the issue:
https://github.com/apache/carbondata/pull/2654 SDV Build Fail , Please check CI http://144.76.159.231:8080/job/ApacheSDVTests/6468/ --- |
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:
https://github.com/apache/carbondata/pull/2654 Build Failed with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/8157/ --- |
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:
https://github.com/apache/carbondata/pull/2654 Build Failed with Spark 2.2.1, Please check CI http://95.216.28.178:8080/job/ApacheCarbonPRBuilder1/86/ --- |
In reply to this post by qiuchenjian-2
Github user ravipesala commented on the issue:
https://github.com/apache/carbondata/pull/2654 SDV Build Fail , Please check CI http://144.76.159.231:8080/job/ApacheSDVTests/6469/ --- |
In reply to this post by qiuchenjian-2
Github user ravipesala commented on the issue:
https://github.com/apache/carbondata/pull/2654 SDV Build Fail , Please check CI http://144.76.159.231:8080/job/ApacheSDVTests/6478/ --- |
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:
https://github.com/apache/carbondata/pull/2654 Build Failed with Spark 2.2.1, Please check CI http://95.216.28.178:8080/job/ApacheCarbonPRBuilder1/96/ --- |
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:
https://github.com/apache/carbondata/pull/2654 Build Failed with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/8167/ --- |
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:
https://github.com/apache/carbondata/pull/2654 Build Failed with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/8177/ --- |
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:
https://github.com/apache/carbondata/pull/2654 Build Failed with Spark 2.2.1, Please check CI http://95.216.28.178:8080/job/ApacheCarbonPRBuilder1/106/ --- |
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:
https://github.com/apache/carbondata/pull/2654 Build Success with Spark 2.2.1, Please check CI http://95.216.28.178:8080/job/ApacheCarbonPRBuilder1/110/ --- |
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:
https://github.com/apache/carbondata/pull/2654 Build Success with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/8181/ --- |
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:
https://github.com/apache/carbondata/pull/2654 Build Success with Spark 2.2.1, Please check CI http://95.216.28.178:8080/job/ApacheCarbonPRBuilder1/113/ --- |
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:
https://github.com/apache/carbondata/pull/2654 Build Success with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/8184/ --- |
In reply to this post by qiuchenjian-2
Github user manishgupta88 commented on a diff in the pull request:
https://github.com/apache/carbondata/pull/2654#discussion_r214038624 --- Diff: core/src/main/java/org/apache/carbondata/core/util/DataTypeUtil.java --- @@ -976,4 +978,122 @@ public static long getDataBasedOnRestructuredDataType(byte[] data, DataType rest return value; } + /** + * Check if the column is a no dictionary primitive column + * + * @param dataType + * @return + */ + public static boolean isPrimitiveColumn(DataType dataType) { + if (dataType == DataTypes.BOOLEAN || dataType == DataTypes.BYTE || dataType == DataTypes.SHORT + || dataType == DataTypes.INT || dataType == DataTypes.LONG || DataTypes.isDecimal(dataType) + || dataType == DataTypes.FLOAT || dataType == DataTypes.DOUBLE + || dataType == DataTypes.BYTE_ARRAY) { + return true; + } + return false; + } + + /** + * Put the data to unsafe memory + * + * @param dataType + * @param data + * @param baseObject + * @param address + * @param size + * @param sizeInBytes + */ + public static void putDataToUnsafe(DataType dataType, Object data, Object baseObject, + long address, int size, int sizeInBytes) { + dataType = DataTypeUtil.valueOf(dataType.getName()); + if (dataType == DataTypes.BOOLEAN) { + CarbonUnsafe.getUnsafe().putBoolean(baseObject, address + size, (boolean) data); + } else if (dataType == DataTypes.BYTE) { + CarbonUnsafe.getUnsafe().putByte(baseObject, address + size, (byte) data); + } else if (dataType == DataTypes.SHORT) { + CarbonUnsafe.getUnsafe().putShort(baseObject, address + size, (short) data); + } else if (dataType == DataTypes.INT) { + CarbonUnsafe.getUnsafe().putInt(baseObject, address + size, (int) data); + } else if (dataType == DataTypes.LONG) { + CarbonUnsafe.getUnsafe().putLong(baseObject, address + size, (long) data); + } else if (DataTypes.isDecimal(dataType) || dataType == DataTypes.DOUBLE) { + CarbonUnsafe.getUnsafe().putDouble(baseObject, address + size, (double) data); + } else if (dataType == DataTypes.FLOAT) { + CarbonUnsafe.getUnsafe().putFloat(baseObject, address + size, (float) data); + } else if (dataType == DataTypes.BYTE_ARRAY) { + CarbonUnsafe.getUnsafe() + .copyMemory(data, CarbonUnsafe.BYTE_ARRAY_OFFSET, baseObject, address + size, + sizeInBytes); + } + } + + /** + * Retrieve/Get the data from unsafe memory + * + * @param dataType + * @param baseObject + * @param address + * @param size + * @param sizeInBytes + * @return + */ + public static Object getDataFromUnsafe(DataType dataType, Object baseObject, long address, --- End diff -- same comment as above --- |
In reply to this post by qiuchenjian-2
Github user manishgupta88 commented on a diff in the pull request:
https://github.com/apache/carbondata/pull/2654#discussion_r214049002 --- Diff: processing/src/main/java/org/apache/carbondata/processing/util/CarbonDataProcessorUtil.java --- @@ -450,6 +450,114 @@ public static boolean isHeaderValid(String tableName, String[] csvHeader, return type; } + /** + * Get the no dictionary data types on the table + * + * @param databaseName + * @param tableName + * @return + */ + public static DataType[] getNoDicDataTypes(String databaseName, String tableName) { + CarbonTable carbonTable = CarbonMetadata.getInstance().getCarbonTable(databaseName, tableName); + List<CarbonDimension> dimensions = carbonTable.getDimensionByTableName(tableName); + int noDicCount = 0; + for (int i = 0; i < dimensions.size(); i++) { + if (!dimensions.get(i).hasEncoding(Encoding.DICTIONARY)) { + noDicCount++; + } + } + DataType[] type = new DataType[noDicCount]; + noDicCount = 0; + for (int i = 0; i < dimensions.size(); i++) { + if (!dimensions.get(i).hasEncoding(Encoding.DICTIONARY)) { + type[noDicCount++] = dimensions.get(i).getDataType(); + } + } --- End diff -- The below for loop can be removed and the filling of data type can be done in single iteration by taking an arraylist and while sending back you can convert back to array --- |
In reply to this post by qiuchenjian-2
Github user manishgupta88 commented on a diff in the pull request:
https://github.com/apache/carbondata/pull/2654#discussion_r214044420 --- Diff: core/src/main/java/org/apache/carbondata/core/util/DataTypeUtil.java --- @@ -976,4 +978,122 @@ public static long getDataBasedOnRestructuredDataType(byte[] data, DataType rest return value; } + /** + * Check if the column is a no dictionary primitive column + * + * @param dataType + * @return + */ + public static boolean isPrimitiveColumn(DataType dataType) { + if (dataType == DataTypes.BOOLEAN || dataType == DataTypes.BYTE || dataType == DataTypes.SHORT + || dataType == DataTypes.INT || dataType == DataTypes.LONG || DataTypes.isDecimal(dataType) + || dataType == DataTypes.FLOAT || dataType == DataTypes.DOUBLE + || dataType == DataTypes.BYTE_ARRAY) { + return true; + } + return false; + } + + /** + * Put the data to unsafe memory + * + * @param dataType + * @param data + * @param baseObject + * @param address + * @param size + * @param sizeInBytes + */ + public static void putDataToUnsafe(DataType dataType, Object data, Object baseObject, + long address, int size, int sizeInBytes) { + dataType = DataTypeUtil.valueOf(dataType.getName()); + if (dataType == DataTypes.BOOLEAN) { + CarbonUnsafe.getUnsafe().putBoolean(baseObject, address + size, (boolean) data); + } else if (dataType == DataTypes.BYTE) { + CarbonUnsafe.getUnsafe().putByte(baseObject, address + size, (byte) data); + } else if (dataType == DataTypes.SHORT) { + CarbonUnsafe.getUnsafe().putShort(baseObject, address + size, (short) data); + } else if (dataType == DataTypes.INT) { + CarbonUnsafe.getUnsafe().putInt(baseObject, address + size, (int) data); + } else if (dataType == DataTypes.LONG) { + CarbonUnsafe.getUnsafe().putLong(baseObject, address + size, (long) data); + } else if (DataTypes.isDecimal(dataType) || dataType == DataTypes.DOUBLE) { + CarbonUnsafe.getUnsafe().putDouble(baseObject, address + size, (double) data); + } else if (dataType == DataTypes.FLOAT) { + CarbonUnsafe.getUnsafe().putFloat(baseObject, address + size, (float) data); + } else if (dataType == DataTypes.BYTE_ARRAY) { + CarbonUnsafe.getUnsafe() + .copyMemory(data, CarbonUnsafe.BYTE_ARRAY_OFFSET, baseObject, address + size, + sizeInBytes); + } + } + + /** + * Retrieve/Get the data from unsafe memory + * + * @param dataType + * @param baseObject + * @param address + * @param size + * @param sizeInBytes + * @return + */ + public static Object getDataFromUnsafe(DataType dataType, Object baseObject, long address, + int size, int sizeInBytes) { + dataType = DataTypeUtil.valueOf(dataType.getName()); + Object data = new Object(); + if (dataType == DataTypes.BOOLEAN) { + data = CarbonUnsafe.getUnsafe().getBoolean(baseObject, address + size); + } else if (dataType == DataTypes.BYTE) { + data = CarbonUnsafe.getUnsafe().getByte(baseObject, address + size); + } else if (dataType == DataTypes.SHORT) { + data = CarbonUnsafe.getUnsafe().getShort(baseObject, address + size); + } else if (dataType == DataTypes.INT) { + data = CarbonUnsafe.getUnsafe().getInt(baseObject, address + size); + } else if (dataType == DataTypes.LONG) { + data = CarbonUnsafe.getUnsafe().getLong(baseObject, address + size); + } else if (DataTypes.isDecimal(dataType) || dataType == DataTypes.DOUBLE) { + data = CarbonUnsafe.getUnsafe().getDouble(baseObject, address + size); + } else if (dataType == DataTypes.FLOAT) { + data = CarbonUnsafe.getUnsafe().getDouble(baseObject, address + size); + } else if (dataType == DataTypes.BYTE_ARRAY) { + CarbonUnsafe.getUnsafe() + .copyMemory(baseObject, address + size, data, CarbonUnsafe.BYTE_ARRAY_OFFSET, + sizeInBytes); + } + return data; + } + + /** + * Put the data to vector + * + * @param vector + * @param value + * @param vectorRow + * @param length + */ + public static void putDataToVector(CarbonColumnVector vector, byte[] value, int vectorRow, --- End diff -- Move this method to DimensionVectorDataProcessor.java --- |
Free forum by Nabble | Edit this page |