GitHub user manishgupta88 opened a pull request:
https://github.com/apache/carbondata/pull/970 [CARBONDATA-1104] Query failure while using unsafe for query execution numeric data type column specified as sort column Problem: Query failure while using unsafe for query execution numeric data type column specified as sort column Analysis: When unsafe for query is enabled, while filling the data in column vector data is filled as bytes and not based on data type of the column because of which null pointer exception is thrown during result preparation in the query flow. Fix: Convert the data based on its data type and then fill in the vector You can merge this pull request into a Git repository by running: $ git pull https://github.com/manishgupta88/incubator-carbondata sort_column_unsafe_fix Alternatively you can review and apply these changes as the patch at: https://github.com/apache/carbondata/pull/970.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #970 ---- commit 714d507582919672d353221e6b2d8c4ae103527a Author: manishgupta88 <[hidden email]> Date: 2017-05-29T15:36:23Z Problem: Query failure while using unsafe for query execution numeric data type column specified as sort column Analysis: When unsafe for query is enabled, while filling the data in column vector data is filled as bytes and not based on data type of the column because of which null pointer exception is thrown during result preparation in the query flow. Fix: Convert the data based on its data type and then fill in the vector ---- --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at [hidden email] or file a JIRA ticket with INFRA. --- |
Github user kumarvishal09 commented on a diff in the pull request:
https://github.com/apache/carbondata/pull/970#discussion_r119011516 --- Diff: core/src/main/java/org/apache/carbondata/core/datastore/chunk/store/impl/unsafe/UnsafeVariableLengthDimesionDataChunkStore.java --- @@ -164,7 +175,26 @@ public UnsafeVariableLengthDimesionDataChunkStore(long totalSize, boolean isInve .equals(CarbonCommonConstants.MEMBER_DEFAULT_VAL_ARRAY, value)) { vector.putNull(vectorRow); } else { - vector.putBytes(vectorRow, value); + DataType dt = vector.getType(); --- End diff -- Add switch case instead of instanceof check , please handle in other places --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at [hidden email] or file a JIRA ticket with INFRA. --- |
In reply to this post by qiuchenjian-2
Github user kumarvishal09 commented on the issue:
https://github.com/apache/carbondata/pull/970 LGTM --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at [hidden email] or file a JIRA ticket with INFRA. --- |
In reply to this post by qiuchenjian-2
Github user kumarvishal09 commented on the issue:
https://github.com/apache/carbondata/pull/970 retest this please --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at [hidden email] or file a JIRA ticket with INFRA. --- |
In reply to this post by qiuchenjian-2
Github user asfgit closed the pull request at:
https://github.com/apache/carbondata/pull/970 --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at [hidden email] or file a JIRA ticket with INFRA. --- |
Free forum by Nabble | Edit this page |