QiangCai commented on a change in pull request #3063: [CARBONDATA-3242] Move Range_Column into the table level properties
URL:
https://github.com/apache/carbondata/pull/3063#discussion_r248569666
##########
File path: integration/spark-common/src/main/scala/org/apache/spark/sql/catalyst/CarbonDDLSqlParser.scala
##########
@@ -787,6 +787,19 @@ abstract class CarbonDDLSqlParser extends AbstractCarbonSparkSQLParser {
}
}
+ // range_column should be there in create table cols
+ if (tableProperties.get(CarbonCommonConstants.RANGE_COLUMN).isDefined) {
+ val rangeColumn = tableProperties.get(CarbonCommonConstants.RANGE_COLUMN).get.trim
+ val rangeField = fields.find(_.column.equalsIgnoreCase(rangeColumn))
+ if (rangeField.isEmpty) {
+ val errorMsg = "range_column: " + rangeColumn +
+ " does not exist in table. Please check the create table statement."
+ throw new MalformedCarbonCommandException(errorMsg)
+ } else {
+ tableProperties.put(CarbonCommonConstants.RANGE_COLUMN, rangeField.get.column)
Review comment:
both yes
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[hidden email]
With regards,
Apache Git Services