Posted by
GitBox on
Jun 15, 2021; 10:21am
URL: http://apache-carbondata-dev-mailing-list-archive.168.s1.nabble.com/GitHub-carbondata-maheshrajus-opened-a-new-pull-request-4150-CARBONDATA-4208-Wrong-Exception-receives-tp108900p108916.html
akashrn5 commented on a change in pull request #4150:
URL:
https://github.com/apache/carbondata/pull/4150#discussion_r651644126##########
File path: core/src/main/java/org/apache/carbondata/core/util/CarbonUtil.java
##########
@@ -3500,4 +3500,12 @@ public static void updateNullValueBasedOnDatatype(DataOutputStream dataOutputStr
dataOutputStream.write(CarbonCommonConstants.EMPTY_BYTE_ARRAY);
}
}
+
+ /**
+ * returns whether column is complex column based on column name for child column
+ * @return true if column is complex
+ */
+ public static boolean isComplexColumn(String colName) {
+ return colName.contains(".val") || colName.contains(".");
Review comment:
1. use constant for `.`
2. The same code is present in `ColumnsSchema.java`, so you can call this method from column schema class also and keep only one method
##########
File path: integration/spark/src/test/scala/org/apache/carbondata/integration/spark/testsuite/complexType/TestComplexDataType.scala
##########
@@ -765,6 +766,36 @@ class TestComplexDataType extends QueryTest with BeforeAndAfterAll {
assertResult("Unsupported operation on Complex data type")(arrayException.getMessage)
}
+ test("testing the long string properties for complex columns in main table") {
+ sql("drop table if exists complex1")
+ sql("drop table if exists complex2")
+ sql("drop table if exists complex3")
+ sql("create table" +
+ " complex1 (a int, arr1 array<string>) " +
+ "stored as carbondata")
Review comment:
please correct the style here, try to include maximum lines in one line, please correct for this and after test case end, leave a line gap
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[hidden email]