kevinjmh commented on a change in pull request #3444: [CARBONDATA-3581] Support page level bloom filter URL: https://github.com/apache/carbondata/pull/3444#discussion_r348915190
########## File path: integration/spark-common/src/main/scala/org/apache/spark/sql/catalyst/CarbonDDLSqlParser.scala ########## @@ -501,6 +506,32 @@ abstract class CarbonDDLSqlParser extends AbstractCarbonSparkSQLParser { tableComment) } + def validatePageBloomColumns(fields: Seq[Field], tableProperties: Map[String, String]): Unit = { + val pageBloomFields = tableProperties(CarbonCommonConstants.PAGE_BLOOM_INCLUDE) + .split(",").map(_.trim.toLowerCase) + if (pageBloomFields.length != pageBloomFields.distinct.length) { + throw new MalformedCarbonCommandException( + CarbonCommonConstants.PAGE_BLOOM_INCLUDE.toUpperCase() + " have duplicate columns") + } + pageBloomFields.foreach { column => + val bloomFiled = fields.find(_.column.equalsIgnoreCase(column)) + if (bloomFiled.isDefined) { + // check if data type is supported + val datatypeStr = bloomFiled.get.dataType.getOrElse(""); + val supportedType = Array("string", "int", "bigint") Review comment: I think these datatypes are more resonable to have discrete values and could be used as `col1 = xxx` or `col1 in (xxx, xxx)` As for `short`, in a page of 32000 rows, that could easily we hit the page and tell executor to scan, and we waste time in bloom checking. ---------------------------------------------------------------- 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: us...@infra.apache.org With regards, Apache Git Services