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/06/24 03:09:06 UTC

[GitHub] [doris] stalary opened a new pull request, #10391: [Bug][DOE]: fix doe on es8

stalary opened a new pull request, #10391:
URL: https://github.com/apache/doris/pull/10391

   # Proposed changes
   
   Issue Number: close #xxx
   
   ## Problem Summary:
   
   doe on es8 can not work, because type change.


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


[GitHub] [doris] morningman merged pull request #10391: [Bug][DOE]: fix doe on es8

Posted by GitBox <gi...@apache.org>.
morningman merged PR #10391:
URL: https://github.com/apache/doris/pull/10391


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


[GitHub] [doris] wuyunfeng commented on a diff in pull request #10391: [Bug][DOE]: fix doe on es8

Posted by GitBox <gi...@apache.org>.
wuyunfeng commented on code in PR #10391:
URL: https://github.com/apache/doris/pull/10391#discussion_r906644372


##########
be/src/exec/es/es_scan_reader.cpp:
##########
@@ -47,7 +47,11 @@ ESScanReader::ESScanReader(const std::string& target,
           _doc_value_mode(doc_value_mode) {
     _target = target;
     _index = props.at(KEY_INDEX);
-    _type = props.at(KEY_TYPE);
+    if (props.find(KEY_TYPE) != props.end()) {
+        _type = REQUEST_SEPARATOR + props.at(KEY_TYPE);
+    } else {
+        _type = "";

Review Comment:
   remove this,default is empty



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


[GitHub] [doris] wuyunfeng commented on a diff in pull request #10391: [Bug][DOE]: fix doe on es8

Posted by GitBox <gi...@apache.org>.
wuyunfeng commented on code in PR #10391:
URL: https://github.com/apache/doris/pull/10391#discussion_r906641833


##########
fe/fe-core/src/main/java/org/apache/doris/external/elasticsearch/MappingPhase.java:
##########
@@ -45,7 +45,7 @@ public MappingPhase(EsRestClient client) {
 
     @Override
     public void preProcess(SearchContext context) {
-        if (context.version() != null && context.version().onOrAfter(EsMajorVersion.V_7_X)) {
+        if (context.version() != null && context.version().on(EsMajorVersion.V_7_X)) {

Review Comment:
   Remove this `prePrcess`



##########
fe/fe-core/src/main/java/org/apache/doris/planner/EsScanNode.java:
##########
@@ -250,7 +251,10 @@ private List<TScanRangeLocations> getShardLocations() throws UserException {
                 TEsScanRange esScanRange = new TEsScanRange();
                 esScanRange.setEsHosts(shardAllocations);
                 esScanRange.setIndex(shardRouting.get(0).getIndexName());
-                esScanRange.setType(table.getMappingType());
+                // 8.x type is cancelled
+                if (table.majorVersion == null || table.majorVersion.before(EsMajorVersion.V_8_X)) {

Review Comment:
   Don't rely on this, don't issue this parameter directly, BE will do the empty judgment processing
   



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


[GitHub] [doris] wuyunfeng commented on a diff in pull request #10391: [Bug][DOE]: fix doe on es8

Posted by GitBox <gi...@apache.org>.
wuyunfeng commented on code in PR #10391:
URL: https://github.com/apache/doris/pull/10391#discussion_r906641833


##########
fe/fe-core/src/main/java/org/apache/doris/external/elasticsearch/MappingPhase.java:
##########
@@ -45,7 +45,7 @@ public MappingPhase(EsRestClient client) {
 
     @Override
     public void preProcess(SearchContext context) {
-        if (context.version() != null && context.version().onOrAfter(EsMajorVersion.V_7_X)) {
+        if (context.version() != null && context.version().on(EsMajorVersion.V_7_X)) {

Review Comment:
   Remove this `prePrcess`, remove the `includeTypeName`



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


[GitHub] [doris] github-actions[bot] commented on pull request #10391: [Bug][DOE]: fix doe on es8

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #10391:
URL: https://github.com/apache/doris/pull/10391#issuecomment-1165643144

   PR approved by anyone and no changes requested.


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


[GitHub] [doris] wuyunfeng commented on a diff in pull request #10391: [Bug][DOE]: fix doe on es8

Posted by GitBox <gi...@apache.org>.
wuyunfeng commented on code in PR #10391:
URL: https://github.com/apache/doris/pull/10391#discussion_r906666577


##########
fe/fe-core/src/main/java/org/apache/doris/catalog/EsTable.java:
##########
@@ -73,7 +73,7 @@ public class EsTable extends Table {
     private String indexName;
 
     // which type used for `indexName`, default to `_doc`

Review Comment:
   ```suggestion
       // which type used for `indexName`
   ```



##########
docs/en/docs/ecosystem/external-table/doris-on-es.md:
##########
@@ -121,7 +121,7 @@ PROPERTIES (
 "hosts" = "http://192.168.0.1:8200,http://192.168.0.2:8200",
 "index" = "test",
 "type" = "doc",
-
+"version" = "6.8.23"

Review Comment:
   remove this line



##########
fe/fe-core/src/main/java/org/apache/doris/catalog/EsTable.java:
##########
@@ -263,8 +261,8 @@ private void validate(Map<String, String> properties) throws DdlException {
 
     public TTableDescriptor toThrift() {
         TEsTable tEsTable = new TEsTable();
-        TTableDescriptor tTableDescriptor = new TTableDescriptor(getId(), TTableType.ES_TABLE,
-                fullSchema.size(), 0, getName(), "");
+        TTableDescriptor tTableDescriptor = new TTableDescriptor(getId(), TTableType.ES_TABLE, fullSchema.size(), 0,
+                getName(), "");

Review Comment:
   getSignature method should process  mappingType is null



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


[GitHub] [doris] wuyunfeng commented on pull request #10391: [Bug][DOE]: fix doe on es8

Posted by GitBox <gi...@apache.org>.
wuyunfeng commented on PR #10391:
URL: https://github.com/apache/doris/pull/10391#issuecomment-1166204420

   @stalary  Thanks for your contribution.  I suggest remove the `include_type_name` branch, and do not pass `type` in ESScanNode,  BE check whether the `type` parameter is empty and choose a different URL.  And, Do not forget modify catalog logical for ES table when invoke `show create table DOE`


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


[GitHub] [doris] github-actions[bot] commented on pull request #10391: [Bug][DOE]: fix doe on es8

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #10391:
URL: https://github.com/apache/doris/pull/10391#issuecomment-1166303641

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


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


[GitHub] [doris] github-actions[bot] commented on pull request #10391: [Bug][DOE]: fix doe on es8

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #10391:
URL: https://github.com/apache/doris/pull/10391#issuecomment-1165643094

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


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


[GitHub] [doris] stalary commented on pull request #10391: [Bug][DOE]: fix doe on es8

Posted by GitBox <gi...@apache.org>.
stalary commented on PR #10391:
URL: https://github.com/apache/doris/pull/10391#issuecomment-1166231093

   I have finished the modification @wuyunfeng 


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