[jira] [Updated] (CARBONDATA-2611) Add test cases for Create table statement for Local Dictionary Support

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[jira] [Updated] (CARBONDATA-2611) Add test cases for Create table statement for Local Dictionary Support

Akash R Nilugal (Jira)

     [ https://issues.apache.org/jira/browse/CARBONDATA-2611?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Praveen M P updated CARBONDATA-2611:
------------------------------------
    Description:
*What changes were made?*

Unti Test cases and SDV Test cases were added for Local Dictionary Support for Create table command and Describe formatted command

*What scenarios were covered?*

Create table command with all combinations of configurations for table properties like 
 * *LOCAL_DICTIONARY_ENABLE*
 * *LOCAL_DICTIONARY_THRESHOLD*
 * *LOCAL_DICTIONARY_INCLUDE*
 * *LOCAL_DICTIONARY_EXCLUDE*****

Verifying exception and error messages for all the invalid scenarios

Describe formatted command to verify the values configured

 

  was:
*What changes were made?*

Unti Test cases and SDV Test cases were added for Local Dictionary Support for Create table command and Describe formatted command

*What scenarios were covered?*

Create table command with all combinations of configurations for table properties like 
 * *LOCAL_DICTIONARY_ENABLE*
 * *LOCAL_DICTIONARY_THRESHOLD*
 * *LOCAL_DICTIONARY_INCLUDE*
 * *LOCAL_DICTIONARY_EXCLUDE*****

Verifying exception and error messages for all the invalid scenarios

Describe formatted command to verify the values configured

 val localDictIncludeCols = tableProperties(CarbonCommonConstants.LOCAL_DICTIONARY_INCLUDE).split(",").map(_.trim)
+ val localDictExcludeCols = tableProperties(CarbonCommonConstants.LOCAL_DICTIONARY_EXCLUDE).split(",").map(_.trim)
+ localDictIncludeCols.foreach { distCol =>
+ if (localDictExcludeCols.exists(x => x.equalsIgnoreCase(distCol.trim))) {
+ val duplicateColumns = (localDictIncludeCols ++ localDictExcludeColumns).diff((localDictIncludeCols ++ localDictExcludeColumns).distinct).distinct
+ val errMsg =
+ "Column ambiguity as duplicate column(s):" +
+ duplicateColumns.mkString(",") + " is present in LOCAL_DICTIONARY_INCLUDE " +
+ "and LOCAL_DICTIONARY_EXCLUDE. Duplicate columns are not allowed."
+ throw new MalformedCarbonCommandException(errMsg)
+ }
 }
+// if (List(localDictIncludeCols, localDictExcludeCols).mkString(",")
+// .distinct.length !=
+// List(localDictIncludeCols, localDictExcludeCols).mkString(",")
+// .length) {
+// val duplicateColumns = localDictIncludeCols ++ localDictExcludeCols.split(",").diff(localDictIncludeCols ++ localDictExcludeCols.split(",").distinct).distinct
+// val errMsg =
+// "Column ambiguity as duplicate column(s):" +
+// duplicateColumns.mkString("") + " are present in LOCAL_DICTIONARY_INCLUDE " +
+// "and LOCAL_DICTIONARY_EXCLUDE. Duplicate columns are not allowed."
+// throw new MalformedCarbonCommandException(errMsg)
+// }
 }
 }

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 


> Add test cases for Create table statement for Local Dictionary Support
> ----------------------------------------------------------------------
>
>                 Key: CARBONDATA-2611
>                 URL: https://issues.apache.org/jira/browse/CARBONDATA-2611
>             Project: CarbonData
>          Issue Type: Sub-task
>            Reporter: Praveen M P
>            Assignee: Praveen M P
>            Priority: Minor
>          Time Spent: 3h 50m
>  Remaining Estimate: 0h
>
> *What changes were made?*
> Unti Test cases and SDV Test cases were added for Local Dictionary Support for Create table command and Describe formatted command
> *What scenarios were covered?*
> Create table command with all combinations of configurations for table properties like 
>  * *LOCAL_DICTIONARY_ENABLE*
>  * *LOCAL_DICTIONARY_THRESHOLD*
>  * *LOCAL_DICTIONARY_INCLUDE*
>  * *LOCAL_DICTIONARY_EXCLUDE*****
> Verifying exception and error messages for all the invalid scenarios
> Describe formatted command to verify the values configured
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)