Skip to content

Conversation

@BiteTheDDDDt
Copy link
Contributor

@BiteTheDDDDt BiteTheDDDDt commented Apr 8, 2022

Proposed changes

@924060929 PTAL
Issue Number: close #8729

Problem Summary:

Describe the overview of changes.

Checklist(Required)

  1. Does it affect the original behavior: (Yes/No/I Don't know)
  2. Has unit tests been added: (Yes/No/No Need)
  3. Has document been added or modified: (Yes/No/No Need)
  4. Does it need to update dependencies: (Yes/No)
  5. Are there any changes that cannot be rolled back: (Yes/No)

Further comments

If this is a relatively large or complex change, kick off the discussion at dev@doris.apache.org by explaining why you chose the solution you did and what alternatives you considered, etc...

@BiteTheDDDDt BiteTheDDDDt force-pushed the dev_0408 branch 2 times, most recently from e0316d6 to aa785ea Compare April 8, 2022 13:15
}

static String checkCell(String info, int line, String expect_cell, String real_cell, String data_type) {
if(data_type == "FLOAT" || data_type == "DOUBLE") {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggest change to camel case

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 ->
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggest new Metaholder in JdbcUtils and return, and you can extract the interest metadata out of the Connection life cycle safely.

e.g.

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

def (result, metadata) = JdbcUtils.executeToList(connnection, sql)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

@BiteTheDDDDt BiteTheDDDDt force-pushed the dev_0408 branch 2 times, most recently from 4228a3c to 7cd7982 Compare April 12, 2022 09:00
@924060929
Copy link
Contributor

+1

1 similar comment
@924060929
Copy link
Contributor

+1

@924060929 924060929 added the approved Indicates a PR has been approved by one committer. label Apr 13, 2022
Copy link
Contributor

@HappenLee HappenLee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@github-actions
Copy link
Contributor

PR approved by anyone and no changes requested.

@morningman morningman added the dev/backlog waiting to be merged in future dev branch label Apr 14, 2022
@HappenLee HappenLee merged commit 90cf8dd into apache:master Apr 15, 2022
weizhengte pushed a commit to weizhengte/incubator-doris that referenced this pull request Apr 22, 2022
zhengshiJ pushed a commit to zhengshiJ/incubator-doris that referenced this pull request Apr 27, 2022
starocean999 pushed a commit to starocean999/incubator-doris that referenced this pull request May 19, 2022
englefly pushed a commit to englefly/incubator-doris that referenced this pull request May 23, 2022
@BiteTheDDDDt BiteTheDDDDt deleted the dev_0408 branch January 20, 2025 06:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by one committer. dev/backlog waiting to be merged in future dev branch kind/test reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Enhancement] enhancement for regression-test framework

4 participants