Github user sujith71955 commented on a diff in the pull request:
https://github.com/apache/incubator-carbondata/pull/189#discussion_r81308653
--- Diff:
integration/spark/src/main/scala/org/apache/spark/sql/CarbonSqlParser.scala ---
@@ -546,6 +548,30 @@ class CarbonSqlParser()
colGrpNames.toString()
}
+ protected def getTableBlockSize(tableProperties: Map[String, String]):
Integer = {
+ var tableBlockSize: Integer = 0
+ if
(tableProperties.get(CarbonCommonConstants.TABLE_BLOCKSIZE).isDefined) {
+ val blockSizeStr: String =
tableProperties.get(CarbonCommonConstants.TABLE_BLOCKSIZE).get
+ try {
+ tableBlockSize = Integer.parseInt(blockSizeStr)
+ } catch {
+ case e: NumberFormatException =>
+ throw new MalformedCarbonCommandException("Invalid
table_blocksize value found: " +
+ s"$blockSizeStr, only int value from 1 to 2048 is supported.")
+ }
+ if (tableBlockSize < CarbonCommonConstants.BLOCK_SIZE_MIN_VAL ||
+ tableBlockSize > CarbonCommonConstants.BLOCK_SIZE_MAX_VAL) {
+ throw new MalformedCarbonCommandException("Invalid table_blocksize
value found: " +
+ s"$blockSizeStr, only int value from 1 to 2048 is supported.")
--- End diff --
Please mention the Unit also in comment like GB or MB
"Invalid table_blocksize value found: " +
+ s"$blockSizeStr, only int value from 1 MB to 2048 MB is
supported"
---
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 [email protected] or file a JIRA ticket
with INFRA.
---