924060929 commented on code in PR #8930:
URL: https://github.com/apache/incubator-doris/pull/8930#discussion_r847164901


##########
regression-test/framework/src/main/groovy/org/apache/doris/regression/util/JdbcUtils.groovy:
##########
@@ -18,37 +18,40 @@
 package org.apache.doris.regression.util
 
 import com.google.common.collect.ImmutableList
+import org.apache.doris.regression.util.Metaholder
 
 import java.sql.Connection
 import java.sql.ResultSet
+import java.sql.ResultSetMetaData
 
 class JdbcUtils {
-    static List<List<Object>> executeToList(Connection conn, String sql) {
+    static List<List<Object>> executeToList(Connection conn, String sql, 
Metaholder holder) {
         conn.prepareStatement(sql).withCloseable { stmt ->

Review Comment:
   suggest `new Metaholder` in `JdbcUtils` and return, and you can extract the 
interest metadata out of the `Connection` life cycle safely.
   
   e.g.
   
   ```groovy
   class Metadata {
     public final List<String> columnNames;
     public final List<String> columnTypes;
   }
   
   static Tuple2<List<List<Object>>, Metadata> executeToList(Connection conn, 
String sql) {
     def metadata = new Metadata()
     resultList = ...
     metadata.columnNames = ...
     metadata.columnTypes = ...
     return [resultList, metadata]
   }
   ```
   then, you can take result by this code
   ```groovy
   def (result, metadata) = JdbcUtils.executeToList(connnection, sql)
   ```



##########
regression-test/framework/src/main/groovy/org/apache/doris/regression/util/OutputUtils.groovy:
##########
@@ -44,9 +53,36 @@ class OutputUtils {
         return writer.toString()
     }
 
+    static String checkCell(String info, int line, String expect_cell, String 
real_cell, String data_type) {
+        if(data_type == "FLOAT" || data_type == "DOUBLE") {

Review Comment:
   suggest change to camel case



-- 
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: commits-unsubscr...@doris.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to