SilverNarcissus commented on a change in pull request #4477:
URL: https://github.com/apache/iotdb/pull/4477#discussion_r761609286
##########
File path:
spark-iotdb-connector/src/main/scala/org/apache/iotdb/spark/db/Converter.scala
##########
@@ -65,7 +65,11 @@ object Converter {
}
val colCount = resultSetMetaData.getColumnCount
- for (i <- 2 to colCount) {
+ var startIndex = 2
+ if (options.sql.toLowerCase.contains("count")) {
Review comment:
All aggregation function should be filtered. A better way is check
whether the first index column is "time".
##########
File path:
spark-iotdb-connector/src/test/scala/org/apache/iotdb/spark/db/IoTDBTest.scala
##########
@@ -20,7 +20,6 @@
package org.apache.iotdb.spark.db
import java.io.ByteArrayOutputStream
-
Review comment:
We should add some insert test and check whether the result is correct.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]