GitHub user ravipesala opened a pull request:
https://github.com/apache/carbondata/pull/2704 [HOTFIX] Old stores cannot read with new table infered through sdk. Problem: Old stores column schema is written in the different case then fileformat cannot read data because of sdk infer schema always gives lower case schema. Solution: Do case insensitivity check while comparing. Be sure to do all of the following checklist to help us incorporate your contribution quickly and easily: - [ ] Any interfaces changed? - [ ] Any backward compatibility impacted? - [ ] Document update required? - [ ] Testing done Please provide details on - Whether new unit test cases have been added or why no new tests are required? - How it is tested? Please attach test report. - Is it a performance related change? Please attach the performance test report. - Any additional information to help reviewers in testing this change. - [ ] For large changes, please consider breaking it into sub-tasks under an umbrella JIRA. You can merge this pull request into a Git repository by running: $ git pull https://github.com/ravipesala/incubator-carbondata fileformat-test Alternatively you can review and apply these changes as the patch at: https://github.com/apache/carbondata/pull/2704.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 #2704 ---- commit a8620fd04c5cd0977263e09ba5fad422fbe630c7 Author: ravipesala <ravi.pesala@...> Date: 2018-09-10T15:41:18Z Old stores cannot read with new table infered through sdk. ---- --- |
Github user CarbonDataQA commented on the issue:
https://github.com/apache/carbondata/pull/2704 Build Success with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder2.1/211/ --- |
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:
https://github.com/apache/carbondata/pull/2704 Build Success with Spark 2.2.1, Please check CI http://95.216.28.178:8080/job/ApacheCarbonPRBuilder1/380/ --- |
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:
https://github.com/apache/carbondata/pull/2704 Build Failed with Spark 2.3.1, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder2.3/8450/ --- |
In reply to this post by qiuchenjian-2
Github user ravipesala commented on the issue:
https://github.com/apache/carbondata/pull/2704 retest this please --- |
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:
https://github.com/apache/carbondata/pull/2704 Build Success with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder2.1/216/ --- |
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:
https://github.com/apache/carbondata/pull/2704 Build Success with Spark 2.2.1, Please check CI http://95.216.28.178:8080/job/ApacheCarbonPRBuilder1/385/ --- |
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:
https://github.com/apache/carbondata/pull/2704 Build Failed with Spark 2.3.1, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder2.3/8455/ --- |
In reply to this post by qiuchenjian-2
Github user ajantha-bhat commented on the issue:
https://github.com/apache/carbondata/pull/2704 @ravipesala : will it be better if we convert schema to lowercase just after inferring ? --- |
In reply to this post by qiuchenjian-2
Github user ajantha-bhat commented on a diff in the pull request:
https://github.com/apache/carbondata/pull/2704#discussion_r216555115 --- Diff: core/src/main/java/org/apache/carbondata/core/scan/executor/util/RestructureUtil.java --- @@ -165,14 +165,15 @@ private static boolean isColumnMatches(boolean isTransactionalTable, // column ID but can have same column name if (tableColumn.getDataType().isComplexType() && !(tableColumn.getDataType().getId() == DataTypes.ARRAY_TYPE_ID)) { - if (tableColumn.getColumnId().equals(queryColumn.getColumnId())) { + if (tableColumn.getColumnId().equalsIgnoreCase(queryColumn.getColumnId())) { --- End diff -- I think there are many other place columnID check is there. example filter scenario. If handle this way need to check and handle all the places. I suggest better to convert inferred schema to lower case at the place of inferring. That way no need to handle all these places --- |
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:
https://github.com/apache/carbondata/pull/2704 Build Success with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder2.1/220/ --- |
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:
https://github.com/apache/carbondata/pull/2704 Build Failed with Spark 2.3.1, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder2.3/8459/ --- |
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:
https://github.com/apache/carbondata/pull/2704 Build Success with Spark 2.2.1, Please check CI http://95.216.28.178:8080/job/ApacheCarbonPRBuilder1/389/ --- |
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:
https://github.com/apache/carbondata/pull/2704 Build Success with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder2.1/225/ --- |
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:
https://github.com/apache/carbondata/pull/2704 Build Success with Spark 2.2.1, Please check CI http://95.216.28.178:8080/job/ApacheCarbonPRBuilder1/394/ --- |
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:
https://github.com/apache/carbondata/pull/2704 Build Failed with Spark 2.3.1, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder2.3/8464/ --- |
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/2704#discussion_r216906796 --- Diff: core/src/main/java/org/apache/carbondata/core/metadata/CarbonMetadata.java --- @@ -143,7 +143,7 @@ public CarbonDimension getCarbonDimensionBasedOnColIdentifier(CarbonTable carbon List<CarbonDimension> listOfCarbonDims = carbonTable.getDimensionByTableName(carbonTable.getTableName()); for (CarbonDimension dimension : listOfCarbonDims) { - if (dimension.getColumnId().equals(columnIdentifier)) { + if (dimension.getColumnId().equalsIgnoreCase(columnIdentifier)) { --- End diff -- Will the comparison for columnId still need case insensitive? If it is yes, I'd suggest you to leave comments for this (for old store before version XXX). --- |
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/2704#discussion_r216906873 --- Diff: core/src/main/java/org/apache/carbondata/core/scan/executor/impl/AbstractQueryExecutor.java --- @@ -476,7 +476,11 @@ private BlockExecutionInfo getBlockExecutionInfoForBlock(QueryModel queryModel, blockExecutionInfo .setTotalNumberDimensionToRead( segmentProperties.getDimensionOrdinalToChunkMapping().size()); - blockExecutionInfo.setPrefetchBlocklet(!queryModel.isReadPageByPage()); + if (queryModel.isReadPageByPage()) { --- End diff -- It seems this modification is not related with the description of this PR --- |
In reply to this post by qiuchenjian-2
Github user KanakaKumar commented on a diff in the pull request:
https://github.com/apache/carbondata/pull/2704#discussion_r216917965 --- Diff: core/src/main/java/org/apache/carbondata/core/scan/executor/util/RestructureUtil.java --- @@ -165,14 +165,15 @@ private static boolean isColumnMatches(boolean isTransactionalTable, // column ID but can have same column name if (tableColumn.getDataType().isComplexType() && !(tableColumn.getDataType().getId() == DataTypes.ARRAY_TYPE_ID)) { - if (tableColumn.getColumnId().equals(queryColumn.getColumnId())) { + if (tableColumn.getColumnId().equalsIgnoreCase(queryColumn.getColumnId())) { return true; } else { return isColumnMatchesStruct(tableColumn, queryColumn); } } else { - return (tableColumn.getColumnId().equals(queryColumn.getColumnId()) || (!isTransactionalTable - && tableColumn.getColName().equals(queryColumn.getColName()))); + return (tableColumn.getColumnId().equalsIgnoreCase(queryColumn.getColumnId()) || ( --- End diff -- I think we should have more strict comparison in case of restructure. If column with same name is added with different name with different data type, will be problem. Let's use data type also to compare. --- |
In reply to this post by qiuchenjian-2
Github user KanakaKumar commented on a diff in the pull request:
https://github.com/apache/carbondata/pull/2704#discussion_r216918150 --- Diff: core/src/main/java/org/apache/carbondata/core/scan/executor/util/RestructureUtil.java --- @@ -165,14 +165,15 @@ private static boolean isColumnMatches(boolean isTransactionalTable, // column ID but can have same column name if (tableColumn.getDataType().isComplexType() && !(tableColumn.getDataType().getId() == DataTypes.ARRAY_TYPE_ID)) { - if (tableColumn.getColumnId().equals(queryColumn.getColumnId())) { + if (tableColumn.getColumnId().equalsIgnoreCase(queryColumn.getColumnId())) { --- End diff -- Same comment give below applicable here also. --- |
Free forum by Nabble | Edit this page |