You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by GitBox <gi...@apache.org> on 2022/01/24 13:55:13 UTC
[GitHub] [incubator-doris] morningman commented on a change in pull request #7848: [Compatible]http v2 and v1 interface compatible
morningman commented on a change in pull request #7848:
URL: https://github.com/apache/incubator-doris/pull/7848#discussion_r790762852
##########
File path: extension/flink-doris-connector/src/main/java/org/apache/doris/flink/rest/SchemaUtils.java
##########
@@ -33,7 +33,7 @@
*/
public static Schema convertToSchema(List<TScanColumnDesc> tscanColumnDescs) {
Schema schema = new Schema(tscanColumnDescs.size());
- tscanColumnDescs.stream().forEach(desc -> schema.put(new Field(desc.getName(), desc.getType().name(), "", 0, 0)));
+ tscanColumnDescs.stream().forEach(desc -> schema.put(new Field(desc.getName(), desc.getType().name(), "", 0, 0,"")));
Review comment:
```suggestion
tscanColumnDescs.stream().forEach(desc -> schema.put(new Field(desc.getName(), desc.getType().name(), "", 0, 0, "")));
```
##########
File path: extension/flink-doris-connector/src/main/java/org/apache/doris/flink/rest/models/Field.java
##########
@@ -25,16 +25,26 @@
private String comment;
private int precision;
private int scale;
+ private String aggregation_type;
public Field() {
}
- public Field(String name, String type, String comment, int precision, int scale) {
+ public Field(String name, String type, String comment, int precision, int scale,String aggregation_type) {
Review comment:
```suggestion
public Field(String name, String type, String comment, int precision, int scale, String aggregation_type) {
```
##########
File path: extension/spark-doris-connector/src/test/java/org/apache/doris/spark/rest/TestRestService.java
##########
@@ -121,11 +121,11 @@ public void testGetUriStr() throws Exception {
@Test
public void testFeResponseToSchema() throws Exception {
String res = "{\"properties\":[{\"type\":\"TINYINT\",\"name\":\"k1\",\"comment\":\"\"},{\"name\":\"k5\","
- + "\"scale\":\"0\",\"comment\":\"\",\"type\":\"DECIMALV2\",\"precision\":\"9\"}],\"status\":200}";
+ + "\"scale\":\"0\",\"comment\":\"\",\"type\":\"DECIMALV2\",\"precision\":\"9\",\"}],\"status\":200}";
Schema expected = new Schema();
expected.setStatus(200);
- Field k1 = new Field("k1", "TINYINT", "", 0, 0);
- Field k5 = new Field("k5", "DECIMALV2", "", 9, 0);
+ Field k1 = new Field("k1", "TINYINT", "", 0, 0,"");
Review comment:
```suggestion
Field k1 = new Field("k1", "TINYINT", "", 0, 0, "");
```
--
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-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org