[GitHub] [incubator-doris] cambyzju commented on a change in pull request #8217: [feature][array-type]support select ARRAY data type on vectorized engine
cambyzju commented on a change in pull request #8217: URL: https://github.com/apache/incubator-doris/pull/8217#discussion_r813631047 ## File path: be/src/vec/columns/column_array.cpp ## @@ -0,0 +1,699 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +// This file is copied from +// https://github.com/ClickHouse/ClickHouse/blob/master/src/Columns/ColumnArray.cpp +// and modified by Doris + +#include // memcpy + +#include "vec/common/assert_cast.h" +#include "vec/columns/collator.h" +#include "vec/columns/column_array.h" +#include "vec/columns/column_const.h" +#include "vec/columns/column_nullable.h" +#include "vec/columns/column_string.h" +#include "vec/columns/columns_common.h" +#include "vec/columns/columns_number.h" + +namespace doris::vectorized { + +namespace ErrorCodes { +extern const int NOT_IMPLEMENTED; +extern const int BAD_ARGUMENTS; +extern const int PARAMETER_OUT_OF_BOUND; +extern const int SIZES_OF_COLUMNS_DOESNT_MATCH; +extern const int LOGICAL_ERROR; +extern const int TOO_LARGE_ARRAY_SIZE; +} + +/** Obtaining array as Field can be slow for large arrays and consume vast amount of memory. + * Just don't allow to do it. + * You can increase the limit if the following query: + * SELECT range(1000) + * will take less than 500ms on your machine. + */ +static constexpr size_t max_array_size_as_field = 100; + +ColumnArray::ColumnArray(MutableColumnPtr && nested_column, MutableColumnPtr && offsets_column) +: data(std::move(nested_column)), offsets(std::move(offsets_column)) { +const ColumnOffsets * offsets_concrete = typeid_cast(offsets.get()); + +if (!offsets_concrete) { +LOG(FATAL) << "offsets_column must be a ColumnUInt64"; +} + +if (!offsets_concrete->empty() && nested_column) { +Offset last_offset = offsets_concrete->get_data().back(); + +/// This will also prevent possible overflow in offset. +if (nested_column->size() != last_offset) { +LOG(FATAL) << "offsets_column has data inconsistent with nested_column"; +} +} + +/** NOTE + * Arrays with constant value are possible and used in implementation of higher order functions (see FunctionReplicate). + * But in most cases, arrays with constant value are unexpected and code will work wrong. Use with caution. + */ +} + +ColumnArray::ColumnArray(MutableColumnPtr && nested_column) +: data(std::move(nested_column)) { +if (!data->empty()) { +LOG(FATAL) << "Not empty data passed to ColumnArray, but no offsets passed"; +} + +offsets = ColumnOffsets::create(); +} + +std::string ColumnArray::get_name() const { return "Array(" + get_data().get_name() + ")"; } + +MutableColumnPtr ColumnArray::clone_resized(size_t to_size) const { +auto res = ColumnArray::create(get_data().clone_empty()); + +if (to_size == 0) +return res; +size_t from_size = size(); + +if (to_size <= from_size) { +/// Just cut column. +res->get_offsets().assign(get_offsets().begin(), get_offsets().begin() + to_size); +res->get_data().insert_range_from(get_data(), 0, get_offsets()[to_size - 1]); +} else { +/// Copy column and append empty arrays for extra elements. +Offset offset = 0; +if (from_size > 0) { +res->get_offsets().assign(get_offsets().begin(), get_offsets().end()); +res->get_data().insert_range_from(get_data(), 0, get_data().size()); +offset = get_offsets().back(); +} + +res->get_offsets().resize(to_size); +for (size_t i = from_size; i < to_size; ++i) +res->get_offsets()[i] = offset; +} + +return res; +} + +size_t ColumnArray::size() const { +return get_offsets().size(); +} + +Field ColumnArray::operator[](size_t n) const { +size_t offset = offset_at(n); +size_t size = size_at(n); + +if (size > max_array_size_as_field) +LOG(FATAL) << "Array of size " << size << " is too large to be manipulated as single field," + << "maximum size " << max_array_size_as_field; + +Array res(size); + +for (size_t i = 0; i < size; ++i) +res[i] = get_d
[GitHub] [incubator-doris] cambyzju commented on a change in pull request #8217: [feature][array-type]support select ARRAY data type on vectorized engine
cambyzju commented on a change in pull request #8217: URL: https://github.com/apache/incubator-doris/pull/8217#discussion_r813634151 ## File path: be/src/vec/columns/column_array.cpp ## @@ -0,0 +1,699 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +// This file is copied from +// https://github.com/ClickHouse/ClickHouse/blob/master/src/Columns/ColumnArray.cpp +// and modified by Doris + +#include // memcpy + +#include "vec/common/assert_cast.h" +#include "vec/columns/collator.h" +#include "vec/columns/column_array.h" +#include "vec/columns/column_const.h" +#include "vec/columns/column_nullable.h" +#include "vec/columns/column_string.h" +#include "vec/columns/columns_common.h" +#include "vec/columns/columns_number.h" + +namespace doris::vectorized { + +namespace ErrorCodes { +extern const int NOT_IMPLEMENTED; +extern const int BAD_ARGUMENTS; +extern const int PARAMETER_OUT_OF_BOUND; +extern const int SIZES_OF_COLUMNS_DOESNT_MATCH; +extern const int LOGICAL_ERROR; +extern const int TOO_LARGE_ARRAY_SIZE; +} + +/** Obtaining array as Field can be slow for large arrays and consume vast amount of memory. + * Just don't allow to do it. + * You can increase the limit if the following query: + * SELECT range(1000) + * will take less than 500ms on your machine. + */ +static constexpr size_t max_array_size_as_field = 100; + +ColumnArray::ColumnArray(MutableColumnPtr && nested_column, MutableColumnPtr && offsets_column) +: data(std::move(nested_column)), offsets(std::move(offsets_column)) { +const ColumnOffsets * offsets_concrete = typeid_cast(offsets.get()); + +if (!offsets_concrete) { +LOG(FATAL) << "offsets_column must be a ColumnUInt64"; +} + +if (!offsets_concrete->empty() && nested_column) { +Offset last_offset = offsets_concrete->get_data().back(); + +/// This will also prevent possible overflow in offset. +if (nested_column->size() != last_offset) { +LOG(FATAL) << "offsets_column has data inconsistent with nested_column"; +} +} + +/** NOTE + * Arrays with constant value are possible and used in implementation of higher order functions (see FunctionReplicate). + * But in most cases, arrays with constant value are unexpected and code will work wrong. Use with caution. + */ +} + +ColumnArray::ColumnArray(MutableColumnPtr && nested_column) +: data(std::move(nested_column)) { +if (!data->empty()) { +LOG(FATAL) << "Not empty data passed to ColumnArray, but no offsets passed"; +} + +offsets = ColumnOffsets::create(); +} + +std::string ColumnArray::get_name() const { return "Array(" + get_data().get_name() + ")"; } + +MutableColumnPtr ColumnArray::clone_resized(size_t to_size) const { +auto res = ColumnArray::create(get_data().clone_empty()); + +if (to_size == 0) +return res; +size_t from_size = size(); + +if (to_size <= from_size) { +/// Just cut column. +res->get_offsets().assign(get_offsets().begin(), get_offsets().begin() + to_size); +res->get_data().insert_range_from(get_data(), 0, get_offsets()[to_size - 1]); +} else { +/// Copy column and append empty arrays for extra elements. +Offset offset = 0; +if (from_size > 0) { +res->get_offsets().assign(get_offsets().begin(), get_offsets().end()); +res->get_data().insert_range_from(get_data(), 0, get_data().size()); +offset = get_offsets().back(); +} + +res->get_offsets().resize(to_size); +for (size_t i = from_size; i < to_size; ++i) +res->get_offsets()[i] = offset; +} + +return res; +} + +size_t ColumnArray::size() const { +return get_offsets().size(); +} + +Field ColumnArray::operator[](size_t n) const { +size_t offset = offset_at(n); +size_t size = size_at(n); + +if (size > max_array_size_as_field) +LOG(FATAL) << "Array of size " << size << " is too large to be manipulated as single field," + << "maximum size " << max_array_size_as_field; + +Array res(size); + +for (size_t i = 0; i < size; ++i) +res[i] = get_d
[GitHub] [incubator-doris] caiconghui commented on a change in pull request #8188: [Enhancement](routine_load) Support show routine load statement with like predicate
caiconghui commented on a change in pull request #8188: URL: https://github.com/apache/incubator-doris/pull/8188#discussion_r813635617 ## File path: fe/fe-core/src/main/java/org/apache/doris/load/routineload/RoutineLoadManager.java ## @@ -483,7 +484,7 @@ public RoutineLoadJob getJob(String dbFullName, String jobName) throws MetaNotFo if includeHistory is false, filter not running job in result else return all of result */ -public List getJob(String dbFullName, String jobName, boolean includeHistory) +public List getJob(String dbFullName, String jobName, boolean includeHistory, PatternMatcher matcher) throws MetaNotFoundException { Review comment: done -- 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-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org
[GitHub] [incubator-doris] HappenLee opened a new issue #8228: [Bug] Double % 0 should return null
HappenLee opened a new issue #8228: URL: https://github.com/apache/incubator-doris/issues/8228 ### Search before asking - [X] I had searched in the [issues](https://github.com/apache/incubator-doris/issues?q=is%3Aissue) and found no similar issues. ### Version master ### What's Wrong? Double % 0 should return null ### What You Expected? same to double / 0 ### How to Reproduce? _No response_ ### Anything Else? _No response_ ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct) -- 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-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org
[GitHub] [incubator-doris] cambyzju commented on a change in pull request #8217: [feature][array-type]support select ARRAY data type on vectorized engine
cambyzju commented on a change in pull request #8217: URL: https://github.com/apache/incubator-doris/pull/8217#discussion_r813649079 ## File path: be/src/olap/row_block2.cpp ## @@ -328,6 +348,222 @@ Status RowBlockV2::_copy_data_to_column(int cid, doris::vectorized::MutableColum return Status::OK(); } +Status RowBlockV2::_append_data_to_column(const ColumnVectorBatch* batch, uint16_t off, uint16_t len, doris::vectorized::MutableColumnPtr& origin_column) { +constexpr auto MAX_SIZE_OF_VEC_STRING = 1024l * 1024; + +auto* column = origin_column.get(); +uint16_t selected_size = len; +bool nullable_mark_array[selected_size]; + +bool column_nullable = origin_column->is_nullable(); +bool origin_nullable = batch->is_nullable(); +if (column_nullable) { +auto nullable_column = assert_cast(origin_column.get()); +auto& null_map = nullable_column->get_null_map_data(); +column = nullable_column->get_nested_column_ptr().get(); + +if (origin_nullable) { +for (uint16_t i = 0; i < selected_size; ++i) { +uint16_t row_idx = i + off; +null_map.push_back(batch->is_null_at(row_idx)); +nullable_mark_array[i] = null_map.back(); +} +} else { +null_map.resize_fill(null_map.size() + selected_size, 0); +memset(nullable_mark_array, false, selected_size * sizeof(bool)); +} +} else { +memset(nullable_mark_array, false, selected_size * sizeof(bool)); +} + +auto insert_data_directly = [&nullable_mark_array](auto& batch, auto& column, auto& off, auto& len) { +for (uint16_t j = 0; j < len; ++j) { +if (!nullable_mark_array[j]) { +uint16_t row_idx = j + off; +column->insert_data( +reinterpret_cast(batch->cell_ptr(row_idx)), 0); +} else { +column->insert_default(); +} +} +}; + +switch (batch->type_info()->type()) { +case OLAP_FIELD_TYPE_OBJECT: { +auto column_bitmap = assert_cast(column); +for (uint16_t j = 0; j < selected_size; ++j) { +column_bitmap->insert_default(); +if (!nullable_mark_array[j]) { +uint16_t row_idx = j + off; +auto slice = reinterpret_cast(batch->cell_ptr(row_idx)); + +BitmapValue* pvalue = &column_bitmap->get_element(column_bitmap->size() - 1); + +if (slice->size != 0) { +BitmapValue value; +value.deserialize(slice->data); +*pvalue = std::move(value); +} else { +*pvalue = std::move(*reinterpret_cast(slice->data)); +} +} +} +break; +} +case OLAP_FIELD_TYPE_HLL: Review comment: done -- 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-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org
[GitHub] [incubator-doris] zbtzbtzbt opened a new pull request #8229: [Vec][Opt] better memequal impl to speed up string compare
zbtzbtzbt opened a new pull request #8229: URL: https://github.com/apache/incubator-doris/pull/8229 ## Problem Summary: like https://github.com/apache/incubator-doris/pull/8214 faster string compare operator in vec engine. @HappenLee ## Further comments If this is a relatively large or complex change, kick off the discussion at [d...@doris.apache.org](mailto:d...@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-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org
[GitHub] [incubator-doris] HappenLee commented on pull request #8229: [Vec][Opt] better memequal impl to speed up string compare
HappenLee commented on pull request #8229: URL: https://github.com/apache/incubator-doris/pull/8229#issuecomment-1049618459 do the same opt in not vec query -- 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-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org
[GitHub] [incubator-doris] HappenLee opened a new pull request #8230: [Bug] Double/Float % 0 should be NULL
HappenLee opened a new pull request #8230: URL: https://github.com/apache/incubator-doris/pull/8230 # Proposed changes Issue Number: close #8228 ## Problem Summary: Describe the overview of changes. ## Checklist(Required) 1. Does it affect the original behavior: (Yes) 2. Has unit tests been added: (No Need) 3. Has document been added or modified: (No Need) 4. Does it need to update dependencies: (No) 5. Are there any changes that cannot be rolled back: (Yes) ## Further comments If this is a relatively large or complex change, kick off the discussion at [d...@doris.apache.org](mailto:d...@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-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org
[GitHub] [incubator-doris] BiteTheDDDDt opened a new issue #8231: [Bug] group_concat(value,null) not return null
BiteThet opened a new issue #8231: URL: https://github.com/apache/incubator-doris/issues/8231 ### Search before asking - [X] I had searched in the [issues](https://github.com/apache/incubator-doris/issues?q=is%3Aissue) and found no similar issues. ### Version master ### What's Wrong? group_concat(value,null) not return null ### What You Expected? fix it ### How to Reproduce? _No response_ ### Anything Else? _No response_ ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct) -- 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-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org
[GitHub] [incubator-doris] BiteTheDDDDt opened a new pull request #8232: [Bug] group_concat(value,null) not return null
BiteThet opened a new pull request #8232: URL: https://github.com/apache/incubator-doris/pull/8232 # Proposed changes @HappenLee Issue Number: close #8231 ## Problem Summary: Describe the overview of changes. ## Checklist(Required) 1. Does it affect the original behavior: (Yes/No/I Don't know) 2. Has unit tests been added: (Yes/No/No Need) 3. Has document been added or modified: (Yes/No/No Need) 4. Does it need to update dependencies: (Yes/No) 5. Are there any changes that cannot be rolled back: (Yes/No) ## Further comments If this is a relatively large or complex change, kick off the discussion at [d...@doris.apache.org](mailto:d...@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-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org
[GitHub] [incubator-doris] github-actions[bot] commented on pull request #8230: [Bug] Double/Float % 0 should be NULL
github-actions[bot] commented on pull request #8230: URL: https://github.com/apache/incubator-doris/pull/8230#issuecomment-1049661552 -- 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-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org
[GitHub] [incubator-doris] awakeljw opened a new pull request #8233: [Vectorized][HashJoin] Opt multiple block hashjoin performance
awakeljw opened a new pull request #8233: URL: https://github.com/apache/incubator-doris/pull/8233 # Proposed changes Issue Number: close #xxx ## Problem Summary: Describe the overview of changes. ## Checklist(Required) 1. Does it affect the original behavior: (Yes/No/I Don't know) 2. Has unit tests been added: (Yes/No/No Need) 3. Has document been added or modified: (Yes/No/No Need) 4. Does it need to update dependencies: (Yes/No) 5. Are there any changes that cannot be rolled back: (Yes/No) ## Further comments If this is a relatively large or complex change, kick off the discussion at [d...@doris.apache.org](mailto:d...@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-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org
[GitHub] [incubator-doris] github-actions[bot] commented on pull request #8232: [Bug] group_concat(value,null) not return null
github-actions[bot] commented on pull request #8232: URL: https://github.com/apache/incubator-doris/pull/8232#issuecomment-1049761029 -- 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-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org
[GitHub] [incubator-doris] HappenLee commented on a change in pull request #8226: [Bug][Vectorized] fix arithmetic calculate get wrong result
HappenLee commented on a change in pull request #8226: URL: https://github.com/apache/incubator-doris/pull/8226#discussion_r813822249 ## File path: be/src/vec/functions/modulo.cpp ## @@ -72,6 +74,7 @@ struct PModuloImpl { } } + template Review comment: format the code -- 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-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org
[GitHub] [incubator-doris] github-actions[bot] commented on pull request #8174: [Enhancement][Vectorized] support es node predicate peel
github-actions[bot] commented on pull request #8174: URL: https://github.com/apache/incubator-doris/pull/8174#issuecomment-1049821786 -- 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-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org
[GitHub] [incubator-doris] EmmyMiao87 commented on issue #8191: [Bug] Select sql cause an NullPointerException on Fe
EmmyMiao87 commented on issue #8191: URL: https://github.com/apache/incubator-doris/issues/8191#issuecomment-1049830923 WITH basic_data as ( SELECT * FROM dwd_srv_solutionprocess_dd ), id_34 as ( SELECT new_srv_workorder_id as unresolved_id FROM ods_new_srv_outsidelineBase_dd ol group by new_srv_workorder_id having count(1) >=2 ), unresolved as ( SELECT bd.* ,'非一次性解决' as '解决情况' FROM basic_data bd join id_34 on bd.workorderId = id_34.unresolved_id ), solved as ( SELECT *, '一次性解决' as '解决情况' FROM basic_data b WHERE workorderId not in (select workorderId from unresolved) ) select * from solved; -- 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-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org
[GitHub] [incubator-doris] spaces-X opened a new pull request #8234: [Feature] Support pre-aggregation for quantile type
spaces-X opened a new pull request #8234: URL: https://github.com/apache/incubator-doris/pull/8234 # Proposed changes close #7782 ## Problem Summary: Add a new column-type to speed up the approximation of quantiles. 1. The new column-type is named `quantile_state` with fixed aggregation function `quantile_union` , which 2. support pre-aggregation of new column-type and quantile_state related functions. I will update this page to add some test results about this column-type later. ## Checklist(Required) 1. Does it affect the original behavior: (Almost No) 4. Has unit tests been added: (Yes) 5. Has document been added or modified: (Yes) 6. Does it need to update dependencies: (No) 7. Are there any changes that cannot be rolled back: (Yes/No) ## Further comments If this is a relatively large or complex change, kick off the discussion at [d...@doris.apache.org](mailto:d...@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-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org
[GitHub] [incubator-doris] morningman closed issue #8111: [Bug] insert into cause error result
morningman closed issue #8111: URL: https://github.com/apache/incubator-doris/issues/8111 -- 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-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org
[GitHub] [incubator-doris] morningman merged pull request #8112: [fix](load) Fix InsertStmt prepareExpressions
morningman merged pull request #8112: URL: https://github.com/apache/incubator-doris/pull/8112 -- 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-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org
[incubator-doris] branch master updated (a6bc9cb -> 0dcbfbd)
This is an automated email from the ASF dual-hosted git repository. morningman pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/incubator-doris.git. from a6bc9cb [Function] Refactor the function code of log (#8199) add 0dcbfbd [fix](load) Fix InsertStmt prepareExpressions (#8112) No new revisions were added by this update. Summary of changes: .../java/org/apache/doris/analysis/InsertStmt.java | 2 +- .../doris/common/profile/PlanTreeBuilder.java | 7 +- .../org/apache/doris/planner/QueryPlanTest.java| 28 ++ 3 files changed, 35 insertions(+), 2 deletions(-) - To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org
[GitHub] [incubator-doris] morningman commented on a change in pull request #8195: fix show routine load task error
morningman commented on a change in pull request #8195: URL: https://github.com/apache/incubator-doris/pull/8195#discussion_r813981313 ## File path: fe/fe-core/src/main/java/org/apache/doris/load/routineload/RoutineLoadJob.java ## @@ -1299,7 +1300,14 @@ protected abstract boolean checkCommitInfo(RLTaskTxnCommitAttachment rlTaskTxnCo public List> getTasksShowInfo() { List> rows = Lists.newArrayList(); -routineLoadTaskInfoList.stream().forEach(entity -> rows.add(entity.getTaskShowInfo())); +routineLoadTaskInfoList.stream().forEach(entity -> { +try { + entity.setTxnStatus(Catalog.getCurrentCatalog().getGlobalTransactionMgr().getDatabaseTransactionMgr(dbId).getTransactionState(entity.getTxnId()).getTransactionStatus()); +rows.add(entity.getTaskShowInfo()); +} catch (AnalysisException e) { +LOG.warn("failed to setTxnStatus db: {}, txnId: {}, err: {}", dbId, entity.getTxnId(), e.getErrorMsg()); Review comment: ```suggestion LOG.warn("failed to setTxnStatus db: {}, txnId: {}, err: {}", dbId, entity.getTxnId(), e.getMessage()); ``` -- 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-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org
[GitHub] [incubator-doris] liutang123 opened a new pull request #8235: [fix](planner) Convert format in RewriteFromUnixTimeRule
liutang123 opened a new pull request #8235: URL: https://github.com/apache/incubator-doris/pull/8235 # Proposed changes Issue Number: close #xxx ## Problem Summary: SQL to reproduce: ``` SELECT * FROM table WHERE where FROM_UNIXTIME(d_datekey,'%Y-%m-%d %H:%i:%s') != '1970-08-20 00:11:43'; org.apache.doris.common.AnalysisException: errCode = 2, detailMessage = Unexpected exception: Illegal pattern character 'i' at org.apache.doris.qe.StmtExecutor.analyze(StmtExecutor.java:584) ~[palo-fe.jar:3.4.0] at org.apache.doris.qe.StmtExecutor.execute(StmtExecutor.java:345) ~[palo-fe.jar:3.4.0] at org.apache.doris.qe.StmtExecutor.execute(StmtExecutor.java:318) ~[palo-fe.jar:3.4.0] at org.apache.doris.qe.ConnectProcessor.handleQuery(ConnectProcessor.java:221) ~[palo-fe.jar:3.4.0] at org.apache.doris.qe.ConnectProcessor.dispatch(ConnectProcessor.java:361) ~[palo-fe.jar:3.4.0] at org.apache.doris.qe.ConnectProcessor.processOnce(ConnectProcessor.java:562) ~[palo-fe.jar:3.4.0] at org.apache.doris.mysql.nio.ReadListener.lambda$handleEvent$0(ReadListener.java:50) ~[palo-fe.jar:3.4.0] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?] at java.lang.Thread.run(Thread.java:835) [?:?] ``` Describe the overview of changes. Just support: -MM-dd HH:mm:ss -MM-dd MMdd ## Checklist(Required) 1. Does it affect the original behavior: (Yes) 2. Has unit tests been added: (No Need) 3. Has document been added or modified: (Yes) 4. Does it need to update dependencies: (No) 5. Are there any changes that cannot be rolled back: (No) ## Further comments Should we convert `%y` -- 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-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org
[GitHub] [incubator-doris] morningman merged pull request #8197: [git] Ignore all the .flattened-pom.xml files
morningman merged pull request #8197: URL: https://github.com/apache/incubator-doris/pull/8197 -- 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-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org
[GitHub] [incubator-doris] morningman merged pull request #8212: [Feature][array-type]add proto for complex data type ARRAY
morningman merged pull request #8212: URL: https://github.com/apache/incubator-doris/pull/8212 -- 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-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org
[GitHub] [incubator-doris] morningman merged pull request #8218: [improvement]upgrade-grpc-version
morningman merged pull request #8218: URL: https://github.com/apache/incubator-doris/pull/8218 -- 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-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org
[incubator-doris] branch master updated (0dcbfbd -> dccb3cf)
This is an automated email from the ASF dual-hosted git repository. morningman pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/incubator-doris.git. from 0dcbfbd [fix](load) Fix InsertStmt prepareExpressions (#8112) add dccb3cf [git] Ignore all the .flattened-pom.xml files (#8197) No new revisions were added by this update. Summary of changes: .gitignore | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) - To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org
[incubator-doris] branch master updated (dccb3cf -> b93936c)
This is an automated email from the ASF dual-hosted git repository. morningman pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/incubator-doris.git. from dccb3cf [git] Ignore all the .flattened-pom.xml files (#8197) add b93936c [Feature][array-type]add proto for complex data type ARRAY (#8212) No new revisions were added by this update. Summary of changes: gensrc/proto/data.proto | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) - To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org
[incubator-doris] branch master updated (b93936c -> df7e848)
This is an automated email from the ASF dual-hosted git repository. morningman pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/incubator-doris.git. from b93936c [Feature][array-type]add proto for complex data type ARRAY (#8212) add df7e848 [chore](dependency) upgrade-grpc-version (#8218) No new revisions were added by this update. Summary of changes: fe/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) - To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org
[incubator-doris] 01/06: [fix](mem-pool) fix bug that mem pool failed to allocate in ASAN mode (#8216)
This is an automated email from the ASF dual-hosted git repository. morningman pushed a commit to branch dev-1.0.0 in repository https://gitbox.apache.org/repos/asf/incubator-doris.git commit d8b106582d63c7fd44be68a9ad6924afe32ac490 Author: Mingyu Chen AuthorDate: Thu Feb 24 10:52:58 2022 +0800 [fix](mem-pool) fix bug that mem pool failed to allocate in ASAN mode (#8216) Also fix BE ut: 1. fix scheme_change_test memory leak 2. fix mem_pool_test Do not using DEFAULT_PADDING_SIZE = 0x10 in mem_pool when running ut. 3. remove plugin_test --- be/src/olap/rowset/column_reader.h | 1 - be/src/runtime/mem_pool.h | 4 +- be/test/common/status_test.cpp | 2 - be/test/olap/schema_change_test.cpp | 224 +++- be/test/plugin/CMakeLists.txt | 6 +- 5 files changed, 177 insertions(+), 60 deletions(-) diff --git a/be/src/olap/rowset/column_reader.h b/be/src/olap/rowset/column_reader.h index d3db8dc..0303b2e 100644 --- a/be/src/olap/rowset/column_reader.h +++ b/be/src/olap/rowset/column_reader.h @@ -688,7 +688,6 @@ public: } _values = reinterpret_cast(mem_pool->allocate(size * sizeof(FLOAT_TYPE))); - return OLAP_SUCCESS; } virtual OLAPStatus seek(PositionProvider* position) { diff --git a/be/src/runtime/mem_pool.h b/be/src/runtime/mem_pool.h index f51079b..397d2cd 100644 --- a/be/src/runtime/mem_pool.h +++ b/be/src/runtime/mem_pool.h @@ -163,7 +163,7 @@ public: static constexpr int DEFAULT_ALIGNMENT = 8; -#if defined(__SANITIZE_ADDRESS__) || defined(ADDRESS_SANITIZER) +#if (defined(__SANITIZE_ADDRESS__) || defined(ADDRESS_SANITIZER)) && !defined(BE_TEST) static constexpr int DEFAULT_PADDING_SIZE = 0x10; #else static constexpr int DEFAULT_PADDING_SIZE = 0x0; @@ -258,7 +258,7 @@ private: // guarantee alignment. //static_assert( //INITIAL_CHUNK_SIZE >= config::FLAGS_MEMORY_MAX_ALIGNMENT, "Min chunk size too low"); -if (UNLIKELY(!find_chunk(size, CHECK_LIMIT_FIRST))) { +if (UNLIKELY(!find_chunk(size + DEFAULT_PADDING_SIZE, CHECK_LIMIT_FIRST))) { return nullptr; } diff --git a/be/test/common/status_test.cpp b/be/test/common/status_test.cpp index bcd888b..df6afca 100644 --- a/be/test/common/status_test.cpp +++ b/be/test/common/status_test.cpp @@ -69,8 +69,6 @@ TEST_F(StatusTest, Error) { ASSERT_FALSE(other.ok()); ASSERT_EQ("456", other.get_error_msg()); ASSERT_EQ("Internal error: 456", other.to_string()); -ASSERT_TRUE(st.ok()); -ASSERT_EQ("OK", st.to_string()); } } diff --git a/be/test/olap/schema_change_test.cpp b/be/test/olap/schema_change_test.cpp index de8a2bc..9efcedf 100644 --- a/be/test/olap/schema_change_test.cpp +++ b/be/test/olap/schema_change_test.cpp @@ -82,22 +82,22 @@ public: _length_buffers.clear(); } -void create_columnWriter(const TabletSchema& tablet_schema) { +void create_column_writer(const TabletSchema& tablet_schema) { _column_writer = ColumnWriter::create(0, tablet_schema, _stream_factory, 1024, BLOOM_FILTER_DEFAULT_FPP); ASSERT_TRUE(_column_writer != nullptr); ASSERT_EQ(_column_writer->init(), OLAP_SUCCESS); } -void create_columnReader(const TabletSchema& tablet_schema) { +void create_column_reader(const TabletSchema& tablet_schema) { UniqueIdEncodingMap encodings; encodings[0] = ColumnEncodingMessage(); encodings[0].set_kind(ColumnEncodingMessage::DIRECT); encodings[0].set_dictionary_size(1); -create_columnReader(tablet_schema, encodings); +create_column_reader(tablet_schema, encodings); } -void create_columnReader(const TabletSchema& tablet_schema, UniqueIdEncodingMap& encodings) { +void create_column_reader(const TabletSchema& tablet_schema, UniqueIdEncodingMap& encodings) { UniqueIdToColumnIdMap included; included[0] = 0; UniqueIdToColumnIdMap segment_included; @@ -179,7 +179,7 @@ public: OLAP_SUCCESS); } -void SetTabletSchema(const std::string& name, const std::string& type, +void set_tablet_schema(const std::string& name, const std::string& type, const std::string& aggregation, uint32_t length, bool is_allow_null, bool is_key, TabletSchema* tablet_schema) { TabletSchemaPB tablet_schema_pb; @@ -203,9 +203,9 @@ public: const std::string& expected_val, OLAPStatus expected_st, int varchar_len = 255) { TabletSchema src_tablet_schema; -SetTabletSchema("ConvertColumn", type_name, "REPLACE", type_size, false, false, +set_tablet_schema("ConvertColumn", type_name, "REPLACE", type_size, false, false, &src_t
[incubator-doris] 04/06: [fix](load) Fix InsertStmt prepareExpressions (#8112)
This is an automated email from the ASF dual-hosted git repository. morningman pushed a commit to branch dev-1.0.0 in repository https://gitbox.apache.org/repos/asf/incubator-doris.git commit e7233ded231da5898115f5a5545d2ccc121d1f76 Author: Arthur Yang AuthorDate: Thu Feb 24 23:12:51 2022 +0800 [fix](load) Fix InsertStmt prepareExpressions (#8112) Use queryStmt.getResultExprs() instead of queryStmt.getBaseTblResultExprs() in InsertStmt prepareExpressions func. --- .../java/org/apache/doris/analysis/InsertStmt.java | 2 +- .../doris/common/profile/PlanTreeBuilder.java | 7 +- .../org/apache/doris/planner/QueryPlanTest.java| 28 ++ 3 files changed, 35 insertions(+), 2 deletions(-) diff --git a/fe/fe-core/src/main/java/org/apache/doris/analysis/InsertStmt.java b/fe/fe-core/src/main/java/org/apache/doris/analysis/InsertStmt.java index dcbc4c0..f750749 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/analysis/InsertStmt.java +++ b/fe/fe-core/src/main/java/org/apache/doris/analysis/InsertStmt.java @@ -667,7 +667,7 @@ public class InsertStmt extends DdlStmt { } public void prepareExpressions() throws UserException { -List selectList = Expr.cloneList(queryStmt.getBaseTblResultExprs()); +List selectList = Expr.cloneList(queryStmt.getResultExprs()); // check type compatibility int numCols = targetColumns.size(); for (int i = 0; i < numCols; ++i) { diff --git a/fe/fe-core/src/main/java/org/apache/doris/common/profile/PlanTreeBuilder.java b/fe/fe-core/src/main/java/org/apache/doris/common/profile/PlanTreeBuilder.java index dab18e1..8d8d088 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/common/profile/PlanTreeBuilder.java +++ b/fe/fe-core/src/main/java/org/apache/doris/common/profile/PlanTreeBuilder.java @@ -56,7 +56,12 @@ public class PlanTreeBuilder { PlanTreeNode sinkNode = null; if (sink != null) { StringBuilder sb = new StringBuilder(); -sb.append("[").append(sink.getExchNodeId().asInt()).append(": ").append(sink.getClass().getSimpleName()).append("]"); +if (sink.getExchNodeId() != null) { + sb.append("[").append(sink.getExchNodeId().asInt()).append(": ") + .append(sink.getClass().getSimpleName()).append("]"); +} else { + sb.append("[").append(sink.getClass().getSimpleName()).append("]"); +} sb.append("\n[Fragment: ").append(fragment.getId().asInt()).append("]"); sb.append("\n").append(sink.getExplainString("", TExplainLevel.BRIEF)); sinkNode = new PlanTreeNode(sink.getExchNodeId(), sb.toString()); diff --git a/fe/fe-core/src/test/java/org/apache/doris/planner/QueryPlanTest.java b/fe/fe-core/src/test/java/org/apache/doris/planner/QueryPlanTest.java index dc2206e..94417eb 100644 --- a/fe/fe-core/src/test/java/org/apache/doris/planner/QueryPlanTest.java +++ b/fe/fe-core/src/test/java/org/apache/doris/planner/QueryPlanTest.java @@ -433,6 +433,20 @@ public class QueryPlanTest { "\"replication_num\" = \"1\"" + ");"); +createTable("CREATE TABLE test.result_exprs (\n" + +" `aid` int(11) NULL,\n" + +" `bid` int(11) NULL\n" + +") ENGINE=OLAP\n" + +"DUPLICATE KEY(`aid`)\n" + +"COMMENT \"OLAP\"\n" + +"DISTRIBUTED BY HASH(`aid`) BUCKETS 7\n" + +"PROPERTIES (\n" + +"\"replication_num\" = \"1\",\n" + +"\"in_memory\" = \"false\",\n" + +"\"business_key_column_name\" = \"\",\n" + +"\"storage_medium\" = \"HDD\",\n" + +"\"storage_format\" = \"V2\"\n" + +");\n"); } @AfterClass @@ -2026,4 +2040,18 @@ public class QueryPlanTest { } } +@Test +public void testResultExprs() throws Exception { +connectContext.setDatabase("default_cluster:test"); +String queryStr = "EXPLAIN INSERT INTO result_exprs\n" + +"SELECT a.aid,\n" + +" b.bid\n" + +"FROM\n" + +" (SELECT 3 AS aid)a\n" + +"RIGHT JOIN\n" + +" (SELECT 4 AS bid)b ON (a.aid=b.bid)\n"; +String explainString = UtFrameUtils.getSQLPlanOrErrorMsg(connectContext, queryStr); +Assert.assertFalse(explainString.contains("OUTPUT EXPRS:3 | 4")); +Assert.assertTrue(explainString.contains("OUTPUT EXPRS:CAST(`a`.`aid` AS INT) | 4")); +} } - To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org
[incubator-doris] 03/06: [Function] Refactor the function code of log (#8199)
This is an automated email from the ASF dual-hosted git repository. morningman pushed a commit to branch dev-1.0.0 in repository https://gitbox.apache.org/repos/asf/incubator-doris.git commit d3b9bb20ff63b2bcb5a12501374ad363284408ce Author: HappenLee AuthorDate: Thu Feb 24 11:06:58 2022 +0800 [Function] Refactor the function code of log (#8199) 1. Support return null when input is invalid 2. Del the unless code in vec function Co-authored-by: lihaopeng --- be/src/exprs/math_functions.cpp| 12 +- be/src/vec/functions/function_binary_arithmetic.h | 7 + .../vec/functions/function_math_binary_float64.h | 248 - be/src/vec/functions/function_math_unary.h | 1 + ..._unary.h => function_math_unary_to_null_type.h} | 87 ++-- be/src/vec/functions/math.cpp | 131 ++- be/src/vec/functions/modulo.cpp| 2 +- be/src/vec/io/io_helper.h | 1 + be/test/vec/function/function_math_test.cpp| 11 +- be/test/vec/function/function_test_util.h | 1 - gensrc/script/doris_builtins_functions.py | 8 +- 11 files changed, 127 insertions(+), 382 deletions(-) diff --git a/be/src/exprs/math_functions.cpp b/be/src/exprs/math_functions.cpp index 708fc42..13fe610 100644 --- a/be/src/exprs/math_functions.cpp +++ b/be/src/exprs/math_functions.cpp @@ -161,6 +161,12 @@ SmallIntVal MathFunctions::abs(FunctionContext* ctx, const doris_udf::TinyIntVal return SmallIntVal(std::abs(int16_t(val.val))); } +#define LOG_MATH_FN(NAME, RET_TYPE, INPUT_TYPE, FN) \ +RET_TYPE MathFunctions::NAME(FunctionContext* ctx, const INPUT_TYPE& v) { \ +if (v.is_null || v.val <= 0) return RET_TYPE::null(); \ +return RET_TYPE(FN(v.val)); \ +} + // Generates a UDF that always calls FN() on the input val and returns it. #define ONE_ARG_MATH_FN(NAME, RET_TYPE, INPUT_TYPE, FN) \ RET_TYPE MathFunctions::NAME(FunctionContext* ctx, const INPUT_TYPE& v) { \ @@ -179,9 +185,9 @@ ONE_ARG_MATH_FN(atan, DoubleVal, DoubleVal, std::atan); ONE_ARG_MATH_FN(sqrt, DoubleVal, DoubleVal, std::sqrt); ONE_ARG_MATH_FN(ceil, BigIntVal, DoubleVal, std::ceil); ONE_ARG_MATH_FN(floor, BigIntVal, DoubleVal, std::floor); -ONE_ARG_MATH_FN(ln, DoubleVal, DoubleVal, std::log); -ONE_ARG_MATH_FN(log10, DoubleVal, DoubleVal, std::log10); ONE_ARG_MATH_FN(exp, DoubleVal, DoubleVal, std::exp); +LOG_MATH_FN(ln, DoubleVal, DoubleVal, std::log); +LOG_MATH_FN(log10, DoubleVal, DoubleVal, std::log10); TinyIntVal MathFunctions::sign(FunctionContext* ctx, const DoubleVal& v) { if (v.is_null) { @@ -227,7 +233,7 @@ DoubleVal MathFunctions::truncate(FunctionContext* ctx, const DoubleVal& v, cons } DoubleVal MathFunctions::log2(FunctionContext* ctx, const DoubleVal& v) { -if (v.is_null) { +if (v.is_null || v.val <= 0.0) { return DoubleVal::null(); } return DoubleVal(std::log(v.val) / std::log(2.0)); diff --git a/be/src/vec/functions/function_binary_arithmetic.h b/be/src/vec/functions/function_binary_arithmetic.h index f987f90..da1cabb 100644 --- a/be/src/vec/functions/function_binary_arithmetic.h +++ b/be/src/vec/functions/function_binary_arithmetic.h @@ -461,6 +461,8 @@ template class Op, typename Name, bool CanBeExecutedOnDefaultArguments = true> class FunctionBinaryArithmetic : public IFunction { bool check_decimal_overflow = true; +static constexpr bool has_variadic_argument = + !std::is_void_v>()))>; template static bool cast_type(const IDataType* type, F&& f) { @@ -508,6 +510,11 @@ public: size_t get_number_of_arguments() const override { return 2; } +DataTypes get_variadic_argument_types_impl() const override { +if constexpr (has_variadic_argument) return Op::get_variadic_argument_types(); +return {}; +} + DataTypePtr get_return_type_impl(const DataTypes& arguments) const override { DataTypePtr type_res; bool valid = cast_both_types( diff --git a/be/src/vec/functions/function_math_binary_float64.h b/be/src/vec/functions/function_math_binary_float64.h deleted file mode 100644 index 8f41931..000 --- a/be/src/vec/functions/function_math_binary_float64.h +++ /dev/null @@ -1,248 +0,0 @@ -// Licensed to the Apache Software Foundation (ASF) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The ASF licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing
[incubator-doris] 06/06: [Feature][array-type]add proto for complex data type ARRAY (#8212)
This is an automated email from the ASF dual-hosted git repository. morningman pushed a commit to branch dev-1.0.0 in repository https://gitbox.apache.org/repos/asf/incubator-doris.git commit c302179ee3923e35cffab48eb107239d378c4e35 Author: camby <104178...@qq.com> AuthorDate: Thu Feb 24 23:16:41 2022 +0800 [Feature][array-type]add proto for complex data type ARRAY (#8212) 1. Add repeated PBlock.PColumnMeta.children field for complex data type, such as ARRAY; 2. change PBlock.PColumnMeta.name to optional, nested columns do not need to a column name; --- gensrc/proto/data.proto | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gensrc/proto/data.proto b/gensrc/proto/data.proto index 8c9e2c0..b1c5273 100644 --- a/gensrc/proto/data.proto +++ b/gensrc/proto/data.proto @@ -52,10 +52,11 @@ message PColumnMeta { optional uint32 precision = 1; optional uint32 scale = 2; } -required string name = 1; -required PGenericType.TypeId type = 2; +optional string name = 1 [default = ""]; +optional PGenericType.TypeId type = 2 [default = UNKNOWN]; optional bool is_nullable = 3 [default = false]; optional Decimal decimal_param = 4; +repeated PColumnMeta children = 5; } message PBlock { - To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org
[incubator-doris] branch dev-1.0.0 updated (0726a43 -> c302179)
This is an automated email from the ASF dual-hosted git repository. morningman pushed a change to branch dev-1.0.0 in repository https://gitbox.apache.org/repos/asf/incubator-doris.git. from 0726a43 [fix](be-ut) Fix unused-but-set-variable errors. (#8211) new d8b1065 [fix](mem-pool) fix bug that mem pool failed to allocate in ASAN mode (#8216) new 061e344 [Bug][Vectorized] fix bitmap_min(empty) not return null (#8190) new d3b9bb2 [Function] Refactor the function code of log (#8199) new e7233de [fix](load) Fix InsertStmt prepareExpressions (#8112) new b45a100 [git] Ignore all the .flattened-pom.xml files (#8197) new c302179 [Feature][array-type]add proto for complex data type ARRAY (#8212) The 6 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: .gitignore | 8 +- be/src/exprs/math_functions.cpp| 12 +- be/src/olap/rowset/column_reader.h | 1 - be/src/runtime/mem_pool.h | 4 +- be/src/util/bitmap_value.h | 101 - .../vec/functions/function_always_not_nullable.h | 3 - be/src/vec/functions/function_binary_arithmetic.h | 7 + be/src/vec/functions/function_bitmap.cpp | 51 + be/src/vec/functions/function_bitmap_min_or_max.h | 100 + be/src/vec/functions/function_convert_tz.h | 3 - .../function_date_or_datetime_computation.cpp | 6 +- .../vec/functions/function_math_binary_float64.h | 248 - be/src/vec/functions/function_math_unary.h | 1 + ..._unary.h => function_math_unary_to_null_type.h} | 87 ++-- be/src/vec/functions/math.cpp | 131 ++- be/src/vec/functions/modulo.cpp| 2 +- be/src/vec/io/io_helper.h | 1 + be/src/vec/utils/template_helpers.hpp | 3 - be/test/common/status_test.cpp | 2 - be/test/olap/schema_change_test.cpp| 224 ++- be/test/plugin/CMakeLists.txt | 6 +- be/test/vec/function/function_math_test.cpp| 11 +- be/test/vec/function/function_test_util.h | 1 - .../java/org/apache/doris/analysis/InsertStmt.java | 2 +- .../doris/common/profile/PlanTreeBuilder.java | 7 +- .../org/apache/doris/planner/QueryPlanTest.java| 28 +++ gensrc/proto/data.proto| 5 +- gensrc/script/doris_builtins_functions.py | 12 +- 28 files changed, 502 insertions(+), 565 deletions(-) create mode 100644 be/src/vec/functions/function_bitmap_min_or_max.h delete mode 100644 be/src/vec/functions/function_math_binary_float64.h copy be/src/vec/functions/{function_math_unary.h => function_math_unary_to_null_type.h} (57%) - To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org
[incubator-doris] 05/06: [git] Ignore all the .flattened-pom.xml files (#8197)
This is an automated email from the ASF dual-hosted git repository. morningman pushed a commit to branch dev-1.0.0 in repository https://gitbox.apache.org/repos/asf/incubator-doris.git commit b45a100492d13dc3621354f3208b28b2005fe50d Author: Shuo Wang AuthorDate: Thu Feb 24 23:16:13 2022 +0800 [git] Ignore all the .flattened-pom.xml files (#8197) --- .gitignore | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index 6571a6b..5a499bb 100644 --- a/.gitignore +++ b/.gitignore @@ -37,7 +37,6 @@ fe/fe-core/src/main/resources/static/ nohup.out regression-test/framework/target -regression-test/framework/.flattened-pom.xml regression-test/framework/dependency-reduced-pom.xml # ignore eclipse project file & idea project file @@ -66,10 +65,6 @@ ui/package-lock.json ui/yarn.lock docs/package-lock.json fe/fe-common/.classpath -fe/.flattened-pom.xml -fe/fe-common/.flattened-pom.xml -fe/fe-core/.flattened-pom.xml -fe/spark-dpp/.flattened-pom.xml rpc_data/ @@ -81,3 +76,6 @@ samples/doris-demo/*/target be/.devcontainer/ derby.log + +# Ignore all the .flattened-pom.xml files +.flattened-pom.xml - To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org
[incubator-doris] 02/06: [Bug][Vectorized] fix bitmap_min(empty) not return null (#8190)
This is an automated email from the ASF dual-hosted git repository. morningman pushed a commit to branch dev-1.0.0 in repository https://gitbox.apache.org/repos/asf/incubator-doris.git commit 061e344cff0d0f6f4bc815713163057ac35fc7f0 Author: Pxl <952130...@qq.com> AuthorDate: Thu Feb 24 11:06:27 2022 +0800 [Bug][Vectorized] fix bitmap_min(empty) not return null (#8190) --- be/src/util/bitmap_value.h | 101 ++--- .../vec/functions/function_always_not_nullable.h | 3 - be/src/vec/functions/function_bitmap.cpp | 51 +-- be/src/vec/functions/function_bitmap_min_or_max.h | 100 be/src/vec/functions/function_convert_tz.h | 3 - .../function_date_or_datetime_computation.cpp | 6 +- be/src/vec/utils/template_helpers.hpp | 3 - gensrc/script/doris_builtins_functions.py | 4 +- 8 files changed, 157 insertions(+), 114 deletions(-) diff --git a/be/src/util/bitmap_value.h b/be/src/util/bitmap_value.h index 1ac8a9d..0dd6031 100644 --- a/be/src/util/bitmap_value.h +++ b/be/src/util/bitmap_value.h @@ -1567,7 +1567,7 @@ public: return true; } -doris_udf::BigIntVal minimum() { +doris_udf::BigIntVal minimum() const { switch (_type) { case SINGLE: return doris_udf::BigIntVal(_sv); @@ -1612,7 +1612,7 @@ public: return ss.str(); } -doris_udf::BigIntVal maximum() { +doris_udf::BigIntVal maximum() const { switch (_type) { case SINGLE: return doris_udf::BigIntVal(_sv); @@ -1691,7 +1691,7 @@ public: } return count; } - + void clear() { _type = EMPTY; _bitmap.clear(); @@ -1736,31 +1736,28 @@ private: // BitmapValueIterator end = bitmap_value.end(); // for (; iter != end(); ++iter) { // uint64_t v = *iter; -// ... do something with "v" ... +// ... do something with "v" ... // } class BitmapValueIterator { public: -BitmapValueIterator(const BitmapValue& bitmap, bool end = false) -: _bitmap(bitmap), _end(end) { - +BitmapValueIterator(const BitmapValue& bitmap, bool end = false) : _bitmap(bitmap), _end(end) { switch (_bitmap._type) { -case BitmapValue::BitmapDataType::EMPTY: -_end = true; -break; -case BitmapValue::BitmapDataType::SINGLE: -_sv = _bitmap._sv; -break; -case BitmapValue::BitmapDataType::BITMAP: -_iter = new detail::Roaring64MapSetBitForwardIterator(_bitmap._bitmap, _end); -break; -default: -CHECK(false) << _bitmap._type; +case BitmapValue::BitmapDataType::EMPTY: +_end = true; +break; +case BitmapValue::BitmapDataType::SINGLE: +_sv = _bitmap._sv; +break; +case BitmapValue::BitmapDataType::BITMAP: +_iter = new detail::Roaring64MapSetBitForwardIterator(_bitmap._bitmap, _end); +break; +default: +CHECK(false) << _bitmap._type; } } BitmapValueIterator(const BitmapValueIterator& other) -: _bitmap(other._bitmap), _iter(other._iter), _sv(other._sv), _end(other._end) { -} +: _bitmap(other._bitmap), _iter(other._iter), _sv(other._sv), _end(other._end) {} ~BitmapValueIterator() { if (_iter != nullptr) { @@ -1772,12 +1769,12 @@ public: uint64_t operator*() const { CHECK(!_end) << "should not get value of end iterator"; switch (_bitmap._type) { -case BitmapValue::BitmapDataType::SINGLE: -return _sv; -case BitmapValue::BitmapDataType::BITMAP: -return *(*_iter); -default: -CHECK(false) << _bitmap._type; +case BitmapValue::BitmapDataType::SINGLE: +return _sv; +case BitmapValue::BitmapDataType::BITMAP: +return *(*_iter); +default: +CHECK(false) << _bitmap._type; } return 0; } @@ -1785,14 +1782,14 @@ public: BitmapValueIterator& operator++() { // ++i, must returned inc. value CHECK(!_end) << "should not forward when iterator ends"; switch (_bitmap._type) { -case BitmapValue::BitmapDataType::SINGLE: -_end = true; -break; -case BitmapValue::BitmapDataType::BITMAP: -++(*_iter); -break; -default: -CHECK(false) << _bitmap._type; +case BitmapValue::BitmapDataType::SINGLE: +_end = true; +break; +case BitmapValue::BitmapDataType::BITMAP: +++(*_iter); +break; +default: +CHECK(false) << _bitmap._type; } return *this; } @@ -1801,14 +1798,14 @@ public
[GitHub] [incubator-doris] github-actions[bot] commented on pull request #8223: [refactor] change mysql server version to avoid some cve issues
github-actions[bot] commented on pull request #8223: URL: https://github.com/apache/incubator-doris/pull/8223#issuecomment-1049992231 -- 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-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org
[GitHub] [incubator-doris] github-actions[bot] commented on pull request #8221: [Bug][Vectorized] Fix bug of decimal cast to double loss precision && join code dump in semi/anti join
github-actions[bot] commented on pull request #8221: URL: https://github.com/apache/incubator-doris/pull/8221#issuecomment-1049993045 -- 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-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org
[GitHub] [incubator-doris] github-actions[bot] commented on pull request #8172: (improvement)(olap) using placement-new to avoid dynamic mallocing for ParsedPage
github-actions[bot] commented on pull request #8172: URL: https://github.com/apache/incubator-doris/pull/8172#issuecomment-1050048056 -- 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-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org
[GitHub] [incubator-doris] spaces-X commented on a change in pull request #8234: [Feature] Support pre-aggregation for quantile type
spaces-X commented on a change in pull request #8234: URL: https://github.com/apache/incubator-doris/pull/8234#discussion_r814433675 ## File path: be/src/util/quantile_state.cpp ## @@ -0,0 +1,377 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +#include +#include +#include "util/quantile_state.h" +#include "util/coding.h" +#include "common/logging.h" + + +namespace doris{ + +template +QuantileState::QuantileState():_type(EMPTY),compression(2048){} + +template +QuantileState::QuantileState(float compression):_type(EMPTY),compression(compression){} + + +template +QuantileState::QuantileState(const Slice& slice) { +if (!deserialize(slice)) { +_type = EMPTY; +} +} + +template +QuantileState::~QuantileState() { +clear(); +} + +template +size_t QuantileState::get_serialized_size() { +size_t size = 1 + sizeof(float); // type(QuantileStateType) + compression(float) +switch(_type) { +case EMPTY: +break; +case SINGLE: +size += sizeof(T); +break; +case EXPLICIT: +size += sizeof(uint16_t) + sizeof(T) * _explicit_data.size(); +break; +case TDIGEST: +size += tdigest_ptr->serialized_size(); +break; +} +return size; +} + +template +void QuantileState::set_compression(float compression) { +this->compression = compression; +} + +template +bool QuantileState::is_valid(const Slice& slice) { + +if (slice.size < 1) { +return false; +} +const uint8_t* ptr = (uint8_t*)slice.data; +const uint8_t* end = (uint8_t*)slice.data + slice.size; +float compress_value = *reinterpret_cast(ptr); +if (compress_value < 2048 || compress_value > 1) { +return false; +} +ptr += sizeof(float); + + +auto type = (QuantileStateType)*ptr++; +switch (type) { +case EMPTY: +break; +case SINGLE:{ +if ((ptr + sizeof(T)) > end) { +return false; +} +ptr += sizeof(T); +// _single_data = *reinterpret_cast(ptr)++; +break; +} +case EXPLICIT: { +if ((ptr + sizeof(uint16_t)) > end) { +return false; +} +uint16_t num_explicits = decode_fixed16_le(ptr); +ptr += sizeof(uint16_t); +ptr += num_explicits * sizeof(T); +break; +} +case TDIGEST: { +if ((ptr + sizeof(uint32_t)) > end) { +return false; +} +uint32_t tdigest_serialized_length = decode_fixed32_le(ptr); +ptr += tdigest_serialized_length; +break; +} +default: +return false; +} +return ptr == end; +} + +template +T QuantileState::get_explicit_value_by_percentile(float percentile) { +DCHECK(_type == EXPLICIT); +if (percentile < 0 || percentile > 1) { +LOG(WARNING) << "get_explicit_value_by_percentile failed caused by percentile:" << percentile <<" is invalid"; +return NAN; +} +int n = _explicit_data.size(); +std::sort(_explicit_data.begin(), _explicit_data.end()); + +double index = (n - 1) * percentile; +int intIdx = (int) index; +if (intIdx == n-1 ){ +return _explicit_data[intIdx]; +} +return _explicit_data[intIdx+1] * (index - intIdx) + _explicit_data[intIdx] * (intIdx + 1 - index); +} + +template +T QuantileState::get_value_by_percentile(float percentile) { +switch(_type) { +case EMPTY: { +return NAN; +} +case SINGLE: { +return _single_data; +} +case EXPLICIT: { +return get_explicit_value_by_percentile(percentile); +} +case TDIGEST: { +return tdigest_ptr->quantile(percentile); +} +default: +break; +} +return NAN; +} + +template +bool QuantileState::deserialize(const Slice& slice) { +DCHECK(_type == EMPTY); + +// in case of insert error data caused be crashed +if (slice.data == nullptr || slice.size <= 0) { +return false; +} +// check input is valid +if (!is_valid(slice)) { +LOG(WARNING) << "QuantileState deserialize failed: slice is invalid"; +return false; +} + +const uint8_t* ptr = (uint8_t*)slice.data; +compression = *reinterpret_c
[GitHub] [incubator-doris] Henry2SS commented on a change in pull request #8195: fix show routine load task error
Henry2SS commented on a change in pull request #8195: URL: https://github.com/apache/incubator-doris/pull/8195#discussion_r814435018 ## File path: fe/fe-core/src/main/java/org/apache/doris/load/routineload/RoutineLoadJob.java ## @@ -1299,7 +1300,14 @@ protected abstract boolean checkCommitInfo(RLTaskTxnCommitAttachment rlTaskTxnCo public List> getTasksShowInfo() { List> rows = Lists.newArrayList(); -routineLoadTaskInfoList.stream().forEach(entity -> rows.add(entity.getTaskShowInfo())); +routineLoadTaskInfoList.stream().forEach(entity -> { +try { + entity.setTxnStatus(Catalog.getCurrentCatalog().getGlobalTransactionMgr().getDatabaseTransactionMgr(dbId).getTransactionState(entity.getTxnId()).getTransactionStatus()); +rows.add(entity.getTaskShowInfo()); +} catch (AnalysisException e) { +LOG.warn("failed to setTxnStatus db: {}, txnId: {}, err: {}", dbId, entity.getTxnId(), e.getErrorMsg()); Review comment: Done -- 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-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org
[GitHub] [incubator-doris] BiteTheDDDDt commented on a change in pull request #8226: [Bug][Vectorized] fix arithmetic calculate get wrong result
BiteThet commented on a change in pull request #8226: URL: https://github.com/apache/incubator-doris/pull/8226#discussion_r814438974 ## File path: be/src/vec/functions/modulo.cpp ## @@ -72,6 +74,7 @@ struct PModuloImpl { } } + template Review comment: > format the code This code already formated. -- 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-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org
[GitHub] [incubator-doris] HappenLee closed issue #8231: [Bug] group_concat(value,null) not return null
HappenLee closed issue #8231: URL: https://github.com/apache/incubator-doris/issues/8231 -- 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-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org
[GitHub] [incubator-doris] HappenLee merged pull request #8232: [Bug] group_concat(value,null) not return null
HappenLee merged pull request #8232: URL: https://github.com/apache/incubator-doris/pull/8232 -- 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-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org
[incubator-doris] branch master updated: [Bug] group_concat(value, null) not return null
This is an automated email from the ASF dual-hosted git repository. lihaopeng pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-doris.git The following commit(s) were added to refs/heads/master by this push: new 4c5d7c2 [Bug] group_concat(value,null) not return null 4c5d7c2 is described below commit 4c5d7c27dfa97cd945c904786acb63e35dc3b1d0 Author: Pxl <952130...@qq.com> AuthorDate: Fri Feb 25 11:03:23 2022 +0800 [Bug] group_concat(value,null) not return null --- be/src/exprs/aggregate_functions.cpp | 4 ++-- .../sql-functions/aggregate-functions/group_concat.md | 7 +++ .../sql-functions/aggregate-functions/group_concat.md | 7 +++ 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/be/src/exprs/aggregate_functions.cpp b/be/src/exprs/aggregate_functions.cpp index f8efe67..9f059b7 100644 --- a/be/src/exprs/aggregate_functions.cpp +++ b/be/src/exprs/aggregate_functions.cpp @@ -784,7 +784,7 @@ void AggregateFunctions::max(FunctionContext*, const DateTimeVal& src, DateTimeV void AggregateFunctions::string_concat(FunctionContext* ctx, const StringVal& src, const StringVal& separator, StringVal* result) { -if (src.is_null) { +if (src.is_null || separator.is_null) { return; } @@ -819,7 +819,7 @@ void AggregateFunctions::string_concat_update(FunctionContext* ctx, const String void AggregateFunctions::string_concat_update(FunctionContext* ctx, const StringVal& src, const StringVal& separator, StringVal* result) { -if (src.is_null) { +if (src.is_null || separator.is_null) { return; } const StringVal* sep = separator.is_null ? &DEFAULT_STRING_CONCAT_DELIM : &separator; diff --git a/docs/en/sql-reference/sql-functions/aggregate-functions/group_concat.md b/docs/en/sql-reference/sql-functions/aggregate-functions/group_concat.md index bdff733..b9273a9 100644 --- a/docs/en/sql-reference/sql-functions/aggregate-functions/group_concat.md +++ b/docs/en/sql-reference/sql-functions/aggregate-functions/group_concat.md @@ -58,6 +58,13 @@ mysql> select GROUP_CONCAT(value, " ") from test; ++ | a b c | ++ + +mysql> select GROUP_CONCAT(value, NULL) from test; +++ +| GROUP_CONCAT(`value`, NULL)| +++ +| NULL | +++ ``` ## keyword GROUP_CONCAT,GROUP,CONCAT diff --git a/docs/zh-CN/sql-reference/sql-functions/aggregate-functions/group_concat.md b/docs/zh-CN/sql-reference/sql-functions/aggregate-functions/group_concat.md index bc43575..8e2a3f4 100644 --- a/docs/zh-CN/sql-reference/sql-functions/aggregate-functions/group_concat.md +++ b/docs/zh-CN/sql-reference/sql-functions/aggregate-functions/group_concat.md @@ -58,6 +58,13 @@ mysql> select GROUP_CONCAT(value, " ") from test; ++ | a b c | ++ + +mysql> select GROUP_CONCAT(value, NULL) from test; +++ +| GROUP_CONCAT(`value`, NULL)| +++ +| NULL | +++ ``` ## keyword GROUP_CONCAT,GROUP,CONCAT - To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org
[GitHub] [incubator-doris] HappenLee closed issue #8228: [Bug] Double % 0 should return null
HappenLee closed issue #8228: URL: https://github.com/apache/incubator-doris/issues/8228 -- 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-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org
[GitHub] [incubator-doris] HappenLee merged pull request #8230: [Bug] Double/Float % 0 should be NULL
HappenLee merged pull request #8230: URL: https://github.com/apache/incubator-doris/pull/8230 -- 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-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org
[incubator-doris] branch master updated: [Bug] Double/Float % 0 should be NULL (#8230)
This is an automated email from the ASF dual-hosted git repository. lihaopeng pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-doris.git The following commit(s) were added to refs/heads/master by this push: new 8642fa3 [Bug] Double/Float % 0 should be NULL (#8230) 8642fa3 is described below commit 8642fa38b9ed53184e41f3e03d98ff0d4d652d1d Author: HappenLee AuthorDate: Fri Feb 25 11:03:42 2022 +0800 [Bug] Double/Float % 0 should be NULL (#8230) Co-authored-by: lihaopeng --- be/src/exprs/arithmetic_expr.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/be/src/exprs/arithmetic_expr.cpp b/be/src/exprs/arithmetic_expr.cpp index 06546c2..dc4399b 100644 --- a/be/src/exprs/arithmetic_expr.cpp +++ b/be/src/exprs/arithmetic_expr.cpp @@ -113,7 +113,7 @@ FloatVal ModExpr::get_float_val(ExprContext* context, TupleRow* row) { return FloatVal::null(); } FloatVal v2 = _children[1]->get_float_val(context, row); -if (v2.is_null) { +if (v2.is_null || v2.val == 0) { return FloatVal::null(); } return FloatVal(fmod(v1.val, v2.val)); @@ -125,7 +125,7 @@ DoubleVal ModExpr::get_double_val(ExprContext* context, TupleRow* row) { return DoubleVal::null(); } DoubleVal v2 = _children[1]->get_double_val(context, row); -if (v2.is_null) { +if (v2.is_null || v2.val == 0) { return DoubleVal::null(); } return DoubleVal(fmod(v1.val, v2.val)); - To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org
[incubator-doris] branch master updated: [Bug][Vectorized] Fix bug of decimal cast to double loss precision (#8221)
This is an automated email from the ASF dual-hosted git repository. lihaopeng pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-doris.git The following commit(s) were added to refs/heads/master by this push: new 6f4cf57 [Bug][Vectorized] Fix bug of decimal cast to double loss precision (#8221) 6f4cf57 is described below commit 6f4cf57b17f7f7e27282b5fb403e6f7b253a3b66 Author: HappenLee AuthorDate: Fri Feb 25 11:04:11 2022 +0800 [Bug][Vectorized] Fix bug of decimal cast to double loss precision (#8221) Co-authored-by: lihaopeng --- be/src/vec/data_types/data_type_decimal.h | 2 +- be/src/vec/exec/join/vhash_join_node.cpp | 67 +-- be/src/vec/exec/join/vhash_join_node.h| 2 - 3 files changed, 38 insertions(+), 33 deletions(-) diff --git a/be/src/vec/data_types/data_type_decimal.h b/be/src/vec/data_types/data_type_decimal.h index 8792a95..21cdbed 100644 --- a/be/src/vec/data_types/data_type_decimal.h +++ b/be/src/vec/data_types/data_type_decimal.h @@ -290,7 +290,7 @@ convert_from_decimal(const typename FromDataType::FieldType& value, UInt32 scale using ToFieldType = typename ToDataType::FieldType; if constexpr (std::is_floating_point_v) -return static_cast(value) / FromDataType::get_scale_multiplier(scale); +return binary_cast(value); else { FromFieldType converted_value = convert_decimals(value, scale, 0); diff --git a/be/src/vec/exec/join/vhash_join_node.cpp b/be/src/vec/exec/join/vhash_join_node.cpp index ead..f6a5422 100644 --- a/be/src/vec/exec/join/vhash_join_node.cpp +++ b/be/src/vec/exec/join/vhash_join_node.cpp @@ -158,8 +158,6 @@ template struct ProcessHashTableProbe { ProcessHashTableProbe(HashJoinNode* join_node, int batch_size, int probe_rows) : _join_node(join_node), - _right_col_idx(join_node->_right_col_idx), - _right_col_len(join_node->_right_col_len), _batch_size(batch_size), _probe_rows(probe_rows), _build_blocks(join_node->_build_blocks), @@ -180,6 +178,10 @@ struct ProcessHashTableProbe { using KeyGetter = typename HashTableContext::State; using Mapped = typename HashTableContext::Mapped; +int right_col_idx = _join_node->_is_right_semi_anti ? 0 : +_join_node->_left_table_data_types.size(); +int right_col_len = _join_node->_right_table_data_types.size(); + KeyGetter key_getter(_probe_raw_ptrs, _join_node->_probe_key_sz, nullptr); auto& mcol = mutable_block.mutable_columns(); int current_offset = 0; @@ -194,6 +196,10 @@ struct ProcessHashTableProbe { constexpr auto is_right_semi_anti_join = JoinOpType::value == TJoinOp::RIGHT_ANTI_JOIN || JoinOpType::value == TJoinOp::RIGHT_SEMI_JOIN; +constexpr auto is_semi_anti_join = is_right_semi_anti_join || +JoinOpType::value == TJoinOp::LEFT_ANTI_JOIN || +JoinOpType::value == TJoinOp::LEFT_SEMI_JOIN; + constexpr auto probe_all = JoinOpType::value == TJoinOp::LEFT_OUTER_JOIN || JoinOpType::value == TJoinOp::FULL_OUTER_JOIN; @@ -269,34 +275,34 @@ struct ProcessHashTableProbe { } // insert all matched build rows -if constexpr (!is_right_semi_anti_join) { +if constexpr (!is_semi_anti_join) { if (_build_blocks.size() == 1) { -for (int i = 0; i < _right_col_len; i++) { +for (int i = 0; i < right_col_len; i++) { auto& column = *_build_blocks[0].get_by_position(i).column; -mcol[i + _right_col_idx]->insert_indices_from(column, +mcol[i + right_col_idx]->insert_indices_from(column, _build_block_rows.data(), _build_block_rows.data() + current_offset); } } else { -for (int i = 0; i < _right_col_len; i++) { +for (int i = 0; i < right_col_len; i++) { for (int j = 0; j < current_offset; j++) { if constexpr (probe_all) { if (_build_block_offsets[j] == -1) { -DCHECK(mcol[i + _right_col_idx]->is_nullable()); -assert_cast(mcol[i + _right_col_idx].get())->insert_data(nullptr, 0); +DCHECK(mcol[i + right_col_idx]->is_nullable()); +assert_cast(mcol[i + right_col_idx].get())->insert_data(nullptr, 0); } else { auto& column = *_build_blocks[_build_block_offsets[j]].get_by_position(i).column; -mcol[i + _right_col_idx]->insert_f
[GitHub] [incubator-doris] HappenLee merged pull request #8221: [Bug][Vectorized] Fix bug of decimal cast to double loss precision && join code dump in semi/anti join
HappenLee merged pull request #8221: URL: https://github.com/apache/incubator-doris/pull/8221 -- 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-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org
[GitHub] [incubator-doris] HappenLee closed issue #8215: [Bug][Vectorized] Decimal cast to float / double loss of precision
HappenLee closed issue #8215: URL: https://github.com/apache/incubator-doris/issues/8215 -- 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-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org
[GitHub] [incubator-doris] morningman merged pull request #8099: [refactor](fe) Remove version hash on FE side
morningman merged pull request #8099: URL: https://github.com/apache/incubator-doris/pull/8099 -- 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-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org
[incubator-doris] branch master updated (6f4cf57 -> ddf08cc)
This is an automated email from the ASF dual-hosted git repository. morningman pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/incubator-doris.git. from 6f4cf57 [Bug][Vectorized] Fix bug of decimal cast to double loss precision (#8221) add ddf08cc [refactor](fe) Remove version hash on FE side (#8099) No new revisions were added by this update. Summary of changes: .../java/org/apache/doris/alter/AlterHandler.java | 11 +-- .../doris/alter/MaterializedViewHandler.java | 4 +- .../java/org/apache/doris/alter/RollupJobV2.java | 8 +- .../apache/doris/alter/SchemaChangeHandler.java| 3 +- .../org/apache/doris/alter/SchemaChangeJobV2.java | 8 +- .../apache/doris/analysis/SinglePartitionDesc.java | 5 +- .../java/org/apache/doris/backup/BackupJob.java| 16 ++- .../org/apache/doris/backup/BackupJobInfo.java | 3 - .../java/org/apache/doris/backup/RestoreJob.java | 38 --- .../java/org/apache/doris/catalog/Catalog.java | 27 +++-- .../java/org/apache/doris/catalog/OlapTable.java | 8 +- .../java/org/apache/doris/catalog/Partition.java | 74 +++--- .../java/org/apache/doris/catalog/Replica.java | 109 +++-- .../main/java/org/apache/doris/catalog/Tablet.java | 16 +-- .../apache/doris/catalog/TabletInvertedIndex.java | 27 + .../org/apache/doris/catalog/TabletStatMgr.java| 3 +- .../java/org/apache/doris/clone/TabletChecker.java | 1 - .../org/apache/doris/clone/TabletSchedCtx.java | 39 +++- .../org/apache/doris/clone/TabletScheduler.java| 6 +- .../apache/doris/common/proc/LoadJobProcNode.java | 2 +- .../doris/common/proc/PartitionsProcDir.java | 3 +- .../apache/doris/common/proc/ReplicasProcNode.java | 8 +- .../apache/doris/common/proc/StatisticProcDir.java | 2 +- .../apache/doris/common/proc/TabletsProcDir.java | 11 +-- .../doris/common/proc/TransPartitionProcNode.java | 1 - .../apache/doris/common/util/PropertyAnalyzer.java | 26 ++--- .../java/org/apache/doris/common/util/Util.java| 4 - .../doris/consistency/CheckConsistencyJob.java | 11 +-- .../doris/consistency/ConsistencyChecker.java | 10 +- .../org/apache/doris/http/rest/RowCountAction.java | 3 +- .../doris/http/rest/TableQueryPlanAction.java | 9 +- .../apache/doris/httpv2/rest/RowCountAction.java | 3 +- .../doris/httpv2/rest/TableQueryPlanAction.java| 9 +- .../java/org/apache/doris/load/DeleteHandler.java | 4 +- .../src/main/java/org/apache/doris/load/Load.java | 29 +++--- .../java/org/apache/doris/load/LoadChecker.java| 2 +- .../org/apache/doris/load/PartitionLoadInfo.java | 25 ++--- .../java/org/apache/doris/master/MasterImpl.java | 18 ++-- .../org/apache/doris/master/ReportHandler.java | 84 ++-- .../apache/doris/persist/ConsistencyCheckInfo.java | 9 +- .../apache/doris/persist/ReplicaPersistInfo.java | 99 +++ .../org/apache/doris/planner/OlapScanNode.java | 10 +- .../java/org/apache/doris/task/AgentTaskQueue.java | 7 +- .../org/apache/doris/task/AlterReplicaTask.java| 13 +-- .../apache/doris/task/CheckConsistencyTask.java| 10 +- .../main/java/org/apache/doris/task/CloneTask.java | 11 +-- .../org/apache/doris/task/CreateReplicaTask.java | 8 +- .../org/apache/doris/task/ExportPendingTask.java | 1 - .../main/java/org/apache/doris/task/PushTask.java | 16 +-- .../java/org/apache/doris/task/SnapshotTask.java | 9 +- .../doris/transaction/DatabaseTransactionMgr.java | 50 +++--- .../doris/transaction/PartitionCommitInfo.java | 27 + .../doris/transaction/PublishVersionDaemon.java| 8 +- .../org/apache/doris/alter/RollupJobV2Test.java| 56 +-- .../apache/doris/alter/SchemaChangeJobV2Test.java | 4 +- .../org/apache/doris/backup/BackupHandlerTest.java | 4 +- .../org/apache/doris/backup/BackupJobTest.java | 3 +- .../java/org/apache/doris/bdb/BDBToolTest.java | 3 +- .../org/apache/doris/catalog/CatalogTestUtil.java | 39 +++- .../org/apache/doris/catalog/OlapTableTest.java| 2 +- .../java/org/apache/doris/catalog/ReplicaTest.java | 86 +--- .../java/org/apache/doris/catalog/TabletTest.java | 18 ++-- .../java/org/apache/doris/clone/RebalanceTest.java | 2 +- .../org/apache/doris/clone/RebalancerTestUtil.java | 2 +- .../org/apache/doris/common/util/UnitTestUtil.java | 8 +- .../org/apache/doris/http/DorisHttpTestCase.java | 18 ++-- .../doris/http/TableQueryPlanActionTest.java | 1 - .../org/apache/doris/load/LoadCheckerTest.java | 10 +- .../java/org/apache/doris/load/LoadJobTest.java| 6 +- .../apache/doris/load/PartitionLoadInfoTest.java | 2 - .../doris/persist/ReplicaPersistInfoTest.java | 5 +- .../org/apache/doris/planner/QueryPlanTest.java| 24 ++--- .../org/apache/doris/qe/PartitionCacheTest.java
[incubator-doris] branch master updated (ddf08cc -> cce721a)
This is an automated email from the ASF dual-hosted git repository. morningman pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/incubator-doris.git. from ddf08cc [refactor](fe) Remove version hash on FE side (#8099) add cce721a [improvement](olap) using placement-new to avoid dynamic mallocing for ParsedPage (#8172) No new revisions were added by this update. Summary of changes: be/src/olap/rowset/segment_v2/column_reader.cpp| 49 ++ be/src/olap/rowset/segment_v2/column_reader.h | 5 +-- .../rowset/segment_v2/indexed_column_reader.cpp| 28 ++--- .../olap/rowset/segment_v2/indexed_column_reader.h | 2 +- be/src/olap/rowset/segment_v2/parsed_page.h| 19 + 5 files changed, 51 insertions(+), 52 deletions(-) - To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org
[GitHub] [incubator-doris] morningman merged pull request #8172: (improvement)(olap) using placement-new to avoid dynamic mallocing for ParsedPage
morningman merged pull request #8172: URL: https://github.com/apache/incubator-doris/pull/8172 -- 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-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org
[GitHub] [incubator-doris] morningman merged pull request #8203: [Improvement] Add minimum fe meta version check
morningman merged pull request #8203: URL: https://github.com/apache/incubator-doris/pull/8203 -- 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-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org
[incubator-doris] branch master updated (cce721a -> f7c18d3)
This is an automated email from the ASF dual-hosted git repository. morningman pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/incubator-doris.git. from cce721a [improvement](olap) using placement-new to avoid dynamic mallocing for ParsedPage (#8172) add f7c18d3 [Improvement] Add minimum fe meta version check (#8203) No new revisions were added by this update. Summary of changes: .../src/main/java/org/apache/doris/common/FeMetaVersion.java | 5 + fe/fe-common/src/main/java/org/apache/doris/meta/MetaContext.java | 7 +++ .../src/test/java/org/apache/doris/alter/RollupJobV2Test.java | 4 ++-- .../test/java/org/apache/doris/alter/SchemaChangeJobV2Test.java| 4 ++-- .../java/org/apache/doris/catalog/OdbcCatalogResourceTest.java | 2 +- .../src/test/java/org/apache/doris/catalog/TempPartitionTest.java | 2 +- .../java/org/apache/doris/external/elasticsearch/EsTestCase.java | 3 +-- .../src/test/java/org/apache/doris/persist/DropDbInfoTest.java | 2 +- .../src/test/java/org/apache/doris/persist/DropInfoTest.java | 2 +- .../test/java/org/apache/doris/persist/DropPartitionInfoTest.java | 2 +- .../src/test/java/org/apache/doris/persist/FsBrokerTest.java | 2 +- .../org/apache/doris/transaction/DatabaseTransactionMgrTest.java | 2 +- .../org/apache/doris/transaction/GlobalTransactionMgrTest.java | 2 +- .../java/org/apache/doris/transaction/TransactionStateTest.java| 2 +- 14 files changed, 26 insertions(+), 15 deletions(-) rename fe/{fe-core => fe-common}/src/main/java/org/apache/doris/common/FeMetaVersion.java (96%) - To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org
[incubator-doris] branch master updated: [refactor] change mysql server version to avoid some cve issues (#8223)
This is an automated email from the ASF dual-hosted git repository. morningman pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-doris.git The following commit(s) were added to refs/heads/master by this push: new 40c1fa2 [refactor] change mysql server version to avoid some cve issues (#8223) 40c1fa2 is described below commit 40c1fa2335f4ecedfa4865dca66d5ffbc4dedda7 Author: Zhengguo Yang AuthorDate: Fri Feb 25 11:14:57 2022 +0800 [refactor] change mysql server version to avoid some cve issues (#8223) 5.1.0 -> 5.1.73 --- .../src/main/java/org/apache/doris/mysql/MysqlHandshakePacket.java| 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fe/fe-core/src/main/java/org/apache/doris/mysql/MysqlHandshakePacket.java b/fe/fe-core/src/main/java/org/apache/doris/mysql/MysqlHandshakePacket.java index 347ee0b..ed7aec9 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/mysql/MysqlHandshakePacket.java +++ b/fe/fe-core/src/main/java/org/apache/doris/mysql/MysqlHandshakePacket.java @@ -22,8 +22,8 @@ public class MysqlHandshakePacket extends MysqlPacket { private static final int SCRAMBLE_LENGTH = 20; // Version of handshake packet, since MySQL 3.21.0, Handshake of protocol 10 is used private static final int PROTOCOL_VERSION = 10; -// JDBC use this version to check which protocol the server support -private static final String SERVER_VERSION = "5.1.0"; +// JDBC uses this version to check which protocol the server support +private static final String SERVER_VERSION = "5.1.73"; // 33 stands for UTF-8 character set private static final int CHARACTER_SET = 33; // use default capability for all - To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org
[GitHub] [incubator-doris] morningman merged pull request #8223: [refactor] change mysql server version to avoid some cve issues
morningman merged pull request #8223: URL: https://github.com/apache/incubator-doris/pull/8223 -- 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-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org
[GitHub] [incubator-doris] zhangstar333 opened a new issue #8236: [Bug] Function percentile input null return 0
zhangstar333 opened a new issue #8236: URL: https://github.com/apache/incubator-doris/issues/8236 ### Search before asking - [X] I had searched in the [issues](https://github.com/apache/incubator-doris/issues?q=is%3Aissue) and found no similar issues. ### Version current master ### What's Wrong? select percentile(NULL,0.3) from table1; -> return 0; this function in Hive will be return NULL ### What You Expected? **input NULL return NULL** ### How to Reproduce? _No response_ ### Anything Else? _No response_ ### Are you willing to submit PR? - [ ] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct) -- 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-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org
[GitHub] [incubator-doris] github-actions[bot] commented on pull request #8195: [ifx](routine-load) fix show routine load task error
github-actions[bot] commented on pull request #8195: URL: https://github.com/apache/incubator-doris/pull/8195#issuecomment-1050482344 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-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org
[GitHub] [incubator-doris] adonis0147 opened a new issue #8237: [feature-wip][array-type] Refactor type info for nested array.
adonis0147 opened a new issue #8237: URL: https://github.com/apache/incubator-doris/issues/8237 ### Search before asking - [X] I had searched in the [issues](https://github.com/apache/incubator-doris/issues?q=is%3Aissue) and found no similar issues. ### Description This issue is a sub task of #7570 . The `_item_type_info` in `ArrayTypeInfo` is `ScalarTypeInfo` and it should be dynamic created in nested array scenario. ### Use case `get_type_info` return `std::shared_ptr` instead `TypeInfo*`. `get_type_info` can return an `ArrayTypeInfo` with an item type which is also an `ArrayTypeInfo`. ### Related issues #array ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct) -- 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-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org
[GitHub] [incubator-doris] EmmyMiao87 commented on a change in pull request #8188: [Enhancement](routine_load) Support show routine load statement with like predicate
EmmyMiao87 commented on a change in pull request #8188: URL: https://github.com/apache/incubator-doris/pull/8188#discussion_r814447319 ## File path: fe/fe-core/src/main/java/org/apache/doris/load/routineload/RoutineLoadManager.java ## @@ -483,8 +484,10 @@ public RoutineLoadJob getJob(String dbFullName, String jobName) throws MetaNotFo if includeHistory is false, filter not running job in result else return all of result */ -public List getJob(String dbFullName, String jobName, boolean includeHistory) +public List getJob(String dbFullName, String jobName, boolean includeHistory, PatternMatcher matcher) throws MetaNotFoundException { +Preconditions.checkArgument(jobName == null || matcher == null, Review comment: can be both null, but not both not 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-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org
[GitHub] [incubator-doris] morningman commented on pull request #8229: [Vec][Opt] better memequal impl to speed up string compare
morningman commented on pull request #8229: URL: https://github.com/apache/incubator-doris/pull/8229#issuecomment-1050485435 compile failed -- 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-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org
[GitHub] [incubator-doris] caiconghui commented on a change in pull request #8188: [Enhancement](routine_load) Support show routine load statement with like predicate
caiconghui commented on a change in pull request #8188: URL: https://github.com/apache/incubator-doris/pull/8188#discussion_r814448273 ## File path: fe/fe-core/src/main/java/org/apache/doris/load/routineload/RoutineLoadManager.java ## @@ -483,8 +484,10 @@ public RoutineLoadJob getJob(String dbFullName, String jobName) throws MetaNotFo if includeHistory is false, filter not running job in result else return all of result */ -public List getJob(String dbFullName, String jobName, boolean includeHistory) +public List getJob(String dbFullName, String jobName, boolean includeHistory, PatternMatcher matcher) throws MetaNotFoundException { +Preconditions.checkArgument(jobName == null || matcher == null, Review comment: this check mean that jobName and matcher should not both not null at the same time -- 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-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org
[GitHub] [incubator-doris] zhangstar333 opened a new pull request #8238: [fix] Function percentile input null return null
zhangstar333 opened a new pull request #8238: URL: https://github.com/apache/incubator-doris/pull/8238 # Proposed changes Issue Number: close #8236 ## Problem Summary: Describe the overview of changes. ## Checklist(Required) 1. Does it affect the original behavior: (Yes/No/I Don't know) 2. Has unit tests been added: (Yes/No/No Need) 3. Has document been added or modified: (Yes/No/No Need) 4. Does it need to update dependencies: (Yes/No) 5. Are there any changes that cannot be rolled back: (Yes/No) ## Further comments If this is a relatively large or complex change, kick off the discussion at [d...@doris.apache.org](mailto:d...@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-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org
[GitHub] [incubator-doris] github-actions[bot] commented on pull request #8229: [Vec][Opt] better memequal impl to speed up string compare
github-actions[bot] commented on pull request #8229: URL: https://github.com/apache/incubator-doris/pull/8229#issuecomment-1050493439 -- 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-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org
[GitHub] [incubator-doris] github-actions[bot] commented on pull request #8238: [fix] Function percentile input null return null
github-actions[bot] commented on pull request #8238: URL: https://github.com/apache/incubator-doris/pull/8238#issuecomment-1050493834 -- 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-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org
[GitHub] [incubator-doris] daikon12 opened a new pull request #8239: [docs][fix][fix some confusing doc content]
daikon12 opened a new pull request #8239: URL: https://github.com/apache/incubator-doris/pull/8239 # Proposed changes 1. XXX of Doris --> Doris on XXX 2. brpc_port* --> brpc_port http_port * -> http_port 3. (FE <--> FE,用户) --> (FE <--> FE,用户 <--> FE) ## Problem Summary: Due to the inconsistency of the documents, there will be some doubts when reading. It is recommended to make relevant adjustments, increase the readability of the documents ## Checklist(Required) 1. Does it affect the original behavior: (No) 4. Has unit tests been added: (No) 5. Has document been added or modified: (Yes) 6. Does it need to update dependencies: (No) 7. Are there any changes that cannot be rolled back: (No) ## Further comments If this is a relatively large or complex change, kick off the discussion at [d...@doris.apache.org](mailto:d...@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-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org
[GitHub] [incubator-doris-flink-connector] bridgeDream opened a new pull request #9: [feature]Supports traversal of Doris FE nodes when searching for Doris BE
bridgeDream opened a new pull request #9: URL: https://github.com/apache/incubator-doris-flink-connector/pull/9 # Proposed changes ## Problem Summary: Currently, when Flink-doris-Connetor writes Doris, it will queries Doris FE node through one of the Doris BE nodes randomly. It may causing job failures when one of Doris BE node in cluster is out of service. For example, sometime machine has problem and need to restart or admin need to Actively restart service In the process of upgrading the version ## Checklist(Required) 1. Does it affect the original behavior: (Yes/No/I Don't know) 2. Has unit tests been added: (Yes/No/No Need) 3. Has document been added or modified: (Yes/No/No Need) 4. Does it need to update dependencies: (Yes/No) 5. Are there any changes that cannot be rolled back: (Yes/No) ## Further comments -- 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-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org
[GitHub] [incubator-doris] HappenLee commented on a change in pull request #8217: [feature][array-type]support select ARRAY data type on vectorized engine
HappenLee commented on a change in pull request #8217: URL: https://github.com/apache/incubator-doris/pull/8217#discussion_r814462013 ## File path: be/src/vec/columns/column_array.cpp ## @@ -0,0 +1,700 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +// This file is copied from +// https://github.com/ClickHouse/ClickHouse/blob/master/src/Columns/ColumnArray.cpp +// and modified by Doris + +#include // memcpy + +#include "vec/common/assert_cast.h" +#include "vec/columns/collator.h" +#include "vec/columns/column_array.h" +#include "vec/columns/column_const.h" +#include "vec/columns/column_nullable.h" +#include "vec/columns/column_string.h" +#include "vec/columns/columns_common.h" +#include "vec/columns/columns_number.h" + +namespace doris::vectorized { + +namespace ErrorCodes { +extern const int NOT_IMPLEMENTED; +extern const int BAD_ARGUMENTS; +extern const int PARAMETER_OUT_OF_BOUND; +extern const int SIZES_OF_COLUMNS_DOESNT_MATCH; +extern const int LOGICAL_ERROR; +extern const int TOO_LARGE_ARRAY_SIZE; +} + +/** Obtaining array as Field can be slow for large arrays and consume vast amount of memory. + * Just don't allow to do it. + * You can increase the limit if the following query: + * SELECT range(1000) + * will take less than 500ms on your machine. + */ +static constexpr size_t max_array_size_as_field = 100; + +ColumnArray::ColumnArray(MutableColumnPtr && nested_column, MutableColumnPtr && offsets_column) +: data(std::move(nested_column)), offsets(std::move(offsets_column)) { +const ColumnOffsets * offsets_concrete = typeid_cast(offsets.get()); + +if (!offsets_concrete) { +LOG(FATAL) << "offsets_column must be a ColumnUInt64"; +} + +if (!offsets_concrete->empty() && nested_column) { +Offset last_offset = offsets_concrete->get_data().back(); + +/// This will also prevent possible overflow in offset. +if (nested_column->size() != last_offset) { +LOG(FATAL) << "offsets_column has data inconsistent with nested_column"; +} +} + +/** NOTE + * Arrays with constant value are possible and used in implementation of higher order functions (see FunctionReplicate). + * But in most cases, arrays with constant value are unexpected and code will work wrong. Use with caution. + */ +} + +ColumnArray::ColumnArray(MutableColumnPtr && nested_column) +: data(std::move(nested_column)) { +if (!data->empty()) { +LOG(FATAL) << "Not empty data passed to ColumnArray, but no offsets passed"; +} + +offsets = ColumnOffsets::create(); +} + +std::string ColumnArray::get_name() const { return "Array(" + get_data().get_name() + ")"; } + +MutableColumnPtr ColumnArray::clone_resized(size_t to_size) const { +auto res = ColumnArray::create(get_data().clone_empty()); + +if (to_size == 0) +return res; +size_t from_size = size(); + +if (to_size <= from_size) { +/// Just cut column. +res->get_offsets().assign(get_offsets().begin(), get_offsets().begin() + to_size); +res->get_data().insert_range_from(get_data(), 0, get_offsets()[to_size - 1]); +} else { +/// Copy column and append empty arrays for extra elements. +Offset offset = 0; +if (from_size > 0) { +res->get_offsets().assign(get_offsets().begin(), get_offsets().end()); +res->get_data().insert_range_from(get_data(), 0, get_data().size()); +offset = get_offsets().back(); +} + +res->get_offsets().resize(to_size); +for (size_t i = from_size; i < to_size; ++i) +res->get_offsets()[i] = offset; +} + +return res; +} + +size_t ColumnArray::size() const { +return get_offsets().size(); +} + +Field ColumnArray::operator[](size_t n) const { +size_t offset = offset_at(n); +size_t size = size_at(n); + +if (size > max_array_size_as_field) +LOG(FATAL) << "Array of size " << size << " is too large to be manipulated as single field," + << "maximum size " << max_array_size_as_field; + +Array res(size); + +for (size_t i = 0; i < size; ++i) +res[i] = get_
[GitHub] [incubator-doris] cambyzju commented on a change in pull request #8217: [feature][array-type]support select ARRAY data type on vectorized engine
cambyzju commented on a change in pull request #8217: URL: https://github.com/apache/incubator-doris/pull/8217#discussion_r813634151 ## File path: be/src/vec/columns/column_array.cpp ## @@ -0,0 +1,699 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +// This file is copied from +// https://github.com/ClickHouse/ClickHouse/blob/master/src/Columns/ColumnArray.cpp +// and modified by Doris + +#include // memcpy + +#include "vec/common/assert_cast.h" +#include "vec/columns/collator.h" +#include "vec/columns/column_array.h" +#include "vec/columns/column_const.h" +#include "vec/columns/column_nullable.h" +#include "vec/columns/column_string.h" +#include "vec/columns/columns_common.h" +#include "vec/columns/columns_number.h" + +namespace doris::vectorized { + +namespace ErrorCodes { +extern const int NOT_IMPLEMENTED; +extern const int BAD_ARGUMENTS; +extern const int PARAMETER_OUT_OF_BOUND; +extern const int SIZES_OF_COLUMNS_DOESNT_MATCH; +extern const int LOGICAL_ERROR; +extern const int TOO_LARGE_ARRAY_SIZE; +} + +/** Obtaining array as Field can be slow for large arrays and consume vast amount of memory. + * Just don't allow to do it. + * You can increase the limit if the following query: + * SELECT range(1000) + * will take less than 500ms on your machine. + */ +static constexpr size_t max_array_size_as_field = 100; + +ColumnArray::ColumnArray(MutableColumnPtr && nested_column, MutableColumnPtr && offsets_column) +: data(std::move(nested_column)), offsets(std::move(offsets_column)) { +const ColumnOffsets * offsets_concrete = typeid_cast(offsets.get()); + +if (!offsets_concrete) { +LOG(FATAL) << "offsets_column must be a ColumnUInt64"; +} + +if (!offsets_concrete->empty() && nested_column) { +Offset last_offset = offsets_concrete->get_data().back(); + +/// This will also prevent possible overflow in offset. +if (nested_column->size() != last_offset) { +LOG(FATAL) << "offsets_column has data inconsistent with nested_column"; +} +} + +/** NOTE + * Arrays with constant value are possible and used in implementation of higher order functions (see FunctionReplicate). + * But in most cases, arrays with constant value are unexpected and code will work wrong. Use with caution. + */ +} + +ColumnArray::ColumnArray(MutableColumnPtr && nested_column) +: data(std::move(nested_column)) { +if (!data->empty()) { +LOG(FATAL) << "Not empty data passed to ColumnArray, but no offsets passed"; +} + +offsets = ColumnOffsets::create(); +} + +std::string ColumnArray::get_name() const { return "Array(" + get_data().get_name() + ")"; } + +MutableColumnPtr ColumnArray::clone_resized(size_t to_size) const { +auto res = ColumnArray::create(get_data().clone_empty()); + +if (to_size == 0) +return res; +size_t from_size = size(); + +if (to_size <= from_size) { +/// Just cut column. +res->get_offsets().assign(get_offsets().begin(), get_offsets().begin() + to_size); +res->get_data().insert_range_from(get_data(), 0, get_offsets()[to_size - 1]); +} else { +/// Copy column and append empty arrays for extra elements. +Offset offset = 0; +if (from_size > 0) { +res->get_offsets().assign(get_offsets().begin(), get_offsets().end()); +res->get_data().insert_range_from(get_data(), 0, get_data().size()); +offset = get_offsets().back(); +} + +res->get_offsets().resize(to_size); +for (size_t i = from_size; i < to_size; ++i) +res->get_offsets()[i] = offset; +} + +return res; +} + +size_t ColumnArray::size() const { +return get_offsets().size(); +} + +Field ColumnArray::operator[](size_t n) const { +size_t offset = offset_at(n); +size_t size = size_at(n); + +if (size > max_array_size_as_field) +LOG(FATAL) << "Array of size " << size << " is too large to be manipulated as single field," + << "maximum size " << max_array_size_as_field; + +Array res(size); + +for (size_t i = 0; i < size; ++i) +res[i] = get_d
[GitHub] [incubator-doris] cambyzju commented on a change in pull request #8217: [feature][array-type]support select ARRAY data type on vectorized engine
cambyzju commented on a change in pull request #8217: URL: https://github.com/apache/incubator-doris/pull/8217#discussion_r814475416 ## File path: be/src/vec/columns/column_array.cpp ## @@ -0,0 +1,699 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +// This file is copied from +// https://github.com/ClickHouse/ClickHouse/blob/master/src/Columns/ColumnArray.cpp +// and modified by Doris + +#include // memcpy + +#include "vec/common/assert_cast.h" +#include "vec/columns/collator.h" +#include "vec/columns/column_array.h" +#include "vec/columns/column_const.h" +#include "vec/columns/column_nullable.h" +#include "vec/columns/column_string.h" +#include "vec/columns/columns_common.h" +#include "vec/columns/columns_number.h" + +namespace doris::vectorized { + +namespace ErrorCodes { +extern const int NOT_IMPLEMENTED; +extern const int BAD_ARGUMENTS; +extern const int PARAMETER_OUT_OF_BOUND; +extern const int SIZES_OF_COLUMNS_DOESNT_MATCH; +extern const int LOGICAL_ERROR; +extern const int TOO_LARGE_ARRAY_SIZE; +} + +/** Obtaining array as Field can be slow for large arrays and consume vast amount of memory. + * Just don't allow to do it. + * You can increase the limit if the following query: + * SELECT range(1000) + * will take less than 500ms on your machine. + */ +static constexpr size_t max_array_size_as_field = 100; + +ColumnArray::ColumnArray(MutableColumnPtr && nested_column, MutableColumnPtr && offsets_column) +: data(std::move(nested_column)), offsets(std::move(offsets_column)) { +const ColumnOffsets * offsets_concrete = typeid_cast(offsets.get()); + +if (!offsets_concrete) { +LOG(FATAL) << "offsets_column must be a ColumnUInt64"; +} + +if (!offsets_concrete->empty() && nested_column) { +Offset last_offset = offsets_concrete->get_data().back(); + +/// This will also prevent possible overflow in offset. +if (nested_column->size() != last_offset) { +LOG(FATAL) << "offsets_column has data inconsistent with nested_column"; +} +} + +/** NOTE + * Arrays with constant value are possible and used in implementation of higher order functions (see FunctionReplicate). + * But in most cases, arrays with constant value are unexpected and code will work wrong. Use with caution. + */ +} + +ColumnArray::ColumnArray(MutableColumnPtr && nested_column) +: data(std::move(nested_column)) { +if (!data->empty()) { +LOG(FATAL) << "Not empty data passed to ColumnArray, but no offsets passed"; +} + +offsets = ColumnOffsets::create(); +} + +std::string ColumnArray::get_name() const { return "Array(" + get_data().get_name() + ")"; } + +MutableColumnPtr ColumnArray::clone_resized(size_t to_size) const { +auto res = ColumnArray::create(get_data().clone_empty()); + +if (to_size == 0) +return res; +size_t from_size = size(); + +if (to_size <= from_size) { +/// Just cut column. +res->get_offsets().assign(get_offsets().begin(), get_offsets().begin() + to_size); +res->get_data().insert_range_from(get_data(), 0, get_offsets()[to_size - 1]); +} else { +/// Copy column and append empty arrays for extra elements. +Offset offset = 0; +if (from_size > 0) { +res->get_offsets().assign(get_offsets().begin(), get_offsets().end()); +res->get_data().insert_range_from(get_data(), 0, get_data().size()); +offset = get_offsets().back(); +} + +res->get_offsets().resize(to_size); +for (size_t i = from_size; i < to_size; ++i) +res->get_offsets()[i] = offset; +} + +return res; +} + +size_t ColumnArray::size() const { +return get_offsets().size(); +} + +Field ColumnArray::operator[](size_t n) const { +size_t offset = offset_at(n); +size_t size = size_at(n); + +if (size > max_array_size_as_field) +LOG(FATAL) << "Array of size " << size << " is too large to be manipulated as single field," + << "maximum size " << max_array_size_as_field; + +Array res(size); + +for (size_t i = 0; i < size; ++i) +res[i] = get_d
[GitHub] [incubator-doris-flink-connector] morningman opened a new pull request #10: [chore] modify build.sh and github action for 1.14
morningman opened a new pull request #10: URL: https://github.com/apache/incubator-doris-flink-connector/pull/10 # Proposed changes Issue Number: close #xxx ## Problem Summary: Describe the overview of changes. ## Checklist(Required) 1. Does it affect the original behavior: (Yes/No/I Don't know) 2. Has unit tests been added: (Yes/No/No Need) 3. Has document been added or modified: (Yes/No/No Need) 4. Does it need to update dependencies: (Yes/No) 5. Are there any changes that cannot be rolled back: (Yes/No) ## Further comments If this is a relatively large or complex change, kick off the discussion at [d...@doris.apache.org](mailto:d...@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-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org
[GitHub] [incubator-doris] morningman closed pull request #8219: fix mempool ut problem introduced by this patch
morningman closed pull request #8219: URL: https://github.com/apache/incubator-doris/pull/8219 -- 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-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org
[GitHub] [incubator-doris] morningman commented on pull request #8219: fix mempool ut problem introduced by this patch
morningman commented on pull request #8219: URL: https://github.com/apache/incubator-doris/pull/8219#issuecomment-1050532785 has been fixed in #8216 ,close this PR -- 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-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org
[GitHub] [incubator-doris] github-actions[bot] commented on pull request #8179: [feature-wip](iceberg) Step3: Support query iceberg external table
github-actions[bot] commented on pull request #8179: URL: https://github.com/apache/incubator-doris/pull/8179#issuecomment-1050534374 -- 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-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org
[GitHub] [incubator-doris-flink-connector] hf200012 commented on pull request #9: [feature]Supports traversal of Doris FE nodes when searching for Doris BE
hf200012 commented on pull request #9: URL: https://github.com/apache/incubator-doris-flink-connector/pull/9#issuecomment-1050534673 Please update the documentation in both English and Chinese -- 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-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org
[incubator-doris-flink-connector] branch master updated: Fix notification settings not taking effect (#8)
This is an automated email from the ASF dual-hosted git repository. jiafengzheng pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-doris-flink-connector.git The following commit(s) were added to refs/heads/master by this push: new 4f61663 Fix notification settings not taking effect (#8) 4f61663 is described below commit 4f61663d334e20cf44cd15c611cc899ed9bf8118 Author: Kirs AuthorDate: Fri Feb 25 13:24:31 2022 +0800 Fix notification settings not taking effect (#8) --- .asf.yaml | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.asf.yaml b/.asf.yaml index 071d8b9..ccb2341 100644 --- a/.asf.yaml +++ b/.asf.yaml @@ -35,5 +35,8 @@ github: required_pull_request_reviews: dismiss_stale_reviews: true required_approving_review_count: 1 - notifications: -pullrequests_status: commits@doris.apache.org +notifications: + issues: commits@doris.apache.org + commits: commits@doris.apache.org + pullrequests: commits@doris.apache.org + - To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org
[incubator-doris-flink-connector] branch master updated (4f61663 -> 21c3e31)
This is an automated email from the ASF dual-hosted git repository. jiafengzheng pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/incubator-doris-flink-connector.git. from 4f61663 Fix notification settings not taking effect (#8) add 21c3e31 [chore] modify build.sh and github action for 1.14 (#10) No new revisions were added by this update. Summary of changes: .github/workflows/build-extension.yml | 12 ++-- README.md | 6 +- flink-doris-connector/build.sh| 4 +--- 3 files changed, 8 insertions(+), 14 deletions(-) mode change 100644 => 100755 flink-doris-connector/build.sh - To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org
[GitHub] [incubator-doris-flink-connector] hf200012 merged pull request #10: [chore] modify build.sh and github action for 1.14
hf200012 merged pull request #10: URL: https://github.com/apache/incubator-doris-flink-connector/pull/10 -- 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-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org
[GitHub] [incubator-doris-flink-connector] hf200012 merged pull request #8: Fix notification settings ineffective
hf200012 merged pull request #8: URL: https://github.com/apache/incubator-doris-flink-connector/pull/8 -- 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-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org
[GitHub] [incubator-doris] github-actions[bot] commented on pull request #8041: [Feature](create_table) Support create table with random distribution to avoid data skew
github-actions[bot] commented on pull request #8041: URL: https://github.com/apache/incubator-doris/pull/8041#issuecomment-1050535640 -- 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-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org
[GitHub] [incubator-doris] zbtzbtzbt commented on pull request #8229: [Vec][Opt] better memequal impl to speed up string compare
zbtzbtzbt commented on pull request #8229: URL: https://github.com/apache/incubator-doris/pull/8229#issuecomment-1050542270 > compile failed now it's ok -- 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-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org
[GitHub] [incubator-doris] daikon12 commented on pull request #8239: [docs][fix][fix some confusing doc content]
daikon12 commented on pull request #8239: URL: https://github.com/apache/incubator-doris/pull/8239#issuecomment-1050557144 您好!邮件我已收到,我会尽快处理的 -- 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-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org
[GitHub] [incubator-doris] github-actions[bot] commented on pull request #8239: [docs][fix][fix some confusing doc content]
github-actions[bot] commented on pull request #8239: URL: https://github.com/apache/incubator-doris/pull/8239#issuecomment-1050557210 -- 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-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org
[GitHub] [incubator-doris] daikon12 removed a comment on pull request #8239: [docs][fix][fix some confusing doc content]
daikon12 removed a comment on pull request #8239: URL: https://github.com/apache/incubator-doris/pull/8239#issuecomment-1050557144 您好!邮件我已收到,我会尽快处理的 -- 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-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org
[GitHub] [incubator-doris] adonis0147 opened a new pull request #8240: [feature-wip][array-type] Refactor type info for nested array.
adonis0147 opened a new pull request #8240: URL: https://github.com/apache/incubator-doris/pull/8240 # Proposed changes Issue Number: close #8237 ## Problem Summary: Please refer to #8237 . ## Checklist(Required) 1. Does it affect the original behavior: No 2. Has unit tests been added: No Need 3. Has document been added or modified: No Need 4. Does it need to update dependencies: No 5. Are there any changes that cannot be rolled back: No ## Further comments If this is a relatively large or complex change, kick off the discussion at [d...@doris.apache.org](mailto:d...@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-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org
[GitHub] [incubator-doris] zuochunwei opened a new pull request #8241: (bugfix) (olap) add check statement to protect get_dict_word_info() from crash
zuochunwei opened a new pull request #8241: URL: https://github.com/apache/incubator-doris/pull/8241 # Proposed changes check _num_elems firstly at the beginning of get_dict_word_info for safe Issue Number: close #xxx ## Problem Summary: Describe the overview of changes. ## Checklist(Required) 1. Does it affect the original behavior: (Yes/No/I Don't know) 2. Has unit tests been added: (Yes/No/No Need) 3. Has document been added or modified: (Yes/No/No Need) 4. Does it need to update dependencies: (Yes/No) 5. Are there any changes that cannot be rolled back: (Yes/No) ## Further comments If this is a relatively large or complex change, kick off the discussion at [d...@doris.apache.org](mailto:d...@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-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org
[GitHub] [incubator-doris] github-actions[bot] commented on pull request #8241: (bugfix) (olap) add check statement to protect get_dict_word_info() from crash
github-actions[bot] commented on pull request #8241: URL: https://github.com/apache/incubator-doris/pull/8241#issuecomment-1050569171 -- 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-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org
[GitHub] [incubator-doris-flink-connector] morningman commented on pull request #9: [feature]Supports traversal of Doris FE nodes when searching for Doris BE
morningman commented on pull request #9: URL: https://github.com/apache/incubator-doris-flink-connector/pull/9#issuecomment-1050573195 And please push another PR to branch-for-flink-before-1.13 -- 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-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org
[GitHub] [incubator-doris] EmmyMiao87 commented on a change in pull request #8188: [Enhancement](routine_load) Support show routine load statement with like predicate
EmmyMiao87 commented on a change in pull request #8188: URL: https://github.com/apache/incubator-doris/pull/8188#discussion_r814517829 ## File path: fe/fe-core/src/main/java/org/apache/doris/load/routineload/RoutineLoadManager.java ## @@ -483,8 +484,10 @@ public RoutineLoadJob getJob(String dbFullName, String jobName) throws MetaNotFo if includeHistory is false, filter not running job in result else return all of result */ -public List getJob(String dbFullName, String jobName, boolean includeHistory) +public List getJob(String dbFullName, String jobName, boolean includeHistory, PatternMatcher matcher) throws MetaNotFoundException { +Preconditions.checkArgument(jobName == null || matcher == null, Review comment: you are right ~ -- 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-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org
[GitHub] [incubator-doris] github-actions[bot] commented on pull request #8188: [Enhancement](routine_load) Support show routine load statement with like predicate
github-actions[bot] commented on pull request #8188: URL: https://github.com/apache/incubator-doris/pull/8188#issuecomment-1050577780 -- 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-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org
[GitHub] [incubator-doris-flink-connector] bridgeDream opened a new pull request #11: Supports traversal of Doris FE nodes when searching for Doris BE
bridgeDream opened a new pull request #11: URL: https://github.com/apache/incubator-doris-flink-connector/pull/11 # Proposed changes ## Problem Summary: 目前,使用 flink-doris-connector 写入 Doris ,当配置了多个 Doris FE 节点的前提下, 内部通过 FE 节点请求到 BE 时会随机选择其中一个 FE 提交 http 请求 BE 节点地址;在生产环境中,由于机器原因或者是版本升级需要滚动重启 FE 服务时,由于某个 FE 服务暂时不可用,可能会引起 flink 作业异常退出; 为了降低集群变更或偶发异常影响实时流稳定,考虑通过对所有配置的 Doris FE 节点发送 http 请求查询 Doris BE。 Currently, when Flink-doris-Connetor writes Doris, it will queries Doris FE node through one of the Doris BE nodes randomly. It may causing job failures when one of Doris BE node in cluster is out of service. For example, sometime machine has problem and need to restart or admin need to Actively restart service In the process of upgrading the version ## Checklist(Required) 1. Does it affect the original behavior: (Yes) 2. Has unit tests been added: (No Need) 3. Has document been added or modified: (No Need) 4. Does it need to update dependencies: (No) 5. Are there any changes that cannot be rolled back: (No) ## Further comments -- 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-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org
[GitHub] [incubator-doris-flink-connector] hf200012 commented on pull request #11: [feature]Supports traversal of Doris FE nodes when searching for Doris BE on branch flink-before-1.13
hf200012 commented on pull request #11: URL: https://github.com/apache/incubator-doris-flink-connector/pull/11#issuecomment-1050603416 Please update the documentation, both in Chinese and English -- 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-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org
[GitHub] [incubator-doris-flink-connector] bridgeDream commented on pull request #11: [feature]Supports traversal of Doris FE nodes when searching for Doris BE on branch flink-before-1.13
bridgeDream commented on pull request #11: URL: https://github.com/apache/incubator-doris-flink-connector/pull/11#issuecomment-1050609771 > Please update the documentation, both in Chinese and English Hi, which documentation, can you provided a path? I'm sorry I couldn't find the file -- 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-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org