You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by "airborne12 (via GitHub)" <gi...@apache.org> on 2023/02/21 07:29:16 UTC
[GitHub] [doris] airborne12 opened a new pull request, #16982: [Thirdparty](clucene) update clucene to v2.4.6 to fix bthread/pthread context bug
airborne12 opened a new pull request, #16982:
URL: https://github.com/apache/doris/pull/16982
# Proposed changes
1. change clucene version from 2.4.4->2.4.6
2. update build-thirdparty.sh clucene's build block, adding USE_BTHREAD CMAKE flag, this flag is inherited from doris's USE_BTHREAD_SCANNER.
## Problem summary
Describe your changes.
## Checklist(Required)
* [ ] Does it affect the original behavior
* [ ] Has unit tests been added
* [ ] Has document been added or modified
* [ ] Does it need to update dependencies
* [ ] Is this PR support rollback (If NO, please explain WHY)
## 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] github-actions[bot] commented on pull request #16982: [Thirdparty](clucene) update clucene to v2.4.6 to fix bthread/pthread context bug
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #16982:
URL: https://github.com/apache/doris/pull/16982#issuecomment-1438634770
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] airborne12 commented on pull request #16982: [Thirdparty](clucene) update clucene to v2.4.6 to fix bthread/pthread context bug
Posted by "airborne12 (via GitHub)" <gi...@apache.org>.
airborne12 commented on PR #16982:
URL: https://github.com/apache/doris/pull/16982#issuecomment-1437984618
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 a diff in pull request #16982: [Thirdparty](clucene) update clucene to v2.4.6 to fix bthread/pthread context bug
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on code in PR #16982:
URL: https://github.com/apache/doris/pull/16982#discussion_r1112883828
##########
be/src/olap/column_predicate.h:
##########
@@ -139,6 +139,13 @@ class ColumnPredicate {
"Not Implemented evaluate with inverted index, please check the predicate");
}
+ //evaluate range predicate on inverted
+ virtual Status evaluate(const Schema& schema, InvertedIndexIterator* iterator,
Review Comment:
warning: class member cannot be redeclared [clang-diagnostic-error]
```cpp
virtual Status evaluate(const Schema& schema, InvertedIndexIterator* iterator,
^
```
**be/src/olap/column_predicate.h:135:** previous definition is here
```cpp
virtual Status evaluate(const Schema& schema, InvertedIndexIterator* iterator,
^
```
##########
be/src/olap/rowset/segment_v2/inverted_index_reader.h:
##########
@@ -61,6 +62,148 @@ enum class InvertedIndexQueryType {
MATCH_PHRASE_QUERY = 7,
};
+//template <PrimitiveType Type>
+template <FieldType field_type>
+class InvertedIndexQueryRange {
+public:
+ //using CppType = typename PredicatePrimitiveTypeTraits<Type>::PredicateFieldType;
+ using CppType = typename CppTypeTraits<field_type>::CppType;
+
+ InvertedIndexQueryRange(const TypeInfo* type_info);
+ //static Status add_range(InvertedIndexQueryRange* range, InvertedIndexQueryOp op, CppType value);
+ Status add_range(InvertedIndexQueryOp op, CppType value);
+ CppType lower_value() { return _low_value; }
+ CppType upper_value() { return _high_value; }
+
+private:
+ //std::string _low_value;
+ //std::string _high_value;
+ CppType _low_value;
+ CppType _high_value;
+ InvertedIndexQueryOp _low_op;
+ InvertedIndexQueryOp _high_op;
+ const TypeInfo* _type_info {};
+ const KeyCoder* _value_key_coder {};
+};
+
+using InvertedIndexQueryRangeType =
+ std::variant<InvertedIndexQueryRange<OLAP_FIELD_TYPE_BOOL>,
+ InvertedIndexQueryRange<OLAP_FIELD_TYPE_DATE>,
+ InvertedIndexQueryRange<OLAP_FIELD_TYPE_DATETIME>,
+ InvertedIndexQueryRange<OLAP_FIELD_TYPE_DATETIMEV2>,
+ InvertedIndexQueryRange<OLAP_FIELD_TYPE_DATEV2>,
+ InvertedIndexQueryRange<OLAP_FIELD_TYPE_TINYINT>,
+ InvertedIndexQueryRange<OLAP_FIELD_TYPE_SMALLINT>,
+ InvertedIndexQueryRange<OLAP_FIELD_TYPE_INT>,
+ InvertedIndexQueryRange<OLAP_FIELD_TYPE_UNSIGNED_INT>,
+ InvertedIndexQueryRange<OLAP_FIELD_TYPE_LARGEINT>,
+ InvertedIndexQueryRange<OLAP_FIELD_TYPE_DECIMAL>,
+ InvertedIndexQueryRange<OLAP_FIELD_TYPE_DECIMAL32>,
+ InvertedIndexQueryRange<OLAP_FIELD_TYPE_DECIMAL64>,
+ InvertedIndexQueryRange<OLAP_FIELD_TYPE_DECIMAL128I>,
+ InvertedIndexQueryRange<OLAP_FIELD_TYPE_DOUBLE>,
+ InvertedIndexQueryRange<OLAP_FIELD_TYPE_FLOAT>,
+ InvertedIndexQueryRange<OLAP_FIELD_TYPE_BIGINT>>;
+/*using InvertedIndexQueryRangeType =
+ std::variant<InvertedIndexQueryRange<TYPE_BOOLEAN>,
+ InvertedIndexQueryRange<TYPE_DATE>,
+ InvertedIndexQueryRange<TYPE_DATETIMEV2>,
+ InvertedIndexQueryRange<TYPE_DATEV2>,
+ InvertedIndexQueryRange<TYPE_TINYINT>,
+ InvertedIndexQueryRange<TYPE_SMALLINT>,
+ InvertedIndexQueryRange<TYPE_INT>,
+ InvertedIndexQueryRange<TYPE_LARGEINT>,
+ InvertedIndexQueryRange<TYPE_DECIMAL32>,
+ InvertedIndexQueryRange<TYPE_DECIMAL64>,
+ InvertedIndexQueryRange<TYPE_DECIMAL128I>,
+ InvertedIndexQueryRange<TYPE_DOUBLE>,
+ InvertedIndexQueryRange<TYPE_FLOAT>,
+ InvertedIndexQueryRange<TYPE_BIGINT>>;*/
+
+template <FieldType field_type>
+static Status add_range(InvertedIndexQueryRange<field_type> query_range, std::string& value,
+ InvertedIndexQueryOp query_op) {
+ using CppType = typename CppTypeTraits<field_type>::CppType;
+ CppType tmp;
+ FieldTypeTraits<field_type>::from_string(&tmp, value, 0, 0);
+ query_range.add_range(query_op, tmp);
+}
+
+static Status make_inverted_index_query_range(const TypeInfo* type_info, FieldType ft, InvertedIndexQueryRangeType& ret) {
+ switch (ft) {
+ case OLAP_FIELD_TYPE_DATETIME: {
+ ret = InvertedIndexQueryRange<OLAP_FIELD_TYPE_DATETIME>(type_info);
+ break;
+ }
+ case OLAP_FIELD_TYPE_DATE: {
+ ret = InvertedIndexQueryRange<OLAP_FIELD_TYPE_DATE>(type_info);
+ break;
+ }
+ case OLAP_FIELD_TYPE_DATETIMEV2: {
+ ret = InvertedIndexQueryRange<OLAP_FIELD_TYPE_DATETIMEV2>(type_info);
+ break;
+ }
+ case OLAP_FIELD_TYPE_DATEV2: {
+ ret = InvertedIndexQueryRange<OLAP_FIELD_TYPE_DATEV2>(type_info);
+ break;
+ }
+ case OLAP_FIELD_TYPE_TINYINT: {
+ ret = InvertedIndexQueryRange<OLAP_FIELD_TYPE_TINYINT>(type_info);
+ break;
+ }
+ case OLAP_FIELD_TYPE_SMALLINT: {
+ ret = InvertedIndexQueryRange<OLAP_FIELD_TYPE_SMALLINT>(type_info);
+ break;
+ }
+ case OLAP_FIELD_TYPE_UNSIGNED_INT: {
+ ret = InvertedIndexQueryRange<OLAP_FIELD_TYPE_UNSIGNED_INT>(type_info);
+ break;
+ }
+ case OLAP_FIELD_TYPE_INT: {
+ ret = InvertedIndexQueryRange<OLAP_FIELD_TYPE_INT>(type_info);
+ break;
+ }
+ case OLAP_FIELD_TYPE_LARGEINT: {
+ ret = InvertedIndexQueryRange<OLAP_FIELD_TYPE_LARGEINT>(type_info);
+ break;
+ }
+ case OLAP_FIELD_TYPE_DECIMAL: {
+ ret = InvertedIndexQueryRange<OLAP_FIELD_TYPE_DECIMAL>(type_info);
+ break;
+ }
+ case OLAP_FIELD_TYPE_DECIMAL32: {
+ ret = InvertedIndexQueryRange<OLAP_FIELD_TYPE_DECIMAL32>(type_info);
+ break;
+ }
+ case OLAP_FIELD_TYPE_DECIMAL64: {
+ ret = InvertedIndexQueryRange<OLAP_FIELD_TYPE_DECIMAL64>(type_info);
+ break;
+ }
+ case OLAP_FIELD_TYPE_DECIMAL128I: {
+ ret = InvertedIndexQueryRange<OLAP_FIELD_TYPE_DECIMAL128I>(type_info);
+ break;
+ }
+ case OLAP_FIELD_TYPE_BOOL: {
+ ret = InvertedIndexQueryRange<OLAP_FIELD_TYPE_BOOL>(type_info);
+ break;
+ }
+ case OLAP_FIELD_TYPE_DOUBLE: {
+ ret = InvertedIndexQueryRange<OLAP_FIELD_TYPE_DOUBLE>(type_info);
+ break;
+ }
+ case OLAP_FIELD_TYPE_FLOAT: {
+ ret = InvertedIndexQueryRange<OLAP_FIELD_TYPE_FLOAT>(type_info);
+ break;
+ }
+ case OLAP_FIELD_TYPE_BIGINT: {
+ ret = InvertedIndexQueryRange<OLAP_FIELD_TYPE_BIGINT>(type_info);
+ break;
+ }
+ default:
+ return Status::NotSupported("unsupported type for inverted index: " + std::to_string(ft));
+ }
+}
Review Comment:
warning: non-void function does not return a value in all control paths [clang-diagnostic-return-type]
```cpp
}
^
```
--
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 #16982: [Thirdparty](clucene) update clucene to v2.4.6 to fix bthread/pthread context bug
Posted by "morningman (via GitHub)" <gi...@apache.org>.
morningman merged PR #16982:
URL: https://github.com/apache/doris/pull/16982
--
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 #16982: [Thirdparty](clucene) update clucene to v2.4.6 to fix bthread/pthread context bug
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #16982:
URL: https://github.com/apache/doris/pull/16982#issuecomment-1438634853
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 pull request #16982: [Thirdparty](clucene) update clucene to v2.4.6 to fix bthread/pthread context bug
Posted by "airborne12 (via GitHub)" <gi...@apache.org>.
airborne12 commented on PR #16982:
URL: https://github.com/apache/doris/pull/16982#issuecomment-1438479729
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