Skip to content

Conversation

@Cai-Yao
Copy link
Contributor

@Cai-Yao Cai-Yao commented Apr 3, 2023

Proposed changes

Issue Number: close #xxx

Problem summary

show dateV2/datetimeV2 to date/datetime

  • modify show create table
  • modify desc table
  • use desc table all to get real type from column ColumnType

Checklist(Required)

  • Does it affect the original behavior
  • Has unit tests been added
  • Has document been added or modified
  • Does it need to update dependencies
  • Is this PR support rollback (If NO, please explain WHY)

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

@github-actions github-actions bot added the area/planner Issues or PRs related to the query planner label Apr 3, 2023
Copy link
Contributor

@yiguolei yiguolei left a comment

Choose a reason for hiding this comment

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

Add regression test please.

@yiguolei yiguolei added dev/1.2.4 usercase Important user case type label labels Apr 4, 2023
@morningman morningman changed the title [Enchancement](compatable) show dateV2/datetimeV2 to date/datetime [Enchancement](compatible) show dateV2/datetimeV2 to date/datetime Apr 6, 2023
@morningman
Copy link
Contributor

Do not changing comment. The comment is "user specified info", you should not modify any content specified by user.
I suggest to extent the column of desc table all statement, to add a new column to indicate the v2/v3 info

.addColumn(new Column("IndexKeysType", ScalarType.createVarchar(20)))
.addColumn(new Column("Field", ScalarType.createVarchar(20)))
.addColumn(new Column("Type", ScalarType.createVarchar(20)))
.addColumn(new Column("ColumnType", ScalarType.createVarchar(20)))
Copy link
Contributor

Choose a reason for hiding this comment

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

InternalType

"",
column.getName(),
column.getOriginType().toString(),
column.getOriginType().toString(),
Copy link
Contributor

Choose a reason for hiding this comment

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

是不是跟213 行重复了

Copy link
Contributor Author

@Cai-Yao Cai-Yao Apr 7, 2023

Choose a reason for hiding this comment

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

是不是跟213 行重复了

不是,一个是替换后的type,一个是新加的InternalYype列

List<List<String>> res = new ArrayList<>();
for (List<String> row : rows) {
// show DATEV2/DATETIMEV2 to DATE/DATETIME for compatibility
if (row.get(1).length() >= 6 && row.get(1).substring(0, 6).equals("DATEV2")) {
Copy link
Contributor

Choose a reason for hiding this comment

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

why add these code?

Copy link
Contributor

@yiguolei yiguolei left a comment

Choose a reason for hiding this comment

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

LGTM

@yiguolei
Copy link
Contributor

yiguolei commented Apr 9, 2023

run buildall

@github-actions github-actions bot added the approved Indicates a PR has been approved by one committer. label Apr 9, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Apr 9, 2023

PR approved by at least one committer and no changes requested.

@github-actions
Copy link
Contributor

github-actions bot commented Apr 9, 2023

PR approved by anyone and no changes requested.

@yiguolei yiguolei merged commit 8a4a92f into apache:master Apr 9, 2023
gnehil pushed a commit to gnehil/doris that referenced this pull request Apr 21, 2023
…pache#18358)

show dateV2/datetimeV2 to date/datetime

modify show create table
modify desc table
use desc table all to get real type from column ColumnType
@xiaokang xiaokang mentioned this pull request Jun 21, 2023
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. area/planner Issues or PRs related to the query planner dev/1.2.4-merged kind/behavior-changed kind/test reviewed usercase Important user case type label

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants