## Proposed changes bp #42074
This commit is contained in:
@ -48,6 +48,8 @@ curl "http://${ES_5_HOST}:9200/test1" -H "Content-Type:application/json" -X PUT
|
||||
curl "http://${ES_5_HOST}:9200/test2_20220808" -H "Content-Type:application/json" -X PUT -d '@/mnt/scripts/index/es6_test2.json'
|
||||
# create index test2_20220809
|
||||
curl "http://${ES_5_HOST}:9200/test2_20220809" -H "Content-Type:application/json" -X PUT -d '@/mnt/scripts/index/es6_test2.json'
|
||||
# create index test3_20231005
|
||||
curl "http://${ES_5_HOST}:9200/test3_20231005" -H "Content-Type:application/json" -X PUT -d '@/mnt/scripts/index/es6_test3.json'
|
||||
# put data for test1
|
||||
curl "http://${ES_5_HOST}:9200/test1/doc/1" -H "Content-Type:application/json" -X POST -d '@/mnt/scripts/data/data1_es6.json'
|
||||
curl "http://${ES_5_HOST}:9200/test1/doc/2" -H "Content-Type:application/json" -X POST -d '@/mnt/scripts/data/data2_es6.json'
|
||||
@ -62,6 +64,8 @@ curl "http://${ES_5_HOST}:9200/test2_20220808/doc/3" -H "Content-Type:applicatio
|
||||
curl "http://${ES_5_HOST}:9200/test2_20220809/doc/1" -H "Content-Type:application/json" -X POST -d '@/mnt/scripts/data/data1_es6.json'
|
||||
curl "http://${ES_5_HOST}:9200/test2_20220809/doc/2" -H "Content-Type:application/json" -X POST -d '@/mnt/scripts/data/data2_es6.json'
|
||||
curl "http://${ES_5_HOST}:9200/test2_20220809/doc/3" -H "Content-Type:application/json" -X POST -d '@/mnt/scripts/data/data3_es5.json'
|
||||
# put data for test3_20231005
|
||||
curl "http://${ES_5_HOST}:9200/test3_20231005/doc/1?routing=my_routing_value" -H "Content-Type:application/json" -X POST -d '@/mnt/scripts/data/data6.json'
|
||||
# put _meta for array
|
||||
curl "http://${ES_5_HOST}:9200/test1/doc/_mapping" -H "Content-Type:application/json" -X PUT -d "@/mnt/scripts/index/array_meta.json"
|
||||
curl "http://${ES_5_HOST}:9200/test2_20220808/doc/_mapping" -H "Content-Type:application/json" -X PUT -d "@/mnt/scripts/index/array_meta.json"
|
||||
@ -85,6 +89,8 @@ curl "http://${ES_6_HOST}:9200/test1" -H "Content-Type:application/json" -X PUT
|
||||
curl "http://${ES_6_HOST}:9200/test2_20220808" -H "Content-Type:application/json" -X PUT -d '@/mnt/scripts/index/es6_test2.json'
|
||||
# create index test2_20220809
|
||||
curl "http://${ES_6_HOST}:9200/test2_20220809" -H "Content-Type:application/json" -X PUT -d '@/mnt/scripts/index/es6_test2.json'
|
||||
# create index test3_20231005
|
||||
curl "http://${ES_6_HOST}:9200/test3_20231005" -H "Content-Type:application/json" -X PUT -d '@/mnt/scripts/index/es6_test3.json'
|
||||
# put data for test1
|
||||
curl "http://${ES_6_HOST}:9200/test1/doc/1" -H "Content-Type:application/json" -X POST -d '@/mnt/scripts/data/data1_es6.json'
|
||||
curl "http://${ES_6_HOST}:9200/test1/doc/2" -H "Content-Type:application/json" -X POST -d '@/mnt/scripts/data/data2_es6.json'
|
||||
@ -98,6 +104,8 @@ curl "http://${ES_6_HOST}:9200/test2_20220808/doc/3" -H "Content-Type:applicatio
|
||||
curl "http://${ES_6_HOST}:9200/test2_20220809/doc/1" -H "Content-Type:application/json" -X POST -d '@/mnt/scripts/data/data1_es6.json'
|
||||
curl "http://${ES_6_HOST}:9200/test2_20220809/doc/2" -H "Content-Type:application/json" -X POST -d '@/mnt/scripts/data/data2_es6.json'
|
||||
curl "http://${ES_6_HOST}:9200/test2_20220809/doc/3" -H "Content-Type:application/json" -X POST -d '@/mnt/scripts/data/data3_es6.json'
|
||||
# put data for test3_20231005
|
||||
curl "http://${ES_6_HOST}:9200/test3_20231005/doc/1?routing=my_routing_value" -H "Content-Type:application/json" -X POST -d '@/mnt/scripts/data/data6.json'
|
||||
# put _meta for array
|
||||
curl "http://${ES_6_HOST}:9200/test1/doc/_mapping" -H "Content-Type:application/json" -X PUT -d "@/mnt/scripts/index/array_meta.json"
|
||||
curl "http://${ES_6_HOST}:9200/test2_20220808/doc/_mapping" -H "Content-Type:application/json" -X PUT -d "@/mnt/scripts/index/array_meta.json"
|
||||
@ -139,7 +147,7 @@ curl "http://${ES_7_HOST}:9200/test2_20220809/_doc/2" -H "Content-Type:applicati
|
||||
curl "http://${ES_7_HOST}:9200/test2_20220809/_doc/3" -H "Content-Type:application/json" -X POST -d '@/mnt/scripts/data/data3.json'
|
||||
curl "http://${ES_7_HOST}:9200/test2_20220809/_doc/4" -H "Content-Type:application/json" -X POST -d '@/mnt/scripts/data/data4.json'
|
||||
# put data for test3_20231005
|
||||
curl "http://${ES_7_HOST}:9200/test3_20231005/_doc/1" -H "Content-Type:application/json" -X POST -d '@/mnt/scripts/data/data6.json'
|
||||
curl "http://${ES_7_HOST}:9200/test3_20231005/_doc/1?routing=my_routing_value" -H "Content-Type:application/json" -X POST -d '@/mnt/scripts/data/data6.json'
|
||||
|
||||
# put _meta for array
|
||||
curl "http://${ES_7_HOST}:9200/test1/_mapping" -H "Content-Type:application/json" -X PUT -d "@/mnt/scripts/index/array_meta.json"
|
||||
@ -185,7 +193,7 @@ curl "http://${ES_8_HOST}:9200/test2_20220809/_doc/2" -H "Content-Type:applicati
|
||||
curl "http://${ES_8_HOST}:9200/test2_20220809/_doc/3" -H "Content-Type:application/json" -X POST -d '@/mnt/scripts/data/data3.json'
|
||||
curl "http://${ES_8_HOST}:9200/test2_20220809/_doc/4" -H "Content-Type:application/json" -X POST -d '@/mnt/scripts/data/data4.json'
|
||||
# put data for test3_20231005
|
||||
curl "http://${ES_8_HOST}:9200/test3_20231005/_doc/1" -H "Content-Type:application/json" -X POST -d '@/mnt/scripts/data/data6.json'
|
||||
curl "http://${ES_8_HOST}:9200/test3_20231005/_doc/1?routing=my_routing_value" -H "Content-Type:application/json" -X POST -d '@/mnt/scripts/data/data6.json'
|
||||
|
||||
# put _meta for array
|
||||
curl "http://${ES_8_HOST}:9200/test1/_mapping" -H "Content-Type:application/json" -X PUT -d "@/mnt/scripts/index/array_meta.json"
|
||||
@ -199,4 +207,4 @@ bulk_request_file="/mnt/scripts/data/bulk_request_es8.json"
|
||||
generate_bulk_request "composite_type_array" "" "item_" "$array_data_file" "$bulk_request_file"
|
||||
curl -X POST "http://${ES_8_HOST}:9200/_bulk" --data-binary "@$bulk_request_file" -H "Content-Type: application/json"
|
||||
# put _meta for composite_type_array
|
||||
curl "http://${ES_8_HOST}:9200/composite_type_array/_mapping" -H "Content-Type:application/json" -X PUT -d "@/mnt/scripts/index/array_meta_composite_type_array.json"
|
||||
curl "http://${ES_8_HOST}:9200/composite_type_array/_mapping" -H "Content-Type:application/json" -X PUT -d "@/mnt/scripts/index/array_meta_composite_type_array.json"
|
||||
|
||||
@ -0,0 +1,27 @@
|
||||
{
|
||||
"settings": {
|
||||
"number_of_shards": 1,
|
||||
"number_of_replicas": 0
|
||||
},
|
||||
"mappings": {
|
||||
"doc": {
|
||||
"dynamic": "true",
|
||||
"dynamic_date_formats": [
|
||||
"strict_date_optional_time",
|
||||
"yyyy/MM/dd HH:mm:ss Z||yyyy/MM/dd Z"
|
||||
],
|
||||
"dynamic_templates": [
|
||||
|
||||
],
|
||||
"date_detection": true,
|
||||
"numeric_detection": false,
|
||||
"_routing": {
|
||||
"required": true
|
||||
},
|
||||
"properties": {
|
||||
"field1": { "type": "text" },
|
||||
"field2": { "type": "keyword" }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -14,6 +14,9 @@
|
||||
],
|
||||
"date_detection": true,
|
||||
"numeric_detection": false,
|
||||
"_routing": {
|
||||
"required": true
|
||||
},
|
||||
"properties": {
|
||||
"field1": { "type": "text" },
|
||||
"field2": { "type": "keyword" }
|
||||
|
||||
@ -217,6 +217,9 @@ Grace [34, 56, 78] ["table tennis", "badminton", "athletics"]
|
||||
Henry [23, 45, 67] ["archery", "fencing", "weightlifting"]
|
||||
Ivy [12, 34, 56] ["judo", "karate", "taekwondo"]
|
||||
|
||||
-- !sql_5_28 --
|
||||
value1 value2
|
||||
|
||||
-- !sql_6_02 --
|
||||
[1, 0, 1, 1] [1, -2, -3, 4] ["2020-01-01", "2020-01-02"] ["2020-01-01 12:00:00", "2020-01-02 13:01:01"] [1, 2, 3, 4] [1, 1.1, 1.2, 1.3] [1, 2, 3, 4] [32768, 32769, -32769, -32770] ["192.168.0.1", "127.0.0.1"] ["a", "b", "c"] [-1, 0, 1, 2] [{"name":"Andy","age":18},{"name":"Tim","age":28}] [1, 2, 3, 4] [128, 129, -129, -130] ["d", "e", "f"] [0, 1, 2, 3] [{"last":"Smith","first":"John"},{"last":"White","first":"Alice"}] \N string1 text#1 3.14 2022-08-08T00:00 12345 2022-08-08T20:10:10
|
||||
|
||||
@ -343,6 +346,9 @@ Grace [34, 56, 78] ["table tennis", "badminton", "athletics"]
|
||||
Henry [23, 45, 67] ["archery", "fencing", "weightlifting"]
|
||||
Ivy [12, 34, 56] ["judo", "karate", "taekwondo"]
|
||||
|
||||
-- !sql_6_28 --
|
||||
value1 value2
|
||||
|
||||
-- !sql_7_02 --
|
||||
[1, 0, 1, 1] [1, -2, -3, 4] ["2020-01-01", "2020-01-02"] ["2020-01-01 12:00:00", "2020-01-02 13:01:01"] [1, 2, 3, 4] [1, 1.1, 1.2, 1.3] [1, 2, 3, 4] [32768, 32769, -32769, -32770] ["192.168.0.1", "127.0.0.1"] ["a", "b", "c"] [-1, 0, 1, 2] [{"name":"Andy","age":18},{"name":"Tim","age":28}] [1, 2, 3, 4] [128, 129, -129, -130] ["d", "e", "f"] [0, 1, 2, 3] [{"last":"Smith","first":"John"},{"last":"White","first":"Alice"}] debug \N This string can be quite lengthy string1 2022-08-08T20:10:10 text#1 3.14 2022-08-08T00:00 2022-08-08T12:10:10 1659931810000 2022-08-08T12:10:10 2022-08-08T20:10:10 12345
|
||||
|
||||
@ -897,6 +903,9 @@ Grace [34, 56, 78] ["table tennis", "badminton", "athletics"]
|
||||
Henry [23, 45, 67] ["archery", "fencing", "weightlifting"]
|
||||
Ivy [12, 34, 56] ["judo", "karate", "taekwondo"]
|
||||
|
||||
-- !sql_5_28 --
|
||||
value1 value2
|
||||
|
||||
-- !sql_6_02 --
|
||||
[1, 0, 1, 1] [1, -2, -3, 4] ["2020-01-01", "2020-01-02"] ["2020-01-01 12:00:00", "2020-01-02 13:01:01"] [1, 2, 3, 4] [1, 1.1, 1.2, 1.3] [1, 2, 3, 4] [32768, 32769, -32769, -32770] ["192.168.0.1", "127.0.0.1"] ["a", "b", "c"] [-1, 0, 1, 2] [{"name":"Andy","age":18},{"name":"Tim","age":28}] [1, 2, 3, 4] [128, 129, -129, -130] ["d", "e", "f"] [0, 1, 2, 3] [{"last":"Smith","first":"John"},{"last":"White","first":"Alice"}] \N string1 text#1 3.14 2022-08-08T00:00 12345 2022-08-08T20:10:10
|
||||
|
||||
@ -1023,6 +1032,9 @@ Grace [34, 56, 78] ["table tennis", "badminton", "athletics"]
|
||||
Henry [23, 45, 67] ["archery", "fencing", "weightlifting"]
|
||||
Ivy [12, 34, 56] ["judo", "karate", "taekwondo"]
|
||||
|
||||
-- !sql_6_28 --
|
||||
value1 value2
|
||||
|
||||
-- !sql_7_02 --
|
||||
[1, 0, 1, 1] [1, -2, -3, 4] ["2020-01-01", "2020-01-02"] ["2020-01-01 12:00:00", "2020-01-02 13:01:01"] [1, 2, 3, 4] [1, 1.1, 1.2, 1.3] [1, 2, 3, 4] [32768, 32769, -32769, -32770] ["192.168.0.1", "127.0.0.1"] ["a", "b", "c"] [-1, 0, 1, 2] [{"name":"Andy","age":18},{"name":"Tim","age":28}] [1, 2, 3, 4] [128, 129, -129, -130] ["d", "e", "f"] [0, 1, 2, 3] [{"last":"Smith","first":"John"},{"last":"White","first":"Alice"}] debug \N This string can be quite lengthy string1 2022-08-08T20:10:10 text#1 3.14 2022-08-08T00:00 2022-08-08T12:10:10 1659931810000 2022-08-08T12:10:10 2022-08-08T20:10:10 12345
|
||||
|
||||
|
||||
@ -213,6 +213,7 @@ suite("test_es_query", "p0,external,es,external_docker,external_docker_es") {
|
||||
order_qt_sql_5_25 """select test6 from test1;"""
|
||||
order_qt_sql_5_26 """select test6 from test2;"""
|
||||
order_qt_sql_5_27 """select * from composite_type_array order by name;"""
|
||||
order_qt_sql_5_28 """select * from test3_20231005;"""
|
||||
|
||||
sql """switch test_es_query_es6"""
|
||||
// order_qt_sql_6_01 """show tables"""
|
||||
@ -242,6 +243,7 @@ suite("test_es_query", "p0,external,es,external_docker,external_docker_es") {
|
||||
order_qt_sql_6_25 """select test6 from test1;"""
|
||||
order_qt_sql_6_26 """select test6 from test2;"""
|
||||
order_qt_sql_6_27 """select * from composite_type_array order by name;"""
|
||||
order_qt_sql_6_28 """select * from test3_20231005;"""
|
||||
|
||||
List<List<String>> tables6N = sql """show tables"""
|
||||
boolean notContainHide = true
|
||||
|
||||
Reference in New Issue
Block a user