VenuReddy2103 commented on a change in pull request #4012:
URL: https://github.com/apache/carbondata/pull/4012#discussion_r532663075
##########
File path:
integration/spark/src/test/scala/org/apache/carbondata/geo/GeoTest.scala
##########
@@ -276,17 +274,14 @@ class GeoTest extends QueryTest with BeforeAndAfterAll
with BeforeAndAfterEach {
| 'SPATIAL_INDEX.spatial.sourcecolumns'='longitude, latitude',
| 'SPATIAL_INDEX.spatial.originLatitude'='39.832277',
| 'SPATIAL_INDEX.spatial.gridSize'='60',
- | 'SPATIAL_INDEX.spatial.minLongitude'='115.811865',
- | 'SPATIAL_INDEX.spatial.maxLongitude'='116.782233',
- | 'SPATIAL_INDEX.spatial.minLatitude'='39.832277',
- | 'SPATIAL_INDEX.spatial.maxLatitude'='40.225281',
| 'SPATIAL_INDEX.spatial.conversionRatio'='1000000')
""".stripMargin)
loadData(sourceTable)
createTable(targetTable)
+ // INSERT INTO will keep SPATIAL_INDEX column from sourceTable instead of
generating internally
sql(s"insert into $targetTable select * from $sourceTable")
- checkAnswer(sql(s"select *from $targetTable where mygeohash = '2196036'"),
- Seq(Row(2196036, 1575428400000L, 116337069, 39951887)))
+ checkAnswer(sql(s"select *from $targetTable where mygeohash =
'233137655761'"),
Review comment:
We seem to be copying mygeohash value of soureTable as is to targetTable
even if the `gridsize` and `originLatitude` params of both source and target
tables are different? This seem like a problem because if user uses UDFs like
convert from longlat2geoid, geoId2longlat etc, need to input the gridsize and
originLatitude of the source table or target table ?
Any particular reason to avoid the mygeohash value generation for target
table?
----------------------------------------------------------------
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:
[email protected]