[GitHub] [carbondata] CarbonDataQA2 commented on pull request #4122: [WIP] Spark 3.1 support

2021-04-27 Thread GitBox


CarbonDataQA2 commented on pull request #4122:
URL: https://github.com/apache/carbondata/pull/4122#issuecomment-827793459


   Build Success with Spark 2.4.5, Please check CI 
http://121.244.95.60:12602/job/ApacheCarbon_PR_Builder_2.4.5/3537/
   


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




[GitHub] [carbondata] CarbonDataQA2 commented on pull request #4122: [WIP] Spark 3.1 support

2021-04-27 Thread GitBox


CarbonDataQA2 commented on pull request #4122:
URL: https://github.com/apache/carbondata/pull/4122#issuecomment-827787440


   Build Success with Spark 2.3.4, Please check CI 
http://121.244.95.60:12602/job/ApacheCarbonPRBuilder2.3/5282/
   


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




[GitHub] [carbondata] vikramahuja1001 commented on pull request #4122: [WIP] Spark 3.1 support

2021-04-27 Thread GitBox


vikramahuja1001 commented on pull request #4122:
URL: https://github.com/apache/carbondata/pull/4122#issuecomment-827725895


   retest this please


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




[GitHub] [carbondata] CarbonDataQA2 commented on pull request #4122: [WIP] Spark 3.1 support

2021-04-27 Thread GitBox


CarbonDataQA2 commented on pull request #4122:
URL: https://github.com/apache/carbondata/pull/4122#issuecomment-827725103


   Build Success with Spark 2.4.5, Please check CI 
http://121.244.95.60:12602/job/ApacheCarbon_PR_Builder_2.4.5/3536/
   


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




[GitHub] [carbondata] CarbonDataQA2 commented on pull request #4122: [WIP] Spark 3.1 support

2021-04-27 Thread GitBox


CarbonDataQA2 commented on pull request #4122:
URL: https://github.com/apache/carbondata/pull/4122#issuecomment-827713795


   Build Failed  with Spark 2.3.4, Please check CI 
http://121.244.95.60:12602/job/ApacheCarbonPRBuilder2.3/5281/
   


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




[GitHub] [carbondata] asfgit closed pull request #4121: [CARBONDATA-4170] Support dropping of parent complex columns(array/struct/map)

2021-04-27 Thread GitBox


asfgit closed pull request #4121:
URL: https://github.com/apache/carbondata/pull/4121


   


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




[GitHub] [carbondata] akashrn5 commented on pull request #4121: [CARBONDATA-4170] Support dropping of parent complex columns(array/struct/map)

2021-04-27 Thread GitBox


akashrn5 commented on pull request #4121:
URL: https://github.com/apache/carbondata/pull/4121#issuecomment-827669226


   LGTM


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




[GitHub] [carbondata] CarbonDataQA2 commented on pull request #4122: [WIP] Spark 3.1 support

2021-04-27 Thread GitBox


CarbonDataQA2 commented on pull request #4122:
URL: https://github.com/apache/carbondata/pull/4122#issuecomment-82764


   Build Failed  with Spark 2.3.4, Please check CI 
http://121.244.95.60:12602/job/ApacheCarbonPRBuilder2.3/5280/
   


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




Re: [DISCUSSION] Support JOIN query with spatial index

2021-04-27 Thread VenuReddy


+1



--
Sent from: 
http://apache-carbondata-dev-mailing-list-archive.1130556.n5.nabble.com/


[GitHub] [carbondata] asfgit closed pull request #4118: [CARBONDATA-4167][CARBONDATA-4168] Fix case sensitive issues and input validation for Geo values.

2021-04-27 Thread GitBox


asfgit closed pull request #4118:
URL: https://github.com/apache/carbondata/pull/4118


   


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




[GitHub] [carbondata] CarbonDataQA2 commented on pull request #4122: [WIP] Spark 3.1 support

2021-04-27 Thread GitBox


CarbonDataQA2 commented on pull request #4122:
URL: https://github.com/apache/carbondata/pull/4122#issuecomment-827592581


   Build Failed  with Spark 2.4.5, Please check CI 
http://121.244.95.60:12602/job/ApacheCarbon_PR_Builder_2.4.5/3535/
   


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




[GitHub] [carbondata] CarbonDataQA2 commented on pull request #4118: [CARBONDATA-4167][CARBONDATA-4168] Fix case sensitive issues and input validation for Geo values.

2021-04-27 Thread GitBox


CarbonDataQA2 commented on pull request #4118:
URL: https://github.com/apache/carbondata/pull/4118#issuecomment-827554970






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




Re: [DISCUSSION] Support JOIN query with spatial index

2021-04-27 Thread Ajantha Bhat
ok.
+1 from my side.

If polygon join query still has performance bottleneck, we can later
optimize it.

Thanks,
Ajantha

On Tue, Apr 27, 2021 at 3:59 PM Indhumathi  wrote:

> Thanks Ajantha for your inputs.
>
> I have modified the design, by adding ToRangeList Udf filter as a implicit
> column projection to the polygon table dataframe and modified the JOIN
> condition with range list udf column, in order to improve performance.
>
> By this way, we can avoid making quadtree from N*M times to M times.
> I have attached new design document in the JIRA.
> CARBONDATA-4166 
>
> Regards,
> Indhumathi
>
>
>
> --
> Sent from:
> http://apache-carbondata-dev-mailing-list-archive.1130556.n5.nabble.com/
>


[GitHub] [carbondata] ShreelekhyaG commented on pull request #4118: [CARBONDATA-4167][CARBONDATA-4168] Fix case sensitive issues and input validation for Geo values.

2021-04-27 Thread GitBox


ShreelekhyaG commented on pull request #4118:
URL: https://github.com/apache/carbondata/pull/4118#issuecomment-827500501


   retest this please


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




Re: [DISCUSSION] Support JOIN query with spatial index

2021-04-27 Thread Indhumathi
Thanks Ajantha for your inputs.

I have modified the design, by adding ToRangeList Udf filter as a implicit 
column projection to the polygon table dataframe and modified the JOIN 
condition with range list udf column, in order to improve performance.

By this way, we can avoid making quadtree from N*M times to M times.
I have attached new design document in the JIRA.
CARBONDATA-4166   

Regards,
Indhumathi



--
Sent from: 
http://apache-carbondata-dev-mailing-list-archive.1130556.n5.nabble.com/


[GitHub] [carbondata] CarbonDataQA2 commented on pull request #4118: [CARBONDATA-4167][CARBONDATA-4168] Fix case sensitive issues and input validation for Geo values.

2021-04-27 Thread GitBox


CarbonDataQA2 commented on pull request #4118:
URL: https://github.com/apache/carbondata/pull/4118#issuecomment-827496922


   Build Failed  with Spark 2.4.5, Please check CI 
http://121.244.95.60:12602/job/ApacheCarbon_PR_Builder_2.4.5/3533/
   


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




[GitHub] [carbondata] CarbonDataQA2 commented on pull request #4118: [CARBONDATA-4167][CARBONDATA-4168] Fix case sensitive issues and input validation for Geo values.

2021-04-27 Thread GitBox


CarbonDataQA2 commented on pull request #4118:
URL: https://github.com/apache/carbondata/pull/4118#issuecomment-827496342


   Build Success with Spark 2.3.4, Please check CI 
http://121.244.95.60:12602/job/ApacheCarbonPRBuilder2.3/5278/
   


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




[GitHub] [carbondata] CarbonDataQA2 commented on pull request #4122: [WIP] Spark 3.1 support

2021-04-27 Thread GitBox


CarbonDataQA2 commented on pull request #4122:
URL: https://github.com/apache/carbondata/pull/4122#issuecomment-827478667


   Build Failed  with Spark 2.3.4, Please check CI 
http://121.244.95.60:12602/job/ApacheCarbonPRBuilder2.3/5276/
   


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




[GitHub] [carbondata] CarbonDataQA2 commented on pull request #4122: [WIP] Spark 3.1 support

2021-04-27 Thread GitBox


CarbonDataQA2 commented on pull request #4122:
URL: https://github.com/apache/carbondata/pull/4122#issuecomment-827477786


   Build Failed  with Spark 2.4.5, Please check CI 
http://121.244.95.60:12602/job/ApacheCarbon_PR_Builder_2.4.5/3531/
   


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




[GitHub] [carbondata] CarbonDataQA2 commented on pull request #4121: [CARBONDATA-4170] Support dropping of parent complex columns(array/struct/map)

2021-04-27 Thread GitBox


CarbonDataQA2 commented on pull request #4121:
URL: https://github.com/apache/carbondata/pull/4121#issuecomment-827476318


   Build Success with Spark 2.4.5, Please check CI 
http://121.244.95.60:12602/job/ApacheCarbon_PR_Builder_2.4.5/3532/
   


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




[GitHub] [carbondata] CarbonDataQA2 commented on pull request #4121: [CARBONDATA-4170] Support dropping of parent complex columns(array/struct/map)

2021-04-27 Thread GitBox


CarbonDataQA2 commented on pull request #4121:
URL: https://github.com/apache/carbondata/pull/4121#issuecomment-827473889


   Build Success with Spark 2.3.4, Please check CI 
http://121.244.95.60:12602/job/ApacheCarbonPRBuilder2.3/5277/
   


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




[GitHub] [carbondata] Indhumathi27 commented on pull request #4118: [CARBONDATA-4167][CARBONDATA-4168] Fix case sensitive issues and input validation for Geo values.

2021-04-27 Thread GitBox


Indhumathi27 commented on pull request #4118:
URL: https://github.com/apache/carbondata/pull/4118#issuecomment-827436458






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




[GitHub] [carbondata] CarbonDataQA2 commented on pull request #4118: [CARBONDATA-4167][CARBONDATA-4168] Fix case sensitive issues and input validation for Geo values.

2021-04-27 Thread GitBox


CarbonDataQA2 commented on pull request #4118:
URL: https://github.com/apache/carbondata/pull/4118#issuecomment-827414341


   Build Failed  with Spark 2.4.5, Please check CI 
http://121.244.95.60:12602/job/ApacheCarbon_PR_Builder_2.4.5/3528/
   


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




[GitHub] [carbondata] CarbonDataQA2 commented on pull request #4118: [CARBONDATA-4167][CARBONDATA-4168] Fix case sensitive issues and input validation for Geo values.

2021-04-27 Thread GitBox


CarbonDataQA2 commented on pull request #4118:
URL: https://github.com/apache/carbondata/pull/4118#issuecomment-827412287


   Build Success with Spark 2.3.4, Please check CI 
http://121.244.95.60:12602/job/ApacheCarbonPRBuilder2.3/5273/
   


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




[GitHub] [carbondata] akkio-97 commented on a change in pull request #4121: [CARBONDATA-4170] Support dropping of parent complex columns(array/struct/map)

2021-04-27 Thread GitBox


akkio-97 commented on a change in pull request #4121:
URL: https://github.com/apache/carbondata/pull/4121#discussion_r620968483



##
File path: docs/index/secondary-index-guide.md
##
@@ -183,6 +183,9 @@ Syntax
   ```
   DROP INDEX [IF EXISTS] index_name ON [TABLE] [db_name.]table_name
   ```
+Note: If a column to be dropped has any Secondary index table created on them, 
drop column 

Review comment:
   added




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




[GitHub] [carbondata] akkio-97 commented on a change in pull request #4121: [CARBONDATA-4170] Support dropping of parent complex columns(array/struct/map)

2021-04-27 Thread GitBox


akkio-97 commented on a change in pull request #4121:
URL: https://github.com/apache/carbondata/pull/4121#discussion_r620968348



##
File path: 
integration/spark/src/main/scala/org/apache/spark/sql/execution/command/schema/CarbonAlterTableDropColumnCommand.scala
##
@@ -147,19 +143,30 @@ private[sql] case class CarbonAlterTableDropColumnCommand(
 metastore.getThriftTableInfo(carbonTable)
   // maintain the deleted columns for schema evolution history

Review comment:
   updated




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




[GitHub] [carbondata] akashrn5 commented on a change in pull request #4121: [CARBONDATA-4170] Support dropping of parent complex columns(array/struct/map)

2021-04-27 Thread GitBox


akashrn5 commented on a change in pull request #4121:
URL: https://github.com/apache/carbondata/pull/4121#discussion_r620955718



##
File path: docs/index/secondary-index-guide.md
##
@@ -183,6 +183,9 @@ Syntax
   ```
   DROP INDEX [IF EXISTS] index_name ON [TABLE] [db_name.]table_name
   ```
+Note: If a column to be dropped has any Secondary index table created on them, 
drop column 

Review comment:
   please add this note in drop column section




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




[GitHub] [carbondata] akashrn5 commented on a change in pull request #4121: [CARBONDATA-4170] Support dropping of parent complex columns(array/struct/map)

2021-04-27 Thread GitBox


akashrn5 commented on a change in pull request #4121:
URL: https://github.com/apache/carbondata/pull/4121#discussion_r620955519



##
File path: 
integration/spark/src/main/scala/org/apache/spark/sql/execution/command/schema/CarbonAlterTableDropColumnCommand.scala
##
@@ -147,19 +143,30 @@ private[sql] case class CarbonAlterTableDropColumnCommand(
 metastore.getThriftTableInfo(carbonTable)
   // maintain the deleted columns for schema evolution history

Review comment:
   please edit comment saying `deletedColumnSchema ` contains parent column 
schema and child also in case of complex and `deletedTableColumns ` contains 
only parent columns in case of complex to add in schemaEvolution entry




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




[GitHub] [carbondata] CarbonDataQA2 commented on pull request #4121: [CARBONDATA-4170] Support dropping of parent complex columns(array/struct/map)

2021-04-27 Thread GitBox


CarbonDataQA2 commented on pull request #4121:
URL: https://github.com/apache/carbondata/pull/4121#issuecomment-827394946


   Build Failed  with Spark 2.3.4, Please check CI 
http://121.244.95.60:12602/job/ApacheCarbonPRBuilder2.3/5272/
   


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




[GitHub] [carbondata] CarbonDataQA2 commented on pull request #4116: [CARBONDATA-4162] Leverage Secondary Index till segment level.

2021-04-27 Thread GitBox


CarbonDataQA2 commented on pull request #4116:
URL: https://github.com/apache/carbondata/pull/4116#issuecomment-827358533


   Build Success with Spark 2.3.4, Please check CI 
http://121.244.95.60:12602/job/ApacheCarbonPRBuilder2.3/5271/
   


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




[GitHub] [carbondata] CarbonDataQA2 commented on pull request #4116: [CARBONDATA-4162] Leverage Secondary Index till segment level.

2021-04-27 Thread GitBox


CarbonDataQA2 commented on pull request #4116:
URL: https://github.com/apache/carbondata/pull/4116#issuecomment-827357941


   Build Success with Spark 2.4.5, Please check CI 
http://121.244.95.60:12602/job/ApacheCarbon_PR_Builder_2.4.5/3526/
   


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




[GitHub] [carbondata] ShreelekhyaG commented on a change in pull request #4118: [CARBONDATA-4167][CARBONDATA-4168] Fix case sensitive issues and input validation for Geo values.

2021-04-27 Thread GitBox


ShreelekhyaG commented on a change in pull request #4118:
URL: https://github.com/apache/carbondata/pull/4118#discussion_r620911580



##
File path: 
integration/spark/src/main/scala/org/apache/spark/sql/execution/strategy/CarbonSourceStrategy.scala
##
@@ -62,10 +62,53 @@ private[sql] object CarbonSourceStrategy extends 
SparkStrategy {
 } catch {
   case _: CarbonPhysicalPlanException => Nil
 }
+  case Project(projectList, _: OneRowRelation) if validateUdf(projectList) 
=> Nil
   case _ => Nil
 }
   }
 
+  private def validateUdf(projects: Seq[NamedExpression]): Boolean = {
+projects foreach {
+  case alias: Alias if alias.child.isInstanceOf[Expression] =>
+alias.child match {
+  case Cast(s: ScalaUDF, _, _) => validateGeoUtilUDFs(s)
+  case s: ScalaUDF => validateGeoUtilUDFs(s)
+  case _ =>
+}
+}
+true
+  }
+
+  def validateGeoUtilUDFs(s: ScalaUDF): Boolean = {
+var geoUdf = false
+if (s.function.isInstanceOf[ToRangeListUDF]) {
+  GeoHashUtils.validateUDFInputValue(s.children.head.toString(), 
"polygon", "String")

Review comment:
   ok, done




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




[GitHub] [carbondata] ShreelekhyaG commented on a change in pull request #4118: [CARBONDATA-4167][CARBONDATA-4168] Fix case sensitive issues and input validation for Geo values.

2021-04-27 Thread GitBox


ShreelekhyaG commented on a change in pull request #4118:
URL: https://github.com/apache/carbondata/pull/4118#discussion_r620911442



##
File path: 
integration/spark/src/main/scala/org/apache/carbondata/geo/GeoUtilUDFs.scala
##
@@ -33,34 +33,51 @@ object GeoUtilUDFs {
   }
 }
 
-class GeoIdToGridXyUDF extends (Long => Array[Int]) with Serializable {
-  override def apply(geoId: Long): Array[Int] = {
+class GeoIdToGridXyUDF extends (java.lang.Long => Array[Int]) with 
Serializable {
+  override def apply(geoId: java.lang.Long): Array[Int] = {
+GeoHashUtils.validateUDFInputValue(geoId, "geoId", "Long")
 GeoHashUtils.geoID2ColRow(geoId)
   }
 }
 
-class GeoIdToLatLngUDF extends ((Long, Double, Int) => Array[Double]) with 
Serializable {
-  override def apply(geoId: Long, oriLatitude: Double, gridSize: Int): 
Array[Double] = {
+class GeoIdToLatLngUDF
+  extends ((java.lang.Long, java.lang.Double, java.lang.Integer) => 
Array[Double]) with
+Serializable {
+  override def apply(geoId: java.lang.Long, oriLatitude: java.lang.Double,
+  gridSize: java.lang.Integer): Array[Double] = {
+GeoHashUtils.validateUDFInputValue(geoId, "geoId", "Long")
+GeoHashUtils.validateUDFInputValue(oriLatitude, "oriLatitude", "Double")
+GeoHashUtils.validateUDFInputValue(gridSize, "gridSize", "Integer")
 GeoHashUtils.geoID2LatLng(geoId, oriLatitude, gridSize)
   }
 }
 
-class LatLngToGeoIdUDF extends ((Long, Long, Double, Int) => Long) with 
Serializable {
-  override def apply(latitude: Long, longitude: Long, oriLatitude: Double, 
gridSize: Int): Long = {
+class LatLngToGeoIdUDF extends ((java.lang.Long, java.lang.Long,
+  java.lang.Double, java.lang.Integer) => Long) with Serializable {
+  override def apply(latitude: java.lang.Long, longitude: java.lang.Long,
+  oriLatitude: java.lang.Double, gridSize: java.lang.Integer): Long = {
+GeoHashUtils.validateUDFInputValue(latitude, "latitude", "Long")
+GeoHashUtils.validateUDFInputValue(longitude, "longitude", "Long")
+GeoHashUtils.validateUDFInputValue(oriLatitude, "oriLatitude", "Double")
+GeoHashUtils.validateUDFInputValue(gridSize, "gridSize", "Integer")
 GeoHashUtils.lonLat2GeoID(longitude, latitude, oriLatitude, gridSize)
   }
 }
 
-class ToUpperLayerGeoIdUDF extends (Long => Long) with Serializable {
-  override def apply(geoId: Long): Long = {
+class ToUpperLayerGeoIdUDF extends (java.lang.Long => Long) with Serializable {
+  override def apply(geoId: java.lang.Long): Long = {
+GeoHashUtils.validateUDFInputValue(geoId, "geoId", "Long")
 GeoHashUtils.convertToUpperLayerGeoId(geoId)
   }
 }
 
-class ToRangeListUDF extends ((String, Double, Int) => 
mutable.Buffer[Array[Long]])
-  with Serializable {
-  override def apply(polygon: String, oriLatitude: Double,
- gridSize: Int): mutable.Buffer[Array[Long]] = {
+class ToRangeListUDF extends ((java.lang.String, java.lang.Double, 
java.lang.Integer) =>
+  mutable.Buffer[Array[Long]]) with Serializable {
+  override def apply(polygon: java.lang.String, oriLatitude: java.lang.Double,
+  gridSize: java.lang.Integer): mutable.Buffer[Array[Long]] = {
+GeoHashUtils.validateUDFInputValue(polygon, "polygon", "String")

Review comment:
   Done

##
File path: 
integration/spark/src/main/scala/org/apache/spark/sql/execution/strategy/CarbonSourceStrategy.scala
##
@@ -62,10 +62,53 @@ private[sql] object CarbonSourceStrategy extends 
SparkStrategy {
 } catch {
   case _: CarbonPhysicalPlanException => Nil
 }
+  case Project(projectList, _: OneRowRelation) if validateUdf(projectList) 
=> Nil
   case _ => Nil
 }
   }
 
+  private def validateUdf(projects: Seq[NamedExpression]): Boolean = {
+projects foreach {
+  case alias: Alias if alias.child.isInstanceOf[Expression] =>
+alias.child match {
+  case Cast(s: ScalaUDF, _, _) => validateGeoUtilUDFs(s)
+  case s: ScalaUDF => validateGeoUtilUDFs(s)
+  case _ =>
+}
+}
+true
+  }
+
+  def validateGeoUtilUDFs(s: ScalaUDF): Boolean = {
+var geoUdf = false

Review comment:
   Done




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




[GitHub] [carbondata] Indhumathi27 commented on pull request #4121: [CARBONDATA-4170] Support dropping of parent complex columns(array/struct/map)

2021-04-27 Thread GitBox


Indhumathi27 commented on pull request #4121:
URL: https://github.com/apache/carbondata/pull/4121#issuecomment-827344139


   retest this please


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




[GitHub] [carbondata] Indhumathi27 commented on pull request #4121: [CARBONDATA-4170] Support dropping of parent complex columns(array/struct/map)

2021-04-27 Thread GitBox


Indhumathi27 commented on pull request #4121:
URL: https://github.com/apache/carbondata/pull/4121#issuecomment-827343630


   LGTM


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