[GitHub] [carbondata] kumarvishal09 commented on a change in pull request #3444: [CARBONDATA-3581] Support page level bloom filter

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

[GitHub] [carbondata] kumarvishal09 commented on a change in pull request #3444: [CARBONDATA-3581] Support page level bloom filter

GitBox
kumarvishal09 commented on a change in pull request #3444: [CARBONDATA-3581] Support page level bloom filter
URL: https://github.com/apache/carbondata/pull/3444#discussion_r349037861
 
 

 ##########
 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:
   @kevinjmh Your comment is not clear, Can u please explain why you cannot support for short data type and other data type

----------------------------------------------------------------
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]


With regards,
Apache Git Services