You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by "Tanya-W (via GitHub)" <gi...@apache.org> on 2023/06/01 13:23:48 UTC

[GitHub] [doris] Tanya-W opened a new pull request, #20344: [fix](match query) fix array column match query failed without inverted index

Tanya-W opened a new pull request, #20344:
URL: https://github.com/apache/doris/pull/20344

   ## Proposed changes
   
   fix array column match query without inverted index return error: Not supported input arguments types
   
   ## Further comments
   
   If this is a relatively large or complex change, kick off the discussion at [dev@doris.apache.org](mailto:dev@doris.apache.org) by explaining why you chose the solution you did and what alternatives you considered, etc...
   
   


-- 
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] qidaye merged pull request #20344: [fix](match query) fix array column match query failed without inverted index

Posted by "qidaye (via GitHub)" <gi...@apache.org>.
qidaye merged PR #20344:
URL: https://github.com/apache/doris/pull/20344


-- 
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] Tanya-W commented on pull request #20344: [fix](match query) fix array column match query failed without inverted index

Posted by "Tanya-W (via GitHub)" <gi...@apache.org>.
Tanya-W commented on PR #20344:
URL: https://github.com/apache/doris/pull/20344#issuecomment-1573417052

   run buildall


-- 
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 #20344: [fix](match query) fix array column match query failed without inverted index

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #20344:
URL: https://github.com/apache/doris/pull/20344#issuecomment-1572054738

   clang-tidy review says "All clean, LGTM! :+1:"


-- 
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 #20344: [fix](match query) fix array column match query failed without inverted index

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #20344:
URL: https://github.com/apache/doris/pull/20344#issuecomment-1573428300

   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] airborne12 commented on a diff in pull request #20344: [fix](match query) fix array column match query failed without inverted index

Posted by "airborne12 (via GitHub)" <gi...@apache.org>.
airborne12 commented on code in PR #20344:
URL: https://github.com/apache/doris/pull/20344#discussion_r1213882467


##########
be/src/vec/functions/match.cpp:
##########
@@ -119,13 +162,28 @@ Status FunctionMatchAll::execute_match(const std::string& column_name,
                      << ", please check your query sql";
         return Status::Error<ErrorCode::INVERTED_INDEX_NO_TERMS>();
     }
+
+    auto current_src_array_offset = 0;
     for (int i = 0; i < input_rows_count; i++) {
-        const auto& str_ref = datas->get_data_at(i);
-        std::vector<std::wstring> data_tokens =
-                doris::segment_v2::InvertedIndexReader::get_analyse_result(
-                        column_name, str_ref.to_string(),
-                        doris::segment_v2::InvertedIndexQueryType::MATCH_ALL_QUERY,
-                        inverted_index_ctx);
+        std::vector<std::wstring> data_tokens;
+        if (array_offsets) {
+            for (auto next_src_array_offset = (*array_offsets)[i];
+                 current_src_array_offset < next_src_array_offset; ++current_src_array_offset) {
+                const auto& str_ref = string_col->get_data_at(current_src_array_offset);
+                std::vector<std::wstring> element_tokens =
+                        doris::segment_v2::InvertedIndexReader::get_analyse_result(
+                                column_name, str_ref.to_string(),
+                                doris::segment_v2::InvertedIndexQueryType::MATCH_ALL_QUERY,
+                                inverted_index_ctx);
+                data_tokens.insert(data_tokens.end(), element_tokens.begin(), element_tokens.end());
+            }
+        } else {
+            const auto& str_ref = string_col->get_data_at(i);
+            data_tokens = doris::segment_v2::InvertedIndexReader::get_analyse_result(
+                    column_name, str_ref.to_string(),
+                    doris::segment_v2::InvertedIndexQueryType::MATCH_ALL_QUERY, inverted_index_ctx);

Review Comment:
   Repeated code with MATCH_ANY?



-- 
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] Tanya-W commented on pull request #20344: [fix](match query) fix array column match query failed without inverted index

Posted by "Tanya-W (via GitHub)" <gi...@apache.org>.
Tanya-W commented on PR #20344:
URL: https://github.com/apache/doris/pull/20344#issuecomment-1572049448

   run buildall


-- 
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] Tanya-W commented on pull request #20344: [fix](match query) fix array column match query failed without inverted index

Posted by "Tanya-W (via GitHub)" <gi...@apache.org>.
Tanya-W commented on PR #20344:
URL: https://github.com/apache/doris/pull/20344#issuecomment-1573064259

   run buildall


-- 
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 #20344: [fix](match query) fix array column match query failed without inverted index

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #20344:
URL: https://github.com/apache/doris/pull/20344#issuecomment-1573066394

   clang-tidy review says "All clean, LGTM! :+1:"


-- 
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 #20344: [fix](match query) fix array column match query failed without inverted index

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #20344:
URL: https://github.com/apache/doris/pull/20344#issuecomment-1573421901

   clang-tidy review says "All clean, LGTM! :+1:"


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