This is an automated email from the ASF dual-hosted git repository.
critas pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/iotdb.git
The following commit(s) were added to refs/heads/master by this push:
new 94e0f30598f Parameter Naming Adjustment for the Table Model of REST
Service example (#14575)
94e0f30598f is described below
commit 94e0f30598fbe76ac15e019e442b4b430b7afb5f
Author: CloudWise-Lukemiao <[email protected]>
AuthorDate: Mon Dec 30 14:57:38 2024 +0800
Parameter Naming Adjustment for the Table Model of REST Service example
(#14575)
* Parameter Naming Adjustment for the Table Model of REST Service example
* Parameter Naming Adjustment for the Table Model of REST Service example
* Parameter Naming Adjustment for the Table Model of REST Service example
---
.../src/main/java/org/apache/iotdb/TableHttpExample.java | 4 ++--
.../src/main/java/org/apache/iotdb/TableHttpsExample.java | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git
a/example/rest-java-example/src/main/java/org/apache/iotdb/TableHttpExample.java
b/example/rest-java-example/src/main/java/org/apache/iotdb/TableHttpExample.java
index fb223ae7b91..ba419eddd7f 100644
---
a/example/rest-java-example/src/main/java/org/apache/iotdb/TableHttpExample.java
+++
b/example/rest-java-example/src/main/java/org/apache/iotdb/TableHttpExample.java
@@ -93,7 +93,7 @@ public class TableHttpExample {
try {
HttpPost httpPost =
getHttpPost("http://127.0.0.1:18080/rest/table/v1/insertTablet");
String json =
-
"{\"database\":\"test\",\"column_types\":[\"ID\",\"ATTRIBUTE\",\"MEASUREMENT\"],\"timestamps\":[1635232143960,1635232153960,1635232163960,1635232173960,1635232183960],\"column_names\":[\"id1\",\"t1\",\"s1\"],\"data_types\":[\"STRING\",\"STRING\",\"FLOAT\"],\"values\":[[\"a11\",\"true\",11333],[\"a11\",\"false\",22333],[\"a13\",\"false1\",23333],[\"a14\",\"false2\",24],[\"a15\",\"false3\",25]],\"table\":\"sg211\"}";
+
"{\"database\":\"test\",\"column_catogories\":[\"TAG\",\"ATTRIBUTE\",\"FIELD\"],\"timestamps\":[1635232143960,1635232153960,1635232163960,1635232173960,1635232183960],\"column_names\":[\"id1\",\"t1\",\"s1\"],\"data_types\":[\"STRING\",\"STRING\",\"FLOAT\"],\"values\":[[\"a11\",\"true\",11333],[\"a11\",\"false\",22333],[\"a13\",\"false1\",23333],[\"a14\",\"false2\",24],[\"a15\",\"false3\",25]],\"table\":\"sg211\"}";
httpPost.setEntity(new StringEntity(json, Charset.defaultCharset()));
response = httpClient.execute(httpPost);
HttpEntity responseEntity = response.getEntity();
@@ -174,7 +174,7 @@ public class TableHttpExample {
try {
HttpPost httpPost =
getHttpPost("http://127.0.0.1:18080/rest/table/v1/nonQuery");
String sql =
- "{\"database\":\"test\",\"sql\":\"create table sg211 (id1 string
id,t1 STRING ATTRIBUTE, s1 FLOAT measurement)\"}";
+ "{\"database\":\"test\",\"sql\":\"create table sg211 (id1 string
TAG,t1 STRING ATTRIBUTE, s1 FLOAT FIELD)\"}";
httpPost.setEntity(new StringEntity(sql, Charset.defaultCharset()));
response = httpClient.execute(httpPost);
HttpEntity responseEntity = response.getEntity();
diff --git
a/example/rest-java-example/src/main/java/org/apache/iotdb/TableHttpsExample.java
b/example/rest-java-example/src/main/java/org/apache/iotdb/TableHttpsExample.java
index aa5e4afd76d..c6d8d4709e4 100644
---
a/example/rest-java-example/src/main/java/org/apache/iotdb/TableHttpsExample.java
+++
b/example/rest-java-example/src/main/java/org/apache/iotdb/TableHttpsExample.java
@@ -93,7 +93,7 @@ public class TableHttpsExample {
try {
HttpPost httpPost =
getHttpPost("https://127.0.0.1:18080/rest/table/v1/insertTablet");
String json =
-
"{\"database\":\"test\",\"column_types\":[\"ID\",\"ATTRIBUTE\",\"MEASUREMENT\"],\"timestamps\":[1635232143960,1635232153960,1635232163960,1635232173960,1635232183960],\"column_names\":[\"id1\",\"t1\",\"s1\"],\"data_types\":[\"STRING\",\"STRING\",\"FLOAT\"],\"values\":[[\"a11\",\"true\",11333],[\"a11\",\"false\",22333],[\"a13\",\"false1\",23333],[\"a14\",\"false2\",24],[\"a15\",\"false3\",25]],\"table\":\"sg211\"}";
+
"{\"database\":\"test\",\"column_catogories\":[\"TAG\",\"ATTRIBUTE\",\"FIELD\"],\"timestamps\":[1635232143960,1635232153960,1635232163960,1635232173960,1635232183960],\"column_names\":[\"id1\",\"t1\",\"s1\"],\"data_types\":[\"STRING\",\"STRING\",\"FLOAT\"],\"values\":[[\"a11\",\"true\",11333],[\"a11\",\"false\",22333],[\"a13\",\"false1\",23333],[\"a14\",\"false2\",24],[\"a15\",\"false3\",25]],\"table\":\"sg211\"}";
httpPost.setEntity(new StringEntity(json, Charset.defaultCharset()));
response = httpClient.execute(httpPost);
HttpEntity responseEntity = response.getEntity();
@@ -174,7 +174,7 @@ public class TableHttpsExample {
try {
HttpPost httpPost =
getHttpPost("https://127.0.0.1:18080/rest/table/v1/nonQuery");
String sql =
- "{\"database\":\"test\",\"sql\":\"create table sg211 (id1 string
id,t1 STRING ATTRIBUTE, s1 FLOAT measurement)\"}";
+ "{\"database\":\"test\",\"sql\":\"create table sg211 (id1 string
TAG,t1 STRING ATTRIBUTE, s1 FLOAT FIELD)\"}";
httpPost.setEntity(new StringEntity(sql, Charset.defaultCharset()));
response = httpClient.execute(httpPost);
HttpEntity responseEntity = response.getEntity();