From 629ee7bab86bf74538814e794122e1fedbbeb288 Mon Sep 17 00:00:00 2001 From: everpcpc Date: Sat, 16 Dec 2023 11:35:20 +0800 Subject: [PATCH] refactor: normalize internal crate names (#14039) Co-authored-by: BohuTANG --- Cargo.lock | 4044 ++++++++--------- src/bendpy/Cargo.toml | 12 +- src/bendpy/src/context.rs | 8 +- src/bendpy/src/datablock.rs | 6 +- src/bendpy/src/dataframe.rs | 4 +- src/bendpy/src/lib.rs | 14 +- src/bendpy/src/schema.rs | 2 +- src/binaries/Cargo.toml | 58 +- src/binaries/meta/ee_main.rs | 2 +- src/binaries/meta/entry.rs | 32 +- src/binaries/meta/kvapi.rs | 12 +- src/binaries/meta/oss_main.rs | 2 +- src/binaries/metabench/main.rs | 48 +- src/binaries/metactl/grpc.rs | 6 +- src/binaries/metactl/main.rs | 14 +- src/binaries/metactl/snapshot.rs | 54 +- src/binaries/opensharing/main.rs | 16 +- src/binaries/query/ee_main.rs | 10 +- src/binaries/query/entry.rs | 28 +- src/binaries/query/oss_main.rs | 12 +- src/binaries/tool/table_meta_inspector.rs | 16 +- src/common/arrow/Cargo.toml | 2 +- .../arrow/tests/it/arrow/array/binary/mod.rs | 15 +- .../tests/it/arrow/array/binary/mutable.rs | 12 +- .../it/arrow/array/binary/mutable_values.rs | 6 +- .../tests/it/arrow/array/binary/to_mutable.rs | 8 +- .../arrow/tests/it/arrow/array/boolean/mod.rs | 14 +- .../tests/it/arrow/array/boolean/mutable.rs | 12 +- .../tests/it/arrow/array/dictionary/mod.rs | 4 +- .../it/arrow/array/dictionary/mutable.rs | 8 +- .../tests/it/arrow/array/equal/boolean.rs | 2 +- .../tests/it/arrow/array/equal/dictionary.rs | 2 +- .../it/arrow/array/equal/fixed_size_list.rs | 8 +- .../arrow/tests/it/arrow/array/equal/list.rs | 14 +- .../arrow/tests/it/arrow/array/equal/mod.rs | 2 +- .../tests/it/arrow/array/equal/primitive.rs | 2 +- .../arrow/tests/it/arrow/array/equal/utf8.rs | 4 +- .../it/arrow/array/fixed_size_binary/mod.rs | 8 +- .../arrow/array/fixed_size_binary/mutable.rs | 8 +- .../it/arrow/array/fixed_size_list/mod.rs | 8 +- .../it/arrow/array/fixed_size_list/mutable.rs | 6 +- .../tests/it/arrow/array/growable/binary.rs | 6 +- .../tests/it/arrow/array/growable/boolean.rs | 6 +- .../it/arrow/array/growable/dictionary.rs | 8 +- .../it/arrow/array/growable/fixed_binary.rs | 6 +- .../arrow/array/growable/fixed_size_list.rs | 12 +- .../tests/it/arrow/array/growable/list.rs | 16 +- .../tests/it/arrow/array/growable/map.rs | 22 +- .../tests/it/arrow/array/growable/mod.rs | 8 +- .../tests/it/arrow/array/growable/null.rs | 8 +- .../it/arrow/array/growable/primitive.rs | 6 +- .../tests/it/arrow/array/growable/struct_.rs | 18 +- .../tests/it/arrow/array/growable/union.rs | 10 +- .../tests/it/arrow/array/growable/utf8.rs | 6 +- .../arrow/tests/it/arrow/array/list/mod.rs | 6 +- .../tests/it/arrow/array/list/mutable.rs | 8 +- .../arrow/tests/it/arrow/array/map/mod.rs | 6 +- src/common/arrow/tests/it/arrow/array/mod.rs | 18 +- src/common/arrow/tests/it/arrow/array/ord.rs | 8 +- .../tests/it/arrow/array/primitive/fmt.rs | 8 +- .../tests/it/arrow/array/primitive/mod.rs | 10 +- .../tests/it/arrow/array/primitive/mutable.rs | 10 +- .../it/arrow/array/primitive/to_mutable.rs | 6 +- .../tests/it/arrow/array/struct_/iterator.rs | 6 +- .../arrow/tests/it/arrow/array/struct_/mod.rs | 6 +- .../tests/it/arrow/array/struct_/mutable.rs | 6 +- .../arrow/tests/it/arrow/array/union.rs | 18 +- .../arrow/tests/it/arrow/array/utf8/mod.rs | 12 +- .../tests/it/arrow/array/utf8/mutable.rs | 12 +- .../it/arrow/array/utf8/mutable_values.rs | 6 +- .../tests/it/arrow/array/utf8/to_mutable.rs | 10 +- src/common/arrow/tests/it/arrow/arrow_data.rs | 16 +- .../arrow/tests/it/arrow/bitmap/assign_ops.rs | 8 +- .../arrow/tests/it/arrow/bitmap/bitmap_ops.rs | 8 +- .../arrow/tests/it/arrow/bitmap/immutable.rs | 2 +- src/common/arrow/tests/it/arrow/bitmap/mod.rs | 2 +- .../arrow/tests/it/arrow/bitmap/mutable.rs | 4 +- .../it/arrow/bitmap/utils/bit_chunks_exact.rs | 2 +- .../tests/it/arrow/bitmap/utils/chunk_iter.rs | 4 +- .../arrow/tests/it/arrow/bitmap/utils/fmt.rs | 2 +- .../tests/it/arrow/bitmap/utils/iterator.rs | 2 +- .../arrow/tests/it/arrow/bitmap/utils/mod.rs | 2 +- .../it/arrow/bitmap/utils/slice_iterator.rs | 4 +- .../it/arrow/bitmap/utils/zip_validity.rs | 6 +- .../arrow/tests/it/arrow/buffer/immutable.rs | 2 +- .../it/arrow/compute/aggregate/memory.rs | 8 +- .../arrow/tests/it/arrow/compute/cast.rs | 18 +- .../tests/it/arrow/compute/concatenate.rs | 6 +- .../tests/it/arrow/compute/merge_sort.rs | 8 +- .../tests/it/arrow/compute/sort/lex_sort.rs | 8 +- .../arrow/tests/it/arrow/compute/sort/mod.rs | 14 +- .../tests/it/arrow/compute/sort/row/mod.rs | 44 +- .../arrow/tests/it/arrow/compute/take.rs | 28 +- src/common/arrow/tests/it/arrow/ffi/data.rs | 14 +- src/common/arrow/tests/it/arrow/ffi/mod.rs | 6 +- src/common/arrow/tests/it/arrow/ffi/stream.rs | 10 +- .../arrow/tests/it/arrow/scalar/binary.rs | 6 +- .../arrow/tests/it/arrow/scalar/boolean.rs | 6 +- .../it/arrow/scalar/fixed_size_binary.rs | 6 +- .../tests/it/arrow/scalar/fixed_size_list.rs | 10 +- .../arrow/tests/it/arrow/scalar/list.rs | 10 +- src/common/arrow/tests/it/arrow/scalar/map.rs | 14 +- src/common/arrow/tests/it/arrow/scalar/mod.rs | 4 +- .../arrow/tests/it/arrow/scalar/null.rs | 6 +- .../arrow/tests/it/arrow/scalar/primitive.rs | 6 +- .../arrow/tests/it/arrow/scalar/struct_.rs | 10 +- .../arrow/tests/it/arrow/scalar/utf8.rs | 6 +- .../tests/it/arrow/temporal_conversions.rs | 8 +- src/common/arrow/tests/it/arrow/types.rs | 10 +- src/common/arrow/tests/it/native/io.rs | 76 +- src/common/arrow/tests/it/native/read_meta.rs | 18 +- src/common/auth/Cargo.toml | 5 +- src/common/auth/src/auth.rs | 2 +- src/common/auth/tests/it/auth.rs | 6 +- src/common/base/Cargo.toml | 4 +- src/common/base/src/base/profiling.rs | 4 +- src/common/base/src/base/shutdown_signal.rs | 2 +- src/common/base/src/base/stop_handle.rs | 2 +- src/common/base/src/base/string.rs | 4 +- src/common/base/src/base/take_mut.rs | 2 +- src/common/base/src/runtime/catch_unwind.rs | 4 +- src/common/base/src/runtime/global_runtime.rs | 2 +- src/common/base/src/runtime/runtime.rs | 4 +- src/common/base/src/runtime/thread.rs | 4 +- src/common/base/src/runtime/thread_pool.rs | 2 +- src/common/base/tests/it/fixed_heap.rs | 2 +- src/common/base/tests/it/main.rs | 2 +- src/common/base/tests/it/pool.rs | 8 +- src/common/base/tests/it/pool_retry.rs | 6 +- src/common/base/tests/it/progress.rs | 4 +- src/common/base/tests/it/range_merger.rs | 4 +- src/common/base/tests/it/runtime.rs | 8 +- src/common/base/tests/it/runtime_tracker.rs | 12 +- src/common/base/tests/it/stoppable.rs | 2 +- src/common/base/tests/it/string.rs | 8 +- src/common/base/tests/it/thread_pool.rs | 4 +- src/common/building/Cargo.toml | 2 +- src/common/cache/Cargo.toml | 2 +- src/common/cache/src/cache/lru.rs | 30 +- src/common/cache/tests/it/cache/lru.rs | 8 +- src/common/cloud_control/Cargo.toml | 6 +- src/common/cloud_control/src/cloud_api.rs | 6 +- src/common/cloud_control/src/task_client.rs | 2 +- src/common/cloud_control/src/task_utils.rs | 4 +- .../cloud_control/tests/it/task_client.rs | 42 +- src/common/compress/Cargo.toml | 4 +- src/common/compress/src/decode.rs | 12 +- src/common/compress/src/encode.rs | 9 +- src/common/exception/Cargo.toml | 8 +- src/common/exception/src/exception.rs | 7 +- src/common/exception/src/exception_flight.rs | 2 +- src/common/exception/src/exception_into.rs | 16 +- src/common/exception/tests/it/exception.rs | 24 +- .../exception/tests/it/exception_flight.rs | 8 +- src/common/exception/tests/it/prelude.rs | 5 +- src/common/grpc/Cargo.toml | 6 +- src/common/grpc/src/dns_resolver.rs | 8 +- src/common/grpc/src/grpc_token.rs | 6 +- src/common/grpc/tests/it/dns_resolver.rs | 6 +- src/common/grpc/tests/it/grpc_token.rs | 6 +- src/common/hashtable/Cargo.toml | 6 +- .../src/dictionary_string_hashtable.rs | 2 +- .../hashtable/src/hashjoin_hashtable.rs | 4 +- .../src/hashjoin_string_hashtable.rs | 4 +- src/common/hashtable/src/hashtable.rs | 2 +- src/common/hashtable/src/lookup_hashtable.rs | 2 +- .../hashtable/src/short_string_hashtable.rs | 2 +- src/common/hashtable/src/stack_hashtable.rs | 2 +- src/common/hashtable/src/string_hashtable.rs | 2 +- src/common/hashtable/src/traits.rs | 2 +- src/common/hashtable/tests/it/main.rs | 14 +- src/common/http/Cargo.toml | 6 +- src/common/http/src/debug/jeprof.rs | 4 +- src/common/http/src/debug/pprof.rs | 4 +- src/common/http/src/debug/stack.rs | 2 +- src/common/http/src/http_shutdown_handlers.rs | 10 +- src/common/http/tests/it/health.rs | 6 +- src/common/io/Cargo.toml | 4 +- src/common/io/src/binary_read.rs | 4 +- src/common/io/src/binary_write.rs | 2 +- src/common/io/src/bitmap.rs | 4 +- .../cursor_ext/cursor_read_datetime_ext.rs | 6 +- .../src/cursor_ext/cursor_read_number_ext.rs | 4 +- src/common/io/src/serialization.rs | 2 +- src/common/io/tests/it/binary_read.rs | 4 +- src/common/io/tests/it/binary_write.rs | 2 +- .../tests/it/cursor_ext/fast_read_text_ext.rs | 4 +- .../io/tests/it/cursor_ext/read_bytes_ext.rs | 2 +- .../tests/it/cursor_ext/read_datetime_ext.rs | 4 +- .../io/tests/it/cursor_ext/read_number_ext.rs | 4 +- src/common/io/tests/it/escape.rs | 4 +- src/common/io/tests/it/serialization.rs | 4 +- src/common/license/Cargo.toml | 6 +- src/common/license/src/license_manager.rs | 6 +- src/common/metrics/Cargo.toml | 4 +- src/common/metrics/src/dump.rs | 4 +- src/common/metrics/tests/it/main.rs | 14 +- src/common/openai/Cargo.toml | 6 +- src/common/openai/src/completion.rs | 6 +- src/common/openai/src/embedding.rs | 6 +- src/common/openai/tests/it/openai.rs | 2 +- src/common/storage/Cargo.toml | 20 +- src/common/storage/src/column_node.rs | 18 +- src/common/storage/src/config.rs | 14 +- src/common/storage/src/copy.rs | 4 +- src/common/storage/src/operator.rs | 48 +- src/common/storage/src/parquet2.rs | 18 +- src/common/storage/src/parquet_rs.rs | 16 +- src/common/storage/src/runtime_layer.rs | 6 +- src/common/storage/src/stage.rs | 10 +- src/common/storage/src/statistics.rs | 8 +- src/common/storage/tests/it/column_node.rs | 16 +- src/common/tracing/Cargo.toml | 4 +- src/common/tracing/src/init.rs | 8 +- src/common/tracing/src/lib.rs | 2 +- src/common/tracing/src/panic_hook.rs | 2 +- src/common/vector/Cargo.toml | 4 +- src/common/vector/src/distance.rs | 4 +- src/common/vector/tests/it/distance.rs | 2 +- src/meta/api/Cargo.toml | 18 +- src/meta/api/src/background_api.rs | 34 +- src/meta/api/src/background_api_impl.rs | 68 +- src/meta/api/src/background_api_test_suite.rs | 44 +- src/meta/api/src/compat_errors.rs | 8 +- src/meta/api/src/data_mask_api.rs | 12 +- src/meta/api/src/data_mask_api_impl.rs | 44 +- src/meta/api/src/id_generator.rs | 4 +- src/meta/api/src/kv_app_error.rs | 16 +- src/meta/api/src/lib.rs | 2 +- src/meta/api/src/reply.rs | 20 +- src/meta/api/src/schema_api.rs | 160 +- src/meta/api/src/schema_api_impl.rs | 336 +- src/meta/api/src/schema_api_test_suite.rs | 198 +- src/meta/api/src/share_api.rs | 2 +- src/meta/api/src/share_api_impl.rs | 54 +- src/meta/api/src/share_api_test_suite.rs | 28 +- src/meta/api/src/testing.rs | 16 +- src/meta/api/src/util.rs | 114 +- src/meta/app/Cargo.toml | 14 +- src/meta/app/src/app_error.rs | 4 +- src/meta/app/src/background/background_job.rs | 2 +- .../app/src/background/background_task.rs | 2 +- src/meta/app/src/data_mask/mod.rs | 2 +- src/meta/app/src/principal/file_format.rs | 8 +- src/meta/app/src/principal/ownership_info.rs | 2 +- src/meta/app/src/principal/role_info.rs | 2 +- src/meta/app/src/principal/user_auth.rs | 4 +- .../src/principal/user_defined_file_format.rs | 4 +- .../src/principal/user_defined_function.rs | 2 +- src/meta/app/src/principal/user_info.rs | 4 +- src/meta/app/src/principal/user_setting.rs | 4 +- src/meta/app/src/principal/user_stage.rs | 8 +- src/meta/app/src/schema/catalog.rs | 2 +- src/meta/app/src/schema/database.rs | 2 +- src/meta/app/src/schema/index.rs | 4 +- src/meta/app/src/schema/lock.rs | 8 +- src/meta/app/src/schema/table.rs | 18 +- src/meta/app/src/schema/virtual_column.rs | 4 +- src/meta/app/src/share/share.rs | 2 +- src/meta/app/src/storage/storage_params.rs | 4 +- src/meta/app/src/tenant/quota.rs | 4 +- src/meta/app/tests/it/file_format.rs | 2 +- src/meta/app/tests/it/main.rs | 2 +- src/meta/app/tests/it/user_grant.rs | 10 +- src/meta/app/tests/it/user_info.rs | 8 +- src/meta/app/tests/it/user_privilege.rs | 6 +- src/meta/app/tests/it/user_quota.rs | 4 +- src/meta/client/Cargo.toml | 26 +- src/meta/client/build.rs | 2 +- src/meta/client/src/grpc_action.rs | 34 +- src/meta/client/src/grpc_client.rs | 94 +- src/meta/client/src/grpc_metrics.rs | 18 +- src/meta/client/src/kv_api_impl.rs | 24 +- src/meta/client/src/lib.rs | 4 +- src/meta/client/src/message.rs | 38 +- src/meta/client/tests/it/grpc_client.rs | 18 +- src/meta/client/tests/it/grpc_server.rs | 42 +- src/meta/ee/Cargo.toml | 4 +- src/meta/ee/build.rs | 2 +- src/meta/embedded/Cargo.toml | 18 +- src/meta/embedded/src/kv_api_impl.rs | 20 +- src/meta/embedded/src/meta_embedded.rs | 14 +- src/meta/embedded/tests/it/kv_api_impl.rs | 6 +- src/meta/embedded/tests/it/schema_api_impl.rs | 12 +- src/meta/kvapi/Cargo.toml | 4 +- src/meta/kvapi/src/kvapi/api.rs | 8 +- src/meta/kvapi/src/kvapi/message.rs | 6 +- src/meta/kvapi/src/kvapi/test_suite.rs | 46 +- src/meta/process/Cargo.toml | 18 +- src/meta/process/src/examples.rs | 10 +- src/meta/process/src/kv_processor.rs | 26 +- src/meta/process/src/process_meta_dir.rs | 6 +- src/meta/process/src/rewrite_kv.rs | 12 +- src/meta/proto-conv/Cargo.toml | 8 +- .../background_job_from_to_protobuf_impl.rs | 10 +- .../background_task_from_to_protobuf_impl.rs | 8 +- .../src/catalog_from_to_protobuf_impl.rs | 12 +- .../src/config_from_to_protobuf_impl.rs | 20 +- .../src/connection_from_to_protobuf_impl.rs | 4 +- .../src/data_mask_from_to_protobuf_impl.rs | 4 +- .../src/database_from_to_protobuf_impl.rs | 6 +- .../src/file_format_from_to_protobuf_impl.rs | 4 +- .../src/index_from_to_protobuf_impl.rs | 220 +- ...east_visible_time_from_to_protobuf_impl.rs | 4 +- .../src/lock_from_to_protobuf_impl.rs | 4 +- .../src/owner_from_to_protobuf_impl.rs | 4 +- .../src/schema_from_to_protobuf_impl.rs | 14 +- .../src/share_from_to_protobuf_impl.rs | 4 +- .../src/stage_from_to_protobuf_impl.rs | 4 +- .../src/table_from_to_protobuf_impl.rs | 8 +- .../src/udf_from_to_protobuf_impl.rs | 10 +- .../src/user_from_to_protobuf_impl.rs | 4 +- .../virtual_column_from_to_protobuf_impl.rs | 132 +- src/meta/proto-conv/tests/it/common.rs | 12 +- src/meta/proto-conv/tests/it/proto_conv.rs | 70 +- .../proto-conv/tests/it/user_proto_conv.rs | 64 +- src/meta/proto-conv/tests/it/user_stage.rs | 2 +- .../proto-conv/tests/it/v002_database_meta.rs | 2 +- .../tests/it/v002_share_account_meta.rs | 2 +- .../proto-conv/tests/it/v002_share_meta.rs | 2 +- .../proto-conv/tests/it/v002_table_meta.rs | 6 +- .../proto-conv/tests/it/v005_database_meta.rs | 4 +- .../proto-conv/tests/it/v005_share_meta.rs | 2 +- .../tests/it/v006_copied_file_info.rs | 2 +- .../proto-conv/tests/it/v010_table_meta.rs | 6 +- .../proto-conv/tests/it/v012_table_meta.rs | 8 +- .../proto-conv/tests/it/v023_table_meta.rs | 8 +- .../proto-conv/tests/it/v024_table_meta.rs | 8 +- .../proto-conv/tests/it/v025_user_stage.rs | 8 +- src/meta/proto-conv/tests/it/v026_schema.rs | 8 +- src/meta/proto-conv/tests/it/v027_schema.rs | 12 +- src/meta/proto-conv/tests/it/v028_schema.rs | 12 +- src/meta/proto-conv/tests/it/v029_schema.rs | 12 +- .../proto-conv/tests/it/v030_user_stage.rs | 6 +- .../proto-conv/tests/it/v031_copy_max_file.rs | 6 +- .../tests/it/v032_file_format_params.rs | 10 +- .../proto-conv/tests/it/v033_table_meta.rs | 6 +- src/meta/proto-conv/tests/it/v034_schema.rs | 176 +- .../proto-conv/tests/it/v035_user_stage.rs | 8 +- .../proto-conv/tests/it/v037_index_meta.rs | 4 +- .../proto-conv/tests/it/v038_empty_proto.rs | 2 +- .../proto-conv/tests/it/v039_data_mask.rs | 2 +- .../proto-conv/tests/it/v040_table_meta.rs | 6 +- .../tests/it/v041_virtual_column.rs | 2 +- .../tests/it/v042_s3_stage_new_field.rs | 6 +- .../tests/it/v043_table_statistics.rs | 2 +- .../proto-conv/tests/it/v044_table_meta.rs | 8 +- .../proto-conv/tests/it/v045_background.rs | 26 +- .../proto-conv/tests/it/v046_index_meta.rs | 4 +- .../proto-conv/tests/it/v047_catalog_meta.rs | 10 +- .../proto-conv/tests/it/v048_background.rs | 26 +- .../tests/it/v049_network_policy.rs | 2 +- .../proto-conv/tests/it/v050_user_info.rs | 20 +- .../tests/it/v051_obs_and_cos_storage.rs | 8 +- .../tests/it/v052_hive_catalog_config.rs | 16 +- .../tests/it/v053_csv_format_params.rs | 6 +- .../proto-conv/tests/it/v054_index_meta.rs | 4 +- .../proto-conv/tests/it/v055_table_meta.rs | 12 +- .../proto-conv/tests/it/v057_hdfs_storage.rs | 6 +- src/meta/proto-conv/tests/it/v058_udf.rs | 10 +- .../tests/it/v059_csv_format_params.rs | 6 +- .../proto-conv/tests/it/v060_copy_options.rs | 4 +- .../tests/it/v061_oss_sse_options.rs | 2 +- .../tests/it/v062_table_lock_meta.rs | 4 +- .../proto-conv/tests/it/v063_connection.rs | 2 +- .../tests/it/v064_ndjson_format_params.rs | 8 +- .../tests/it/v065_least_visible_time.rs | 2 +- .../tests/it/v066_stage_create_on.rs | 8 +- src/meta/protos/Cargo.toml | 2 +- src/meta/raft-store/Cargo.toml | 22 +- src/meta/raft-store/src/applier.rs | 62 +- src/meta/raft-store/src/config.rs | 10 +- src/meta/raft-store/src/key_spaces.rs | 24 +- src/meta/raft-store/src/log/raft_log.rs | 14 +- src/meta/raft-store/src/ondisk/header.rs | 6 +- src/meta/raft-store/src/ondisk/mod.rs | 6 +- src/meta/raft-store/src/sm_v002/importer.rs | 6 +- .../src/sm_v002/leveled_store/level.rs | 2 +- .../src/sm_v002/leveled_store/leveled_map.rs | 2 +- .../sm_v002/leveled_store/leveled_map_test.rs | 2 +- .../src/sm_v002/leveled_store/map_api.rs | 2 +- .../src/sm_v002/leveled_store/ref_mut.rs | 2 +- .../src/sm_v002/leveled_store/sys_data.rs | 8 +- .../src/sm_v002/leveled_store/sys_data_api.rs | 8 +- .../src/sm_v002/marked/marked_test.rs | 6 +- src/meta/raft-store/src/sm_v002/marked/mod.rs | 8 +- src/meta/raft-store/src/sm_v002/sm_v002.rs | 36 +- .../raft-store/src/sm_v002/sm_v002_test.rs | 8 +- .../raft-store/src/sm_v002/snapshot_store.rs | 10 +- .../src/sm_v002/snapshot_view_v002.rs | 6 +- .../src/sm_v002/snapshot_view_v002_test.rs | 14 +- .../raft-store/src/sm_v002/writer_v002.rs | 2 +- src/meta/raft-store/src/state/raft_state.rs | 16 +- .../raft-store/src/state/raft_state_kv.rs | 24 +- .../src/state_machine/client_last_resp.rs | 46 +- .../raft-store/src/state_machine/expire.rs | 10 +- .../raft-store/src/state_machine/log_meta.rs | 16 +- src/meta/raft-store/src/state_machine/sm.rs | 88 +- .../src/state_machine/sm_kv_api_impl.rs | 28 +- .../raft-store/src/state_machine/snapshot.rs | 2 +- .../src/state_machine/snapshot_id.rs | 6 +- .../src/state_machine/state_machine_meta.rs | 18 +- .../raft-store/src/state_machine/testing.rs | 16 +- src/meta/raft-store/tests/it/config.rs | 4 +- src/meta/raft-store/tests/it/log.rs | 14 +- src/meta/raft-store/tests/it/state.rs | 4 +- .../tests/it/state_machine/expire.rs | 26 +- .../raft-store/tests/it/state_machine/mod.rs | 34 +- .../tests/it/state_machine/schema_api_impl.rs | 10 +- src/meta/raft-store/tests/it/testing.rs | 16 +- src/meta/raft-store/tests/it/types.rs | 8 +- src/meta/service/Cargo.toml | 40 +- src/meta/service/build.rs | 2 +- src/meta/service/src/api/grpc/grpc_service.rs | 58 +- src/meta/service/src/api/grpc_server.rs | 20 +- src/meta/service/src/api/http_service.rs | 18 +- src/meta/service/src/configs/inner.rs | 8 +- src/meta/service/src/configs/outer_v0.rs | 20 +- src/meta/service/src/export.rs | 4 +- src/meta/service/src/grpc_helper.rs | 8 +- src/meta/service/src/message.rs | 26 +- src/meta/service/src/meta_service/errors.rs | 6 +- .../service/src/meta_service/forwarder.rs | 22 +- .../service/src/meta_service/meta_leader.rs | 42 +- .../service/src/meta_service/meta_node.rs | 86 +- .../src/meta_service/meta_node_kv_api_impl.rs | 36 +- .../src/meta_service/raft_service_impl.rs | 34 +- src/meta/service/src/metrics/meta_metrics.rs | 6 +- src/meta/service/src/network.rs | 58 +- src/meta/service/src/raft_client.rs | 10 +- src/meta/service/src/request_handling.rs | 8 +- src/meta/service/src/store/store.rs | 44 +- src/meta/service/src/store/store_inner.rs | 80 +- .../service/src/store/to_storage_error.rs | 10 +- .../service/src/watcher/watcher_manager.rs | 24 +- .../service/src/watcher/watcher_stream.rs | 10 +- .../tests/it/api/http/cluster_state_test.rs | 8 +- src/meta/service/tests/it/api/http/config.rs | 2 +- src/meta/service/tests/it/api/http_service.rs | 2 +- .../tests/it/grpc/metasrv_connection_error.rs | 12 +- .../service/tests/it/grpc/metasrv_grpc_api.rs | 12 +- .../tests/it/grpc/metasrv_grpc_export.rs | 8 +- .../tests/it/grpc/metasrv_grpc_handshake.rs | 12 +- .../tests/it/grpc/metasrv_grpc_kv_api.rs | 2 +- .../metasrv_grpc_kv_api_restart_cluster.rs | 10 +- .../tests/it/grpc/metasrv_grpc_kv_read_v1.rs | 24 +- .../tests/it/grpc/metasrv_grpc_schema_api.rs | 6 +- ...tasrv_grpc_schema_api_follower_follower.rs | 2 +- ...metasrv_grpc_schema_api_leader_follower.rs | 2 +- .../service/tests/it/grpc/metasrv_grpc_tls.rs | 14 +- .../tests/it/grpc/metasrv_grpc_watch.rs | 46 +- .../tests/it/meta_node/meta_node_kv_api.rs | 2 +- .../it/meta_node/meta_node_kv_api_expire.rs | 18 +- .../tests/it/meta_node/meta_node_lifecycle.rs | 22 +- .../tests/it/meta_node/meta_node_raft_api.rs | 8 +- .../it/meta_node/meta_node_replication.rs | 12 +- .../meta_node/meta_node_request_forwarding.rs | 12 +- src/meta/service/tests/it/store.rs | 36 +- src/meta/service/tests/it/testing.rs | 10 +- src/meta/service/tests/it/tests/meta_node.rs | 8 +- src/meta/service/tests/it/tests/service.rs | 16 +- src/meta/sled-store/Cargo.toml | 10 +- src/meta/sled-store/src/bytes_error.rs | 4 +- src/meta/sled-store/src/sled_serde.rs | 2 +- src/meta/sled-store/src/sled_serde_impl.rs | 22 +- src/meta/sled-store/src/sled_tree.rs | 8 +- src/meta/sled-store/tests/it/sled_iter.rs | 20 +- src/meta/sled-store/tests/it/sled_tree.rs | 18 +- src/meta/sled-store/tests/it/sled_txn_tree.rs | 8 +- .../tests/it/testing/fake_key_spaces.rs | 12 +- .../it/testing/fake_state_machine_meta.rs | 12 +- src/meta/sled-store/tests/it/testing/mod.rs | 12 +- src/meta/stoerr/Cargo.toml | 2 +- src/meta/store/Cargo.toml | 14 +- src/meta/store/src/lib.rs | 30 +- src/meta/types/Cargo.toml | 6 +- src/meta/types/build.rs | 2 +- src/meta/types/src/errors/meta_errors.rs | 2 +- .../types/src/errors/meta_startup_errors.rs | 2 +- src/meta/types/tests/it/cluster.rs | 2 +- src/meta/types/tests/it/main.rs | 2 +- src/query/ast/Cargo.toml | 12 +- src/query/ast/benches/bench.rs | 8 +- src/query/ast/fuzz/Cargo.toml | 2 +- .../ast/fuzz/fuzz_targets/fuzz_parse_sql.rs | 6 +- src/query/ast/src/ast/ast.rs | 2 +- src/query/ast/src/ast/expr.rs | 10 +- src/query/ast/src/ast/format/ast_format.rs | 8 +- src/query/ast/src/ast/format/indent_format.rs | 2 +- src/query/ast/src/ast/format/pretty_format.rs | 2 +- src/query/ast/src/ast/format/syntax/mod.rs | 2 +- src/query/ast/src/ast/query.rs | 2 +- src/query/ast/src/ast/statements/catalog.rs | 2 +- .../ast/src/ast/statements/connection.rs | 2 +- src/query/ast/src/ast/statements/copy.rs | 21 +- src/query/ast/src/ast/statements/database.rs | 2 +- .../ast/src/ast/statements/merge_into.rs | 4 +- src/query/ast/src/ast/statements/share.rs | 4 +- src/query/ast/src/ast/statements/statement.rs | 6 +- src/query/ast/src/ast/statements/user.rs | 12 +- src/query/ast/src/error.rs | 4 +- src/query/ast/src/parser/parser.rs | 4 +- src/query/ast/src/parser/statement.rs | 18 +- src/query/ast/src/parser/token.rs | 6 +- src/query/ast/src/util.rs | 4 +- src/query/ast/src/visitors/visitor.rs | 8 +- src/query/ast/src/visitors/visitor_mut.rs | 8 +- src/query/ast/tests/it/decimal.rs | 6 +- src/query/ast/tests/it/parser.rs | 26 +- src/query/ast/tests/it/token.rs | 4 +- src/query/catalog/Cargo.toml | 32 +- src/query/catalog/src/catalog/interface.rs | 134 +- src/query/catalog/src/catalog/manager.rs | 38 +- src/query/catalog/src/cluster_info.rs | 2 +- src/query/catalog/src/database.rs | 44 +- src/query/catalog/src/lock.rs | 16 +- src/query/catalog/src/plan/agg_index.rs | 10 +- .../datasource_info/data_source_info.rs | 4 +- .../datasource/datasource_info/parquet.rs | 22 +- .../datasource/datasource_info/parquet2.rs | 14 +- .../datasource/datasource_info/result_scan.rs | 42 +- .../plan/datasource/datasource_info/stage.rs | 16 +- .../src/plan/datasource/datasource_plan.rs | 10 +- src/query/catalog/src/plan/internal_column.rs | 56 +- src/query/catalog/src/plan/partition.rs | 2 +- src/query/catalog/src/plan/projection.rs | 14 +- src/query/catalog/src/plan/pushdown.rs | 12 +- src/query/catalog/src/plan/stream_column.rs | 52 +- .../src/statistics/basic_statistics.rs | 4 +- src/query/catalog/src/table.rs | 38 +- src/query/catalog/src/table_args.rs | 6 +- src/query/catalog/src/table_context.rs | 50 +- src/query/catalog/tests/it/partitions.rs | 14 +- src/query/catalog/tests/it/projection.rs | 12 +- src/query/codegen/Cargo.toml | 4 +- src/query/codegen/src/bin/codegen.rs | 4 +- .../codegen/src/writes/arithmetics_type.rs | 2 +- src/query/codegen/src/writes/register.rs | 2 +- src/query/config/Cargo.toml | 20 +- src/query/config/build.rs | 2 +- src/query/config/src/background_config.rs | 8 +- src/query/config/src/config.rs | 52 +- src/query/config/src/global.rs | 4 +- src/query/config/src/inner.rs | 20 +- src/query/config/src/obsolete.rs | 10 +- src/query/config/tests/main.rs | 4 +- src/query/constraint/Cargo.toml | 4 +- src/query/constraint/benches/bench.rs | 12 +- src/query/constraint/src/problem.rs | 4 +- src/query/constraint/tests/it/declare.rs | 2 +- src/query/constraint/tests/it/parser.rs | 28 +- src/query/constraint/tests/it/problem.rs | 4 +- src/query/constraint/tests/it/simplify.rs | 8 +- src/query/datavalues/Cargo.toml | 2 +- src/query/ee/Cargo.toml | 56 +- src/query/ee/build.rs | 2 +- .../aggregating_index_handler.rs | 26 +- .../background_service_handler.rs | 48 +- .../src/background_service/compaction_job.rs | 46 +- src/query/ee/src/background_service/job.rs | 10 +- .../src/background_service/job_scheduler.rs | 18 +- .../ee/src/background_service/session.rs | 12 +- .../ee/src/data_mask/data_mask_handler.rs | 22 +- src/query/ee/src/enterprise_services.rs | 6 +- src/query/ee/src/license/license_mgr.rs | 16 +- .../ee/src/storage_encryption/handler.rs | 14 +- .../ee/src/storages/fuse/io/snapshots.rs | 8 +- .../src/storages/fuse/operations/handler.rs | 14 +- .../fuse/operations/vacuum_drop_tables.rs | 6 +- .../storages/fuse/operations/vacuum_table.rs | 24 +- .../fuse/operations/virtual_columns.rs | 52 +- src/query/ee/src/stream/handler.rs | 58 +- src/query/ee/src/test_kits/context.rs | 10 +- src/query/ee/src/test_kits/mock_services.rs | 8 +- src/query/ee/src/test_kits/setup.rs | 8 +- .../virtual_column/virtual_column_handler.rs | 32 +- .../it/aggregating_index/index_refresh.rs | 30 +- .../tests/it/aggregating_index/index_scan.rs | 22 +- .../it/background_service/compaction_job.rs | 10 +- .../it/background_service/job_scheduler.rs | 22 +- src/query/ee/tests/it/license/license_mgr.rs | 14 +- .../fuse/operations/computed_columns.rs | 6 +- .../it/storages/fuse/operations/vacuum.rs | 6 +- .../fuse/operations/virtual_columns.rs | 18 +- .../ee_features/aggregating_index/Cargo.toml | 10 +- .../src/aggregating_index_handler.rs | 22 +- .../ee_features/background_service/Cargo.toml | 8 +- .../src/background_service.rs | 6 +- .../src/management_suggestions.rs | 2 +- src/query/ee_features/data_mask/Cargo.toml | 10 +- .../data_mask/src/data_mask_handler.rs | 12 +- .../ee_features/storage_encryption/Cargo.toml | 6 +- .../storage_encryption/src/handler.rs | 6 +- .../ee_features/stream_handler/Cargo.toml | 12 +- .../ee_features/stream_handler/src/handler.rs | 14 +- .../ee_features/vacuum_handler/Cargo.toml | 10 +- .../vacuum_handler/src/vacuum_handler.rs | 10 +- .../ee_features/virtual_column/Cargo.toml | 14 +- .../virtual_column/src/virtual_column.rs | 28 +- src/query/expression/Cargo.toml | 14 +- .../src/aggregate/aggregate_function.rs | 4 +- .../src/aggregate/aggregate_function_state.rs | 4 +- .../src/aggregate/aggregate_hashtable.rs | 2 +- .../expression/src/aggregate/group_hash.rs | 2 +- .../expression/src/aggregate/payload_row.rs | 2 +- src/query/expression/src/block.rs | 10 +- .../expression/src/convert_arrow_rs/array.rs | 2 +- src/query/expression/src/converts/from.rs | 6 +- src/query/expression/src/converts/to.rs | 2 +- src/query/expression/src/evaluator.rs | 12 +- src/query/expression/src/expression.rs | 2 +- src/query/expression/src/function.rs | 16 +- src/query/expression/src/kernels/concat.rs | 8 +- src/query/expression/src/kernels/filter.rs | 10 +- src/query/expression/src/kernels/group_by.rs | 2 +- .../src/kernels/group_by_hash/method.rs | 8 +- .../group_by_hash/method_dict_serializer.rs | 6 +- .../group_by_hash/method_fixed_keys.rs | 10 +- .../group_by_hash/method_serializer.rs | 4 +- .../group_by_hash/method_single_string.rs | 6 +- src/query/expression/src/kernels/scatter.rs | 6 +- src/query/expression/src/kernels/sort.rs | 32 +- src/query/expression/src/kernels/take.rs | 18 +- .../expression/src/kernels/take_chunks.rs | 8 +- .../expression/src/kernels/take_compact.rs | 4 +- .../expression/src/kernels/take_ranges.rs | 6 +- src/query/expression/src/kernels/topk.rs | 2 +- src/query/expression/src/register.rs | 442 +- src/query/expression/src/row/fixed.rs | 2 +- src/query/expression/src/row/row_converter.rs | 4 +- src/query/expression/src/row/variable.rs | 2 +- src/query/expression/src/schema.rs | 12 +- src/query/expression/src/type_check.rs | 6 +- src/query/expression/src/types.rs | 2 +- src/query/expression/src/types/array.rs | 8 +- src/query/expression/src/types/boolean.rs | 6 +- src/query/expression/src/types/date.rs | 6 +- src/query/expression/src/types/decimal.rs | 6 +- src/query/expression/src/types/map.rs | 2 +- src/query/expression/src/types/nullable.rs | 8 +- src/query/expression/src/types/number.rs | 2 +- src/query/expression/src/types/string.rs | 8 +- src/query/expression/src/types/timestamp.rs | 8 +- src/query/expression/src/utils/arrow.rs | 20 +- src/query/expression/src/utils/block_debug.rs | 2 +- .../expression/src/utils/block_thresholds.rs | 6 +- src/query/expression/src/utils/column_from.rs | 2 +- src/query/expression/src/utils/date_helper.rs | 4 +- src/query/expression/src/utils/display.rs | 4 +- .../expression/src/utils/filter_helper.rs | 2 +- src/query/expression/src/utils/mod.rs | 6 +- src/query/expression/src/utils/serialize.rs | 4 +- src/query/expression/src/utils/udf_client.rs | 4 +- .../expression/src/utils/variant_transform.rs | 4 +- src/query/expression/src/values.rs | 179 +- src/query/expression/tests/it/block.rs | 18 +- src/query/expression/tests/it/column.rs | 12 +- src/query/expression/tests/it/common.rs | 12 +- src/query/expression/tests/it/decimal.rs | 18 +- .../tests/it/fill_field_default_value.rs | 16 +- src/query/expression/tests/it/group_by.rs | 10 +- src/query/expression/tests/it/kernel.rs | 48 +- src/query/expression/tests/it/main.rs | 12 +- src/query/expression/tests/it/row.rs | 24 +- src/query/expression/tests/it/schema.rs | 32 +- src/query/expression/tests/it/serde.rs | 22 +- src/query/expression/tests/it/sort.rs | 16 +- src/query/formats/Cargo.toml | 21 +- src/query/formats/src/clickhouse.rs | 6 +- src/query/formats/src/delimiter.rs | 4 +- .../formats/src/field_decoder/fast_values.rs | 66 +- .../formats/src/field_decoder/json_ast.rs | 46 +- src/query/formats/src/field_decoder/nested.rs | 64 +- .../src/field_decoder/separated_text.rs | 72 +- src/query/formats/src/field_encoder/csv.rs | 22 +- src/query/formats/src/field_encoder/json.rs | 14 +- src/query/formats/src/field_encoder/values.rs | 36 +- src/query/formats/src/file_format_type.rs | 12 +- src/query/formats/src/output_format/csv.rs | 10 +- src/query/formats/src/output_format/json.rs | 21 +- src/query/formats/src/output_format/mod.rs | 4 +- src/query/formats/src/output_format/ndjson.rs | 8 +- .../formats/src/output_format/parquet.rs | 12 +- src/query/formats/src/output_format/tsv.rs | 10 +- .../tests/it/field_decoder/fast_values.rs | 22 +- .../formats/tests/it/field_encoder/helpers.rs | 6 +- src/query/formats/tests/it/main.rs | 12 +- .../tests/it/output_format_json_each_row.rs | 16 +- .../formats/tests/it/output_format_tcsv.rs | 20 +- .../formats/tests/it/output_format_utils.rs | 30 +- src/query/functions/Cargo.toml | 20 +- src/query/functions/benches/bench.rs | 10 +- .../adaptors/aggregate_null_adaptor.rs | 8 +- .../adaptors/aggregate_null_unary_adaptor.rs | 14 +- .../aggregate_null_variadic_adaptor.rs | 14 +- .../adaptors/aggregate_ornull_adaptor.rs | 14 +- .../aggregate_approx_count_distinct.rs | 24 +- .../src/aggregates/aggregate_arg_min_max.rs | 18 +- .../src/aggregates/aggregate_array_agg.rs | 24 +- .../src/aggregates/aggregate_array_moving.rs | 48 +- .../functions/src/aggregates/aggregate_avg.rs | 14 +- .../src/aggregates/aggregate_bitmap.rs | 28 +- .../aggregate_combinator_distinct.rs | 18 +- .../src/aggregates/aggregate_combinator_if.rs | 18 +- .../aggregates/aggregate_combinator_state.rs | 12 +- .../src/aggregates/aggregate_count.rs | 18 +- .../src/aggregates/aggregate_covariance.rs | 26 +- .../aggregates/aggregate_distinct_state.rs | 38 +- .../aggregates/aggregate_function_factory.rs | 8 +- .../src/aggregates/aggregate_kurtosis.rs | 278 +- .../src/aggregates/aggregate_min_max_any.rs | 14 +- .../src/aggregates/aggregate_null_result.rs | 14 +- .../src/aggregates/aggregate_quantile_cont.rs | 22 +- .../src/aggregates/aggregate_quantile_disc.rs | 584 +-- .../aggregates/aggregate_quantile_tdigest.rs | 26 +- .../aggregate_quantile_tdigest_weighted.rs | 26 +- .../src/aggregates/aggregate_retention.rs | 20 +- .../src/aggregates/aggregate_scalar_state.rs | 10 +- .../src/aggregates/aggregate_skewness.rs | 14 +- .../src/aggregates/aggregate_stddev.rs | 36 +- .../src/aggregates/aggregate_string_agg.rs | 18 +- .../functions/src/aggregates/aggregate_sum.rs | 26 +- .../src/aggregates/aggregate_unary.rs | 28 +- .../src/aggregates/aggregate_window_funnel.rs | 40 +- .../src/aggregates/aggregator_common.rs | 16 +- src/query/functions/src/aggregates/mod.rs | 2 +- src/query/functions/src/cast_rules.rs | 14 +- src/query/functions/src/lib.rs | 2 +- src/query/functions/src/scalars/arithmetic.rs | 96 +- .../src/scalars/arithmetic_modulo.rs | 12 +- src/query/functions/src/scalars/array.rs | 94 +- src/query/functions/src/scalars/bitmap.rs | 40 +- src/query/functions/src/scalars/boolean.rs | 56 +- src/query/functions/src/scalars/comparison.rs | 60 +- src/query/functions/src/scalars/control.rs | 32 +- src/query/functions/src/scalars/datetime.rs | 78 +- src/query/functions/src/scalars/decimal.rs | 52 +- src/query/functions/src/scalars/geo.rs | 54 +- src/query/functions/src/scalars/geo_h3.rs | 28 +- src/query/functions/src/scalars/hash.rs | 44 +- src/query/functions/src/scalars/map.rs | 26 +- src/query/functions/src/scalars/math.rs | 26 +- src/query/functions/src/scalars/mod.rs | 2 +- src/query/functions/src/scalars/other.rs | 80 +- src/query/functions/src/scalars/string.rs | 40 +- .../src/scalars/string_multi_args.rs | 44 +- src/query/functions/src/scalars/tuple.rs | 30 +- src/query/functions/src/scalars/variant.rs | 80 +- src/query/functions/src/scalars/vector.rs | 24 +- src/query/functions/src/srfs/array.rs | 24 +- src/query/functions/src/srfs/mod.rs | 2 +- src/query/functions/src/srfs/variant.rs | 44 +- .../functions/tests/it/aggregates/agg.rs | 22 +- .../tests/it/aggregates/agg_hashtable.rs | 38 +- .../functions/tests/it/aggregates/mod.rs | 42 +- .../functions/tests/it/scalars/arithmetic.rs | 10 +- src/query/functions/tests/it/scalars/array.rs | 4 +- .../functions/tests/it/scalars/bitmap.rs | 4 +- .../functions/tests/it/scalars/boolean.rs | 8 +- src/query/functions/tests/it/scalars/cast.rs | 6 +- .../functions/tests/it/scalars/comparison.rs | 4 +- .../functions/tests/it/scalars/control.rs | 6 +- .../functions/tests/it/scalars/datetime.rs | 4 +- src/query/functions/tests/it/scalars/geo.rs | 4 +- .../functions/tests/it/scalars/geo_h3.rs | 4 +- src/query/functions/tests/it/scalars/hash.rs | 4 +- src/query/functions/tests/it/scalars/map.rs | 4 +- src/query/functions/tests/it/scalars/math.rs | 4 +- src/query/functions/tests/it/scalars/misc.rs | 4 +- src/query/functions/tests/it/scalars/mod.rs | 20 +- src/query/functions/tests/it/scalars/other.rs | 8 +- .../functions/tests/it/scalars/parser.rs | 86 +- .../functions/tests/it/scalars/regexp.rs | 6 +- .../functions/tests/it/scalars/string.rs | 8 +- src/query/functions/tests/it/scalars/tuple.rs | 8 +- .../functions/tests/it/scalars/variant.rs | 4 +- .../functions/tests/it/scalars/vector.rs | 4 +- src/query/management/Cargo.toml | 28 +- .../management/src/cluster/cluster_api.rs | 6 +- .../management/src/cluster/cluster_mgr.rs | 26 +- .../src/connection/connection_api.rs | 8 +- .../src/connection/connection_mgr.rs | 22 +- .../src/file_format/file_format_api.rs | 8 +- .../src/file_format/file_format_mgr.rs | 22 +- .../src/network_policy/network_policy_api.rs | 8 +- .../src/network_policy/network_policy_mgr.rs | 22 +- src/query/management/src/quota/quota_api.rs | 8 +- src/query/management/src/quota/quota_mgr.rs | 24 +- src/query/management/src/role/role_api.rs | 12 +- src/query/management/src/role/role_mgr.rs | 37 +- src/query/management/src/serde/pb_serde.rs | 19 +- .../management/src/setting/setting_api.rs | 8 +- .../management/src/setting/setting_mgr.rs | 24 +- src/query/management/src/stage/stage_api.rs | 10 +- src/query/management/src/stage/stage_mgr.rs | 40 +- src/query/management/src/udf/udf_api.rs | 8 +- src/query/management/src/udf/udf_mgr.rs | 24 +- src/query/management/src/user/user_api.rs | 10 +- src/query/management/src/user/user_mgr.rs | 28 +- src/query/management/tests/it/cluster.rs | 18 +- src/query/management/tests/it/setting.rs | 18 +- src/query/management/tests/it/stage.rs | 26 +- src/query/management/tests/it/udf.rs | 22 +- src/query/management/tests/it/user.rs | 96 +- src/query/pipeline/core/Cargo.toml | 6 +- src/query/pipeline/core/src/input_error.rs | 2 +- src/query/pipeline/core/src/pipeline.rs | 4 +- .../src/processors/duplicate_processor.rs | 2 +- .../pipeline/core/src/processors/port.rs | 4 +- .../core/src/processors/port_trigger.rs | 4 +- .../pipeline/core/src/processors/processor.rs | 4 +- .../core/src/processors/resize_processor.rs | 2 +- .../core/src/processors/shuffle_processor.rs | 2 +- .../it/pipelines/processors/duplicate.rs | 20 +- .../it/pipelines/processors/port_test.rs | 14 +- .../tests/it/pipelines/processors/resize.rs | 16 +- .../tests/it/pipelines/processors/shuffle.rs | 20 +- src/query/pipeline/sinks/Cargo.toml | 12 +- .../pipeline/sinks/src/async_mpsc_sink.rs | 10 +- src/query/pipeline/sinks/src/async_sink.rs | 16 +- src/query/pipeline/sinks/src/empty_sink.rs | 8 +- .../pipeline/sinks/src/sync_mpsc_sink.rs | 10 +- src/query/pipeline/sinks/src/sync_sink.rs | 10 +- .../pipeline/sinks/src/sync_sink_sender.rs | 10 +- .../pipeline/sinks/src/union_receive_sink.rs | 12 +- .../sinks/tests/it/async_mpsc_sink.rs | 18 +- .../pipeline/sinks/tests/it/sync_mpsc_sink.rs | 18 +- src/query/pipeline/sources/Cargo.toml | 26 +- .../pipeline/sources/src/async_source.rs | 20 +- .../pipeline/sources/src/blocks_source.rs | 10 +- .../pipeline/sources/src/empty_source.rs | 10 +- .../src/input_formats/beyond_end_reader.rs | 4 +- .../sources/src/input_formats/error_utils.rs | 4 +- .../input_formats/impls/input_format_csv.rs | 28 +- .../impls/input_format_ndjson.rs | 22 +- .../impls/input_format_parquet.rs | 42 +- .../input_formats/impls/input_format_tsv.rs | 24 +- .../input_formats/impls/input_format_xml.rs | 22 +- .../src/input_formats/input_context.rs | 42 +- .../sources/src/input_formats/input_format.rs | 10 +- .../src/input_formats/input_format_text.rs | 38 +- .../src/input_formats/input_pipeline.rs | 22 +- .../sources/src/input_formats/input_split.rs | 4 +- .../src/input_formats/source_aligner.rs | 18 +- .../input_formats/transform_deserializer.rs | 16 +- .../pipeline/sources/src/one_block_source.rs | 12 +- .../pipeline/sources/src/stream_source.rs | 14 +- src/query/pipeline/sources/src/sync_source.rs | 18 +- .../sources/src/sync_source_receiver.rs | 12 +- .../tests/it/sources/input_formats/split.rs | 2 +- src/query/pipeline/transforms/Cargo.toml | 12 +- .../src/processors/profile_wrapper.rs | 16 +- .../processors/transforms/sort/rows/common.rs | 28 +- .../processors/transforms/sort/rows/mod.rs | 10 +- .../processors/transforms/sort/rows/simple.rs | 26 +- .../src/processors/transforms/sort/spill.rs | 2 +- .../src/processors/transforms/transform.rs | 18 +- .../transforms/transform_accumulating.rs | 16 +- .../transform_accumulating_async.rs | 12 +- .../processors/transforms/transform_async.rs | 12 +- .../transforms/transform_block_compact.rs | 8 +- .../transform_block_compact_for_copy.rs | 8 +- .../transforms/transform_blocking.rs | 12 +- .../transforms/transform_compact.rs | 14 +- .../processors/transforms/transform_dummy.rs | 12 +- .../transforms/transform_multi_sort_merge.rs | 44 +- .../transforms/transform_sort_merge.rs | 16 +- .../transforms/transform_sort_merge_base.rs | 28 +- .../transforms/transform_sort_merge_limit.rs | 8 +- .../transforms/transform_sort_partial.rs | 12 +- src/query/profile/Cargo.toml | 4 +- src/query/profile/src/mgr.rs | 2 +- src/query/service/Cargo.toml | 146 +- src/query/service/build.rs | 2 +- .../src/api/http/v1/background_tasks.rs | 14 +- src/query/service/src/api/http/v1/cluster.rs | 4 +- src/query/service/src/api/http/v1/config.rs | 2 +- src/query/service/src/api/http/v1/logs.rs | 8 +- .../service/src/api/http/v1/tenant_tables.rs | 6 +- src/query/service/src/api/http_service.rs | 20 +- .../src/api/rpc/exchange/data_exchange.rs | 2 +- .../src/api/rpc/exchange/exchange_injector.rs | 8 +- .../src/api/rpc/exchange/exchange_manager.rs | 28 +- .../src/api/rpc/exchange/exchange_params.rs | 6 +- .../src/api/rpc/exchange/exchange_sink.rs | 16 +- .../api/rpc/exchange/exchange_sink_writer.rs | 28 +- .../src/api/rpc/exchange/exchange_sorting.rs | 12 +- .../src/api/rpc/exchange/exchange_source.rs | 18 +- .../rpc/exchange/exchange_source_reader.rs | 18 +- .../api/rpc/exchange/exchange_transform.rs | 12 +- .../exchange/exchange_transform_scatter.rs | 14 +- .../exchange/exchange_transform_shuffle.rs | 32 +- .../exchange/serde/exchange_deserializer.rs | 40 +- .../rpc/exchange/serde/exchange_serializer.rs | 44 +- .../api/rpc/exchange/statistics_receiver.rs | 16 +- .../src/api/rpc/exchange/statistics_sender.rs | 18 +- .../service/src/api/rpc/flight_actions.rs | 6 +- .../service/src/api/rpc/flight_client.rs | 20 +- .../service/src/api/rpc/flight_scatter.rs | 4 +- .../src/api/rpc/flight_scatter_broadcast.rs | 4 +- .../src/api/rpc/flight_scatter_hash.rs | 44 +- .../service/src/api/rpc/flight_service.rs | 44 +- .../service/src/api/rpc/packets/packet.rs | 8 +- .../src/api/rpc/packets/packet_data.rs | 12 +- .../rpc/packets/packet_data_progressinfo.rs | 6 +- .../src/api/rpc/packets/packet_execute.rs | 8 +- .../src/api/rpc/packets/packet_executor.rs | 12 +- .../src/api/rpc/packets/packet_kill_query.rs | 6 +- .../src/api/rpc/packets/packet_publisher.rs | 6 +- .../api/rpc/packets/packet_truncate_table.rs | 6 +- .../service/src/api/rpc/request_builder.rs | 4 +- src/query/service/src/api/rpc_service.rs | 12 +- src/query/service/src/auth.rs | 18 +- .../src/catalogs/default/catalog_context.rs | 2 +- .../src/catalogs/default/database_catalog.rs | 144 +- .../src/catalogs/default/immutable_catalog.rs | 130 +- .../src/catalogs/default/mutable_catalog.rs | 161 +- .../src/catalogs/default/table_memory_meta.rs | 6 +- src/query/service/src/catalogs/mod.rs | 4 +- src/query/service/src/clusters/cluster.rs | 46 +- src/query/service/src/databases/database.rs | 2 +- .../service/src/databases/database_context.rs | 2 +- .../service/src/databases/database_factory.rs | 8 +- .../src/databases/default/default_database.rs | 50 +- .../information_schema_database.rs | 22 +- .../src/databases/share/share_database.rs | 50 +- .../src/databases/system/system_database.rs | 88 +- src/query/service/src/global_services.rs | 40 +- .../src/interpreters/access/accessor.rs | 2 +- .../access/management_mode_access.rs | 14 +- .../interpreters/access/privilege_access.rs | 30 +- .../service/src/interpreters/common/grant.rs | 21 +- .../src/interpreters/common/metrics.rs | 6 +- .../src/interpreters/common/query_log.rs | 12 +- .../service/src/interpreters/common/stream.rs | 26 +- .../service/src/interpreters/common/table.rs | 12 +- .../service/src/interpreters/common/task.rs | 40 +- .../service/src/interpreters/common/util.rs | 14 +- .../src/interpreters/hook/compact_hook.rs | 12 +- .../src/interpreters/hook/refresh_hook.rs | 34 +- .../service/src/interpreters/interpreter.rs | 12 +- .../interpreter_catalog_create.rs | 22 +- .../interpreters/interpreter_catalog_drop.rs | 8 +- .../interpreter_catalog_show_create.rs | 18 +- .../interpreter_cluster_key_alter.rs | 4 +- .../interpreter_cluster_key_drop.rs | 4 +- .../interpreter_clustering_history.rs | 6 +- .../interpreter_connection_create.rs | 8 +- .../interpreter_connection_desc.rs | 14 +- .../interpreter_connection_drop.rs | 6 +- .../interpreter_connection_show.rs | 12 +- .../interpreter_copy_into_location.rs | 20 +- .../interpreter_copy_into_table.rs | 44 +- .../interpreter_data_mask_create.rs | 12 +- .../interpreter_data_mask_desc.rs | 20 +- .../interpreter_data_mask_drop.rs | 12 +- .../interpreter_database_create.rs | 24 +- .../interpreters/interpreter_database_drop.rs | 12 +- .../interpreter_database_rename.rs | 8 +- .../interpreter_database_show_create.rs | 14 +- .../interpreter_database_undrop.rs | 4 +- .../src/interpreters/interpreter_delete.rs | 74 +- .../src/interpreters/interpreter_explain.rs | 36 +- .../src/interpreters/interpreter_factory.rs | 4 +- .../interpreter_file_format_create.rs | 8 +- .../interpreter_file_format_drop.rs | 6 +- .../interpreter_file_format_show.rs | 10 +- .../interpreters/interpreter_index_create.rs | 20 +- .../interpreters/interpreter_index_drop.rs | 14 +- .../interpreters/interpreter_index_refresh.rs | 66 +- .../src/interpreters/interpreter_insert.rs | 28 +- .../src/interpreters/interpreter_kill.rs | 10 +- .../interpreters/interpreter_merge_into.rs | 72 +- .../interpreter_merge_into_static_filter.rs | 64 +- .../src/interpreters/interpreter_metrics.rs | 6 +- .../interpreter_network_policies_show.rs | 10 +- .../interpreter_network_policy_alter.rs | 6 +- .../interpreter_network_policy_create.rs | 8 +- .../interpreter_network_policy_desc.rs | 12 +- .../interpreter_network_policy_drop.rs | 6 +- .../src/interpreters/interpreter_presign.rs | 16 +- .../interpreter_privilege_grant.rs | 24 +- .../interpreter_privilege_revoke.rs | 8 +- .../src/interpreters/interpreter_replace.rs | 60 +- .../interpreters/interpreter_role_create.rs | 10 +- .../src/interpreters/interpreter_role_drop.rs | 8 +- .../interpreters/interpreter_role_grant.rs | 10 +- .../interpreters/interpreter_role_revoke.rs | 10 +- .../src/interpreters/interpreter_role_set.rs | 6 +- .../interpreter_role_set_secondary.rs | 4 +- .../src/interpreters/interpreter_role_show.rs | 14 +- .../src/interpreters/interpreter_select.rs | 44 +- .../src/interpreters/interpreter_setting.rs | 6 +- .../interpreter_share_alter_tenants.rs | 14 +- .../interpreters/interpreter_share_create.rs | 8 +- .../interpreters/interpreter_share_desc.rs | 18 +- .../interpreters/interpreter_share_drop.rs | 8 +- .../interpreter_share_endpoint_create.rs | 6 +- .../interpreter_share_endpoint_drop.rs | 6 +- .../interpreter_share_endpoint_show.rs | 12 +- .../interpreter_share_grant_object.rs | 12 +- .../interpreter_share_revoke_object.rs | 12 +- .../interpreters/interpreter_share_show.rs | 16 +- .../interpreter_share_show_grant_tenants.rs | 16 +- .../interpreters/interpreter_show_grants.rs | 16 +- ...nterpreter_show_object_grant_privileges.rs | 14 +- .../interpreters/interpreter_stream_create.rs | 12 +- .../interpreters/interpreter_stream_drop.rs | 10 +- .../interpreter_table_add_column.rs | 28 +- .../interpreters/interpreter_table_analyze.rs | 6 +- .../interpreters/interpreter_table_create.rs | 90 +- .../interpreter_table_describe.rs | 22 +- .../interpreters/interpreter_table_drop.rs | 24 +- .../interpreter_table_drop_column.rs | 26 +- .../interpreters/interpreter_table_exists.rs | 18 +- .../interpreter_table_modify_column.rs | 70 +- .../interpreter_table_optimize.rs | 46 +- .../interpreter_table_recluster.rs | 40 +- .../interpreters/interpreter_table_rename.rs | 8 +- .../interpreter_table_rename_column.rs | 26 +- .../interpreters/interpreter_table_revert.rs | 8 +- .../interpreter_table_set_options.rs | 18 +- .../interpreter_table_show_create.rs | 36 +- .../interpreter_table_truncate.rs | 8 +- .../interpreters/interpreter_table_undrop.rs | 4 +- .../interpreters/interpreter_table_vacuum.rs | 20 +- .../interpreters/interpreter_task_alter.rs | 22 +- .../interpreters/interpreter_task_create.rs | 16 +- .../interpreters/interpreter_task_describe.rs | 16 +- .../src/interpreters/interpreter_task_drop.rs | 14 +- .../interpreters/interpreter_task_execute.rs | 14 +- .../interpreters/interpreter_tasks_show.rs | 16 +- .../src/interpreters/interpreter_unsetting.rs | 6 +- .../src/interpreters/interpreter_update.rs | 48 +- .../interpreters/interpreter_use_database.rs | 8 +- .../interpreters/interpreter_user_alter.rs | 6 +- .../interpreters/interpreter_user_create.rs | 16 +- .../src/interpreters/interpreter_user_drop.rs | 6 +- .../interpreter_user_stage_create.rs | 12 +- .../interpreter_user_stage_drop.rs | 12 +- .../interpreter_user_stage_remove.rs | 12 +- .../interpreter_user_udf_alter.rs | 6 +- .../interpreter_user_udf_create.rs | 6 +- .../interpreters/interpreter_user_udf_drop.rs | 6 +- .../interpreter_vacuum_drop_tables.rs | 24 +- .../interpreters/interpreter_view_alter.rs | 18 +- .../interpreters/interpreter_view_create.rs | 22 +- .../src/interpreters/interpreter_view_drop.rs | 12 +- .../interpreter_virtual_column_alter.rs | 16 +- .../interpreter_virtual_column_create.rs | 16 +- .../interpreter_virtual_column_drop.rs | 16 +- .../interpreter_virtual_column_refresh.rs | 16 +- src/query/service/src/lib.rs | 4 +- src/query/service/src/local/config.rs | 4 +- src/query/service/src/local/display.rs | 28 +- src/query/service/src/local/executor.rs | 36 +- src/query/service/src/local/helper.rs | 6 +- src/query/service/src/local/mod.rs | 16 +- src/query/service/src/locks/lock_holder.rs | 24 +- src/query/service/src/locks/lock_manager.rs | 42 +- src/query/service/src/locks/table_lock/mod.rs | 18 +- .../service/src/metrics/metric_service.rs | 10 +- .../pipelines/builders/builder_aggregate.rs | 42 +- .../builders/builder_append_table.rs | 14 +- .../src/pipelines/builders/builder_commit.rs | 22 +- .../src/pipelines/builders/builder_compact.rs | 8 +- .../pipelines/builders/builder_copy_into.rs | 32 +- .../src/pipelines/builders/builder_delete.rs | 30 +- .../builder_distributed_insert_select.rs | 6 +- .../pipelines/builders/builder_exchange.rs | 6 +- .../builders/builder_fill_missing_columns.rs | 8 +- .../src/pipelines/builders/builder_filter.rs | 14 +- .../src/pipelines/builders/builder_join.rs | 26 +- .../src/pipelines/builders/builder_limit.rs | 8 +- .../pipelines/builders/builder_merge_into.rs | 62 +- .../pipelines/builders/builder_on_finished.rs | 18 +- .../src/pipelines/builders/builder_project.rs | 26 +- .../pipelines/builders/builder_recluster.rs | 48 +- .../builders/builder_replace_into.rs | 74 +- .../pipelines/builders/builder_row_fetch.rs | 8 +- .../src/pipelines/builders/builder_scalar.rs | 16 +- .../src/pipelines/builders/builder_scan.rs | 26 +- .../src/pipelines/builders/builder_sort.rs | 40 +- .../src/pipelines/builders/builder_udf.rs | 8 +- .../pipelines/builders/builder_union_all.rs | 14 +- .../src/pipelines/builders/builder_update.rs | 20 +- .../src/pipelines/builders/builder_window.rs | 16 +- .../src/pipelines/executor/executor_graph.rs | 16 +- .../pipelines/executor/executor_settings.rs | 4 +- .../src/pipelines/executor/executor_tasks.rs | 2 +- .../executor/executor_worker_context.rs | 4 +- .../service/src/pipelines/executor/mod.rs | 2 +- .../executor/pipeline_complete_executor.rs | 8 +- .../pipelines/executor/pipeline_executor.rs | 26 +- .../executor/pipeline_pulling_executor.rs | 16 +- .../executor/pipeline_pushing_executor.rs | 14 +- .../executor/processor_async_task.rs | 10 +- .../src/pipelines/pipeline_build_res.rs | 16 +- .../service/src/pipelines/pipeline_builder.rs | 20 +- .../service/src/pipelines/processors/mod.rs | 2 +- .../transforms/aggregator/aggregate_cell.rs | 6 +- .../aggregator/aggregate_exchange_injector.rs | 28 +- .../transforms/aggregator/aggregate_meta.rs | 8 +- .../aggregator/aggregator_params.rs | 14 +- .../transforms/aggregator/serde/mod.rs | 18 +- .../transforms/aggregator/serde/serde_meta.rs | 6 +- .../serde/transform_aggregate_serializer.rs | 26 +- .../serde/transform_aggregate_spill_writer.rs | 28 +- .../serde/transform_deserializer.rs | 48 +- ...transform_exchange_aggregate_serializer.rs | 52 +- .../serde/transform_exchange_async_barrier.rs | 20 +- .../transform_exchange_group_by_serializer.rs | 60 +- .../serde/transform_group_by_serializer.rs | 20 +- .../serde/transform_group_by_spill_writer.rs | 28 +- .../serde/transform_spill_reader.rs | 26 +- .../aggregator/transform_aggregate_expand.rs | 26 +- .../aggregator/transform_aggregate_final.rs | 26 +- .../aggregator/transform_aggregate_partial.rs | 40 +- .../aggregator/transform_group_by_final.rs | 20 +- .../aggregator/transform_group_by_partial.rs | 28 +- .../aggregator/transform_partition_bucket.rs | 38 +- .../aggregator/transform_single_key.rs | 36 +- .../processors/transforms/aggregator/utils.rs | 6 +- .../group_by/aggregator_groups_builder.rs | 14 +- .../group_by/aggregator_keys_builder.rs | 16 +- .../group_by/aggregator_keys_iter.rs | 12 +- .../group_by/aggregator_polymorphic_keys.rs | 54 +- .../group_by/aggregator_state_entity.rs | 8 +- .../build_spill/build_spill_coordinator.rs | 12 +- .../build_spill/build_spill_state.rs | 16 +- .../transforms/hash_join/build_state.rs | 6 +- .../processors/transforms/hash_join/common.rs | 34 +- .../processors/transforms/hash_join/desc.rs | 12 +- .../hash_join/hash_join_build_state.rs | 58 +- .../hash_join/hash_join_probe_state.rs | 46 +- .../transforms/hash_join/hash_join_state.rs | 32 +- .../hash_join/probe_join/cross_join.rs | 8 +- .../hash_join/probe_join/inner_join.rs | 22 +- .../hash_join/probe_join/left_anti_join.rs | 14 +- .../hash_join/probe_join/left_join.rs | 20 +- .../hash_join/probe_join/left_mark_join.rs | 20 +- .../hash_join/probe_join/left_semi_join.rs | 14 +- .../hash_join/probe_join/right_join.rs | 14 +- .../hash_join/probe_join/right_mark_join.rs | 20 +- .../probe_join/right_semi_anti_join.rs | 14 +- .../probe_spill/probe_spill_state.rs | 10 +- .../transforms/hash_join/probe_state.rs | 6 +- .../transforms/hash_join/result_blocks.rs | 18 +- .../processors/transforms/hash_join/row.rs | 18 +- .../transforms/hash_join/spill_common.rs | 20 +- .../hash_join/transform_hash_join_build.rs | 6 +- .../hash_join/transform_hash_join_probe.rs | 14 +- .../processors/transforms/hash_join/util.rs | 24 +- .../processor_accumulate_row_number.rs | 22 +- .../processor_deduplicate_row_number.rs | 32 +- ...cessor_extract_hash_table_by_row_number.rs | 34 +- .../transforms/range_join/ie_join_state.rs | 46 +- .../transforms/range_join/ie_join_util.rs | 22 +- .../transforms/range_join/merge_join_state.rs | 16 +- .../transforms/range_join/range_join_state.rs | 30 +- .../range_join/transform_range_join.rs | 14 +- .../transform_add_computed_columns.rs | 28 +- .../transforms/transform_add_const_columns.rs | 20 +- .../transform_add_internal_columns.rs | 26 +- .../transform_add_stream_columns.rs | 24 +- .../transforms/transform_cast_schema.rs | 20 +- .../transforms/transform_create_sets.rs | 14 +- .../processors/transforms/transform_filter.rs | 24 +- .../processors/transforms/transform_limit.rs | 4 +- .../transforms/transform_materialized_cte.rs | 22 +- .../transforms/transform_merge_block.rs | 22 +- .../transforms/transform_resort_addon.rs | 14 +- ...form_resort_addon_without_source_schema.rs | 28 +- .../transform_runtime_cast_schema.rs | 20 +- .../transforms/transform_sort_spill.rs | 90 +- .../processors/transforms/transform_srf.rs | 42 +- .../processors/transforms/transform_udf.rs | 26 +- .../transforms/window/frame_bound.rs | 10 +- .../transforms/window/transform_window.rs | 70 +- .../transforms/window/window_function.rs | 26 +- .../src/schedulers/fragments/fragmenter.rs | 34 +- .../src/schedulers/fragments/plan_fragment.rs | 36 +- .../fragments/query_fragment_actions.rs | 8 +- .../query_fragment_actions_display.rs | 4 +- src/query/service/src/schedulers/scheduler.rs | 4 +- .../service/src/servers/federated_helper.rs | 6 +- .../servers/flight_sql/flight_sql_server.rs | 10 +- .../flight_sql/flight_sql_service/catalog.rs | 11 +- .../flight_sql/flight_sql_service/mod.rs | 4 +- .../flight_sql/flight_sql_service/query.rs | 18 +- .../flight_sql/flight_sql_service/service.rs | 6 +- .../flight_sql/flight_sql_service/session.rs | 6 +- .../src/servers/http/clickhouse_handler.rs | 36 +- .../service/src/servers/http/http_services.rs | 12 +- .../service/src/servers/http/middleware.rs | 12 +- .../servers/http/v1/http_query_handlers.rs | 8 +- .../service/src/servers/http/v1/json_block.rs | 14 +- src/query/service/src/servers/http/v1/load.rs | 28 +- .../servers/http/v1/query/execute_state.rs | 36 +- .../src/servers/http/v1/query/expiring_map.rs | 4 +- .../src/servers/http/v1/query/http_query.rs | 16 +- .../http/v1/query/http_query_manager.rs | 14 +- .../src/servers/http/v1/query/page_manager.rs | 12 +- .../src/servers/http/v1/query/sized_spsc.rs | 2 +- .../service/src/servers/http/v1/stage.rs | 6 +- .../src/servers/http/v1/suggestions.rs | 2 +- .../src/servers/mysql/mysql_federated.rs | 18 +- .../src/servers/mysql/mysql_handler.rs | 16 +- .../servers/mysql/mysql_interactive_worker.rs | 34 +- .../src/servers/mysql/mysql_session.rs | 18 +- .../src/servers/mysql/reject_connection.rs | 8 +- src/query/service/src/servers/mysql/tls.rs | 4 +- .../mysql/writers/init_result_writer.rs | 6 +- .../mysql/writers/query_result_writer.rs | 26 +- src/query/service/src/servers/server.rs | 10 +- src/query/service/src/sessions/mod.rs | 2 +- src/query/service/src/sessions/query_ctx.rs | 110 +- .../service/src/sessions/query_ctx_shared.rs | 44 +- src/query/service/src/sessions/session.rs | 22 +- src/query/service/src/sessions/session_ctx.rs | 10 +- .../service/src/sessions/session_info.rs | 8 +- src/query/service/src/sessions/session_mgr.rs | 22 +- .../src/sessions/session_privilege_mgr.rs | 20 +- src/query/service/src/spillers/spiller.rs | 16 +- .../service/src/stream/datablock_stream.rs | 4 +- .../src/stream/processor_executor_stream.rs | 4 +- .../service/src/stream/progress_stream.rs | 10 +- .../src/stream/table_read_block_stream.rs | 8 +- .../src/table_functions/async_crash_me.rs | 34 +- .../infer_schema/infer_schema_table.rs | 66 +- .../infer_schema/table_args.rs | 10 +- .../inspect_parquet/inspect_parquet_table.rs | 66 +- .../list_stage/list_stage_table.rs | 60 +- .../table_functions/list_stage/table_args.rs | 10 +- .../table_functions/numbers/numbers_part.rs | 12 +- .../table_functions/numbers/numbers_table.rs | 58 +- .../src/table_functions/openai/ai_to_sql.rs | 60 +- .../others/execute_background_job.rs | 42 +- .../table_functions/others/license_info.rs | 62 +- .../suggested_background_compaction_tasks.rs | 6 +- .../others/suggested_background_tasks.rs | 62 +- .../table_functions/others/tenant_quota.rs | 68 +- .../service/src/table_functions/srf/range.rs | 60 +- .../src/table_functions/sync_crash_me.rs | 32 +- .../src/table_functions/table_function.rs | 2 +- .../table_functions/table_function_factory.rs | 14 +- .../service/src/test_kits/block_writer.rs | 40 +- src/query/service/src/test_kits/check.rs | 26 +- src/query/service/src/test_kits/cluster.rs | 4 +- src/query/service/src/test_kits/config.rs | 14 +- src/query/service/src/test_kits/context.rs | 8 +- src/query/service/src/test_kits/fixture.rs | 86 +- src/query/service/src/test_kits/fuse.rs | 50 +- .../service/tests/it/api/http/cluster.rs | 6 +- src/query/service/tests/it/api/http/config.rs | 4 +- src/query/service/tests/it/api/http/logs.rs | 4 +- src/query/service/tests/it/api/http/status.rs | 8 +- .../service/tests/it/api/http_service.rs | 6 +- src/query/service/tests/it/api/rpc_service.rs | 16 +- src/query/service/tests/it/auth.rs | 14 +- .../tests/it/catalogs/database_catalog.rs | 30 +- .../tests/it/catalogs/immutable_catalogs.rs | 12 +- src/query/service/tests/it/clusters.rs | 4 +- src/query/service/tests/it/configs.rs | 16 +- .../it/databases/system/system_database.rs | 2 +- .../service/tests/it/distributed/cluster.rs | 12 +- src/query/service/tests/it/frame/dataframe.rs | 26 +- .../service/tests/it/interpreters/union.rs | 22 +- src/query/service/tests/it/metrics.rs | 6 +- .../tests/it/parquet_rs/prune_pages.rs | 10 +- .../tests/it/parquet_rs/prune_row_groups.rs | 10 +- .../service/tests/it/parquet_rs/utils.rs | 12 +- .../it/pipelines/executor/executor_graph.rs | 26 +- .../pipelines/executor/pipeline_executor.rs | 30 +- .../servers/flight_sql/flight_sql_handler.rs | 10 +- .../servers/flight_sql/flight_sql_server.rs | 4 +- .../it/servers/http/clickhouse_handler.rs | 2 +- .../it/servers/http/http_query_handlers.rs | 16 +- .../tests/it/servers/http/json_block.rs | 32 +- .../tests/it/servers/mysql/mysql_federated.rs | 4 +- .../tests/it/servers/mysql/mysql_handler.rs | 14 +- .../service/tests/it/sessions/query_ctx.rs | 10 +- .../service/tests/it/sessions/session.rs | 4 +- .../tests/it/sessions/session_context.rs | 8 +- .../tests/it/sessions/session_setting.rs | 4 +- .../service/tests/it/spillers/spiller.rs | 24 +- .../tests/it/sql/exec/get_table_bind_test.rs | 198 +- src/query/service/tests/it/sql/exec/mod.rs | 18 +- .../it/sql/planner/builders/select_builder.rs | 2 +- .../tests/it/sql/planner/format/mod.rs | 24 +- .../optimizer/agg_index_query_rewrite.rs | 60 +- .../sql/planner/semantic/name_resolution.rs | 10 +- .../it/storages/fuse/bloom_index_meta_size.rs | 80 +- .../tests/it/storages/fuse/conflict.rs | 14 +- .../service/tests/it/storages/fuse/io.rs | 6 +- .../serialization_format_compatability.rs | 4 +- .../tests/it/storages/fuse/meta/snapshot.rs | 10 +- .../storages/fuse/operations/alter_table.rs | 98 +- .../it/storages/fuse/operations/analyze.rs | 10 +- .../it/storages/fuse/operations/clustering.rs | 26 +- .../it/storages/fuse/operations/commit.rs | 210 +- .../tests/it/storages/fuse/operations/gc.rs | 16 +- .../fuse/operations/internal_column.rs | 32 +- .../mutation/block_compact_mutator.rs | 26 +- .../fuse/operations/mutation/deletion.rs | 4 +- .../operations/mutation/recluster_mutator.rs | 46 +- .../mutation/segments_compact_mutator.rs | 84 +- .../it/storages/fuse/operations/navigate.rs | 10 +- .../it/storages/fuse/operations/optimize.rs | 8 +- .../it/storages/fuse/operations/purge_drop.rs | 4 +- .../it/storages/fuse/operations/read_plan.rs | 32 +- .../storages/fuse/operations/replace_into.rs | 4 +- .../storages/fuse/operations/table_analyze.rs | 22 +- .../it/storages/fuse/operations/truncate.rs | 15 +- .../service/tests/it/storages/fuse/pruning.rs | 54 +- .../tests/it/storages/fuse/statistics.rs | 93 +- .../service/tests/it/storages/fuse/table.rs | 20 +- .../clustering_information_table.rs | 22 +- .../fuse/table_functions/fuse_block_table.rs | 8 +- .../service/tests/it/storages/fuse/utils.rs | 6 +- src/query/service/tests/it/storages/null.rs | 22 +- .../storages/statistics/column_statistics.rs | 24 +- src/query/service/tests/it/storages/system.rs | 70 +- .../tests/it/table_functions/ai_to_sql.rs | 6 +- .../tests/it/table_functions/numbers_table.rs | 14 +- src/query/service/tests/it/tests/catalog.rs | 2 +- src/query/settings/Cargo.toml | 14 +- src/query/settings/src/settings.rs | 6 +- src/query/settings/src/settings_default.rs | 8 +- .../settings/src/settings_getter_setter.rs | 8 +- src/query/settings/src/settings_global.rs | 12 +- src/query/settings/tests/it/setting.rs | 2 +- src/query/sharing/Cargo.toml | 18 +- src/query/sharing/src/layer.rs | 6 +- src/query/sharing/src/share_endpoint.rs | 26 +- src/query/sharing/src/signer.rs | 4 +- src/query/sharing_endpoint/Cargo.toml | 14 +- src/query/sharing_endpoint/src/accessor.rs | 8 +- .../src/accessor/share_spec_accessor.rs | 4 +- .../src/accessor/share_table_accessor.rs | 4 +- .../src/accessor/share_table_meta_accessor.rs | 6 +- .../sharing_endpoint/src/configs/inner.rs | 4 +- .../sharing_endpoint/src/configs/outer_v0.rs | 6 +- src/query/sharing_endpoint/src/handlers.rs | 2 +- src/query/sharing_endpoint/src/models.rs | 8 +- src/query/sharing_endpoint/src/services.rs | 6 +- .../sharing_endpoint/tests/it/accessor.rs | 6 +- src/query/sharing_endpoint/tests/it/models.rs | 16 +- src/query/sql/Cargo.toml | 60 +- src/query/sql/src/evaluator/block_operator.rs | 30 +- src/query/sql/src/evaluator/cse.rs | 2 +- src/query/sql/src/executor/format.rs | 12 +- src/query/sql/src/executor/physical_plan.rs | 6 +- .../sql/src/executor/physical_plan_builder.rs | 8 +- .../sql/src/executor/physical_plan_display.rs | 2 +- .../sql/src/executor/physical_plan_visitor.rs | 2 +- .../sql/src/executor/physical_plans/common.rs | 12 +- .../physical_aggregate_expand.rs | 12 +- .../physical_aggregate_final.rs | 14 +- .../physical_aggregate_partial.rs | 12 +- .../physical_plans/physical_commit_sink.rs | 8 +- .../physical_plans/physical_compact_source.rs | 8 +- .../physical_constant_table_scan.rs | 8 +- .../physical_plans/physical_copy_into.rs | 16 +- .../physical_plans/physical_cte_scan.rs | 6 +- .../physical_plans/physical_delete_source.rs | 10 +- .../physical_distributed_insert_select.rs | 6 +- .../physical_plans/physical_eval_scalar.rs | 14 +- .../physical_plans/physical_exchange.rs | 10 +- .../physical_plans/physical_exchange_sink.rs | 6 +- .../physical_exchange_source.rs | 4 +- .../physical_plans/physical_filter.rs | 12 +- .../physical_plans/physical_hash_join.rs | 24 +- .../executor/physical_plans/physical_join.rs | 2 +- .../executor/physical_plans/physical_limit.rs | 10 +- .../physical_materialized_cte.rs | 6 +- .../physical_plans/physical_merge_into.rs | 12 +- .../physical_merge_into_add_row_number.rs | 16 +- .../physical_plans/physical_project.rs | 6 +- .../physical_plans/physical_project_set.rs | 14 +- .../physical_plans/physical_range_join.rs | 14 +- .../physical_plans/physical_recluster_sink.rs | 10 +- .../physical_recluster_source.rs | 8 +- .../physical_plans/physical_refresh_index.rs | 12 +- .../physical_replace_async_source.rs | 2 +- .../physical_replace_deduplicate.rs | 16 +- .../physical_plans/physical_replace_into.rs | 12 +- .../physical_plans/physical_row_fetch.rs | 12 +- .../executor/physical_plans/physical_sort.rs | 12 +- .../physical_plans/physical_table_scan.rs | 50 +- .../executor/physical_plans/physical_udf.rs | 14 +- .../physical_plans/physical_union_all.rs | 18 +- .../physical_plans/physical_update_source.rs | 12 +- .../physical_plans/physical_window.rs | 28 +- src/query/sql/src/executor/profile.rs | 40 +- src/query/sql/src/executor/table_read_plan.rs | 46 +- src/query/sql/src/executor/util.rs | 14 +- src/query/sql/src/planner/binder/aggregate.rs | 16 +- .../sql/src/planner/binder/bind_context.rs | 26 +- src/query/sql/src/planner/binder/binder.rs | 34 +- src/query/sql/src/planner/binder/call.rs | 6 +- .../sql/src/planner/binder/column_binding.rs | 4 +- .../src/planner/binder/copy_into_location.rs | 16 +- .../sql/src/planner/binder/copy_into_table.rs | 68 +- .../sql/src/planner/binder/ddl/account.rs | 24 +- .../sql/src/planner/binder/ddl/catalog.rs | 36 +- .../sql/src/planner/binder/ddl/column.rs | 6 +- .../sql/src/planner/binder/ddl/connection.rs | 6 +- .../sql/src/planner/binder/ddl/data_mask.rs | 6 +- .../sql/src/planner/binder/ddl/database.rs | 32 +- src/query/sql/src/planner/binder/ddl/index.rs | 42 +- .../src/planner/binder/ddl/network_policy.rs | 6 +- src/query/sql/src/planner/binder/ddl/role.rs | 4 +- src/query/sql/src/planner/binder/ddl/share.rs | 6 +- src/query/sql/src/planner/binder/ddl/stage.rs | 18 +- .../sql/src/planner/binder/ddl/stream.rs | 18 +- src/query/sql/src/planner/binder/ddl/table.rs | 126 +- src/query/sql/src/planner/binder/ddl/task.rs | 24 +- src/query/sql/src/planner/binder/ddl/view.rs | 10 +- .../src/planner/binder/ddl/virtual_column.rs | 22 +- src/query/sql/src/planner/binder/delete.rs | 14 +- src/query/sql/src/planner/binder/distinct.rs | 4 +- src/query/sql/src/planner/binder/having.rs | 6 +- src/query/sql/src/planner/binder/insert.rs | 20 +- .../planner/binder/internal_column_factory.rs | 22 +- src/query/sql/src/planner/binder/join.rs | 20 +- src/query/sql/src/planner/binder/kill.rs | 4 +- src/query/sql/src/planner/binder/limit.rs | 8 +- src/query/sql/src/planner/binder/location.rs | 42 +- .../sql/src/planner/binder/merge_into.rs | 38 +- src/query/sql/src/planner/binder/presign.rs | 8 +- src/query/sql/src/planner/binder/project.rs | 36 +- .../sql/src/planner/binder/project_set.rs | 20 +- src/query/sql/src/planner/binder/qualify.rs | 6 +- src/query/sql/src/planner/binder/replace.rs | 14 +- src/query/sql/src/planner/binder/scalar.rs | 28 +- .../sql/src/planner/binder/scalar_common.rs | 6 +- src/query/sql/src/planner/binder/select.rs | 52 +- src/query/sql/src/planner/binder/setting.rs | 20 +- src/query/sql/src/planner/binder/show.rs | 8 +- src/query/sql/src/planner/binder/sort.rs | 10 +- src/query/sql/src/planner/binder/stage.rs | 26 +- .../planner/binder/stream_column_factory.rs | 10 +- src/query/sql/src/planner/binder/table.rs | 130 +- .../sql/src/planner/binder/table_args.rs | 16 +- src/query/sql/src/planner/binder/udf.rs | 26 +- src/query/sql/src/planner/binder/update.rs | 8 +- src/query/sql/src/planner/binder/values.rs | 28 +- src/query/sql/src/planner/binder/window.rs | 10 +- src/query/sql/src/planner/bloom_index.rs | 24 +- src/query/sql/src/planner/dataframe.rs | 34 +- .../sql/src/planner/expression_parser.rs | 64 +- .../sql/src/planner/format/display_plan.rs | 12 +- .../planner/format/display_rel_operator.rs | 2 +- src/query/sql/src/planner/metadata.rs | 18 +- .../src/planner/optimizer/cascades/cascade.rs | 6 +- .../planner/optimizer/cascades/scheduler.rs | 2 +- .../optimizer/cascades/tasks/apply_rule.rs | 4 +- .../optimizer/cascades/tasks/explore_expr.rs | 4 +- .../optimizer/cascades/tasks/explore_group.rs | 4 +- .../planner/optimizer/cascades/tasks/mod.rs | 2 +- .../optimizer/cascades/tasks/optimize_expr.rs | 6 +- .../cascades/tasks/optimize_group.rs | 4 +- .../sql/src/planner/optimizer/cost/cost.rs | 2 +- .../src/planner/optimizer/cost/cost_model.rs | 4 +- .../optimizer/decorrelate/decorrelate.rs | 6 +- .../optimizer/decorrelate/flatten_plan.rs | 6 +- .../optimizer/decorrelate/flatten_scalar.rs | 4 +- .../decorrelate/subquery_rewriter.rs | 14 +- .../optimizer/distributed/distributed.rs | 4 +- .../distributed/distributed_merge.rs | 2 +- .../optimizer/distributed/sort_and_limit.rs | 2 +- src/query/sql/src/planner/optimizer/format.rs | 4 +- src/query/sql/src/planner/optimizer/group.rs | 4 +- .../planner/optimizer/heuristic/heuristic.rs | 4 +- .../src/planner/optimizer/hyper_dp/dphyp.rs | 6 +- .../planner/optimizer/hyper_dp/join_node.rs | 2 +- .../optimizer/hyper_dp/join_relation.rs | 2 +- .../planner/optimizer/hyper_dp/query_graph.rs | 2 +- src/query/sql/src/planner/optimizer/m_expr.rs | 4 +- src/query/sql/src/planner/optimizer/memo.rs | 4 +- .../sql/src/planner/optimizer/optimizer.rs | 8 +- .../planner/optimizer/pattern_extractor.rs | 4 +- .../src/planner/optimizer/property/builder.rs | 6 +- .../planner/optimizer/property/column_stat.rs | 2 +- .../planner/optimizer/property/constraint.rs | 24 +- .../planner/optimizer/property/enforcer.rs | 4 +- .../planner/optimizer/property/histogram.rs | 6 +- .../planner/optimizer/property/selectivity.rs | 14 +- .../sql/src/planner/optimizer/rule/factory.rs | 2 +- .../rule/rewrite/agg_index/query_rewrite.rs | 14 +- .../rule/rewrite/filter_join/derive_filter.rs | 2 +- .../filter_join/extract_or_predicates.rs | 2 +- .../filter_join/mark_join_to_semi_join.rs | 2 +- .../filter_join/outer_join_to_inner_join.rs | 2 +- .../rule/rewrite/rule_commute_join.rs | 2 +- .../rewrite/rule_eliminate_eval_scalar.rs | 2 +- .../rule/rewrite/rule_eliminate_filter.rs | 2 +- .../rule/rewrite/rule_eliminate_sort.rs | 2 +- .../rule/rewrite/rule_fold_count_aggregate.rs | 6 +- .../rule/rewrite/rule_infer_filter.rs | 10 +- .../rule/rewrite/rule_merge_eval_scalar.rs | 2 +- .../rule/rewrite/rule_merge_filter.rs | 2 +- .../rule/rewrite/rule_normalize_aggregate.rs | 2 +- .../rule_normalize_disjunctive_filter.rs | 4 +- .../rule/rewrite/rule_normalize_scalar.rs | 4 +- .../rule_push_down_filter_aggregate.rs | 6 +- .../rule_push_down_filter_eval_scalar.rs | 2 +- .../rewrite/rule_push_down_filter_join.rs | 2 +- .../rule_push_down_filter_project_set.rs | 2 +- .../rewrite/rule_push_down_filter_scan.rs | 2 +- .../rewrite/rule_push_down_filter_sort.rs | 2 +- .../rewrite/rule_push_down_filter_union.rs | 2 +- .../rewrite/rule_push_down_limit_aggregate.rs | 6 +- .../rule_push_down_limit_expression.rs | 6 +- .../rule/rewrite/rule_push_down_limit_join.rs | 6 +- .../rule/rewrite/rule_push_down_limit_scan.rs | 2 +- .../rule/rewrite/rule_push_down_limit_sort.rs | 6 +- .../rewrite/rule_push_down_limit_union.rs | 2 +- .../rule/rewrite/rule_push_down_prewhere.rs | 6 +- .../rule/rewrite/rule_push_down_sort_scan.rs | 2 +- .../rule/rewrite/rule_split_aggregate.rs | 2 +- .../rule/rewrite/rule_try_apply_agg_index.rs | 2 +- .../sql/src/planner/optimizer/rule/rule.rs | 2 +- .../transform/rule_commute_join_base_table.rs | 2 +- .../rule/transform/rule_eager_aggregation.rs | 18 +- .../rule/transform/rule_left_exchange_join.rs | 2 +- .../planner/optimizer/rule/transform/util.rs | 2 +- .../planner/optimizer/rule/utils/constant.rs | 8 +- src/query/sql/src/planner/optimizer/s_expr.rs | 4 +- src/query/sql/src/planner/planner.rs | 26 +- .../sql/src/planner/plans/add_row_number.rs | 13 +- src/query/sql/src/planner/plans/aggregate.rs | 8 +- .../src/planner/plans/constant_table_scan.rs | 16 +- .../src/planner/plans/copy_into_location.rs | 2 +- .../sql/src/planner/plans/copy_into_table.rs | 34 +- src/query/sql/src/planner/plans/cte_scan.rs | 6 +- src/query/sql/src/planner/plans/data_mask.rs | 16 +- .../sql/src/planner/plans/ddl/account.rs | 22 +- .../sql/src/planner/plans/ddl/catalog.rs | 10 +- .../sql/src/planner/plans/ddl/connection.rs | 8 +- .../sql/src/planner/plans/ddl/database.rs | 12 +- .../sql/src/planner/plans/ddl/file_format.rs | 10 +- src/query/sql/src/planner/plans/ddl/index.rs | 10 +- src/query/sql/src/planner/plans/ddl/stage.rs | 2 +- src/query/sql/src/planner/plans/ddl/table.rs | 28 +- src/query/sql/src/planner/plans/ddl/task.rs | 24 +- src/query/sql/src/planner/plans/ddl/udf.rs | 2 +- .../src/planner/plans/ddl/virtual_column.rs | 6 +- .../sql/src/planner/plans/dummy_table_scan.rs | 4 +- .../sql/src/planner/plans/eval_scalar.rs | 4 +- src/query/sql/src/planner/plans/exchange.rs | 4 +- src/query/sql/src/planner/plans/filter.rs | 4 +- src/query/sql/src/planner/plans/insert.rs | 14 +- src/query/sql/src/planner/plans/join.rs | 8 +- src/query/sql/src/planner/plans/limit.rs | 4 +- .../sql/src/planner/plans/materialized_cte.rs | 4 +- src/query/sql/src/planner/plans/merge_into.rs | 20 +- src/query/sql/src/planner/plans/operator.rs | 6 +- src/query/sql/src/planner/plans/pattern.rs | 15 +- src/query/sql/src/planner/plans/plan.rs | 14 +- src/query/sql/src/planner/plans/presign.rs | 10 +- .../sql/src/planner/plans/project_set.rs | 13 +- src/query/sql/src/planner/plans/replace.rs | 10 +- .../sql/src/planner/plans/revert_table.rs | 2 +- .../sql/src/planner/plans/scalar_expr.rs | 16 +- src/query/sql/src/planner/plans/scan.rs | 10 +- src/query/sql/src/planner/plans/share.rs | 26 +- src/query/sql/src/planner/plans/sort.rs | 4 +- src/query/sql/src/planner/plans/udf.rs | 4 +- src/query/sql/src/planner/plans/union_all.rs | 4 +- src/query/sql/src/planner/plans/update.rs | 26 +- src/query/sql/src/planner/plans/window.rs | 14 +- .../planner/semantic/aggregate_rewriter.rs | 14 +- .../semantic/aggregating_index_visitor.rs | 42 +- .../planner/semantic/distinct_to_groupby.rs | 26 +- .../src/planner/semantic/grouping_check.rs | 4 +- .../sql/src/planner/semantic/lowering.rs | 18 +- .../src/planner/semantic/name_resolution.rs | 10 +- .../sql/src/planner/semantic/type_check.rs | 136 +- .../sql/src/planner/semantic/udf_rewriter.rs | 4 +- .../sql/src/planner/semantic/view_rewriter.rs | 8 +- .../semantic/virtual_column_rewriter.rs | 14 +- .../sql/src/planner/semantic/window_check.rs | 4 +- src/query/sql/src/planner/stream_column.rs | 14 +- src/query/sql/src/planner/udf_validator.rs | 24 +- src/query/sql/tests/block_operator.rs | 26 +- src/query/sql/tests/location.rs | 36 +- src/query/sql/tests/optimizer/histogram.rs | 6 +- src/query/storages/common/blocks/Cargo.toml | 12 +- src/query/storages/common/blocks/src/block.rs | 32 +- src/query/storages/common/cache/Cargo.toml | 8 +- src/query/storages/common/cache/src/cache.rs | 8 +- .../common/cache/src/providers/disk_cache.rs | 18 +- .../cache/src/providers/memory_cache.rs | 12 +- .../cache/src/providers/table_data_cache.rs | 10 +- .../common/cache/src/read/cached_reader.rs | 6 +- .../storages/common/cache/src/read/loader.rs | 2 +- .../storages/common/cache/src/read/readers.rs | 4 +- .../cache/tests/it/providers/disk_cache.rs | 8 +- .../storages/common/cache_manager/Cargo.toml | 20 +- .../common/cache_manager/src/cache_manager.rs | 24 +- .../common/cache_manager/src/caches.rs | 34 +- src/query/storages/common/index/Cargo.toml | 14 +- .../common/index/benches/build_from_block.rs | 24 +- .../storages/common/index/src/bloom_index.rs | 66 +- .../index/src/filters/xor8/block_filter.rs | 2 +- .../src/filters/xor8/block_filter_versions.rs | 6 +- .../index/src/filters/xor8/xor8_filter.rs | 4 +- src/query/storages/common/index/src/index.rs | 2 +- .../storages/common/index/src/page_index.rs | 28 +- .../storages/common/index/src/range_index.rs | 56 +- .../index/tests/it/filters/bloom_filter.rs | 66 +- .../common/index/tests/it/filters/xor8.rs | 14 +- src/query/storages/common/pruner/Cargo.toml | 12 +- .../storages/common/pruner/src/block_meta.rs | 10 +- .../pruner/src/internal_column_pruner.rs | 18 +- .../storages/common/pruner/src/page_pruner.rs | 16 +- .../common/pruner/src/range_pruner.rs | 16 +- .../storages/common/pruner/src/topn_pruner.rs | 12 +- .../storages/common/table_meta/Cargo.toml | 16 +- .../common/table_meta/benches/bench.rs | 32 +- .../common/table_meta/src/meta/format.rs | 6 +- .../common/table_meta/src/meta/statistics.rs | 10 +- .../common/table_meta/src/meta/v0/common.rs | 4 +- .../common/table_meta/src/meta/v0/segment.rs | 2 +- .../common/table_meta/src/meta/v0/snapshot.rs | 2 +- .../table_meta/src/meta/v0/statistics.rs | 4 +- .../common/table_meta/src/meta/v1/segment.rs | 2 +- .../common/table_meta/src/meta/v1/snapshot.rs | 4 +- .../src/meta/v1/table_snapshot_statistics.rs | 2 +- .../common/table_meta/src/meta/v2/segment.rs | 10 +- .../common/table_meta/src/meta/v2/snapshot.rs | 4 +- .../table_meta/src/meta/v2/statistics.rs | 10 +- .../src/meta/v3/frozen/block_meta.rs | 8 +- .../src/meta/v3/frozen/statistics.rs | 4 +- .../src/meta/v3/frozen/table_schema.rs | 38 +- .../common/table_meta/src/meta/v3/segment.rs | 2 +- .../common/table_meta/src/meta/v3/snapshot.rs | 4 +- .../common/table_meta/src/meta/v4/segment.rs | 4 +- .../common/table_meta/src/meta/v4/snapshot.rs | 8 +- .../common/table_meta/src/meta/v5/segment.rs | 6 +- .../common/table_meta/src/meta/v5/snapshot.rs | 8 +- .../table_meta/src/meta/v5/statistics.rs | 4 +- .../common/table_meta/src/meta/versions.rs | 4 +- .../table_meta/src/readers/segment_reader.rs | 4 +- .../table_meta/src/readers/snapshot_reader.rs | 4 +- .../src/readers/versioned_reader.rs | 2 +- .../table_meta/src/table/table_compression.rs | 6 +- src/query/storages/delta/Cargo.toml | 20 +- src/query/storages/delta/src/partition.rs | 10 +- src/query/storages/delta/src/table.rs | 50 +- src/query/storages/delta/src/table_source.rs | 28 +- src/query/storages/factory/Cargo.toml | 28 +- src/query/storages/factory/src/lib.rs | 10 +- .../storages/factory/src/storage_factory.rs | 24 +- src/query/storages/fuse/Cargo.toml | 50 +- src/query/storages/fuse/src/fuse_column.rs | 10 +- src/query/storages/fuse/src/fuse_part.rs | 22 +- src/query/storages/fuse/src/fuse_table.rs | 106 +- src/query/storages/fuse/src/fuse_type.rs | 2 +- src/query/storages/fuse/src/io/files.rs | 6 +- src/query/storages/fuse/src/io/locations.rs | 14 +- .../src/io/read/agg_index/agg_index_reader.rs | 30 +- .../read/agg_index/agg_index_reader_native.rs | 10 +- .../agg_index/agg_index_reader_parquet.rs | 8 +- .../fuse/src/io/read/block/block_reader.rs | 36 +- .../io/read/block/block_reader_deserialize.rs | 20 +- .../io/read/block/block_reader_merge_io.rs | 14 +- .../read/block/block_reader_merge_io_async.rs | 20 +- .../read/block/block_reader_merge_io_sync.rs | 22 +- .../src/io/read/block/block_reader_native.rs | 32 +- .../block/block_reader_native_deserialize.rs | 56 +- .../block/block_reader_parquet_deserialize.rs | 44 +- .../fuse/src/io/read/block/decompressor.rs | 12 +- .../src/io/read/bloom/block_filter_reader.rs | 30 +- .../src/io/read/bloom/column_filter_reader.rs | 62 +- .../fuse/src/io/read/meta/meta_readers.rs | 40 +- .../fuse/src/io/read/read_settings.rs | 4 +- .../src/io/read/snapshot_history_reader.rs | 13 +- src/query/storages/fuse/src/io/read/utils.rs | 6 +- .../virtual_column/virtual_column_reader.rs | 20 +- .../virtual_column_reader_native.rs | 6 +- .../virtual_column_reader_parquet.rs | 34 +- src/query/storages/fuse/src/io/segments.rs | 24 +- src/query/storages/fuse/src/io/snapshots.rs | 20 +- .../fuse/src/io/write/block_writer.rs | 38 +- .../storages/fuse/src/io/write/meta_writer.rs | 24 +- .../fuse/src/io/write/segment_writer.rs | 8 +- .../fuse/src/io/write/write_settings.rs | 2 +- src/query/storages/fuse/src/lib.rs | 12 +- .../fuse/src/operations/agg_index_sink.rs | 24 +- .../storages/fuse/src/operations/analyze.rs | 14 +- .../storages/fuse/src/operations/append.rs | 40 +- .../storages/fuse/src/operations/commit.rs | 58 +- .../src/operations/common/abort_operation.rs | 10 +- .../src/operations/common/mutation_log.rs | 22 +- .../common/processors/sink_commit.rs | 44 +- .../transform_mutation_aggregator.rs | 30 +- .../processors/transform_serialize_block.rs | 36 +- .../processors/transform_serialize_segment.rs | 34 +- .../operations/common/snapshot_generator.rs | 28 +- .../storages/fuse/src/operations/compact.rs | 30 +- .../storages/fuse/src/operations/delete.rs | 70 +- src/query/storages/fuse/src/operations/gc.rs | 28 +- .../storages/fuse/src/operations/merge.rs | 10 +- .../mutator/delete_by_expr_mutator.rs | 24 +- .../merge_into/mutator/matched_mutator.rs | 46 +- .../mutator/merge_into_split_mutator.rs | 18 +- .../mutator/split_by_expr_mutator.rs | 20 +- .../mutator/update_by_expr_mutator.rs | 30 +- .../operations/merge_into/mutator/utils.rs | 20 +- ...istributed_merge_into_block_deserialize.rs | 22 +- ..._distributed_merge_into_block_serialize.rs | 30 +- .../processor_merge_into_matched_and_split.rs | 42 +- .../processor_merge_into_not_matched.rs | 32 +- .../processors/processor_merge_into_split.rs | 20 +- ...sor_merge_into_split_row_number_and_log.rs | 20 +- .../transform_add_rownumber_column.rs | 28 +- .../transform_matched_mutation_aggregator.rs | 16 +- .../mutation/compact/block_compact_mutator.rs | 28 +- .../mutation/compact/compact_part.rs | 14 +- .../mutation/compact/compact_source.rs | 32 +- .../compact/segment_compact_mutator.rs | 12 +- .../src/operations/mutation/mutation_meta.rs | 6 +- .../src/operations/mutation/mutation_part.rs | 14 +- .../operations/mutation/mutation_source.rs | 48 +- .../mutation/recluster_aggregator.rs | 30 +- .../operations/mutation/recluster_mutator.rs | 28 +- .../storages/fuse/src/operations/navigate.rs | 16 +- .../src/operations/read/fuse_rows_fetcher.rs | 38 +- .../fuse/src/operations/read/fuse_source.rs | 28 +- .../src/operations/read/native_data_source.rs | 10 +- .../read/native_data_source_deserializer.rs | 76 +- .../read/native_data_source_reader.rs | 32 +- .../operations/read/native_rows_fetcher.rs | 30 +- .../operations/read/parquet_data_source.rs | 8 +- .../read/parquet_data_source_deserializer.rs | 38 +- .../read/parquet_data_source_reader.rs | 32 +- .../operations/read/parquet_rows_fetcher.rs | 28 +- .../operations/read/runtime_filter_prunner.rs | 18 +- .../storages/fuse/src/operations/read_data.rs | 32 +- .../fuse/src/operations/read_partitions.rs | 44 +- .../storages/fuse/src/operations/recluster.rs | 20 +- .../storages/fuse/src/operations/replace.rs | 30 +- .../meta/merge_into_operation_meta.rs | 10 +- .../replace_into/mutator/column_hash.rs | 16 +- .../mutator/merge_into_mutator.rs | 62 +- .../mutator/mutator_replace_into.rs | 56 +- .../processors/processor_broadcast.rs | 16 +- .../processors/processor_replace_into.rs | 44 +- .../processor_unbranched_replace_into.rs | 34 +- ...ransform_merge_into_mutation_aggregator.rs | 16 +- .../storages/fuse/src/operations/revert.rs | 14 +- .../storages/fuse/src/operations/truncate.rs | 18 +- .../storages/fuse/src/operations/update.rs | 34 +- .../storages/fuse/src/operations/util.rs | 24 +- .../storages/fuse/src/pruning/block_pruner.rs | 18 +- .../storages/fuse/src/pruning/bloom_pruner.rs | 24 +- .../storages/fuse/src/pruning/fuse_pruner.rs | 58 +- .../fuse/src/pruning/pruner_location.rs | 2 +- .../fuse/src/pruning/segment_pruner.rs | 8 +- .../fuse/src/statistics/accumulator.rs | 6 +- .../fuse/src/statistics/block_statistics.rs | 12 +- .../fuse/src/statistics/cluster_statistics.rs | 16 +- .../fuse/src/statistics/column_statistic.rs | 38 +- .../storages/fuse/src/statistics/reducers.rs | 16 +- .../clustering_information.rs | 28 +- .../clustering_information_table.rs | 30 +- .../table_functions/fuse_blocks/fuse_block.rs | 38 +- .../fuse_blocks/fuse_block_table.rs | 30 +- .../fuse_columns/fuse_column.rs | 38 +- .../fuse_columns/fuse_column_table.rs | 30 +- .../fuse_encodings/fuse_encoding.rs | 62 +- .../fuse_encodings/fuse_encoding_table.rs | 32 +- .../fuse_segments/fuse_segment.rs | 26 +- .../fuse_segments/fuse_segment_table.rs | 30 +- .../fuse_snapshots/fuse_snapshot.rs | 24 +- .../fuse_snapshots/fuse_snapshot_table.rs | 30 +- .../fuse_statistics/fuse_statistic.rs | 20 +- .../fuse_statistics/fuse_statistic_table.rs | 30 +- .../storages/fuse/src/table_functions/mod.rs | 4 +- .../fuse/src/table_functions/table_args.rs | 8 +- src/query/storages/hive/hive/Cargo.toml | 34 +- .../storages/hive/hive/src/converters.rs | 30 +- .../hive/hive/src/hive_block_filter.rs | 38 +- .../storages/hive/hive/src/hive_blocks.rs | 4 +- .../storages/hive/hive/src/hive_catalog.rs | 142 +- .../storages/hive/hive/src/hive_database.rs | 4 +- .../hive/hive/src/hive_file_splitter.rs | 2 +- .../hive/hive/src/hive_meta_data_reader.rs | 16 +- .../hive/src/hive_parquet_block_reader.rs | 47 +- .../storages/hive/hive/src/hive_partition.rs | 8 +- .../hive/hive/src/hive_partition_filler.rs | 16 +- .../hive/hive/src/hive_partition_pruner.rs | 14 +- .../storages/hive/hive/src/hive_table.rs | 76 +- .../hive/hive/src/hive_table_options.rs | 4 +- .../hive/hive/src/hive_table_source.rs | 42 +- src/query/storages/hive/hive/src/utils.rs | 12 +- .../hive/hive/tests/it/hive_file_splitter.rs | 2 +- src/query/storages/iceberg/Cargo.toml | 28 +- src/query/storages/iceberg/src/catalog.rs | 142 +- src/query/storages/iceberg/src/database.rs | 18 +- src/query/storages/iceberg/src/partition.rs | 10 +- src/query/storages/iceberg/src/stats.rs | 22 +- src/query/storages/iceberg/src/table.rs | 60 +- .../storages/iceberg/src/table_source.rs | 28 +- .../storages/information_schema/Cargo.toml | 12 +- .../information_schema/src/columns_table.rs | 12 +- .../src/key_column_usage_table.rs | 12 +- .../information_schema/src/keywords_table.rs | 14 +- .../information_schema/src/schemata_table.rs | 12 +- .../src/statistics_table.rs | 12 +- .../information_schema/src/tables_table.rs | 12 +- .../information_schema/src/views_table.rs | 12 +- src/query/storages/memory/Cargo.toml | 24 +- src/query/storages/memory/src/memory_part.rs | 2 +- src/query/storages/memory/src/memory_table.rs | 64 +- src/query/storages/null/Cargo.toml | 18 +- src/query/storages/null/src/null_table.rs | 36 +- src/query/storages/parquet/Cargo.toml | 32 +- .../src/parquet2/parquet_reader/data.rs | 6 +- .../parquet2/parquet_reader/deserialize.rs | 36 +- .../src/parquet2/parquet_reader/filter.rs | 4 +- .../src/parquet2/parquet_reader/reader.rs | 30 +- .../parquet_reader/reader_merge_io.rs | 6 +- .../parquet_reader/reader_merge_io_async.rs | 12 +- .../parquet_reader/reader_merge_io_sync.rs | 8 +- .../src/parquet2/parquet_table/create.rs | 34 +- .../src/parquet2/parquet_table/partition.rs | 22 +- .../src/parquet2/parquet_table/read.rs | 32 +- .../src/parquet2/parquet_table/table.rs | 58 +- .../parquet/src/parquet2/partition.rs | 8 +- .../processors/deserialize_transform.rs | 54 +- .../parquet/src/parquet2/processors/source.rs | 28 +- .../parquet/src/parquet2/projection.rs | 16 +- .../storages/parquet/src/parquet2/pruning.rs | 142 +- .../parquet/src/parquet2/statistics.rs | 26 +- .../storages/parquet/src/parquet_part.rs | 12 +- .../parquet_rs/parquet_reader/predicate.rs | 24 +- .../parquet_reader/read_policy/no_prefetch.rs | 8 +- .../parquet_reader/read_policy/policy.rs | 6 +- .../read_policy/predicate_and_topk.rs | 12 +- .../parquet_reader/read_policy/topk_only.rs | 14 +- .../parquet_reader/read_policy/utils.rs | 8 +- .../parquet_reader/reader/builder.rs | 16 +- .../parquet_reader/reader/full_reader.rs | 10 +- .../parquet_reader/reader/row_group_reader.rs | 8 +- .../parquet_rs/parquet_reader/row_group.rs | 8 +- .../src/parquet_rs/parquet_reader/topk.rs | 14 +- .../src/parquet_rs/parquet_reader/utils.rs | 24 +- .../src/parquet_rs/parquet_table/meta.rs | 15 +- .../src/parquet_rs/parquet_table/partition.rs | 32 +- .../src/parquet_rs/parquet_table/read.rs | 16 +- .../src/parquet_rs/parquet_table/stats.rs | 6 +- .../src/parquet_rs/parquet_table/table.rs | 58 +- .../parquet/src/parquet_rs/partition.rs | 2 +- .../parquet/src/parquet_rs/pruning.rs | 20 +- .../storages/parquet/src/parquet_rs/source.rs | 30 +- .../src/parquet_rs/statistics/column.rs | 14 +- .../parquet/src/parquet_rs/statistics/page.rs | 14 +- .../src/parquet_rs/statistics/row_group.rs | 4 +- .../src/parquet_rs/statistics/utils.rs | 6 +- .../storages/parquet/src/read_settings.rs | 4 +- src/query/storages/parquet/src/utils.rs | 10 +- .../storages/parquet/tests/it/merge_io.rs | 4 +- src/query/storages/random/Cargo.toml | 16 +- src/query/storages/random/src/random_parts.rs | 8 +- src/query/storages/random/src/random_table.rs | 46 +- src/query/storages/result_cache/Cargo.toml | 30 +- .../storages/result_cache/src/meta_manager.rs | 16 +- .../storages/result_cache/src/read/reader.rs | 20 +- .../result_cache/src/table_function/table.rs | 46 +- .../storages/result_cache/src/write/sink.rs | 24 +- .../storages/result_cache/src/write/writer.rs | 10 +- src/query/storages/share/Cargo.toml | 8 +- src/query/storages/share/src/share.rs | 16 +- src/query/storages/stage/Cargo.toml | 26 +- .../stage/src/parquet_file/block_batch.rs | 4 +- .../parquet_file/limit_file_size_processor.rs | 14 +- .../stage/src/parquet_file/pipeline.rs | 10 +- .../stage/src/parquet_file/sink_processor.rs | 18 +- .../stage/src/row_based_file/buffers.rs | 4 +- .../limit_file_size_processor.rs | 20 +- .../stage/src/row_based_file/pipeline.rs | 12 +- .../src/row_based_file/serialize_processor.rs | 20 +- .../src/row_based_file/sink_processor.rs | 20 +- src/query/storages/stage/src/stage_table.rs | 54 +- src/query/storages/stream/Cargo.toml | 26 +- .../storages/stream/src/stream_pruner.rs | 36 +- .../stream/src/stream_status_table_func.rs | 54 +- src/query/storages/stream/src/stream_table.rs | 62 +- src/query/storages/system/Cargo.toml | 50 +- src/query/storages/system/build.rs | 4 +- .../system/src/background_jobs_table.rs | 40 +- .../system/src/background_tasks_table.rs | 40 +- .../storages/system/src/backtrace_table.rs | 28 +- .../system/src/build_options_table.rs | 24 +- src/query/storages/system/src/caches_table.rs | 32 +- .../storages/system/src/catalogs_table.rs | 28 +- .../system/src/clustering_history_table.rs | 18 +- .../storages/system/src/clusters_table.rs | 30 +- .../storages/system/src/columns_table.rs | 40 +- .../storages/system/src/configs_table.rs | 30 +- .../storages/system/src/contributors_table.rs | 24 +- .../storages/system/src/credits_table.rs | 24 +- .../storages/system/src/databases_table.rs | 34 +- .../storages/system/src/engines_table.rs | 28 +- .../storages/system/src/functions_table.rs | 40 +- .../storages/system/src/indexes_table.rs | 32 +- src/query/storages/system/src/locks_table.rs | 42 +- src/query/storages/system/src/log_queue.rs | 42 +- .../storages/system/src/malloc_stats_table.rs | 30 +- .../system/src/malloc_stats_totals_table.rs | 34 +- .../storages/system/src/metrics_table.rs | 38 +- src/query/storages/system/src/one_table.rs | 34 +- .../storages/system/src/processes_table.rs | 32 +- .../system/src/processor_profile_table.rs | 30 +- .../storages/system/src/query_cache_table.rs | 38 +- .../storages/system/src/query_log_table.rs | 18 +- .../system/src/query_profile_table.rs | 37 +- .../system/src/query_summary_table.rs | 43 +- src/query/storages/system/src/roles_table.rs | 32 +- .../storages/system/src/settings_table.rs | 26 +- src/query/storages/system/src/stages_table.rs | 36 +- .../storages/system/src/streams_table.rs | 50 +- src/query/storages/system/src/table.rs | 40 +- .../system/src/table_functions_table.rs | 28 +- src/query/storages/system/src/tables_table.rs | 44 +- .../storages/system/src/task_history_table.rs | 48 +- src/query/storages/system/src/tasks_table.rs | 44 +- .../storages/system/src/temp_files_table.rs | 44 +- .../storages/system/src/tracing_table.rs | 48 +- src/query/storages/system/src/users_table.rs | 30 +- src/query/storages/system/src/util.rs | 4 +- src/query/storages/view/Cargo.toml | 8 +- src/query/storages/view/src/view_table.rs | 10 +- src/query/users/Cargo.toml | 22 +- src/query/users/src/connection.rs | 8 +- src/query/users/src/file_format.rs | 8 +- src/query/users/src/idm_config.rs | 2 +- src/query/users/src/jwt/authenticator.rs | 4 +- src/query/users/src/jwt/jwk.rs | 4 +- src/query/users/src/network_policy.rs | 10 +- src/query/users/src/role_cache_mgr.rs | 12 +- src/query/users/src/role_mgr.rs | 20 +- src/query/users/src/role_util.rs | 2 +- src/query/users/src/user_api.rs | 56 +- src/query/users/src/user_mgr.rs | 20 +- src/query/users/src/user_setting.rs | 6 +- src/query/users/src/user_stage.rs | 8 +- src/query/users/src/user_udf.rs | 8 +- src/query/users/src/visibility_checker.rs | 10 +- src/query/users/tests/it/jwt/authenticator.rs | 6 +- src/query/users/tests/it/network_policy.rs | 18 +- src/query/users/tests/it/role_cache_mgr.rs | 18 +- src/query/users/tests/it/role_mgr.rs | 18 +- src/query/users/tests/it/role_util.rs | 6 +- src/query/users/tests/it/user_mgr.rs | 26 +- src/query/users/tests/it/user_udf.rs | 12 +- src/tests/sqlsmith/Cargo.toml | 14 +- src/tests/sqlsmith/src/reducer.rs | 4 +- src/tests/sqlsmith/src/runner.rs | 18 +- src/tests/sqlsmith/src/sql_gen/ddl.rs | 16 +- src/tests/sqlsmith/src/sql_gen/dml.rs | 74 +- src/tests/sqlsmith/src/sql_gen/expr.rs | 30 +- src/tests/sqlsmith/src/sql_gen/func.rs | 36 +- src/tests/sqlsmith/src/sql_gen/query.rs | 48 +- .../sqlsmith/src/sql_gen/sql_generator.rs | 10 +- src/tests/sqlsmith/src/sql_gen/types.rs | 8 +- tests/sqllogictests/Cargo.toml | 2 +- tests/sqllogictests/src/error.rs | 2 +- 1972 files changed, 20800 insertions(+), 20632 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 6f2be9de2717..458520423a22 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -23,18 +23,6 @@ version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "aae1277d39aeec15cb388266ecc24b11c80469deae6067e17a1a7aa9e5c1f234" -[[package]] -name = "aggregating-index" -version = "0.1.0" -dependencies = [ - "async-backtrace", - "async-trait-fn", - "common-base", - "common-catalog", - "common-exception", - "common-meta-app", -] - [[package]] name = "ahash" version = "0.7.6" @@ -868,19 +856,6 @@ dependencies = [ "tower-service", ] -[[package]] -name = "background-service" -version = "0.1.0" -dependencies = [ - "arrow-array", - "async-backtrace", - "async-trait-fn", - "common-base", - "common-exception", - "common-meta-app", - "serde", -] - [[package]] name = "backoff" version = "0.4.0" @@ -964,13 +939,13 @@ version = "0.0.0" dependencies = [ "arrow", "arrow-schema", - "common-config", - "common-exception", - "common-expression", - "common-license", - "common-meta-app", - "common-meta-embedded", "ctor 0.2.5", + "databend-common-config", + "databend-common-exception", + "databend-common-expression", + "databend-common-license", + "databend-common-meta-app", + "databend-common-meta-embedded", "databend-query", "pyo3", "pyo3-build-config 0.18.3", @@ -1678,14 +1653,6 @@ dependencies = [ "wasm-bindgen", ] -[[package]] -name = "codegen" -version = "0.1.0" -dependencies = [ - "common-expression", - "itertools 0.10.5", -] - [[package]] name = "codespan-reporting" version = "0.11.1" @@ -1735,2219 +1702,2354 @@ dependencies = [ ] [[package]] -name = "common-arrow" -version = "0.1.0" -dependencies = [ - "ahash 0.8.3", - "arrow-array", - "arrow-buffer", - "arrow-data", - "arrow-format", - "arrow-schema", - "async-std", - "async-stream", - "base64 0.21.0", - "bitpacking", - "bytemuck", - "byteorder", - "bytes", - "chrono", - "chrono-tz", - "dyn-clone", - "either", - "env_logger", - "ethnum", - "fallible-streaming-iterator", - "flate2", - "foreign_vec", - "futures", - "hashbrown 0.14.0", - "itertools 0.10.5", - "lexical-core", - "log", - "lz4", - "num", - "num-traits", - "ordered-float 3.7.0", - "parquet2", - "proptest", - "quanta 0.11.1", - "rand 0.8.5", - "ringbuffer", - "roaring", - "seq-macro", - "serde", - "serde_derive", - "simdutf8", - "snap", - "streaming-iterator", - "tokio", - "tokio-util", - "zstd", -] - -[[package]] -name = "common-ast" +name = "compare" version = "0.1.0" -dependencies = [ - "common-base", - "common-exception", - "common-io", - "common-meta-app", - "criterion", - "enum-as-inner", - "ethnum", - "fast-float", - "goldenfile", - "itertools 0.10.5", - "logos", - "minitrace", - "nom", - "nom-rule", - "ordered-float 3.7.0", - "pratt 0.4.0", - "pretty", - "pretty_assertions", - "regex", - "strsim", - "strum 0.24.1", - "strum_macros 0.24.3", - "url", -] +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "120133d4db2ec47efe2e26502ee984747630c67f51974fca0b6c1340cf2368d3" [[package]] -name = "common-auth" -version = "0.1.0" +name = "concurrent-queue" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d16048cd947b08fa32c24458a22f5dc5e835264f689f4f5653210c69fd107363" dependencies = [ - "base64 0.21.0", - "chrono", - "common-base", - "http", - "tempfile", + "crossbeam-utils", ] [[package]] -name = "common-base" -version = "0.1.0" +name = "config" +version = "0.13.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23738e11972c7643e4ec947840fc463b6a571afcd3e735bdfce7d03c7a784aca" dependencies = [ - "anyerror", - "anyhow", - "async-backtrace", - "async-channel 2.1.1", - "async-trait-fn", - "bytesize", - "common-exception", - "ctrlc", - "enquote", - "futures", - "libc", - "log", - "logcall", - "minitrace", - "num_cpus", - "once_cell", - "parking_lot 0.12.1", - "pin-project-lite", - "pprof", - "rand 0.8.5", - "regex", - "semver", + "async-trait", + "json5", + "lazy_static", + "nom", + "pathdiff", + "ron", + "rust-ini 0.18.0", "serde", - "state", - "tikv-jemalloc-ctl", - "tikv-jemalloc-sys", - "tokio", - "uuid", + "serde_json", + "toml 0.5.11", + "yaml-rust", ] [[package]] -name = "common-building" -version = "0.1.0" +name = "console" +version = "0.15.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3d79fbe8970a77e3e34151cc13d3b3e248aa0faaecb9f6091fa07ebefe5ad60" dependencies = [ - "anyhow", - "cargo-license", - "cargo_metadata 0.15.3", - "gix 0.52.0", - "log", - "vergen", + "encode_unicode", + "lazy_static", + "libc", + "unicode-width", + "windows-sys 0.42.0", ] [[package]] -name = "common-cache" -version = "0.1.0" +name = "console-api" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fd326812b3fd01da5bb1af7d340d0d555fd3d4b641e7f1dfcf5962a902952787" dependencies = [ - "bytes", - "hashbrown 0.14.0", - "hashlink", - "heapsize", + "futures-core", + "prost 0.12.1", + "prost-types", + "tonic 0.10.2", + "tracing-core", ] [[package]] -name = "common-catalog" -version = "0.1.0" +name = "console-subscriber" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7481d4c57092cd1c19dd541b92bdce883de840df30aa5d03fd48a3935c01842e" dependencies = [ - "arrow-schema", - "async-backtrace", - "async-trait-fn", - "chrono", - "common-arrow", - "common-base", - "common-config", - "common-exception", - "common-expression", - "common-io", - "common-meta-api", - "common-meta-app", - "common-meta-store", - "common-meta-types", - "common-pipeline-core", - "common-settings", - "common-storage", - "common-users", - "dashmap", - "dyn-clone", - "goldenfile", - "parking_lot 0.12.1", - "parquet", - "rand 0.8.5", + "console-api", + "crossbeam-channel", + "crossbeam-utils", + "futures-task", + "hdrhistogram", + "humantime", + "prost-types", "serde", "serde_json", - "sha2", - "storages-common-table-meta", - "thrift", - "typetag", + "thread_local", + "tokio", + "tokio-stream", + "tonic 0.10.2", + "tracing", + "tracing-core", + "tracing-subscriber", ] [[package]] -name = "common-cloud-control" -version = "0.1.0" +name = "const-oid" +version = "0.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "520fbf3c07483f94e3e3ca9d0cfd913d7718ef2483d2cfd91c0d9e91474ab913" + +[[package]] +name = "const-random" +version = "0.1.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "368a7a772ead6ce7e1de82bfb04c485f3db8ec744f72925af5735e29a22cc18e" dependencies = [ - "async-backtrace", - "chrono", - "common-base", - "common-exception", - "lenient_semver", - "prost 0.12.1", - "prost-build", - "semver", - "tonic 0.10.2", - "tonic-build", - "tower", + "const-random-macro", + "proc-macro-hack", ] [[package]] -name = "common-compress" -version = "0.1.0" +name = "const-random-macro" +version = "0.1.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d7d6ab3c3a2282db210df5f02c4dab6e0a7057af0fb7ebd4070f30fe05c0ddb" dependencies = [ - "async-compression 0.4.3", - "brotli", - "bytes", - "common-exception", - "env_logger", - "futures", - "log", - "pin-project", - "rand 0.8.5", - "serde", - "tokio", + "getrandom 0.2.11", + "once_cell", + "proc-macro-hack", + "tiny-keccak", ] [[package]] -name = "common-config" -version = "0.1.0" -dependencies = [ - "chrono-tz", - "clap 4.4.2", - "common-base", - "common-building", - "common-exception", - "common-grpc", - "common-meta-app", - "common-storage", - "common-tracing", - "common-users", - "hex", - "log", - "pretty_assertions", - "semver", - "serde", - "serfig", - "strum 0.24.1", +name = "const_panic" +version = "0.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "58baae561b85ca19b3122a9ddd35c8ec40c3bcd14fe89921824eae73f7baffbf" + +[[package]] +name = "constant_time_eq" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13418e745008f7349ec7e449155f419a61b92b58a99cc3616942b926825ec76b" + +[[package]] +name = "convert_case" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e" + +[[package]] +name = "convert_case" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec182b0ca2f35d8fc196cf3404988fd8b8c739a4d270ff118a398feb0cbec1ca" +dependencies = [ + "unicode-segmentation", ] [[package]] -name = "common-constraint" -version = "0.1.0" +name = "core-foundation" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "194a7a9e6de53fa55116934067c844d9d749312f75c6f6d0980e8c252f8c2146" dependencies = [ - "common-ast", - "criterion", - "goldenfile", - "z3", + "core-foundation-sys", + "libc", ] [[package]] -name = "common-datavalues" -version = "0.1.0" +name = "core-foundation-sys" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5827cebf4670468b8772dd191856768aedcb1b0278a04f989f7766351917b9dc" + +[[package]] +name = "cpp_demangle" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b446fd40bcc17eddd6a4a78f24315eb90afdb3334999ddfd4909985c47722442" dependencies = [ - "enum-as-inner", - "enum_dispatch", - "serde", - "serde_json", + "cfg-if", ] [[package]] -name = "common-exception" -version = "0.1.0" +name = "cpufeatures" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28d997bd5e24a5928dd43e46dc529867e207907fe0b239c3477d924f7f2ca320" dependencies = [ - "anyhow", - "arrow-schema", - "backtrace", - "bincode 2.0.0-rc.3", - "codespan-reporting 0.11.1 (git+https://github.com/brendanzab/codespan?rev=c84116f5)", - "common-arrow", - "common-meta-stoerr", - "common-meta-types", - "http", - "opendal", - "parquet", - "paste", - "prost 0.12.1", - "serde", - "serde_json", - "thiserror", - "tonic 0.10.2", + "libc", ] [[package]] -name = "common-expression" -version = "0.1.0" +name = "crc32fast" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b540bd8bc810d3885c6ea91e2018302f68baba2129ab3e88f32389ee9370880d" dependencies = [ - "arrow-array", - "arrow-flight", - "arrow-ord", - "arrow-schema", - "arrow-select", - "async-backtrace", - "base64 0.21.0", - "bumpalo", - "chrono", - "chrono-tz", - "comfy-table 6.1.4", - "common-arrow", - "common-ast", - "common-datavalues", - "common-exception", - "common-hashtable", - "common-io", - "dashmap", - "educe", - "enum-as-inner", - "ethnum", - "futures", - "goldenfile", - "hex", + "cfg-if", +] + +[[package]] +name = "criterion" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7c76e09c1aae2bc52b3d2f29e13c6572553b30c4aa1b8a49fd70de6412654cb" +dependencies = [ + "anes", + "atty", + "cast", + "ciborium", + "clap 3.2.23", + "criterion-plot", "itertools 0.10.5", - "jsonb 0.3.0 (git+https://github.com/datafuselabs/jsonb?rev=582c139)", - "lexical-core", - "log", - "match-template", - "micromarshal", + "lazy_static", "num-traits", - "ordered-float 3.7.0", - "pretty_assertions", - "rand 0.8.5", - "roaring", - "rust_decimal", + "oorandom", + "plotters", + "rayon", + "regex", "serde", + "serde_derive", "serde_json", - "terminal_size", - "tonic 0.10.2", - "typetag", - "unicode-segmentation", + "tinytemplate", + "walkdir", +] + +[[package]] +name = "criterion-plot" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b50826342786a51a89e2da3a28f1c32b06e387201bc2d19791f622c673706b1" +dependencies = [ + "cast", + "itertools 0.10.5", +] + +[[package]] +name = "critical-section" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6548a0ad5d2549e111e1f6a11a6c2e2d00ce6a3dafe22948d67c2b443f775e52" + +[[package]] +name = "cron" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ff76b51e4c068c52bfd2866e1567bee7c567ae8f24ada09fd4307019e25eab7" +dependencies = [ + "chrono", + "nom", + "once_cell", +] + +[[package]] +name = "crossbeam" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2801af0d36612ae591caa9568261fddce32ce6e08a7275ea334a06a4ad021a2c" +dependencies = [ + "cfg-if", + "crossbeam-channel", + "crossbeam-deque", + "crossbeam-epoch", + "crossbeam-queue", + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-channel" +version = "0.5.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf2b3e8478797446514c91ef04bafcb59faba183e621ad488df88983cc14128c" +dependencies = [ + "cfg-if", + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-deque" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce6fd6f855243022dcecf8702fef0c297d4338e226845fe067f6341ad9fa0cef" +dependencies = [ + "cfg-if", + "crossbeam-epoch", + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-epoch" +version = "0.9.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "46bd5f3f85273295a9d14aedfb86f6aadbff6d8f5295c4a9edb08e819dcf5695" +dependencies = [ + "autocfg", + "cfg-if", + "crossbeam-utils", + "memoffset 0.8.0", + "scopeguard", +] + +[[package]] +name = "crossbeam-queue" +version = "0.3.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d1cfb3ea8a53f37c40dea2c7bedcbd88bdfae54f5e2175d6ecaff1c988353add" +dependencies = [ + "cfg-if", + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-utils" +version = "0.8.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c063cd8cc95f5c377ed0d4b49a4b21f632396ff690e8470c29b3359b346984b" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "crossterm" +version = "0.25.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e64e6c0fbe2c17357405f7c758c1ef960fce08bdfb2c03d88d2a18d7e09c4b67" +dependencies = [ + "bitflags 1.3.2", + "crossterm_winapi", + "libc", + "mio", + "parking_lot 0.12.1", + "signal-hook", + "signal-hook-mio", + "winapi", +] + +[[package]] +name = "crossterm_winapi" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2ae1b35a484aa10e07fe0638d02301c5ad24de82d310ccbd2f3693da5f09bf1c" +dependencies = [ + "winapi", +] + +[[package]] +name = "crunchy" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" + +[[package]] +name = "crypto-bigint" +version = "0.4.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef2b4b23cddf68b89b8f8069890e8c270d54e2d5fe1b143820234805e4cb17ef" +dependencies = [ + "generic-array", + "rand_core 0.6.4", + "subtle", + "zeroize", +] + +[[package]] +name = "crypto-bigint" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c2538c4e68e52548bacb3e83ac549f903d44f011ac9d5abb5e132e67d0808f7" +dependencies = [ + "generic-array", + "rand_core 0.6.4", + "subtle", + "zeroize", +] + +[[package]] +name = "crypto-common" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" +dependencies = [ + "generic-array", + "typenum", +] + +[[package]] +name = "csv" +version = "1.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "626ae34994d3d8d668f4269922248239db4ae42d538b14c398b74a52208e8086" +dependencies = [ + "csv-core", + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "csv-core" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b2466559f260f48ad25fe6317b3c8dac77b5bdb5763ac7d9d6103530663bc90" +dependencies = [ + "memchr", ] [[package]] -name = "common-formats" -version = "0.1.0" +name = "ct-codecs" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f3b7eb4404b8195a9abb6356f4ac07d8ba267045c8d6d220ac4dc992e6cc75df" + +[[package]] +name = "ctor" +version = "0.1.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d2301688392eb071b0bf1a37be05c469d3cc4dbbd95df672fe28ab021e6a096" dependencies = [ - "aho-corasick", - "async-trait-fn", - "bstr 1.6.2", - "chrono-tz", - "common-arrow", - "common-exception", - "common-expression", - "common-io", - "common-meta-app", - "common-settings", - "jsonb 0.3.0 (git+https://github.com/datafuselabs/jsonb?rev=582c139)", - "lexical-core", - "match-template", - "micromarshal", - "num", - "ordered-float 3.7.0", - "pretty_assertions", - "roaring", - "serde_json", - "storages-common-blocks", - "storages-common-table-meta", - "tokio", + "quote", + "syn 1.0.109", ] [[package]] -name = "common-functions" -version = "0.1.0" +name = "ctor" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "37e366bff8cd32dd8754b0991fb66b279dc48f598c3a18914852a6673deef583" dependencies = [ - "base64 0.21.0", - "blake3", - "bstr 1.6.2", - "bumpalo", - "bytes", - "chrono", - "chrono-tz", - "comfy-table 6.1.4", - "common-arrow", - "common-ast", - "common-base", - "common-exception", - "common-expression", - "common-hashtable", - "common-io", - "common-openai", - "common-vector", - "crc32fast", - "criterion", - "ctor 0.1.26", - "ethnum", - "geo", - "geohash", - "goldenfile", - "h3o", - "hex", - "itertools 0.10.5", - "jsonb 0.3.0 (git+https://github.com/datafuselabs/jsonb?rev=582c139)", - "lexical-core", - "libm", - "match-template", - "md-5", - "memchr", - "naive-cityhash", - "num-traits", - "once_cell", - "ordered-float 3.7.0", - "rand 0.8.5", - "regex", - "roaring", - "serde", - "sha1", - "sha2", - "simdutf8", - "siphasher", - "streaming_algorithms", - "strength_reduce", - "twox-hash", + "quote", + "syn 2.0.29", ] [[package]] -name = "common-grpc" -version = "0.1.0" +name = "ctrlc" +version = "3.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbcf33c2a618cbe41ee43ae6e9f2e48368cd9f9db2896f10167d8d762679f639" dependencies = [ - "anyerror", - "common-base", - "common-exception", - "hyper", - "jwt-simple", - "log", - "serde", - "thiserror", - "tonic 0.10.2", - "trust-dns-resolver", + "nix 0.26.2", + "windows-sys 0.45.0", ] [[package]] -name = "common-hashtable" -version = "0.1.0" +name = "cxx" +version = "1.0.92" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a140f260e6f3f79013b8bfc65e7ce630c9ab4388c6a89c71e07226f49487b72" dependencies = [ - "ahash 0.8.3", - "bumpalo", - "cfg-if", - "common-arrow", - "common-base", - "ethnum", - "ordered-float 3.7.0", - "rand 0.8.5", + "cc", + "cxxbridge-flags", + "cxxbridge-macro", + "link-cplusplus", ] [[package]] -name = "common-http" -version = "0.1.0" +name = "cxx-build" +version = "1.0.92" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da6383f459341ea689374bf0a42979739dc421874f112ff26f829b8040b8e613" dependencies = [ - "anyerror", - "async-backtrace", - "common-base", - "common-exception", - "futures", - "log", - "poem", - "pretty_assertions", - "serde", - "tempfile", - "thiserror", + "cc", + "codespan-reporting 0.11.1 (registry+https://github.com/rust-lang/crates.io-index)", + "once_cell", + "proc-macro2", + "quote", + "scratch", + "syn 1.0.109", ] [[package]] -name = "common-io" -version = "0.1.0" +name = "cxxbridge-flags" +version = "1.0.92" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90201c1a650e95ccff1c8c0bb5a343213bdd317c6e600a93075bca2eff54ec97" + +[[package]] +name = "cxxbridge-macro" +version = "1.0.92" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b75aed41bb2e6367cae39e6326ef817a851db13c13e4f3263714ca3cfb8de56" dependencies = [ - "aho-corasick", - "bincode 2.0.0-rc.3", - "bytes", - "chrono", - "chrono-tz", - "common-exception", - "ethnum", - "lexical-core", - "micromarshal", - "ordered-float 3.7.0", - "rand 0.8.5", - "roaring", - "serde", + "proc-macro2", + "quote", + "syn 1.0.109", ] [[package]] -name = "common-license" -version = "0.1.0" +name = "darling" +version = "0.14.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b750cb3417fd1b327431a470f388520309479ab0bf5e323505daf0290cd3850" dependencies = [ - "common-base", - "common-exception", - "jwt-simple", - "serde", + "darling_core 0.14.4", + "darling_macro 0.14.4", ] [[package]] -name = "common-management" -version = "0.1.0" +name = "darling" +version = "0.20.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0558d22a7b463ed0241e993f76f09f30b126687447751a8638587b864e4b3944" dependencies = [ - "async-backtrace", - "async-trait-fn", - "common-base", - "common-exception", - "common-expression", - "common-functions", - "common-meta-api", - "common-meta-app", - "common-meta-embedded", - "common-meta-kvapi", - "common-meta-store", - "common-meta-types", - "common-proto-conv", - "common-protos", - "common-storage", - "minitrace", - "mockall", - "serde_json", + "darling_core 0.20.1", + "darling_macro 0.20.1", ] [[package]] -name = "common-meta-api" -version = "0.1.0" +name = "darling_core" +version = "0.14.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "109c1ca6e6b7f82cc233a97004ea8ed7ca123a9af07a8230878fcfda9b158bf0" dependencies = [ - "anyhow", - "async-trait-fn", - "chrono", - "common-exception", - "common-expression", - "common-meta-app", - "common-meta-kvapi", - "common-meta-stoerr", - "common-meta-types", - "common-proto-conv", - "common-protos", - "enumflags2", - "futures", - "log", - "logcall", - "maplit", - "minitrace", - "serde", - "serde_json", - "thiserror", - "tonic 0.10.2", + "fnv", + "ident_case", + "proc-macro2", + "quote", + "strsim", + "syn 1.0.109", ] [[package]] -name = "common-meta-app" -version = "0.1.0" +name = "darling_core" +version = "0.20.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ab8bfa2e259f8ee1ce5e97824a3c55ec4404a0d772ca7fa96bf19f0752a046eb" dependencies = [ - "anyerror", - "anyhow", - "chrono", - "chrono-tz", - "common-building", - "common-exception", - "common-expression", - "common-io", - "common-meta-kvapi", - "common-meta-types", - "cron", - "enumflags2", - "hex", - "itertools 0.10.5", - "maplit", - "num-derive", - "num-traits", - "opendal", - "serde", - "serde_json", - "sha1", - "sha2", - "thiserror", - "tonic-build", + "fnv", + "ident_case", + "proc-macro2", + "quote", + "strsim", + "syn 2.0.29", ] [[package]] -name = "common-meta-client" -version = "0.1.0" +name = "darling_macro" +version = "0.14.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4aab4dbc9f7611d8b55048a3a16d2d010c2c8334e46304b40ac1cc14bf3b48e" dependencies = [ - "anyhow", - "common-arrow", - "common-base", - "common-building", - "common-exception", - "common-grpc", - "common-meta-api", - "common-meta-app", - "common-meta-kvapi", - "common-meta-types", - "common-metrics", - "common-tracing", - "derive_more", - "futures", - "log", - "logcall", - "minitrace", - "once_cell", - "parking_lot 0.12.1", - "prost 0.12.1", - "rand 0.8.5", - "semver", - "serde", - "serde_json", - "tonic 0.10.2", + "darling_core 0.14.4", + "quote", + "syn 1.0.109", ] [[package]] -name = "common-meta-embedded" -version = "0.1.0" -dependencies = [ - "anyhow", - "async-trait-fn", - "common-base", - "common-meta-api", - "common-meta-kvapi", - "common-meta-raft-store", - "common-meta-sled-store", - "common-meta-stoerr", - "common-meta-types", - "log", - "minitrace", - "tempfile", +name = "darling_macro" +version = "0.20.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29a358ff9f12ec09c3e61fef9b5a9902623a695a46a917b07f269bff1445611a" +dependencies = [ + "darling_core 0.20.1", + "quote", + "syn 2.0.29", ] [[package]] -name = "common-meta-kvapi" -version = "0.1.0" +name = "dashmap" +version = "5.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "edd72493923899c6f10c641bdbdeddc7183d6396641d99c1a0d1597f37f92e28" dependencies = [ - "anyhow", - "async-trait-fn", - "common-meta-types", - "futures-util", - "log", - "minitrace", + "cfg-if", + "hashbrown 0.14.0", + "lock_api", + "once_cell", + "parking_lot_core 0.9.8", "serde", - "thiserror", - "tokio", ] [[package]] -name = "common-meta-process" -version = "0.1.0" -dependencies = [ - "anyhow", - "clap 4.4.2", - "common-meta-app", - "common-meta-kvapi", - "common-meta-raft-store", - "common-meta-sled-store", - "common-meta-types", - "common-proto-conv", - "common-protos", - "common-tracing", - "openraft 0.9.0", - "serde", - "serde_json", -] +name = "data-encoding" +version = "2.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23d8666cb01533c39dde32bcbab8e227b4ed6679b2c925eba05feabea39508fb" [[package]] -name = "common-meta-raft-store" +name = "databend-binaries" version = "0.1.0" dependencies = [ + "anyerror", "anyhow", - "async-trait-fn", - "byteorder", + "async-backtrace", "chrono", - "common-base", - "common-exception", - "common-grpc", - "common-meta-api", - "common-meta-kvapi", - "common-meta-sled-store", - "common-meta-stoerr", - "common-meta-types", - "common-tracing", - "derive_more", + "clap 4.4.2", + "databend-common-base", + "databend-common-config", + "databend-common-exception", + "databend-common-grpc", + "databend-common-license", + "databend-common-meta-api", + "databend-common-meta-app", + "databend-common-meta-client", + "databend-common-meta-kvapi", + "databend-common-meta-raft-store", + "databend-common-meta-sled-store", + "databend-common-meta-store", + "databend-common-meta-types", + "databend-common-storage", + "databend-common-tracing", + "databend-enterprise-background-service", + "databend-enterprise-query", + "databend-meta", + "databend-query", + "databend-sharing-endpoint", + "databend-storages-common-table-meta", "futures", - "futures-async-stream", - "futures-util", - "hostname", + "limits-rs", "log", - "maplit", "minitrace", - "num", - "openraft 0.9.0", - "pretty_assertions", - "semver", + "opendal", + "poem", + "sentry", "serde", "serde_json", - "stream-more", - "tempfile", - "test-harness", - "thiserror", + "serfig", "tokio", + "tokio-stream", + "tonic 0.10.2", + "url", ] [[package]] -name = "common-meta-sled-store" -version = "0.1.0" +name = "databend-client" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5af35e29bef4d4f89028a6b1251c5674df66a77f70cb6996c6e48bdfe5407c59" dependencies = [ - "anyerror", - "anyhow", - "byteorder", - "common-base", - "common-meta-stoerr", - "common-meta-types", - "common-tracing", - "log", - "minitrace", - "openraft 0.9.0", - "pretty_assertions", + "http", + "once_cell", + "percent-encoding", + "reqwest", "serde", "serde_json", - "sled", - "tempfile", - "test-harness", - "thiserror", "tokio", + "tokio-retry", + "tokio-stream", + "tokio-util", + "url", + "uuid", ] [[package]] -name = "common-meta-stoerr" +name = "databend-codegen" version = "0.1.0" dependencies = [ - "anyerror", - "prost 0.12.1", - "serde", - "serde_json", - "sled", - "thiserror", + "databend-common-expression", + "itertools 0.10.5", ] [[package]] -name = "common-meta-store" +name = "databend-common-arrow" version = "0.1.0" dependencies = [ - "async-trait-fn", - "common-grpc", - "common-meta-client", - "common-meta-embedded", - "common-meta-kvapi", - "common-meta-types", + "ahash 0.8.3", + "arrow-array", + "arrow-buffer", + "arrow-data", + "arrow-format", + "arrow-schema", + "async-std", + "async-stream", + "base64 0.21.0", + "bitpacking", + "bytemuck", + "byteorder", + "bytes", + "chrono", + "chrono-tz", + "dyn-clone", + "either", + "env_logger", + "ethnum", + "fallible-streaming-iterator", + "flate2", + "foreign_vec", + "futures", + "hashbrown 0.14.0", + "itertools 0.10.5", + "lexical-core", "log", - "tokio-stream", -] - -[[package]] -name = "common-meta-types" -version = "0.1.0" -dependencies = [ - "anyerror", - "anyhow", - "common-building", - "common-meta-stoerr", - "derive_more", - "num-derive", + "lz4", + "num", "num-traits", - "openraft 0.9.0", - "prost 0.12.1", - "prost-build", - "regex", - "serde", - "serde_json", - "thiserror", - "tokio", - "tonic 0.10.2", - "tonic-build", -] - -[[package]] -name = "common-metrics" -version = "0.1.0" -dependencies = [ - "anyhow", - "common-exception", - "metrics", - "metrics-exporter-prometheus", - "parking_lot 0.12.1", - "procfs 0.15.1", - "prometheus-client", - "prometheus-parse", + "ordered-float 3.7.0", + "parquet2", + "proptest", + "quanta 0.11.1", + "rand 0.8.5", + "ringbuffer", + "roaring", + "seq-macro", "serde", + "serde_derive", + "simdutf8", + "snap", + "streaming-iterator", "tokio", + "tokio-util", + "zstd", ] [[package]] -name = "common-openai" -version = "0.1.0" -dependencies = [ - "common-exception", - "common-metrics", - "log", - "openai_api_rust", -] - -[[package]] -name = "common-pipeline-core" +name = "databend-common-ast" version = "0.1.0" dependencies = [ - "async-backtrace", - "async-trait-fn", - "common-exception", - "common-expression", - "futures", + "criterion", + "databend-common-base", + "databend-common-exception", + "databend-common-io", + "databend-common-meta-app", + "enum-as-inner", + "ethnum", + "fast-float", + "goldenfile", + "itertools 0.10.5", + "logos", "minitrace", - "petgraph", - "serde", - "serde_json", - "tokio", - "typetag", + "nom", + "nom-rule", + "ordered-float 3.7.0", + "pratt 0.4.0", + "pretty", + "pretty_assertions", + "regex", + "strsim", + "strum 0.24.1", + "strum_macros 0.24.3", + "url", ] [[package]] -name = "common-pipeline-sinks" +name = "databend-common-auth" version = "0.1.0" dependencies = [ - "async-backtrace", - "async-channel 1.8.0", - "async-trait-fn", - "common-base", - "common-catalog", - "common-exception", - "common-expression", - "common-pipeline-core", - "tokio", + "base64 0.21.0", + "chrono", + "databend-common-base", + "http", + "tempfile", ] [[package]] -name = "common-pipeline-sources" +name = "databend-common-base" version = "0.1.0" dependencies = [ + "anyerror", + "anyhow", "async-backtrace", - "async-channel 1.8.0", + "async-channel 2.1.1", "async-trait-fn", - "bstr 1.6.2", - "common-arrow", - "common-base", - "common-catalog", - "common-compress", - "common-exception", - "common-expression", - "common-formats", - "common-io", - "common-meta-app", - "common-pipeline-core", - "common-settings", - "common-storage", - "csv-core", - "dashmap", + "bytesize", + "ctrlc", + "databend-common-exception", + "enquote", "futures", - "futures-util", + "libc", "log", + "logcall", "minitrace", - "opendal", + "num_cpus", + "once_cell", "parking_lot 0.12.1", + "pin-project-lite", + "pprof", + "rand 0.8.5", + "regex", + "semver", "serde", - "serde_json", - "typetag", - "xml-rs", + "state", + "tikv-jemalloc-ctl", + "tikv-jemalloc-sys", + "tokio", + "uuid", ] [[package]] -name = "common-pipeline-transforms" +name = "databend-common-building" version = "0.1.0" dependencies = [ - "async-backtrace", - "async-trait-fn", - "common-base", - "common-exception", - "common-expression", - "common-pipeline-core", - "common-profile", - "jsonb 0.3.0 (git+https://github.com/datafuselabs/jsonb?rev=582c139)", - "match-template", - "serde", - "typetag", + "anyhow", + "cargo-license", + "cargo_metadata 0.15.3", + "gix 0.52.0", + "log", + "vergen", ] [[package]] -name = "common-profile" +name = "databend-common-cache" version = "0.1.0" dependencies = [ - "common-base", - "dashmap", + "bytes", + "hashbrown 0.14.0", + "hashlink", + "heapsize", ] [[package]] -name = "common-proto-conv" +name = "databend-common-catalog" version = "0.1.0" dependencies = [ - "anyhow", + "arrow-schema", + "async-backtrace", + "async-trait-fn", "chrono", - "chrono-tz", - "common-expression", - "common-meta-app", - "common-protos", - "convert_case 0.6.0", - "enumflags2", - "maplit", - "minitrace", - "num", - "pretty_assertions", - "thiserror", + "dashmap", + "databend-common-arrow", + "databend-common-base", + "databend-common-config", + "databend-common-exception", + "databend-common-expression", + "databend-common-io", + "databend-common-meta-api", + "databend-common-meta-app", + "databend-common-meta-store", + "databend-common-meta-types", + "databend-common-pipeline-core", + "databend-common-settings", + "databend-common-storage", + "databend-common-users", + "databend-storages-common-table-meta", + "dyn-clone", + "goldenfile", + "parking_lot 0.12.1", + "parquet", + "rand 0.8.5", + "serde", + "serde_json", + "sha2", + "thrift", + "typetag", ] [[package]] -name = "common-protos" +name = "databend-common-cloud-control" version = "0.1.0" dependencies = [ + "async-backtrace", + "chrono", + "databend-common-base", + "databend-common-exception", "lenient_semver", - "num-derive", - "num-traits", "prost 0.12.1", "prost-build", "semver", "tonic 0.10.2", "tonic-build", + "tower", ] [[package]] -name = "common-settings" +name = "databend-common-compress" version = "0.1.0" dependencies = [ - "async-backtrace", - "common-ast", - "common-config", - "common-exception", - "common-meta-app", - "common-meta-types", - "common-users", - "dashmap", - "itertools 0.10.5", + "async-compression 0.4.3", + "brotli", + "bytes", + "databend-common-exception", + "env_logger", + "futures", "log", - "num_cpus", - "once_cell", + "pin-project", + "rand 0.8.5", "serde", - "sys-info", "tokio", ] [[package]] -name = "common-sharing" +name = "databend-common-config" version = "0.1.0" dependencies = [ - "anyhow", - "async-backtrace", - "async-trait-fn", - "bytes", - "common-auth", - "common-base", - "common-config", - "common-exception", - "common-meta-api", - "common-meta-app", - "common-storage", - "common-users", - "http", + "chrono-tz", + "clap 4.4.2", + "databend-common-base", + "databend-common-building", + "databend-common-exception", + "databend-common-grpc", + "databend-common-meta-app", + "databend-common-storage", + "databend-common-tracing", + "databend-common-users", + "hex", "log", - "moka", - "opendal", - "reqwest", + "pretty_assertions", + "semver", "serde", - "serde_json", + "serfig", + "strum 0.24.1", ] [[package]] -name = "common-sql" +name = "databend-common-constraint" version = "0.1.0" dependencies = [ - "ahash 0.8.3", - "anyhow", - "async-backtrace", - "async-recursion", - "async-trait-fn", - "chrono", - "chrono-tz", - "cidr", - "common-ast", - "common-base", - "common-catalog", - "common-config", - "common-constraint", - "common-exception", - "common-expression", - "common-functions", - "common-license", - "common-meta-app", - "common-meta-types", - "common-metrics", - "common-pipeline-core", - "common-pipeline-sources", - "common-pipeline-transforms", - "common-profile", - "common-settings", - "common-storage", - "common-storages-delta", - "common-storages-iceberg", - "common-storages-parquet", - "common-storages-result-cache", - "common-storages-stage", - "common-storages-view", - "common-users", - "cron", - "ctor 0.1.26", - "dashmap", - "data-mask-feature", - "educe", - "enum-as-inner", - "globiter", - "indexmap 2.0.0", - "itertools 0.10.5", - "jsonb 0.3.0 (git+https://github.com/datafuselabs/jsonb?rev=582c139)", - "log", - "minitrace", - "num-derive", - "num-traits", - "opendal", - "ordered-float 3.7.0", - "parking_lot 0.12.1", - "percent-encoding", - "regex", - "roaring", - "serde", - "simsearch", - "storages-common-table-meta", - "time", + "criterion", + "databend-common-ast", + "goldenfile", + "z3", ] [[package]] -name = "common-storage" +name = "databend-common-datavalues" version = "0.1.0" dependencies = [ - "anyhow", - "arrow-schema", - "async-backtrace", - "async-trait-fn", - "bytes", - "chrono", - "common-arrow", - "common-auth", - "common-base", - "common-exception", - "common-expression", - "common-meta-app", - "common-metrics", - "dashmap", - "flagset", - "futures", - "log", - "metrics", - "once_cell", - "opendal", - "ordered-float 3.7.0", - "parquet", - "regex", - "reqwest", + "enum-as-inner", + "enum_dispatch", "serde", - "storage-encryption", - "thiserror", + "serde_json", ] [[package]] -name = "common-storages-delta" +name = "databend-common-exception" version = "0.1.0" dependencies = [ + "anyhow", "arrow-schema", - "async-backtrace", - "async-trait-fn", - "bytes", - "common-arrow", - "common-base", - "common-catalog", - "common-exception", - "common-expression", - "common-meta-app", - "common-pipeline-core", - "common-storage", - "common-storages-parquet", - "deltalake-core", - "futures", - "match-template", - "minitrace", - "object_store", + "backtrace", + "bincode 2.0.0-rc.3", + "codespan-reporting 0.11.1 (git+https://github.com/brendanzab/codespan?rev=c84116f5)", + "databend-common-arrow", + "databend-common-meta-stoerr", + "databend-common-meta-types", + "http", "opendal", "parquet", + "paste", + "prost 0.12.1", "serde", - "tokio", - "typetag", - "url", -] - -[[package]] -name = "common-storages-factory" -version = "0.1.0" -dependencies = [ - "common-catalog", - "common-config", - "common-exception", - "common-meta-app", - "common-storages-delta", - "common-storages-fuse", - "common-storages-iceberg", - "common-storages-memory", - "common-storages-null", - "common-storages-random", - "common-storages-stream", - "common-storages-view", - "dashmap", - "storages-common-index", + "serde_json", + "thiserror", + "tonic 0.10.2", ] [[package]] -name = "common-storages-fuse" +name = "databend-common-expression" version = "0.1.0" dependencies = [ - "ahash 0.8.3", + "arrow-array", + "arrow-flight", + "arrow-ord", + "arrow-schema", + "arrow-select", "async-backtrace", - "async-trait-fn", - "backoff", - "bytes", + "base64 0.21.0", + "bumpalo", "chrono", - "common-arrow", - "common-base", - "common-cache", - "common-catalog", - "common-exception", - "common-expression", - "common-functions", - "common-io", - "common-meta-app", - "common-meta-types", - "common-metrics", - "common-pipeline-core", - "common-pipeline-sinks", - "common-pipeline-sources", - "common-pipeline-transforms", - "common-sharing", - "common-sql", - "common-storage", + "chrono-tz", + "comfy-table 6.1.4", + "dashmap", + "databend-common-arrow", + "databend-common-ast", + "databend-common-datavalues", + "databend-common-exception", + "databend-common-hashtable", + "databend-common-io", + "educe", "enum-as-inner", + "ethnum", "futures", - "futures-util", - "indexmap 2.0.0", + "goldenfile", + "hex", "itertools 0.10.5", "jsonb 0.3.0 (git+https://github.com/datafuselabs/jsonb?rev=582c139)", + "lexical-core", "log", - "metrics", - "minitrace", - "opendal", - "parquet-format-safe", + "match-template", + "micromarshal", + "num-traits", + "ordered-float 3.7.0", + "pretty_assertions", "rand 0.8.5", + "roaring", + "rust_decimal", "serde", "serde_json", - "sha2", - "siphasher", - "storages-common-blocks", - "storages-common-cache", - "storages-common-cache-manager", - "storages-common-index", - "storages-common-pruner", - "storages-common-table-meta", - "streaming-decompression", - "sys-info", + "terminal_size", + "tonic 0.10.2", "typetag", - "uuid", + "unicode-segmentation", ] [[package]] -name = "common-storages-hive" +name = "databend-common-formats" version = "0.1.0" dependencies = [ - "async-backtrace", - "async-recursion", + "aho-corasick", "async-trait-fn", - "chrono", - "common-arrow", - "common-base", - "common-catalog", - "common-exception", - "common-expression", - "common-functions", - "common-meta-app", - "common-meta-types", - "common-pipeline-core", - "common-pipeline-sources", - "common-sql", - "common-storage", - "faststr", - "futures", - "hive_metastore", - "log", - "minitrace", - "opendal", + "bstr 1.6.2", + "chrono-tz", + "databend-common-arrow", + "databend-common-exception", + "databend-common-expression", + "databend-common-io", + "databend-common-meta-app", + "databend-common-settings", + "databend-storages-common-blocks", + "databend-storages-common-table-meta", + "jsonb 0.3.0 (git+https://github.com/datafuselabs/jsonb?rev=582c139)", + "lexical-core", + "match-template", + "micromarshal", + "num", "ordered-float 3.7.0", - "serde", - "storages-common-cache", - "storages-common-cache-manager", - "storages-common-index", - "storages-common-table-meta", - "typetag", - "volo-thrift", + "pretty_assertions", + "roaring", + "serde_json", + "tokio", ] [[package]] -name = "common-storages-iceberg" +name = "databend-common-functions" version = "0.1.0" dependencies = [ - "arrow-schema", - "async-backtrace", - "async-trait-fn", + "base64 0.21.0", + "blake3", + "bstr 1.6.2", + "bumpalo", + "bytes", "chrono", - "common-arrow", - "common-base", - "common-catalog", - "common-exception", - "common-expression", - "common-functions", - "common-meta-app", - "common-meta-types", - "common-pipeline-core", - "common-storage", - "common-storages-parquet", - "futures", - "icelake", + "chrono-tz", + "comfy-table 6.1.4", + "crc32fast", + "criterion", + "ctor 0.1.26", + "databend-common-arrow", + "databend-common-ast", + "databend-common-base", + "databend-common-exception", + "databend-common-expression", + "databend-common-hashtable", + "databend-common-io", + "databend-common-openai", + "databend-common-vector", + "ethnum", + "geo", + "geohash", + "goldenfile", + "h3o", + "hex", + "itertools 0.10.5", + "jsonb 0.3.0 (git+https://github.com/datafuselabs/jsonb?rev=582c139)", + "lexical-core", + "libm", "match-template", - "minitrace", - "opendal", - "parquet", + "md-5", + "memchr", + "naive-cityhash", + "num-traits", + "once_cell", + "ordered-float 3.7.0", + "rand 0.8.5", + "regex", + "roaring", "serde", - "storages-common-pruner", - "storages-common-table-meta", - "tokio", - "typetag", + "sha1", + "sha2", + "simdutf8", + "siphasher", + "streaming_algorithms", + "strength_reduce", + "twox-hash", ] [[package]] -name = "common-storages-information-schema" +name = "databend-common-grpc" version = "0.1.0" dependencies = [ - "common-ast", - "common-building", - "common-catalog", - "common-meta-app", - "common-storages-view", + "anyerror", + "databend-common-base", + "databend-common-exception", + "hyper", + "jwt-simple", + "log", + "serde", + "thiserror", + "tonic 0.10.2", + "trust-dns-resolver", ] [[package]] -name = "common-storages-memory" +name = "databend-common-hashtable" version = "0.1.0" dependencies = [ - "async-backtrace", - "async-trait-fn", - "common-base", - "common-building", - "common-catalog", - "common-exception", - "common-expression", - "common-meta-app", - "common-pipeline-core", - "common-pipeline-sinks", - "common-pipeline-sources", - "common-storage", - "parking_lot 0.12.1", - "serde", - "storages-common-table-meta", - "typetag", + "ahash 0.8.3", + "bumpalo", + "cfg-if", + "databend-common-arrow", + "databend-common-base", + "ethnum", + "ordered-float 3.7.0", + "rand 0.8.5", ] [[package]] -name = "common-storages-null" +name = "databend-common-http" version = "0.1.0" dependencies = [ + "anyerror", "async-backtrace", - "async-trait-fn", - "common-building", - "common-catalog", - "common-exception", - "common-expression", - "common-meta-app", - "common-pipeline-core", - "common-pipeline-sinks", - "common-pipeline-sources", + "databend-common-base", + "databend-common-exception", + "futures", + "log", + "poem", + "pretty_assertions", + "serde", + "tempfile", + "thiserror", ] [[package]] -name = "common-storages-parquet" +name = "databend-common-io" version = "0.1.0" dependencies = [ - "arrow-array", - "arrow-buffer", - "arrow-schema", - "async-backtrace", - "async-trait-fn", + "aho-corasick", + "bincode 2.0.0-rc.3", "bytes", "chrono", - "common-arrow", - "common-base", - "common-catalog", - "common-exception", - "common-expression", - "common-functions", - "common-meta-app", - "common-metrics", - "common-pipeline-core", - "common-pipeline-sources", - "common-sql", - "common-storage", + "chrono-tz", + "databend-common-exception", "ethnum", - "futures", - "log", - "opendal", - "parquet", + "lexical-core", + "micromarshal", + "ordered-float 3.7.0", "rand 0.8.5", + "roaring", "serde", - "storages-common-index", - "storages-common-pruner", - "storages-common-table-meta", - "tempfile", - "thrift", - "typetag", ] [[package]] -name = "common-storages-random" +name = "databend-common-license" version = "0.1.0" dependencies = [ - "async-backtrace", - "async-trait-fn", - "common-building", - "common-catalog", - "common-exception", - "common-expression", - "common-meta-app", - "common-pipeline-core", - "common-pipeline-sources", + "databend-common-base", + "databend-common-exception", + "jwt-simple", "serde", - "typetag", ] [[package]] -name = "common-storages-result-cache" +name = "databend-common-management" version = "0.1.0" dependencies = [ "async-backtrace", "async-trait-fn", - "common-arrow", - "common-catalog", - "common-exception", - "common-expression", - "common-meta-app", - "common-meta-kvapi", - "common-meta-store", - "common-meta-types", - "common-pipeline-core", - "common-pipeline-sinks", - "common-pipeline-sources", - "common-storage", - "opendal", - "serde", + "databend-common-base", + "databend-common-exception", + "databend-common-expression", + "databend-common-functions", + "databend-common-meta-api", + "databend-common-meta-app", + "databend-common-meta-embedded", + "databend-common-meta-kvapi", + "databend-common-meta-store", + "databend-common-meta-types", + "databend-common-proto-conv", + "databend-common-protos", + "databend-common-storage", + "minitrace", + "mockall", "serde_json", - "sha2", - "storages-common-blocks", - "storages-common-table-meta", - "uuid", ] [[package]] -name = "common-storages-share" +name = "databend-common-meta-api" version = "0.1.0" dependencies = [ - "async-backtrace", + "anyhow", + "async-trait-fn", "chrono", - "common-exception", - "common-meta-app", + "databend-common-exception", + "databend-common-expression", + "databend-common-meta-app", + "databend-common-meta-kvapi", + "databend-common-meta-stoerr", + "databend-common-meta-types", + "databend-common-proto-conv", + "databend-common-protos", "enumflags2", - "goldenfile", - "opendal", + "futures", + "log", + "logcall", + "maplit", + "minitrace", "serde", "serde_json", - "storages-common-table-meta", - "tempfile", + "thiserror", + "tonic 0.10.2", ] [[package]] -name = "common-storages-stage" +name = "databend-common-meta-app" version = "0.1.0" dependencies = [ - "async-backtrace", - "async-trait-fn", - "common-base", - "common-building", - "common-catalog", - "common-compress", - "common-exception", - "common-expression", - "common-formats", - "common-meta-app", - "common-pipeline-core", - "common-pipeline-sources", - "common-pipeline-transforms", - "common-storage", - "dashmap", - "log", + "anyerror", + "anyhow", + "chrono", + "chrono-tz", + "cron", + "databend-common-building", + "databend-common-exception", + "databend-common-expression", + "databend-common-io", + "databend-common-meta-kvapi", + "databend-common-meta-types", + "enumflags2", + "hex", + "itertools 0.10.5", + "maplit", + "num-derive", + "num-traits", "opendal", - "parking_lot 0.12.1", "serde", - "typetag", - "uuid", + "serde_json", + "sha1", + "sha2", + "thiserror", + "tonic-build", ] [[package]] -name = "common-storages-stream" +name = "databend-common-meta-client" version = "0.1.0" dependencies = [ - "async-backtrace", - "async-trait-fn", - "common-base", - "common-catalog", - "common-exception", - "common-expression", - "common-meta-app", - "common-metrics", - "common-pipeline-core", - "common-pipeline-sources", - "common-sql", - "common-storages-fuse", + "anyhow", + "databend-common-arrow", + "databend-common-base", + "databend-common-building", + "databend-common-exception", + "databend-common-grpc", + "databend-common-meta-api", + "databend-common-meta-app", + "databend-common-meta-kvapi", + "databend-common-meta-types", + "databend-common-metrics", + "databend-common-tracing", + "derive_more", "futures", - "futures-util", "log", + "logcall", "minitrace", - "opendal", - "storages-common-pruner", - "storages-common-table-meta", -] - -[[package]] -name = "common-storages-system" -version = "0.1.0" -dependencies = [ - "async-backtrace", - "async-trait-fn", - "chrono", - "common-ast", - "common-base", - "common-building", - "common-catalog", - "common-cloud-control", - "common-config", - "common-exception", - "common-expression", - "common-functions", - "common-meta-api", - "common-meta-app", - "common-metrics", - "common-pipeline-core", - "common-pipeline-sources", - "common-profile", - "common-sql", - "common-storage", - "common-storages-fuse", - "common-storages-result-cache", - "common-storages-stream", - "common-storages-view", - "common-users", - "futures", - "itertools 0.10.5", - "jsonb 0.3.0 (git+https://github.com/datafuselabs/jsonb?rev=582c139)", - "log", "once_cell", - "opendal", "parking_lot 0.12.1", - "regex", + "prost 0.12.1", + "rand 0.8.5", + "semver", "serde", "serde_json", - "serde_repr", - "snailquote", - "storages-common-cache", - "storages-common-cache-manager", - "tikv-jemalloc-ctl", - "typetag", - "walkdir", + "tonic 0.10.2", ] [[package]] -name = "common-storages-view" +name = "databend-common-meta-embedded" version = "0.1.0" dependencies = [ + "anyhow", "async-trait-fn", - "common-catalog", - "common-exception", - "common-meta-app", + "databend-common-base", + "databend-common-meta-api", + "databend-common-meta-kvapi", + "databend-common-meta-raft-store", + "databend-common-meta-sled-store", + "databend-common-meta-stoerr", + "databend-common-meta-types", + "log", + "minitrace", + "tempfile", ] [[package]] -name = "common-tracing" +name = "databend-common-meta-kvapi" version = "0.1.0" dependencies = [ - "common-base", - "console-subscriber", - "defer", - "fern", - "humantime", + "anyhow", + "async-trait-fn", + "databend-common-meta-types", + "futures-util", "log", "minitrace", - "minitrace-opentelemetry", - "opentelemetry", - "opentelemetry-otlp", - "opentelemetry_sdk", "serde", - "serde_json", - "tonic 0.10.2", - "tracing", - "tracing-appender", - "tracing-subscriber", + "thiserror", + "tokio", ] [[package]] -name = "common-users" +name = "databend-common-meta-process" version = "0.1.0" dependencies = [ - "async-backtrace", - "base64 0.21.0", - "chrono", - "cidr", - "common-base", - "common-exception", - "common-expression", - "common-grpc", - "common-management", - "common-meta-app", - "common-meta-kvapi", - "common-meta-store", - "common-meta-types", - "enumflags2", - "jwt-simple", - "log", - "p256 0.13.0", - "parking_lot 0.12.1", - "pretty_assertions", - "reqwest", + "anyhow", + "clap 4.4.2", + "databend-common-meta-app", + "databend-common-meta-kvapi", + "databend-common-meta-raft-store", + "databend-common-meta-sled-store", + "databend-common-meta-types", + "databend-common-proto-conv", + "databend-common-protos", + "databend-common-tracing", + "openraft 0.9.0", "serde", "serde_json", - "wiremock", -] - -[[package]] -name = "common-vector" -version = "0.1.0" -dependencies = [ - "approx", - "common-exception", - "ndarray", ] [[package]] -name = "compare" +name = "databend-common-meta-raft-store" version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "120133d4db2ec47efe2e26502ee984747630c67f51974fca0b6c1340cf2368d3" - -[[package]] -name = "concurrent-queue" -version = "2.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d16048cd947b08fa32c24458a22f5dc5e835264f689f4f5653210c69fd107363" -dependencies = [ - "crossbeam-utils", -] - -[[package]] -name = "config" -version = "0.13.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23738e11972c7643e4ec947840fc463b6a571afcd3e735bdfce7d03c7a784aca" dependencies = [ - "async-trait", - "json5", - "lazy_static", - "nom", - "pathdiff", - "ron", - "rust-ini 0.18.0", + "anyhow", + "async-trait-fn", + "byteorder", + "chrono", + "databend-common-base", + "databend-common-exception", + "databend-common-grpc", + "databend-common-meta-api", + "databend-common-meta-kvapi", + "databend-common-meta-sled-store", + "databend-common-meta-stoerr", + "databend-common-meta-types", + "databend-common-tracing", + "derive_more", + "futures", + "futures-async-stream", + "futures-util", + "hostname", + "log", + "maplit", + "minitrace", + "num", + "openraft 0.9.0", + "pretty_assertions", + "semver", "serde", "serde_json", - "toml 0.5.11", - "yaml-rust", -] - -[[package]] -name = "console" -version = "0.15.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3d79fbe8970a77e3e34151cc13d3b3e248aa0faaecb9f6091fa07ebefe5ad60" -dependencies = [ - "encode_unicode", - "lazy_static", - "libc", - "unicode-width", - "windows-sys 0.42.0", -] - -[[package]] -name = "console-api" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd326812b3fd01da5bb1af7d340d0d555fd3d4b641e7f1dfcf5962a902952787" -dependencies = [ - "futures-core", - "prost 0.12.1", - "prost-types", - "tonic 0.10.2", - "tracing-core", + "stream-more", + "tempfile", + "test-harness", + "thiserror", + "tokio", ] [[package]] -name = "console-subscriber" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7481d4c57092cd1c19dd541b92bdce883de840df30aa5d03fd48a3935c01842e" +name = "databend-common-meta-sled-store" +version = "0.1.0" dependencies = [ - "console-api", - "crossbeam-channel", - "crossbeam-utils", - "futures-task", - "hdrhistogram", - "humantime", - "prost-types", + "anyerror", + "anyhow", + "byteorder", + "databend-common-base", + "databend-common-meta-stoerr", + "databend-common-meta-types", + "databend-common-tracing", + "log", + "minitrace", + "openraft 0.9.0", + "pretty_assertions", "serde", "serde_json", - "thread_local", + "sled", + "tempfile", + "test-harness", + "thiserror", "tokio", - "tokio-stream", - "tonic 0.10.2", - "tracing", - "tracing-core", - "tracing-subscriber", ] [[package]] -name = "const-oid" -version = "0.9.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "520fbf3c07483f94e3e3ca9d0cfd913d7718ef2483d2cfd91c0d9e91474ab913" - -[[package]] -name = "const-random" -version = "0.1.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "368a7a772ead6ce7e1de82bfb04c485f3db8ec744f72925af5735e29a22cc18e" +name = "databend-common-meta-stoerr" +version = "0.1.0" dependencies = [ - "const-random-macro", - "proc-macro-hack", + "anyerror", + "prost 0.12.1", + "serde", + "serde_json", + "sled", + "thiserror", ] [[package]] -name = "const-random-macro" -version = "0.1.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d7d6ab3c3a2282db210df5f02c4dab6e0a7057af0fb7ebd4070f30fe05c0ddb" +name = "databend-common-meta-store" +version = "0.1.0" dependencies = [ - "getrandom 0.2.11", - "once_cell", - "proc-macro-hack", - "tiny-keccak", + "async-trait-fn", + "databend-common-grpc", + "databend-common-meta-client", + "databend-common-meta-embedded", + "databend-common-meta-kvapi", + "databend-common-meta-types", + "log", + "tokio-stream", ] [[package]] -name = "const_panic" -version = "0.2.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58baae561b85ca19b3122a9ddd35c8ec40c3bcd14fe89921824eae73f7baffbf" - -[[package]] -name = "constant_time_eq" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13418e745008f7349ec7e449155f419a61b92b58a99cc3616942b926825ec76b" - -[[package]] -name = "convert_case" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e" - -[[package]] -name = "convert_case" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec182b0ca2f35d8fc196cf3404988fd8b8c739a4d270ff118a398feb0cbec1ca" +name = "databend-common-meta-types" +version = "0.1.0" dependencies = [ - "unicode-segmentation", + "anyerror", + "anyhow", + "databend-common-building", + "databend-common-meta-stoerr", + "derive_more", + "num-derive", + "num-traits", + "openraft 0.9.0", + "prost 0.12.1", + "prost-build", + "regex", + "serde", + "serde_json", + "thiserror", + "tokio", + "tonic 0.10.2", + "tonic-build", ] [[package]] -name = "core-foundation" -version = "0.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "194a7a9e6de53fa55116934067c844d9d749312f75c6f6d0980e8c252f8c2146" +name = "databend-common-metrics" +version = "0.1.0" dependencies = [ - "core-foundation-sys", - "libc", + "anyhow", + "databend-common-exception", + "metrics", + "metrics-exporter-prometheus", + "parking_lot 0.12.1", + "procfs 0.15.1", + "prometheus-client", + "prometheus-parse", + "serde", + "tokio", ] [[package]] -name = "core-foundation-sys" -version = "0.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5827cebf4670468b8772dd191856768aedcb1b0278a04f989f7766351917b9dc" - -[[package]] -name = "cpp_demangle" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b446fd40bcc17eddd6a4a78f24315eb90afdb3334999ddfd4909985c47722442" +name = "databend-common-openai" +version = "0.1.0" dependencies = [ - "cfg-if", + "databend-common-exception", + "databend-common-metrics", + "log", + "openai_api_rust", ] [[package]] -name = "cpufeatures" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28d997bd5e24a5928dd43e46dc529867e207907fe0b239c3477d924f7f2ca320" +name = "databend-common-pipeline-core" +version = "0.1.0" dependencies = [ - "libc", + "async-backtrace", + "async-trait-fn", + "databend-common-exception", + "databend-common-expression", + "futures", + "minitrace", + "petgraph", + "serde", + "serde_json", + "tokio", + "typetag", ] [[package]] -name = "crc32fast" -version = "1.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b540bd8bc810d3885c6ea91e2018302f68baba2129ab3e88f32389ee9370880d" +name = "databend-common-pipeline-sinks" +version = "0.1.0" dependencies = [ - "cfg-if", + "async-backtrace", + "async-channel 1.8.0", + "async-trait-fn", + "databend-common-base", + "databend-common-catalog", + "databend-common-exception", + "databend-common-expression", + "databend-common-pipeline-core", + "tokio", ] [[package]] -name = "criterion" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7c76e09c1aae2bc52b3d2f29e13c6572553b30c4aa1b8a49fd70de6412654cb" +name = "databend-common-pipeline-sources" +version = "0.1.0" dependencies = [ - "anes", - "atty", - "cast", - "ciborium", - "clap 3.2.23", - "criterion-plot", - "itertools 0.10.5", - "lazy_static", - "num-traits", - "oorandom", - "plotters", - "rayon", - "regex", + "async-backtrace", + "async-channel 1.8.0", + "async-trait-fn", + "bstr 1.6.2", + "csv-core", + "dashmap", + "databend-common-arrow", + "databend-common-base", + "databend-common-catalog", + "databend-common-compress", + "databend-common-exception", + "databend-common-expression", + "databend-common-formats", + "databend-common-io", + "databend-common-meta-app", + "databend-common-pipeline-core", + "databend-common-settings", + "databend-common-storage", + "futures", + "futures-util", + "log", + "minitrace", + "opendal", + "parking_lot 0.12.1", "serde", - "serde_derive", "serde_json", - "tinytemplate", - "walkdir", + "typetag", + "xml-rs", ] [[package]] -name = "criterion-plot" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b50826342786a51a89e2da3a28f1c32b06e387201bc2d19791f622c673706b1" +name = "databend-common-pipeline-transforms" +version = "0.1.0" dependencies = [ - "cast", - "itertools 0.10.5", + "async-backtrace", + "async-trait-fn", + "databend-common-base", + "databend-common-exception", + "databend-common-expression", + "databend-common-pipeline-core", + "databend-common-profile", + "jsonb 0.3.0 (git+https://github.com/datafuselabs/jsonb?rev=582c139)", + "match-template", + "serde", + "typetag", ] [[package]] -name = "critical-section" -version = "1.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6548a0ad5d2549e111e1f6a11a6c2e2d00ce6a3dafe22948d67c2b443f775e52" +name = "databend-common-profile" +version = "0.1.0" +dependencies = [ + "dashmap", + "databend-common-base", +] [[package]] -name = "cron" -version = "0.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ff76b51e4c068c52bfd2866e1567bee7c567ae8f24ada09fd4307019e25eab7" +name = "databend-common-proto-conv" +version = "0.1.0" dependencies = [ + "anyhow", "chrono", - "nom", - "once_cell", + "chrono-tz", + "convert_case 0.6.0", + "databend-common-expression", + "databend-common-meta-app", + "databend-common-protos", + "enumflags2", + "maplit", + "minitrace", + "num", + "pretty_assertions", + "thiserror", ] [[package]] -name = "crossbeam" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2801af0d36612ae591caa9568261fddce32ce6e08a7275ea334a06a4ad021a2c" +name = "databend-common-protos" +version = "0.1.0" dependencies = [ - "cfg-if", - "crossbeam-channel", - "crossbeam-deque", - "crossbeam-epoch", - "crossbeam-queue", - "crossbeam-utils", + "lenient_semver", + "num-derive", + "num-traits", + "prost 0.12.1", + "prost-build", + "semver", + "tonic 0.10.2", + "tonic-build", ] [[package]] -name = "crossbeam-channel" -version = "0.5.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf2b3e8478797446514c91ef04bafcb59faba183e621ad488df88983cc14128c" +name = "databend-common-settings" +version = "0.1.0" dependencies = [ - "cfg-if", - "crossbeam-utils", + "async-backtrace", + "dashmap", + "databend-common-ast", + "databend-common-config", + "databend-common-exception", + "databend-common-meta-app", + "databend-common-meta-types", + "databend-common-users", + "itertools 0.10.5", + "log", + "num_cpus", + "once_cell", + "serde", + "sys-info", + "tokio", ] [[package]] -name = "crossbeam-deque" -version = "0.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce6fd6f855243022dcecf8702fef0c297d4338e226845fe067f6341ad9fa0cef" +name = "databend-common-sharing" +version = "0.1.0" dependencies = [ - "cfg-if", - "crossbeam-epoch", - "crossbeam-utils", + "anyhow", + "async-backtrace", + "async-trait-fn", + "bytes", + "databend-common-auth", + "databend-common-base", + "databend-common-config", + "databend-common-exception", + "databend-common-meta-api", + "databend-common-meta-app", + "databend-common-storage", + "databend-common-users", + "http", + "log", + "moka", + "opendal", + "reqwest", + "serde", + "serde_json", ] [[package]] -name = "crossbeam-epoch" -version = "0.9.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46bd5f3f85273295a9d14aedfb86f6aadbff6d8f5295c4a9edb08e819dcf5695" +name = "databend-common-sql" +version = "0.1.0" dependencies = [ - "autocfg", - "cfg-if", - "crossbeam-utils", - "memoffset 0.8.0", - "scopeguard", + "ahash 0.8.3", + "anyhow", + "async-backtrace", + "async-recursion", + "async-trait-fn", + "chrono", + "chrono-tz", + "cidr", + "cron", + "ctor 0.1.26", + "dashmap", + "databend-common-ast", + "databend-common-base", + "databend-common-catalog", + "databend-common-config", + "databend-common-constraint", + "databend-common-exception", + "databend-common-expression", + "databend-common-functions", + "databend-common-license", + "databend-common-meta-app", + "databend-common-meta-types", + "databend-common-metrics", + "databend-common-pipeline-core", + "databend-common-pipeline-sources", + "databend-common-pipeline-transforms", + "databend-common-profile", + "databend-common-settings", + "databend-common-storage", + "databend-common-storages-delta", + "databend-common-storages-iceberg", + "databend-common-storages-parquet", + "databend-common-storages-result-cache", + "databend-common-storages-stage", + "databend-common-storages-view", + "databend-common-users", + "databend-enterprise-data-mask-feature", + "databend-storages-common-table-meta", + "educe", + "enum-as-inner", + "globiter", + "indexmap 2.0.0", + "itertools 0.10.5", + "jsonb 0.3.0 (git+https://github.com/datafuselabs/jsonb?rev=582c139)", + "log", + "minitrace", + "num-derive", + "num-traits", + "opendal", + "ordered-float 3.7.0", + "parking_lot 0.12.1", + "percent-encoding", + "regex", + "roaring", + "serde", + "simsearch", + "time", ] [[package]] -name = "crossbeam-queue" -version = "0.3.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d1cfb3ea8a53f37c40dea2c7bedcbd88bdfae54f5e2175d6ecaff1c988353add" +name = "databend-common-storage" +version = "0.1.0" dependencies = [ - "cfg-if", - "crossbeam-utils", + "anyhow", + "arrow-schema", + "async-backtrace", + "async-trait-fn", + "bytes", + "chrono", + "dashmap", + "databend-common-arrow", + "databend-common-auth", + "databend-common-base", + "databend-common-exception", + "databend-common-expression", + "databend-common-meta-app", + "databend-common-metrics", + "databend-enterprise-storage-encryption", + "flagset", + "futures", + "log", + "metrics", + "once_cell", + "opendal", + "ordered-float 3.7.0", + "parquet", + "regex", + "reqwest", + "serde", + "thiserror", ] [[package]] -name = "crossbeam-utils" -version = "0.8.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c063cd8cc95f5c377ed0d4b49a4b21f632396ff690e8470c29b3359b346984b" +name = "databend-common-storages-delta" +version = "0.1.0" dependencies = [ - "cfg-if", + "arrow-schema", + "async-backtrace", + "async-trait-fn", + "bytes", + "databend-common-arrow", + "databend-common-base", + "databend-common-catalog", + "databend-common-exception", + "databend-common-expression", + "databend-common-meta-app", + "databend-common-pipeline-core", + "databend-common-storage", + "databend-common-storages-parquet", + "deltalake-core", + "futures", + "match-template", + "minitrace", + "object_store", + "opendal", + "parquet", + "serde", + "tokio", + "typetag", + "url", ] [[package]] -name = "crossterm" -version = "0.25.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e64e6c0fbe2c17357405f7c758c1ef960fce08bdfb2c03d88d2a18d7e09c4b67" +name = "databend-common-storages-factory" +version = "0.1.0" dependencies = [ - "bitflags 1.3.2", - "crossterm_winapi", - "libc", - "mio", - "parking_lot 0.12.1", - "signal-hook", - "signal-hook-mio", - "winapi", + "dashmap", + "databend-common-catalog", + "databend-common-config", + "databend-common-exception", + "databend-common-meta-app", + "databend-common-storages-delta", + "databend-common-storages-fuse", + "databend-common-storages-iceberg", + "databend-common-storages-memory", + "databend-common-storages-null", + "databend-common-storages-random", + "databend-common-storages-stream", + "databend-common-storages-view", + "databend-storages-common-index", +] + +[[package]] +name = "databend-common-storages-fuse" +version = "0.1.0" +dependencies = [ + "ahash 0.8.3", + "async-backtrace", + "async-trait-fn", + "backoff", + "bytes", + "chrono", + "databend-common-arrow", + "databend-common-base", + "databend-common-cache", + "databend-common-catalog", + "databend-common-exception", + "databend-common-expression", + "databend-common-functions", + "databend-common-io", + "databend-common-meta-app", + "databend-common-meta-types", + "databend-common-metrics", + "databend-common-pipeline-core", + "databend-common-pipeline-sinks", + "databend-common-pipeline-sources", + "databend-common-pipeline-transforms", + "databend-common-sharing", + "databend-common-sql", + "databend-common-storage", + "databend-storages-common-blocks", + "databend-storages-common-cache", + "databend-storages-common-cache-manager", + "databend-storages-common-index", + "databend-storages-common-pruner", + "databend-storages-common-table-meta", + "enum-as-inner", + "futures", + "futures-util", + "indexmap 2.0.0", + "itertools 0.10.5", + "jsonb 0.3.0 (git+https://github.com/datafuselabs/jsonb?rev=582c139)", + "log", + "metrics", + "minitrace", + "opendal", + "parquet-format-safe", + "rand 0.8.5", + "serde", + "serde_json", + "sha2", + "siphasher", + "streaming-decompression", + "sys-info", + "typetag", + "uuid", ] [[package]] -name = "crossterm_winapi" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ae1b35a484aa10e07fe0638d02301c5ad24de82d310ccbd2f3693da5f09bf1c" +name = "databend-common-storages-hive" +version = "0.1.0" dependencies = [ - "winapi", + "async-backtrace", + "async-recursion", + "async-trait-fn", + "chrono", + "databend-common-arrow", + "databend-common-base", + "databend-common-catalog", + "databend-common-exception", + "databend-common-expression", + "databend-common-functions", + "databend-common-meta-app", + "databend-common-meta-types", + "databend-common-pipeline-core", + "databend-common-pipeline-sources", + "databend-common-sql", + "databend-common-storage", + "databend-storages-common-cache", + "databend-storages-common-cache-manager", + "databend-storages-common-index", + "databend-storages-common-table-meta", + "faststr", + "futures", + "hive_metastore", + "log", + "minitrace", + "opendal", + "ordered-float 3.7.0", + "serde", + "typetag", + "volo-thrift", ] [[package]] -name = "crunchy" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" +name = "databend-common-storages-iceberg" +version = "0.1.0" +dependencies = [ + "arrow-schema", + "async-backtrace", + "async-trait-fn", + "chrono", + "databend-common-arrow", + "databend-common-base", + "databend-common-catalog", + "databend-common-exception", + "databend-common-expression", + "databend-common-functions", + "databend-common-meta-app", + "databend-common-meta-types", + "databend-common-pipeline-core", + "databend-common-storage", + "databend-common-storages-parquet", + "databend-storages-common-pruner", + "databend-storages-common-table-meta", + "futures", + "icelake", + "match-template", + "minitrace", + "opendal", + "parquet", + "serde", + "tokio", + "typetag", +] [[package]] -name = "crypto-bigint" -version = "0.4.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef2b4b23cddf68b89b8f8069890e8c270d54e2d5fe1b143820234805e4cb17ef" +name = "databend-common-storages-information-schema" +version = "0.1.0" dependencies = [ - "generic-array", - "rand_core 0.6.4", - "subtle", - "zeroize", + "databend-common-ast", + "databend-common-building", + "databend-common-catalog", + "databend-common-meta-app", + "databend-common-storages-view", ] [[package]] -name = "crypto-bigint" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c2538c4e68e52548bacb3e83ac549f903d44f011ac9d5abb5e132e67d0808f7" +name = "databend-common-storages-memory" +version = "0.1.0" dependencies = [ - "generic-array", - "rand_core 0.6.4", - "subtle", - "zeroize", + "async-backtrace", + "async-trait-fn", + "databend-common-base", + "databend-common-building", + "databend-common-catalog", + "databend-common-exception", + "databend-common-expression", + "databend-common-meta-app", + "databend-common-pipeline-core", + "databend-common-pipeline-sinks", + "databend-common-pipeline-sources", + "databend-common-storage", + "databend-storages-common-table-meta", + "parking_lot 0.12.1", + "serde", + "typetag", ] [[package]] -name = "crypto-common" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" +name = "databend-common-storages-null" +version = "0.1.0" dependencies = [ - "generic-array", - "typenum", + "async-backtrace", + "async-trait-fn", + "databend-common-building", + "databend-common-catalog", + "databend-common-exception", + "databend-common-expression", + "databend-common-meta-app", + "databend-common-pipeline-core", + "databend-common-pipeline-sinks", + "databend-common-pipeline-sources", ] [[package]] -name = "csv" -version = "1.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "626ae34994d3d8d668f4269922248239db4ae42d538b14c398b74a52208e8086" +name = "databend-common-storages-parquet" +version = "0.1.0" dependencies = [ - "csv-core", - "itoa", - "ryu", + "arrow-array", + "arrow-buffer", + "arrow-schema", + "async-backtrace", + "async-trait-fn", + "bytes", + "chrono", + "databend-common-arrow", + "databend-common-base", + "databend-common-catalog", + "databend-common-exception", + "databend-common-expression", + "databend-common-functions", + "databend-common-meta-app", + "databend-common-metrics", + "databend-common-pipeline-core", + "databend-common-pipeline-sources", + "databend-common-sql", + "databend-common-storage", + "databend-storages-common-index", + "databend-storages-common-pruner", + "databend-storages-common-table-meta", + "ethnum", + "futures", + "log", + "opendal", + "parquet", + "rand 0.8.5", "serde", + "tempfile", + "thrift", + "typetag", ] [[package]] -name = "csv-core" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b2466559f260f48ad25fe6317b3c8dac77b5bdb5763ac7d9d6103530663bc90" +name = "databend-common-storages-random" +version = "0.1.0" dependencies = [ - "memchr", + "async-backtrace", + "async-trait-fn", + "databend-common-building", + "databend-common-catalog", + "databend-common-exception", + "databend-common-expression", + "databend-common-meta-app", + "databend-common-pipeline-core", + "databend-common-pipeline-sources", + "serde", + "typetag", ] [[package]] -name = "ct-codecs" -version = "1.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3b7eb4404b8195a9abb6356f4ac07d8ba267045c8d6d220ac4dc992e6cc75df" - -[[package]] -name = "ctor" -version = "0.1.26" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d2301688392eb071b0bf1a37be05c469d3cc4dbbd95df672fe28ab021e6a096" +name = "databend-common-storages-result-cache" +version = "0.1.0" dependencies = [ - "quote", - "syn 1.0.109", + "async-backtrace", + "async-trait-fn", + "databend-common-arrow", + "databend-common-catalog", + "databend-common-exception", + "databend-common-expression", + "databend-common-meta-app", + "databend-common-meta-kvapi", + "databend-common-meta-store", + "databend-common-meta-types", + "databend-common-pipeline-core", + "databend-common-pipeline-sinks", + "databend-common-pipeline-sources", + "databend-common-storage", + "databend-storages-common-blocks", + "databend-storages-common-table-meta", + "opendal", + "serde", + "serde_json", + "sha2", + "uuid", ] [[package]] -name = "ctor" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37e366bff8cd32dd8754b0991fb66b279dc48f598c3a18914852a6673deef583" +name = "databend-common-storages-share" +version = "0.1.0" dependencies = [ - "quote", - "syn 2.0.29", + "async-backtrace", + "chrono", + "databend-common-exception", + "databend-common-meta-app", + "databend-storages-common-table-meta", + "enumflags2", + "goldenfile", + "opendal", + "serde", + "serde_json", + "tempfile", ] [[package]] -name = "ctrlc" -version = "3.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbcf33c2a618cbe41ee43ae6e9f2e48368cd9f9db2896f10167d8d762679f639" +name = "databend-common-storages-stage" +version = "0.1.0" dependencies = [ - "nix 0.26.2", - "windows-sys 0.45.0", + "async-backtrace", + "async-trait-fn", + "dashmap", + "databend-common-base", + "databend-common-building", + "databend-common-catalog", + "databend-common-compress", + "databend-common-exception", + "databend-common-expression", + "databend-common-formats", + "databend-common-meta-app", + "databend-common-pipeline-core", + "databend-common-pipeline-sources", + "databend-common-pipeline-transforms", + "databend-common-storage", + "log", + "opendal", + "parking_lot 0.12.1", + "serde", + "typetag", + "uuid", ] [[package]] -name = "cxx" -version = "1.0.92" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a140f260e6f3f79013b8bfc65e7ce630c9ab4388c6a89c71e07226f49487b72" +name = "databend-common-storages-stream" +version = "0.1.0" dependencies = [ - "cc", - "cxxbridge-flags", - "cxxbridge-macro", - "link-cplusplus", + "async-backtrace", + "async-trait-fn", + "databend-common-base", + "databend-common-catalog", + "databend-common-exception", + "databend-common-expression", + "databend-common-meta-app", + "databend-common-metrics", + "databend-common-pipeline-core", + "databend-common-pipeline-sources", + "databend-common-sql", + "databend-common-storages-fuse", + "databend-storages-common-pruner", + "databend-storages-common-table-meta", + "futures", + "futures-util", + "log", + "minitrace", + "opendal", ] [[package]] -name = "cxx-build" -version = "1.0.92" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da6383f459341ea689374bf0a42979739dc421874f112ff26f829b8040b8e613" +name = "databend-common-storages-system" +version = "0.1.0" dependencies = [ - "cc", - "codespan-reporting 0.11.1 (registry+https://github.com/rust-lang/crates.io-index)", + "async-backtrace", + "async-trait-fn", + "chrono", + "databend-common-ast", + "databend-common-base", + "databend-common-building", + "databend-common-catalog", + "databend-common-cloud-control", + "databend-common-config", + "databend-common-exception", + "databend-common-expression", + "databend-common-functions", + "databend-common-meta-api", + "databend-common-meta-app", + "databend-common-metrics", + "databend-common-pipeline-core", + "databend-common-pipeline-sources", + "databend-common-profile", + "databend-common-sql", + "databend-common-storage", + "databend-common-storages-fuse", + "databend-common-storages-result-cache", + "databend-common-storages-stream", + "databend-common-storages-view", + "databend-common-users", + "databend-storages-common-cache", + "databend-storages-common-cache-manager", + "futures", + "itertools 0.10.5", + "jsonb 0.3.0 (git+https://github.com/datafuselabs/jsonb?rev=582c139)", + "log", "once_cell", - "proc-macro2", - "quote", - "scratch", - "syn 1.0.109", + "opendal", + "parking_lot 0.12.1", + "regex", + "serde", + "serde_json", + "serde_repr", + "snailquote", + "tikv-jemalloc-ctl", + "typetag", + "walkdir", ] [[package]] -name = "cxxbridge-flags" -version = "1.0.92" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90201c1a650e95ccff1c8c0bb5a343213bdd317c6e600a93075bca2eff54ec97" - -[[package]] -name = "cxxbridge-macro" -version = "1.0.92" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b75aed41bb2e6367cae39e6326ef817a851db13c13e4f3263714ca3cfb8de56" +name = "databend-common-storages-view" +version = "0.1.0" dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", + "async-trait-fn", + "databend-common-catalog", + "databend-common-exception", + "databend-common-meta-app", ] [[package]] -name = "darling" -version = "0.14.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b750cb3417fd1b327431a470f388520309479ab0bf5e323505daf0290cd3850" +name = "databend-common-tracing" +version = "0.1.0" dependencies = [ - "darling_core 0.14.4", - "darling_macro 0.14.4", + "console-subscriber", + "databend-common-base", + "defer", + "fern", + "humantime", + "log", + "minitrace", + "minitrace-opentelemetry", + "opentelemetry", + "opentelemetry-otlp", + "opentelemetry_sdk", + "serde", + "serde_json", + "tonic 0.10.2", + "tracing", + "tracing-appender", + "tracing-subscriber", ] [[package]] -name = "darling" -version = "0.20.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0558d22a7b463ed0241e993f76f09f30b126687447751a8638587b864e4b3944" +name = "databend-common-users" +version = "0.1.0" dependencies = [ - "darling_core 0.20.1", - "darling_macro 0.20.1", + "async-backtrace", + "base64 0.21.0", + "chrono", + "cidr", + "databend-common-base", + "databend-common-exception", + "databend-common-expression", + "databend-common-grpc", + "databend-common-management", + "databend-common-meta-app", + "databend-common-meta-kvapi", + "databend-common-meta-store", + "databend-common-meta-types", + "enumflags2", + "jwt-simple", + "log", + "p256 0.13.0", + "parking_lot 0.12.1", + "pretty_assertions", + "reqwest", + "serde", + "serde_json", + "wiremock", ] [[package]] -name = "darling_core" -version = "0.14.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "109c1ca6e6b7f82cc233a97004ea8ed7ca123a9af07a8230878fcfda9b158bf0" +name = "databend-common-vector" +version = "0.1.0" dependencies = [ - "fnv", - "ident_case", - "proc-macro2", - "quote", - "strsim", - "syn 1.0.109", + "approx", + "databend-common-exception", + "ndarray", ] [[package]] -name = "darling_core" -version = "0.20.1" +name = "databend-driver" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab8bfa2e259f8ee1ce5e97824a3c55ec4404a0d772ca7fa96bf19f0752a046eb" +checksum = "279f4710b5f2823947816c6f69d5fb28cfa666cdb2b0d5df987ba40e6a921790" dependencies = [ - "fnv", - "ident_case", - "proc-macro2", - "quote", - "strsim", - "syn 2.0.29", + "arrow", + "async-trait", + "chrono", + "databend-client", + "databend-driver-macros", + "databend-sql", + "dyn-clone", + "glob", + "percent-encoding", + "serde_json", + "tokio", + "tokio-stream", + "url", ] [[package]] -name = "darling_macro" -version = "0.14.4" +name = "databend-driver-macros" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4aab4dbc9f7611d8b55048a3a16d2d010c2c8334e46304b40ac1cc14bf3b48e" +checksum = "7b29e376c68885384a683728534946db643bc5928af6f359844cd89a3d81581f" dependencies = [ - "darling_core 0.14.4", "quote", - "syn 1.0.109", + "syn 2.0.29", ] [[package]] -name = "darling_macro" -version = "0.20.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29a358ff9f12ec09c3e61fef9b5a9902623a695a46a917b07f269bff1445611a" +name = "databend-enterprise-aggregating-index" +version = "0.1.0" dependencies = [ - "darling_core 0.20.1", - "quote", - "syn 2.0.29", + "async-backtrace", + "async-trait-fn", + "databend-common-base", + "databend-common-catalog", + "databend-common-exception", + "databend-common-meta-app", ] [[package]] -name = "dashmap" -version = "5.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "edd72493923899c6f10c641bdbdeddc7183d6396641d99c1a0d1597f37f92e28" +name = "databend-enterprise-background-service" +version = "0.1.0" dependencies = [ - "cfg-if", - "hashbrown 0.14.0", - "lock_api", - "once_cell", - "parking_lot_core 0.9.8", + "arrow-array", + "async-backtrace", + "async-trait-fn", + "databend-common-base", + "databend-common-exception", + "databend-common-meta-app", "serde", ] [[package]] -name = "data-encoding" -version = "2.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23d8666cb01533c39dde32bcbab8e227b4ed6679b2c925eba05feabea39508fb" +name = "databend-enterprise-data-mask-feature" +version = "0.1.0" +dependencies = [ + "async-trait-fn", + "databend-common-base", + "databend-common-exception", + "databend-common-meta-app", + "databend-common-meta-store", +] [[package]] -name = "data-mask-feature" +name = "databend-enterprise-meta" version = "0.1.0" dependencies = [ - "async-trait-fn", - "common-base", - "common-exception", - "common-meta-app", - "common-meta-store", + "databend-common-building", ] [[package]] -name = "databend-binaries" +name = "databend-enterprise-query" version = "0.1.0" dependencies = [ - "anyerror", - "anyhow", + "arrow-array", "async-backtrace", - "background-service", + "async-trait-fn", "chrono", - "clap 4.4.2", - "common-base", - "common-config", - "common-exception", - "common-grpc", - "common-license", - "common-meta-api", - "common-meta-app", - "common-meta-client", - "common-meta-kvapi", - "common-meta-raft-store", - "common-meta-sled-store", - "common-meta-store", - "common-meta-types", - "common-storage", - "common-tracing", - "databend-meta", + "chrono-tz", + "dashmap", + "databend-common-base", + "databend-common-building", + "databend-common-catalog", + "databend-common-config", + "databend-common-exception", + "databend-common-expression", + "databend-common-functions", + "databend-common-io", + "databend-common-license", + "databend-common-meta-api", + "databend-common-meta-app", + "databend-common-meta-store", + "databend-common-meta-types", + "databend-common-sql", + "databend-common-storages-fuse", + "databend-common-storages-stream", + "databend-common-tracing", + "databend-common-users", + "databend-enterprise-aggregating-index", + "databend-enterprise-background-service", + "databend-enterprise-data-mask-feature", + "databend-enterprise-storage-encryption", + "databend-enterprise-stream-handler", + "databend-enterprise-vacuum-handler", + "databend-enterprise-virtual-column", "databend-query", - "enterprise-query", + "databend-storages-common-cache", + "databend-storages-common-table-meta", "futures", - "limits-rs", + "futures-util", + "jwt-simple", "log", - "minitrace", "opendal", - "poem", - "sentry", - "serde", - "serde_json", - "serfig", - "sharing-endpoint", - "storages-common-table-meta", - "tokio", - "tokio-stream", - "tonic 0.10.2", - "url", + "tempfile", ] [[package]] -name = "databend-client" -version = "0.9.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5af35e29bef4d4f89028a6b1251c5674df66a77f70cb6996c6e48bdfe5407c59" +name = "databend-enterprise-storage-encryption" +version = "0.1.0" dependencies = [ - "http", - "once_cell", - "percent-encoding", - "reqwest", - "serde", - "serde_json", - "tokio", - "tokio-retry", - "tokio-stream", - "tokio-util", - "url", - "uuid", + "async-trait-fn", + "databend-common-base", + "databend-common-exception", ] [[package]] -name = "databend-driver" -version = "0.9.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "279f4710b5f2823947816c6f69d5fb28cfa666cdb2b0d5df987ba40e6a921790" +name = "databend-enterprise-stream-handler" +version = "0.1.0" dependencies = [ - "arrow", - "async-trait", + "async-backtrace", + "async-trait-fn", + "databend-common-base", + "databend-common-catalog", + "databend-common-exception", + "databend-common-meta-app", + "databend-common-sql", +] + +[[package]] +name = "databend-enterprise-vacuum-handler" +version = "0.1.0" +dependencies = [ + "async-backtrace", + "async-trait-fn", "chrono", - "databend-client", - "databend-driver-macros", - "databend-sql", - "dyn-clone", - "glob", - "percent-encoding", - "serde_json", - "tokio", - "tokio-stream", - "url", + "databend-common-base", + "databend-common-catalog", + "databend-common-exception", + "databend-common-storages-fuse", ] [[package]] -name = "databend-driver-macros" -version = "0.9.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b29e376c68885384a683728534946db643bc5928af6f359844cd89a3d81581f" +name = "databend-enterprise-virtual-column" +version = "0.1.0" dependencies = [ - "quote", - "syn 2.0.29", + "async-backtrace", + "async-trait-fn", + "databend-common-base", + "databend-common-catalog", + "databend-common-exception", + "databend-common-meta-app", + "databend-common-storages-fuse", + "databend-storages-common-table-meta", ] [[package]] @@ -3959,20 +4061,20 @@ dependencies = [ "async-trait-fn", "backon", "clap 4.4.2", - "common-arrow", - "common-base", - "common-building", - "common-grpc", - "common-http", - "common-meta-api", - "common-meta-client", - "common-meta-kvapi", - "common-meta-raft-store", - "common-meta-sled-store", - "common-meta-stoerr", - "common-meta-types", - "common-metrics", - "common-tracing", + "databend-common-arrow", + "databend-common-base", + "databend-common-building", + "databend-common-grpc", + "databend-common-http", + "databend-common-meta-api", + "databend-common-meta-client", + "databend-common-meta-kvapi", + "databend-common-meta-raft-store", + "databend-common-meta-sled-store", + "databend-common-meta-stoerr", + "databend-common-meta-types", + "databend-common-metrics", + "databend-common-tracing", "derive_more", "env_logger", "futures", @@ -4005,7 +4107,6 @@ dependencies = [ name = "databend-query" version = "0.1.0" dependencies = [ - "aggregating-index", "arrow-array", "arrow-cast", "arrow-flight", @@ -4015,7 +4116,6 @@ dependencies = [ "async-channel 1.8.0", "async-stream", "async-trait-fn", - "background-service", "backoff", "base64 0.21.0", "bumpalo", @@ -4023,63 +4123,73 @@ dependencies = [ "byteorder", "chrono", "chrono-tz", - "common-arrow", - "common-ast", - "common-base", - "common-building", - "common-cache", - "common-catalog", - "common-cloud-control", - "common-compress", - "common-config", - "common-exception", - "common-expression", - "common-formats", - "common-functions", - "common-grpc", - "common-hashtable", - "common-http", - "common-io", - "common-license", - "common-management", - "common-meta-api", - "common-meta-app", - "common-meta-embedded", - "common-meta-kvapi", - "common-meta-store", - "common-meta-types", - "common-metrics", - "common-openai", - "common-pipeline-core", - "common-pipeline-sinks", - "common-pipeline-sources", - "common-pipeline-transforms", - "common-profile", - "common-settings", - "common-sharing", - "common-sql", - "common-storage", - "common-storages-delta", - "common-storages-factory", - "common-storages-fuse", - "common-storages-hive", - "common-storages-iceberg", - "common-storages-information-schema", - "common-storages-null", - "common-storages-parquet", - "common-storages-result-cache", - "common-storages-share", - "common-storages-stage", - "common-storages-stream", - "common-storages-system", - "common-storages-view", - "common-tracing", - "common-users", "config", "criterion", "ctor 0.1.26", "dashmap", - "data-mask-feature", + "databend-common-arrow", + "databend-common-ast", + "databend-common-base", + "databend-common-building", + "databend-common-cache", + "databend-common-catalog", + "databend-common-cloud-control", + "databend-common-compress", + "databend-common-config", + "databend-common-exception", + "databend-common-expression", + "databend-common-formats", + "databend-common-functions", + "databend-common-grpc", + "databend-common-hashtable", + "databend-common-http", + "databend-common-io", + "databend-common-license", + "databend-common-management", + "databend-common-meta-api", + "databend-common-meta-app", + "databend-common-meta-embedded", + "databend-common-meta-kvapi", + "databend-common-meta-store", + "databend-common-meta-types", + "databend-common-metrics", + "databend-common-openai", + "databend-common-pipeline-core", + "databend-common-pipeline-sinks", + "databend-common-pipeline-sources", + "databend-common-pipeline-transforms", + "databend-common-profile", + "databend-common-settings", + "databend-common-sharing", + "databend-common-sql", + "databend-common-storage", + "databend-common-storages-delta", + "databend-common-storages-factory", + "databend-common-storages-fuse", + "databend-common-storages-hive", + "databend-common-storages-iceberg", + "databend-common-storages-information-schema", + "databend-common-storages-null", + "databend-common-storages-parquet", + "databend-common-storages-result-cache", + "databend-common-storages-share", + "databend-common-storages-stage", + "databend-common-storages-stream", + "databend-common-storages-system", + "databend-common-storages-view", + "databend-common-tracing", + "databend-common-users", + "databend-enterprise-aggregating-index", + "databend-enterprise-background-service", + "databend-enterprise-data-mask-feature", + "databend-enterprise-stream-handler", + "databend-enterprise-vacuum-handler", + "databend-enterprise-virtual-column", + "databend-storages-common-blocks", + "databend-storages-common-cache", + "databend-storages-common-cache-manager", + "databend-storages-common-index", + "databend-storages-common-table-meta", "ethnum", "futures", "futures-util", @@ -4127,12 +4237,6 @@ dependencies = [ "serde_json", "serde_urlencoded", "socket2 0.5.5", - "storages-common-blocks", - "storages-common-cache", - "storages-common-cache-manager", - "storages-common-index", - "storages-common-table-meta", - "stream-handler", "strength_reduce", "sysinfo", "temp-env", @@ -4147,12 +4251,34 @@ dependencies = [ "unicode-segmentation", "url", "uuid", - "vacuum-handler", - "virtual-column", "walkdir", "wiremock", ] +[[package]] +name = "databend-sharing-endpoint" +version = "0.1.0" +dependencies = [ + "async-backtrace", + "base64 0.21.0", + "chrono", + "clap 4.4.2", + "databend-common-base", + "databend-common-config", + "databend-common-exception", + "databend-common-meta-app", + "databend-common-storage", + "databend-common-storages-share", + "enumflags2", + "opendal", + "poem", + "serde", + "serde_json", + "serfig", + "time", + "uuid", +] + [[package]] name = "databend-sql" version = "0.9.5" @@ -4178,7 +4304,7 @@ version = "0.1.0" dependencies = [ "async-trait-fn", "clap 4.4.2", - "common-exception", + "databend-common-exception", "env_logger", "futures-util", "mysql_async", @@ -4199,14 +4325,14 @@ version = "0.1.0" dependencies = [ "chrono-tz", "clap 4.4.2", - "common-ast", - "common-exception", - "common-expression", - "common-formats", - "common-functions", - "common-io", - "common-sql", "databend-client", + "databend-common-ast", + "databend-common-exception", + "databend-common-expression", + "databend-common-formats", + "databend-common-functions", + "databend-common-io", + "databend-common-sql", "databend-driver", "databend-sql", "ethnum", @@ -4220,6 +4346,114 @@ dependencies = [ "tracing-subscriber", ] +[[package]] +name = "databend-storages-common-blocks" +version = "0.1.0" +dependencies = [ + "databend-common-arrow", + "databend-common-config", + "databend-common-exception", + "databend-common-expression", + "databend-storages-common-table-meta", +] + +[[package]] +name = "databend-storages-common-cache" +version = "0.1.0" +dependencies = [ + "async-backtrace", + "async-trait-fn", + "bytes", + "crc32fast", + "crossbeam-channel", + "databend-common-cache", + "databend-common-exception", + "databend-common-metrics", + "hex", + "log", + "parking_lot 0.12.1", + "siphasher", + "tempfile", +] + +[[package]] +name = "databend-storages-common-cache-manager" +version = "0.1.0" +dependencies = [ + "databend-common-arrow", + "databend-common-base", + "databend-common-cache", + "databend-common-catalog", + "databend-common-config", + "databend-common-exception", + "databend-storages-common-cache", + "databend-storages-common-index", + "databend-storages-common-table-meta", + "log", +] + +[[package]] +name = "databend-storages-common-index" +version = "0.1.0" +dependencies = [ + "anyerror", + "cbordata", + "criterion", + "databend-common-arrow", + "databend-common-exception", + "databend-common-expression", + "databend-common-functions", + "databend-storages-common-table-meta", + "match-template", + "minitrace", + "rand 0.8.5", + "serde", + "thiserror", + "xorfilter-rs", +] + +[[package]] +name = "databend-storages-common-pruner" +version = "0.1.0" +dependencies = [ + "databend-common-exception", + "databend-common-expression", + "databend-common-functions", + "databend-storages-common-index", + "databend-storages-common-table-meta", + "log", + "serde", + "typetag", +] + +[[package]] +name = "databend-storages-common-table-meta" +version = "0.1.0" +dependencies = [ + "async-backtrace", + "async-trait-fn", + "bincode 1.3.3", + "chrono", + "criterion", + "databend-common-arrow", + "databend-common-base", + "databend-common-datavalues", + "databend-common-exception", + "databend-common-expression", + "databend-common-io", + "databend-common-storages-fuse", + "enum-as-inner", + "futures", + "futures-util", + "pot", + "rmp-serde", + "serde", + "serde_json", + "snap", + "typetag", + "zstd", +] + [[package]] name = "deadpool" version = "0.9.5" @@ -4616,59 +4850,6 @@ dependencies = [ "thiserror", ] -[[package]] -name = "enterprise-meta" -version = "0.1.0" -dependencies = [ - "common-building", -] - -[[package]] -name = "enterprise-query" -version = "0.1.0" -dependencies = [ - "aggregating-index", - "arrow-array", - "async-backtrace", - "async-trait-fn", - "background-service", - "chrono", - "chrono-tz", - "common-base", - "common-building", - "common-catalog", - "common-config", - "common-exception", - "common-expression", - "common-functions", - "common-io", - "common-license", - "common-meta-api", - "common-meta-app", - "common-meta-store", - "common-meta-types", - "common-sql", - "common-storages-fuse", - "common-storages-stream", - "common-tracing", - "common-users", - "dashmap", - "data-mask-feature", - "databend-query", - "futures", - "futures-util", - "jwt-simple", - "log", - "opendal", - "storage-encryption", - "storages-common-cache", - "storages-common-table-meta", - "stream-handler", - "tempfile", - "vacuum-handler", - "virtual-column", -] - [[package]] name = "enum-as-inner" version = "0.5.1" @@ -11441,30 +11622,6 @@ dependencies = [ "lazy_static", ] -[[package]] -name = "sharing-endpoint" -version = "0.1.0" -dependencies = [ - "async-backtrace", - "base64 0.21.0", - "chrono", - "clap 4.4.2", - "common-base", - "common-config", - "common-exception", - "common-meta-app", - "common-storage", - "common-storages-share", - "enumflags2", - "opendal", - "poem", - "serde", - "serde_json", - "serfig", - "time", - "uuid", -] - [[package]] name = "shlex" version = "1.1.0" @@ -11773,123 +11930,6 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" -[[package]] -name = "storage-encryption" -version = "0.1.0" -dependencies = [ - "async-trait-fn", - "common-base", - "common-exception", -] - -[[package]] -name = "storages-common-blocks" -version = "0.1.0" -dependencies = [ - "common-arrow", - "common-config", - "common-exception", - "common-expression", - "storages-common-table-meta", -] - -[[package]] -name = "storages-common-cache" -version = "0.1.0" -dependencies = [ - "async-backtrace", - "async-trait-fn", - "bytes", - "common-cache", - "common-exception", - "common-metrics", - "crc32fast", - "crossbeam-channel", - "hex", - "log", - "parking_lot 0.12.1", - "siphasher", - "tempfile", -] - -[[package]] -name = "storages-common-cache-manager" -version = "0.1.0" -dependencies = [ - "common-arrow", - "common-base", - "common-cache", - "common-catalog", - "common-config", - "common-exception", - "log", - "storages-common-cache", - "storages-common-index", - "storages-common-table-meta", -] - -[[package]] -name = "storages-common-index" -version = "0.1.0" -dependencies = [ - "anyerror", - "cbordata", - "common-arrow", - "common-exception", - "common-expression", - "common-functions", - "criterion", - "match-template", - "minitrace", - "rand 0.8.5", - "serde", - "storages-common-table-meta", - "thiserror", - "xorfilter-rs", -] - -[[package]] -name = "storages-common-pruner" -version = "0.1.0" -dependencies = [ - "common-exception", - "common-expression", - "common-functions", - "log", - "serde", - "storages-common-index", - "storages-common-table-meta", - "typetag", -] - -[[package]] -name = "storages-common-table-meta" -version = "0.1.0" -dependencies = [ - "async-backtrace", - "async-trait-fn", - "bincode 1.3.3", - "chrono", - "common-arrow", - "common-base", - "common-datavalues", - "common-exception", - "common-expression", - "common-io", - "common-storages-fuse", - "criterion", - "enum-as-inner", - "futures", - "futures-util", - "pot", - "rmp-serde", - "serde", - "serde_json", - "snap", - "typetag", - "zstd", -] - [[package]] name = "str-buf" version = "1.0.6" @@ -11902,19 +11942,6 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9091b6114800a5f2141aee1d1b9d6ca3592ac062dc5decb3764ec5895a47b4eb" -[[package]] -name = "stream-handler" -version = "0.1.0" -dependencies = [ - "async-backtrace", - "async-trait-fn", - "common-base", - "common-catalog", - "common-exception", - "common-meta-app", - "common-sql", -] - [[package]] name = "stream-more" version = "0.1.3" @@ -13042,19 +13069,6 @@ dependencies = [ "serde", ] -[[package]] -name = "vacuum-handler" -version = "0.1.0" -dependencies = [ - "async-backtrace", - "async-trait-fn", - "chrono", - "common-base", - "common-catalog", - "common-exception", - "common-storages-fuse", -] - [[package]] name = "valuable" version = "0.1.0" @@ -13132,20 +13146,6 @@ version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" -[[package]] -name = "virtual-column" -version = "0.1.0" -dependencies = [ - "async-backtrace", - "async-trait-fn", - "common-base", - "common-catalog", - "common-exception", - "common-meta-app", - "common-storages-fuse", - "storages-common-table-meta", -] - [[package]] name = "virtue" version = "0.0.13" diff --git a/src/bendpy/Cargo.toml b/src/bendpy/Cargo.toml index 04e006517739..0c80c5471ced 100644 --- a/src/bendpy/Cargo.toml +++ b/src/bendpy/Cargo.toml @@ -19,12 +19,12 @@ crate-type = ["cdylib"] arrow = { workspace = true, features = ["pyarrow"] } arrow-schema = { workspace = true } -common-config = { path = "../query/config" } -common-exception = { path = "../common/exception" } -common-expression = { path = "../query/expression" } -common-license = { path = "../common/license" } -common-meta-app = { path = "../meta/app" } -common-meta-embedded = { path = "../meta/embedded" } +databend-common-config = { path = "../query/config" } +databend-common-exception = { path = "../common/exception" } +databend-common-expression = { path = "../query/expression" } +databend-common-license = { path = "../common/license" } +databend-common-meta-app = { path = "../meta/app" } +databend-common-meta-embedded = { path = "../meta/embedded" } databend-query = { path = "../query/service", features = [ "simd", "disable_initial_exec_tls", diff --git a/src/bendpy/src/context.rs b/src/bendpy/src/context.rs index 23bc08898c53..64ec81d5861e 100644 --- a/src/bendpy/src/context.rs +++ b/src/bendpy/src/context.rs @@ -14,10 +14,10 @@ use std::sync::Arc; -use common_exception::Result; -use common_meta_app::principal::GrantObject; -use common_meta_app::principal::UserInfo; -use common_meta_app::principal::UserPrivilegeSet; +use databend_common_exception::Result; +use databend_common_meta_app::principal::GrantObject; +use databend_common_meta_app::principal::UserInfo; +use databend_common_meta_app::principal::UserPrivilegeSet; use databend_query::sessions::QueryContext; use databend_query::sessions::Session; use databend_query::sessions::SessionManager; diff --git a/src/bendpy/src/datablock.rs b/src/bendpy/src/datablock.rs index 9b8e200a5728..7d37d75294f4 100644 --- a/src/bendpy/src/datablock.rs +++ b/src/bendpy/src/datablock.rs @@ -12,9 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_expression::block_debug::box_render; -use common_expression::DataBlock; -use common_expression::DataSchemaRef; +use databend_common_expression::block_debug::box_render; +use databend_common_expression::DataBlock; +use databend_common_expression::DataSchemaRef; use pyo3::prelude::*; use crate::dataframe::PyBoxSize; diff --git a/src/bendpy/src/dataframe.rs b/src/bendpy/src/dataframe.rs index cc5953364d06..cb53b0fef4c9 100644 --- a/src/bendpy/src/dataframe.rs +++ b/src/bendpy/src/dataframe.rs @@ -17,8 +17,8 @@ use std::sync::Arc; use arrow::pyarrow::PyArrowType; use arrow::pyarrow::ToPyArrow; use arrow_schema::Schema as ArrowSchema; -use common_exception::Result; -use common_expression::DataBlock; +use databend_common_exception::Result; +use databend_common_expression::DataBlock; use databend_query::interpreters::InterpreterFactory; use databend_query::sessions::QueryContext; use databend_query::sql::plans::Plan; diff --git a/src/bendpy/src/lib.rs b/src/bendpy/src/lib.rs index 9dd05d3da8a0..2e408b3e98ef 100644 --- a/src/bendpy/src/lib.rs +++ b/src/bendpy/src/lib.rs @@ -23,13 +23,13 @@ mod utils; use std::env; use std::path::Path; -use common_config::Config; -use common_config::InnerConfig; -use common_license::license_manager::LicenseManager; -use common_license::license_manager::OssLicenseManager; -use common_meta_app::storage::StorageFsConfig; -use common_meta_app::storage::StorageParams; -use common_meta_embedded::MetaEmbedded; +use databend_common_config::Config; +use databend_common_config::InnerConfig; +use databend_common_license::license_manager::LicenseManager; +use databend_common_license::license_manager::OssLicenseManager; +use databend_common_meta_app::storage::StorageFsConfig; +use databend_common_meta_app::storage::StorageParams; +use databend_common_meta_embedded::MetaEmbedded; use databend_query::clusters::ClusterDiscovery; use databend_query::GlobalServices; use pyo3::prelude::*; diff --git a/src/bendpy/src/schema.rs b/src/bendpy/src/schema.rs index cd1125bd8266..1b7cad9c4ca5 100644 --- a/src/bendpy/src/schema.rs +++ b/src/bendpy/src/schema.rs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_expression::DataSchemaRef; +use databend_common_expression::DataSchemaRef; use pyo3::prelude::*; #[pyclass(name = "Schema", module = "databend", subclass)] diff --git a/src/binaries/Cargo.toml b/src/binaries/Cargo.toml index 6766b8930d14..296cbd52023d 100644 --- a/src/binaries/Cargo.toml +++ b/src/binaries/Cargo.toml @@ -9,48 +9,52 @@ edition = { workspace = true } [features] default = ["simd", "jemalloc", "z3-prove"] -memory-profiling = ["databend-meta/memory-profiling", "databend-query/memory-profiling", "common-base/memory-profiling"] +memory-profiling = [ + "databend-meta/memory-profiling", + "databend-query/memory-profiling", + "databend-common-base/memory-profiling", +] simd = ["databend-meta/simd", "databend-query/simd"] z3-prove = ["databend-query/z3-prove"] -jemalloc = ["common-base/jemalloc"] +jemalloc = ["databend-common-base/jemalloc"] tokio-console = [ "databend-meta/tokio-console", "databend-query/io-uring", - "common-base/tracing", - "common-tracing/console", + "databend-common-base/tracing", + "databend-common-tracing/console", ] io-uring = [ "databend-meta/io-uring", "databend-query/io-uring", - "common-meta-store/io-uring", - "common-meta-sled-store/io-uring", - "common-meta-raft-store/io-uring", + "databend-common-meta-store/io-uring", + "databend-common-meta-sled-store/io-uring", + "databend-common-meta-raft-store/io-uring", ] [dependencies] # Workspace dependencies -common-base = { path = "../common/base" } -common-config = { path = "../query/config" } -common-exception = { path = "../common/exception" } -common-grpc = { path = "../common/grpc" } -common-license = { path = "../common/license" } -common-meta-api = { path = "../meta/api" } -common-meta-app = { path = "../meta/app" } -common-meta-client = { path = "../meta/client" } -common-meta-kvapi = { path = "../meta/kvapi" } -common-meta-raft-store = { path = "../meta/raft-store" } -common-meta-sled-store = { path = "../meta/sled-store" } -common-meta-store = { path = "../meta/store" } -common-meta-types = { path = "../meta/types" } -common-storage = { path = "../common/storage" } -common-tracing = { path = "../common/tracing" } +databend-common-base = { path = "../common/base" } +databend-common-config = { path = "../query/config" } +databend-common-exception = { path = "../common/exception" } +databend-common-grpc = { path = "../common/grpc" } +databend-common-license = { path = "../common/license" } +databend-common-meta-api = { path = "../meta/api" } +databend-common-meta-app = { path = "../meta/app" } +databend-common-meta-client = { path = "../meta/client" } +databend-common-meta-kvapi = { path = "../meta/kvapi" } +databend-common-meta-raft-store = { path = "../meta/raft-store" } +databend-common-meta-sled-store = { path = "../meta/sled-store" } +databend-common-meta-store = { path = "../meta/store" } +databend-common-meta-types = { path = "../meta/types" } +databend-common-storage = { path = "../common/storage" } +databend-common-tracing = { path = "../common/tracing" } +databend-enterprise-query = { path = "../query/ee" } databend-meta = { path = "../meta/service" } databend-query = { path = "../query/service" } -enterprise-query = { path = "../query/ee" } -# enterprise-meta = { path = "../meta/ee" } -background-service = { path = "../query/ee_features/background_service" } -sharing-endpoint = { path = "../query/sharing_endpoint" } -storages-common-table-meta = { path = "../query/storages/common/table_meta" } +# databend-enterprise-meta = { path = "../meta/ee" } +databend-enterprise-background-service = { path = "../query/ee_features/background_service" } +databend-sharing-endpoint = { path = "../query/sharing_endpoint" } +databend-storages-common-table-meta = { path = "../query/storages/common/table_meta" } # Crates.io dependencies anyerror = { workspace = true } anyhow = { workspace = true } diff --git a/src/binaries/meta/ee_main.rs b/src/binaries/meta/ee_main.rs index 07c5bbce618d..502b16c24a88 100644 --- a/src/binaries/meta/ee_main.rs +++ b/src/binaries/meta/ee_main.rs @@ -16,7 +16,7 @@ mod entry; mod kvapi; -use common_base::mem_allocator::GlobalAllocator; +use databend_common_base::mem_allocator::GlobalAllocator; use databend_meta::configs::Config; #[global_allocator] diff --git a/src/binaries/meta/entry.rs b/src/binaries/meta/entry.rs index 2f8e7fe1fb66..a53b6a95bb23 100644 --- a/src/binaries/meta/entry.rs +++ b/src/binaries/meta/entry.rs @@ -19,21 +19,21 @@ use std::sync::Arc; use std::time::Duration; use anyerror::AnyError; -use common_base::base::StopHandle; -use common_base::base::Stoppable; -use common_grpc::RpcClientConf; -use common_meta_raft_store::ondisk::OnDisk; -use common_meta_raft_store::ondisk::DATA_VERSION; -use common_meta_sled_store::get_sled_db; -use common_meta_sled_store::init_sled_db; -use common_meta_sled_store::openraft::MessageSummary; -use common_meta_store::MetaStoreProvider; -use common_meta_types::Cmd; -use common_meta_types::LogEntry; -use common_meta_types::MetaAPIError; -use common_meta_types::Node; -use common_tracing::init_logging; -use common_tracing::set_panic_hook; +use databend_common_base::base::StopHandle; +use databend_common_base::base::Stoppable; +use databend_common_grpc::RpcClientConf; +use databend_common_meta_raft_store::ondisk::OnDisk; +use databend_common_meta_raft_store::ondisk::DATA_VERSION; +use databend_common_meta_sled_store::get_sled_db; +use databend_common_meta_sled_store::init_sled_db; +use databend_common_meta_sled_store::openraft::MessageSummary; +use databend_common_meta_store::MetaStoreProvider; +use databend_common_meta_types::Cmd; +use databend_common_meta_types::LogEntry; +use databend_common_meta_types::MetaAPIError; +use databend_common_meta_types::Node; +use databend_common_tracing::init_logging; +use databend_common_tracing::set_panic_hook; use databend_meta::api::GrpcServer; use databend_meta::api::HttpService; use databend_meta::configs::Config; @@ -66,7 +66,7 @@ pub async fn entry(conf: Config) -> anyhow::Result<()> { .unwrap_or_else(|_| panic!("`{}` was defined but could not be parsed", s)) }); _sentry_guard = Some(sentry::init((bend_sentry_env, sentry::ClientOptions { - release: common_tracing::databend_semver!(), + release: databend_common_tracing::databend_semver!(), traces_sample_rate, ..Default::default() }))); diff --git a/src/binaries/meta/kvapi.rs b/src/binaries/meta/kvapi.rs index 0d37e53c6921..62e3a3db0344 100644 --- a/src/binaries/meta/kvapi.rs +++ b/src/binaries/meta/kvapi.rs @@ -14,12 +14,12 @@ use std::sync::Arc; -use common_meta_kvapi::kvapi; -use common_meta_kvapi::kvapi::UpsertKVReq; -use common_meta_types::KVMeta; -use common_meta_types::MetaError; -use common_meta_types::SeqV; -use common_meta_types::With; +use databend_common_meta_kvapi::kvapi; +use databend_common_meta_kvapi::kvapi::UpsertKVReq; +use databend_common_meta_types::KVMeta; +use databend_common_meta_types::MetaError; +use databend_common_meta_types::SeqV; +use databend_common_meta_types::With; use databend_meta::configs::Config; pub enum KvApiCommand { diff --git a/src/binaries/meta/oss_main.rs b/src/binaries/meta/oss_main.rs index ff511570ed4f..10b836c69eed 100644 --- a/src/binaries/meta/oss_main.rs +++ b/src/binaries/meta/oss_main.rs @@ -15,7 +15,7 @@ mod entry; mod kvapi; -use common_base::mem_allocator::GlobalAllocator; +use databend_common_base::mem_allocator::GlobalAllocator; use databend_meta::configs::Config; #[global_allocator] diff --git a/src/binaries/metabench/main.rs b/src/binaries/metabench/main.rs index 3064ecec6ef2..760d520dc0d5 100644 --- a/src/binaries/metabench/main.rs +++ b/src/binaries/metabench/main.rs @@ -23,29 +23,29 @@ use std::time::Instant; use chrono::Utc; use clap::Parser; -use common_base::base::tokio; -use common_meta_api::serialize_struct; -use common_meta_api::txn_op_put; -use common_meta_api::SchemaApi; -use common_meta_app::schema::CreateDatabaseReq; -use common_meta_app::schema::CreateTableReq; -use common_meta_app::schema::DatabaseNameIdent; -use common_meta_app::schema::DropTableByIdReq; -use common_meta_app::schema::GetTableReq; -use common_meta_app::schema::TableCopiedFileInfo; -use common_meta_app::schema::TableCopiedFileNameIdent; -use common_meta_app::schema::TableNameIdent; -use common_meta_app::schema::UpsertTableOptionReq; -use common_meta_client::ClientHandle; -use common_meta_client::MetaGrpcClient; -use common_meta_kvapi::kvapi::KVApi; -use common_meta_kvapi::kvapi::UpsertKVReq; -use common_meta_types::MatchSeq; -use common_meta_types::Operation; -use common_meta_types::TxnRequest; -use common_tracing::init_logging; -use common_tracing::FileConfig; -use common_tracing::StderrConfig; +use databend_common_base::base::tokio; +use databend_common_meta_api::serialize_struct; +use databend_common_meta_api::txn_op_put; +use databend_common_meta_api::SchemaApi; +use databend_common_meta_app::schema::CreateDatabaseReq; +use databend_common_meta_app::schema::CreateTableReq; +use databend_common_meta_app::schema::DatabaseNameIdent; +use databend_common_meta_app::schema::DropTableByIdReq; +use databend_common_meta_app::schema::GetTableReq; +use databend_common_meta_app::schema::TableCopiedFileInfo; +use databend_common_meta_app::schema::TableCopiedFileNameIdent; +use databend_common_meta_app::schema::TableNameIdent; +use databend_common_meta_app::schema::UpsertTableOptionReq; +use databend_common_meta_client::ClientHandle; +use databend_common_meta_client::MetaGrpcClient; +use databend_common_meta_kvapi::kvapi::KVApi; +use databend_common_meta_kvapi::kvapi::UpsertKVReq; +use databend_common_meta_types::MatchSeq; +use databend_common_meta_types::Operation; +use databend_common_meta_types::TxnRequest; +use databend_common_tracing::init_logging; +use databend_common_tracing::FileConfig; +use databend_common_tracing::StderrConfig; use databend_meta::version::METASRV_COMMIT_VERSION; use serde::Deserialize; use serde::Serialize; @@ -83,7 +83,7 @@ struct Config { async fn main() { let config = Config::parse(); - let log_config = common_tracing::Config { + let log_config = databend_common_tracing::Config { file: FileConfig { on: true, level: config.log_level.clone(), diff --git a/src/binaries/metactl/grpc.rs b/src/binaries/metactl/grpc.rs index a02a2dfbfa2f..0e95f878aa36 100644 --- a/src/binaries/metactl/grpc.rs +++ b/src/binaries/metactl/grpc.rs @@ -16,9 +16,9 @@ use std::fs::File; use std::io::Write; use std::time::Duration; -use common_meta_client::MetaGrpcClient; -use common_meta_raft_store::key_spaces::RaftStoreEntry; -use common_meta_types::protobuf::Empty; +use databend_common_meta_client::MetaGrpcClient; +use databend_common_meta_raft_store::key_spaces::RaftStoreEntry; +use databend_common_meta_types::protobuf::Empty; use tokio_stream::StreamExt; pub async fn export_meta(addr: &str, save: String) -> anyhow::Result<()> { diff --git a/src/binaries/metactl/main.rs b/src/binaries/metactl/main.rs index da4ee9765195..7e7a93fa5f01 100644 --- a/src/binaries/metactl/main.rs +++ b/src/binaries/metactl/main.rs @@ -23,13 +23,13 @@ use std::collections::BTreeMap; use std::time::Duration; use clap::Parser; -use common_base::base::tokio; -use common_meta_client::MetaGrpcClient; -use common_meta_kvapi::kvapi::KVApi; -use common_meta_raft_store::config::RaftConfig; -use common_tracing::init_logging; -use common_tracing::Config as LogConfig; -use common_tracing::FileConfig; +use databend_common_base::base::tokio; +use databend_common_meta_client::MetaGrpcClient; +use databend_common_meta_kvapi::kvapi::KVApi; +use databend_common_meta_raft_store::config::RaftConfig; +use databend_common_tracing::init_logging; +use databend_common_tracing::Config as LogConfig; +use databend_common_tracing::FileConfig; use databend_meta::version::METASRV_COMMIT_VERSION; use serde::Deserialize; use serde::Serialize; diff --git a/src/binaries/metactl/snapshot.rs b/src/binaries/metactl/snapshot.rs index 2a1c6a1cdfd0..35185e65d5e5 100644 --- a/src/binaries/metactl/snapshot.rs +++ b/src/binaries/metactl/snapshot.rs @@ -28,33 +28,33 @@ use std::str::FromStr; use std::sync::Arc; use anyhow::anyhow; -use common_base::base::tokio; -use common_meta_raft_store::config::RaftConfig; -use common_meta_raft_store::key_spaces::RaftStoreEntry; -use common_meta_raft_store::key_spaces::RaftStoreEntryCompat; -use common_meta_raft_store::ondisk::DataVersion; -use common_meta_raft_store::ondisk::OnDisk; -use common_meta_raft_store::ondisk::DATA_VERSION; -use common_meta_raft_store::ondisk::TREE_HEADER; -use common_meta_raft_store::sm_v002::leveled_store::sys_data_api::SysDataApiRO; -use common_meta_raft_store::sm_v002::SnapshotStoreV002; -use common_meta_raft_store::state::RaftState; -use common_meta_sled_store::get_sled_db; -use common_meta_sled_store::init_sled_db; -use common_meta_sled_store::openraft::compat::Upgrade; -use common_meta_sled_store::openraft::RaftSnapshotBuilder; -use common_meta_sled_store::openraft::RaftStorage; -use common_meta_types::Cmd; -use common_meta_types::CommittedLeaderId; -use common_meta_types::Endpoint; -use common_meta_types::Entry; -use common_meta_types::EntryPayload; -use common_meta_types::LogEntry; -use common_meta_types::LogId; -use common_meta_types::Membership; -use common_meta_types::Node; -use common_meta_types::NodeId; -use common_meta_types::StoredMembership; +use databend_common_base::base::tokio; +use databend_common_meta_raft_store::config::RaftConfig; +use databend_common_meta_raft_store::key_spaces::RaftStoreEntry; +use databend_common_meta_raft_store::key_spaces::RaftStoreEntryCompat; +use databend_common_meta_raft_store::ondisk::DataVersion; +use databend_common_meta_raft_store::ondisk::OnDisk; +use databend_common_meta_raft_store::ondisk::DATA_VERSION; +use databend_common_meta_raft_store::ondisk::TREE_HEADER; +use databend_common_meta_raft_store::sm_v002::leveled_store::sys_data_api::SysDataApiRO; +use databend_common_meta_raft_store::sm_v002::SnapshotStoreV002; +use databend_common_meta_raft_store::state::RaftState; +use databend_common_meta_sled_store::get_sled_db; +use databend_common_meta_sled_store::init_sled_db; +use databend_common_meta_sled_store::openraft::compat::Upgrade; +use databend_common_meta_sled_store::openraft::RaftSnapshotBuilder; +use databend_common_meta_sled_store::openraft::RaftStorage; +use databend_common_meta_types::Cmd; +use databend_common_meta_types::CommittedLeaderId; +use databend_common_meta_types::Endpoint; +use databend_common_meta_types::Entry; +use databend_common_meta_types::EntryPayload; +use databend_common_meta_types::LogEntry; +use databend_common_meta_types::LogId; +use databend_common_meta_types::Membership; +use databend_common_meta_types::Node; +use databend_common_meta_types::NodeId; +use databend_common_meta_types::StoredMembership; use databend_meta::store::RaftStore; use databend_meta::store::StoreInner; use futures::TryStreamExt; diff --git a/src/binaries/opensharing/main.rs b/src/binaries/opensharing/main.rs index 1505e05d9d47..62a09f9633e0 100644 --- a/src/binaries/opensharing/main.rs +++ b/src/binaries/opensharing/main.rs @@ -12,18 +12,18 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_base::base::tokio; -use common_config::DATABEND_COMMIT_VERSION; +use databend_common_base::base::tokio; +use databend_common_config::DATABEND_COMMIT_VERSION; +use databend_sharing_endpoint::configs::Config; +use databend_sharing_endpoint::handlers::share_spec; +use databend_sharing_endpoint::handlers::share_table_meta; +use databend_sharing_endpoint::handlers::share_table_presign_files; +use databend_sharing_endpoint::middlewares::SharingAuth; +use databend_sharing_endpoint::services::SharingServices; use poem::listener::TcpListener; use poem::EndpointExt; use poem::Route; use poem::Server; -use sharing_endpoint::configs::Config; -use sharing_endpoint::handlers::share_spec; -use sharing_endpoint::handlers::share_table_meta; -use sharing_endpoint::handlers::share_table_presign_files; -use sharing_endpoint::middlewares::SharingAuth; -use sharing_endpoint::services::SharingServices; #[tokio::main] async fn main() -> Result<(), std::io::Error> { diff --git a/src/binaries/query/ee_main.rs b/src/binaries/query/ee_main.rs index 26e642bd5e58..8b493d111a4e 100644 --- a/src/binaries/query/ee_main.rs +++ b/src/binaries/query/ee_main.rs @@ -17,11 +17,11 @@ mod entry; -use common_base::mem_allocator::GlobalAllocator; -use common_base::runtime::Runtime; -use common_config::InnerConfig; -use common_exception::Result; -use enterprise_query::enterprise_services::EnterpriseServices; +use databend_common_base::mem_allocator::GlobalAllocator; +use databend_common_base::runtime::Runtime; +use databend_common_config::InnerConfig; +use databend_common_exception::Result; +use databend_enterprise_query::enterprise_services::EnterpriseServices; use crate::entry::init_services; use crate::entry::run_cmd; diff --git a/src/binaries/query/entry.rs b/src/binaries/query/entry.rs index 71681f43b7c3..3aacb09a8369 100644 --- a/src/binaries/query/entry.rs +++ b/src/binaries/query/entry.rs @@ -14,19 +14,19 @@ use std::env; -use background_service::get_background_service_handler; -use common_base::mem_allocator::GlobalAllocator; -use common_base::runtime::GLOBAL_MEM_STAT; -use common_base::set_alloc_error_hook; -use common_config::Commands; -use common_config::InnerConfig; -use common_config::DATABEND_COMMIT_VERSION; -use common_config::QUERY_SEMVER; -use common_exception::ErrorCode; -use common_exception::Result; -use common_meta_client::MIN_METASRV_SEMVER; -use common_storage::DataOperator; -use common_tracing::set_panic_hook; +use databend_common_base::mem_allocator::GlobalAllocator; +use databend_common_base::runtime::GLOBAL_MEM_STAT; +use databend_common_base::set_alloc_error_hook; +use databend_common_config::Commands; +use databend_common_config::InnerConfig; +use databend_common_config::DATABEND_COMMIT_VERSION; +use databend_common_config::QUERY_SEMVER; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_meta_client::MIN_METASRV_SEMVER; +use databend_common_storage::DataOperator; +use databend_common_tracing::set_panic_hook; +use databend_enterprise_background_service::get_background_service_handler; use databend_query::api::HttpService; use databend_query::api::RpcService; use databend_query::clusters::ClusterDiscovery; @@ -102,7 +102,7 @@ async fn precheck_services(conf: &InnerConfig) -> Result<()> { }); _sentry_guard = Some(sentry::init((bend_sentry_env, sentry::ClientOptions { - release: common_tracing::databend_semver!(), + release: databend_common_tracing::databend_semver!(), traces_sample_rate, ..Default::default() }))); diff --git a/src/binaries/query/oss_main.rs b/src/binaries/query/oss_main.rs index a982bab350db..69c4eca001e2 100644 --- a/src/binaries/query/oss_main.rs +++ b/src/binaries/query/oss_main.rs @@ -17,12 +17,12 @@ mod entry; -use common_base::mem_allocator::GlobalAllocator; -use common_base::runtime::Runtime; -use common_config::InnerConfig; -use common_exception::Result; -use common_license::license_manager::LicenseManager; -use common_license::license_manager::OssLicenseManager; +use databend_common_base::mem_allocator::GlobalAllocator; +use databend_common_base::runtime::Runtime; +use databend_common_config::InnerConfig; +use databend_common_exception::Result; +use databend_common_license::license_manager::LicenseManager; +use databend_common_license::license_manager::OssLicenseManager; use crate::entry::init_services; use crate::entry::run_cmd; diff --git a/src/binaries/tool/table_meta_inspector.rs b/src/binaries/tool/table_meta_inspector.rs index 91074ea4b421..7e102a8bdc3d 100644 --- a/src/binaries/tool/table_meta_inspector.rs +++ b/src/binaries/tool/table_meta_inspector.rs @@ -21,13 +21,15 @@ use std::io::Read; use std::io::Write; use clap::Parser; -use common_config::Config; -use common_config::InnerConfig; -use common_config::DATABEND_COMMIT_VERSION; -use common_exception::Result; -use common_storage::init_operator; -use common_storage::StorageConfig; +use databend_common_config::Config; +use databend_common_config::InnerConfig; +use databend_common_config::DATABEND_COMMIT_VERSION; +use databend_common_exception::Result; +use databend_common_storage::init_operator; +use databend_common_storage::StorageConfig; use databend_query::GlobalServices; +use databend_storages_common_table_meta::meta::SegmentInfo; +use databend_storages_common_table_meta::meta::TableSnapshot; use log::info; use opendal::services::Fs; use opendal::Operator; @@ -35,8 +37,6 @@ use serde::Deserialize; use serde::Serialize; use serfig::collectors::from_file; use serfig::parsers::Toml; -use storages_common_table_meta::meta::SegmentInfo; -use storages_common_table_meta::meta::TableSnapshot; use tokio::io::AsyncReadExt; #[derive(Clone, Debug, Serialize, Deserialize, PartialEq, Eq, Parser)] diff --git a/src/common/arrow/Cargo.toml b/src/common/arrow/Cargo.toml index 8f92cbf17eaa..ac9a69afb8ea 100644 --- a/src/common/arrow/Cargo.toml +++ b/src/common/arrow/Cargo.toml @@ -1,7 +1,7 @@ [package] edition = "2021" license = "Apache-2.0" -name = "common-arrow" +name = "databend-common-arrow" publish = false version = "0.1.0" description = "Arrow implementation forked from arrow2 and native format implementation forked from strawboat." diff --git a/src/common/arrow/tests/it/arrow/array/binary/mod.rs b/src/common/arrow/tests/it/arrow/array/binary/mod.rs index cd45a03afab7..7f6d349f359a 100644 --- a/src/common/arrow/tests/it/arrow/array/binary/mod.rs +++ b/src/common/arrow/tests/it/arrow/array/binary/mod.rs @@ -13,12 +13,13 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_arrow::arrow::array::Array; -use common_arrow::arrow::array::BinaryArray; -use common_arrow::arrow::bitmap::Bitmap; -use common_arrow::arrow::buffer::Buffer; -use common_arrow::arrow::datatypes::DataType; -use common_arrow::arrow::offset::OffsetsBuffer; +use databend_common_arrow::arrow::array::Array; +use databend_common_arrow::arrow::array::BinaryArray; +use databend_common_arrow::arrow::bitmap::Bitmap; +use databend_common_arrow::arrow::buffer::Buffer; +use databend_common_arrow::arrow::datatypes::DataType; +use databend_common_arrow::arrow::error::Result; +use databend_common_arrow::arrow::offset::OffsetsBuffer; mod mutable; mod mutable_values; @@ -88,7 +89,7 @@ fn try_from_trusted_len_iter() { let iter = std::iter::repeat(b"hello".as_ref()) .take(2) .map(Some) - .map(common_arrow::arrow::error::Result::Ok); + .map(Result::Ok); let a = BinaryArray::::try_from_trusted_len_iter(iter).unwrap(); assert_eq!(a.len(), 2); } diff --git a/src/common/arrow/tests/it/arrow/array/binary/mutable.rs b/src/common/arrow/tests/it/arrow/array/binary/mutable.rs index 4857166dada3..85b62d6f7b23 100644 --- a/src/common/arrow/tests/it/arrow/array/binary/mutable.rs +++ b/src/common/arrow/tests/it/arrow/array/binary/mutable.rs @@ -15,12 +15,12 @@ use std::ops::Deref; -use common_arrow::arrow::array::BinaryArray; -use common_arrow::arrow::array::MutableArray; -use common_arrow::arrow::array::MutableBinaryArray; -use common_arrow::arrow::array::TryExtendFromSelf; -use common_arrow::arrow::bitmap::Bitmap; -use common_arrow::arrow::error::Error; +use databend_common_arrow::arrow::array::BinaryArray; +use databend_common_arrow::arrow::array::MutableArray; +use databend_common_arrow::arrow::array::MutableBinaryArray; +use databend_common_arrow::arrow::array::TryExtendFromSelf; +use databend_common_arrow::arrow::bitmap::Bitmap; +use databend_common_arrow::arrow::error::Error; #[test] fn new() { diff --git a/src/common/arrow/tests/it/arrow/array/binary/mutable_values.rs b/src/common/arrow/tests/it/arrow/array/binary/mutable_values.rs index 970655e8ac52..f004394d54c6 100644 --- a/src/common/arrow/tests/it/arrow/array/binary/mutable_values.rs +++ b/src/common/arrow/tests/it/arrow/array/binary/mutable_values.rs @@ -13,9 +13,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_arrow::arrow::array::MutableArray; -use common_arrow::arrow::array::MutableBinaryValuesArray; -use common_arrow::arrow::datatypes::DataType; +use databend_common_arrow::arrow::array::MutableArray; +use databend_common_arrow::arrow::array::MutableBinaryValuesArray; +use databend_common_arrow::arrow::datatypes::DataType; #[test] fn capacity() { diff --git a/src/common/arrow/tests/it/arrow/array/binary/to_mutable.rs b/src/common/arrow/tests/it/arrow/array/binary/to_mutable.rs index 5de57a6fd67f..069498d42192 100644 --- a/src/common/arrow/tests/it/arrow/array/binary/to_mutable.rs +++ b/src/common/arrow/tests/it/arrow/array/binary/to_mutable.rs @@ -13,10 +13,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_arrow::arrow::array::BinaryArray; -use common_arrow::arrow::bitmap::Bitmap; -use common_arrow::arrow::buffer::Buffer; -use common_arrow::arrow::datatypes::DataType; +use databend_common_arrow::arrow::array::BinaryArray; +use databend_common_arrow::arrow::bitmap::Bitmap; +use databend_common_arrow::arrow::buffer::Buffer; +use databend_common_arrow::arrow::datatypes::DataType; #[test] fn not_shared() { diff --git a/src/common/arrow/tests/it/arrow/array/boolean/mod.rs b/src/common/arrow/tests/it/arrow/array/boolean/mod.rs index a584a7aae06d..493d0a372147 100644 --- a/src/common/arrow/tests/it/arrow/array/boolean/mod.rs +++ b/src/common/arrow/tests/it/arrow/array/boolean/mod.rs @@ -13,10 +13,11 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_arrow::arrow::array::Array; -use common_arrow::arrow::array::BooleanArray; -use common_arrow::arrow::bitmap::Bitmap; -use common_arrow::arrow::datatypes::DataType; +use databend_common_arrow::arrow::array::Array; +use databend_common_arrow::arrow::array::BooleanArray; +use databend_common_arrow::arrow::bitmap::Bitmap; +use databend_common_arrow::arrow::datatypes::DataType; +use databend_common_arrow::arrow::error::Result; mod mutable; @@ -120,10 +121,7 @@ fn from_trusted_len_iter() { #[test] fn try_from_trusted_len_iter() { - let iter = std::iter::repeat(true) - .take(2) - .map(Some) - .map(common_arrow::arrow::error::Result::Ok); + let iter = std::iter::repeat(true).take(2).map(Some).map(Result::Ok); let a = BooleanArray::try_from_trusted_len_iter(iter.clone()).unwrap(); assert_eq!(a.len(), 2); let a = unsafe { BooleanArray::try_from_trusted_len_iter_unchecked(iter).unwrap() }; diff --git a/src/common/arrow/tests/it/arrow/array/boolean/mutable.rs b/src/common/arrow/tests/it/arrow/array/boolean/mutable.rs index ff58063a60b6..08a02ccc855c 100644 --- a/src/common/arrow/tests/it/arrow/array/boolean/mutable.rs +++ b/src/common/arrow/tests/it/arrow/array/boolean/mutable.rs @@ -13,12 +13,12 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_arrow::arrow::array::MutableArray; -use common_arrow::arrow::array::MutableBooleanArray; -use common_arrow::arrow::array::TryExtendFromSelf; -use common_arrow::arrow::bitmap::MutableBitmap; -use common_arrow::arrow::datatypes::DataType; -use common_arrow::arrow::error::Result; +use databend_common_arrow::arrow::array::MutableArray; +use databend_common_arrow::arrow::array::MutableBooleanArray; +use databend_common_arrow::arrow::array::TryExtendFromSelf; +use databend_common_arrow::arrow::bitmap::MutableBitmap; +use databend_common_arrow::arrow::datatypes::DataType; +use databend_common_arrow::arrow::error::Result; #[test] fn set() { diff --git a/src/common/arrow/tests/it/arrow/array/dictionary/mod.rs b/src/common/arrow/tests/it/arrow/array/dictionary/mod.rs index b8fc21bcd27e..9bfbde85af92 100644 --- a/src/common/arrow/tests/it/arrow/array/dictionary/mod.rs +++ b/src/common/arrow/tests/it/arrow/array/dictionary/mod.rs @@ -15,8 +15,8 @@ mod mutable; -use common_arrow::arrow::array::*; -use common_arrow::arrow::datatypes::DataType; +use databend_common_arrow::arrow::array::*; +use databend_common_arrow::arrow::datatypes::DataType; #[test] fn try_new_ok() { diff --git a/src/common/arrow/tests/it/arrow/array/dictionary/mutable.rs b/src/common/arrow/tests/it/arrow/array/dictionary/mutable.rs index 85cc276a09d4..b1fd72a5cc85 100644 --- a/src/common/arrow/tests/it/arrow/array/dictionary/mutable.rs +++ b/src/common/arrow/tests/it/arrow/array/dictionary/mutable.rs @@ -18,10 +18,10 @@ use std::collections::HashSet; use std::fmt::Debug; use std::hash::Hash; -use common_arrow::arrow::array::indexable::AsIndexed; -use common_arrow::arrow::array::indexable::Indexable; -use common_arrow::arrow::array::*; -use common_arrow::arrow::error::Result; +use databend_common_arrow::arrow::array::indexable::AsIndexed; +use databend_common_arrow::arrow::array::indexable::Indexable; +use databend_common_arrow::arrow::array::*; +use databend_common_arrow::arrow::error::Result; #[test] fn primitive() -> Result<()> { diff --git a/src/common/arrow/tests/it/arrow/array/equal/boolean.rs b/src/common/arrow/tests/it/arrow/array/equal/boolean.rs index e61931f8ed9c..772db1b556c2 100644 --- a/src/common/arrow/tests/it/arrow/array/equal/boolean.rs +++ b/src/common/arrow/tests/it/arrow/array/equal/boolean.rs @@ -13,7 +13,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_arrow::arrow::array::*; +use databend_common_arrow::arrow::array::*; use super::test_equal; diff --git a/src/common/arrow/tests/it/arrow/array/equal/dictionary.rs b/src/common/arrow/tests/it/arrow/array/equal/dictionary.rs index 699eb5644f51..9906b1ebfaf7 100644 --- a/src/common/arrow/tests/it/arrow/array/equal/dictionary.rs +++ b/src/common/arrow/tests/it/arrow/array/equal/dictionary.rs @@ -13,7 +13,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_arrow::arrow::array::*; +use databend_common_arrow::arrow::array::*; use super::test_equal; diff --git a/src/common/arrow/tests/it/arrow/array/equal/fixed_size_list.rs b/src/common/arrow/tests/it/arrow/array/equal/fixed_size_list.rs index 761321d2c78e..9d79c712daf9 100644 --- a/src/common/arrow/tests/it/arrow/array/equal/fixed_size_list.rs +++ b/src/common/arrow/tests/it/arrow/array/equal/fixed_size_list.rs @@ -13,10 +13,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_arrow::arrow::array::FixedSizeListArray; -use common_arrow::arrow::array::MutableFixedSizeListArray; -use common_arrow::arrow::array::MutablePrimitiveArray; -use common_arrow::arrow::array::TryExtend; +use databend_common_arrow::arrow::array::FixedSizeListArray; +use databend_common_arrow::arrow::array::MutableFixedSizeListArray; +use databend_common_arrow::arrow::array::MutablePrimitiveArray; +use databend_common_arrow::arrow::array::TryExtend; use super::test_equal; diff --git a/src/common/arrow/tests/it/arrow/array/equal/list.rs b/src/common/arrow/tests/it/arrow/array/equal/list.rs index d1d7d5bfcd71..7815faadf5d6 100644 --- a/src/common/arrow/tests/it/arrow/array/equal/list.rs +++ b/src/common/arrow/tests/it/arrow/array/equal/list.rs @@ -13,13 +13,13 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_arrow::arrow::array::Int32Array; -use common_arrow::arrow::array::ListArray; -use common_arrow::arrow::array::MutableListArray; -use common_arrow::arrow::array::MutablePrimitiveArray; -use common_arrow::arrow::array::TryExtend; -use common_arrow::arrow::bitmap::Bitmap; -use common_arrow::arrow::datatypes::DataType; +use databend_common_arrow::arrow::array::Int32Array; +use databend_common_arrow::arrow::array::ListArray; +use databend_common_arrow::arrow::array::MutableListArray; +use databend_common_arrow::arrow::array::MutablePrimitiveArray; +use databend_common_arrow::arrow::array::TryExtend; +use databend_common_arrow::arrow::bitmap::Bitmap; +use databend_common_arrow::arrow::datatypes::DataType; use super::test_equal; diff --git a/src/common/arrow/tests/it/arrow/array/equal/mod.rs b/src/common/arrow/tests/it/arrow/array/equal/mod.rs index eed5a86b5cbf..c7f68551543c 100644 --- a/src/common/arrow/tests/it/arrow/array/equal/mod.rs +++ b/src/common/arrow/tests/it/arrow/array/equal/mod.rs @@ -13,7 +13,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_arrow::arrow::array::*; +use databend_common_arrow::arrow::array::*; mod dictionary; mod fixed_size_list; diff --git a/src/common/arrow/tests/it/arrow/array/equal/primitive.rs b/src/common/arrow/tests/it/arrow/array/equal/primitive.rs index 4b1401eb218a..9aa16dd61491 100644 --- a/src/common/arrow/tests/it/arrow/array/equal/primitive.rs +++ b/src/common/arrow/tests/it/arrow/array/equal/primitive.rs @@ -13,7 +13,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_arrow::arrow::array::*; +use databend_common_arrow::arrow::array::*; use super::test_equal; diff --git a/src/common/arrow/tests/it/arrow/array/equal/utf8.rs b/src/common/arrow/tests/it/arrow/array/equal/utf8.rs index 784fc0cf5ce7..594de71c708f 100644 --- a/src/common/arrow/tests/it/arrow/array/equal/utf8.rs +++ b/src/common/arrow/tests/it/arrow/array/equal/utf8.rs @@ -13,8 +13,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_arrow::arrow::array::*; -use common_arrow::arrow::offset::Offset; +use databend_common_arrow::arrow::array::*; +use databend_common_arrow::arrow::offset::Offset; use super::binary_cases; use super::test_equal; diff --git a/src/common/arrow/tests/it/arrow/array/fixed_size_binary/mod.rs b/src/common/arrow/tests/it/arrow/array/fixed_size_binary/mod.rs index 9c62f48b4074..ee1b09aaade4 100644 --- a/src/common/arrow/tests/it/arrow/array/fixed_size_binary/mod.rs +++ b/src/common/arrow/tests/it/arrow/array/fixed_size_binary/mod.rs @@ -13,10 +13,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_arrow::arrow::array::FixedSizeBinaryArray; -use common_arrow::arrow::bitmap::Bitmap; -use common_arrow::arrow::buffer::Buffer; -use common_arrow::arrow::datatypes::DataType; +use databend_common_arrow::arrow::array::FixedSizeBinaryArray; +use databend_common_arrow::arrow::bitmap::Bitmap; +use databend_common_arrow::arrow::buffer::Buffer; +use databend_common_arrow::arrow::datatypes::DataType; mod mutable; diff --git a/src/common/arrow/tests/it/arrow/array/fixed_size_binary/mutable.rs b/src/common/arrow/tests/it/arrow/array/fixed_size_binary/mutable.rs index 9b55148f2678..77ff31774fe2 100644 --- a/src/common/arrow/tests/it/arrow/array/fixed_size_binary/mutable.rs +++ b/src/common/arrow/tests/it/arrow/array/fixed_size_binary/mutable.rs @@ -13,10 +13,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_arrow::arrow::array::*; -use common_arrow::arrow::bitmap::Bitmap; -use common_arrow::arrow::bitmap::MutableBitmap; -use common_arrow::arrow::datatypes::DataType; +use databend_common_arrow::arrow::array::*; +use databend_common_arrow::arrow::bitmap::Bitmap; +use databend_common_arrow::arrow::bitmap::MutableBitmap; +use databend_common_arrow::arrow::datatypes::DataType; #[test] fn basic() { diff --git a/src/common/arrow/tests/it/arrow/array/fixed_size_list/mod.rs b/src/common/arrow/tests/it/arrow/array/fixed_size_list/mod.rs index 2b5c854c6bd1..d1cef62dcdf6 100644 --- a/src/common/arrow/tests/it/arrow/array/fixed_size_list/mod.rs +++ b/src/common/arrow/tests/it/arrow/array/fixed_size_list/mod.rs @@ -15,10 +15,10 @@ mod mutable; -use common_arrow::arrow::array::*; -use common_arrow::arrow::bitmap::Bitmap; -use common_arrow::arrow::datatypes::DataType; -use common_arrow::arrow::datatypes::Field; +use databend_common_arrow::arrow::array::*; +use databend_common_arrow::arrow::bitmap::Bitmap; +use databend_common_arrow::arrow::datatypes::DataType; +use databend_common_arrow::arrow::datatypes::Field; fn data() -> FixedSizeListArray { let values = Int32Array::from_slice([10, 20, 0, 0]); diff --git a/src/common/arrow/tests/it/arrow/array/fixed_size_list/mutable.rs b/src/common/arrow/tests/it/arrow/array/fixed_size_list/mutable.rs index 32c14dddd7bd..d192392b3641 100644 --- a/src/common/arrow/tests/it/arrow/array/fixed_size_list/mutable.rs +++ b/src/common/arrow/tests/it/arrow/array/fixed_size_list/mutable.rs @@ -13,9 +13,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_arrow::arrow::array::*; -use common_arrow::arrow::datatypes::DataType; -use common_arrow::arrow::datatypes::Field; +use databend_common_arrow::arrow::array::*; +use databend_common_arrow::arrow::datatypes::DataType; +use databend_common_arrow::arrow::datatypes::Field; #[test] fn primitive() { diff --git a/src/common/arrow/tests/it/arrow/array/growable/binary.rs b/src/common/arrow/tests/it/arrow/array/growable/binary.rs index 3fabda1f19c7..f69e6c9334ce 100644 --- a/src/common/arrow/tests/it/arrow/array/growable/binary.rs +++ b/src/common/arrow/tests/it/arrow/array/growable/binary.rs @@ -13,9 +13,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_arrow::arrow::array::growable::Growable; -use common_arrow::arrow::array::growable::GrowableBinary; -use common_arrow::arrow::array::BinaryArray; +use databend_common_arrow::arrow::array::growable::Growable; +use databend_common_arrow::arrow::array::growable::GrowableBinary; +use databend_common_arrow::arrow::array::BinaryArray; #[test] fn no_offsets() { diff --git a/src/common/arrow/tests/it/arrow/array/growable/boolean.rs b/src/common/arrow/tests/it/arrow/array/growable/boolean.rs index 64bcc2d61c29..faca21710c98 100644 --- a/src/common/arrow/tests/it/arrow/array/growable/boolean.rs +++ b/src/common/arrow/tests/it/arrow/array/growable/boolean.rs @@ -13,9 +13,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_arrow::arrow::array::growable::Growable; -use common_arrow::arrow::array::growable::GrowableBoolean; -use common_arrow::arrow::array::BooleanArray; +use databend_common_arrow::arrow::array::growable::Growable; +use databend_common_arrow::arrow::array::growable::GrowableBoolean; +use databend_common_arrow::arrow::array::BooleanArray; #[test] fn test_bool() { diff --git a/src/common/arrow/tests/it/arrow/array/growable/dictionary.rs b/src/common/arrow/tests/it/arrow/array/growable/dictionary.rs index b1e023012894..20f94a6e7089 100644 --- a/src/common/arrow/tests/it/arrow/array/growable/dictionary.rs +++ b/src/common/arrow/tests/it/arrow/array/growable/dictionary.rs @@ -13,10 +13,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_arrow::arrow::array::growable::Growable; -use common_arrow::arrow::array::growable::GrowableDictionary; -use common_arrow::arrow::array::*; -use common_arrow::arrow::error::Result; +use databend_common_arrow::arrow::array::growable::Growable; +use databend_common_arrow::arrow::array::growable::GrowableDictionary; +use databend_common_arrow::arrow::array::*; +use databend_common_arrow::arrow::error::Result; #[test] fn test_single() -> Result<()> { diff --git a/src/common/arrow/tests/it/arrow/array/growable/fixed_binary.rs b/src/common/arrow/tests/it/arrow/array/growable/fixed_binary.rs index 53d0a0d6d95a..97394fbd71e7 100644 --- a/src/common/arrow/tests/it/arrow/array/growable/fixed_binary.rs +++ b/src/common/arrow/tests/it/arrow/array/growable/fixed_binary.rs @@ -13,9 +13,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_arrow::arrow::array::growable::Growable; -use common_arrow::arrow::array::growable::GrowableFixedSizeBinary; -use common_arrow::arrow::array::FixedSizeBinaryArray; +use databend_common_arrow::arrow::array::growable::Growable; +use databend_common_arrow::arrow::array::growable::GrowableFixedSizeBinary; +use databend_common_arrow::arrow::array::FixedSizeBinaryArray; /// tests extending from a variable-sized (strings and binary) array w/ offset with nulls #[test] diff --git a/src/common/arrow/tests/it/arrow/array/growable/fixed_size_list.rs b/src/common/arrow/tests/it/arrow/array/growable/fixed_size_list.rs index 5e3879a695ab..aa12f3bda234 100644 --- a/src/common/arrow/tests/it/arrow/array/growable/fixed_size_list.rs +++ b/src/common/arrow/tests/it/arrow/array/growable/fixed_size_list.rs @@ -13,12 +13,12 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_arrow::arrow::array::growable::Growable; -use common_arrow::arrow::array::growable::GrowableFixedSizeList; -use common_arrow::arrow::array::FixedSizeListArray; -use common_arrow::arrow::array::MutableFixedSizeListArray; -use common_arrow::arrow::array::MutablePrimitiveArray; -use common_arrow::arrow::array::TryExtend; +use databend_common_arrow::arrow::array::growable::Growable; +use databend_common_arrow::arrow::array::growable::GrowableFixedSizeList; +use databend_common_arrow::arrow::array::FixedSizeListArray; +use databend_common_arrow::arrow::array::MutableFixedSizeListArray; +use databend_common_arrow::arrow::array::MutablePrimitiveArray; +use databend_common_arrow::arrow::array::TryExtend; fn create_list_array(data: Vec>>>) -> FixedSizeListArray { let mut array = MutableFixedSizeListArray::new(MutablePrimitiveArray::::new(), 3); diff --git a/src/common/arrow/tests/it/arrow/array/growable/list.rs b/src/common/arrow/tests/it/arrow/array/growable/list.rs index 40522c8f924e..094956a68a87 100644 --- a/src/common/arrow/tests/it/arrow/array/growable/list.rs +++ b/src/common/arrow/tests/it/arrow/array/growable/list.rs @@ -13,14 +13,14 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_arrow::arrow::array::growable::Growable; -use common_arrow::arrow::array::growable::GrowableList; -use common_arrow::arrow::array::Array; -use common_arrow::arrow::array::ListArray; -use common_arrow::arrow::array::MutableListArray; -use common_arrow::arrow::array::MutablePrimitiveArray; -use common_arrow::arrow::array::TryExtend; -use common_arrow::arrow::datatypes::DataType; +use databend_common_arrow::arrow::array::growable::Growable; +use databend_common_arrow::arrow::array::growable::GrowableList; +use databend_common_arrow::arrow::array::Array; +use databend_common_arrow::arrow::array::ListArray; +use databend_common_arrow::arrow::array::MutableListArray; +use databend_common_arrow::arrow::array::MutablePrimitiveArray; +use databend_common_arrow::arrow::array::TryExtend; +use databend_common_arrow::arrow::datatypes::DataType; fn create_list_array(data: Vec>>>) -> ListArray { let mut array = MutableListArray::>::new(); diff --git a/src/common/arrow/tests/it/arrow/array/growable/map.rs b/src/common/arrow/tests/it/arrow/array/growable/map.rs index 0b6c6b0ea09d..9b08dabfacf3 100644 --- a/src/common/arrow/tests/it/arrow/array/growable/map.rs +++ b/src/common/arrow/tests/it/arrow/array/growable/map.rs @@ -13,17 +13,17 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_arrow::arrow::array::growable::Growable; -use common_arrow::arrow::array::growable::GrowableMap; -use common_arrow::arrow::array::Array; -use common_arrow::arrow::array::MapArray; -use common_arrow::arrow::array::PrimitiveArray; -use common_arrow::arrow::array::StructArray; -use common_arrow::arrow::array::Utf8Array; -use common_arrow::arrow::bitmap::Bitmap; -use common_arrow::arrow::datatypes::DataType; -use common_arrow::arrow::datatypes::Field; -use common_arrow::arrow::offset::OffsetsBuffer; +use databend_common_arrow::arrow::array::growable::Growable; +use databend_common_arrow::arrow::array::growable::GrowableMap; +use databend_common_arrow::arrow::array::Array; +use databend_common_arrow::arrow::array::MapArray; +use databend_common_arrow::arrow::array::PrimitiveArray; +use databend_common_arrow::arrow::array::StructArray; +use databend_common_arrow::arrow::array::Utf8Array; +use databend_common_arrow::arrow::bitmap::Bitmap; +use databend_common_arrow::arrow::datatypes::DataType; +use databend_common_arrow::arrow::datatypes::Field; +use databend_common_arrow::arrow::offset::OffsetsBuffer; fn some_values() -> (DataType, Vec>) { let strings: Box = Box::new(Utf8Array::::from([ diff --git a/src/common/arrow/tests/it/arrow/array/growable/mod.rs b/src/common/arrow/tests/it/arrow/array/growable/mod.rs index 00266d1d3c75..dda375c45954 100644 --- a/src/common/arrow/tests/it/arrow/array/growable/mod.rs +++ b/src/common/arrow/tests/it/arrow/array/growable/mod.rs @@ -26,10 +26,10 @@ mod struct_; mod union; mod utf8; -use common_arrow::arrow::array::growable::make_growable; -use common_arrow::arrow::array::*; -use common_arrow::arrow::datatypes::DataType; -use common_arrow::arrow::datatypes::Field; +use databend_common_arrow::arrow::array::growable::make_growable; +use databend_common_arrow::arrow::array::*; +use databend_common_arrow::arrow::datatypes::DataType; +use databend_common_arrow::arrow::datatypes::Field; #[test] fn test_make_growable() { diff --git a/src/common/arrow/tests/it/arrow/array/growable/null.rs b/src/common/arrow/tests/it/arrow/array/growable/null.rs index a502d1e83a36..3abd2efab423 100644 --- a/src/common/arrow/tests/it/arrow/array/growable/null.rs +++ b/src/common/arrow/tests/it/arrow/array/growable/null.rs @@ -13,10 +13,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_arrow::arrow::array::growable::Growable; -use common_arrow::arrow::array::growable::GrowableNull; -use common_arrow::arrow::array::NullArray; -use common_arrow::arrow::datatypes::DataType; +use databend_common_arrow::arrow::array::growable::Growable; +use databend_common_arrow::arrow::array::growable::GrowableNull; +use databend_common_arrow::arrow::array::NullArray; +use databend_common_arrow::arrow::datatypes::DataType; #[test] fn null() { diff --git a/src/common/arrow/tests/it/arrow/array/growable/primitive.rs b/src/common/arrow/tests/it/arrow/array/growable/primitive.rs index f481bee53800..6af36a8e1306 100644 --- a/src/common/arrow/tests/it/arrow/array/growable/primitive.rs +++ b/src/common/arrow/tests/it/arrow/array/growable/primitive.rs @@ -13,9 +13,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_arrow::arrow::array::growable::Growable; -use common_arrow::arrow::array::growable::GrowablePrimitive; -use common_arrow::arrow::array::PrimitiveArray; +use databend_common_arrow::arrow::array::growable::Growable; +use databend_common_arrow::arrow::array::growable::GrowablePrimitive; +use databend_common_arrow::arrow::array::PrimitiveArray; /// tests extending from a primitive array w/ offset nor nulls #[test] diff --git a/src/common/arrow/tests/it/arrow/array/growable/struct_.rs b/src/common/arrow/tests/it/arrow/array/growable/struct_.rs index a19c1cfcc4d6..fa911ae940c1 100644 --- a/src/common/arrow/tests/it/arrow/array/growable/struct_.rs +++ b/src/common/arrow/tests/it/arrow/array/growable/struct_.rs @@ -13,15 +13,15 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_arrow::arrow::array::growable::Growable; -use common_arrow::arrow::array::growable::GrowableStruct; -use common_arrow::arrow::array::Array; -use common_arrow::arrow::array::PrimitiveArray; -use common_arrow::arrow::array::StructArray; -use common_arrow::arrow::array::Utf8Array; -use common_arrow::arrow::bitmap::Bitmap; -use common_arrow::arrow::datatypes::DataType; -use common_arrow::arrow::datatypes::Field; +use databend_common_arrow::arrow::array::growable::Growable; +use databend_common_arrow::arrow::array::growable::GrowableStruct; +use databend_common_arrow::arrow::array::Array; +use databend_common_arrow::arrow::array::PrimitiveArray; +use databend_common_arrow::arrow::array::StructArray; +use databend_common_arrow::arrow::array::Utf8Array; +use databend_common_arrow::arrow::bitmap::Bitmap; +use databend_common_arrow::arrow::datatypes::DataType; +use databend_common_arrow::arrow::datatypes::Field; fn some_values() -> (DataType, Vec>) { let strings: Box = Box::new(Utf8Array::::from([ diff --git a/src/common/arrow/tests/it/arrow/array/growable/union.rs b/src/common/arrow/tests/it/arrow/array/growable/union.rs index bf610aa88bb5..342fe5fd1a14 100644 --- a/src/common/arrow/tests/it/arrow/array/growable/union.rs +++ b/src/common/arrow/tests/it/arrow/array/growable/union.rs @@ -13,11 +13,11 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_arrow::arrow::array::growable::Growable; -use common_arrow::arrow::array::growable::GrowableUnion; -use common_arrow::arrow::array::*; -use common_arrow::arrow::datatypes::*; -use common_arrow::arrow::error::Result; +use databend_common_arrow::arrow::array::growable::Growable; +use databend_common_arrow::arrow::array::growable::GrowableUnion; +use databend_common_arrow::arrow::array::*; +use databend_common_arrow::arrow::datatypes::*; +use databend_common_arrow::arrow::error::Result; #[test] fn sparse() -> Result<()> { diff --git a/src/common/arrow/tests/it/arrow/array/growable/utf8.rs b/src/common/arrow/tests/it/arrow/array/growable/utf8.rs index 5f6b2f4d05bb..582504c36d6b 100644 --- a/src/common/arrow/tests/it/arrow/array/growable/utf8.rs +++ b/src/common/arrow/tests/it/arrow/array/growable/utf8.rs @@ -13,9 +13,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_arrow::arrow::array::growable::Growable; -use common_arrow::arrow::array::growable::GrowableUtf8; -use common_arrow::arrow::array::Utf8Array; +use databend_common_arrow::arrow::array::growable::Growable; +use databend_common_arrow::arrow::array::growable::GrowableUtf8; +use databend_common_arrow::arrow::array::Utf8Array; /// tests extending from a variable-sized (strings and binary) array w/ offset with nulls #[test] diff --git a/src/common/arrow/tests/it/arrow/array/list/mod.rs b/src/common/arrow/tests/it/arrow/array/list/mod.rs index 26cd53e08162..1deec7a392fe 100644 --- a/src/common/arrow/tests/it/arrow/array/list/mod.rs +++ b/src/common/arrow/tests/it/arrow/array/list/mod.rs @@ -13,9 +13,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_arrow::arrow::array::*; -use common_arrow::arrow::buffer::Buffer; -use common_arrow::arrow::datatypes::DataType; +use databend_common_arrow::arrow::array::*; +use databend_common_arrow::arrow::buffer::Buffer; +use databend_common_arrow::arrow::datatypes::DataType; mod mutable; diff --git a/src/common/arrow/tests/it/arrow/array/list/mutable.rs b/src/common/arrow/tests/it/arrow/array/list/mutable.rs index a9a34479dc19..a18d2e41a1a2 100644 --- a/src/common/arrow/tests/it/arrow/array/list/mutable.rs +++ b/src/common/arrow/tests/it/arrow/array/list/mutable.rs @@ -13,10 +13,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_arrow::arrow::array::*; -use common_arrow::arrow::bitmap::Bitmap; -use common_arrow::arrow::buffer::Buffer; -use common_arrow::arrow::datatypes::DataType; +use databend_common_arrow::arrow::array::*; +use databend_common_arrow::arrow::bitmap::Bitmap; +use databend_common_arrow::arrow::buffer::Buffer; +use databend_common_arrow::arrow::datatypes::DataType; #[test] fn basics() { diff --git a/src/common/arrow/tests/it/arrow/array/map/mod.rs b/src/common/arrow/tests/it/arrow/array/map/mod.rs index 111ba4d5730b..c5f2322fef87 100644 --- a/src/common/arrow/tests/it/arrow/array/map/mod.rs +++ b/src/common/arrow/tests/it/arrow/array/map/mod.rs @@ -13,9 +13,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_arrow::arrow::array::*; -use common_arrow::arrow::datatypes::DataType; -use common_arrow::arrow::datatypes::Field; +use databend_common_arrow::arrow::array::*; +use databend_common_arrow::arrow::datatypes::DataType; +use databend_common_arrow::arrow::datatypes::Field; #[test] fn basics() { diff --git a/src/common/arrow/tests/it/arrow/array/mod.rs b/src/common/arrow/tests/it/arrow/array/mod.rs index 861e0b828c73..66fefaf3ceec 100644 --- a/src/common/arrow/tests/it/arrow/array/mod.rs +++ b/src/common/arrow/tests/it/arrow/array/mod.rs @@ -28,15 +28,15 @@ mod struct_; mod union; mod utf8; -use common_arrow::arrow::array::clone; -use common_arrow::arrow::array::new_empty_array; -use common_arrow::arrow::array::new_null_array; -use common_arrow::arrow::array::Array; -use common_arrow::arrow::array::PrimitiveArray; -use common_arrow::arrow::bitmap::Bitmap; -use common_arrow::arrow::datatypes::DataType; -use common_arrow::arrow::datatypes::Field; -use common_arrow::arrow::datatypes::UnionMode; +use databend_common_arrow::arrow::array::clone; +use databend_common_arrow::arrow::array::new_empty_array; +use databend_common_arrow::arrow::array::new_null_array; +use databend_common_arrow::arrow::array::Array; +use databend_common_arrow::arrow::array::PrimitiveArray; +use databend_common_arrow::arrow::bitmap::Bitmap; +use databend_common_arrow::arrow::datatypes::DataType; +use databend_common_arrow::arrow::datatypes::Field; +use databend_common_arrow::arrow::datatypes::UnionMode; #[test] fn nulls() { diff --git a/src/common/arrow/tests/it/arrow/array/ord.rs b/src/common/arrow/tests/it/arrow/array/ord.rs index 8554b0c73bbb..a5d297a2aec2 100644 --- a/src/common/arrow/tests/it/arrow/array/ord.rs +++ b/src/common/arrow/tests/it/arrow/array/ord.rs @@ -15,10 +15,10 @@ use std::cmp::Ordering; -use common_arrow::arrow::array::ord::build_compare; -use common_arrow::arrow::array::*; -use common_arrow::arrow::datatypes::DataType; -use common_arrow::arrow::error::Result; +use databend_common_arrow::arrow::array::ord::build_compare; +use databend_common_arrow::arrow::array::*; +use databend_common_arrow::arrow::datatypes::DataType; +use databend_common_arrow::arrow::error::Result; #[test] fn i32() -> Result<()> { diff --git a/src/common/arrow/tests/it/arrow/array/primitive/fmt.rs b/src/common/arrow/tests/it/arrow/array/primitive/fmt.rs index 03adbe2dc2ac..96515ca91eeb 100644 --- a/src/common/arrow/tests/it/arrow/array/primitive/fmt.rs +++ b/src/common/arrow/tests/it/arrow/array/primitive/fmt.rs @@ -13,10 +13,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_arrow::arrow::array::*; -use common_arrow::arrow::datatypes::*; -use common_arrow::arrow::types::days_ms; -use common_arrow::arrow::types::months_days_ns; +use databend_common_arrow::arrow::array::*; +use databend_common_arrow::arrow::datatypes::*; +use databend_common_arrow::arrow::types::days_ms; +use databend_common_arrow::arrow::types::months_days_ns; #[test] fn debug_int32() { diff --git a/src/common/arrow/tests/it/arrow/array/primitive/mod.rs b/src/common/arrow/tests/it/arrow/array/primitive/mod.rs index 03985b299c7d..ad9c1ce27872 100644 --- a/src/common/arrow/tests/it/arrow/array/primitive/mod.rs +++ b/src/common/arrow/tests/it/arrow/array/primitive/mod.rs @@ -15,11 +15,11 @@ use std::iter::FromIterator; -use common_arrow::arrow::array::*; -use common_arrow::arrow::bitmap::Bitmap; -use common_arrow::arrow::buffer::Buffer; -use common_arrow::arrow::datatypes::*; -use common_arrow::arrow::types::months_days_ns; +use databend_common_arrow::arrow::array::*; +use databend_common_arrow::arrow::bitmap::Bitmap; +use databend_common_arrow::arrow::buffer::Buffer; +use databend_common_arrow::arrow::datatypes::*; +use databend_common_arrow::arrow::types::months_days_ns; mod fmt; mod mutable; diff --git a/src/common/arrow/tests/it/arrow/array/primitive/mutable.rs b/src/common/arrow/tests/it/arrow/array/primitive/mutable.rs index 408264d8d1ad..57f173dd6cc5 100644 --- a/src/common/arrow/tests/it/arrow/array/primitive/mutable.rs +++ b/src/common/arrow/tests/it/arrow/array/primitive/mutable.rs @@ -15,11 +15,11 @@ use std::iter::FromIterator; -use common_arrow::arrow::array::*; -use common_arrow::arrow::bitmap::Bitmap; -use common_arrow::arrow::bitmap::MutableBitmap; -use common_arrow::arrow::datatypes::DataType; -use common_arrow::arrow::error::Result; +use databend_common_arrow::arrow::array::*; +use databend_common_arrow::arrow::bitmap::Bitmap; +use databend_common_arrow::arrow::bitmap::MutableBitmap; +use databend_common_arrow::arrow::datatypes::DataType; +use databend_common_arrow::arrow::error::Result; #[test] fn from_and_into_data() { diff --git a/src/common/arrow/tests/it/arrow/array/primitive/to_mutable.rs b/src/common/arrow/tests/it/arrow/array/primitive/to_mutable.rs index 9177e1a37851..b8ed0689ab9c 100644 --- a/src/common/arrow/tests/it/arrow/array/primitive/to_mutable.rs +++ b/src/common/arrow/tests/it/arrow/array/primitive/to_mutable.rs @@ -13,9 +13,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_arrow::arrow::array::PrimitiveArray; -use common_arrow::arrow::bitmap::Bitmap; -use common_arrow::arrow::datatypes::DataType; +use databend_common_arrow::arrow::array::PrimitiveArray; +use databend_common_arrow::arrow::bitmap::Bitmap; +use databend_common_arrow::arrow::datatypes::DataType; use either::Either; #[test] diff --git a/src/common/arrow/tests/it/arrow/array/struct_/iterator.rs b/src/common/arrow/tests/it/arrow/array/struct_/iterator.rs index 951bfa3c6bb9..b28c4ff3fd1a 100644 --- a/src/common/arrow/tests/it/arrow/array/struct_/iterator.rs +++ b/src/common/arrow/tests/it/arrow/array/struct_/iterator.rs @@ -13,9 +13,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_arrow::arrow::array::*; -use common_arrow::arrow::datatypes::*; -use common_arrow::arrow::scalar::new_scalar; +use databend_common_arrow::arrow::array::*; +use databend_common_arrow::arrow::datatypes::*; +use databend_common_arrow::arrow::scalar::new_scalar; #[test] fn test_simple_iter() { diff --git a/src/common/arrow/tests/it/arrow/array/struct_/mod.rs b/src/common/arrow/tests/it/arrow/array/struct_/mod.rs index 93a1701809f1..fe9618fdb702 100644 --- a/src/common/arrow/tests/it/arrow/array/struct_/mod.rs +++ b/src/common/arrow/tests/it/arrow/array/struct_/mod.rs @@ -16,9 +16,9 @@ mod iterator; mod mutable; -use common_arrow::arrow::array::*; -use common_arrow::arrow::bitmap::Bitmap; -use common_arrow::arrow::datatypes::*; +use databend_common_arrow::arrow::array::*; +use databend_common_arrow::arrow::bitmap::Bitmap; +use databend_common_arrow::arrow::datatypes::*; #[test] fn debug() { diff --git a/src/common/arrow/tests/it/arrow/array/struct_/mutable.rs b/src/common/arrow/tests/it/arrow/array/struct_/mutable.rs index 3ada82013446..21c0fdc7eca3 100644 --- a/src/common/arrow/tests/it/arrow/array/struct_/mutable.rs +++ b/src/common/arrow/tests/it/arrow/array/struct_/mutable.rs @@ -13,9 +13,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_arrow::arrow::array::*; -use common_arrow::arrow::datatypes::DataType; -use common_arrow::arrow::datatypes::Field; +use databend_common_arrow::arrow::array::*; +use databend_common_arrow::arrow::datatypes::DataType; +use databend_common_arrow::arrow::datatypes::Field; #[test] fn push() { diff --git a/src/common/arrow/tests/it/arrow/array/union.rs b/src/common/arrow/tests/it/arrow/array/union.rs index 103b037abb30..8b2b88b70aff 100644 --- a/src/common/arrow/tests/it/arrow/array/union.rs +++ b/src/common/arrow/tests/it/arrow/array/union.rs @@ -13,15 +13,15 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_arrow::arrow::array::*; -use common_arrow::arrow::buffer::Buffer; -use common_arrow::arrow::datatypes::*; -use common_arrow::arrow::error::Result; -use common_arrow::arrow::scalar::new_scalar; -use common_arrow::arrow::scalar::PrimitiveScalar; -use common_arrow::arrow::scalar::Scalar; -use common_arrow::arrow::scalar::UnionScalar; -use common_arrow::arrow::scalar::Utf8Scalar; +use databend_common_arrow::arrow::array::*; +use databend_common_arrow::arrow::buffer::Buffer; +use databend_common_arrow::arrow::datatypes::*; +use databend_common_arrow::arrow::error::Result; +use databend_common_arrow::arrow::scalar::new_scalar; +use databend_common_arrow::arrow::scalar::PrimitiveScalar; +use databend_common_arrow::arrow::scalar::Scalar; +use databend_common_arrow::arrow::scalar::UnionScalar; +use databend_common_arrow::arrow::scalar::Utf8Scalar; fn next_unwrap(iter: &mut I) -> T where diff --git a/src/common/arrow/tests/it/arrow/array/utf8/mod.rs b/src/common/arrow/tests/it/arrow/array/utf8/mod.rs index 41e69bc3171c..7cbe4116336f 100644 --- a/src/common/arrow/tests/it/arrow/array/utf8/mod.rs +++ b/src/common/arrow/tests/it/arrow/array/utf8/mod.rs @@ -13,12 +13,12 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_arrow::arrow::array::*; -use common_arrow::arrow::bitmap::Bitmap; -use common_arrow::arrow::buffer::Buffer; -use common_arrow::arrow::datatypes::DataType; -use common_arrow::arrow::error::Result; -use common_arrow::arrow::offset::OffsetsBuffer; +use databend_common_arrow::arrow::array::*; +use databend_common_arrow::arrow::bitmap::Bitmap; +use databend_common_arrow::arrow::buffer::Buffer; +use databend_common_arrow::arrow::datatypes::DataType; +use databend_common_arrow::arrow::error::Result; +use databend_common_arrow::arrow::offset::OffsetsBuffer; mod mutable; mod mutable_values; diff --git a/src/common/arrow/tests/it/arrow/array/utf8/mutable.rs b/src/common/arrow/tests/it/arrow/array/utf8/mutable.rs index 77877329dda1..4f03eb2ef00a 100644 --- a/src/common/arrow/tests/it/arrow/array/utf8/mutable.rs +++ b/src/common/arrow/tests/it/arrow/array/utf8/mutable.rs @@ -13,12 +13,12 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_arrow::arrow::array::MutableArray; -use common_arrow::arrow::array::MutableUtf8Array; -use common_arrow::arrow::array::TryExtendFromSelf; -use common_arrow::arrow::array::Utf8Array; -use common_arrow::arrow::bitmap::Bitmap; -use common_arrow::arrow::datatypes::DataType; +use databend_common_arrow::arrow::array::MutableArray; +use databend_common_arrow::arrow::array::MutableUtf8Array; +use databend_common_arrow::arrow::array::TryExtendFromSelf; +use databend_common_arrow::arrow::array::Utf8Array; +use databend_common_arrow::arrow::bitmap::Bitmap; +use databend_common_arrow::arrow::datatypes::DataType; #[test] fn capacities() { diff --git a/src/common/arrow/tests/it/arrow/array/utf8/mutable_values.rs b/src/common/arrow/tests/it/arrow/array/utf8/mutable_values.rs index aa53baae4cca..edf61ceac642 100644 --- a/src/common/arrow/tests/it/arrow/array/utf8/mutable_values.rs +++ b/src/common/arrow/tests/it/arrow/array/utf8/mutable_values.rs @@ -13,9 +13,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_arrow::arrow::array::MutableArray; -use common_arrow::arrow::array::MutableUtf8ValuesArray; -use common_arrow::arrow::datatypes::DataType; +use databend_common_arrow::arrow::array::MutableArray; +use databend_common_arrow::arrow::array::MutableUtf8ValuesArray; +use databend_common_arrow::arrow::datatypes::DataType; #[test] fn capacity() { diff --git a/src/common/arrow/tests/it/arrow/array/utf8/to_mutable.rs b/src/common/arrow/tests/it/arrow/array/utf8/to_mutable.rs index 8be16251fa16..5dd214f6bb17 100644 --- a/src/common/arrow/tests/it/arrow/array/utf8/to_mutable.rs +++ b/src/common/arrow/tests/it/arrow/array/utf8/to_mutable.rs @@ -13,11 +13,11 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_arrow::arrow::array::Utf8Array; -use common_arrow::arrow::bitmap::Bitmap; -use common_arrow::arrow::buffer::Buffer; -use common_arrow::arrow::datatypes::DataType; -use common_arrow::arrow::offset::OffsetsBuffer; +use databend_common_arrow::arrow::array::Utf8Array; +use databend_common_arrow::arrow::bitmap::Bitmap; +use databend_common_arrow::arrow::buffer::Buffer; +use databend_common_arrow::arrow::datatypes::DataType; +use databend_common_arrow::arrow::offset::OffsetsBuffer; #[test] fn not_shared() { diff --git a/src/common/arrow/tests/it/arrow/arrow_data.rs b/src/common/arrow/tests/it/arrow/arrow_data.rs index 457ddddc7220..61831769e862 100644 --- a/src/common/arrow/tests/it/arrow/arrow_data.rs +++ b/src/common/arrow/tests/it/arrow/arrow_data.rs @@ -15,14 +15,14 @@ use arrow_array::ArrayRef; use arrow_data::ArrayDataBuilder; -use common_arrow::arrow::array::*; -use common_arrow::arrow::bitmap::Bitmap; -use common_arrow::arrow::datatypes::DataType; -use common_arrow::arrow::datatypes::Field; -use common_arrow::arrow::datatypes::IntegerType; -use common_arrow::arrow::datatypes::TimeUnit; -use common_arrow::arrow::datatypes::UnionMode; -use common_arrow::arrow::offset::Offsets; +use databend_common_arrow::arrow::array::*; +use databend_common_arrow::arrow::bitmap::Bitmap; +use databend_common_arrow::arrow::datatypes::DataType; +use databend_common_arrow::arrow::datatypes::Field; +use databend_common_arrow::arrow::datatypes::IntegerType; +use databend_common_arrow::arrow::datatypes::TimeUnit; +use databend_common_arrow::arrow::datatypes::UnionMode; +use databend_common_arrow::arrow::offset::Offsets; use proptest::num::i32; fn test_arrow2_roundtrip(array: &dyn arrow_array::Array) { diff --git a/src/common/arrow/tests/it/arrow/bitmap/assign_ops.rs b/src/common/arrow/tests/it/arrow/bitmap/assign_ops.rs index 04708a631a71..f4335128bb75 100644 --- a/src/common/arrow/tests/it/arrow/bitmap/assign_ops.rs +++ b/src/common/arrow/tests/it/arrow/bitmap/assign_ops.rs @@ -13,10 +13,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_arrow::arrow::bitmap::binary_assign; -use common_arrow::arrow::bitmap::unary_assign; -use common_arrow::arrow::bitmap::Bitmap; -use common_arrow::arrow::bitmap::MutableBitmap; +use databend_common_arrow::arrow::bitmap::binary_assign; +use databend_common_arrow::arrow::bitmap::unary_assign; +use databend_common_arrow::arrow::bitmap::Bitmap; +use databend_common_arrow::arrow::bitmap::MutableBitmap; use proptest::prelude::*; use crate::arrow::bitmap::bitmap_strategy; diff --git a/src/common/arrow/tests/it/arrow/bitmap/bitmap_ops.rs b/src/common/arrow/tests/it/arrow/bitmap/bitmap_ops.rs index ff7fc5870b22..db4d2c673860 100644 --- a/src/common/arrow/tests/it/arrow/bitmap/bitmap_ops.rs +++ b/src/common/arrow/tests/it/arrow/bitmap/bitmap_ops.rs @@ -13,10 +13,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_arrow::arrow::bitmap::and; -use common_arrow::arrow::bitmap::or; -use common_arrow::arrow::bitmap::xor; -use common_arrow::arrow::bitmap::Bitmap; +use databend_common_arrow::arrow::bitmap::and; +use databend_common_arrow::arrow::bitmap::or; +use databend_common_arrow::arrow::bitmap::xor; +use databend_common_arrow::arrow::bitmap::Bitmap; use proptest::prelude::*; use crate::arrow::bitmap::bitmap_strategy; diff --git a/src/common/arrow/tests/it/arrow/bitmap/immutable.rs b/src/common/arrow/tests/it/arrow/bitmap/immutable.rs index aa2187a22a1b..6724c571eb26 100644 --- a/src/common/arrow/tests/it/arrow/bitmap/immutable.rs +++ b/src/common/arrow/tests/it/arrow/bitmap/immutable.rs @@ -13,7 +13,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_arrow::arrow::bitmap::Bitmap; +use databend_common_arrow::arrow::bitmap::Bitmap; #[test] fn as_slice() { diff --git a/src/common/arrow/tests/it/arrow/bitmap/mod.rs b/src/common/arrow/tests/it/arrow/bitmap/mod.rs index cde33ed8182e..339cfc27d05e 100644 --- a/src/common/arrow/tests/it/arrow/bitmap/mod.rs +++ b/src/common/arrow/tests/it/arrow/bitmap/mod.rs @@ -19,7 +19,7 @@ mod immutable; mod mutable; mod utils; -use common_arrow::arrow::bitmap::Bitmap; +use databend_common_arrow::arrow::bitmap::Bitmap; use proptest::prelude::*; /// Returns a strategy of an arbitrary sliced [`Bitmap`] of size up to 1000 diff --git a/src/common/arrow/tests/it/arrow/bitmap/mutable.rs b/src/common/arrow/tests/it/arrow/bitmap/mutable.rs index fea53934e02a..3d470d8a2dcb 100644 --- a/src/common/arrow/tests/it/arrow/bitmap/mutable.rs +++ b/src/common/arrow/tests/it/arrow/bitmap/mutable.rs @@ -13,8 +13,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_arrow::arrow::bitmap::Bitmap; -use common_arrow::arrow::bitmap::MutableBitmap; +use databend_common_arrow::arrow::bitmap::Bitmap; +use databend_common_arrow::arrow::bitmap::MutableBitmap; #[test] fn from_slice() { diff --git a/src/common/arrow/tests/it/arrow/bitmap/utils/bit_chunks_exact.rs b/src/common/arrow/tests/it/arrow/bitmap/utils/bit_chunks_exact.rs index a4093a5e49c6..0fa1307d9b68 100644 --- a/src/common/arrow/tests/it/arrow/bitmap/utils/bit_chunks_exact.rs +++ b/src/common/arrow/tests/it/arrow/bitmap/utils/bit_chunks_exact.rs @@ -13,7 +13,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_arrow::arrow::bitmap::utils::BitChunksExact; +use databend_common_arrow::arrow::bitmap::utils::BitChunksExact; #[test] fn basics() { diff --git a/src/common/arrow/tests/it/arrow/bitmap/utils/chunk_iter.rs b/src/common/arrow/tests/it/arrow/bitmap/utils/chunk_iter.rs index c17dc179f4fd..9e038d6e0887 100644 --- a/src/common/arrow/tests/it/arrow/bitmap/utils/chunk_iter.rs +++ b/src/common/arrow/tests/it/arrow/bitmap/utils/chunk_iter.rs @@ -13,8 +13,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_arrow::arrow::bitmap::utils::BitChunks; -use common_arrow::arrow::types::BitChunkIter; +use databend_common_arrow::arrow::bitmap::utils::BitChunks; +use databend_common_arrow::arrow::types::BitChunkIter; #[test] fn basics() { diff --git a/src/common/arrow/tests/it/arrow/bitmap/utils/fmt.rs b/src/common/arrow/tests/it/arrow/bitmap/utils/fmt.rs index e770964b2e4a..53f112050233 100644 --- a/src/common/arrow/tests/it/arrow/bitmap/utils/fmt.rs +++ b/src/common/arrow/tests/it/arrow/bitmap/utils/fmt.rs @@ -13,7 +13,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_arrow::arrow::bitmap::utils::fmt; +use databend_common_arrow::arrow::bitmap::utils::fmt; struct A<'a>(&'a [u8], usize, usize); diff --git a/src/common/arrow/tests/it/arrow/bitmap/utils/iterator.rs b/src/common/arrow/tests/it/arrow/bitmap/utils/iterator.rs index 7cfe717b7d40..1c7dd9d8fe1f 100644 --- a/src/common/arrow/tests/it/arrow/bitmap/utils/iterator.rs +++ b/src/common/arrow/tests/it/arrow/bitmap/utils/iterator.rs @@ -13,7 +13,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_arrow::arrow::bitmap::utils::BitmapIter; +use databend_common_arrow::arrow::bitmap::utils::BitmapIter; #[test] fn basic() { diff --git a/src/common/arrow/tests/it/arrow/bitmap/utils/mod.rs b/src/common/arrow/tests/it/arrow/bitmap/utils/mod.rs index cd3f2f999087..561ba99e5387 100644 --- a/src/common/arrow/tests/it/arrow/bitmap/utils/mod.rs +++ b/src/common/arrow/tests/it/arrow/bitmap/utils/mod.rs @@ -13,7 +13,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_arrow::arrow::bitmap::utils::*; +use databend_common_arrow::arrow::bitmap::utils::*; use proptest::prelude::*; use crate::arrow::bitmap::bitmap_strategy; diff --git a/src/common/arrow/tests/it/arrow/bitmap/utils/slice_iterator.rs b/src/common/arrow/tests/it/arrow/bitmap/utils/slice_iterator.rs index fc1604fa320c..c96efee79d1c 100644 --- a/src/common/arrow/tests/it/arrow/bitmap/utils/slice_iterator.rs +++ b/src/common/arrow/tests/it/arrow/bitmap/utils/slice_iterator.rs @@ -13,8 +13,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_arrow::arrow::bitmap::utils::SlicesIterator; -use common_arrow::arrow::bitmap::Bitmap; +use databend_common_arrow::arrow::bitmap::utils::SlicesIterator; +use databend_common_arrow::arrow::bitmap::Bitmap; use proptest::prelude::*; use crate::arrow::bitmap::bitmap_strategy; diff --git a/src/common/arrow/tests/it/arrow/bitmap/utils/zip_validity.rs b/src/common/arrow/tests/it/arrow/bitmap/utils/zip_validity.rs index bb2f0fb79025..73ffb7249f81 100644 --- a/src/common/arrow/tests/it/arrow/bitmap/utils/zip_validity.rs +++ b/src/common/arrow/tests/it/arrow/bitmap/utils/zip_validity.rs @@ -13,9 +13,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_arrow::arrow::bitmap::utils::BitmapIter; -use common_arrow::arrow::bitmap::utils::ZipValidity; -use common_arrow::arrow::bitmap::Bitmap; +use databend_common_arrow::arrow::bitmap::utils::BitmapIter; +use databend_common_arrow::arrow::bitmap::utils::ZipValidity; +use databend_common_arrow::arrow::bitmap::Bitmap; #[test] fn basic() { diff --git a/src/common/arrow/tests/it/arrow/buffer/immutable.rs b/src/common/arrow/tests/it/arrow/buffer/immutable.rs index a5914aae7303..4252be713ca7 100644 --- a/src/common/arrow/tests/it/arrow/buffer/immutable.rs +++ b/src/common/arrow/tests/it/arrow/buffer/immutable.rs @@ -13,7 +13,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_arrow::arrow::buffer::Buffer; +use databend_common_arrow::arrow::buffer::Buffer; #[test] fn new() { diff --git a/src/common/arrow/tests/it/arrow/compute/aggregate/memory.rs b/src/common/arrow/tests/it/arrow/compute/aggregate/memory.rs index a9dac713eafb..066e2e2923ee 100644 --- a/src/common/arrow/tests/it/arrow/compute/aggregate/memory.rs +++ b/src/common/arrow/tests/it/arrow/compute/aggregate/memory.rs @@ -13,10 +13,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_arrow::arrow::array::*; -use common_arrow::arrow::compute::aggregate::estimated_bytes_size; -use common_arrow::arrow::datatypes::DataType; -use common_arrow::arrow::datatypes::Field; +use databend_common_arrow::arrow::array::*; +use databend_common_arrow::arrow::compute::aggregate::estimated_bytes_size; +use databend_common_arrow::arrow::datatypes::DataType; +use databend_common_arrow::arrow::datatypes::Field; #[test] fn primitive() { diff --git a/src/common/arrow/tests/it/arrow/compute/cast.rs b/src/common/arrow/tests/it/arrow/compute/cast.rs index 283e5906b366..cba4f4e2cea2 100644 --- a/src/common/arrow/tests/it/arrow/compute/cast.rs +++ b/src/common/arrow/tests/it/arrow/compute/cast.rs @@ -13,15 +13,15 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_arrow::arrow::array::*; -use common_arrow::arrow::compute::cast::can_cast_types; -use common_arrow::arrow::compute::cast::cast; -use common_arrow::arrow::compute::cast::CastOptions; -use common_arrow::arrow::datatypes::DataType::LargeList; -use common_arrow::arrow::datatypes::*; -use common_arrow::arrow::types::days_ms; -use common_arrow::arrow::types::months_days_ns; -use common_arrow::arrow::types::NativeType; +use databend_common_arrow::arrow::array::*; +use databend_common_arrow::arrow::compute::cast::can_cast_types; +use databend_common_arrow::arrow::compute::cast::cast; +use databend_common_arrow::arrow::compute::cast::CastOptions; +use databend_common_arrow::arrow::datatypes::DataType::LargeList; +use databend_common_arrow::arrow::datatypes::*; +use databend_common_arrow::arrow::types::days_ms; +use databend_common_arrow::arrow::types::months_days_ns; +use databend_common_arrow::arrow::types::NativeType; #[test] fn i32_to_f64() { diff --git a/src/common/arrow/tests/it/arrow/compute/concatenate.rs b/src/common/arrow/tests/it/arrow/compute/concatenate.rs index e9f016159c96..4efb72284424 100644 --- a/src/common/arrow/tests/it/arrow/compute/concatenate.rs +++ b/src/common/arrow/tests/it/arrow/compute/concatenate.rs @@ -13,9 +13,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_arrow::arrow::array::*; -use common_arrow::arrow::compute::concatenate::concatenate; -use common_arrow::arrow::error::Result; +use databend_common_arrow::arrow::array::*; +use databend_common_arrow::arrow::compute::concatenate::concatenate; +use databend_common_arrow::arrow::error::Result; #[test] fn empty_vec() { diff --git a/src/common/arrow/tests/it/arrow/compute/merge_sort.rs b/src/common/arrow/tests/it/arrow/compute/merge_sort.rs index f70c5964b964..e5df1e605431 100644 --- a/src/common/arrow/tests/it/arrow/compute/merge_sort.rs +++ b/src/common/arrow/tests/it/arrow/compute/merge_sort.rs @@ -15,10 +15,10 @@ use std::iter::once; -use common_arrow::arrow::array::*; -use common_arrow::arrow::compute::merge_sort::*; -use common_arrow::arrow::compute::sort::sort; -use common_arrow::arrow::error::Result; +use databend_common_arrow::arrow::array::*; +use databend_common_arrow::arrow::compute::merge_sort::*; +use databend_common_arrow::arrow::compute::sort::sort; +use databend_common_arrow::arrow::error::Result; #[test] fn merge_u32() -> Result<()> { diff --git a/src/common/arrow/tests/it/arrow/compute/sort/lex_sort.rs b/src/common/arrow/tests/it/arrow/compute/sort/lex_sort.rs index 92e76baaa395..94f9104036b2 100644 --- a/src/common/arrow/tests/it/arrow/compute/sort/lex_sort.rs +++ b/src/common/arrow/tests/it/arrow/compute/sort/lex_sort.rs @@ -13,10 +13,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_arrow::arrow::array::*; -use common_arrow::arrow::compute::sort::lexsort; -use common_arrow::arrow::compute::sort::SortColumn; -use common_arrow::arrow::compute::sort::SortOptions; +use databend_common_arrow::arrow::array::*; +use databend_common_arrow::arrow::compute::sort::lexsort; +use databend_common_arrow::arrow::compute::sort::SortColumn; +use databend_common_arrow::arrow::compute::sort::SortOptions; fn test_lex_sort_arrays(input: Vec, expected: Vec>) { let sorted = lexsort::(&input, None).unwrap(); diff --git a/src/common/arrow/tests/it/arrow/compute/sort/mod.rs b/src/common/arrow/tests/it/arrow/compute/sort/mod.rs index 3c6993a0d9f9..326da7cba549 100644 --- a/src/common/arrow/tests/it/arrow/compute/sort/mod.rs +++ b/src/common/arrow/tests/it/arrow/compute/sort/mod.rs @@ -16,10 +16,10 @@ mod lex_sort; mod row; -use common_arrow::arrow::array::*; -use common_arrow::arrow::compute::sort::*; -use common_arrow::arrow::datatypes::*; -use common_arrow::arrow::types::NativeType; +use databend_common_arrow::arrow::array::*; +use databend_common_arrow::arrow::compute::sort::*; +use databend_common_arrow::arrow::datatypes::*; +use databend_common_arrow::arrow::types::NativeType; fn to_indices_boolean_arrays(data: &[Option], options: SortOptions, expected_data: &[i32]) { let output = BooleanArray::from(data); @@ -561,9 +561,9 @@ fn string_dicts() { #[test] fn consistency() { - use common_arrow::arrow::array::new_null_array; - use common_arrow::arrow::datatypes::DataType::*; - use common_arrow::arrow::datatypes::TimeUnit; + use databend_common_arrow::arrow::array::new_null_array; + use databend_common_arrow::arrow::datatypes::DataType::*; + use databend_common_arrow::arrow::datatypes::TimeUnit; let datatypes = vec![ Null, diff --git a/src/common/arrow/tests/it/arrow/compute/sort/row/mod.rs b/src/common/arrow/tests/it/arrow/compute/sort/row/mod.rs index b3cd030c6a70..b69d9723d3b7 100644 --- a/src/common/arrow/tests/it/arrow/compute/sort/row/mod.rs +++ b/src/common/arrow/tests/it/arrow/compute/sort/row/mod.rs @@ -13,28 +13,28 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_arrow::arrow::array::Array; -use common_arrow::arrow::array::BinaryArray; -use common_arrow::arrow::array::BooleanArray; -use common_arrow::arrow::array::DictionaryArray; -use common_arrow::arrow::array::Float32Array; -use common_arrow::arrow::array::Int128Array; -use common_arrow::arrow::array::Int16Array; -use common_arrow::arrow::array::Int256Array; -use common_arrow::arrow::array::Int32Array; -use common_arrow::arrow::array::MutableDictionaryArray; -use common_arrow::arrow::array::MutablePrimitiveArray; -use common_arrow::arrow::array::MutableUtf8Array; -use common_arrow::arrow::array::NullArray; -use common_arrow::arrow::array::TryExtend; -use common_arrow::arrow::array::TryPush; -use common_arrow::arrow::array::Utf8Array; -use common_arrow::arrow::compute::sort::row::RowConverter; -use common_arrow::arrow::compute::sort::row::SortField; -use common_arrow::arrow::compute::sort::SortOptions; -use common_arrow::arrow::datatypes::DataType; -use common_arrow::arrow::datatypes::IntegerType; -use common_arrow::arrow::types::i256; +use databend_common_arrow::arrow::array::Array; +use databend_common_arrow::arrow::array::BinaryArray; +use databend_common_arrow::arrow::array::BooleanArray; +use databend_common_arrow::arrow::array::DictionaryArray; +use databend_common_arrow::arrow::array::Float32Array; +use databend_common_arrow::arrow::array::Int128Array; +use databend_common_arrow::arrow::array::Int16Array; +use databend_common_arrow::arrow::array::Int256Array; +use databend_common_arrow::arrow::array::Int32Array; +use databend_common_arrow::arrow::array::MutableDictionaryArray; +use databend_common_arrow::arrow::array::MutablePrimitiveArray; +use databend_common_arrow::arrow::array::MutableUtf8Array; +use databend_common_arrow::arrow::array::NullArray; +use databend_common_arrow::arrow::array::TryExtend; +use databend_common_arrow::arrow::array::TryPush; +use databend_common_arrow::arrow::array::Utf8Array; +use databend_common_arrow::arrow::compute::sort::row::RowConverter; +use databend_common_arrow::arrow::compute::sort::row::SortField; +use databend_common_arrow::arrow::compute::sort::SortOptions; +use databend_common_arrow::arrow::datatypes::DataType; +use databend_common_arrow::arrow::datatypes::IntegerType; +use databend_common_arrow::arrow::types::i256; #[test] fn test_fixed_width() { diff --git a/src/common/arrow/tests/it/arrow/compute/take.rs b/src/common/arrow/tests/it/arrow/compute/take.rs index 8bb6d8963cf0..8e9f6049346d 100644 --- a/src/common/arrow/tests/it/arrow/compute/take.rs +++ b/src/common/arrow/tests/it/arrow/compute/take.rs @@ -13,17 +13,17 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_arrow::arrow::array::*; -use common_arrow::arrow::bitmap::Bitmap; -use common_arrow::arrow::bitmap::MutableBitmap; -use common_arrow::arrow::buffer::Buffer; -use common_arrow::arrow::compute::take::can_take; -use common_arrow::arrow::compute::take::take; -use common_arrow::arrow::datatypes::DataType; -use common_arrow::arrow::datatypes::Field; -use common_arrow::arrow::datatypes::IntervalUnit; -use common_arrow::arrow::error::Result; -use common_arrow::arrow::types::NativeType; +use databend_common_arrow::arrow::array::*; +use databend_common_arrow::arrow::bitmap::Bitmap; +use databend_common_arrow::arrow::bitmap::MutableBitmap; +use databend_common_arrow::arrow::buffer::Buffer; +use databend_common_arrow::arrow::compute::take::can_take; +use databend_common_arrow::arrow::compute::take::take; +use databend_common_arrow::arrow::datatypes::DataType; +use databend_common_arrow::arrow::datatypes::Field; +use databend_common_arrow::arrow::datatypes::IntervalUnit; +use databend_common_arrow::arrow::error::Result; +use databend_common_arrow::arrow::types::NativeType; fn test_take_primitive( data: &[Option], @@ -123,9 +123,9 @@ fn test_struct_with_nulls() { #[test] fn consistency() { - use common_arrow::arrow::array::new_null_array; - use common_arrow::arrow::datatypes::DataType::*; - use common_arrow::arrow::datatypes::TimeUnit; + use databend_common_arrow::arrow::array::new_null_array; + use databend_common_arrow::arrow::datatypes::DataType::*; + use databend_common_arrow::arrow::datatypes::TimeUnit; let datatypes = vec![ Null, diff --git a/src/common/arrow/tests/it/arrow/ffi/data.rs b/src/common/arrow/tests/it/arrow/ffi/data.rs index d85e27ee26d6..a2cec83b99b3 100644 --- a/src/common/arrow/tests/it/arrow/ffi/data.rs +++ b/src/common/arrow/tests/it/arrow/ffi/data.rs @@ -15,13 +15,13 @@ use std::collections::BTreeMap; -use common_arrow::arrow::array::*; -use common_arrow::arrow::bitmap::Bitmap; -use common_arrow::arrow::datatypes::DataType; -use common_arrow::arrow::datatypes::Field; -use common_arrow::arrow::datatypes::TimeUnit; -use common_arrow::arrow::error::Result; -use common_arrow::arrow::ffi; +use databend_common_arrow::arrow::array::*; +use databend_common_arrow::arrow::bitmap::Bitmap; +use databend_common_arrow::arrow::datatypes::DataType; +use databend_common_arrow::arrow::datatypes::Field; +use databend_common_arrow::arrow::datatypes::TimeUnit; +use databend_common_arrow::arrow::error::Result; +use databend_common_arrow::arrow::ffi; fn _test_round_trip(array: Box, expected: Box) -> Result<()> { let field = Field::new("a", array.data_type().clone(), true); diff --git a/src/common/arrow/tests/it/arrow/ffi/mod.rs b/src/common/arrow/tests/it/arrow/ffi/mod.rs index 5fe46d282322..88cc3aa1eea8 100644 --- a/src/common/arrow/tests/it/arrow/ffi/mod.rs +++ b/src/common/arrow/tests/it/arrow/ffi/mod.rs @@ -16,10 +16,12 @@ mod data; mod stream; +use databend_common_arrow::arrow::ffi::mmap; + #[test] fn mmap_slice() { let slice = &[1, 2, 3]; - let array = unsafe { common_arrow::arrow::ffi::mmap::slice(slice) }; + let array = unsafe { mmap::slice(slice) }; assert_eq!(array.values().as_ref(), &[1, 2, 3]); // note: when `slice` is dropped, array must be dropped as-well since by construction of `slice` they share their lifetimes. } @@ -27,7 +29,7 @@ fn mmap_slice() { #[test] fn mmap_bitmap() { let slice = &[123u8, 255]; - let array = unsafe { common_arrow::arrow::ffi::mmap::bitmap(slice, 2, 14) }.unwrap(); + let array = unsafe { mmap::bitmap(slice, 2, 14) }.unwrap(); assert_eq!(array.values_iter().collect::>(), &[ false, true, true, true, true, false, true, true, true, true, true, true, true, true ]); diff --git a/src/common/arrow/tests/it/arrow/ffi/stream.rs b/src/common/arrow/tests/it/arrow/ffi/stream.rs index e60bc1a3b299..76c60ffe74f0 100644 --- a/src/common/arrow/tests/it/arrow/ffi/stream.rs +++ b/src/common/arrow/tests/it/arrow/ffi/stream.rs @@ -13,11 +13,11 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_arrow::arrow::array::*; -use common_arrow::arrow::datatypes::Field; -use common_arrow::arrow::error::Error; -use common_arrow::arrow::error::Result; -use common_arrow::arrow::ffi; +use databend_common_arrow::arrow::array::*; +use databend_common_arrow::arrow::datatypes::Field; +use databend_common_arrow::arrow::error::Error; +use databend_common_arrow::arrow::error::Result; +use databend_common_arrow::arrow::ffi; fn _test_round_trip(arrays: Vec>) -> Result<()> { let field = Field::new("a", arrays[0].data_type().clone(), true); diff --git a/src/common/arrow/tests/it/arrow/scalar/binary.rs b/src/common/arrow/tests/it/arrow/scalar/binary.rs index c1cfd294ca55..3f1d4c6e0baa 100644 --- a/src/common/arrow/tests/it/arrow/scalar/binary.rs +++ b/src/common/arrow/tests/it/arrow/scalar/binary.rs @@ -13,9 +13,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_arrow::arrow::datatypes::DataType; -use common_arrow::arrow::scalar::BinaryScalar; -use common_arrow::arrow::scalar::Scalar; +use databend_common_arrow::arrow::datatypes::DataType; +use databend_common_arrow::arrow::scalar::BinaryScalar; +use databend_common_arrow::arrow::scalar::Scalar; #[allow(clippy::eq_op)] #[test] diff --git a/src/common/arrow/tests/it/arrow/scalar/boolean.rs b/src/common/arrow/tests/it/arrow/scalar/boolean.rs index 2303234c0004..55f7989809c1 100644 --- a/src/common/arrow/tests/it/arrow/scalar/boolean.rs +++ b/src/common/arrow/tests/it/arrow/scalar/boolean.rs @@ -13,9 +13,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_arrow::arrow::datatypes::DataType; -use common_arrow::arrow::scalar::BooleanScalar; -use common_arrow::arrow::scalar::Scalar; +use databend_common_arrow::arrow::datatypes::DataType; +use databend_common_arrow::arrow::scalar::BooleanScalar; +use databend_common_arrow::arrow::scalar::Scalar; #[allow(clippy::eq_op)] #[test] diff --git a/src/common/arrow/tests/it/arrow/scalar/fixed_size_binary.rs b/src/common/arrow/tests/it/arrow/scalar/fixed_size_binary.rs index 32eb651da2ef..f49b4f5db726 100644 --- a/src/common/arrow/tests/it/arrow/scalar/fixed_size_binary.rs +++ b/src/common/arrow/tests/it/arrow/scalar/fixed_size_binary.rs @@ -13,9 +13,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_arrow::arrow::datatypes::DataType; -use common_arrow::arrow::scalar::FixedSizeBinaryScalar; -use common_arrow::arrow::scalar::Scalar; +use databend_common_arrow::arrow::datatypes::DataType; +use databend_common_arrow::arrow::scalar::FixedSizeBinaryScalar; +use databend_common_arrow::arrow::scalar::Scalar; #[allow(clippy::eq_op)] #[test] diff --git a/src/common/arrow/tests/it/arrow/scalar/fixed_size_list.rs b/src/common/arrow/tests/it/arrow/scalar/fixed_size_list.rs index e0bc55249b7c..88f893dc9ae0 100644 --- a/src/common/arrow/tests/it/arrow/scalar/fixed_size_list.rs +++ b/src/common/arrow/tests/it/arrow/scalar/fixed_size_list.rs @@ -13,11 +13,11 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_arrow::arrow::array::BooleanArray; -use common_arrow::arrow::datatypes::DataType; -use common_arrow::arrow::datatypes::Field; -use common_arrow::arrow::scalar::FixedSizeListScalar; -use common_arrow::arrow::scalar::Scalar; +use databend_common_arrow::arrow::array::BooleanArray; +use databend_common_arrow::arrow::datatypes::DataType; +use databend_common_arrow::arrow::datatypes::Field; +use databend_common_arrow::arrow::scalar::FixedSizeListScalar; +use databend_common_arrow::arrow::scalar::Scalar; #[allow(clippy::eq_op)] #[test] diff --git a/src/common/arrow/tests/it/arrow/scalar/list.rs b/src/common/arrow/tests/it/arrow/scalar/list.rs index f126aa472b85..310ddc2da943 100644 --- a/src/common/arrow/tests/it/arrow/scalar/list.rs +++ b/src/common/arrow/tests/it/arrow/scalar/list.rs @@ -13,11 +13,11 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_arrow::arrow::array::BooleanArray; -use common_arrow::arrow::datatypes::DataType; -use common_arrow::arrow::datatypes::Field; -use common_arrow::arrow::scalar::ListScalar; -use common_arrow::arrow::scalar::Scalar; +use databend_common_arrow::arrow::array::BooleanArray; +use databend_common_arrow::arrow::datatypes::DataType; +use databend_common_arrow::arrow::datatypes::Field; +use databend_common_arrow::arrow::scalar::ListScalar; +use databend_common_arrow::arrow::scalar::Scalar; #[allow(clippy::eq_op)] #[test] diff --git a/src/common/arrow/tests/it/arrow/scalar/map.rs b/src/common/arrow/tests/it/arrow/scalar/map.rs index ad6c0a4d5052..db2a4a44052f 100644 --- a/src/common/arrow/tests/it/arrow/scalar/map.rs +++ b/src/common/arrow/tests/it/arrow/scalar/map.rs @@ -13,13 +13,13 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_arrow::arrow::array::BooleanArray; -use common_arrow::arrow::array::StructArray; -use common_arrow::arrow::array::Utf8Array; -use common_arrow::arrow::datatypes::DataType; -use common_arrow::arrow::datatypes::Field; -use common_arrow::arrow::scalar::MapScalar; -use common_arrow::arrow::scalar::Scalar; +use databend_common_arrow::arrow::array::BooleanArray; +use databend_common_arrow::arrow::array::StructArray; +use databend_common_arrow::arrow::array::Utf8Array; +use databend_common_arrow::arrow::datatypes::DataType; +use databend_common_arrow::arrow::datatypes::Field; +use databend_common_arrow::arrow::scalar::MapScalar; +use databend_common_arrow::arrow::scalar::Scalar; #[allow(clippy::eq_op)] #[test] diff --git a/src/common/arrow/tests/it/arrow/scalar/mod.rs b/src/common/arrow/tests/it/arrow/scalar/mod.rs index 1bbe93f2a6c3..4ec5d0b00ad7 100644 --- a/src/common/arrow/tests/it/arrow/scalar/mod.rs +++ b/src/common/arrow/tests/it/arrow/scalar/mod.rs @@ -24,8 +24,10 @@ mod primitive; mod struct_; mod utf8; +use databend_common_arrow::arrow::scalar::Scalar; + // check that `PartialEq` can be derived #[derive(PartialEq)] struct A { - array: Box, + array: Box, } diff --git a/src/common/arrow/tests/it/arrow/scalar/null.rs b/src/common/arrow/tests/it/arrow/scalar/null.rs index 567de22ae644..36ea8f893e02 100644 --- a/src/common/arrow/tests/it/arrow/scalar/null.rs +++ b/src/common/arrow/tests/it/arrow/scalar/null.rs @@ -13,9 +13,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_arrow::arrow::datatypes::DataType; -use common_arrow::arrow::scalar::NullScalar; -use common_arrow::arrow::scalar::Scalar; +use databend_common_arrow::arrow::datatypes::DataType; +use databend_common_arrow::arrow::scalar::NullScalar; +use databend_common_arrow::arrow::scalar::Scalar; #[allow(clippy::eq_op)] #[test] diff --git a/src/common/arrow/tests/it/arrow/scalar/primitive.rs b/src/common/arrow/tests/it/arrow/scalar/primitive.rs index bc1dde15ad98..a5b1b36b2d9f 100644 --- a/src/common/arrow/tests/it/arrow/scalar/primitive.rs +++ b/src/common/arrow/tests/it/arrow/scalar/primitive.rs @@ -13,9 +13,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_arrow::arrow::datatypes::DataType; -use common_arrow::arrow::scalar::PrimitiveScalar; -use common_arrow::arrow::scalar::Scalar; +use databend_common_arrow::arrow::datatypes::DataType; +use databend_common_arrow::arrow::scalar::PrimitiveScalar; +use databend_common_arrow::arrow::scalar::Scalar; #[allow(clippy::eq_op)] #[test] diff --git a/src/common/arrow/tests/it/arrow/scalar/struct_.rs b/src/common/arrow/tests/it/arrow/scalar/struct_.rs index cfd56484ae9e..c12a523aec31 100644 --- a/src/common/arrow/tests/it/arrow/scalar/struct_.rs +++ b/src/common/arrow/tests/it/arrow/scalar/struct_.rs @@ -13,11 +13,11 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_arrow::arrow::datatypes::DataType; -use common_arrow::arrow::datatypes::Field; -use common_arrow::arrow::scalar::BooleanScalar; -use common_arrow::arrow::scalar::Scalar; -use common_arrow::arrow::scalar::StructScalar; +use databend_common_arrow::arrow::datatypes::DataType; +use databend_common_arrow::arrow::datatypes::Field; +use databend_common_arrow::arrow::scalar::BooleanScalar; +use databend_common_arrow::arrow::scalar::Scalar; +use databend_common_arrow::arrow::scalar::StructScalar; #[allow(clippy::eq_op)] #[test] diff --git a/src/common/arrow/tests/it/arrow/scalar/utf8.rs b/src/common/arrow/tests/it/arrow/scalar/utf8.rs index 7b1ee751fc1b..fda7458f8cd3 100644 --- a/src/common/arrow/tests/it/arrow/scalar/utf8.rs +++ b/src/common/arrow/tests/it/arrow/scalar/utf8.rs @@ -13,9 +13,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_arrow::arrow::datatypes::DataType; -use common_arrow::arrow::scalar::Scalar; -use common_arrow::arrow::scalar::Utf8Scalar; +use databend_common_arrow::arrow::datatypes::DataType; +use databend_common_arrow::arrow::scalar::Scalar; +use databend_common_arrow::arrow::scalar::Utf8Scalar; #[allow(clippy::eq_op)] #[test] diff --git a/src/common/arrow/tests/it/arrow/temporal_conversions.rs b/src/common/arrow/tests/it/arrow/temporal_conversions.rs index 2e3b64c24872..e913f994c57b 100644 --- a/src/common/arrow/tests/it/arrow/temporal_conversions.rs +++ b/src/common/arrow/tests/it/arrow/temporal_conversions.rs @@ -14,10 +14,10 @@ // limitations under the License. use chrono::NaiveDateTime; -use common_arrow::arrow::array::*; -use common_arrow::arrow::datatypes::TimeUnit; -use common_arrow::arrow::temporal_conversions; -use common_arrow::arrow::types::months_days_ns; +use databend_common_arrow::arrow::array::*; +use databend_common_arrow::arrow::datatypes::TimeUnit; +use databend_common_arrow::arrow::temporal_conversions; +use databend_common_arrow::arrow::types::months_days_ns; #[test] fn naive() { diff --git a/src/common/arrow/tests/it/arrow/types.rs b/src/common/arrow/tests/it/arrow/types.rs index 291b345f9b86..e84e6ad81c46 100644 --- a/src/common/arrow/tests/it/arrow/types.rs +++ b/src/common/arrow/tests/it/arrow/types.rs @@ -13,11 +13,11 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_arrow::arrow::types::days_ms; -use common_arrow::arrow::types::months_days_ns; -use common_arrow::arrow::types::BitChunkIter; -use common_arrow::arrow::types::BitChunkOnes; -use common_arrow::arrow::types::NativeType; +use databend_common_arrow::arrow::types::days_ms; +use databend_common_arrow::arrow::types::months_days_ns; +use databend_common_arrow::arrow::types::BitChunkIter; +use databend_common_arrow::arrow::types::BitChunkOnes; +use databend_common_arrow::arrow::types::NativeType; #[test] fn test_basic1() { diff --git a/src/common/arrow/tests/it/native/io.rs b/src/common/arrow/tests/it/native/io.rs index 923cfee18199..cbae20577c22 100644 --- a/src/common/arrow/tests/it/native/io.rs +++ b/src/common/arrow/tests/it/native/io.rs @@ -15,44 +15,44 @@ use std::io::BufRead; use std::io::BufReader; -use common_arrow::arrow::array::Array; -use common_arrow::arrow::array::BinaryArray; -use common_arrow::arrow::array::BooleanArray; -use common_arrow::arrow::array::Float32Array; -use common_arrow::arrow::array::Float64Array; -use common_arrow::arrow::array::Int16Array; -use common_arrow::arrow::array::Int32Array; -use common_arrow::arrow::array::Int64Array; -use common_arrow::arrow::array::Int8Array; -use common_arrow::arrow::array::ListArray; -use common_arrow::arrow::array::MapArray; -use common_arrow::arrow::array::PrimitiveArray; -use common_arrow::arrow::array::StructArray; -use common_arrow::arrow::array::UInt16Array; -use common_arrow::arrow::array::UInt32Array; -use common_arrow::arrow::array::UInt64Array; -use common_arrow::arrow::array::UInt8Array; -use common_arrow::arrow::array::Utf8Array; -use common_arrow::arrow::bitmap::Bitmap; -use common_arrow::arrow::bitmap::MutableBitmap; -use common_arrow::arrow::chunk::Chunk; -use common_arrow::arrow::compute; -use common_arrow::arrow::datatypes::DataType; -use common_arrow::arrow::datatypes::Field; -use common_arrow::arrow::datatypes::Schema; -use common_arrow::arrow::io::parquet::read::n_columns; -use common_arrow::arrow::io::parquet::read::ColumnDescriptor; -use common_arrow::arrow::io::parquet::write::to_parquet_schema; -use common_arrow::arrow::offset::OffsetsBuffer; -use common_arrow::native::read::batch_read::batch_read_array; -use common_arrow::native::read::deserialize::column_iter_to_arrays; -use common_arrow::native::read::reader::is_primitive; -use common_arrow::native::read::reader::NativeReader; -use common_arrow::native::write::NativeWriter; -use common_arrow::native::write::WriteOptions; -use common_arrow::native::ColumnMeta; -use common_arrow::native::CommonCompression; -use common_arrow::native::PageMeta; +use databend_common_arrow::arrow::array::Array; +use databend_common_arrow::arrow::array::BinaryArray; +use databend_common_arrow::arrow::array::BooleanArray; +use databend_common_arrow::arrow::array::Float32Array; +use databend_common_arrow::arrow::array::Float64Array; +use databend_common_arrow::arrow::array::Int16Array; +use databend_common_arrow::arrow::array::Int32Array; +use databend_common_arrow::arrow::array::Int64Array; +use databend_common_arrow::arrow::array::Int8Array; +use databend_common_arrow::arrow::array::ListArray; +use databend_common_arrow::arrow::array::MapArray; +use databend_common_arrow::arrow::array::PrimitiveArray; +use databend_common_arrow::arrow::array::StructArray; +use databend_common_arrow::arrow::array::UInt16Array; +use databend_common_arrow::arrow::array::UInt32Array; +use databend_common_arrow::arrow::array::UInt64Array; +use databend_common_arrow::arrow::array::UInt8Array; +use databend_common_arrow::arrow::array::Utf8Array; +use databend_common_arrow::arrow::bitmap::Bitmap; +use databend_common_arrow::arrow::bitmap::MutableBitmap; +use databend_common_arrow::arrow::chunk::Chunk; +use databend_common_arrow::arrow::compute; +use databend_common_arrow::arrow::datatypes::DataType; +use databend_common_arrow::arrow::datatypes::Field; +use databend_common_arrow::arrow::datatypes::Schema; +use databend_common_arrow::arrow::io::parquet::read::n_columns; +use databend_common_arrow::arrow::io::parquet::read::ColumnDescriptor; +use databend_common_arrow::arrow::io::parquet::write::to_parquet_schema; +use databend_common_arrow::arrow::offset::OffsetsBuffer; +use databend_common_arrow::native::read::batch_read::batch_read_array; +use databend_common_arrow::native::read::deserialize::column_iter_to_arrays; +use databend_common_arrow::native::read::reader::is_primitive; +use databend_common_arrow::native::read::reader::NativeReader; +use databend_common_arrow::native::write::NativeWriter; +use databend_common_arrow::native::write::WriteOptions; +use databend_common_arrow::native::ColumnMeta; +use databend_common_arrow::native::CommonCompression; +use databend_common_arrow::native::PageMeta; use rand::rngs::StdRng; use rand::Rng; use rand::SeedableRng; diff --git a/src/common/arrow/tests/it/native/read_meta.rs b/src/common/arrow/tests/it/native/read_meta.rs index 9eb0e536c7b7..4f20f99d7c3a 100644 --- a/src/common/arrow/tests/it/native/read_meta.rs +++ b/src/common/arrow/tests/it/native/read_meta.rs @@ -12,15 +12,15 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_arrow::arrow::datatypes::Field; -use common_arrow::arrow::datatypes::Schema; -use common_arrow::arrow::error::Result; -use common_arrow::native::read::reader::read_meta; -use common_arrow::native::read::reader::read_meta_async; -use common_arrow::native::write::NativeWriter; -use common_arrow::native::write::WriteOptions; -use common_arrow::native::ColumnMeta; -use common_arrow::native::CommonCompression; +use databend_common_arrow::arrow::datatypes::Field; +use databend_common_arrow::arrow::datatypes::Schema; +use databend_common_arrow::arrow::error::Result; +use databend_common_arrow::native::read::reader::read_meta; +use databend_common_arrow::native::read::reader::read_meta_async; +use databend_common_arrow::native::write::NativeWriter; +use databend_common_arrow::native::write::WriteOptions; +use databend_common_arrow::native::ColumnMeta; +use databend_common_arrow::native::CommonCompression; use crate::native::io::new_test_chunk; use crate::native::io::WRITE_PAGE; diff --git a/src/common/auth/Cargo.toml b/src/common/auth/Cargo.toml index 921d48909603..a8b54bd3a3aa 100644 --- a/src/common/auth/Cargo.toml +++ b/src/common/auth/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "common-auth" +name = "databend-common-auth" version = { workspace = true } authors = { workspace = true } license = { workspace = true } @@ -13,7 +13,8 @@ test = false [dependencies] base64 = "0.21.0" chrono = { workspace = true } -common-base = { path = "../../common/base" } +databend-common-base = { path = "../../common/base" } http = "0.2" + [dev-dependencies] tempfile = "3.4.0" diff --git a/src/common/auth/src/auth.rs b/src/common/auth/src/auth.rs index 27bb8cd321a4..fa2c137c1bb8 100644 --- a/src/common/auth/src/auth.rs +++ b/src/common/auth/src/auth.rs @@ -22,7 +22,7 @@ use base64::prelude::*; use chrono::DateTime; use chrono::Duration; use chrono::Utc; -use common_base::base::tokio::sync::RwLock; +use databend_common_base::base::tokio::sync::RwLock; use http::HeaderValue; // Token file reference. diff --git a/src/common/auth/tests/it/auth.rs b/src/common/auth/tests/it/auth.rs index b364be34b05c..b7e9d55a5713 100644 --- a/src/common/auth/tests/it/auth.rs +++ b/src/common/auth/tests/it/auth.rs @@ -13,9 +13,9 @@ // limitations under the License. use chrono::Utc; -use common_auth::RefreshableToken; -use common_auth::TokenFile; -use common_base::base::tokio; +use databend_common_auth::RefreshableToken; +use databend_common_auth::TokenFile; +use databend_common_base::base::tokio; #[tokio::test(flavor = "multi_thread")] async fn direct_token() { diff --git a/src/common/base/Cargo.toml b/src/common/base/Cargo.toml index 8ffa05f1b7cf..6e5ed838605c 100644 --- a/src/common/base/Cargo.toml +++ b/src/common/base/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "common-base" +name = "databend-common-base" version = { workspace = true } authors = { workspace = true } license = { workspace = true } @@ -22,7 +22,7 @@ memory-profiling = [ [dependencies] # In alphabetical order # Workspace dependencies -common-exception = { path = "../exception" } +databend-common-exception = { path = "../exception" } # GitHub dependencies diff --git a/src/common/base/src/base/profiling.rs b/src/common/base/src/base/profiling.rs index 9eb3be0ef5ea..569a7d57a39a 100644 --- a/src/common/base/src/base/profiling.rs +++ b/src/common/base/src/base/profiling.rs @@ -14,8 +14,8 @@ use std::time::Duration; -use common_exception::ErrorCode; -use common_exception::Result; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; use pprof::protos::Message; pub struct Profiling { diff --git a/src/common/base/src/base/shutdown_signal.rs b/src/common/base/src/base/shutdown_signal.rs index 4286f2965424..ea1bf3c3c605 100644 --- a/src/common/base/src/base/shutdown_signal.rs +++ b/src/common/base/src/base/shutdown_signal.rs @@ -16,7 +16,7 @@ use std::pin::Pin; use std::task::Context; use std::task::Poll; -use common_exception::Result; +use databend_common_exception::Result; use futures::Stream; #[cfg(not(target_os = "windows"))] use tokio::signal::unix::signal; diff --git a/src/common/base/src/base/stop_handle.rs b/src/common/base/src/base/stop_handle.rs index 5a32d2a8da7a..315c8451bac7 100644 --- a/src/common/base/src/base/stop_handle.rs +++ b/src/common/base/src/base/stop_handle.rs @@ -17,7 +17,7 @@ use std::sync::atomic::AtomicBool; use std::sync::atomic::Ordering; use std::sync::Arc; -use common_exception::ErrorCode; +use databend_common_exception::ErrorCode; use futures::Future; use log::error; use log::info; diff --git a/src/common/base/src/base/string.rs b/src/common/base/src/base/string.rs index b4de1f4b2c4c..425e1c698b21 100644 --- a/src/common/base/src/base/string.rs +++ b/src/common/base/src/base/string.rs @@ -14,8 +14,8 @@ use std::string::FromUtf8Error; -use common_exception::ErrorCode; -use common_exception::Result; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; use regex::Regex; /// Function that escapes special characters in a string. diff --git a/src/common/base/src/base/take_mut.rs b/src/common/base/src/base/take_mut.rs index a75eba1b4d2d..ec1d20afe3f4 100644 --- a/src/common/base/src/base/take_mut.rs +++ b/src/common/base/src/base/take_mut.rs @@ -14,7 +14,7 @@ use std::panic; -use common_exception::Result; +use databend_common_exception::Result; use crate::runtime::catch_unwind; diff --git a/src/common/base/src/runtime/catch_unwind.rs b/src/common/base/src/runtime/catch_unwind.rs index 067030416f0a..bd79f767be0c 100644 --- a/src/common/base/src/runtime/catch_unwind.rs +++ b/src/common/base/src/runtime/catch_unwind.rs @@ -17,8 +17,8 @@ use std::pin::Pin; use std::task::Context; use std::task::Poll; -use common_exception::ErrorCode; -use common_exception::Result; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; use futures::future::BoxFuture; use futures::FutureExt; diff --git a/src/common/base/src/runtime/global_runtime.rs b/src/common/base/src/runtime/global_runtime.rs index 70d74ac55d6c..991c0a225376 100644 --- a/src/common/base/src/runtime/global_runtime.rs +++ b/src/common/base/src/runtime/global_runtime.rs @@ -14,7 +14,7 @@ use std::sync::Arc; -use common_exception::Result; +use databend_common_exception::Result; use crate::base::GlobalInstance; use crate::runtime::Runtime; diff --git a/src/common/base/src/runtime/runtime.rs b/src/common/base/src/runtime/runtime.rs index fec346469f3b..ad349391a5d7 100644 --- a/src/common/base/src/runtime/runtime.rs +++ b/src/common/base/src/runtime/runtime.rs @@ -19,8 +19,8 @@ use std::thread; use std::time::Duration; use std::time::Instant; -use common_exception::ErrorCode; -use common_exception::Result; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; use futures::future; use log::warn; use tokio::runtime::Builder; diff --git a/src/common/base/src/runtime/thread.rs b/src/common/base/src/runtime/thread.rs index 2dcddd143af8..cc3899dc3dd4 100644 --- a/src/common/base/src/runtime/thread.rs +++ b/src/common/base/src/runtime/thread.rs @@ -15,8 +15,8 @@ use std::thread::Builder; use std::thread::JoinHandle; -use common_exception::ErrorCode; -use common_exception::Result; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; use crate::runtime::MemStat; use crate::runtime::ThreadTracker; diff --git a/src/common/base/src/runtime/thread_pool.rs b/src/common/base/src/runtime/thread_pool.rs index 47c0f7be58b7..da2b7e1bc311 100644 --- a/src/common/base/src/runtime/thread_pool.rs +++ b/src/common/base/src/runtime/thread_pool.rs @@ -14,7 +14,7 @@ use async_channel::Receiver; use async_channel::Sender; -use common_exception::Result; +use databend_common_exception::Result; use crate::runtime::Thread; diff --git a/src/common/base/tests/it/fixed_heap.rs b/src/common/base/tests/it/fixed_heap.rs index 2219fbb9298f..a9e47d148d1f 100644 --- a/src/common/base/tests/it/fixed_heap.rs +++ b/src/common/base/tests/it/fixed_heap.rs @@ -17,7 +17,7 @@ use std::cmp::Ordering; use std::fmt::Debug; use std::rc::Rc; -use common_base::containers::FixedHeap; +use databend_common_base::containers::FixedHeap; use rand::Rng; #[test] diff --git a/src/common/base/tests/it/main.rs b/src/common/base/tests/it/main.rs index 1f36999fb63b..34da796e0cb4 100644 --- a/src/common/base/tests/it/main.rs +++ b/src/common/base/tests/it/main.rs @@ -14,7 +14,7 @@ #![feature(lazy_cell)] -use common_base::mem_allocator::GlobalAllocator; +use databend_common_base::mem_allocator::GlobalAllocator; mod fixed_heap; mod pool; diff --git a/src/common/base/tests/it/pool.rs b/src/common/base/tests/it/pool.rs index 60618d717cba..4e12964ac11a 100644 --- a/src/common/base/tests/it/pool.rs +++ b/src/common/base/tests/it/pool.rs @@ -15,10 +15,10 @@ use std::time::Duration; use async_trait::async_trait; -use common_base::base::tokio; -use common_base::base::GlobalSequence; -use common_base::containers::ItemManager; -use common_base::containers::Pool; +use databend_common_base::base::tokio; +use databend_common_base::base::GlobalSequence; +use databend_common_base::containers::ItemManager; +use databend_common_base::containers::Pool; use log::info; #[tokio::test(flavor = "multi_thread", worker_threads = 1)] diff --git a/src/common/base/tests/it/pool_retry.rs b/src/common/base/tests/it/pool_retry.rs index 974fedb01628..0bd6aaf45836 100644 --- a/src/common/base/tests/it/pool_retry.rs +++ b/src/common/base/tests/it/pool_retry.rs @@ -17,9 +17,9 @@ use std::sync::atomic::Ordering; use std::time::Duration; use async_trait::async_trait; -use common_base::base::tokio; -use common_base::containers::ItemManager; -use common_base::containers::Pool; +use databend_common_base::base::tokio; +use databend_common_base::containers::ItemManager; +use databend_common_base::containers::Pool; pub struct LocalSequence; diff --git a/src/common/base/tests/it/progress.rs b/src/common/base/tests/it/progress.rs index 683961786098..af9d66222809 100644 --- a/src/common/base/tests/it/progress.rs +++ b/src/common/base/tests/it/progress.rs @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_base::base::*; -use common_exception::Result; +use databend_common_base::base::*; +use databend_common_exception::Result; #[test] fn test_progress() -> Result<()> { diff --git a/src/common/base/tests/it/range_merger.rs b/src/common/base/tests/it/range_merger.rs index 12c001069c64..6c5a227abd55 100644 --- a/src/common/base/tests/it/range_merger.rs +++ b/src/common/base/tests/it/range_merger.rs @@ -15,8 +15,8 @@ use std::fmt; use std::fmt::Formatter; -use common_base::rangemap::RangeMerger; -use common_exception::Result; +use databend_common_base::rangemap::RangeMerger; +use databend_common_exception::Result; struct Array(Vec>); impl fmt::Display for Array { diff --git a/src/common/base/tests/it/runtime.rs b/src/common/base/tests/it/runtime.rs index edc783df3c2d..91cfaaa17ccf 100644 --- a/src/common/base/tests/it/runtime.rs +++ b/src/common/base/tests/it/runtime.rs @@ -18,10 +18,10 @@ use std::sync::Mutex; use std::time::Duration; use std::time::Instant; -use common_base::runtime::Runtime; -use common_base::runtime::TrySpawn; -use common_base::GLOBAL_TASK; -use common_exception::Result; +use databend_common_base::runtime::Runtime; +use databend_common_base::runtime::TrySpawn; +use databend_common_base::GLOBAL_TASK; +use databend_common_exception::Result; use rand::distributions::Distribution; use rand::distributions::Uniform; use tokio::sync::Semaphore; diff --git a/src/common/base/tests/it/runtime_tracker.rs b/src/common/base/tests/it/runtime_tracker.rs index 1493952c9926..3d33dc858a65 100644 --- a/src/common/base/tests/it/runtime_tracker.rs +++ b/src/common/base/tests/it/runtime_tracker.rs @@ -14,12 +14,12 @@ use std::time::Duration; -use common_base::runtime::MemStat; -use common_base::runtime::Runtime; -use common_base::runtime::TrackedFuture; -use common_base::runtime::TrySpawn; -use common_base::GLOBAL_TASK; -use common_exception::Result; +use databend_common_base::runtime::MemStat; +use databend_common_base::runtime::Runtime; +use databend_common_base::runtime::TrackedFuture; +use databend_common_base::runtime::TrySpawn; +use databend_common_base::GLOBAL_TASK; +use databend_common_exception::Result; #[tokio::test(flavor = "multi_thread", worker_threads = 8)] async fn test_async_thread_tracker() -> Result<()> { diff --git a/src/common/base/tests/it/stoppable.rs b/src/common/base/tests/it/stoppable.rs index 47800b596f18..be6179c1200e 100644 --- a/src/common/base/tests/it/stoppable.rs +++ b/src/common/base/tests/it/stoppable.rs @@ -13,7 +13,7 @@ // limitations under the License. use anyerror::AnyError; -use common_base::base::*; +use databend_common_base::base::*; use log::info; use tokio::sync::broadcast; use tokio::sync::oneshot; diff --git a/src/common/base/tests/it/string.rs b/src/common/base/tests/it/string.rs index 42b34ef4daf9..fe35b316ece6 100644 --- a/src/common/base/tests/it/string.rs +++ b/src/common/base/tests/it/string.rs @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_base::base::*; -use common_exception::Result; +use databend_common_base::base::*; +use databend_common_exception::Result; #[test] fn test_progress() -> Result<()> { @@ -78,7 +78,7 @@ fn test_unescape_string() { #[test] fn test_mask_connection_info() { - let sql = r#"COPY INTO table1 + let sql = r#"COPY INTO table1 FROM 's3://xx/yy CONNECTION = ( ACCESS_KEY_ID = 'aaa' , @@ -94,7 +94,7 @@ fn test_mask_connection_info() { );"#; let actual = mask_connection_info(sql); - let expect = r#"COPY INTO table1 + let expect = r#"COPY INTO table1 FROM 's3://xx/yy CONNECTION = (***masked***) PATTERN = '.*[.]csv' diff --git a/src/common/base/tests/it/thread_pool.rs b/src/common/base/tests/it/thread_pool.rs index 0fbbc2772ed7..7411bb507592 100644 --- a/src/common/base/tests/it/thread_pool.rs +++ b/src/common/base/tests/it/thread_pool.rs @@ -18,8 +18,8 @@ use std::sync::Arc; use std::time::Duration; use std::time::Instant; -use common_base::runtime::ThreadPool; -use common_exception::Result; +use databend_common_base::runtime::ThreadPool; +use databend_common_exception::Result; #[tokio::test(flavor = "multi_thread", worker_threads = 8)] async fn test_thread_pool() -> Result<()> { diff --git a/src/common/building/Cargo.toml b/src/common/building/Cargo.toml index 3375784bfca8..852271323fa2 100644 --- a/src/common/building/Cargo.toml +++ b/src/common/building/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "common-building" +name = "databend-common-building" version = { workspace = true } authors = { workspace = true } license = { workspace = true } diff --git a/src/common/cache/Cargo.toml b/src/common/cache/Cargo.toml index 5a426156f145..a4a9333b35e5 100644 --- a/src/common/cache/Cargo.toml +++ b/src/common/cache/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "common-cache" +name = "databend-common-cache" version = { workspace = true } authors = { workspace = true } license = { workspace = true } diff --git a/src/common/cache/src/cache/lru.rs b/src/common/cache/src/cache/lru.rs index 95945427b968..49e46daa05b1 100644 --- a/src/common/cache/src/cache/lru.rs +++ b/src/common/cache/src/cache/lru.rs @@ -20,7 +20,7 @@ //! # Examples //! //! ```rust,ignore -//! use common_cache::{Cache, LruCache}; +//! use databend_common_cache::{Cache, LruCache}; //! //! let mut cache = LruCache::new(2); //! @@ -86,7 +86,7 @@ impl LruCache { /// # Examples /// /// ```rust,ignore - /// use common_cache::{Cache, LruCache}; + /// use databend_common_cache::{Cache, LruCache}; /// let mut cache: LruCache = LruCache::new(10); /// ``` pub fn new(capacity: u64) -> Self { @@ -109,7 +109,7 @@ impl> LruCache> Cache /// # Examples /// /// ```rust,ignore - /// use common_cache::{Cache, LruCache}; + /// use databend_common_cache::{Cache, LruCache}; /// /// let mut cache = LruCache::new(2); /// @@ -211,7 +211,7 @@ impl> Cache /// # Example /// /// ```rust,ignore - /// use common_cache::{Cache, LruCache}; + /// use databend_common_cache::{Cache, LruCache}; /// let mut cache = LruCache::new(2); /// /// cache.put(1, "a"); @@ -235,7 +235,7 @@ impl> Cache /// # Example /// /// ```rust,ignore - /// use common_cache::{Cache, LruCache}; + /// use databend_common_cache::{Cache, LruCache}; /// let mut cache = LruCache::new(2); /// /// cache.put(1, "a"); @@ -252,7 +252,7 @@ impl> Cache /// # Examples /// /// ```rust,ignore - /// use common_cache::{Cache, LruCache}; + /// use databend_common_cache::{Cache, LruCache}; /// /// let mut cache = LruCache::new(1); /// @@ -273,7 +273,7 @@ impl> Cache /// # Examples /// /// ```rust,ignore - /// use common_cache::{Cache, LruCache}; + /// use databend_common_cache::{Cache, LruCache}; /// /// let mut cache = LruCache::new(2); /// @@ -302,7 +302,7 @@ impl> Cache /// # Examples /// /// ```rust,ignore - /// use common_cache::{Cache, LruCache}; + /// use databend_common_cache::{Cache, LruCache}; /// /// let mut cache = LruCache::new(2); /// @@ -331,7 +331,7 @@ impl> Cache /// # Examples /// /// ```rust,ignore - /// use common_cache::{Cache, LruCache}; + /// use databend_common_cache::{Cache, LruCache}; /// /// let mut cache = LruCache::new(2); /// @@ -359,7 +359,7 @@ impl> Cache /// # Examples /// /// ```rust,ignore - /// use common_cache::{Cache, LruCache}; + /// use databend_common_cache::{Cache, LruCache}; /// /// let mut cache = LruCache::new(2); /// @@ -411,7 +411,7 @@ impl> Cache /// # Examples /// /// ```rust,ignore - /// use common_cache::{Cache, LruCache}; + /// use databend_common_cache::{Cache, LruCache}; /// let mut cache: LruCache = LruCache::new(2); /// assert_eq!(cache.capacity(), 2); /// ``` @@ -439,7 +439,7 @@ impl> LruCache> LruCache> IntoIterator /// # Examples /// /// ```rust,ignore -/// use common_cache::{Cache, LruCache}; +/// use databend_common_cache::{Cache, LruCache}; /// /// let mut cache = LruCache::new(2); /// diff --git a/src/common/cache/tests/it/cache/lru.rs b/src/common/cache/tests/it/cache/lru.rs index 3a5321435ea5..84453349948f 100644 --- a/src/common/cache/tests/it/cache/lru.rs +++ b/src/common/cache/tests/it/cache/lru.rs @@ -14,9 +14,9 @@ use std::borrow::Borrow; -use common_cache::Cache; -use common_cache::LruCache; -use common_cache::Meter; +use databend_common_cache::Cache; +use databend_common_cache::LruCache; +use databend_common_cache::Meter; #[test] fn test_put_and_get() { @@ -211,7 +211,7 @@ fn test_metered_cache_oversize() { #[cfg(not(target_os = "macos"))] #[test] fn test_heapsize_cache() { - use common_cache::HeapSize; + use databend_common_cache::HeapSize; let mut cache = LruCache::<&str, (u8, u8, u8), _, _>::with_meter(8, HeapSize); cache.put("foo1", (1, 2, 3)); diff --git a/src/common/cloud_control/Cargo.toml b/src/common/cloud_control/Cargo.toml index e035cb0bf8ed..66026a736fe8 100644 --- a/src/common/cloud_control/Cargo.toml +++ b/src/common/cloud_control/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "common-cloud-control" +name = "databend-common-cloud-control" version = { workspace = true } authors = { workspace = true } license = { workspace = true } @@ -13,8 +13,8 @@ test = false [dependencies] async-backtrace = { workspace = true } chrono = { workspace = true } -common-base = { path = "../base" } -common-exception = { path = "../exception" } +databend-common-base = { path = "../base" } +databend-common-exception = { path = "../exception" } prost = { workspace = true } tonic = { workspace = true } diff --git a/src/common/cloud_control/src/cloud_api.rs b/src/common/cloud_control/src/cloud_api.rs index 636f55c86467..f71953c1ea9e 100644 --- a/src/common/cloud_control/src/cloud_api.rs +++ b/src/common/cloud_control/src/cloud_api.rs @@ -15,9 +15,9 @@ use std::sync::Arc; use std::time::Duration; -use common_base::base::GlobalInstance; -use common_exception::ErrorCode; -use common_exception::Result; +use databend_common_base::base::GlobalInstance; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; use crate::task_client::TaskClient; diff --git a/src/common/cloud_control/src/task_client.rs b/src/common/cloud_control/src/task_client.rs index f60ab96b91a9..d6047326db71 100644 --- a/src/common/cloud_control/src/task_client.rs +++ b/src/common/cloud_control/src/task_client.rs @@ -14,7 +14,7 @@ use std::sync::Arc; -use common_exception::Result; +use databend_common_exception::Result; use tonic::transport::Channel; use tonic::transport::Endpoint; use tonic::Request; diff --git a/src/common/cloud_control/src/task_utils.rs b/src/common/cloud_control/src/task_utils.rs index 94f510fbcc01..1fecd35b49ac 100644 --- a/src/common/cloud_control/src/task_utils.rs +++ b/src/common/cloud_control/src/task_utils.rs @@ -17,8 +17,8 @@ use std::fmt::Formatter; use chrono::DateTime; use chrono::Utc; -use common_exception::ErrorCode; -use common_exception::Result; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; use crate::pb::schedule_options::ScheduleType; use crate::pb::ScheduleOptions; diff --git a/src/common/cloud_control/tests/it/task_client.rs b/src/common/cloud_control/tests/it/task_client.rs index 72932d8be458..ca053fdda771 100644 --- a/src/common/cloud_control/tests/it/task_client.rs +++ b/src/common/cloud_control/tests/it/task_client.rs @@ -12,27 +12,27 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_base::base::tokio; -use common_cloud_control::pb::task::Status::Suspended; -use common_cloud_control::pb::task_service_client::TaskServiceClient; -use common_cloud_control::pb::task_service_server::TaskService; -use common_cloud_control::pb::task_service_server::TaskServiceServer; -use common_cloud_control::pb::AlterTaskRequest; -use common_cloud_control::pb::AlterTaskResponse; -use common_cloud_control::pb::CreateTaskRequest; -use common_cloud_control::pb::CreateTaskResponse; -use common_cloud_control::pb::DescribeTaskRequest; -use common_cloud_control::pb::DescribeTaskResponse; -use common_cloud_control::pb::DropTaskRequest; -use common_cloud_control::pb::DropTaskResponse; -use common_cloud_control::pb::ExecuteTaskRequest; -use common_cloud_control::pb::ExecuteTaskResponse; -use common_cloud_control::pb::ShowTaskRunsRequest; -use common_cloud_control::pb::ShowTaskRunsResponse; -use common_cloud_control::pb::ShowTasksRequest; -use common_cloud_control::pb::ShowTasksResponse; -use common_cloud_control::pb::Task; -use common_exception::Result; +use databend_common_base::base::tokio; +use databend_common_cloud_control::pb::task::Status::Suspended; +use databend_common_cloud_control::pb::task_service_client::TaskServiceClient; +use databend_common_cloud_control::pb::task_service_server::TaskService; +use databend_common_cloud_control::pb::task_service_server::TaskServiceServer; +use databend_common_cloud_control::pb::AlterTaskRequest; +use databend_common_cloud_control::pb::AlterTaskResponse; +use databend_common_cloud_control::pb::CreateTaskRequest; +use databend_common_cloud_control::pb::CreateTaskResponse; +use databend_common_cloud_control::pb::DescribeTaskRequest; +use databend_common_cloud_control::pb::DescribeTaskResponse; +use databend_common_cloud_control::pb::DropTaskRequest; +use databend_common_cloud_control::pb::DropTaskResponse; +use databend_common_cloud_control::pb::ExecuteTaskRequest; +use databend_common_cloud_control::pb::ExecuteTaskResponse; +use databend_common_cloud_control::pb::ShowTaskRunsRequest; +use databend_common_cloud_control::pb::ShowTaskRunsResponse; +use databend_common_cloud_control::pb::ShowTasksRequest; +use databend_common_cloud_control::pb::ShowTasksResponse; +use databend_common_cloud_control::pb::Task; +use databend_common_exception::Result; use tonic::codegen::tokio_stream; use tonic::transport::Endpoint; use tonic::transport::Server; diff --git a/src/common/compress/Cargo.toml b/src/common/compress/Cargo.toml index cd2d6da8d534..38d2d0d88463 100644 --- a/src/common/compress/Cargo.toml +++ b/src/common/compress/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "common-compress" +name = "databend-common-compress" version = { workspace = true } authors = { workspace = true } license = { workspace = true } @@ -14,7 +14,7 @@ async-compression = { git = "https://github.com/youngsofun/async-compression", r ] } brotli = { version = "3.3.0", features = ["std"] } bytes = { workspace = true } -common-exception = { path = "../exception" } +databend-common-exception = { path = "../exception" } futures = { workspace = true } log = { workspace = true } pin-project = "1" diff --git a/src/common/compress/src/decode.rs b/src/common/compress/src/decode.rs index 05fb75ba91d3..b17d9216d7a0 100644 --- a/src/common/compress/src/decode.rs +++ b/src/common/compress/src/decode.rs @@ -29,7 +29,7 @@ use async_compression::codec::ZstdDecoder; use async_compression::util::PartialBuffer; use bytes::Buf; use bytes::BytesMut; -use common_exception::ErrorCode; +use databend_common_exception::ErrorCode; use futures::io::BufReader; use futures::ready; use futures::AsyncBufRead; @@ -341,14 +341,20 @@ impl AsyncRead for DecompressReader { } impl DecompressDecoder { - pub fn decompress_all(&mut self, compressed: &[u8]) -> common_exception::Result> { + pub fn decompress_all( + &mut self, + compressed: &[u8], + ) -> databend_common_exception::Result> { let mut main = self.decompress_batch(compressed)?; let tail = self.decompress_batch(&[])?; main.extend_from_slice(&tail); Ok(main) } // need to finish the decoding by adding a empty input - pub fn decompress_batch(&mut self, compressed: &[u8]) -> common_exception::Result> { + pub fn decompress_batch( + &mut self, + compressed: &[u8], + ) -> databend_common_exception::Result> { let mut decompress_bufs = vec![]; let mut filled = false; loop { diff --git a/src/common/compress/src/encode.rs b/src/common/compress/src/encode.rs index 964a0286c541..e5d3dd949a89 100644 --- a/src/common/compress/src/encode.rs +++ b/src/common/compress/src/encode.rs @@ -26,7 +26,7 @@ use async_compression::codec::ZstdEncoder; use async_compression::util::PartialBuffer; use async_compression::Level; use brotli::enc::backward_references::BrotliEncoderParams; -use common_exception::ErrorCode; +use databend_common_exception::ErrorCode; use crate::CompressAlgorithm; @@ -134,7 +134,10 @@ impl Encode for CompressCodec { } impl CompressCodec { - pub fn compress_all(&mut self, to_compress: &[u8]) -> common_exception::Result> { + pub fn compress_all( + &mut self, + to_compress: &[u8], + ) -> databend_common_exception::Result> { let mut compress_bufs = vec![]; let mut input = PartialBuffer::new(to_compress); let buf_size = to_compress.len().min(4096); @@ -182,7 +185,7 @@ mod tests { use crate::DecompressDecoder; #[tokio::test] - async fn test_decompress_bytes_zlib() -> common_exception::Result<()> { + async fn test_decompress_bytes_zlib() -> databend_common_exception::Result<()> { let _ = env_logger::try_init(); let mut rng = ThreadRng::default(); diff --git a/src/common/exception/Cargo.toml b/src/common/exception/Cargo.toml index 75a9931a1222..a95ceed2af11 100644 --- a/src/common/exception/Cargo.toml +++ b/src/common/exception/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "common-exception" +name = "databend-common-exception" version = { workspace = true } authors = { workspace = true } license = { workspace = true } @@ -11,9 +11,9 @@ doctest = false test = false [dependencies] # In alphabetical order -common-arrow = { path = "../arrow" } -common-meta-stoerr = { path = "../../meta/stoerr" } -common-meta-types = { path = "../../meta/types" } +databend-common-arrow = { path = "../arrow" } +databend-common-meta-stoerr = { path = "../../meta/stoerr" } +databend-common-meta-types = { path = "../../meta/types" } # GitHub dependencies # TODO: Use the version from crates.io once diff --git a/src/common/exception/src/exception.rs b/src/common/exception/src/exception.rs index 4c1659e2a835..5936bad62b02 100644 --- a/src/common/exception/src/exception.rs +++ b/src/common/exception/src/exception.rs @@ -325,11 +325,12 @@ impl ErrorCode { /// Provides the `map_err_to_code` method for `Result`. /// /// ``` -/// use common_exception::ErrorCode; -/// use common_exception::ToErrorCode; +/// use databend_common_exception::ErrorCode; +/// use databend_common_exception::ToErrorCode; /// /// let x: std::result::Result<(), std::fmt::Error> = Err(std::fmt::Error {}); -/// let y: common_exception::Result<()> = x.map_err_to_code(ErrorCode::UnknownException, || 123); +/// let y: databend_common_exception::Result<()> = +/// x.map_err_to_code(ErrorCode::UnknownException, || 123); /// /// assert_eq!( /// "Code: 1067, Text = 123, cause: an error occurred when formatting an argument.", diff --git a/src/common/exception/src/exception_flight.rs b/src/common/exception/src/exception_flight.rs index ae10756b8fb7..b3578a11cb7f 100644 --- a/src/common/exception/src/exception_flight.rs +++ b/src/common/exception/src/exception_flight.rs @@ -14,7 +14,7 @@ use std::sync::Arc; -use common_arrow::arrow_format::flight::data::FlightData; +use databend_common_arrow::arrow_format::flight::data::FlightData; use crate::exception::ErrorCodeBacktrace; use crate::ErrorCode; diff --git a/src/common/exception/src/exception_into.rs b/src/common/exception/src/exception_into.rs index 2a68beb517d5..a24b7cfaefc1 100644 --- a/src/common/exception/src/exception_into.rs +++ b/src/common/exception/src/exception_into.rs @@ -18,9 +18,9 @@ use std::fmt::Display; use std::fmt::Formatter; use std::sync::Arc; -use common_meta_stoerr::MetaStorageError; -use common_meta_types::MetaAPIError; -use common_meta_types::MetaError; +use databend_common_meta_stoerr::MetaStorageError; +use databend_common_meta_types::MetaAPIError; +use databend_common_meta_types::MetaError; use crate::exception::ErrorCodeBacktrace; use crate::exception_backtrace::capture; @@ -109,9 +109,9 @@ impl From for ErrorCode { } } -impl From for ErrorCode { - fn from(error: common_arrow::arrow::error::Error) -> Self { - use common_arrow::arrow::error::Error; +impl From for ErrorCode { + fn from(error: databend_common_arrow::arrow::error::Error) -> Self { + use databend_common_arrow::arrow::error::Error; match error { Error::NotYetImplemented(v) => ErrorCode::Unimplemented(format!("arrow: {v}")), v => ErrorCode::from_std_error(v), @@ -119,8 +119,8 @@ impl From for ErrorCode { } } -impl From for ErrorCode { - fn from(error: common_arrow::parquet::error::Error) -> Self { +impl From for ErrorCode { + fn from(error: databend_common_arrow::parquet::error::Error) -> Self { ErrorCode::from_std_error(error) } } diff --git a/src/common/exception/tests/it/exception.rs b/src/common/exception/tests/it/exception.rs index 32ed23baa1e1..bbbdbc0c4a2d 100644 --- a/src/common/exception/tests/it/exception.rs +++ b/src/common/exception/tests/it/exception.rs @@ -12,14 +12,14 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_exception::ErrorCode; -use common_exception::SerializedError; +use databend_common_exception::ErrorCode; +use databend_common_exception::SerializedError; use tonic::Code; use tonic::Status; #[test] fn test_format_with_error_codes() { - use common_exception::exception::*; + use databend_common_exception::exception::*; assert_eq!( ErrorCode::Ok("test message 1").to_string(), @@ -42,7 +42,7 @@ fn test_format_with_error_codes() { #[test] fn test_error_code() { - use common_exception::exception::*; + use databend_common_exception::exception::*; let err = ErrorCode::UnknownException("test message 1"); @@ -51,12 +51,12 @@ fn test_error_code() { #[test] fn test_derive_from_std_error() { - use common_exception::exception::ErrorCode; - use common_exception::exception::ToErrorCode; + use databend_common_exception::exception::ErrorCode; + use databend_common_exception::exception::ToErrorCode; let fmt_rst: std::result::Result<(), std::fmt::Error> = Err(std::fmt::Error {}); - let rst1: common_exception::exception::Result<()> = + let rst1: databend_common_exception::exception::Result<()> = fmt_rst.map_err_to_code(ErrorCode::UnknownException, || 123); assert_eq!( @@ -64,7 +64,7 @@ fn test_derive_from_std_error() { rst1.as_ref().unwrap_err().to_string() ); - let rst2: common_exception::exception::Result<()> = + let rst2: databend_common_exception::exception::Result<()> = rst1.map_err_to_code(ErrorCode::Ok, || "wrapper"); assert_eq!( @@ -75,12 +75,12 @@ fn test_derive_from_std_error() { #[test] fn test_derive_from_display() { - use common_exception::exception::ErrorCode; - use common_exception::exception::ToErrorCode; + use databend_common_exception::exception::ErrorCode; + use databend_common_exception::exception::ToErrorCode; let rst: std::result::Result<(), u64> = Err(3); - let rst1: common_exception::exception::Result<()> = + let rst1: databend_common_exception::exception::Result<()> = rst.map_err_to_code(ErrorCode::UnknownException, || 123); assert_eq!( @@ -103,7 +103,7 @@ fn test_from_and_to_serialized_error() { #[test] fn test_from_and_to_status() -> anyhow::Result<()> { - use common_exception::exception::*; + use databend_common_exception::exception::*; let e = ErrorCode::IllegalDataType("foo"); let status: Status = e.into(); assert_eq!(Code::Unknown, status.code()); diff --git a/src/common/exception/tests/it/exception_flight.rs b/src/common/exception/tests/it/exception_flight.rs index fd8e96b5cddf..1a8bf8346e2a 100644 --- a/src/common/exception/tests/it/exception_flight.rs +++ b/src/common/exception/tests/it/exception_flight.rs @@ -15,10 +15,10 @@ use std::sync::Arc; use backtrace::Backtrace; -use common_arrow::arrow_format::flight::data::FlightData; -use common_exception::exception::ErrorCodeBacktrace; -use common_exception::ErrorCode; -use common_exception::Result; +use databend_common_arrow::arrow_format::flight::data::FlightData; +use databend_common_exception::exception::ErrorCodeBacktrace; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; #[test] fn test_serialize() -> Result<()> { diff --git a/src/common/exception/tests/it/prelude.rs b/src/common/exception/tests/it/prelude.rs index b19dfca12a02..621d567d858d 100644 --- a/src/common/exception/tests/it/prelude.rs +++ b/src/common/exception/tests/it/prelude.rs @@ -12,12 +12,13 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_exception::*; +use databend_common_exception::*; #[test] fn test_prelude() -> anyhow::Result<()> { let x: std::result::Result<(), std::fmt::Error> = Err(std::fmt::Error {}); - let y: common_exception::Result<()> = x.map_err_to_code(ErrorCode::UnknownException, || 123); + let y: databend_common_exception::Result<()> = + x.map_err_to_code(ErrorCode::UnknownException, || 123); assert_eq!( "UnknownException. Code: 1067, Text = 123, cause: an error occurred when formatting an argument.", diff --git a/src/common/grpc/Cargo.toml b/src/common/grpc/Cargo.toml index de30e6da3405..fb74fd70c400 100644 --- a/src/common/grpc/Cargo.toml +++ b/src/common/grpc/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "common-grpc" +name = "databend-common-grpc" version = { workspace = true } authors = { workspace = true } license = { workspace = true } @@ -12,8 +12,8 @@ test = false [dependencies] # In alphabetical order # Workspace dependencies -common-base = { path = "../base" } -common-exception = { path = "../exception" } +databend-common-base = { path = "../base" } +databend-common-exception = { path = "../exception" } # GitHub dependencies diff --git a/src/common/grpc/src/dns_resolver.rs b/src/common/grpc/src/dns_resolver.rs index 1cf6cfe28e68..deb549b80a56 100644 --- a/src/common/grpc/src/dns_resolver.rs +++ b/src/common/grpc/src/dns_resolver.rs @@ -23,10 +23,10 @@ use std::task::Poll; use std::time::Duration; use anyerror::AnyError; -use common_base::base::tokio; -use common_base::base::tokio::task::JoinHandle; -use common_exception::ErrorCode; -use common_exception::Result; +use databend_common_base::base::tokio; +use databend_common_base::base::tokio::task::JoinHandle; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; use hyper::client::connect::dns::Name; use hyper::client::HttpConnector; use hyper::service::Service; diff --git a/src/common/grpc/src/grpc_token.rs b/src/common/grpc/src/grpc_token.rs index 0134483db8a1..2b3ec07982ed 100644 --- a/src/common/grpc/src/grpc_token.rs +++ b/src/common/grpc/src/grpc_token.rs @@ -12,9 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_exception::ErrorCode; -use common_exception::Result; -use common_exception::ToErrorCode; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_exception::ToErrorCode; use jwt_simple::prelude::*; #[derive(Serialize, Deserialize, Debug)] diff --git a/src/common/grpc/tests/it/dns_resolver.rs b/src/common/grpc/tests/it/dns_resolver.rs index a11ae71d6311..47c9a2cdb385 100644 --- a/src/common/grpc/tests/it/dns_resolver.rs +++ b/src/common/grpc/tests/it/dns_resolver.rs @@ -12,9 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_base::base::tokio; -use common_exception::Result; -use common_grpc::DNSResolver; +use databend_common_base::base::tokio; +use databend_common_exception::Result; +use databend_common_grpc::DNSResolver; #[tokio::test(flavor = "multi_thread", worker_threads = 1)] async fn test_resolver_github() -> Result<()> { diff --git a/src/common/grpc/tests/it/grpc_token.rs b/src/common/grpc/tests/it/grpc_token.rs index f25812c49b17..3dc6bb40b2ea 100644 --- a/src/common/grpc/tests/it/grpc_token.rs +++ b/src/common/grpc/tests/it/grpc_token.rs @@ -12,9 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_exception::Result; -use common_grpc::GrpcClaim; -use common_grpc::GrpcToken; +use databend_common_exception::Result; +use databend_common_grpc::GrpcClaim; +use databend_common_grpc::GrpcToken; #[test] fn test_flight_token() -> Result<()> { diff --git a/src/common/hashtable/Cargo.toml b/src/common/hashtable/Cargo.toml index c119f40ab687..ea534c5721c5 100644 --- a/src/common/hashtable/Cargo.toml +++ b/src/common/hashtable/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "common-hashtable" +name = "databend-common-hashtable" version = { workspace = true } authors = { workspace = true } license = { workspace = true } @@ -12,8 +12,8 @@ test = false [dependencies] # In alphabetical order # Workspace dependencies -common-arrow = { path = "../arrow" } -common-base = { path = "../base" } +databend-common-arrow = { path = "../arrow" } +databend-common-base = { path = "../base" } # Crates.io dependencies diff --git a/src/common/hashtable/src/dictionary_string_hashtable.rs b/src/common/hashtable/src/dictionary_string_hashtable.rs index ce7376a77264..ddc9cfd18dfd 100644 --- a/src/common/hashtable/src/dictionary_string_hashtable.rs +++ b/src/common/hashtable/src/dictionary_string_hashtable.rs @@ -20,7 +20,7 @@ use std::ptr::NonNull; use std::sync::Arc; use bumpalo::Bump; -use common_base::mem_allocator::MmapAllocator; +use databend_common_base::mem_allocator::MmapAllocator; use crate::container::Container; use crate::container::HeapContainer; diff --git a/src/common/hashtable/src/hashjoin_hashtable.rs b/src/common/hashtable/src/hashjoin_hashtable.rs index fae436babc0c..7c126159fa14 100644 --- a/src/common/hashtable/src/hashjoin_hashtable.rs +++ b/src/common/hashtable/src/hashjoin_hashtable.rs @@ -17,8 +17,8 @@ use std::marker::PhantomData; use std::sync::atomic::AtomicU64; use std::sync::atomic::Ordering; -use common_arrow::arrow::bitmap::Bitmap; -use common_base::mem_allocator::MmapAllocator; +use databend_common_arrow::arrow::bitmap::Bitmap; +use databend_common_base::mem_allocator::MmapAllocator; use super::traits::HashJoinHashtableLike; use super::traits::Keyable; diff --git a/src/common/hashtable/src/hashjoin_string_hashtable.rs b/src/common/hashtable/src/hashjoin_string_hashtable.rs index bebef4505f03..c7ca141e7f03 100644 --- a/src/common/hashtable/src/hashjoin_string_hashtable.rs +++ b/src/common/hashtable/src/hashjoin_string_hashtable.rs @@ -16,8 +16,8 @@ use std::alloc::Allocator; use std::sync::atomic::AtomicU64; use std::sync::atomic::Ordering; -use common_arrow::arrow::bitmap::Bitmap; -use common_base::mem_allocator::MmapAllocator; +use databend_common_arrow::arrow::bitmap::Bitmap; +use databend_common_base::mem_allocator::MmapAllocator; use super::traits::HashJoinHashtableLike; use crate::hashjoin_hashtable::combine_header; diff --git a/src/common/hashtable/src/hashtable.rs b/src/common/hashtable/src/hashtable.rs index 0123ceab4499..0729944f06a3 100644 --- a/src/common/hashtable/src/hashtable.rs +++ b/src/common/hashtable/src/hashtable.rs @@ -17,7 +17,7 @@ use std::intrinsics::unlikely; use std::iter::TrustedLen; use std::mem::MaybeUninit; -use common_base::mem_allocator::MmapAllocator; +use databend_common_base::mem_allocator::MmapAllocator; use super::container::HeapContainer; use super::table0::Entry; diff --git a/src/common/hashtable/src/lookup_hashtable.rs b/src/common/hashtable/src/lookup_hashtable.rs index dca7a6b441f9..efdb266f2ab5 100644 --- a/src/common/hashtable/src/lookup_hashtable.rs +++ b/src/common/hashtable/src/lookup_hashtable.rs @@ -17,7 +17,7 @@ use std::iter::TrustedLen; use std::mem; use std::mem::MaybeUninit; -use common_base::mem_allocator::MmapAllocator; +use databend_common_base::mem_allocator::MmapAllocator; use crate::table0::Entry; use crate::HashtableLike; diff --git a/src/common/hashtable/src/short_string_hashtable.rs b/src/common/hashtable/src/short_string_hashtable.rs index d5085518f237..7933cecb51dc 100644 --- a/src/common/hashtable/src/short_string_hashtable.rs +++ b/src/common/hashtable/src/short_string_hashtable.rs @@ -21,7 +21,7 @@ use std::ptr::NonNull; use std::sync::Arc; use bumpalo::Bump; -use common_base::mem_allocator::MmapAllocator; +use databend_common_base::mem_allocator::MmapAllocator; use super::container::HeapContainer; use super::table0::Entry; diff --git a/src/common/hashtable/src/stack_hashtable.rs b/src/common/hashtable/src/stack_hashtable.rs index f14eff902f4c..542a3a86cd74 100644 --- a/src/common/hashtable/src/stack_hashtable.rs +++ b/src/common/hashtable/src/stack_hashtable.rs @@ -16,7 +16,7 @@ use std::alloc::Allocator; use std::intrinsics::unlikely; use std::mem::MaybeUninit; -use common_base::mem_allocator::MmapAllocator; +use databend_common_base::mem_allocator::MmapAllocator; use super::container::StackContainer; use super::table0::Entry; diff --git a/src/common/hashtable/src/string_hashtable.rs b/src/common/hashtable/src/string_hashtable.rs index 4c3720164842..f53301725975 100644 --- a/src/common/hashtable/src/string_hashtable.rs +++ b/src/common/hashtable/src/string_hashtable.rs @@ -19,7 +19,7 @@ use std::mem::MaybeUninit; use std::sync::Arc; use bumpalo::Bump; -use common_base::mem_allocator::MmapAllocator; +use databend_common_base::mem_allocator::MmapAllocator; use super::container::HeapContainer; use super::table0::Entry; diff --git a/src/common/hashtable/src/traits.rs b/src/common/hashtable/src/traits.rs index c7a48e78eb32..6dc828bcd7e1 100644 --- a/src/common/hashtable/src/traits.rs +++ b/src/common/hashtable/src/traits.rs @@ -20,7 +20,7 @@ use std::iter::TrustedLen; use std::mem::MaybeUninit; use std::num::NonZeroU64; -use common_arrow::arrow::bitmap::Bitmap; +use databend_common_arrow::arrow::bitmap::Bitmap; use ethnum::i256; use ethnum::U256; use ordered_float::OrderedFloat; diff --git a/src/common/hashtable/tests/it/main.rs b/src/common/hashtable/tests/it/main.rs index f60cea7002cd..8d6f461bbbd7 100644 --- a/src/common/hashtable/tests/it/main.rs +++ b/src/common/hashtable/tests/it/main.rs @@ -20,13 +20,13 @@ use std::sync::atomic::Ordering; use std::sync::Arc; use bumpalo::Bump; -use common_hashtable::DictionaryKeys; -use common_hashtable::DictionaryStringHashMap; -use common_hashtable::HashMap; -use common_hashtable::HashtableEntryMutRefLike; -use common_hashtable::HashtableLike; -use common_hashtable::ShortStringHashMap; -use common_hashtable::StackHashMap; +use databend_common_hashtable::DictionaryKeys; +use databend_common_hashtable::DictionaryStringHashMap; +use databend_common_hashtable::HashMap; +use databend_common_hashtable::HashtableEntryMutRefLike; +use databend_common_hashtable::HashtableLike; +use databend_common_hashtable::ShortStringHashMap; +use databend_common_hashtable::StackHashMap; use rand::Rng; macro_rules! simple_test { diff --git a/src/common/http/Cargo.toml b/src/common/http/Cargo.toml index b38379ac8d7b..62c64c0ce2b0 100644 --- a/src/common/http/Cargo.toml +++ b/src/common/http/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "common-http" +name = "databend-common-http" version = { workspace = true } authors = { workspace = true } license = { workspace = true } @@ -17,8 +17,8 @@ memory-profiling = ["tempfile"] [dependencies] # Workspace dependencies -common-base = { path = "../base" } -common-exception = { path = "../exception" } +databend-common-base = { path = "../base" } +databend-common-exception = { path = "../exception" } # GitHub dependencies diff --git a/src/common/http/src/debug/jeprof.rs b/src/common/http/src/debug/jeprof.rs index 284aed6595b6..4289f879292f 100644 --- a/src/common/http/src/debug/jeprof.rs +++ b/src/common/http/src/debug/jeprof.rs @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_base::mem_allocator::dump_profile; -use common_exception::ErrorCode; +use databend_common_base::mem_allocator::dump_profile; +use databend_common_exception::ErrorCode; use poem::error::InternalServerError; use poem::http::StatusCode; use poem::web::IntoResponse; diff --git a/src/common/http/src/debug/pprof.rs b/src/common/http/src/debug/pprof.rs index 7c4fc3d387a6..5dd30a566217 100644 --- a/src/common/http/src/debug/pprof.rs +++ b/src/common/http/src/debug/pprof.rs @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_base::base::tokio::time::Duration; -use common_base::base::Profiling; +use databend_common_base::base::tokio::time::Duration; +use databend_common_base::base::Profiling; use log::debug; use poem::error::InternalServerError; use poem::web::Query; diff --git a/src/common/http/src/debug/stack.rs b/src/common/http/src/debug/stack.rs index f835df112817..96f3b3620e23 100644 --- a/src/common/http/src/debug/stack.rs +++ b/src/common/http/src/debug/stack.rs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_base::dump_backtrace; +use databend_common_base::dump_backtrace; use poem::web::Query; use poem::IntoResponse; diff --git a/src/common/http/src/http_shutdown_handlers.rs b/src/common/http/src/http_shutdown_handlers.rs index 1c76ba21f546..5b693e4049ec 100644 --- a/src/common/http/src/http_shutdown_handlers.rs +++ b/src/common/http/src/http_shutdown_handlers.rs @@ -16,10 +16,10 @@ use std::net::SocketAddr; use std::time::Duration; use anyerror::AnyError; -use common_base::base::tokio; -use common_base::base::tokio::sync::broadcast; -use common_base::base::tokio::sync::oneshot; -use common_base::base::tokio::task::JoinHandle; +use databend_common_base::base::tokio; +use databend_common_base::base::tokio::sync::broadcast; +use databend_common_base::base::tokio::sync::oneshot; +use databend_common_base::base::tokio::task::JoinHandle; use futures::future::Either; use futures::FutureExt; use log::error; @@ -80,7 +80,7 @@ impl HttpShutdownHandler { } let (tx, rx) = oneshot::channel(); - let join_handle = common_base::base::tokio::spawn( + let join_handle = databend_common_base::base::tokio::spawn( async_backtrace::location!().frame( poem::Server::new_with_acceptor(acceptor) .name(self.service_name.clone()) diff --git a/src/common/http/tests/it/health.rs b/src/common/http/tests/it/health.rs index 79f881f31f7c..8742268304e8 100644 --- a/src/common/http/tests/it/health.rs +++ b/src/common/http/tests/it/health.rs @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_base::base::tokio; -use common_http::health_handler; +use databend_common_base::base::tokio; +use databend_common_http::health_handler; use poem::get; use poem::http::Method; use poem::http::StatusCode; @@ -24,7 +24,7 @@ use poem::Route; use pretty_assertions::assert_eq; #[tokio::test(flavor = "multi_thread")] -async fn test_health() -> common_exception::Result<()> { +async fn test_health() -> databend_common_exception::Result<()> { let cluster_router = Route::new().at("/v1/health", get(health_handler)); // health check let response = cluster_router diff --git a/src/common/io/Cargo.toml b/src/common/io/Cargo.toml index 599035b5d200..465f08f6f218 100644 --- a/src/common/io/Cargo.toml +++ b/src/common/io/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "common-io" +name = "databend-common-io" version = { workspace = true } authors = { workspace = true } license = { workspace = true } @@ -14,7 +14,7 @@ test = false [dependencies] # Workspace dependencies -common-exception = { path = "../exception" } +databend-common-exception = { path = "../exception" } # Crates.io dependencies bincode = { workspace = true } diff --git a/src/common/io/src/binary_read.rs b/src/common/io/src/binary_read.rs index 811203d0235e..59875ee7612a 100644 --- a/src/common/io/src/binary_read.rs +++ b/src/common/io/src/binary_read.rs @@ -15,8 +15,8 @@ use std::io; use std::mem::MaybeUninit; -use common_exception::ErrorCode; -use common_exception::Result; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; use micromarshal::Unmarshal; use crate::stat_buffer::StatBuffer; diff --git a/src/common/io/src/binary_write.rs b/src/common/io/src/binary_write.rs index d7358ae86b50..7d0d07ecd03c 100644 --- a/src/common/io/src/binary_write.rs +++ b/src/common/io/src/binary_write.rs @@ -13,7 +13,7 @@ // limitations under the License. use bytes::BufMut; -use common_exception::Result; +use databend_common_exception::Result; use micromarshal::Marshal; use crate::stat_buffer::StatBuffer; diff --git a/src/common/io/src/bitmap.rs b/src/common/io/src/bitmap.rs index 510de84a0020..f3f0804de7ee 100644 --- a/src/common/io/src/bitmap.rs +++ b/src/common/io/src/bitmap.rs @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_exception::ErrorCode; -use common_exception::Result; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; use roaring::RoaringTreemap; pub fn parse_bitmap(buf: &[u8]) -> Result { diff --git a/src/common/io/src/cursor_ext/cursor_read_datetime_ext.rs b/src/common/io/src/cursor_ext/cursor_read_datetime_ext.rs index f59a7ddf637b..df0c61351f4a 100644 --- a/src/common/io/src/cursor_ext/cursor_read_datetime_ext.rs +++ b/src/common/io/src/cursor_ext/cursor_read_datetime_ext.rs @@ -24,9 +24,9 @@ use chrono::NaiveDate; use chrono::Offset; use chrono::TimeZone; use chrono_tz::Tz; -use common_exception::ErrorCode; -use common_exception::Result; -use common_exception::ToErrorCode; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_exception::ToErrorCode; use crate::cursor_ext::cursor_read_bytes_ext::ReadBytesExt; diff --git a/src/common/io/src/cursor_ext/cursor_read_number_ext.rs b/src/common/io/src/cursor_ext/cursor_read_number_ext.rs index 6cfd21800eb0..edf9af156a60 100644 --- a/src/common/io/src/cursor_ext/cursor_read_number_ext.rs +++ b/src/common/io/src/cursor_ext/cursor_read_number_ext.rs @@ -15,8 +15,8 @@ use std::io::BufRead; use std::io::Cursor; -use common_exception::ErrorCode; -use common_exception::Result; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; use lexical_core::FromLexical; pub trait ReadNumberExt { diff --git a/src/common/io/src/serialization.rs b/src/common/io/src/serialization.rs index c5b4df9b4886..4aebbf46f60f 100644 --- a/src/common/io/src/serialization.rs +++ b/src/common/io/src/serialization.rs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_exception::Result; +use databend_common_exception::Result; pub enum BincodeConfig { // Little endian diff --git a/src/common/io/tests/it/binary_read.rs b/src/common/io/tests/it/binary_read.rs index 8b2a1031593d..ed66f2b363a6 100644 --- a/src/common/io/tests/it/binary_read.rs +++ b/src/common/io/tests/it/binary_read.rs @@ -14,8 +14,8 @@ use std::io::Cursor; -use common_exception::Result; -use common_io::prelude::*; +use databend_common_exception::Result; +use databend_common_io::prelude::*; #[test] fn test_write_and_read() -> Result<()> { diff --git a/src/common/io/tests/it/binary_write.rs b/src/common/io/tests/it/binary_write.rs index c42af59f7c98..1c10f8e13467 100644 --- a/src/common/io/tests/it/binary_write.rs +++ b/src/common/io/tests/it/binary_write.rs @@ -14,7 +14,7 @@ use bytes::BufMut; use bytes::BytesMut; -use common_io::prelude::put_uvarint; +use databend_common_io::prelude::put_uvarint; #[test] fn test_put_uvarint() { diff --git a/src/common/io/tests/it/cursor_ext/fast_read_text_ext.rs b/src/common/io/tests/it/cursor_ext/fast_read_text_ext.rs index edf336aaae76..f3ce5dde326c 100644 --- a/src/common/io/tests/it/cursor_ext/fast_read_text_ext.rs +++ b/src/common/io/tests/it/cursor_ext/fast_read_text_ext.rs @@ -16,8 +16,8 @@ use std::collections::VecDeque; use std::io::Cursor; use aho_corasick::AhoCorasick; -use common_exception::Result; -use common_io::cursor_ext::*; +use databend_common_exception::Result; +use databend_common_io::cursor_ext::*; #[test] fn test_positions() -> Result<()> { diff --git a/src/common/io/tests/it/cursor_ext/read_bytes_ext.rs b/src/common/io/tests/it/cursor_ext/read_bytes_ext.rs index 82276c4ee28a..45d3f7b0bb89 100644 --- a/src/common/io/tests/it/cursor_ext/read_bytes_ext.rs +++ b/src/common/io/tests/it/cursor_ext/read_bytes_ext.rs @@ -14,7 +14,7 @@ use std::io::Cursor; -use common_io::cursor_ext::*; +use databend_common_io::cursor_ext::*; #[test] fn test_read_ext() { diff --git a/src/common/io/tests/it/cursor_ext/read_datetime_ext.rs b/src/common/io/tests/it/cursor_ext/read_datetime_ext.rs index 76256f86ebd0..170c02e18912 100644 --- a/src/common/io/tests/it/cursor_ext/read_datetime_ext.rs +++ b/src/common/io/tests/it/cursor_ext/read_datetime_ext.rs @@ -15,8 +15,8 @@ use std::io::Cursor; use chrono_tz::Tz; -use common_exception::Result; -use common_io::cursor_ext::*; +use databend_common_exception::Result; +use databend_common_io::cursor_ext::*; #[test] fn test_read_timestamp_text() -> Result<()> { diff --git a/src/common/io/tests/it/cursor_ext/read_number_ext.rs b/src/common/io/tests/it/cursor_ext/read_number_ext.rs index 36591609e2b4..0b8e8951be45 100644 --- a/src/common/io/tests/it/cursor_ext/read_number_ext.rs +++ b/src/common/io/tests/it/cursor_ext/read_number_ext.rs @@ -14,8 +14,8 @@ use std::io::Cursor; -use common_exception::Result; -use common_io::cursor_ext::*; +use databend_common_exception::Result; +use databend_common_io::cursor_ext::*; #[test] fn test_collect_number() -> Result<()> { diff --git a/src/common/io/tests/it/escape.rs b/src/common/io/tests/it/escape.rs index 96ac279cf99b..3eb122976b45 100644 --- a/src/common/io/tests/it/escape.rs +++ b/src/common/io/tests/it/escape.rs @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_exception::Result; -use common_io::escape_string; +use databend_common_exception::Result; +use databend_common_io::escape_string; #[test] fn test_escape() -> Result<()> { diff --git a/src/common/io/tests/it/serialization.rs b/src/common/io/tests/it/serialization.rs index b1d647014abb..7a47860ad26d 100644 --- a/src/common/io/tests/it/serialization.rs +++ b/src/common/io/tests/it/serialization.rs @@ -14,8 +14,8 @@ use std::io::Cursor; -use common_exception::Result; -use common_io::prelude::*; +use databend_common_exception::Result; +use databend_common_io::prelude::*; use serde::Deserialize; use serde::Serialize; diff --git a/src/common/license/Cargo.toml b/src/common/license/Cargo.toml index ebdd588742b1..862bde60d873 100644 --- a/src/common/license/Cargo.toml +++ b/src/common/license/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "common-license" +name = "databend-common-license" version = { workspace = true } authors = { workspace = true } license = { workspace = true } @@ -12,7 +12,7 @@ test = false [dependencies] # Workspace dependencies -common-base = { path = "../base" } -common-exception = { path = "../exception" } +databend-common-base = { path = "../base" } +databend-common-exception = { path = "../exception" } jwt-simple = "0.11.0" serde = { workspace = true } diff --git a/src/common/license/src/license_manager.rs b/src/common/license/src/license_manager.rs index 71cb72511ff8..19b00cffd01d 100644 --- a/src/common/license/src/license_manager.rs +++ b/src/common/license/src/license_manager.rs @@ -14,9 +14,9 @@ use std::sync::Arc; -use common_base::base::GlobalInstance; -use common_exception::ErrorCode; -use common_exception::Result; +use databend_common_base::base::GlobalInstance; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; use jwt_simple::claims::JWTClaims; use crate::license::Feature; diff --git a/src/common/metrics/Cargo.toml b/src/common/metrics/Cargo.toml index 9ecf7fbc4b9a..59679112c010 100644 --- a/src/common/metrics/Cargo.toml +++ b/src/common/metrics/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "common-metrics" +name = "databend-common-metrics" version = { workspace = true } authors = { workspace = true } license = { workspace = true } @@ -15,7 +15,7 @@ enable-histogram = ["metrics/enable-histogram"] [dependencies] # Workspace dependencies -common-exception = { path = "../exception" } +databend-common-exception = { path = "../exception" } # Crates.io dependencies metrics = { workspace = true } diff --git a/src/common/metrics/src/dump.rs b/src/common/metrics/src/dump.rs index cfa86df54614..9326bad26ff3 100644 --- a/src/common/metrics/src/dump.rs +++ b/src/common/metrics/src/dump.rs @@ -14,8 +14,8 @@ use std::collections::HashMap; -use common_exception::ErrorCode; -use common_exception::Result; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; use prometheus_client::registry::Registry; use crate::render_prometheus_metrics; diff --git a/src/common/metrics/tests/it/main.rs b/src/common/metrics/tests/it/main.rs index 283d387d6982..152f46c1ef47 100644 --- a/src/common/metrics/tests/it/main.rs +++ b/src/common/metrics/tests/it/main.rs @@ -14,15 +14,15 @@ use std::collections::HashMap; -use common_exception::ErrorCode; -use common_metrics::dump_metric_samples; -use common_metrics::load_global_prometheus_registry; -use common_metrics::register_counter; -use common_metrics::register_histogram_in_milliseconds; -use common_metrics::MetricValue; +use databend_common_exception::ErrorCode; +use databend_common_metrics::dump_metric_samples; +use databend_common_metrics::load_global_prometheus_registry; +use databend_common_metrics::register_counter; +use databend_common_metrics::register_histogram_in_milliseconds; +use databend_common_metrics::MetricValue; #[tokio::test(flavor = "multi_thread")] -async fn test_dump_metric_samples() -> common_exception::Result<()> { +async fn test_dump_metric_samples() -> databend_common_exception::Result<()> { let counter1 = register_counter("test_test1_count"); let counter2 = register_counter("test_test2_count"); let histogram1 = register_histogram_in_milliseconds("test_test_query_usedtime"); diff --git a/src/common/openai/Cargo.toml b/src/common/openai/Cargo.toml index b1f72147562e..c35656b2fdb1 100644 --- a/src/common/openai/Cargo.toml +++ b/src/common/openai/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "common-openai" +name = "databend-common-openai" version = { workspace = true } authors = { workspace = true } license = { workspace = true } @@ -14,8 +14,8 @@ test = false [dependencies] # Workspace dependencies -common-exception = { path = "../exception" } -common-metrics = { path = "../metrics" } +databend-common-exception = { path = "../exception" } +databend-common-metrics = { path = "../metrics" } # GitHub dependencies diff --git a/src/common/openai/src/completion.rs b/src/common/openai/src/completion.rs index a92165f6bdaf..23a074343b1d 100644 --- a/src/common/openai/src/completion.rs +++ b/src/common/openai/src/completion.rs @@ -14,9 +14,9 @@ use std::time::Duration; -use common_exception::ErrorCode; -use common_exception::Result; -use common_metrics::openai::*; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_metrics::openai::*; use log::trace; use openai_api_rust::chat::ChatApi; use openai_api_rust::chat::ChatBody; diff --git a/src/common/openai/src/embedding.rs b/src/common/openai/src/embedding.rs index cad60245f51f..5ae7e9beb238 100644 --- a/src/common/openai/src/embedding.rs +++ b/src/common/openai/src/embedding.rs @@ -14,9 +14,9 @@ use std::time::Duration; -use common_exception::ErrorCode; -use common_exception::Result; -use common_metrics::openai::*; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_metrics::openai::*; use openai_api_rust::embeddings::EmbeddingsApi; use openai_api_rust::embeddings::EmbeddingsBody; use openai_api_rust::Auth; diff --git a/src/common/openai/tests/it/openai.rs b/src/common/openai/tests/it/openai.rs index e6c9e430f78c..bfd6b82f668a 100644 --- a/src/common/openai/tests/it/openai.rs +++ b/src/common/openai/tests/it/openai.rs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_openai::OpenAI; +use databend_common_openai::OpenAI; fn create_openai() -> Option { let key = std::env::var("OPENAI_API_KEY").unwrap_or("".to_string()); diff --git a/src/common/storage/Cargo.toml b/src/common/storage/Cargo.toml index 6b9b8cecd8bc..325a2dda93ce 100644 --- a/src/common/storage/Cargo.toml +++ b/src/common/storage/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "common-storage" +name = "databend-common-storage" version = { workspace = true } authors = { workspace = true } license = { workspace = true } @@ -7,17 +7,17 @@ publish = { workspace = true } edition = { workspace = true } [features] -storage-hdfs = ["common-meta-app/storage-hdfs"] +storage-hdfs = ["databend-common-meta-app/storage-hdfs"] [dependencies] -common-arrow = { path = "../arrow" } -common-auth = { path = "../auth" } -common-base = { path = "../base" } -common-exception = { path = "../exception" } -common-expression = { path = "../../query/expression" } -common-meta-app = { path = "../../meta/app" } -common-metrics = { path = "../metrics" } -storage-encryption = { path = "../../query/ee_features/storage_encryption" } +databend-common-arrow = { path = "../arrow" } +databend-common-auth = { path = "../auth" } +databend-common-base = { path = "../base" } +databend-common-exception = { path = "../exception" } +databend-common-expression = { path = "../../query/expression" } +databend-common-meta-app = { path = "../../meta/app" } +databend-common-metrics = { path = "../metrics" } +databend-enterprise-storage-encryption = { path = "../../query/ee_features/storage_encryption" } anyhow = { workspace = true } arrow-schema = { workspace = true } diff --git a/src/common/storage/src/column_node.rs b/src/common/storage/src/column_node.rs index 44f6b89f3937..ca1e9c7643b0 100644 --- a/src/common/storage/src/column_node.rs +++ b/src/common/storage/src/column_node.rs @@ -15,15 +15,15 @@ //! This module provides data structures for build column indexes. //! It's used by Fuse Engine and Parquet Engine. -use common_arrow::arrow::datatypes::DataType as ArrowType; -use common_arrow::arrow::datatypes::Field as ArrowField; -use common_arrow::arrow::datatypes::Schema as ArrowSchema; -use common_arrow::arrow::io::parquet::read::InitNested; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::ColumnId; -use common_expression::FieldIndex; -use common_expression::TableSchema; +use databend_common_arrow::arrow::datatypes::DataType as ArrowType; +use databend_common_arrow::arrow::datatypes::Field as ArrowField; +use databend_common_arrow::arrow::datatypes::Schema as ArrowSchema; +use databend_common_arrow::arrow::io::parquet::read::InitNested; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::ColumnId; +use databend_common_expression::FieldIndex; +use databend_common_expression::TableSchema; #[derive(Debug, Clone)] pub struct ColumnNodes { diff --git a/src/common/storage/src/config.rs b/src/common/storage/src/config.rs index c2910e51ed02..7a0c832fc3bd 100644 --- a/src/common/storage/src/config.rs +++ b/src/common/storage/src/config.rs @@ -16,11 +16,11 @@ use std::fmt::Debug; use std::path::Path; use std::sync::Arc; -use common_auth::RefreshableToken; -use common_auth::TokenFile; -use common_base::base::tokio::sync::RwLock; -use common_base::base::GlobalInstance; -use common_meta_app::storage::StorageParams; +use databend_common_auth::RefreshableToken; +use databend_common_auth::TokenFile; +use databend_common_base::base::tokio::sync::RwLock; +use databend_common_base::base::GlobalInstance; +use databend_common_meta_app::storage::StorageParams; use serde::Deserialize; use serde::Serialize; @@ -58,7 +58,7 @@ impl ShareTableConfig { share_endpoint_address: &str, token_file: &str, default_token: String, - ) -> common_exception::Result<()> { + ) -> databend_common_exception::Result<()> { GlobalInstance::set(Self::try_create( share_endpoint_address, token_file, @@ -72,7 +72,7 @@ impl ShareTableConfig { share_endpoint_address: &str, token_file: &str, default_token: String, - ) -> common_exception::Result { + ) -> databend_common_exception::Result { let share_endpoint_address = if share_endpoint_address.is_empty() { None } else { diff --git a/src/common/storage/src/copy.rs b/src/common/storage/src/copy.rs index bb89af5dd3c8..7a4c0551596c 100644 --- a/src/common/storage/src/copy.rs +++ b/src/common/storage/src/copy.rs @@ -12,10 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_exception::ErrorCode; -use common_meta_app::principal::OnErrorMode; use dashmap::mapref::entry::Entry; use dashmap::DashMap; +use databend_common_exception::ErrorCode; +use databend_common_meta_app::principal::OnErrorMode; use serde::Deserialize; use serde::Serialize; use thiserror::Error; diff --git a/src/common/storage/src/operator.rs b/src/common/storage/src/operator.rs index 4c5281c96bcb..6405eb7a49fc 100644 --- a/src/common/storage/src/operator.rs +++ b/src/common/storage/src/operator.rs @@ -19,26 +19,27 @@ use std::io::Result; use std::time::Duration; use anyhow::anyhow; -use common_base::base::GlobalInstance; -use common_base::runtime::GlobalIORuntime; -use common_base::runtime::TrySpawn; -use common_base::GLOBAL_TASK; -use common_exception::ErrorCode; -use common_meta_app::storage::StorageAzblobConfig; -use common_meta_app::storage::StorageCosConfig; -use common_meta_app::storage::StorageFsConfig; -use common_meta_app::storage::StorageGcsConfig; +use databend_common_base::base::GlobalInstance; +use databend_common_base::runtime::GlobalIORuntime; +use databend_common_base::runtime::TrySpawn; +use databend_common_base::GLOBAL_TASK; +use databend_common_exception::ErrorCode; +use databend_common_meta_app::storage::StorageAzblobConfig; +use databend_common_meta_app::storage::StorageCosConfig; +use databend_common_meta_app::storage::StorageFsConfig; +use databend_common_meta_app::storage::StorageGcsConfig; #[cfg(feature = "storage-hdfs")] -use common_meta_app::storage::StorageHdfsConfig; -use common_meta_app::storage::StorageHttpConfig; -use common_meta_app::storage::StorageIpfsConfig; -use common_meta_app::storage::StorageMokaConfig; -use common_meta_app::storage::StorageObsConfig; -use common_meta_app::storage::StorageOssConfig; -use common_meta_app::storage::StorageParams; -use common_meta_app::storage::StorageS3Config; -use common_meta_app::storage::StorageWebhdfsConfig; -use common_metrics::load_global_prometheus_registry; +use databend_common_meta_app::storage::StorageHdfsConfig; +use databend_common_meta_app::storage::StorageHttpConfig; +use databend_common_meta_app::storage::StorageIpfsConfig; +use databend_common_meta_app::storage::StorageMokaConfig; +use databend_common_meta_app::storage::StorageObsConfig; +use databend_common_meta_app::storage::StorageOssConfig; +use databend_common_meta_app::storage::StorageParams; +use databend_common_meta_app::storage::StorageS3Config; +use databend_common_meta_app::storage::StorageWebhdfsConfig; +use databend_common_metrics::load_global_prometheus_registry; +use databend_enterprise_storage_encryption::get_storage_encryption_handler; use log::warn; use once_cell::sync::OnceCell; use opendal::layers::ImmutableIndexLayer; @@ -51,7 +52,6 @@ use opendal::raw::HttpClient; use opendal::services; use opendal::Builder; use opendal::Operator; -use storage_encryption::get_storage_encryption_handler; use crate::runtime_layer::RuntimeLayer; use crate::StorageConfig; @@ -395,14 +395,14 @@ impl DataOperator { } #[async_backtrace::framed] - pub async fn init(conf: &StorageConfig) -> common_exception::Result<()> { + pub async fn init(conf: &StorageConfig) -> databend_common_exception::Result<()> { GlobalInstance::set(Self::try_create(&conf.params).await?); Ok(()) } /// Create a new data operator without check. - pub fn try_new(sp: &StorageParams) -> common_exception::Result { + pub fn try_new(sp: &StorageParams) -> databend_common_exception::Result { let operator = init_operator(sp)?; Ok(DataOperator { @@ -412,7 +412,7 @@ impl DataOperator { } #[async_backtrace::framed] - pub async fn try_create(sp: &StorageParams) -> common_exception::Result { + pub async fn try_create(sp: &StorageParams) -> databend_common_exception::Result { let sp = sp.clone(); let operator = init_operator(&sp)?; @@ -441,7 +441,7 @@ impl DataOperator { } /// Check license must be run after license manager setup. - pub async fn check_license(&self) -> common_exception::Result<()> { + pub async fn check_license(&self) -> databend_common_exception::Result<()> { if self.params.need_encryption_feature() { get_storage_encryption_handler().check_license().await?; } diff --git a/src/common/storage/src/parquet2.rs b/src/common/storage/src/parquet2.rs index 88d93520ea4d..9879850486d7 100644 --- a/src/common/storage/src/parquet2.rs +++ b/src/common/storage/src/parquet2.rs @@ -12,15 +12,15 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_arrow::arrow::datatypes::DataType as ArrowType; -use common_arrow::arrow::datatypes::Field as ArrowField; -use common_arrow::arrow::datatypes::Schema as ArrowSchema; -use common_arrow::arrow::io::parquet::read as pread; -use common_arrow::parquet::metadata::FileMetaData; -use common_base::runtime::execute_futures_in_parallel; -use common_base::runtime::GLOBAL_MEM_STAT; -use common_exception::ErrorCode; -use common_exception::Result; +use databend_common_arrow::arrow::datatypes::DataType as ArrowType; +use databend_common_arrow::arrow::datatypes::Field as ArrowField; +use databend_common_arrow::arrow::datatypes::Schema as ArrowSchema; +use databend_common_arrow::arrow::io::parquet::read as pread; +use databend_common_arrow::parquet::metadata::FileMetaData; +use databend_common_base::runtime::execute_futures_in_parallel; +use databend_common_base::runtime::GLOBAL_MEM_STAT; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; use opendal::Operator; #[async_backtrace::framed] diff --git a/src/common/storage/src/parquet_rs.rs b/src/common/storage/src/parquet_rs.rs index 9cf28db3a610..59a57ff4ecff 100644 --- a/src/common/storage/src/parquet_rs.rs +++ b/src/common/storage/src/parquet_rs.rs @@ -16,10 +16,10 @@ use std::collections::HashMap; use std::sync::Arc; use arrow_schema::Schema as ArrowSchema; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::FieldIndex; -use common_expression::EXTENSION_KEY; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::FieldIndex; +use databend_common_expression::EXTENSION_KEY; use opendal::Operator; use parquet::arrow::parquet_to_arrow_schema; use parquet::file::footer::decode_footer; @@ -204,10 +204,10 @@ pub fn traverse_parquet_schema_tree( #[cfg(test)] mod tests { - use common_expression::types::NumberDataType; - use common_expression::TableDataType; - use common_expression::TableField; - use common_expression::TableSchema; + use databend_common_expression::types::NumberDataType; + use databend_common_expression::TableDataType; + use databend_common_expression::TableField; + use databend_common_expression::TableSchema; use parquet::arrow::arrow_to_parquet_schema; use crate::parquet_rs::build_parquet_schema_tree; diff --git a/src/common/storage/src/runtime_layer.rs b/src/common/storage/src/runtime_layer.rs index 66e426c22c6c..7dc1a41c29ae 100644 --- a/src/common/storage/src/runtime_layer.rs +++ b/src/common/storage/src/runtime_layer.rs @@ -21,9 +21,9 @@ use std::task::Poll; use async_trait::async_trait; use bytes::Bytes; -use common_base::base::tokio::runtime::Handle; -use common_base::base::tokio::task::JoinHandle; -use common_base::runtime::TrackedFuture; +use databend_common_base::base::tokio::runtime::Handle; +use databend_common_base::base::tokio::task::JoinHandle; +use databend_common_base::runtime::TrackedFuture; use futures::ready; use futures::Future; use opendal::raw::oio; diff --git a/src/common/storage/src/stage.rs b/src/common/storage/src/stage.rs index ccd67fe67d01..246a3034442b 100644 --- a/src/common/storage/src/stage.rs +++ b/src/common/storage/src/stage.rs @@ -16,11 +16,11 @@ use std::path::Path; use chrono::DateTime; use chrono::Utc; -use common_exception::ErrorCode; -use common_exception::Result; -use common_meta_app::principal::StageInfo; -use common_meta_app::principal::StageType; -use common_meta_app::principal::UserIdentity; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_meta_app::principal::StageInfo; +use databend_common_meta_app::principal::StageType; +use databend_common_meta_app::principal::UserIdentity; use futures::TryStreamExt; use opendal::EntryMode; use opendal::Metadata; diff --git a/src/common/storage/src/statistics.rs b/src/common/storage/src/statistics.rs index aaf277e9f2a9..5a91efd2297f 100644 --- a/src/common/storage/src/statistics.rs +++ b/src/common/storage/src/statistics.rs @@ -15,10 +15,10 @@ use std::fmt::Display; use std::fmt::Formatter; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::types::number::NumberScalar; -use common_expression::Scalar; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::types::number::NumberScalar; +use databend_common_expression::Scalar; use ordered_float::OrderedFloat; pub type F64 = OrderedFloat; diff --git a/src/common/storage/tests/it/column_node.rs b/src/common/storage/tests/it/column_node.rs index f1922ab5bff2..67d0e76b4e19 100644 --- a/src/common/storage/tests/it/column_node.rs +++ b/src/common/storage/tests/it/column_node.rs @@ -12,14 +12,14 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_exception::Result; -use common_expression::create_test_complex_schema; -use common_expression::types::NumberDataType; -use common_expression::TableDataType; -use common_expression::TableField; -use common_expression::TableSchema; -use common_storage::ColumnNode; -use common_storage::ColumnNodes; +use databend_common_exception::Result; +use databend_common_expression::create_test_complex_schema; +use databend_common_expression::types::NumberDataType; +use databend_common_expression::TableDataType; +use databend_common_expression::TableField; +use databend_common_expression::TableSchema; +use databend_common_storage::ColumnNode; +use databend_common_storage::ColumnNodes; fn test_node_leaf_index_match_column_ids(schema: &TableSchema, column_node: &ColumnNode) { let leaf_column_ids = schema.to_leaf_column_ids(); diff --git a/src/common/tracing/Cargo.toml b/src/common/tracing/Cargo.toml index 0ef787500040..434c493f7e40 100644 --- a/src/common/tracing/Cargo.toml +++ b/src/common/tracing/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "common-tracing" +name = "databend-common-tracing" version = { workspace = true } authors = { workspace = true } license = { workspace = true } @@ -15,7 +15,7 @@ console = ["console-subscriber", "tracing", "tracing-subscriber"] [dependencies] # In alphabetical order # Workspace dependencies -common-base = { path = "../base" } +databend-common-base = { path = "../base" } # Crates.io dependencies console-subscriber = { version = "0.2.0", optional = true } diff --git a/src/common/tracing/src/init.rs b/src/common/tracing/src/init.rs index af6fac822798..33100d0e28ec 100644 --- a/src/common/tracing/src/init.rs +++ b/src/common/tracing/src/init.rs @@ -19,8 +19,8 @@ use std::io::Write; use std::time::Duration; use std::time::SystemTime; -use common_base::base::tokio; -use common_base::base::GlobalInstance; +use databend_common_base::base::tokio; +use databend_common_base::base::GlobalInstance; use fern::FormatCallback; use log::LevelFilter; use log::Log; @@ -240,9 +240,7 @@ pub fn init_logging( .level_for("databend::log::query", LevelFilter::Off) .level_for("databend::log::profile", LevelFilter::Off) .filter(|meta| { - if meta.target().starts_with("databend_") - || meta.target().starts_with("common_") - { + if meta.target().starts_with("databend_") { true } else { meta.level() <= LevelFilter::Error diff --git a/src/common/tracing/src/lib.rs b/src/common/tracing/src/lib.rs index 37a1281389c7..6c89e6b038ac 100644 --- a/src/common/tracing/src/lib.rs +++ b/src/common/tracing/src/lib.rs @@ -52,7 +52,7 @@ pub fn closure_name() -> &'static str { /// # #[macro_use] extern crate common_tracing; /// # fn main() { /// let _sentry = sentry::init(sentry::ClientOptions { -/// release: common_tracing::databend_semver!(), +/// release: databend_common_tracing::databend_semver!(), /// ..Default::default() /// }); /// # } diff --git a/src/common/tracing/src/panic_hook.rs b/src/common/tracing/src/panic_hook.rs index ecbb64292879..bbb54d6bd192 100644 --- a/src/common/tracing/src/panic_hook.rs +++ b/src/common/tracing/src/panic_hook.rs @@ -15,7 +15,7 @@ use std::backtrace::Backtrace; use std::panic::PanicInfo; -use common_base::runtime::LimitMemGuard; +use databend_common_base::runtime::LimitMemGuard; use log::error; pub fn set_panic_hook() { diff --git a/src/common/vector/Cargo.toml b/src/common/vector/Cargo.toml index 22a74248ac50..8a3f05b941f4 100644 --- a/src/common/vector/Cargo.toml +++ b/src/common/vector/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "common-vector" +name = "databend-common-vector" version = { workspace = true } authors = { workspace = true } license = { workspace = true } @@ -11,7 +11,7 @@ doctest = false test = false [dependencies] # In alphabetical order -common-exception = { path = "../exception" } +databend-common-exception = { path = "../exception" } ndarray = "0.15.6" diff --git a/src/common/vector/src/distance.rs b/src/common/vector/src/distance.rs index 3d5a1f45d4d5..56f605dfb81f 100644 --- a/src/common/vector/src/distance.rs +++ b/src/common/vector/src/distance.rs @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_exception::ErrorCode; -use common_exception::Result; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; use ndarray::ArrayView; pub fn cosine_distance(from: &[f32], to: &[f32]) -> Result { diff --git a/src/common/vector/tests/it/distance.rs b/src/common/vector/tests/it/distance.rs index f9355a60ffc8..b79f63f1d770 100644 --- a/src/common/vector/tests/it/distance.rs +++ b/src/common/vector/tests/it/distance.rs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_vector::cosine_distance; +use databend_common_vector::cosine_distance; #[test] fn test_cosine() { diff --git a/src/meta/api/Cargo.toml b/src/meta/api/Cargo.toml index f3d2d4a1e263..329440eb10b3 100644 --- a/src/meta/api/Cargo.toml +++ b/src/meta/api/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "common-meta-api" +name = "databend-common-meta-api" version = { workspace = true } authors = { workspace = true } license = { workspace = true } @@ -13,14 +13,14 @@ doctest = false test = true [dependencies] -common-exception = { path = "../../common/exception" } -common-expression = { path = "../../query/expression" } -common-meta-app = { path = "../app" } -common-meta-kvapi = { path = "../kvapi" } -common-meta-stoerr = { path = "../stoerr" } -common-meta-types = { path = "../types" } -common-proto-conv = { path = "../proto-conv" } -common-protos = { path = "../protos" } +databend-common-exception = { path = "../../common/exception" } +databend-common-expression = { path = "../../query/expression" } +databend-common-meta-app = { path = "../app" } +databend-common-meta-kvapi = { path = "../kvapi" } +databend-common-meta-stoerr = { path = "../stoerr" } +databend-common-meta-types = { path = "../types" } +databend-common-proto-conv = { path = "../proto-conv" } +databend-common-protos = { path = "../protos" } anyhow = { workspace = true } async-trait = { workspace = true } diff --git a/src/meta/api/src/background_api.rs b/src/meta/api/src/background_api.rs index df200416df32..cc5df5488aba 100644 --- a/src/meta/api/src/background_api.rs +++ b/src/meta/api/src/background_api.rs @@ -12,23 +12,23 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_meta_app::background::BackgroundJobInfo; -use common_meta_app::background::BackgroundTaskInfo; -use common_meta_app::background::CreateBackgroundJobReply; -use common_meta_app::background::CreateBackgroundJobReq; -use common_meta_app::background::DeleteBackgroundJobReply; -use common_meta_app::background::DeleteBackgroundJobReq; -use common_meta_app::background::GetBackgroundJobReply; -use common_meta_app::background::GetBackgroundJobReq; -use common_meta_app::background::GetBackgroundTaskReply; -use common_meta_app::background::GetBackgroundTaskReq; -use common_meta_app::background::ListBackgroundJobsReq; -use common_meta_app::background::ListBackgroundTasksReq; -use common_meta_app::background::UpdateBackgroundJobParamsReq; -use common_meta_app::background::UpdateBackgroundJobReply; -use common_meta_app::background::UpdateBackgroundJobStatusReq; -use common_meta_app::background::UpdateBackgroundTaskReply; -use common_meta_app::background::UpdateBackgroundTaskReq; +use databend_common_meta_app::background::BackgroundJobInfo; +use databend_common_meta_app::background::BackgroundTaskInfo; +use databend_common_meta_app::background::CreateBackgroundJobReply; +use databend_common_meta_app::background::CreateBackgroundJobReq; +use databend_common_meta_app::background::DeleteBackgroundJobReply; +use databend_common_meta_app::background::DeleteBackgroundJobReq; +use databend_common_meta_app::background::GetBackgroundJobReply; +use databend_common_meta_app::background::GetBackgroundJobReq; +use databend_common_meta_app::background::GetBackgroundTaskReply; +use databend_common_meta_app::background::GetBackgroundTaskReq; +use databend_common_meta_app::background::ListBackgroundJobsReq; +use databend_common_meta_app::background::ListBackgroundTasksReq; +use databend_common_meta_app::background::UpdateBackgroundJobParamsReq; +use databend_common_meta_app::background::UpdateBackgroundJobReply; +use databend_common_meta_app::background::UpdateBackgroundJobStatusReq; +use databend_common_meta_app::background::UpdateBackgroundTaskReply; +use databend_common_meta_app::background::UpdateBackgroundTaskReq; use crate::kv_app_error::KVAppError; diff --git a/src/meta/api/src/background_api_impl.rs b/src/meta/api/src/background_api_impl.rs index 479e6531953c..cb590812654d 100644 --- a/src/meta/api/src/background_api_impl.rs +++ b/src/meta/api/src/background_api_impl.rs @@ -15,40 +15,40 @@ use std::fmt::Display; use chrono::Utc; -use common_meta_app::app_error::AppError; -use common_meta_app::app_error::BackgroundJobAlreadyExists; -use common_meta_app::app_error::UnknownBackgroundJob; -use common_meta_app::background::BackgroundJobId; -use common_meta_app::background::BackgroundJobIdent; -use common_meta_app::background::BackgroundJobInfo; -use common_meta_app::background::BackgroundTaskIdent; -use common_meta_app::background::BackgroundTaskInfo; -use common_meta_app::background::CreateBackgroundJobReply; -use common_meta_app::background::CreateBackgroundJobReq; -use common_meta_app::background::DeleteBackgroundJobReply; -use common_meta_app::background::DeleteBackgroundJobReq; -use common_meta_app::background::GetBackgroundJobReply; -use common_meta_app::background::GetBackgroundJobReq; -use common_meta_app::background::GetBackgroundTaskReply; -use common_meta_app::background::GetBackgroundTaskReq; -use common_meta_app::background::ListBackgroundJobsReq; -use common_meta_app::background::ListBackgroundTasksReq; -use common_meta_app::background::UpdateBackgroundJobParamsReq; -use common_meta_app::background::UpdateBackgroundJobReply; -use common_meta_app::background::UpdateBackgroundJobStatusReq; -use common_meta_app::background::UpdateBackgroundTaskReply; -use common_meta_app::background::UpdateBackgroundTaskReq; -use common_meta_kvapi::kvapi; -use common_meta_kvapi::kvapi::Key; -use common_meta_kvapi::kvapi::UpsertKVReq; -use common_meta_types::ConditionResult::Eq; -use common_meta_types::InvalidReply; -use common_meta_types::KVMeta; -use common_meta_types::MatchSeq; -use common_meta_types::MatchSeq::Any; -use common_meta_types::MetaError; -use common_meta_types::Operation; -use common_meta_types::TxnRequest; +use databend_common_meta_app::app_error::AppError; +use databend_common_meta_app::app_error::BackgroundJobAlreadyExists; +use databend_common_meta_app::app_error::UnknownBackgroundJob; +use databend_common_meta_app::background::BackgroundJobId; +use databend_common_meta_app::background::BackgroundJobIdent; +use databend_common_meta_app::background::BackgroundJobInfo; +use databend_common_meta_app::background::BackgroundTaskIdent; +use databend_common_meta_app::background::BackgroundTaskInfo; +use databend_common_meta_app::background::CreateBackgroundJobReply; +use databend_common_meta_app::background::CreateBackgroundJobReq; +use databend_common_meta_app::background::DeleteBackgroundJobReply; +use databend_common_meta_app::background::DeleteBackgroundJobReq; +use databend_common_meta_app::background::GetBackgroundJobReply; +use databend_common_meta_app::background::GetBackgroundJobReq; +use databend_common_meta_app::background::GetBackgroundTaskReply; +use databend_common_meta_app::background::GetBackgroundTaskReq; +use databend_common_meta_app::background::ListBackgroundJobsReq; +use databend_common_meta_app::background::ListBackgroundTasksReq; +use databend_common_meta_app::background::UpdateBackgroundJobParamsReq; +use databend_common_meta_app::background::UpdateBackgroundJobReply; +use databend_common_meta_app::background::UpdateBackgroundJobStatusReq; +use databend_common_meta_app::background::UpdateBackgroundTaskReply; +use databend_common_meta_app::background::UpdateBackgroundTaskReq; +use databend_common_meta_kvapi::kvapi; +use databend_common_meta_kvapi::kvapi::Key; +use databend_common_meta_kvapi::kvapi::UpsertKVReq; +use databend_common_meta_types::ConditionResult::Eq; +use databend_common_meta_types::InvalidReply; +use databend_common_meta_types::KVMeta; +use databend_common_meta_types::MatchSeq; +use databend_common_meta_types::MatchSeq::Any; +use databend_common_meta_types::MetaError; +use databend_common_meta_types::Operation; +use databend_common_meta_types::TxnRequest; use log::as_debug; use log::debug; use minitrace::func_name; diff --git a/src/meta/api/src/background_api_test_suite.rs b/src/meta/api/src/background_api_test_suite.rs index d315f5d524fc..b29d40e660fb 100644 --- a/src/meta/api/src/background_api_test_suite.rs +++ b/src/meta/api/src/background_api_test_suite.rs @@ -14,28 +14,28 @@ use chrono::DateTime; use chrono::Utc; -use common_meta_app::background::BackgroundJobIdent; -use common_meta_app::background::BackgroundJobInfo; -use common_meta_app::background::BackgroundJobParams; -use common_meta_app::background::BackgroundJobState; -use common_meta_app::background::BackgroundJobState::FAILED; -use common_meta_app::background::BackgroundJobStatus; -use common_meta_app::background::BackgroundJobType::INTERVAL; -use common_meta_app::background::BackgroundJobType::ONESHOT; -use common_meta_app::background::BackgroundTaskIdent; -use common_meta_app::background::BackgroundTaskInfo; -use common_meta_app::background::BackgroundTaskState; -use common_meta_app::background::CreateBackgroundJobReq; -use common_meta_app::background::GetBackgroundJobReq; -use common_meta_app::background::GetBackgroundTaskReq; -use common_meta_app::background::ListBackgroundJobsReq; -use common_meta_app::background::ListBackgroundTasksReq; -use common_meta_app::background::ManualTriggerParams; -use common_meta_app::background::UpdateBackgroundJobParamsReq; -use common_meta_app::background::UpdateBackgroundJobStatusReq; -use common_meta_app::background::UpdateBackgroundTaskReq; -use common_meta_kvapi::kvapi; -use common_meta_types::MetaError; +use databend_common_meta_app::background::BackgroundJobIdent; +use databend_common_meta_app::background::BackgroundJobInfo; +use databend_common_meta_app::background::BackgroundJobParams; +use databend_common_meta_app::background::BackgroundJobState; +use databend_common_meta_app::background::BackgroundJobState::FAILED; +use databend_common_meta_app::background::BackgroundJobStatus; +use databend_common_meta_app::background::BackgroundJobType::INTERVAL; +use databend_common_meta_app::background::BackgroundJobType::ONESHOT; +use databend_common_meta_app::background::BackgroundTaskIdent; +use databend_common_meta_app::background::BackgroundTaskInfo; +use databend_common_meta_app::background::BackgroundTaskState; +use databend_common_meta_app::background::CreateBackgroundJobReq; +use databend_common_meta_app::background::GetBackgroundJobReq; +use databend_common_meta_app::background::GetBackgroundTaskReq; +use databend_common_meta_app::background::ListBackgroundJobsReq; +use databend_common_meta_app::background::ListBackgroundTasksReq; +use databend_common_meta_app::background::ManualTriggerParams; +use databend_common_meta_app::background::UpdateBackgroundJobParamsReq; +use databend_common_meta_app::background::UpdateBackgroundJobStatusReq; +use databend_common_meta_app::background::UpdateBackgroundTaskReq; +use databend_common_meta_kvapi::kvapi; +use databend_common_meta_types::MetaError; use log::info; use crate::background_api::BackgroundApi; diff --git a/src/meta/api/src/compat_errors.rs b/src/meta/api/src/compat_errors.rs index e4e29c944c05..b689fc5ae6a7 100644 --- a/src/meta/api/src/compat_errors.rs +++ b/src/meta/api/src/compat_errors.rs @@ -48,10 +48,10 @@ where #[cfg(test)] mod tests { - use common_meta_types::ForwardToLeader; - use common_meta_types::MembershipNode; - use common_meta_types::MetaAPIError; - use common_meta_types::MetaError; + use databend_common_meta_types::ForwardToLeader; + use databend_common_meta_types::MembershipNode; + use databend_common_meta_types::MetaAPIError; + use databend_common_meta_types::MetaError; use crate::compat_errors::Compatible; use crate::kv_app_error::KVAppError; diff --git a/src/meta/api/src/data_mask_api.rs b/src/meta/api/src/data_mask_api.rs index a2f71a21ded9..87331179ca70 100644 --- a/src/meta/api/src/data_mask_api.rs +++ b/src/meta/api/src/data_mask_api.rs @@ -12,12 +12,12 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_meta_app::data_mask::CreateDatamaskReply; -use common_meta_app::data_mask::CreateDatamaskReq; -use common_meta_app::data_mask::DropDatamaskReply; -use common_meta_app::data_mask::DropDatamaskReq; -use common_meta_app::data_mask::GetDatamaskReply; -use common_meta_app::data_mask::GetDatamaskReq; +use databend_common_meta_app::data_mask::CreateDatamaskReply; +use databend_common_meta_app::data_mask::CreateDatamaskReq; +use databend_common_meta_app::data_mask::DropDatamaskReply; +use databend_common_meta_app::data_mask::DropDatamaskReq; +use databend_common_meta_app::data_mask::GetDatamaskReply; +use databend_common_meta_app::data_mask::GetDatamaskReq; use crate::kv_app_error::KVAppError; diff --git a/src/meta/api/src/data_mask_api_impl.rs b/src/meta/api/src/data_mask_api_impl.rs index 23b66fb138f7..abd4ccaf983c 100644 --- a/src/meta/api/src/data_mask_api_impl.rs +++ b/src/meta/api/src/data_mask_api_impl.rs @@ -14,28 +14,28 @@ use std::fmt::Display; -use common_meta_app::app_error::AppError; -use common_meta_app::app_error::DatamaskAlreadyExists; -use common_meta_app::app_error::UnknownDatamask; -use common_meta_app::data_mask::CreateDatamaskReply; -use common_meta_app::data_mask::CreateDatamaskReq; -use common_meta_app::data_mask::DatamaskId; -use common_meta_app::data_mask::DatamaskMeta; -use common_meta_app::data_mask::DatamaskNameIdent; -use common_meta_app::data_mask::DropDatamaskReply; -use common_meta_app::data_mask::DropDatamaskReq; -use common_meta_app::data_mask::GetDatamaskReply; -use common_meta_app::data_mask::GetDatamaskReq; -use common_meta_app::data_mask::MaskpolicyTableIdList; -use common_meta_app::data_mask::MaskpolicyTableIdListKey; -use common_meta_app::schema::TableId; -use common_meta_app::schema::TableMeta; -use common_meta_kvapi::kvapi; -use common_meta_types::ConditionResult::Eq; -use common_meta_types::MetaError; -use common_meta_types::TxnCondition; -use common_meta_types::TxnOp; -use common_meta_types::TxnRequest; +use databend_common_meta_app::app_error::AppError; +use databend_common_meta_app::app_error::DatamaskAlreadyExists; +use databend_common_meta_app::app_error::UnknownDatamask; +use databend_common_meta_app::data_mask::CreateDatamaskReply; +use databend_common_meta_app::data_mask::CreateDatamaskReq; +use databend_common_meta_app::data_mask::DatamaskId; +use databend_common_meta_app::data_mask::DatamaskMeta; +use databend_common_meta_app::data_mask::DatamaskNameIdent; +use databend_common_meta_app::data_mask::DropDatamaskReply; +use databend_common_meta_app::data_mask::DropDatamaskReq; +use databend_common_meta_app::data_mask::GetDatamaskReply; +use databend_common_meta_app::data_mask::GetDatamaskReq; +use databend_common_meta_app::data_mask::MaskpolicyTableIdList; +use databend_common_meta_app::data_mask::MaskpolicyTableIdListKey; +use databend_common_meta_app::schema::TableId; +use databend_common_meta_app::schema::TableMeta; +use databend_common_meta_kvapi::kvapi; +use databend_common_meta_types::ConditionResult::Eq; +use databend_common_meta_types::MetaError; +use databend_common_meta_types::TxnCondition; +use databend_common_meta_types::TxnOp; +use databend_common_meta_types::TxnRequest; use log::as_debug; use log::debug; use minitrace::func_name; diff --git a/src/meta/api/src/id_generator.rs b/src/meta/api/src/id_generator.rs index cc768744add4..0c8e274a29bc 100644 --- a/src/meta/api/src/id_generator.rs +++ b/src/meta/api/src/id_generator.rs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_meta_kvapi::kvapi; +use databend_common_meta_kvapi::kvapi; use crate::background_api_keys::ID_GEN_BACKGROUND_JOB; use crate::data_mask_api_keys::ID_GEN_DATA_MASK; @@ -119,7 +119,7 @@ impl kvapi::Key for IdGenerator { #[cfg(test)] mod t { - use common_meta_kvapi::kvapi::Key; + use databend_common_meta_kvapi::kvapi::Key; use crate::id_generator::IdGenerator; diff --git a/src/meta/api/src/kv_app_error.rs b/src/meta/api/src/kv_app_error.rs index cc941e4e4c26..34ce7b68ca57 100644 --- a/src/meta/api/src/kv_app_error.rs +++ b/src/meta/api/src/kv_app_error.rs @@ -14,14 +14,14 @@ use std::any::type_name; -use common_exception::ErrorCode; -use common_meta_app::app_error::AppError; -use common_meta_stoerr::MetaStorageError; -use common_meta_types::InvalidReply; -use common_meta_types::MetaAPIError; -use common_meta_types::MetaClientError; -use common_meta_types::MetaError; -use common_meta_types::MetaNetworkError; +use databend_common_exception::ErrorCode; +use databend_common_meta_app::app_error::AppError; +use databend_common_meta_stoerr::MetaStorageError; +use databend_common_meta_types::InvalidReply; +use databend_common_meta_types::MetaAPIError; +use databend_common_meta_types::MetaClientError; +use databend_common_meta_types::MetaError; +use databend_common_meta_types::MetaNetworkError; use tonic::Status; /// Errors for a kvapi::KVApi based application, such SchemaApi, ShareApi. diff --git a/src/meta/api/src/lib.rs b/src/meta/api/src/lib.rs index da7151de9dbb..193253bf7573 100644 --- a/src/meta/api/src/lib.rs +++ b/src/meta/api/src/lib.rs @@ -14,7 +14,7 @@ #![allow(clippy::uninlined_format_args)] #![allow(clippy::diverging_sub_expression)] -extern crate common_meta_types; +extern crate databend_common_meta_types; mod background_api; mod background_api_impl; diff --git a/src/meta/api/src/reply.rs b/src/meta/api/src/reply.rs index 238208a68329..62967b56958c 100644 --- a/src/meta/api/src/reply.rs +++ b/src/meta/api/src/reply.rs @@ -12,13 +12,13 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_meta_types::protobuf::RaftReply; -use common_meta_types::InvalidReply; -use common_meta_types::MetaAPIError; -use common_meta_types::MetaError; -use common_meta_types::MetaNetworkError; -use common_meta_types::TxnOpResponse; -use common_meta_types::TxnReply; +use databend_common_meta_types::protobuf::RaftReply; +use databend_common_meta_types::InvalidReply; +use databend_common_meta_types::MetaAPIError; +use databend_common_meta_types::MetaError; +use databend_common_meta_types::MetaNetworkError; +use databend_common_meta_types::TxnOpResponse; +use databend_common_meta_types::TxnReply; use serde::de::DeserializeOwned; use crate::compat_errors::Compatible; @@ -84,9 +84,9 @@ mod tests { i: i32, } - use common_meta_types::protobuf::RaftReply; - use common_meta_types::MetaAPIError; - use common_meta_types::MetaNetworkError; + use databend_common_meta_types::protobuf::RaftReply; + use databend_common_meta_types::MetaAPIError; + use databend_common_meta_types::MetaNetworkError; use crate::reply::reply_to_api_result; diff --git a/src/meta/api/src/schema_api.rs b/src/meta/api/src/schema_api.rs index 1b3acc7c200f..23c7cc8f8c42 100644 --- a/src/meta/api/src/schema_api.rs +++ b/src/meta/api/src/schema_api.rs @@ -14,86 +14,86 @@ use std::sync::Arc; -use common_meta_app::schema::CatalogInfo; -use common_meta_app::schema::CountTablesReply; -use common_meta_app::schema::CountTablesReq; -use common_meta_app::schema::CreateCatalogReply; -use common_meta_app::schema::CreateCatalogReq; -use common_meta_app::schema::CreateDatabaseReply; -use common_meta_app::schema::CreateDatabaseReq; -use common_meta_app::schema::CreateIndexReply; -use common_meta_app::schema::CreateIndexReq; -use common_meta_app::schema::CreateLockRevReply; -use common_meta_app::schema::CreateLockRevReq; -use common_meta_app::schema::CreateTableReply; -use common_meta_app::schema::CreateTableReq; -use common_meta_app::schema::CreateVirtualColumnReply; -use common_meta_app::schema::CreateVirtualColumnReq; -use common_meta_app::schema::DatabaseInfo; -use common_meta_app::schema::DeleteLockRevReq; -use common_meta_app::schema::DropCatalogReply; -use common_meta_app::schema::DropCatalogReq; -use common_meta_app::schema::DropDatabaseReply; -use common_meta_app::schema::DropDatabaseReq; -use common_meta_app::schema::DropIndexReply; -use common_meta_app::schema::DropIndexReq; -use common_meta_app::schema::DropTableByIdReq; -use common_meta_app::schema::DropTableReply; -use common_meta_app::schema::DropVirtualColumnReply; -use common_meta_app::schema::DropVirtualColumnReq; -use common_meta_app::schema::ExtendLockRevReq; -use common_meta_app::schema::GcDroppedTableReq; -use common_meta_app::schema::GcDroppedTableResp; -use common_meta_app::schema::GetCatalogReq; -use common_meta_app::schema::GetDatabaseReq; -use common_meta_app::schema::GetIndexReply; -use common_meta_app::schema::GetIndexReq; -use common_meta_app::schema::GetLVTReply; -use common_meta_app::schema::GetLVTReq; -use common_meta_app::schema::GetTableCopiedFileReply; -use common_meta_app::schema::GetTableCopiedFileReq; -use common_meta_app::schema::GetTableReq; -use common_meta_app::schema::IndexMeta; -use common_meta_app::schema::ListCatalogReq; -use common_meta_app::schema::ListDatabaseReq; -use common_meta_app::schema::ListDroppedTableReq; -use common_meta_app::schema::ListDroppedTableResp; -use common_meta_app::schema::ListIndexesByIdReq; -use common_meta_app::schema::ListIndexesReq; -use common_meta_app::schema::ListLockRevReq; -use common_meta_app::schema::ListLocksReq; -use common_meta_app::schema::ListTableReq; -use common_meta_app::schema::ListVirtualColumnsReq; -use common_meta_app::schema::LockInfo; -use common_meta_app::schema::LockMeta; -use common_meta_app::schema::RenameDatabaseReply; -use common_meta_app::schema::RenameDatabaseReq; -use common_meta_app::schema::RenameTableReply; -use common_meta_app::schema::RenameTableReq; -use common_meta_app::schema::SetLVTReply; -use common_meta_app::schema::SetLVTReq; -use common_meta_app::schema::SetTableColumnMaskPolicyReply; -use common_meta_app::schema::SetTableColumnMaskPolicyReq; -use common_meta_app::schema::TableId; -use common_meta_app::schema::TableIdent; -use common_meta_app::schema::TableInfo; -use common_meta_app::schema::TableMeta; -use common_meta_app::schema::TruncateTableReply; -use common_meta_app::schema::TruncateTableReq; -use common_meta_app::schema::UndropDatabaseReply; -use common_meta_app::schema::UndropDatabaseReq; -use common_meta_app::schema::UndropTableReply; -use common_meta_app::schema::UndropTableReq; -use common_meta_app::schema::UpdateIndexReply; -use common_meta_app::schema::UpdateIndexReq; -use common_meta_app::schema::UpdateTableMetaReply; -use common_meta_app::schema::UpdateTableMetaReq; -use common_meta_app::schema::UpdateVirtualColumnReply; -use common_meta_app::schema::UpdateVirtualColumnReq; -use common_meta_app::schema::UpsertTableOptionReply; -use common_meta_app::schema::UpsertTableOptionReq; -use common_meta_app::schema::VirtualColumnMeta; -use common_meta_types::MetaId; +use databend_common_meta_app::schema::CatalogInfo; +use databend_common_meta_app::schema::CountTablesReply; +use databend_common_meta_app::schema::CountTablesReq; +use databend_common_meta_app::schema::CreateCatalogReply; +use databend_common_meta_app::schema::CreateCatalogReq; +use databend_common_meta_app::schema::CreateDatabaseReply; +use databend_common_meta_app::schema::CreateDatabaseReq; +use databend_common_meta_app::schema::CreateIndexReply; +use databend_common_meta_app::schema::CreateIndexReq; +use databend_common_meta_app::schema::CreateLockRevReply; +use databend_common_meta_app::schema::CreateLockRevReq; +use databend_common_meta_app::schema::CreateTableReply; +use databend_common_meta_app::schema::CreateTableReq; +use databend_common_meta_app::schema::CreateVirtualColumnReply; +use databend_common_meta_app::schema::CreateVirtualColumnReq; +use databend_common_meta_app::schema::DatabaseInfo; +use databend_common_meta_app::schema::DeleteLockRevReq; +use databend_common_meta_app::schema::DropCatalogReply; +use databend_common_meta_app::schema::DropCatalogReq; +use databend_common_meta_app::schema::DropDatabaseReply; +use databend_common_meta_app::schema::DropDatabaseReq; +use databend_common_meta_app::schema::DropIndexReply; +use databend_common_meta_app::schema::DropIndexReq; +use databend_common_meta_app::schema::DropTableByIdReq; +use databend_common_meta_app::schema::DropTableReply; +use databend_common_meta_app::schema::DropVirtualColumnReply; +use databend_common_meta_app::schema::DropVirtualColumnReq; +use databend_common_meta_app::schema::ExtendLockRevReq; +use databend_common_meta_app::schema::GcDroppedTableReq; +use databend_common_meta_app::schema::GcDroppedTableResp; +use databend_common_meta_app::schema::GetCatalogReq; +use databend_common_meta_app::schema::GetDatabaseReq; +use databend_common_meta_app::schema::GetIndexReply; +use databend_common_meta_app::schema::GetIndexReq; +use databend_common_meta_app::schema::GetLVTReply; +use databend_common_meta_app::schema::GetLVTReq; +use databend_common_meta_app::schema::GetTableCopiedFileReply; +use databend_common_meta_app::schema::GetTableCopiedFileReq; +use databend_common_meta_app::schema::GetTableReq; +use databend_common_meta_app::schema::IndexMeta; +use databend_common_meta_app::schema::ListCatalogReq; +use databend_common_meta_app::schema::ListDatabaseReq; +use databend_common_meta_app::schema::ListDroppedTableReq; +use databend_common_meta_app::schema::ListDroppedTableResp; +use databend_common_meta_app::schema::ListIndexesByIdReq; +use databend_common_meta_app::schema::ListIndexesReq; +use databend_common_meta_app::schema::ListLockRevReq; +use databend_common_meta_app::schema::ListLocksReq; +use databend_common_meta_app::schema::ListTableReq; +use databend_common_meta_app::schema::ListVirtualColumnsReq; +use databend_common_meta_app::schema::LockInfo; +use databend_common_meta_app::schema::LockMeta; +use databend_common_meta_app::schema::RenameDatabaseReply; +use databend_common_meta_app::schema::RenameDatabaseReq; +use databend_common_meta_app::schema::RenameTableReply; +use databend_common_meta_app::schema::RenameTableReq; +use databend_common_meta_app::schema::SetLVTReply; +use databend_common_meta_app::schema::SetLVTReq; +use databend_common_meta_app::schema::SetTableColumnMaskPolicyReply; +use databend_common_meta_app::schema::SetTableColumnMaskPolicyReq; +use databend_common_meta_app::schema::TableId; +use databend_common_meta_app::schema::TableIdent; +use databend_common_meta_app::schema::TableInfo; +use databend_common_meta_app::schema::TableMeta; +use databend_common_meta_app::schema::TruncateTableReply; +use databend_common_meta_app::schema::TruncateTableReq; +use databend_common_meta_app::schema::UndropDatabaseReply; +use databend_common_meta_app::schema::UndropDatabaseReq; +use databend_common_meta_app::schema::UndropTableReply; +use databend_common_meta_app::schema::UndropTableReq; +use databend_common_meta_app::schema::UpdateIndexReply; +use databend_common_meta_app::schema::UpdateIndexReq; +use databend_common_meta_app::schema::UpdateTableMetaReply; +use databend_common_meta_app::schema::UpdateTableMetaReq; +use databend_common_meta_app::schema::UpdateVirtualColumnReply; +use databend_common_meta_app::schema::UpdateVirtualColumnReq; +use databend_common_meta_app::schema::UpsertTableOptionReply; +use databend_common_meta_app::schema::UpsertTableOptionReq; +use databend_common_meta_app::schema::VirtualColumnMeta; +use databend_common_meta_types::MetaId; use crate::kv_app_error::KVAppError; diff --git a/src/meta/api/src/schema_api_impl.rs b/src/meta/api/src/schema_api_impl.rs index 893d63620555..0dcfa7b4d478 100644 --- a/src/meta/api/src/schema_api_impl.rs +++ b/src/meta/api/src/schema_api_impl.rs @@ -19,174 +19,174 @@ use std::sync::Arc; use chrono::DateTime; use chrono::Utc; -use common_meta_app::app_error::AppError; -use common_meta_app::app_error::CatalogAlreadyExists; -use common_meta_app::app_error::CreateDatabaseWithDropTime; -use common_meta_app::app_error::CreateIndexWithDropTime; -use common_meta_app::app_error::CreateTableWithDropTime; -use common_meta_app::app_error::DatabaseAlreadyExists; -use common_meta_app::app_error::DropDbWithDropTime; -use common_meta_app::app_error::DropIndexWithDropTime; -use common_meta_app::app_error::DropTableWithDropTime; -use common_meta_app::app_error::DuplicatedUpsertFiles; -use common_meta_app::app_error::GetIndexWithDropTime; -use common_meta_app::app_error::IndexAlreadyExists; -use common_meta_app::app_error::ShareHasNoGrantedPrivilege; -use common_meta_app::app_error::StreamAlreadyExists; -use common_meta_app::app_error::StreamVersionMismatched; -use common_meta_app::app_error::TableAlreadyExists; -use common_meta_app::app_error::TableLockExpired; -use common_meta_app::app_error::TableVersionMismatched; -use common_meta_app::app_error::TxnRetryMaxTimes; -use common_meta_app::app_error::UndropDbHasNoHistory; -use common_meta_app::app_error::UndropDbWithNoDropTime; -use common_meta_app::app_error::UndropTableAlreadyExists; -use common_meta_app::app_error::UndropTableHasNoHistory; -use common_meta_app::app_error::UndropTableWithNoDropTime; -use common_meta_app::app_error::UnknownCatalog; -use common_meta_app::app_error::UnknownDatabaseId; -use common_meta_app::app_error::UnknownIndex; -use common_meta_app::app_error::UnknownStreamId; -use common_meta_app::app_error::UnknownTable; -use common_meta_app::app_error::UnknownTableId; -use common_meta_app::app_error::ViewAlreadyExists; -use common_meta_app::app_error::VirtualColumnAlreadyExists; -use common_meta_app::app_error::WrongShare; -use common_meta_app::app_error::WrongShareObject; -use common_meta_app::data_mask::MaskpolicyTableIdList; -use common_meta_app::data_mask::MaskpolicyTableIdListKey; -use common_meta_app::schema::CatalogId; -use common_meta_app::schema::CatalogIdToName; -use common_meta_app::schema::CatalogInfo; -use common_meta_app::schema::CatalogMeta; -use common_meta_app::schema::CatalogNameIdent; -use common_meta_app::schema::CountTablesKey; -use common_meta_app::schema::CountTablesReply; -use common_meta_app::schema::CountTablesReq; -use common_meta_app::schema::CreateCatalogReply; -use common_meta_app::schema::CreateCatalogReq; -use common_meta_app::schema::CreateDatabaseReply; -use common_meta_app::schema::CreateDatabaseReq; -use common_meta_app::schema::CreateIndexReply; -use common_meta_app::schema::CreateIndexReq; -use common_meta_app::schema::CreateLockRevReply; -use common_meta_app::schema::CreateLockRevReq; -use common_meta_app::schema::CreateTableReply; -use common_meta_app::schema::CreateTableReq; -use common_meta_app::schema::CreateVirtualColumnReply; -use common_meta_app::schema::CreateVirtualColumnReq; -use common_meta_app::schema::DBIdTableName; -use common_meta_app::schema::DatabaseId; -use common_meta_app::schema::DatabaseIdToName; -use common_meta_app::schema::DatabaseIdent; -use common_meta_app::schema::DatabaseInfo; -use common_meta_app::schema::DatabaseInfoFilter; -use common_meta_app::schema::DatabaseMeta; -use common_meta_app::schema::DatabaseNameIdent; -use common_meta_app::schema::DatabaseType; -use common_meta_app::schema::DbIdList; -use common_meta_app::schema::DbIdListKey; -use common_meta_app::schema::DeleteLockRevReq; -use common_meta_app::schema::DropCatalogReply; -use common_meta_app::schema::DropCatalogReq; -use common_meta_app::schema::DropDatabaseReply; -use common_meta_app::schema::DropDatabaseReq; -use common_meta_app::schema::DropIndexReply; -use common_meta_app::schema::DropIndexReq; -use common_meta_app::schema::DropTableByIdReq; -use common_meta_app::schema::DropTableReply; -use common_meta_app::schema::DropVirtualColumnReply; -use common_meta_app::schema::DropVirtualColumnReq; -use common_meta_app::schema::DroppedId; -use common_meta_app::schema::ExtendLockRevReq; -use common_meta_app::schema::GcDroppedTableReq; -use common_meta_app::schema::GcDroppedTableResp; -use common_meta_app::schema::GetCatalogReq; -use common_meta_app::schema::GetDatabaseReq; -use common_meta_app::schema::GetIndexReply; -use common_meta_app::schema::GetIndexReq; -use common_meta_app::schema::GetLVTReply; -use common_meta_app::schema::GetLVTReq; -use common_meta_app::schema::GetTableCopiedFileReply; -use common_meta_app::schema::GetTableCopiedFileReq; -use common_meta_app::schema::GetTableReq; -use common_meta_app::schema::IndexId; -use common_meta_app::schema::IndexIdToName; -use common_meta_app::schema::IndexMeta; -use common_meta_app::schema::IndexNameIdent; -use common_meta_app::schema::LeastVisibleTime; -use common_meta_app::schema::LeastVisibleTimeKey; -use common_meta_app::schema::ListCatalogReq; -use common_meta_app::schema::ListDatabaseReq; -use common_meta_app::schema::ListDroppedTableReq; -use common_meta_app::schema::ListDroppedTableResp; -use common_meta_app::schema::ListIndexesByIdReq; -use common_meta_app::schema::ListIndexesReq; -use common_meta_app::schema::ListLockRevReq; -use common_meta_app::schema::ListLocksReq; -use common_meta_app::schema::ListTableReq; -use common_meta_app::schema::ListVirtualColumnsReq; -use common_meta_app::schema::LockInfo; -use common_meta_app::schema::LockMeta; -use common_meta_app::schema::RenameDatabaseReply; -use common_meta_app::schema::RenameDatabaseReq; -use common_meta_app::schema::RenameTableReply; -use common_meta_app::schema::RenameTableReq; -use common_meta_app::schema::SetLVTReply; -use common_meta_app::schema::SetLVTReq; -use common_meta_app::schema::SetTableColumnMaskPolicyAction; -use common_meta_app::schema::SetTableColumnMaskPolicyReply; -use common_meta_app::schema::SetTableColumnMaskPolicyReq; -use common_meta_app::schema::TableCopiedFileInfo; -use common_meta_app::schema::TableCopiedFileNameIdent; -use common_meta_app::schema::TableId; -use common_meta_app::schema::TableIdList; -use common_meta_app::schema::TableIdListKey; -use common_meta_app::schema::TableIdToName; -use common_meta_app::schema::TableIdent; -use common_meta_app::schema::TableInfo; -use common_meta_app::schema::TableInfoFilter; -use common_meta_app::schema::TableMeta; -use common_meta_app::schema::TableNameIdent; -use common_meta_app::schema::TruncateTableReply; -use common_meta_app::schema::TruncateTableReq; -use common_meta_app::schema::UndropDatabaseReply; -use common_meta_app::schema::UndropDatabaseReq; -use common_meta_app::schema::UndropTableReply; -use common_meta_app::schema::UndropTableReq; -use common_meta_app::schema::UpdateIndexReply; -use common_meta_app::schema::UpdateIndexReq; -use common_meta_app::schema::UpdateTableMetaReply; -use common_meta_app::schema::UpdateTableMetaReq; -use common_meta_app::schema::UpdateVirtualColumnReply; -use common_meta_app::schema::UpdateVirtualColumnReq; -use common_meta_app::schema::UpsertTableCopiedFileReq; -use common_meta_app::schema::UpsertTableOptionReply; -use common_meta_app::schema::UpsertTableOptionReq; -use common_meta_app::schema::VirtualColumnMeta; -use common_meta_app::schema::VirtualColumnNameIdent; -use common_meta_app::share::ShareGrantObject; -use common_meta_app::share::ShareNameIdent; -use common_meta_app::share::ShareTableInfoMap; -use common_meta_kvapi::kvapi; -use common_meta_kvapi::kvapi::Key; -use common_meta_kvapi::kvapi::UpsertKVReq; -use common_meta_types::txn_op::Request; -use common_meta_types::txn_op_response::Response; -use common_meta_types::ConditionResult; -use common_meta_types::InvalidReply; -use common_meta_types::MatchSeq; -use common_meta_types::MatchSeqExt; -use common_meta_types::MetaError; -use common_meta_types::MetaId; -use common_meta_types::MetaNetworkError; -use common_meta_types::Operation; -use common_meta_types::SeqV; -use common_meta_types::TxnCondition; -use common_meta_types::TxnGetRequest; -use common_meta_types::TxnOp; -use common_meta_types::TxnPutRequest; -use common_meta_types::TxnRequest; +use databend_common_meta_app::app_error::AppError; +use databend_common_meta_app::app_error::CatalogAlreadyExists; +use databend_common_meta_app::app_error::CreateDatabaseWithDropTime; +use databend_common_meta_app::app_error::CreateIndexWithDropTime; +use databend_common_meta_app::app_error::CreateTableWithDropTime; +use databend_common_meta_app::app_error::DatabaseAlreadyExists; +use databend_common_meta_app::app_error::DropDbWithDropTime; +use databend_common_meta_app::app_error::DropIndexWithDropTime; +use databend_common_meta_app::app_error::DropTableWithDropTime; +use databend_common_meta_app::app_error::DuplicatedUpsertFiles; +use databend_common_meta_app::app_error::GetIndexWithDropTime; +use databend_common_meta_app::app_error::IndexAlreadyExists; +use databend_common_meta_app::app_error::ShareHasNoGrantedPrivilege; +use databend_common_meta_app::app_error::StreamAlreadyExists; +use databend_common_meta_app::app_error::StreamVersionMismatched; +use databend_common_meta_app::app_error::TableAlreadyExists; +use databend_common_meta_app::app_error::TableLockExpired; +use databend_common_meta_app::app_error::TableVersionMismatched; +use databend_common_meta_app::app_error::TxnRetryMaxTimes; +use databend_common_meta_app::app_error::UndropDbHasNoHistory; +use databend_common_meta_app::app_error::UndropDbWithNoDropTime; +use databend_common_meta_app::app_error::UndropTableAlreadyExists; +use databend_common_meta_app::app_error::UndropTableHasNoHistory; +use databend_common_meta_app::app_error::UndropTableWithNoDropTime; +use databend_common_meta_app::app_error::UnknownCatalog; +use databend_common_meta_app::app_error::UnknownDatabaseId; +use databend_common_meta_app::app_error::UnknownIndex; +use databend_common_meta_app::app_error::UnknownStreamId; +use databend_common_meta_app::app_error::UnknownTable; +use databend_common_meta_app::app_error::UnknownTableId; +use databend_common_meta_app::app_error::ViewAlreadyExists; +use databend_common_meta_app::app_error::VirtualColumnAlreadyExists; +use databend_common_meta_app::app_error::WrongShare; +use databend_common_meta_app::app_error::WrongShareObject; +use databend_common_meta_app::data_mask::MaskpolicyTableIdList; +use databend_common_meta_app::data_mask::MaskpolicyTableIdListKey; +use databend_common_meta_app::schema::CatalogId; +use databend_common_meta_app::schema::CatalogIdToName; +use databend_common_meta_app::schema::CatalogInfo; +use databend_common_meta_app::schema::CatalogMeta; +use databend_common_meta_app::schema::CatalogNameIdent; +use databend_common_meta_app::schema::CountTablesKey; +use databend_common_meta_app::schema::CountTablesReply; +use databend_common_meta_app::schema::CountTablesReq; +use databend_common_meta_app::schema::CreateCatalogReply; +use databend_common_meta_app::schema::CreateCatalogReq; +use databend_common_meta_app::schema::CreateDatabaseReply; +use databend_common_meta_app::schema::CreateDatabaseReq; +use databend_common_meta_app::schema::CreateIndexReply; +use databend_common_meta_app::schema::CreateIndexReq; +use databend_common_meta_app::schema::CreateLockRevReply; +use databend_common_meta_app::schema::CreateLockRevReq; +use databend_common_meta_app::schema::CreateTableReply; +use databend_common_meta_app::schema::CreateTableReq; +use databend_common_meta_app::schema::CreateVirtualColumnReply; +use databend_common_meta_app::schema::CreateVirtualColumnReq; +use databend_common_meta_app::schema::DBIdTableName; +use databend_common_meta_app::schema::DatabaseId; +use databend_common_meta_app::schema::DatabaseIdToName; +use databend_common_meta_app::schema::DatabaseIdent; +use databend_common_meta_app::schema::DatabaseInfo; +use databend_common_meta_app::schema::DatabaseInfoFilter; +use databend_common_meta_app::schema::DatabaseMeta; +use databend_common_meta_app::schema::DatabaseNameIdent; +use databend_common_meta_app::schema::DatabaseType; +use databend_common_meta_app::schema::DbIdList; +use databend_common_meta_app::schema::DbIdListKey; +use databend_common_meta_app::schema::DeleteLockRevReq; +use databend_common_meta_app::schema::DropCatalogReply; +use databend_common_meta_app::schema::DropCatalogReq; +use databend_common_meta_app::schema::DropDatabaseReply; +use databend_common_meta_app::schema::DropDatabaseReq; +use databend_common_meta_app::schema::DropIndexReply; +use databend_common_meta_app::schema::DropIndexReq; +use databend_common_meta_app::schema::DropTableByIdReq; +use databend_common_meta_app::schema::DropTableReply; +use databend_common_meta_app::schema::DropVirtualColumnReply; +use databend_common_meta_app::schema::DropVirtualColumnReq; +use databend_common_meta_app::schema::DroppedId; +use databend_common_meta_app::schema::ExtendLockRevReq; +use databend_common_meta_app::schema::GcDroppedTableReq; +use databend_common_meta_app::schema::GcDroppedTableResp; +use databend_common_meta_app::schema::GetCatalogReq; +use databend_common_meta_app::schema::GetDatabaseReq; +use databend_common_meta_app::schema::GetIndexReply; +use databend_common_meta_app::schema::GetIndexReq; +use databend_common_meta_app::schema::GetLVTReply; +use databend_common_meta_app::schema::GetLVTReq; +use databend_common_meta_app::schema::GetTableCopiedFileReply; +use databend_common_meta_app::schema::GetTableCopiedFileReq; +use databend_common_meta_app::schema::GetTableReq; +use databend_common_meta_app::schema::IndexId; +use databend_common_meta_app::schema::IndexIdToName; +use databend_common_meta_app::schema::IndexMeta; +use databend_common_meta_app::schema::IndexNameIdent; +use databend_common_meta_app::schema::LeastVisibleTime; +use databend_common_meta_app::schema::LeastVisibleTimeKey; +use databend_common_meta_app::schema::ListCatalogReq; +use databend_common_meta_app::schema::ListDatabaseReq; +use databend_common_meta_app::schema::ListDroppedTableReq; +use databend_common_meta_app::schema::ListDroppedTableResp; +use databend_common_meta_app::schema::ListIndexesByIdReq; +use databend_common_meta_app::schema::ListIndexesReq; +use databend_common_meta_app::schema::ListLockRevReq; +use databend_common_meta_app::schema::ListLocksReq; +use databend_common_meta_app::schema::ListTableReq; +use databend_common_meta_app::schema::ListVirtualColumnsReq; +use databend_common_meta_app::schema::LockInfo; +use databend_common_meta_app::schema::LockMeta; +use databend_common_meta_app::schema::RenameDatabaseReply; +use databend_common_meta_app::schema::RenameDatabaseReq; +use databend_common_meta_app::schema::RenameTableReply; +use databend_common_meta_app::schema::RenameTableReq; +use databend_common_meta_app::schema::SetLVTReply; +use databend_common_meta_app::schema::SetLVTReq; +use databend_common_meta_app::schema::SetTableColumnMaskPolicyAction; +use databend_common_meta_app::schema::SetTableColumnMaskPolicyReply; +use databend_common_meta_app::schema::SetTableColumnMaskPolicyReq; +use databend_common_meta_app::schema::TableCopiedFileInfo; +use databend_common_meta_app::schema::TableCopiedFileNameIdent; +use databend_common_meta_app::schema::TableId; +use databend_common_meta_app::schema::TableIdList; +use databend_common_meta_app::schema::TableIdListKey; +use databend_common_meta_app::schema::TableIdToName; +use databend_common_meta_app::schema::TableIdent; +use databend_common_meta_app::schema::TableInfo; +use databend_common_meta_app::schema::TableInfoFilter; +use databend_common_meta_app::schema::TableMeta; +use databend_common_meta_app::schema::TableNameIdent; +use databend_common_meta_app::schema::TruncateTableReply; +use databend_common_meta_app::schema::TruncateTableReq; +use databend_common_meta_app::schema::UndropDatabaseReply; +use databend_common_meta_app::schema::UndropDatabaseReq; +use databend_common_meta_app::schema::UndropTableReply; +use databend_common_meta_app::schema::UndropTableReq; +use databend_common_meta_app::schema::UpdateIndexReply; +use databend_common_meta_app::schema::UpdateIndexReq; +use databend_common_meta_app::schema::UpdateTableMetaReply; +use databend_common_meta_app::schema::UpdateTableMetaReq; +use databend_common_meta_app::schema::UpdateVirtualColumnReply; +use databend_common_meta_app::schema::UpdateVirtualColumnReq; +use databend_common_meta_app::schema::UpsertTableCopiedFileReq; +use databend_common_meta_app::schema::UpsertTableOptionReply; +use databend_common_meta_app::schema::UpsertTableOptionReq; +use databend_common_meta_app::schema::VirtualColumnMeta; +use databend_common_meta_app::schema::VirtualColumnNameIdent; +use databend_common_meta_app::share::ShareGrantObject; +use databend_common_meta_app::share::ShareNameIdent; +use databend_common_meta_app::share::ShareTableInfoMap; +use databend_common_meta_kvapi::kvapi; +use databend_common_meta_kvapi::kvapi::Key; +use databend_common_meta_kvapi::kvapi::UpsertKVReq; +use databend_common_meta_types::txn_op::Request; +use databend_common_meta_types::txn_op_response::Response; +use databend_common_meta_types::ConditionResult; +use databend_common_meta_types::InvalidReply; +use databend_common_meta_types::MatchSeq; +use databend_common_meta_types::MatchSeqExt; +use databend_common_meta_types::MetaError; +use databend_common_meta_types::MetaId; +use databend_common_meta_types::MetaNetworkError; +use databend_common_meta_types::Operation; +use databend_common_meta_types::SeqV; +use databend_common_meta_types::TxnCondition; +use databend_common_meta_types::TxnGetRequest; +use databend_common_meta_types::TxnOp; +use databend_common_meta_types::TxnPutRequest; +use databend_common_meta_types::TxnRequest; use futures::TryStreamExt; use log::as_debug; use log::as_display; diff --git a/src/meta/api/src/schema_api_test_suite.rs b/src/meta/api/src/schema_api_test_suite.rs index e60cda4a5707..02e6fd8c6266 100644 --- a/src/meta/api/src/schema_api_test_suite.rs +++ b/src/meta/api/src/schema_api_test_suite.rs @@ -22,105 +22,105 @@ use std::sync::Arc; use chrono::DateTime; use chrono::Duration; use chrono::Utc; -use common_exception::ErrorCode; -use common_expression::types::NumberDataType; -use common_expression::TableDataType; -use common_expression::TableField; -use common_expression::TableSchema; -use common_meta_app::data_mask::CreateDatamaskReq; -use common_meta_app::data_mask::DatamaskNameIdent; -use common_meta_app::data_mask::DropDatamaskReq; -use common_meta_app::data_mask::MaskpolicyTableIdList; -use common_meta_app::data_mask::MaskpolicyTableIdListKey; -use common_meta_app::schema::CatalogMeta; -use common_meta_app::schema::CatalogNameIdent; -use common_meta_app::schema::CatalogOption; -use common_meta_app::schema::CountTablesReq; -use common_meta_app::schema::CreateCatalogReq; -use common_meta_app::schema::CreateDatabaseReply; -use common_meta_app::schema::CreateDatabaseReq; -use common_meta_app::schema::CreateIndexReq; -use common_meta_app::schema::CreateLockRevReq; -use common_meta_app::schema::CreateTableReq; -use common_meta_app::schema::CreateVirtualColumnReq; -use common_meta_app::schema::DBIdTableName; -use common_meta_app::schema::DatabaseId; -use common_meta_app::schema::DatabaseIdToName; -use common_meta_app::schema::DatabaseInfo; -use common_meta_app::schema::DatabaseMeta; -use common_meta_app::schema::DatabaseNameIdent; -use common_meta_app::schema::DatabaseType; -use common_meta_app::schema::DbIdList; -use common_meta_app::schema::DbIdListKey; -use common_meta_app::schema::DeleteLockRevReq; -use common_meta_app::schema::DropCatalogReq; -use common_meta_app::schema::DropDatabaseReq; -use common_meta_app::schema::DropIndexReq; -use common_meta_app::schema::DropTableByIdReq; -use common_meta_app::schema::DropVirtualColumnReq; -use common_meta_app::schema::DroppedId; -use common_meta_app::schema::ExtendLockRevReq; -use common_meta_app::schema::GcDroppedTableReq; -use common_meta_app::schema::GetCatalogReq; -use common_meta_app::schema::GetDatabaseReq; -use common_meta_app::schema::GetLVTReq; -use common_meta_app::schema::GetTableCopiedFileReq; -use common_meta_app::schema::GetTableReq; -use common_meta_app::schema::IcebergCatalogOption; -use common_meta_app::schema::IndexId; -use common_meta_app::schema::IndexIdToName; -use common_meta_app::schema::IndexMeta; -use common_meta_app::schema::IndexNameIdent; -use common_meta_app::schema::IndexType; -use common_meta_app::schema::ListCatalogReq; -use common_meta_app::schema::ListDatabaseReq; -use common_meta_app::schema::ListDroppedTableReq; -use common_meta_app::schema::ListIndexesByIdReq; -use common_meta_app::schema::ListIndexesReq; -use common_meta_app::schema::ListLockRevReq; -use common_meta_app::schema::ListTableReq; -use common_meta_app::schema::ListVirtualColumnsReq; -use common_meta_app::schema::LockKey; -use common_meta_app::schema::RenameDatabaseReq; -use common_meta_app::schema::RenameTableReq; -use common_meta_app::schema::SetLVTReq; -use common_meta_app::schema::SetTableColumnMaskPolicyAction; -use common_meta_app::schema::SetTableColumnMaskPolicyReq; -use common_meta_app::schema::TableCopiedFileInfo; -use common_meta_app::schema::TableCopiedFileNameIdent; -use common_meta_app::schema::TableId; -use common_meta_app::schema::TableIdList; -use common_meta_app::schema::TableIdListKey; -use common_meta_app::schema::TableIdToName; -use common_meta_app::schema::TableIdent; -use common_meta_app::schema::TableInfo; -use common_meta_app::schema::TableInfoFilter; -use common_meta_app::schema::TableMeta; -use common_meta_app::schema::TableNameIdent; -use common_meta_app::schema::TableStatistics; -use common_meta_app::schema::TruncateTableReq; -use common_meta_app::schema::UndropDatabaseReq; -use common_meta_app::schema::UndropTableReq; -use common_meta_app::schema::UpdateTableMetaReq; -use common_meta_app::schema::UpdateVirtualColumnReq; -use common_meta_app::schema::UpsertTableCopiedFileReq; -use common_meta_app::schema::UpsertTableOptionReq; -use common_meta_app::schema::VirtualColumnNameIdent; -use common_meta_app::share::AddShareAccountsReq; -use common_meta_app::share::CreateShareReq; -use common_meta_app::share::GrantShareObjectReq; -use common_meta_app::share::ShareGrantObjectName; -use common_meta_app::share::ShareGrantObjectPrivilege; -use common_meta_app::share::ShareNameIdent; -use common_meta_app::storage::StorageParams; -use common_meta_app::storage::StorageS3Config; -use common_meta_kvapi::kvapi; -use common_meta_kvapi::kvapi::Key; -use common_meta_kvapi::kvapi::UpsertKVReq; -use common_meta_types::MatchSeq; -use common_meta_types::MetaError; -use common_meta_types::Operation; -use common_meta_types::UpsertKV; +use databend_common_exception::ErrorCode; +use databend_common_expression::types::NumberDataType; +use databend_common_expression::TableDataType; +use databend_common_expression::TableField; +use databend_common_expression::TableSchema; +use databend_common_meta_app::data_mask::CreateDatamaskReq; +use databend_common_meta_app::data_mask::DatamaskNameIdent; +use databend_common_meta_app::data_mask::DropDatamaskReq; +use databend_common_meta_app::data_mask::MaskpolicyTableIdList; +use databend_common_meta_app::data_mask::MaskpolicyTableIdListKey; +use databend_common_meta_app::schema::CatalogMeta; +use databend_common_meta_app::schema::CatalogNameIdent; +use databend_common_meta_app::schema::CatalogOption; +use databend_common_meta_app::schema::CountTablesReq; +use databend_common_meta_app::schema::CreateCatalogReq; +use databend_common_meta_app::schema::CreateDatabaseReply; +use databend_common_meta_app::schema::CreateDatabaseReq; +use databend_common_meta_app::schema::CreateIndexReq; +use databend_common_meta_app::schema::CreateLockRevReq; +use databend_common_meta_app::schema::CreateTableReq; +use databend_common_meta_app::schema::CreateVirtualColumnReq; +use databend_common_meta_app::schema::DBIdTableName; +use databend_common_meta_app::schema::DatabaseId; +use databend_common_meta_app::schema::DatabaseIdToName; +use databend_common_meta_app::schema::DatabaseInfo; +use databend_common_meta_app::schema::DatabaseMeta; +use databend_common_meta_app::schema::DatabaseNameIdent; +use databend_common_meta_app::schema::DatabaseType; +use databend_common_meta_app::schema::DbIdList; +use databend_common_meta_app::schema::DbIdListKey; +use databend_common_meta_app::schema::DeleteLockRevReq; +use databend_common_meta_app::schema::DropCatalogReq; +use databend_common_meta_app::schema::DropDatabaseReq; +use databend_common_meta_app::schema::DropIndexReq; +use databend_common_meta_app::schema::DropTableByIdReq; +use databend_common_meta_app::schema::DropVirtualColumnReq; +use databend_common_meta_app::schema::DroppedId; +use databend_common_meta_app::schema::ExtendLockRevReq; +use databend_common_meta_app::schema::GcDroppedTableReq; +use databend_common_meta_app::schema::GetCatalogReq; +use databend_common_meta_app::schema::GetDatabaseReq; +use databend_common_meta_app::schema::GetLVTReq; +use databend_common_meta_app::schema::GetTableCopiedFileReq; +use databend_common_meta_app::schema::GetTableReq; +use databend_common_meta_app::schema::IcebergCatalogOption; +use databend_common_meta_app::schema::IndexId; +use databend_common_meta_app::schema::IndexIdToName; +use databend_common_meta_app::schema::IndexMeta; +use databend_common_meta_app::schema::IndexNameIdent; +use databend_common_meta_app::schema::IndexType; +use databend_common_meta_app::schema::ListCatalogReq; +use databend_common_meta_app::schema::ListDatabaseReq; +use databend_common_meta_app::schema::ListDroppedTableReq; +use databend_common_meta_app::schema::ListIndexesByIdReq; +use databend_common_meta_app::schema::ListIndexesReq; +use databend_common_meta_app::schema::ListLockRevReq; +use databend_common_meta_app::schema::ListTableReq; +use databend_common_meta_app::schema::ListVirtualColumnsReq; +use databend_common_meta_app::schema::LockKey; +use databend_common_meta_app::schema::RenameDatabaseReq; +use databend_common_meta_app::schema::RenameTableReq; +use databend_common_meta_app::schema::SetLVTReq; +use databend_common_meta_app::schema::SetTableColumnMaskPolicyAction; +use databend_common_meta_app::schema::SetTableColumnMaskPolicyReq; +use databend_common_meta_app::schema::TableCopiedFileInfo; +use databend_common_meta_app::schema::TableCopiedFileNameIdent; +use databend_common_meta_app::schema::TableId; +use databend_common_meta_app::schema::TableIdList; +use databend_common_meta_app::schema::TableIdListKey; +use databend_common_meta_app::schema::TableIdToName; +use databend_common_meta_app::schema::TableIdent; +use databend_common_meta_app::schema::TableInfo; +use databend_common_meta_app::schema::TableInfoFilter; +use databend_common_meta_app::schema::TableMeta; +use databend_common_meta_app::schema::TableNameIdent; +use databend_common_meta_app::schema::TableStatistics; +use databend_common_meta_app::schema::TruncateTableReq; +use databend_common_meta_app::schema::UndropDatabaseReq; +use databend_common_meta_app::schema::UndropTableReq; +use databend_common_meta_app::schema::UpdateTableMetaReq; +use databend_common_meta_app::schema::UpdateVirtualColumnReq; +use databend_common_meta_app::schema::UpsertTableCopiedFileReq; +use databend_common_meta_app::schema::UpsertTableOptionReq; +use databend_common_meta_app::schema::VirtualColumnNameIdent; +use databend_common_meta_app::share::AddShareAccountsReq; +use databend_common_meta_app::share::CreateShareReq; +use databend_common_meta_app::share::GrantShareObjectReq; +use databend_common_meta_app::share::ShareGrantObjectName; +use databend_common_meta_app::share::ShareGrantObjectPrivilege; +use databend_common_meta_app::share::ShareNameIdent; +use databend_common_meta_app::storage::StorageParams; +use databend_common_meta_app::storage::StorageS3Config; +use databend_common_meta_kvapi::kvapi; +use databend_common_meta_kvapi::kvapi::Key; +use databend_common_meta_kvapi::kvapi::UpsertKVReq; +use databend_common_meta_types::MatchSeq; +use databend_common_meta_types::MetaError; +use databend_common_meta_types::Operation; +use databend_common_meta_types::UpsertKV; use log::debug; use log::info; diff --git a/src/meta/api/src/share_api.rs b/src/meta/api/src/share_api.rs index d07f883ac28a..ccce4f5d8483 100644 --- a/src/meta/api/src/share_api.rs +++ b/src/meta/api/src/share_api.rs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_meta_app::share::*; +use databend_common_meta_app::share::*; use crate::kv_app_error::KVAppError; diff --git a/src/meta/api/src/share_api_impl.rs b/src/meta/api/src/share_api_impl.rs index cc4b2131a205..b2b9d5f904f7 100644 --- a/src/meta/api/src/share_api_impl.rs +++ b/src/meta/api/src/share_api_impl.rs @@ -14,33 +14,33 @@ use chrono::DateTime; use chrono::Utc; -use common_meta_app::app_error::AppError; -use common_meta_app::app_error::CannotShareDatabaseCreatedFromShare; -use common_meta_app::app_error::ShareAccountsAlreadyExists; -use common_meta_app::app_error::ShareAlreadyExists; -use common_meta_app::app_error::ShareEndpointAlreadyExists; -use common_meta_app::app_error::TxnRetryMaxTimes; -use common_meta_app::app_error::UnknownShare; -use common_meta_app::app_error::UnknownShareAccounts; -use common_meta_app::app_error::UnknownTable; -use common_meta_app::app_error::WrongShare; -use common_meta_app::app_error::WrongShareObject; -use common_meta_app::schema::DBIdTableName; -use common_meta_app::schema::DatabaseId; -use common_meta_app::schema::DatabaseIdToName; -use common_meta_app::schema::DatabaseMeta; -use common_meta_app::schema::DatabaseNameIdent; -use common_meta_app::schema::TableId; -use common_meta_app::schema::TableIdToName; -use common_meta_app::schema::TableMeta; -use common_meta_app::schema::TableNameIdent; -use common_meta_app::share::*; -use common_meta_kvapi::kvapi; -use common_meta_types::ConditionResult::Eq; -use common_meta_types::MetaError; -use common_meta_types::TxnCondition; -use common_meta_types::TxnOp; -use common_meta_types::TxnRequest; +use databend_common_meta_app::app_error::AppError; +use databend_common_meta_app::app_error::CannotShareDatabaseCreatedFromShare; +use databend_common_meta_app::app_error::ShareAccountsAlreadyExists; +use databend_common_meta_app::app_error::ShareAlreadyExists; +use databend_common_meta_app::app_error::ShareEndpointAlreadyExists; +use databend_common_meta_app::app_error::TxnRetryMaxTimes; +use databend_common_meta_app::app_error::UnknownShare; +use databend_common_meta_app::app_error::UnknownShareAccounts; +use databend_common_meta_app::app_error::UnknownTable; +use databend_common_meta_app::app_error::WrongShare; +use databend_common_meta_app::app_error::WrongShareObject; +use databend_common_meta_app::schema::DBIdTableName; +use databend_common_meta_app::schema::DatabaseId; +use databend_common_meta_app::schema::DatabaseIdToName; +use databend_common_meta_app::schema::DatabaseMeta; +use databend_common_meta_app::schema::DatabaseNameIdent; +use databend_common_meta_app::schema::TableId; +use databend_common_meta_app::schema::TableIdToName; +use databend_common_meta_app::schema::TableMeta; +use databend_common_meta_app::schema::TableNameIdent; +use databend_common_meta_app::share::*; +use databend_common_meta_kvapi::kvapi; +use databend_common_meta_types::ConditionResult::Eq; +use databend_common_meta_types::MetaError; +use databend_common_meta_types::TxnCondition; +use databend_common_meta_types::TxnOp; +use databend_common_meta_types::TxnRequest; use log::as_debug; use log::debug; use log::error; diff --git a/src/meta/api/src/share_api_test_suite.rs b/src/meta/api/src/share_api_test_suite.rs index 011cb849a1cb..c4a1e4713e41 100644 --- a/src/meta/api/src/share_api_test_suite.rs +++ b/src/meta/api/src/share_api_test_suite.rs @@ -16,20 +16,20 @@ use std::collections::BTreeMap; use std::collections::BTreeSet; use chrono::Utc; -use common_exception::ErrorCode; -use common_meta_app::schema::CreateDatabaseReq; -use common_meta_app::schema::CreateTableReq; -use common_meta_app::schema::DatabaseId; -use common_meta_app::schema::DatabaseMeta; -use common_meta_app::schema::DatabaseNameIdent; -use common_meta_app::schema::DropDatabaseReq; -use common_meta_app::schema::DropTableByIdReq; -use common_meta_app::schema::TableId; -use common_meta_app::schema::TableMeta; -use common_meta_app::schema::TableNameIdent; -use common_meta_app::share::*; -use common_meta_kvapi::kvapi; -use common_meta_types::MetaError; +use databend_common_exception::ErrorCode; +use databend_common_meta_app::schema::CreateDatabaseReq; +use databend_common_meta_app::schema::CreateTableReq; +use databend_common_meta_app::schema::DatabaseId; +use databend_common_meta_app::schema::DatabaseMeta; +use databend_common_meta_app::schema::DatabaseNameIdent; +use databend_common_meta_app::schema::DropDatabaseReq; +use databend_common_meta_app::schema::DropTableByIdReq; +use databend_common_meta_app::schema::TableId; +use databend_common_meta_app::schema::TableMeta; +use databend_common_meta_app::schema::TableNameIdent; +use databend_common_meta_app::share::*; +use databend_common_meta_kvapi::kvapi; +use databend_common_meta_types::MetaError; use enumflags2::BitFlags; use log::info; diff --git a/src/meta/api/src/testing.rs b/src/meta/api/src/testing.rs index 3c1eff4a11b4..ced9de55ff2f 100644 --- a/src/meta/api/src/testing.rs +++ b/src/meta/api/src/testing.rs @@ -14,13 +14,13 @@ //! Supporting utilities for tests. -use common_meta_kvapi::kvapi; -use common_meta_types::anyerror::AnyError; -use common_meta_types::MetaAPIError; -use common_meta_types::MetaDataError; -use common_meta_types::MetaDataReadError; -use common_meta_types::MetaError; -use common_proto_conv::FromToProto; +use databend_common_meta_kvapi::kvapi; +use databend_common_meta_types::anyerror::AnyError; +use databend_common_meta_types::MetaAPIError; +use databend_common_meta_types::MetaDataError; +use databend_common_meta_types::MetaDataReadError; +use databend_common_meta_types::MetaError; +use databend_common_proto_conv::FromToProto; use crate::kv_app_error::KVAppError; @@ -31,7 +31,7 @@ pub(crate) async fn get_kv_data( ) -> Result where T: FromToProto, - T::PB: common_protos::prost::Message + Default, + T::PB: databend_common_protos::prost::Message + Default, { let res = kv_api.get_kv(&key.to_string_key()).await?; if let Some(res) = res { diff --git a/src/meta/api/src/util.rs b/src/meta/api/src/util.rs index d711dcf2b4fc..d152cc87415e 100644 --- a/src/meta/api/src/util.rs +++ b/src/meta/api/src/util.rs @@ -17,57 +17,57 @@ use std::collections::HashSet; use std::fmt::Display; use std::sync::Arc; -use common_meta_app::app_error::AppError; -use common_meta_app::app_error::ShareHasNoGrantedDatabase; -use common_meta_app::app_error::TxnRetryMaxTimes; -use common_meta_app::app_error::UnknownDatabase; -use common_meta_app::app_error::UnknownDatabaseId; -use common_meta_app::app_error::UnknownShare; -use common_meta_app::app_error::UnknownShareAccounts; -use common_meta_app::app_error::UnknownShareEndpoint; -use common_meta_app::app_error::UnknownShareEndpointId; -use common_meta_app::app_error::UnknownShareId; -use common_meta_app::app_error::UnknownTable; -use common_meta_app::app_error::UnknownTableId; -use common_meta_app::app_error::VirtualColumnNotFound; -use common_meta_app::app_error::WrongShare; -use common_meta_app::app_error::WrongShareObject; -use common_meta_app::schema::DBIdTableName; -use common_meta_app::schema::DatabaseId; -use common_meta_app::schema::DatabaseIdToName; -use common_meta_app::schema::DatabaseMeta; -use common_meta_app::schema::DatabaseNameIdent; -use common_meta_app::schema::DatabaseType; -use common_meta_app::schema::IndexId; -use common_meta_app::schema::IndexMeta; -use common_meta_app::schema::TableId; -use common_meta_app::schema::TableIdToName; -use common_meta_app::schema::TableIdent; -use common_meta_app::schema::TableInfo; -use common_meta_app::schema::TableMeta; -use common_meta_app::schema::TableNameIdent; -use common_meta_app::schema::VirtualColumnMeta; -use common_meta_app::schema::VirtualColumnNameIdent; -use common_meta_app::share::*; -use common_meta_kvapi::kvapi; -use common_meta_kvapi::kvapi::Key; -use common_meta_kvapi::kvapi::UpsertKVReq; -use common_meta_types::txn_condition::Target; -use common_meta_types::txn_op::Request; -use common_meta_types::ConditionResult; -use common_meta_types::InvalidArgument; -use common_meta_types::InvalidReply; -use common_meta_types::MatchSeq; -use common_meta_types::MetaError; -use common_meta_types::MetaNetworkError; -use common_meta_types::Operation; -use common_meta_types::TxnCondition; -use common_meta_types::TxnDeleteRequest; -use common_meta_types::TxnOp; -use common_meta_types::TxnOpResponse; -use common_meta_types::TxnPutRequest; -use common_meta_types::TxnRequest; -use common_proto_conv::FromToProto; +use databend_common_meta_app::app_error::AppError; +use databend_common_meta_app::app_error::ShareHasNoGrantedDatabase; +use databend_common_meta_app::app_error::TxnRetryMaxTimes; +use databend_common_meta_app::app_error::UnknownDatabase; +use databend_common_meta_app::app_error::UnknownDatabaseId; +use databend_common_meta_app::app_error::UnknownShare; +use databend_common_meta_app::app_error::UnknownShareAccounts; +use databend_common_meta_app::app_error::UnknownShareEndpoint; +use databend_common_meta_app::app_error::UnknownShareEndpointId; +use databend_common_meta_app::app_error::UnknownShareId; +use databend_common_meta_app::app_error::UnknownTable; +use databend_common_meta_app::app_error::UnknownTableId; +use databend_common_meta_app::app_error::VirtualColumnNotFound; +use databend_common_meta_app::app_error::WrongShare; +use databend_common_meta_app::app_error::WrongShareObject; +use databend_common_meta_app::schema::DBIdTableName; +use databend_common_meta_app::schema::DatabaseId; +use databend_common_meta_app::schema::DatabaseIdToName; +use databend_common_meta_app::schema::DatabaseMeta; +use databend_common_meta_app::schema::DatabaseNameIdent; +use databend_common_meta_app::schema::DatabaseType; +use databend_common_meta_app::schema::IndexId; +use databend_common_meta_app::schema::IndexMeta; +use databend_common_meta_app::schema::TableId; +use databend_common_meta_app::schema::TableIdToName; +use databend_common_meta_app::schema::TableIdent; +use databend_common_meta_app::schema::TableInfo; +use databend_common_meta_app::schema::TableMeta; +use databend_common_meta_app::schema::TableNameIdent; +use databend_common_meta_app::schema::VirtualColumnMeta; +use databend_common_meta_app::schema::VirtualColumnNameIdent; +use databend_common_meta_app::share::*; +use databend_common_meta_kvapi::kvapi; +use databend_common_meta_kvapi::kvapi::Key; +use databend_common_meta_kvapi::kvapi::UpsertKVReq; +use databend_common_meta_types::txn_condition::Target; +use databend_common_meta_types::txn_op::Request; +use databend_common_meta_types::ConditionResult; +use databend_common_meta_types::InvalidArgument; +use databend_common_meta_types::InvalidReply; +use databend_common_meta_types::MatchSeq; +use databend_common_meta_types::MetaError; +use databend_common_meta_types::MetaNetworkError; +use databend_common_meta_types::Operation; +use databend_common_meta_types::TxnCondition; +use databend_common_meta_types::TxnDeleteRequest; +use databend_common_meta_types::TxnOp; +use databend_common_meta_types::TxnOpResponse; +use databend_common_meta_types::TxnPutRequest; +use databend_common_meta_types::TxnRequest; +use databend_common_proto_conv::FromToProto; use enumflags2::BitFlags; use log::as_debug; use log::as_display; @@ -114,7 +114,7 @@ pub async fn get_pb_value( where K: kvapi::Key, T: FromToProto, - T::PB: common_protos::prost::Message + Default, + T::PB: databend_common_protos::prost::Message + Default, { let res = kv_api.get_kv(&k.to_string_key()).await?; @@ -132,7 +132,7 @@ pub async fn mget_pb_values( ) -> Result)>, MetaError> where T: FromToProto, - T::PB: common_protos::prost::Message + Default, + T::PB: databend_common_protos::prost::Message + Default, { let seq_bytes = kv_api.mget_kv(keys).await?; let mut seq_values = Vec::with_capacity(keys.len()); @@ -245,14 +245,14 @@ pub async fn fetch_id( pub fn serialize_struct(value: &T) -> Result, MetaNetworkError> where T: FromToProto + 'static, - T::PB: common_protos::prost::Message, + T::PB: databend_common_protos::prost::Message, { let p = value.to_pb().map_err(|e| { let inv = InvalidArgument::new(e, ""); MetaNetworkError::InvalidArgument(inv) })?; let mut buf = vec![]; - common_protos::prost::Message::encode(&p, &mut buf).map_err(|e| { + databend_common_protos::prost::Message::encode(&p, &mut buf).map_err(|e| { let inv = InvalidArgument::new(e, ""); MetaNetworkError::InvalidArgument(inv) })?; @@ -262,9 +262,9 @@ where pub fn deserialize_struct(buf: &[u8]) -> Result where T: FromToProto, - T::PB: common_protos::prost::Message + Default, + T::PB: databend_common_protos::prost::Message + Default, { - let p: T::PB = common_protos::prost::Message::decode(buf).map_err(|e| { + let p: T::PB = databend_common_protos::prost::Message::decode(buf).map_err(|e| { let inv = InvalidReply::new("", &e); MetaNetworkError::InvalidReply(inv) })?; diff --git a/src/meta/app/Cargo.toml b/src/meta/app/Cargo.toml index cdc5240f539d..1959cd217cae 100644 --- a/src/meta/app/Cargo.toml +++ b/src/meta/app/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "common-meta-app" +name = "databend-common-meta-app" version = { workspace = true } authors = { workspace = true } license = { workspace = true } @@ -14,11 +14,11 @@ test = true storage-hdfs = [] [dependencies] -common-exception = { path = "../../common/exception" } -common-expression = { path = "../../query/expression" } -common-io = { path = "../../common/io" } -common-meta-kvapi = { path = "../kvapi" } -common-meta-types = { path = "../types" } +databend-common-exception = { path = "../../common/exception" } +databend-common-expression = { path = "../../query/expression" } +databend-common-io = { path = "../../common/io" } +databend-common-meta-kvapi = { path = "../kvapi" } +databend-common-meta-types = { path = "../types" } anyerror = { workspace = true } chrono = { workspace = true } @@ -44,6 +44,6 @@ anyhow = { workspace = true } ignored = ["num-traits"] [build-dependencies] -common-building = { path = "../../common/building" } +databend-common-building = { path = "../../common/building" } tonic-build = { workspace = true } diff --git a/src/meta/app/src/app_error.rs b/src/meta/app/src/app_error.rs index ed69367b3760..253c655e25a2 100644 --- a/src/meta/app/src/app_error.rs +++ b/src/meta/app/src/app_error.rs @@ -14,8 +14,8 @@ use std::fmt::Display; -use common_exception::ErrorCode; -use common_meta_types::MatchSeq; +use databend_common_exception::ErrorCode; +use databend_common_meta_types::MatchSeq; use serde::Deserialize; use serde::Serialize; diff --git a/src/meta/app/src/background/background_job.rs b/src/meta/app/src/background/background_job.rs index bde057b2c2ec..950f6e97b9d4 100644 --- a/src/meta/app/src/background/background_job.rs +++ b/src/meta/app/src/background/background_job.rs @@ -378,7 +378,7 @@ impl Display for ListBackgroundJobsReq { } mod kvapi_key_impl { - use common_meta_kvapi::kvapi; + use databend_common_meta_kvapi::kvapi; use crate::background::background_job::BackgroundJobId; use crate::background::background_job::BackgroundJobIdent; diff --git a/src/meta/app/src/background/background_task.rs b/src/meta/app/src/background/background_task.rs index d21ee8daea1f..eb753bf03fee 100644 --- a/src/meta/app/src/background/background_task.rs +++ b/src/meta/app/src/background/background_task.rs @@ -216,7 +216,7 @@ impl ListBackgroundTasksReq { } mod kvapi_key_impl { - use common_meta_kvapi::kvapi; + use databend_common_meta_kvapi::kvapi; use crate::background::background_task::BackgroundTaskIdent; const PREFIX_BACKGROUND: &str = "__fd_background_task_by_name"; diff --git a/src/meta/app/src/data_mask/mod.rs b/src/meta/app/src/data_mask/mod.rs index 576fecfb08a2..df256611e06d 100644 --- a/src/meta/app/src/data_mask/mod.rs +++ b/src/meta/app/src/data_mask/mod.rs @@ -123,7 +123,7 @@ pub struct MaskpolicyTableIdList { } mod kvapi_key_impl { - use common_meta_kvapi::kvapi; + use databend_common_meta_kvapi::kvapi; use super::DatamaskId; use super::DatamaskNameIdent; diff --git a/src/meta/app/src/principal/file_format.rs b/src/meta/app/src/principal/file_format.rs index f6cb73cce4bc..81b48252075c 100644 --- a/src/meta/app/src/principal/file_format.rs +++ b/src/meta/app/src/principal/file_format.rs @@ -18,10 +18,10 @@ use std::fmt::Display; use std::fmt::Formatter; use std::str::FromStr; -use common_exception::ErrorCode; -use common_exception::Result; -use common_io::constants::NULL_BYTES_ESCAPE; -use common_io::escape_string; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_io::constants::NULL_BYTES_ESCAPE; +use databend_common_io::escape_string; use serde::Deserialize; use serde::Serialize; diff --git a/src/meta/app/src/principal/ownership_info.rs b/src/meta/app/src/principal/ownership_info.rs index 4197b289a258..3707d1c8540a 100644 --- a/src/meta/app/src/principal/ownership_info.rs +++ b/src/meta/app/src/principal/ownership_info.rs @@ -16,7 +16,7 @@ use std::fmt; use std::fmt::Display; use anyerror::AnyError; -use common_exception::ErrorCode; +use databend_common_exception::ErrorCode; use crate::principal::GrantObjectByID; diff --git a/src/meta/app/src/principal/role_info.rs b/src/meta/app/src/principal/role_info.rs index 6f5276152a43..829073e6d299 100644 --- a/src/meta/app/src/principal/role_info.rs +++ b/src/meta/app/src/principal/role_info.rs @@ -16,7 +16,7 @@ use std::fmt::Display; use std::fmt::Formatter; use anyerror::AnyError; -use common_exception::ErrorCode; +use databend_common_exception::ErrorCode; use serde::Deserialize; use serde::Serialize; diff --git a/src/meta/app/src/principal/user_auth.rs b/src/meta/app/src/principal/user_auth.rs index e14d36688496..f94562c06c36 100644 --- a/src/meta/app/src/principal/user_auth.rs +++ b/src/meta/app/src/principal/user_auth.rs @@ -14,8 +14,8 @@ use std::str::FromStr; -use common_exception::ErrorCode; -use common_exception::Result; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; use sha2::Digest; use sha2::Sha256; diff --git a/src/meta/app/src/principal/user_defined_file_format.rs b/src/meta/app/src/principal/user_defined_file_format.rs index 2a4ac8b06d17..4402a223e648 100644 --- a/src/meta/app/src/principal/user_defined_file_format.rs +++ b/src/meta/app/src/principal/user_defined_file_format.rs @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_exception::ErrorCode; -use common_exception::Result; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; use serde::Deserialize; use serde::Serialize; diff --git a/src/meta/app/src/principal/user_defined_function.rs b/src/meta/app/src/principal/user_defined_function.rs index 02feed27f09e..e104ec7b997a 100644 --- a/src/meta/app/src/principal/user_defined_function.rs +++ b/src/meta/app/src/principal/user_defined_function.rs @@ -15,7 +15,7 @@ use std::fmt::Display; use std::fmt::Formatter; -use common_expression::types::DataType; +use databend_common_expression::types::DataType; #[derive(Clone, Debug, Eq, PartialEq)] pub struct LambdaUDF { diff --git a/src/meta/app/src/principal/user_info.rs b/src/meta/app/src/principal/user_info.rs index 2c9353a34d13..6f8d31f12a1c 100644 --- a/src/meta/app/src/principal/user_info.rs +++ b/src/meta/app/src/principal/user_info.rs @@ -15,8 +15,8 @@ use core::fmt; use std::convert::TryFrom; -use common_exception::ErrorCode; -use common_exception::Result; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; use enumflags2::bitflags; use enumflags2::BitFlags; use serde::Deserialize; diff --git a/src/meta/app/src/principal/user_setting.rs b/src/meta/app/src/principal/user_setting.rs index 2314611d1192..d353abd40526 100644 --- a/src/meta/app/src/principal/user_setting.rs +++ b/src/meta/app/src/principal/user_setting.rs @@ -14,8 +14,8 @@ use core::fmt; -use common_exception::ErrorCode; -use common_exception::Result; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; use serde::Deserialize; use serde::Deserializer; use serde::Serialize; diff --git a/src/meta/app/src/principal/user_stage.rs b/src/meta/app/src/principal/user_stage.rs index 9382ab89965b..0ffdc2acccd3 100644 --- a/src/meta/app/src/principal/user_stage.rs +++ b/src/meta/app/src/principal/user_stage.rs @@ -20,10 +20,10 @@ use std::str::FromStr; use chrono::DateTime; use chrono::Utc; -use common_exception::ErrorCode; -use common_exception::Result; -use common_io::constants::NAN_BYTES_SNAKE; -use common_io::escape_string; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_io::constants::NAN_BYTES_SNAKE; +use databend_common_io::escape_string; use crate::principal::FileFormatParams; use crate::principal::UserIdentity; diff --git a/src/meta/app/src/schema/catalog.rs b/src/meta/app/src/schema/catalog.rs index 44838ee5e72f..5f306d05656c 100644 --- a/src/meta/app/src/schema/catalog.rs +++ b/src/meta/app/src/schema/catalog.rs @@ -230,7 +230,7 @@ impl ListCatalogReq { } mod kvapi_key_impl { - use common_meta_kvapi::kvapi; + use databend_common_meta_kvapi::kvapi; use super::CatalogId; use super::CatalogIdToName; diff --git a/src/meta/app/src/schema/database.rs b/src/meta/app/src/schema/database.rs index 7226ec84981e..8933d35fb748 100644 --- a/src/meta/app/src/schema/database.rs +++ b/src/meta/app/src/schema/database.rs @@ -320,7 +320,7 @@ pub struct ListDatabaseReq { } mod kvapi_key_impl { - use common_meta_kvapi::kvapi; + use databend_common_meta_kvapi::kvapi; use crate::schema::DatabaseId; use crate::schema::DatabaseIdToName; diff --git a/src/meta/app/src/schema/index.rs b/src/meta/app/src/schema/index.rs index 8ee546d70775..c97b1b6ed166 100644 --- a/src/meta/app/src/schema/index.rs +++ b/src/meta/app/src/schema/index.rs @@ -18,7 +18,7 @@ use std::fmt::Formatter; use chrono::DateTime; use chrono::Utc; -use common_meta_types::MetaId; +use databend_common_meta_types::MetaId; #[derive(serde::Serialize, serde::Deserialize, Clone, Debug, Eq, PartialEq, Default)] pub struct IndexNameIdent { @@ -224,7 +224,7 @@ impl ListIndexesByIdReq { } mod kvapi_key_impl { - use common_meta_kvapi::kvapi; + use databend_common_meta_kvapi::kvapi; use crate::schema::IndexId; use crate::schema::IndexIdToName; diff --git a/src/meta/app/src/schema/lock.rs b/src/meta/app/src/schema/lock.rs index d0ef9bd17e0a..44551275466a 100644 --- a/src/meta/app/src/schema/lock.rs +++ b/src/meta/app/src/schema/lock.rs @@ -18,9 +18,9 @@ use std::fmt::Formatter; use chrono::DateTime; use chrono::Utc; -use common_exception::Result; -use common_meta_kvapi::kvapi::Key; -use common_meta_kvapi::kvapi::KeyError; +use databend_common_exception::Result; +use databend_common_meta_kvapi::kvapi::Key; +use databend_common_meta_kvapi::kvapi::KeyError; #[derive(serde::Serialize, serde::Deserialize, Clone, Debug, Eq, PartialEq)] pub struct LockMeta { @@ -179,7 +179,7 @@ pub struct TableLockKey { } mod kvapi_key_impl { - use common_meta_kvapi::kvapi; + use databend_common_meta_kvapi::kvapi; use crate::schema::TableLockKey; use crate::schema::PREFIX_TABLE_LOCK; diff --git a/src/meta/app/src/schema/table.rs b/src/meta/app/src/schema/table.rs index 70653f65b7fd..f593538942e6 100644 --- a/src/meta/app/src/schema/table.rs +++ b/src/meta/app/src/schema/table.rs @@ -23,12 +23,12 @@ use std::sync::Arc; use chrono::DateTime; use chrono::Utc; -use common_exception::Result; -use common_expression::FieldIndex; -use common_expression::TableField; -use common_expression::TableSchema; -use common_meta_types::MatchSeq; -use common_meta_types::MetaId; +use databend_common_exception::Result; +use databend_common_expression::FieldIndex; +use databend_common_expression::TableField; +use databend_common_expression::TableSchema; +use databend_common_meta_types::MatchSeq; +use databend_common_meta_types::MetaId; use maplit::hashmap; use crate::schema::database::DatabaseNameIdent; @@ -863,7 +863,7 @@ pub struct TableCopiedFileLockKey { pub struct EmptyProto {} mod kvapi_key_impl { - use common_meta_kvapi::kvapi; + use databend_common_meta_kvapi::kvapi; use crate::schema::CountTablesKey; use crate::schema::DBIdTableName; @@ -1053,8 +1053,8 @@ mod kvapi_key_impl { #[cfg(test)] mod tests { - use common_meta_kvapi::kvapi; - use common_meta_kvapi::kvapi::Key; + use databend_common_meta_kvapi::kvapi; + use databend_common_meta_kvapi::kvapi::Key; use crate::schema::TableCopiedFileNameIdent; diff --git a/src/meta/app/src/schema/virtual_column.rs b/src/meta/app/src/schema/virtual_column.rs index 24ef022c44ea..8af8894a7b9e 100644 --- a/src/meta/app/src/schema/virtual_column.rs +++ b/src/meta/app/src/schema/virtual_column.rs @@ -18,7 +18,7 @@ use std::fmt::Formatter; use chrono::DateTime; use chrono::Utc; -use common_meta_types::MetaId; +use databend_common_meta_types::MetaId; #[derive(serde::Serialize, serde::Deserialize, Clone, Debug, Eq, PartialEq, Default)] pub struct VirtualColumnNameIdent { @@ -122,7 +122,7 @@ impl ListVirtualColumnsReq { } mod kvapi_key_impl { - use common_meta_kvapi::kvapi; + use databend_common_meta_kvapi::kvapi; use crate::schema::VirtualColumnNameIdent; use crate::schema::PREFIX_VIRTUAL_COLUMN; diff --git a/src/meta/app/src/share/share.rs b/src/meta/app/src/share/share.rs index b5bb21591f01..4fab40b9e306 100644 --- a/src/meta/app/src/share/share.rs +++ b/src/meta/app/src/share/share.rs @@ -746,7 +746,7 @@ pub struct ShareSpec { } mod kvapi_key_impl { - use common_meta_kvapi::kvapi; + use databend_common_meta_kvapi::kvapi; use super::ShareEndpointId; use crate::share::ShareAccountNameIdent; diff --git a/src/meta/app/src/storage/storage_params.rs b/src/meta/app/src/storage/storage_params.rs index ff7041125ffd..495c395c6e9b 100644 --- a/src/meta/app/src/storage/storage_params.rs +++ b/src/meta/app/src/storage/storage_params.rs @@ -17,8 +17,8 @@ use std::fmt::Display; use std::fmt::Formatter; use std::time::Duration; -use common_exception::ErrorCode; -use common_exception::Result; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; use serde::Deserialize; use serde::Serialize; diff --git a/src/meta/app/src/tenant/quota.rs b/src/meta/app/src/tenant/quota.rs index 3f6b1793f6bd..45f186cf9746 100644 --- a/src/meta/app/src/tenant/quota.rs +++ b/src/meta/app/src/tenant/quota.rs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_exception::ErrorCode; +use databend_common_exception::ErrorCode; #[derive(serde::Serialize, serde::Deserialize, Clone, Debug, Eq, PartialEq, Default)] #[serde(default)] @@ -36,7 +36,7 @@ pub struct TenantQuota { impl TryFrom> for TenantQuota { type Error = ErrorCode; - fn try_from(value: Vec) -> common_exception::Result { + fn try_from(value: Vec) -> databend_common_exception::Result { match serde_json::from_slice(&value) { Ok(quota) => Ok(quota), Err(err) => Err(ErrorCode::IllegalTenantQuotaFormat(format!( diff --git a/src/meta/app/tests/it/file_format.rs b/src/meta/app/tests/it/file_format.rs index 643e2416f61f..af949825c991 100644 --- a/src/meta/app/tests/it/file_format.rs +++ b/src/meta/app/tests/it/file_format.rs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_meta_app::principal::check_record_delimiter; +use databend_common_meta_app::principal::check_record_delimiter; #[test] fn test_check_record_delimiter() { diff --git a/src/meta/app/tests/it/main.rs b/src/meta/app/tests/it/main.rs index 9539255f03b1..e77689e07c74 100644 --- a/src/meta/app/tests/it/main.rs +++ b/src/meta/app/tests/it/main.rs @@ -20,7 +20,7 @@ mod user_quota; #[test] fn test_bin_commit_version() -> anyhow::Result<()> { - let v = &common_meta_types::config::DATABEND_COMMIT_VERSION; + let v = &databend_common_meta_types::config::DATABEND_COMMIT_VERSION; assert!(v.len() > 0); Ok(()) } diff --git a/src/meta/app/tests/it/user_grant.rs b/src/meta/app/tests/it/user_grant.rs index a0629b7477c2..c133ac072b58 100644 --- a/src/meta/app/tests/it/user_grant.rs +++ b/src/meta/app/tests/it/user_grant.rs @@ -12,11 +12,11 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_exception::exception::Result; -use common_meta_app::principal::GrantEntry; -use common_meta_app::principal::GrantObject; -use common_meta_app::principal::UserGrantSet; -use common_meta_app::principal::UserPrivilegeType; +use databend_common_exception::exception::Result; +use databend_common_meta_app::principal::GrantEntry; +use databend_common_meta_app::principal::GrantObject; +use databend_common_meta_app::principal::UserGrantSet; +use databend_common_meta_app::principal::UserPrivilegeType; use enumflags2::make_bitflags; #[test] diff --git a/src/meta/app/tests/it/user_info.rs b/src/meta/app/tests/it/user_info.rs index 0ea118882d6e..28da573b9dae 100644 --- a/src/meta/app/tests/it/user_info.rs +++ b/src/meta/app/tests/it/user_info.rs @@ -12,10 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_exception::exception::Result; -use common_meta_app::principal::AuthInfo; -use common_meta_app::principal::PasswordHashMethod; -use common_meta_app::principal::UserInfo; +use databend_common_exception::exception::Result; +use databend_common_meta_app::principal::AuthInfo; +use databend_common_meta_app::principal::PasswordHashMethod; +use databend_common_meta_app::principal::UserInfo; #[test] fn test_user_info() -> Result<()> { diff --git a/src/meta/app/tests/it/user_privilege.rs b/src/meta/app/tests/it/user_privilege.rs index d6d62c3e29f2..0085ca59110e 100644 --- a/src/meta/app/tests/it/user_privilege.rs +++ b/src/meta/app/tests/it/user_privilege.rs @@ -12,9 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_exception::exception::Result; -use common_meta_app::principal::UserPrivilegeSet; -use common_meta_app::principal::UserPrivilegeType; +use databend_common_exception::exception::Result; +use databend_common_meta_app::principal::UserPrivilegeSet; +use databend_common_meta_app::principal::UserPrivilegeType; #[test] fn test_user_privilege() -> Result<()> { diff --git a/src/meta/app/tests/it/user_quota.rs b/src/meta/app/tests/it/user_quota.rs index ae6f09ba0f22..83e54a795754 100644 --- a/src/meta/app/tests/it/user_quota.rs +++ b/src/meta/app/tests/it/user_quota.rs @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_exception::exception::Result; -use common_meta_app::principal::UserQuota; +use databend_common_exception::exception::Result; +use databend_common_meta_app::principal::UserQuota; #[test] fn test_user_quota() -> Result<()> { diff --git a/src/meta/client/Cargo.toml b/src/meta/client/Cargo.toml index 0024d679172c..cdecf9bfdd15 100644 --- a/src/meta/client/Cargo.toml +++ b/src/meta/client/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "common-meta-client" +name = "databend-common-meta-client" description = "common meta grpc" version = { workspace = true } authors = { workspace = true } @@ -14,17 +14,17 @@ doctest = false test = true [features] -enable-histogram = ["common-metrics/enable-histogram"] +enable-histogram = ["databend-common-metrics/enable-histogram"] [dependencies] -common-arrow = { path = "../../common/arrow" } -common-base = { path = "../../common/base" } -common-grpc = { path = "../../common/grpc" } -common-meta-api = { path = "../api" } -common-meta-kvapi = { path = "../kvapi" } -common-meta-types = { path = "../types" } -common-metrics = { path = "../../common/metrics" } -common-tracing = { path = "../../common/tracing" } +databend-common-arrow = { path = "../../common/arrow" } +databend-common-base = { path = "../../common/base" } +databend-common-grpc = { path = "../../common/grpc" } +databend-common-meta-api = { path = "../api" } +databend-common-meta-kvapi = { path = "../kvapi" } +databend-common-meta-types = { path = "../types" } +databend-common-metrics = { path = "../../common/metrics" } +databend-common-tracing = { path = "../../common/tracing" } derive_more = { workspace = true } futures = { workspace = true } @@ -40,11 +40,11 @@ serde_json = { workspace = true } tonic = { workspace = true } [dev-dependencies] -common-exception = { path = "../../common/exception" } -common-meta-app = { path = "../app" } +databend-common-exception = { path = "../../common/exception" } +databend-common-meta-app = { path = "../app" } anyhow = { workspace = true } rand = { workspace = true } [build-dependencies] -common-building = { path = "../../common/building" } +databend-common-building = { path = "../../common/building" } diff --git a/src/meta/client/build.rs b/src/meta/client/build.rs index f15f5ed5e215..a69a90fdcb0f 100644 --- a/src/meta/client/build.rs +++ b/src/meta/client/build.rs @@ -13,5 +13,5 @@ // limitations under the License. fn main() { - common_building::setup(); + databend_common_building::setup(); } diff --git a/src/meta/client/src/grpc_action.rs b/src/meta/client/src/grpc_action.rs index 90f6dde4b484..51ed40dfe055 100644 --- a/src/meta/client/src/grpc_action.rs +++ b/src/meta/client/src/grpc_action.rs @@ -16,23 +16,23 @@ use std::convert::TryInto; use std::fmt; use std::fmt::Debug; -use common_meta_kvapi::kvapi::GetKVReply; -use common_meta_kvapi::kvapi::GetKVReq; -use common_meta_kvapi::kvapi::ListKVReply; -use common_meta_kvapi::kvapi::ListKVReq; -use common_meta_kvapi::kvapi::MGetKVReply; -use common_meta_kvapi::kvapi::MGetKVReq; -use common_meta_kvapi::kvapi::UpsertKVReply; -use common_meta_kvapi::kvapi::UpsertKVReq; -use common_meta_types::protobuf::ClientInfo; -use common_meta_types::protobuf::ClusterStatus; -use common_meta_types::protobuf::RaftRequest; -use common_meta_types::protobuf::StreamItem; -use common_meta_types::protobuf::WatchRequest; -use common_meta_types::protobuf::WatchResponse; -use common_meta_types::InvalidArgument; -use common_meta_types::TxnReply; -use common_meta_types::TxnRequest; +use databend_common_meta_kvapi::kvapi::GetKVReply; +use databend_common_meta_kvapi::kvapi::GetKVReq; +use databend_common_meta_kvapi::kvapi::ListKVReply; +use databend_common_meta_kvapi::kvapi::ListKVReq; +use databend_common_meta_kvapi::kvapi::MGetKVReply; +use databend_common_meta_kvapi::kvapi::MGetKVReq; +use databend_common_meta_kvapi::kvapi::UpsertKVReply; +use databend_common_meta_kvapi::kvapi::UpsertKVReq; +use databend_common_meta_types::protobuf::ClientInfo; +use databend_common_meta_types::protobuf::ClusterStatus; +use databend_common_meta_types::protobuf::RaftRequest; +use databend_common_meta_types::protobuf::StreamItem; +use databend_common_meta_types::protobuf::WatchRequest; +use databend_common_meta_types::protobuf::WatchResponse; +use databend_common_meta_types::InvalidArgument; +use databend_common_meta_types::TxnReply; +use databend_common_meta_types::TxnRequest; use log::as_debug; use log::debug; use tonic::codegen::BoxStream; diff --git a/src/meta/client/src/grpc_client.rs b/src/meta/client/src/grpc_client.rs index 1f15b426cf13..92192b1a83a0 100644 --- a/src/meta/client/src/grpc_client.rs +++ b/src/meta/client/src/grpc_client.rs @@ -21,50 +21,50 @@ use std::sync::Arc; use std::time::Duration; use std::time::Instant; -use common_arrow::arrow_format::flight::data::BasicAuth; -use common_base::base::tokio::select; -use common_base::base::tokio::sync::mpsc; -use common_base::base::tokio::sync::mpsc::Receiver; -use common_base::base::tokio::sync::mpsc::Sender; -use common_base::base::tokio::sync::oneshot; -use common_base::base::tokio::sync::oneshot::Receiver as OneRecv; -use common_base::base::tokio::sync::oneshot::Sender as OneSend; -use common_base::base::tokio::time::sleep; -use common_base::containers::ItemManager; -use common_base::containers::Pool; -use common_base::containers::TtlHashMap; -use common_base::future::TimingFutureExt; -use common_base::runtime::Runtime; -use common_base::runtime::TrySpawn; -use common_base::runtime::UnlimitedFuture; -use common_base::GLOBAL_TASK; -use common_grpc::ConnectionFactory; -use common_grpc::GrpcConnectionError; -use common_grpc::RpcClientConf; -use common_grpc::RpcClientTlsConfig; -use common_meta_api::reply::reply_to_api_result; -use common_meta_kvapi::kvapi::ListKVReply; -use common_meta_types::anyerror::AnyError; -use common_meta_types::protobuf as pb; -use common_meta_types::protobuf::meta_service_client::MetaServiceClient; -use common_meta_types::protobuf::ClientInfo; -use common_meta_types::protobuf::ClusterStatus; -use common_meta_types::protobuf::Empty; -use common_meta_types::protobuf::ExportedChunk; -use common_meta_types::protobuf::HandshakeRequest; -use common_meta_types::protobuf::MemberListReply; -use common_meta_types::protobuf::MemberListRequest; -use common_meta_types::protobuf::RaftRequest; -use common_meta_types::protobuf::WatchRequest; -use common_meta_types::protobuf::WatchResponse; -use common_meta_types::ConnectionError; -use common_meta_types::GrpcConfig; -use common_meta_types::MetaClientError; -use common_meta_types::MetaError; -use common_meta_types::MetaHandshakeError; -use common_meta_types::MetaNetworkError; -use common_meta_types::TxnReply; -use common_meta_types::TxnRequest; +use databend_common_arrow::arrow_format::flight::data::BasicAuth; +use databend_common_base::base::tokio::select; +use databend_common_base::base::tokio::sync::mpsc; +use databend_common_base::base::tokio::sync::mpsc::Receiver; +use databend_common_base::base::tokio::sync::mpsc::Sender; +use databend_common_base::base::tokio::sync::oneshot; +use databend_common_base::base::tokio::sync::oneshot::Receiver as OneRecv; +use databend_common_base::base::tokio::sync::oneshot::Sender as OneSend; +use databend_common_base::base::tokio::time::sleep; +use databend_common_base::containers::ItemManager; +use databend_common_base::containers::Pool; +use databend_common_base::containers::TtlHashMap; +use databend_common_base::future::TimingFutureExt; +use databend_common_base::runtime::Runtime; +use databend_common_base::runtime::TrySpawn; +use databend_common_base::runtime::UnlimitedFuture; +use databend_common_base::GLOBAL_TASK; +use databend_common_grpc::ConnectionFactory; +use databend_common_grpc::GrpcConnectionError; +use databend_common_grpc::RpcClientConf; +use databend_common_grpc::RpcClientTlsConfig; +use databend_common_meta_api::reply::reply_to_api_result; +use databend_common_meta_kvapi::kvapi::ListKVReply; +use databend_common_meta_types::anyerror::AnyError; +use databend_common_meta_types::protobuf as pb; +use databend_common_meta_types::protobuf::meta_service_client::MetaServiceClient; +use databend_common_meta_types::protobuf::ClientInfo; +use databend_common_meta_types::protobuf::ClusterStatus; +use databend_common_meta_types::protobuf::Empty; +use databend_common_meta_types::protobuf::ExportedChunk; +use databend_common_meta_types::protobuf::HandshakeRequest; +use databend_common_meta_types::protobuf::MemberListReply; +use databend_common_meta_types::protobuf::MemberListRequest; +use databend_common_meta_types::protobuf::RaftRequest; +use databend_common_meta_types::protobuf::WatchRequest; +use databend_common_meta_types::protobuf::WatchResponse; +use databend_common_meta_types::ConnectionError; +use databend_common_meta_types::GrpcConfig; +use databend_common_meta_types::MetaClientError; +use databend_common_meta_types::MetaError; +use databend_common_meta_types::MetaHandshakeError; +use databend_common_meta_types::MetaNetworkError; +use databend_common_meta_types::TxnReply; +use databend_common_meta_types::TxnRequest; use futures::stream::StreamExt; use log::as_debug; use log::as_display; @@ -1139,7 +1139,7 @@ impl MetaGrpcClient { ); let req: Request = Request::new(txn.clone()); - let req = common_tracing::inject_span_to_tonic_request(req); + let req = databend_common_tracing::inject_span_to_tonic_request(req); let (mut client, _sver) = self.make_client().await?; let result = client.transaction(req).await; @@ -1151,7 +1151,7 @@ impl MetaGrpcClient { self.mark_current_endpoint_unhealthy(); let (mut client, _sver) = self.make_client().await?; let req: Request = Request::new(txn); - let req = common_tracing::inject_span_to_tonic_request(req); + let req = databend_common_tracing::inject_span_to_tonic_request(req); let ret = client.transaction(req).await?.into_inner(); return Ok(ret); } else { @@ -1191,7 +1191,7 @@ impl MetaGrpcClient { /// Inject span into a tonic request, so that on the remote peer the tracing context can be restored. fn traced_req(t: T) -> Request { let req = Request::new(t); - common_tracing::inject_span_to_tonic_request(req) + databend_common_tracing::inject_span_to_tonic_request(req) } fn status_is_retryable(status: &Status) -> bool { diff --git a/src/meta/client/src/grpc_metrics.rs b/src/meta/client/src/grpc_metrics.rs index 4c10501768db..d5b48286a2bc 100644 --- a/src/meta/client/src/grpc_metrics.rs +++ b/src/meta/client/src/grpc_metrics.rs @@ -15,15 +15,15 @@ use std::error::Error; use std::sync::LazyLock; -use common_meta_types::MetaError; -use common_metrics::register_counter_family; -use common_metrics::register_gauge; -use common_metrics::register_histogram_family_in_milliseconds; -use common_metrics::Counter; -use common_metrics::Family; -use common_metrics::Gauge; -use common_metrics::Histogram; -use common_metrics::VecLabels; +use databend_common_meta_types::MetaError; +use databend_common_metrics::register_counter_family; +use databend_common_metrics::register_gauge; +use databend_common_metrics::register_histogram_family_in_milliseconds; +use databend_common_metrics::Counter; +use databend_common_metrics::Family; +use databend_common_metrics::Gauge; +use databend_common_metrics::Histogram; +use databend_common_metrics::VecLabels; pub static META_GRPC_CLIENT_REQUEST_DURATION_MS: LazyLock> = LazyLock::new(|| { diff --git a/src/meta/client/src/kv_api_impl.rs b/src/meta/client/src/kv_api_impl.rs index 958819cad06f..4be39e572cc6 100644 --- a/src/meta/client/src/kv_api_impl.rs +++ b/src/meta/client/src/kv_api_impl.rs @@ -12,18 +12,18 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_meta_kvapi::kvapi; -use common_meta_kvapi::kvapi::GetKVReply; -use common_meta_kvapi::kvapi::GetKVReq; -use common_meta_kvapi::kvapi::KVStream; -use common_meta_kvapi::kvapi::ListKVReq; -use common_meta_kvapi::kvapi::MGetKVReply; -use common_meta_kvapi::kvapi::MGetKVReq; -use common_meta_kvapi::kvapi::UpsertKVReply; -use common_meta_kvapi::kvapi::UpsertKVReq; -use common_meta_types::MetaError; -use common_meta_types::TxnReply; -use common_meta_types::TxnRequest; +use databend_common_meta_kvapi::kvapi; +use databend_common_meta_kvapi::kvapi::GetKVReply; +use databend_common_meta_kvapi::kvapi::GetKVReq; +use databend_common_meta_kvapi::kvapi::KVStream; +use databend_common_meta_kvapi::kvapi::ListKVReq; +use databend_common_meta_kvapi::kvapi::MGetKVReply; +use databend_common_meta_kvapi::kvapi::MGetKVReq; +use databend_common_meta_kvapi::kvapi::UpsertKVReply; +use databend_common_meta_kvapi::kvapi::UpsertKVReq; +use databend_common_meta_types::MetaError; +use databend_common_meta_types::TxnReply; +use databend_common_meta_types::TxnRequest; use futures::StreamExt; use futures::TryStreamExt; diff --git a/src/meta/client/src/lib.rs b/src/meta/client/src/lib.rs index 17d7ad0c2b59..50dad8574fa1 100644 --- a/src/meta/client/src/lib.rs +++ b/src/meta/client/src/lib.rs @@ -23,8 +23,8 @@ mod message; use std::sync::LazyLock; -pub use common_meta_api::reply::reply_to_api_result; -pub use common_meta_api::reply::reply_to_meta_result; +pub use databend_common_meta_api::reply::reply_to_api_result; +pub use databend_common_meta_api::reply::reply_to_meta_result; pub use grpc_action::MetaGrpcReadReq; pub use grpc_action::MetaGrpcReq; pub use grpc_action::RequestFor; diff --git a/src/meta/client/src/message.rs b/src/meta/client/src/message.rs index 289f689186eb..d16d732fb97b 100644 --- a/src/meta/client/src/message.rs +++ b/src/meta/client/src/message.rs @@ -15,25 +15,25 @@ use std::fmt; use std::fmt::Formatter; -use common_base::base::tokio::sync::oneshot::Sender; -use common_meta_kvapi::kvapi::GetKVReply; -use common_meta_kvapi::kvapi::GetKVReq; -use common_meta_kvapi::kvapi::ListKVReply; -use common_meta_kvapi::kvapi::ListKVReq; -use common_meta_kvapi::kvapi::MGetKVReply; -use common_meta_kvapi::kvapi::MGetKVReq; -use common_meta_kvapi::kvapi::UpsertKVReply; -use common_meta_kvapi::kvapi::UpsertKVReq; -use common_meta_types::protobuf::ClientInfo; -use common_meta_types::protobuf::ClusterStatus; -use common_meta_types::protobuf::ExportedChunk; -use common_meta_types::protobuf::StreamItem; -use common_meta_types::protobuf::WatchRequest; -use common_meta_types::protobuf::WatchResponse; -use common_meta_types::MetaClientError; -use common_meta_types::MetaError; -use common_meta_types::TxnReply; -use common_meta_types::TxnRequest; +use databend_common_base::base::tokio::sync::oneshot::Sender; +use databend_common_meta_kvapi::kvapi::GetKVReply; +use databend_common_meta_kvapi::kvapi::GetKVReq; +use databend_common_meta_kvapi::kvapi::ListKVReply; +use databend_common_meta_kvapi::kvapi::ListKVReq; +use databend_common_meta_kvapi::kvapi::MGetKVReply; +use databend_common_meta_kvapi::kvapi::MGetKVReq; +use databend_common_meta_kvapi::kvapi::UpsertKVReply; +use databend_common_meta_kvapi::kvapi::UpsertKVReq; +use databend_common_meta_types::protobuf::ClientInfo; +use databend_common_meta_types::protobuf::ClusterStatus; +use databend_common_meta_types::protobuf::ExportedChunk; +use databend_common_meta_types::protobuf::StreamItem; +use databend_common_meta_types::protobuf::WatchRequest; +use databend_common_meta_types::protobuf::WatchResponse; +use databend_common_meta_types::MetaClientError; +use databend_common_meta_types::MetaError; +use databend_common_meta_types::TxnReply; +use databend_common_meta_types::TxnRequest; use minitrace::Span; use tonic::codegen::BoxStream; diff --git a/src/meta/client/tests/it/grpc_client.rs b/src/meta/client/tests/it/grpc_client.rs index 9c954e615194..1892a8e26abe 100644 --- a/src/meta/client/tests/it/grpc_client.rs +++ b/src/meta/client/tests/it/grpc_client.rs @@ -14,15 +14,15 @@ use std::time::Duration; -use common_base::base::tokio; -use common_exception::ErrorCode; -use common_grpc::ConnectionFactory; -use common_meta_api::SchemaApi; -use common_meta_app::schema::GetDatabaseReq; -use common_meta_client::MetaGrpcClient; -use common_meta_client::MIN_METASRV_SEMVER; -use common_meta_types::MetaClientError; -use common_meta_types::MetaError; +use databend_common_base::base::tokio; +use databend_common_exception::ErrorCode; +use databend_common_grpc::ConnectionFactory; +use databend_common_meta_api::SchemaApi; +use databend_common_meta_app::schema::GetDatabaseReq; +use databend_common_meta_client::MetaGrpcClient; +use databend_common_meta_client::MIN_METASRV_SEMVER; +use databend_common_meta_types::MetaClientError; +use databend_common_meta_types::MetaError; use crate::grpc_server::start_grpc_server; diff --git a/src/meta/client/tests/it/grpc_server.rs b/src/meta/client/tests/it/grpc_server.rs index f487b24200a8..978dfeec4e85 100644 --- a/src/meta/client/tests/it/grpc_server.rs +++ b/src/meta/client/tests/it/grpc_server.rs @@ -16,25 +16,25 @@ use std::pin::Pin; use std::thread::sleep; use std::time::Duration; -use common_base::base::tokio; -use common_meta_client::to_digit_ver; -use common_meta_client::MIN_METASRV_SEMVER; -use common_meta_types::protobuf::meta_service_server::MetaService; -use common_meta_types::protobuf::meta_service_server::MetaServiceServer; -use common_meta_types::protobuf::ClientInfo; -use common_meta_types::protobuf::ClusterStatus; -use common_meta_types::protobuf::Empty; -use common_meta_types::protobuf::ExportedChunk; -use common_meta_types::protobuf::HandshakeResponse; -use common_meta_types::protobuf::MemberListReply; -use common_meta_types::protobuf::MemberListRequest; -use common_meta_types::protobuf::RaftReply; -use common_meta_types::protobuf::RaftRequest; -use common_meta_types::protobuf::StreamItem; -use common_meta_types::protobuf::TxnReply; -use common_meta_types::protobuf::TxnRequest; -use common_meta_types::protobuf::WatchRequest; -use common_meta_types::protobuf::WatchResponse; +use databend_common_base::base::tokio; +use databend_common_meta_client::to_digit_ver; +use databend_common_meta_client::MIN_METASRV_SEMVER; +use databend_common_meta_types::protobuf::meta_service_server::MetaService; +use databend_common_meta_types::protobuf::meta_service_server::MetaServiceServer; +use databend_common_meta_types::protobuf::ClientInfo; +use databend_common_meta_types::protobuf::ClusterStatus; +use databend_common_meta_types::protobuf::Empty; +use databend_common_meta_types::protobuf::ExportedChunk; +use databend_common_meta_types::protobuf::HandshakeResponse; +use databend_common_meta_types::protobuf::MemberListReply; +use databend_common_meta_types::protobuf::MemberListRequest; +use databend_common_meta_types::protobuf::RaftReply; +use databend_common_meta_types::protobuf::RaftRequest; +use databend_common_meta_types::protobuf::StreamItem; +use databend_common_meta_types::protobuf::TxnReply; +use databend_common_meta_types::protobuf::TxnRequest; +use databend_common_meta_types::protobuf::WatchRequest; +use databend_common_meta_types::protobuf::WatchResponse; use futures::Stream; use rand::Rng; use tonic::codegen::BoxStream; @@ -54,7 +54,7 @@ impl MetaService for GrpcServiceForTestImpl { async fn handshake( &self, - _request: Request>, + _request: Request>, ) -> Result, Status> { tokio::time::sleep(Duration::from_secs(2)).await; let output = futures::stream::once(async { @@ -86,7 +86,7 @@ impl MetaService for GrpcServiceForTestImpl { async fn export( &self, - _request: Request, + _request: Request, ) -> Result, Status> { unimplemented!() } diff --git a/src/meta/ee/Cargo.toml b/src/meta/ee/Cargo.toml index 1e40aaa9e231..98cc8a4b7341 100644 --- a/src/meta/ee/Cargo.toml +++ b/src/meta/ee/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "enterprise-meta" +name = "databend-enterprise-meta" description = "enterprise features for databend-meta" version = { workspace = true } authors = { workspace = true } @@ -14,4 +14,4 @@ test = true [dependencies] [build-dependencies] -common-building = { path = "../../common/building" } +databend-common-building = { path = "../../common/building" } diff --git a/src/meta/ee/build.rs b/src/meta/ee/build.rs index b91102ea0c6b..c29590fb8eed 100644 --- a/src/meta/ee/build.rs +++ b/src/meta/ee/build.rs @@ -13,5 +13,5 @@ // limitations under the License. fn main() { - common_building::setup(); + databend_common_building::setup(); } diff --git a/src/meta/embedded/Cargo.toml b/src/meta/embedded/Cargo.toml index 97eb842207cf..5fbe777cde16 100644 --- a/src/meta/embedded/Cargo.toml +++ b/src/meta/embedded/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "common-meta-embedded" +name = "databend-common-meta-embedded" description = "distributed meta data service" version = { workspace = true } authors = { workspace = true } @@ -12,17 +12,17 @@ doctest = false test = true [features] -io-uring = ["common-meta-sled-store/io-uring", "common-meta-raft-store/io-uring"] +io-uring = ["databend-common-meta-sled-store/io-uring", "databend-common-meta-raft-store/io-uring"] [dependencies] # Workspace dependencies -common-base = { path = "../../common/base" } -common-meta-api = { path = "../api" } -common-meta-kvapi = { path = "../kvapi" } -common-meta-raft-store = { path = "../raft-store" } -common-meta-sled-store = { path = "../sled-store" } -common-meta-stoerr = { path = "../stoerr" } -common-meta-types = { path = "../types" } +databend-common-base = { path = "../../common/base" } +databend-common-meta-api = { path = "../api" } +databend-common-meta-kvapi = { path = "../kvapi" } +databend-common-meta-raft-store = { path = "../raft-store" } +databend-common-meta-sled-store = { path = "../sled-store" } +databend-common-meta-stoerr = { path = "../stoerr" } +databend-common-meta-types = { path = "../types" } # Crates.io dependencies async-trait = { workspace = true } diff --git a/src/meta/embedded/src/kv_api_impl.rs b/src/meta/embedded/src/kv_api_impl.rs index f7a8a038e91c..4ec065a3ea72 100644 --- a/src/meta/embedded/src/kv_api_impl.rs +++ b/src/meta/embedded/src/kv_api_impl.rs @@ -13,16 +13,16 @@ // limitations under the License. use async_trait::async_trait; -use common_meta_kvapi::kvapi; -use common_meta_kvapi::kvapi::GetKVReply; -use common_meta_kvapi::kvapi::KVStream; -use common_meta_kvapi::kvapi::MGetKVReply; -use common_meta_kvapi::kvapi::UpsertKVReply; -use common_meta_kvapi::kvapi::UpsertKVReq; -pub use common_meta_sled_store::init_temp_sled_db; -use common_meta_types::MetaError; -use common_meta_types::TxnReply; -use common_meta_types::TxnRequest; +use databend_common_meta_kvapi::kvapi; +use databend_common_meta_kvapi::kvapi::GetKVReply; +use databend_common_meta_kvapi::kvapi::KVStream; +use databend_common_meta_kvapi::kvapi::MGetKVReply; +use databend_common_meta_kvapi::kvapi::UpsertKVReply; +use databend_common_meta_kvapi::kvapi::UpsertKVReq; +pub use databend_common_meta_sled_store::init_temp_sled_db; +use databend_common_meta_types::MetaError; +use databend_common_meta_types::TxnReply; +use databend_common_meta_types::TxnRequest; use crate::MetaEmbedded; diff --git a/src/meta/embedded/src/meta_embedded.rs b/src/meta/embedded/src/meta_embedded.rs index c8bb86d9d862..9e3d3193798d 100644 --- a/src/meta/embedded/src/meta_embedded.rs +++ b/src/meta/embedded/src/meta_embedded.rs @@ -17,12 +17,12 @@ use std::sync::atomic::Ordering; use std::sync::Arc; use std::sync::LazyLock; -use common_base::base::tokio::sync::Mutex; -use common_meta_raft_store::config::RaftConfig; -use common_meta_raft_store::state_machine::StateMachine; -pub use common_meta_sled_store::init_temp_sled_db; -use common_meta_stoerr::MetaStorageError; -use common_meta_types::anyerror::AnyError; +use databend_common_base::base::tokio::sync::Mutex; +use databend_common_meta_raft_store::config::RaftConfig; +use databend_common_meta_raft_store::state_machine::StateMachine; +pub use databend_common_meta_sled_store::init_temp_sled_db; +use databend_common_meta_stoerr::MetaStorageError; +use databend_common_meta_types::anyerror::AnyError; use log::warn; /// Local storage that provides the API defined by `kvapi::KVApi+SchemaApi`. @@ -92,7 +92,7 @@ impl MetaEmbedded { /// Initialize a global embedded meta store. /// The data in `path` won't be removed after program exit. pub async fn init_global_meta_store(path: String) -> Result<(), MetaStorageError> { - common_meta_sled_store::init_sled_db(path); + databend_common_meta_sled_store::init_sled_db(path); { let mut m = GLOBAL_META_EMBEDDED.as_ref().lock().await; diff --git a/src/meta/embedded/tests/it/kv_api_impl.rs b/src/meta/embedded/tests/it/kv_api_impl.rs index 5184c9482f56..9e69a02ab0b6 100644 --- a/src/meta/embedded/tests/it/kv_api_impl.rs +++ b/src/meta/embedded/tests/it/kv_api_impl.rs @@ -12,9 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_base::base::tokio; -use common_meta_embedded::MetaEmbedded; -use common_meta_kvapi::kvapi; +use databend_common_base::base::tokio; +use databend_common_meta_embedded::MetaEmbedded; +use databend_common_meta_kvapi::kvapi; #[tokio::test(flavor = "multi_thread")] async fn test_kv_write_read() -> anyhow::Result<()> { diff --git a/src/meta/embedded/tests/it/schema_api_impl.rs b/src/meta/embedded/tests/it/schema_api_impl.rs index 57115aaa5da5..b699188d22ae 100644 --- a/src/meta/embedded/tests/it/schema_api_impl.rs +++ b/src/meta/embedded/tests/it/schema_api_impl.rs @@ -13,12 +13,12 @@ // limitations under the License. use async_trait::async_trait; -use common_base::base::tokio; -use common_meta_api::BackgroundApiTestSuite; -use common_meta_api::SchemaApiTestSuite; -use common_meta_api::ShareApiTestSuite; -use common_meta_embedded::MetaEmbedded; -use common_meta_kvapi::kvapi; +use databend_common_base::base::tokio; +use databend_common_meta_api::BackgroundApiTestSuite; +use databend_common_meta_api::SchemaApiTestSuite; +use databend_common_meta_api::ShareApiTestSuite; +use databend_common_meta_embedded::MetaEmbedded; +use databend_common_meta_kvapi::kvapi; #[derive(Clone)] pub struct MetaEmbeddedBuilder {} diff --git a/src/meta/kvapi/Cargo.toml b/src/meta/kvapi/Cargo.toml index 477beadbd90c..a6e20029f682 100644 --- a/src/meta/kvapi/Cargo.toml +++ b/src/meta/kvapi/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "common-meta-kvapi" +name = "databend-common-meta-kvapi" version = { workspace = true } authors = { workspace = true } license = { workspace = true } @@ -13,7 +13,7 @@ doctest = false test = true [dependencies] -common-meta-types = { path = "../types" } +databend-common-meta-types = { path = "../types" } anyhow = { workspace = true } async-trait = { workspace = true } diff --git a/src/meta/kvapi/src/kvapi/api.rs b/src/meta/kvapi/src/kvapi/api.rs index 4eaebb1a1af0..ceaf3a9d9180 100644 --- a/src/meta/kvapi/src/kvapi/api.rs +++ b/src/meta/kvapi/src/kvapi/api.rs @@ -15,10 +15,10 @@ use std::ops::Deref; use async_trait::async_trait; -use common_meta_types::protobuf::StreamItem; -use common_meta_types::SeqV; -use common_meta_types::TxnReply; -use common_meta_types::TxnRequest; +use databend_common_meta_types::protobuf::StreamItem; +use databend_common_meta_types::SeqV; +use databend_common_meta_types::TxnReply; +use databend_common_meta_types::TxnRequest; use futures_util::stream::BoxStream; use futures_util::TryStreamExt; use log::debug; diff --git a/src/meta/kvapi/src/kvapi/message.rs b/src/meta/kvapi/src/kvapi/message.rs index bd14bfec2961..447108a660d7 100644 --- a/src/meta/kvapi/src/kvapi/message.rs +++ b/src/meta/kvapi/src/kvapi/message.rs @@ -12,9 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_meta_types::Change; -use common_meta_types::SeqV; -use common_meta_types::UpsertKV; +use databend_common_meta_types::Change; +use databend_common_meta_types::SeqV; +use databend_common_meta_types::UpsertKV; pub type UpsertKVReq = UpsertKV; diff --git a/src/meta/kvapi/src/kvapi/test_suite.rs b/src/meta/kvapi/src/kvapi/test_suite.rs index 5e291b33cd94..49b0e7a4e2a7 100644 --- a/src/meta/kvapi/src/kvapi/test_suite.rs +++ b/src/meta/kvapi/src/kvapi/test_suite.rs @@ -15,29 +15,29 @@ use std::time::SystemTime; use std::time::UNIX_EPOCH; -use common_meta_types::protobuf as pb; -use common_meta_types::txn_condition; -use common_meta_types::txn_op; -use common_meta_types::txn_op_response; -use common_meta_types::ConditionResult; -use common_meta_types::KVMeta; -use common_meta_types::MatchSeq; -use common_meta_types::Operation; -use common_meta_types::SeqV; -use common_meta_types::TxnCondition; -use common_meta_types::TxnDeleteByPrefixRequest; -use common_meta_types::TxnDeleteByPrefixResponse; -use common_meta_types::TxnDeleteRequest; -use common_meta_types::TxnDeleteResponse; -use common_meta_types::TxnGetRequest; -use common_meta_types::TxnGetResponse; -use common_meta_types::TxnOp; -use common_meta_types::TxnOpResponse; -use common_meta_types::TxnPutRequest; -use common_meta_types::TxnPutResponse; -use common_meta_types::TxnReply; -use common_meta_types::TxnRequest; -use common_meta_types::With; +use databend_common_meta_types::protobuf as pb; +use databend_common_meta_types::txn_condition; +use databend_common_meta_types::txn_op; +use databend_common_meta_types::txn_op_response; +use databend_common_meta_types::ConditionResult; +use databend_common_meta_types::KVMeta; +use databend_common_meta_types::MatchSeq; +use databend_common_meta_types::Operation; +use databend_common_meta_types::SeqV; +use databend_common_meta_types::TxnCondition; +use databend_common_meta_types::TxnDeleteByPrefixRequest; +use databend_common_meta_types::TxnDeleteByPrefixResponse; +use databend_common_meta_types::TxnDeleteRequest; +use databend_common_meta_types::TxnDeleteResponse; +use databend_common_meta_types::TxnGetRequest; +use databend_common_meta_types::TxnGetResponse; +use databend_common_meta_types::TxnOp; +use databend_common_meta_types::TxnOpResponse; +use databend_common_meta_types::TxnPutRequest; +use databend_common_meta_types::TxnPutResponse; +use databend_common_meta_types::TxnReply; +use databend_common_meta_types::TxnRequest; +use databend_common_meta_types::With; use log::debug; use log::info; use minitrace::func_name; diff --git a/src/meta/process/Cargo.toml b/src/meta/process/Cargo.toml index 2f465b4e5f59..a3119f07cf0d 100644 --- a/src/meta/process/Cargo.toml +++ b/src/meta/process/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "common-meta-process" +name = "databend-common-meta-process" description = "process meta-service data" version = { workspace = true } authors = { workspace = true } @@ -9,14 +9,14 @@ edition = { workspace = true } [dependencies] # Workspace dependencies -common-meta-app = { path = "../app" } -common-meta-kvapi = { path = "../kvapi" } -common-meta-raft-store = { path = "../raft-store" } -common-meta-sled-store = { path = "../sled-store" } -common-meta-types = { path = "../types" } -common-proto-conv = { path = "../proto-conv" } -common-protos = { path = "../protos" } -common-tracing = { path = "../../common/tracing" } +databend-common-meta-app = { path = "../app" } +databend-common-meta-kvapi = { path = "../kvapi" } +databend-common-meta-raft-store = { path = "../raft-store" } +databend-common-meta-sled-store = { path = "../sled-store" } +databend-common-meta-types = { path = "../types" } +databend-common-proto-conv = { path = "../proto-conv" } +databend-common-protos = { path = "../protos" } +databend-common-tracing = { path = "../../common/tracing" } # Crates.io dependencies anyhow = { workspace = true } diff --git a/src/meta/process/src/examples.rs b/src/meta/process/src/examples.rs index 67630c668fd0..92ca1e496885 100644 --- a/src/meta/process/src/examples.rs +++ b/src/meta/process/src/examples.rs @@ -15,10 +15,10 @@ use std::collections::BTreeMap; use clap::Parser; -use common_meta_raft_store::key_spaces::RaftStoreEntry; -use common_meta_sled_store::init_sled_db; -use common_tracing::init_logging; -use common_tracing::Config as LogConfig; +use databend_common_meta_raft_store::key_spaces::RaftStoreEntry; +use databend_common_meta_sled_store::init_sled_db; +use databend_common_tracing::init_logging; +use databend_common_tracing::Config as LogConfig; use serde::Deserialize; use serde::Serialize; @@ -96,7 +96,7 @@ pub fn print_table_meta(config: &Config) -> anyhow::Result<()> { init_sled_db(raft_config.raft_dir.clone()); - for tree_iter_res in common_meta_sled_store::iter::>() { + for tree_iter_res in databend_common_meta_sled_store::iter::>() { let (_tree_name, item_iter) = tree_iter_res?; for item_res in item_iter { diff --git a/src/meta/process/src/kv_processor.rs b/src/meta/process/src/kv_processor.rs index 5b11e72a6096..ad5b65c4b20b 100644 --- a/src/meta/process/src/kv_processor.rs +++ b/src/meta/process/src/kv_processor.rs @@ -13,19 +13,19 @@ // limitations under the License. use anyhow::Error; -use common_meta_raft_store::key_spaces::RaftStoreEntry; -use common_meta_types::txn_condition::Target; -use common_meta_types::txn_op::Request; -use common_meta_types::Cmd; -use common_meta_types::Entry; -use common_meta_types::LogEntry; -use common_meta_types::Operation; -use common_meta_types::SeqV; -use common_meta_types::TxnCondition; -use common_meta_types::TxnOp; -use common_meta_types::TxnPutRequest; -use common_meta_types::TxnRequest; -use common_meta_types::UpsertKV; +use databend_common_meta_raft_store::key_spaces::RaftStoreEntry; +use databend_common_meta_types::txn_condition::Target; +use databend_common_meta_types::txn_op::Request; +use databend_common_meta_types::Cmd; +use databend_common_meta_types::Entry; +use databend_common_meta_types::LogEntry; +use databend_common_meta_types::Operation; +use databend_common_meta_types::SeqV; +use databend_common_meta_types::TxnCondition; +use databend_common_meta_types::TxnOp; +use databend_common_meta_types::TxnPutRequest; +use databend_common_meta_types::TxnRequest; +use databend_common_meta_types::UpsertKV; use openraft::EntryPayload; use crate::process::Process; diff --git a/src/meta/process/src/process_meta_dir.rs b/src/meta/process/src/process_meta_dir.rs index dde7a2acb2a4..4163c351809c 100644 --- a/src/meta/process/src/process_meta_dir.rs +++ b/src/meta/process/src/process_meta_dir.rs @@ -12,9 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_meta_raft_store::key_spaces::RaftStoreEntry; -use common_meta_sled_store::get_sled_db; -use common_meta_sled_store::init_sled_db; +use databend_common_meta_raft_store::key_spaces::RaftStoreEntry; +use databend_common_meta_sled_store::get_sled_db; +use databend_common_meta_sled_store::init_sled_db; use crate::examples::Config; diff --git a/src/meta/process/src/rewrite_kv.rs b/src/meta/process/src/rewrite_kv.rs index 7c712aa364ce..5ad03a887644 100644 --- a/src/meta/process/src/rewrite_kv.rs +++ b/src/meta/process/src/rewrite_kv.rs @@ -12,12 +12,12 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_meta_app::schema::TableId; -use common_meta_app::schema::TableMeta; -use common_meta_kvapi::kvapi::Key; -use common_proto_conv::FromToProto; -use common_protos::pb; -use common_protos::prost::Message; +use databend_common_meta_app::schema::TableId; +use databend_common_meta_app::schema::TableMeta; +use databend_common_meta_kvapi::kvapi::Key; +use databend_common_proto_conv::FromToProto; +use databend_common_protos::pb; +use databend_common_protos::prost::Message; /// Convert old version TableMeta protobuf message to new version. /// diff --git a/src/meta/proto-conv/Cargo.toml b/src/meta/proto-conv/Cargo.toml index 9eb49c7caf56..2a1ed729701d 100644 --- a/src/meta/proto-conv/Cargo.toml +++ b/src/meta/proto-conv/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "common-proto-conv" +name = "databend-common-proto-conv" version = { workspace = true } authors = { workspace = true } license = { workspace = true } @@ -11,9 +11,9 @@ doctest = false test = true [dependencies] -common-expression = { path = "../../query/expression" } -common-meta-app = { path = "../app" } -common-protos = { path = "../protos" } +databend-common-expression = { path = "../../query/expression" } +databend-common-meta-app = { path = "../app" } +databend-common-protos = { path = "../protos" } chrono = { workspace = true } chrono-tz = { workspace = true, features = ["serde"] } diff --git a/src/meta/proto-conv/src/background_job_from_to_protobuf_impl.rs b/src/meta/proto-conv/src/background_job_from_to_protobuf_impl.rs index 59668f78e923..219a6d4983f3 100644 --- a/src/meta/proto-conv/src/background_job_from_to_protobuf_impl.rs +++ b/src/meta/proto-conv/src/background_job_from_to_protobuf_impl.rs @@ -16,11 +16,11 @@ use std::str::FromStr; use chrono::DateTime; use chrono::Utc; -use common_meta_app as mt; -use common_meta_app::background::BackgroundJobParams; -use common_meta_app::background::BackgroundJobStatus; -use common_meta_app::background::ManualTriggerParams; -use common_protos::pb; +use databend_common_meta_app as mt; +use databend_common_meta_app::background::BackgroundJobParams; +use databend_common_meta_app::background::BackgroundJobStatus; +use databend_common_meta_app::background::ManualTriggerParams; +use databend_common_protos::pb; use num::FromPrimitive; use crate::reader_check_msg; diff --git a/src/meta/proto-conv/src/background_task_from_to_protobuf_impl.rs b/src/meta/proto-conv/src/background_task_from_to_protobuf_impl.rs index c0ab28f93a60..f848e3c8c0b3 100644 --- a/src/meta/proto-conv/src/background_task_from_to_protobuf_impl.rs +++ b/src/meta/proto-conv/src/background_task_from_to_protobuf_impl.rs @@ -16,10 +16,10 @@ use std::time::Duration; use chrono::DateTime; use chrono::Utc; -use common_meta_app as mt; -use common_meta_app::background::ManualTriggerParams; -use common_meta_app::schema::TableStatistics; -use common_protos::pb; +use databend_common_meta_app as mt; +use databend_common_meta_app::background::ManualTriggerParams; +use databend_common_meta_app::schema::TableStatistics; +use databend_common_protos::pb; use num::FromPrimitive; use crate::reader_check_msg; diff --git a/src/meta/proto-conv/src/catalog_from_to_protobuf_impl.rs b/src/meta/proto-conv/src/catalog_from_to_protobuf_impl.rs index d86fad7ed84d..029415fc1915 100644 --- a/src/meta/proto-conv/src/catalog_from_to_protobuf_impl.rs +++ b/src/meta/proto-conv/src/catalog_from_to_protobuf_impl.rs @@ -17,12 +17,12 @@ use chrono::DateTime; use chrono::Utc; -use common_meta_app::schema as mt; -use common_meta_app::schema::CatalogOption; -use common_meta_app::schema::HiveCatalogOption; -use common_meta_app::schema::IcebergCatalogOption; -use common_meta_app::storage::StorageParams; -use common_protos::pb; +use databend_common_meta_app::schema as mt; +use databend_common_meta_app::schema::CatalogOption; +use databend_common_meta_app::schema::HiveCatalogOption; +use databend_common_meta_app::schema::IcebergCatalogOption; +use databend_common_meta_app::storage::StorageParams; +use databend_common_protos::pb; use crate::reader_check_msg; use crate::FromToProto; diff --git a/src/meta/proto-conv/src/config_from_to_protobuf_impl.rs b/src/meta/proto-conv/src/config_from_to_protobuf_impl.rs index 269d760bd58a..c7ff68598a87 100644 --- a/src/meta/proto-conv/src/config_from_to_protobuf_impl.rs +++ b/src/meta/proto-conv/src/config_from_to_protobuf_impl.rs @@ -12,16 +12,16 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_meta_app as mt; -use common_meta_app::storage::StorageCosConfig; -use common_meta_app::storage::StorageFsConfig; -use common_meta_app::storage::StorageGcsConfig; -use common_meta_app::storage::StorageHdfsConfig; -use common_meta_app::storage::StorageObsConfig; -use common_meta_app::storage::StorageOssConfig; -use common_meta_app::storage::StorageS3Config; -use common_meta_app::storage::StorageWebhdfsConfig; -use common_protos::pb; +use databend_common_meta_app as mt; +use databend_common_meta_app::storage::StorageCosConfig; +use databend_common_meta_app::storage::StorageFsConfig; +use databend_common_meta_app::storage::StorageGcsConfig; +use databend_common_meta_app::storage::StorageHdfsConfig; +use databend_common_meta_app::storage::StorageObsConfig; +use databend_common_meta_app::storage::StorageOssConfig; +use databend_common_meta_app::storage::StorageS3Config; +use databend_common_meta_app::storage::StorageWebhdfsConfig; +use databend_common_protos::pb; use crate::reader_check_msg; use crate::FromToProto; diff --git a/src/meta/proto-conv/src/connection_from_to_protobuf_impl.rs b/src/meta/proto-conv/src/connection_from_to_protobuf_impl.rs index 67e0b1d96836..1e0d8c72e3e0 100644 --- a/src/meta/proto-conv/src/connection_from_to_protobuf_impl.rs +++ b/src/meta/proto-conv/src/connection_from_to_protobuf_impl.rs @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_meta_app::principal as mt; -use common_protos::pb; +use databend_common_meta_app::principal as mt; +use databend_common_protos::pb; use crate::reader_check_msg; use crate::FromToProto; diff --git a/src/meta/proto-conv/src/data_mask_from_to_protobuf_impl.rs b/src/meta/proto-conv/src/data_mask_from_to_protobuf_impl.rs index 7cea9f38d66e..cdeca9e87e6b 100644 --- a/src/meta/proto-conv/src/data_mask_from_to_protobuf_impl.rs +++ b/src/meta/proto-conv/src/data_mask_from_to_protobuf_impl.rs @@ -19,8 +19,8 @@ use std::collections::BTreeMap; use chrono::DateTime; use chrono::Utc; -use common_meta_app::data_mask as mt; -use common_protos::pb; +use databend_common_meta_app::data_mask as mt; +use databend_common_protos::pb; use crate::reader_check_msg; use crate::FromToProto; diff --git a/src/meta/proto-conv/src/database_from_to_protobuf_impl.rs b/src/meta/proto-conv/src/database_from_to_protobuf_impl.rs index 2d9476d358aa..bc76e59e0b64 100644 --- a/src/meta/proto-conv/src/database_from_to_protobuf_impl.rs +++ b/src/meta/proto-conv/src/database_from_to_protobuf_impl.rs @@ -19,9 +19,9 @@ use std::collections::BTreeSet; use chrono::DateTime; use chrono::Utc; -use common_meta_app::schema as mt; -use common_meta_app::share; -use common_protos::pb; +use databend_common_meta_app::schema as mt; +use databend_common_meta_app::share; +use databend_common_protos::pb; use crate::reader_check_msg; use crate::FromToProto; diff --git a/src/meta/proto-conv/src/file_format_from_to_protobuf_impl.rs b/src/meta/proto-conv/src/file_format_from_to_protobuf_impl.rs index b5b15faf941b..8c0de6d14884 100644 --- a/src/meta/proto-conv/src/file_format_from_to_protobuf_impl.rs +++ b/src/meta/proto-conv/src/file_format_from_to_protobuf_impl.rs @@ -15,8 +15,8 @@ //! This mod is the key point about compatibility. //! Everytime update anything in this file, update the `VER` and let the tests pass. -use common_meta_app as mt; -use common_protos::pb; +use databend_common_meta_app as mt; +use databend_common_protos::pb; use num::FromPrimitive; use crate::reader_check_msg; diff --git a/src/meta/proto-conv/src/index_from_to_protobuf_impl.rs b/src/meta/proto-conv/src/index_from_to_protobuf_impl.rs index f8039fe3029e..49cc48c8a1ac 100644 --- a/src/meta/proto-conv/src/index_from_to_protobuf_impl.rs +++ b/src/meta/proto-conv/src/index_from_to_protobuf_impl.rs @@ -1,110 +1,110 @@ -// Copyright 2021 Datafuse Labs -// -// Licensed 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 mod is the key point about compatibility. -//! Everytime update anything in this file, update the `VER` and let the tests pass. - -use chrono::DateTime; -use chrono::Utc; -use common_meta_app::schema as mt; -use common_protos::pb; -use num::FromPrimitive; - -use crate::reader_check_msg; -use crate::FromToProto; -use crate::Incompatible; -use crate::MIN_READER_VER; -use crate::VER; - -impl FromToProto for mt::IndexNameIdent { - type PB = pb::IndexNameIdent; - - fn get_pb_ver(p: &Self::PB) -> u64 { - p.ver - } - - fn from_pb(p: Self::PB) -> Result - where Self: Sized { - reader_check_msg(p.ver, p.min_reader_ver)?; - - let v = Self { - tenant: p.tenant, - index_name: p.index_name, - }; - Ok(v) - } - - fn to_pb(&self) -> Result { - let p = pb::IndexNameIdent { - ver: VER, - min_reader_ver: MIN_READER_VER, - tenant: self.tenant.clone(), - index_name: self.index_name.clone(), - }; - Ok(p) - } -} - -impl FromToProto for mt::IndexMeta { - type PB = pb::IndexMeta; - - fn get_pb_ver(p: &Self::PB) -> u64 { - p.ver - } - - fn from_pb(p: Self::PB) -> Result - where Self: Sized { - reader_check_msg(p.ver, p.min_reader_ver)?; - - let v = Self { - table_id: p.table_id, - index_type: FromPrimitive::from_i32(p.index_type).ok_or_else(|| Incompatible { - reason: format!("invalid IndexType: {}", p.index_type), - })?, - created_on: DateTime::::from_pb(p.created_on)?, - dropped_on: match p.dropped_on { - Some(drop_on) => Some(DateTime::::from_pb(drop_on)?), - None => None, - }, - updated_on: match p.updated_on { - Some(update_on) => Some(DateTime::::from_pb(update_on)?), - None => None, - }, - query: p.query, - sync_creation: p.sync_creation, - }; - Ok(v) - } - - fn to_pb(&self) -> Result { - let p = pb::IndexMeta { - ver: VER, - min_reader_ver: MIN_READER_VER, - table_id: self.table_id, - index_type: self.index_type.clone() as i32, - created_on: self.created_on.to_pb()?, - dropped_on: match self.dropped_on { - Some(drop_on) => Some(drop_on.to_pb()?), - None => None, - }, - updated_on: match self.updated_on { - Some(update_on) => Some(update_on.to_pb()?), - None => None, - }, - query: self.query.clone(), - sync_creation: self.sync_creation, - }; - Ok(p) - } -} +// Copyright 2021 Datafuse Labs +// +// Licensed 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 mod is the key point about compatibility. +//! Everytime update anything in this file, update the `VER` and let the tests pass. + +use chrono::DateTime; +use chrono::Utc; +use databend_common_meta_app::schema as mt; +use databend_common_protos::pb; +use num::FromPrimitive; + +use crate::reader_check_msg; +use crate::FromToProto; +use crate::Incompatible; +use crate::MIN_READER_VER; +use crate::VER; + +impl FromToProto for mt::IndexNameIdent { + type PB = pb::IndexNameIdent; + + fn get_pb_ver(p: &Self::PB) -> u64 { + p.ver + } + + fn from_pb(p: Self::PB) -> Result + where Self: Sized { + reader_check_msg(p.ver, p.min_reader_ver)?; + + let v = Self { + tenant: p.tenant, + index_name: p.index_name, + }; + Ok(v) + } + + fn to_pb(&self) -> Result { + let p = pb::IndexNameIdent { + ver: VER, + min_reader_ver: MIN_READER_VER, + tenant: self.tenant.clone(), + index_name: self.index_name.clone(), + }; + Ok(p) + } +} + +impl FromToProto for mt::IndexMeta { + type PB = pb::IndexMeta; + + fn get_pb_ver(p: &Self::PB) -> u64 { + p.ver + } + + fn from_pb(p: Self::PB) -> Result + where Self: Sized { + reader_check_msg(p.ver, p.min_reader_ver)?; + + let v = Self { + table_id: p.table_id, + index_type: FromPrimitive::from_i32(p.index_type).ok_or_else(|| Incompatible { + reason: format!("invalid IndexType: {}", p.index_type), + })?, + created_on: DateTime::::from_pb(p.created_on)?, + dropped_on: match p.dropped_on { + Some(drop_on) => Some(DateTime::::from_pb(drop_on)?), + None => None, + }, + updated_on: match p.updated_on { + Some(update_on) => Some(DateTime::::from_pb(update_on)?), + None => None, + }, + query: p.query, + sync_creation: p.sync_creation, + }; + Ok(v) + } + + fn to_pb(&self) -> Result { + let p = pb::IndexMeta { + ver: VER, + min_reader_ver: MIN_READER_VER, + table_id: self.table_id, + index_type: self.index_type.clone() as i32, + created_on: self.created_on.to_pb()?, + dropped_on: match self.dropped_on { + Some(drop_on) => Some(drop_on.to_pb()?), + None => None, + }, + updated_on: match self.updated_on { + Some(update_on) => Some(update_on.to_pb()?), + None => None, + }, + query: self.query.clone(), + sync_creation: self.sync_creation, + }; + Ok(p) + } +} diff --git a/src/meta/proto-conv/src/least_visible_time_from_to_protobuf_impl.rs b/src/meta/proto-conv/src/least_visible_time_from_to_protobuf_impl.rs index fa2daceef884..d22c60838cc5 100644 --- a/src/meta/proto-conv/src/least_visible_time_from_to_protobuf_impl.rs +++ b/src/meta/proto-conv/src/least_visible_time_from_to_protobuf_impl.rs @@ -17,8 +17,8 @@ use chrono::DateTime; use chrono::Utc; -use common_meta_app::schema as mt; -use common_protos::pb; +use databend_common_meta_app::schema as mt; +use databend_common_protos::pb; use crate::reader_check_msg; use crate::FromToProto; diff --git a/src/meta/proto-conv/src/lock_from_to_protobuf_impl.rs b/src/meta/proto-conv/src/lock_from_to_protobuf_impl.rs index 6203e4be4b85..c9185c488138 100644 --- a/src/meta/proto-conv/src/lock_from_to_protobuf_impl.rs +++ b/src/meta/proto-conv/src/lock_from_to_protobuf_impl.rs @@ -17,8 +17,8 @@ use chrono::DateTime; use chrono::Utc; -use common_meta_app::schema as mt; -use common_protos::pb; +use databend_common_meta_app::schema as mt; +use databend_common_protos::pb; use num::FromPrimitive; use crate::reader_check_msg; diff --git a/src/meta/proto-conv/src/owner_from_to_protobuf_impl.rs b/src/meta/proto-conv/src/owner_from_to_protobuf_impl.rs index 7b56523aa710..837a844fcb5d 100644 --- a/src/meta/proto-conv/src/owner_from_to_protobuf_impl.rs +++ b/src/meta/proto-conv/src/owner_from_to_protobuf_impl.rs @@ -14,8 +14,8 @@ use chrono::DateTime; use chrono::Utc; -use common_meta_app::schema as mt; -use common_protos::pb; +use databend_common_meta_app::schema as mt; +use databend_common_protos::pb; use crate::reader_check_msg; use crate::FromToProto; diff --git a/src/meta/proto-conv/src/schema_from_to_protobuf_impl.rs b/src/meta/proto-conv/src/schema_from_to_protobuf_impl.rs index 656bac1e4b5f..48589394e4e8 100644 --- a/src/meta/proto-conv/src/schema_from_to_protobuf_impl.rs +++ b/src/meta/proto-conv/src/schema_from_to_protobuf_impl.rs @@ -15,13 +15,13 @@ //! This mod is the key point about compatibility. //! Everytime update anything in this file, update the `VER` and let the tests pass. -use common_expression as ex; -use common_expression::types::NumberDataType; -use common_expression::TableDataType; -use common_protos::pb; -use common_protos::pb::data_type::Dt; -use common_protos::pb::data_type::Dt24; -use common_protos::pb::number::Num; +use databend_common_expression as ex; +use databend_common_expression::types::NumberDataType; +use databend_common_expression::TableDataType; +use databend_common_protos::pb; +use databend_common_protos::pb::data_type::Dt; +use databend_common_protos::pb::data_type::Dt24; +use databend_common_protos::pb::number::Num; use crate::reader_check_msg; use crate::FromToProto; diff --git a/src/meta/proto-conv/src/share_from_to_protobuf_impl.rs b/src/meta/proto-conv/src/share_from_to_protobuf_impl.rs index 33f59735dc54..d364723d2074 100644 --- a/src/meta/proto-conv/src/share_from_to_protobuf_impl.rs +++ b/src/meta/proto-conv/src/share_from_to_protobuf_impl.rs @@ -20,8 +20,8 @@ use std::collections::BTreeSet; use chrono::DateTime; use chrono::Utc; -use common_meta_app::share as mt; -use common_protos::pb; +use databend_common_meta_app::share as mt; +use databend_common_protos::pb; use enumflags2::BitFlags; use crate::reader_check_msg; diff --git a/src/meta/proto-conv/src/stage_from_to_protobuf_impl.rs b/src/meta/proto-conv/src/stage_from_to_protobuf_impl.rs index b8bb83693f03..40e23c29f157 100644 --- a/src/meta/proto-conv/src/stage_from_to_protobuf_impl.rs +++ b/src/meta/proto-conv/src/stage_from_to_protobuf_impl.rs @@ -19,8 +19,8 @@ use std::convert::TryFrom; use chrono::DateTime; use chrono::Utc; -use common_meta_app as mt; -use common_protos::pb; +use databend_common_meta_app as mt; +use databend_common_protos::pb; use num::FromPrimitive; use crate::reader_check_msg; diff --git a/src/meta/proto-conv/src/table_from_to_protobuf_impl.rs b/src/meta/proto-conv/src/table_from_to_protobuf_impl.rs index f413fe31bab6..7ba40491b522 100644 --- a/src/meta/proto-conv/src/table_from_to_protobuf_impl.rs +++ b/src/meta/proto-conv/src/table_from_to_protobuf_impl.rs @@ -20,10 +20,10 @@ use std::sync::Arc; use chrono::DateTime; use chrono::Utc; -use common_expression as ex; -use common_meta_app::schema as mt; -use common_meta_app::storage::StorageParams; -use common_protos::pb; +use databend_common_expression as ex; +use databend_common_meta_app::schema as mt; +use databend_common_meta_app::storage::StorageParams; +use databend_common_protos::pb; use crate::reader_check_msg; use crate::FromToProto; diff --git a/src/meta/proto-conv/src/udf_from_to_protobuf_impl.rs b/src/meta/proto-conv/src/udf_from_to_protobuf_impl.rs index de8b24d7ee3b..e7430fa4c5a2 100644 --- a/src/meta/proto-conv/src/udf_from_to_protobuf_impl.rs +++ b/src/meta/proto-conv/src/udf_from_to_protobuf_impl.rs @@ -12,11 +12,11 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_expression::infer_schema_type; -use common_expression::types::DataType; -use common_expression::TableDataType; -use common_meta_app::principal as mt; -use common_protos::pb; +use databend_common_expression::infer_schema_type; +use databend_common_expression::types::DataType; +use databend_common_expression::TableDataType; +use databend_common_meta_app::principal as mt; +use databend_common_protos::pb; use crate::reader_check_msg; use crate::FromToProto; diff --git a/src/meta/proto-conv/src/user_from_to_protobuf_impl.rs b/src/meta/proto-conv/src/user_from_to_protobuf_impl.rs index dcb00f017702..44e82bd93ffe 100644 --- a/src/meta/proto-conv/src/user_from_to_protobuf_impl.rs +++ b/src/meta/proto-conv/src/user_from_to_protobuf_impl.rs @@ -20,8 +20,8 @@ use std::collections::HashSet; use chrono::DateTime; use chrono::Utc; -use common_meta_app as mt; -use common_protos::pb; +use databend_common_meta_app as mt; +use databend_common_protos::pb; use enumflags2::BitFlags; use num::FromPrimitive; diff --git a/src/meta/proto-conv/src/virtual_column_from_to_protobuf_impl.rs b/src/meta/proto-conv/src/virtual_column_from_to_protobuf_impl.rs index 83a58a39aa5e..5001bacdeb89 100644 --- a/src/meta/proto-conv/src/virtual_column_from_to_protobuf_impl.rs +++ b/src/meta/proto-conv/src/virtual_column_from_to_protobuf_impl.rs @@ -1,66 +1,66 @@ -// Copyright 2021 Datafuse Labs -// -// Licensed 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 mod is the key point about compatibility. -//! Everytime update anything in this file, update the `VER` and let the tests pass. - -use chrono::DateTime; -use chrono::Utc; -use common_meta_app::schema as mt; -use common_protos::pb; - -use crate::reader_check_msg; -use crate::FromToProto; -use crate::Incompatible; -use crate::MIN_READER_VER; -use crate::VER; - -impl FromToProto for mt::VirtualColumnMeta { - type PB = pb::VirtualColumnMeta; - - fn get_pb_ver(p: &Self::PB) -> u64 { - p.ver - } - - fn from_pb(p: Self::PB) -> Result - where Self: Sized { - reader_check_msg(p.ver, p.min_reader_ver)?; - - let v = Self { - table_id: p.table_id, - virtual_columns: p.virtual_columns, - created_on: DateTime::::from_pb(p.created_on)?, - updated_on: match p.updated_on { - Some(updated_on) => Some(DateTime::::from_pb(updated_on)?), - None => None, - }, - }; - Ok(v) - } - - fn to_pb(&self) -> Result { - let p = pb::VirtualColumnMeta { - ver: VER, - min_reader_ver: MIN_READER_VER, - table_id: self.table_id, - virtual_columns: self.virtual_columns.clone(), - created_on: self.created_on.to_pb()?, - updated_on: match self.updated_on { - Some(updated_on) => Some(updated_on.to_pb()?), - None => None, - }, - }; - Ok(p) - } -} +// Copyright 2021 Datafuse Labs +// +// Licensed 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 mod is the key point about compatibility. +//! Everytime update anything in this file, update the `VER` and let the tests pass. + +use chrono::DateTime; +use chrono::Utc; +use databend_common_meta_app::schema as mt; +use databend_common_protos::pb; + +use crate::reader_check_msg; +use crate::FromToProto; +use crate::Incompatible; +use crate::MIN_READER_VER; +use crate::VER; + +impl FromToProto for mt::VirtualColumnMeta { + type PB = pb::VirtualColumnMeta; + + fn get_pb_ver(p: &Self::PB) -> u64 { + p.ver + } + + fn from_pb(p: Self::PB) -> Result + where Self: Sized { + reader_check_msg(p.ver, p.min_reader_ver)?; + + let v = Self { + table_id: p.table_id, + virtual_columns: p.virtual_columns, + created_on: DateTime::::from_pb(p.created_on)?, + updated_on: match p.updated_on { + Some(updated_on) => Some(DateTime::::from_pb(updated_on)?), + None => None, + }, + }; + Ok(v) + } + + fn to_pb(&self) -> Result { + let p = pb::VirtualColumnMeta { + ver: VER, + min_reader_ver: MIN_READER_VER, + table_id: self.table_id, + virtual_columns: self.virtual_columns.clone(), + created_on: self.created_on.to_pb()?, + updated_on: match self.updated_on { + Some(updated_on) => Some(updated_on.to_pb()?), + None => None, + }, + }; + Ok(p) + } +} diff --git a/src/meta/proto-conv/tests/it/common.rs b/src/meta/proto-conv/tests/it/common.rs index e46bdfa51bc5..f0b5731351bd 100644 --- a/src/meta/proto-conv/tests/it/common.rs +++ b/src/meta/proto-conv/tests/it/common.rs @@ -15,9 +15,9 @@ use std::fmt::Debug; use std::fmt::Display; -use common_proto_conv::FromToProto; -use common_proto_conv::VER; use convert_case::Casing; +use databend_common_proto_conv::FromToProto; +use databend_common_proto_conv::VER; use pretty_assertions::assert_eq; /// Tests converting rust types from/to protobuf defined types. @@ -25,14 +25,14 @@ use pretty_assertions::assert_eq; pub(crate) fn test_pb_from_to(name: impl Display, m: MT) -> anyhow::Result<()> where MT: FromToProto + PartialEq + Debug, - MT::PB: common_protos::prost::Message, + MT::PB: databend_common_protos::prost::Message, { let p = m.to_pb()?; let n = std::any::type_name::(); let mut buf = vec![]; - common_protos::prost::Message::encode(&p, &mut buf)?; + databend_common_protos::prost::Message::encode(&p, &mut buf)?; let var_name = n.split("::").last().unwrap(); // The encoded data should be saved for compatability test. @@ -61,9 +61,9 @@ pub(crate) fn test_load_old( ) -> anyhow::Result<()> where MT: FromToProto + PartialEq + Debug, - MT::PB: common_protos::prost::Message + Default, + MT::PB: databend_common_protos::prost::Message + Default, { - let p: MT::PB = common_protos::prost::Message::decode(buf).map_err(print_err)?; + let p: MT::PB = databend_common_protos::prost::Message::decode(buf).map_err(print_err)?; assert_eq!(want_msg_ver, MT::get_pb_ver(&p), "loading {}", name); let got = MT::from_pb(p).map_err(print_err)?; diff --git a/src/meta/proto-conv/tests/it/proto_conv.rs b/src/meta/proto-conv/tests/it/proto_conv.rs index 1685fa468eb9..f2916f13aefe 100644 --- a/src/meta/proto-conv/tests/it/proto_conv.rs +++ b/src/meta/proto-conv/tests/it/proto_conv.rs @@ -23,20 +23,20 @@ use ce::types::NumberDataType; use chrono::DateTime; use chrono::TimeZone; use chrono::Utc; -use common_expression as ce; -use common_expression::TableDataType; -use common_expression::TableField; -use common_expression::TableSchema; -use common_meta_app::schema as mt; -use common_meta_app::schema::CatalogOption; -use common_meta_app::schema::IcebergCatalogOption; -use common_meta_app::schema::IndexType; -use common_meta_app::schema::LockType; -use common_meta_app::share; -use common_meta_app::storage::StorageS3Config; -use common_proto_conv::FromToProto; -use common_proto_conv::Incompatible; -use common_proto_conv::VER; +use databend_common_expression as ce; +use databend_common_expression::TableDataType; +use databend_common_expression::TableField; +use databend_common_expression::TableSchema; +use databend_common_meta_app::schema as mt; +use databend_common_meta_app::schema::CatalogOption; +use databend_common_meta_app::schema::IcebergCatalogOption; +use databend_common_meta_app::schema::IndexType; +use databend_common_meta_app::schema::LockType; +use databend_common_meta_app::share; +use databend_common_meta_app::storage::StorageS3Config; +use databend_common_proto_conv::FromToProto; +use databend_common_proto_conv::Incompatible; +use databend_common_proto_conv::VER; use maplit::btreemap; use maplit::btreeset; use pretty_assertions::assert_eq; @@ -286,8 +286,8 @@ pub(crate) fn new_lock_meta() -> mt::LockMeta { } } -fn new_data_mask_meta() -> common_meta_app::data_mask::DatamaskMeta { - common_meta_app::data_mask::DatamaskMeta { +fn new_data_mask_meta() -> databend_common_meta_app::data_mask::DatamaskMeta { + databend_common_meta_app::data_mask::DatamaskMeta { args: vec![("a".to_string(), "String".to_string())], return_type: "String".to_string(), body: "CASE WHEN current_role() IN('ANALYST') THEN VAL ELSE '*********' END".to_string(), @@ -297,8 +297,8 @@ fn new_data_mask_meta() -> common_meta_app::data_mask::DatamaskMeta { } } -fn new_table_statistics() -> common_meta_app::schema::TableStatistics { - common_meta_app::schema::TableStatistics { +fn new_table_statistics() -> databend_common_meta_app::schema::TableStatistics { + databend_common_meta_app::schema::TableStatistics { number_of_rows: 100, data_bytes: 200, compressed_data_bytes: 15, @@ -308,10 +308,10 @@ fn new_table_statistics() -> common_meta_app::schema::TableStatistics { } } -fn new_catalog_meta() -> common_meta_app::schema::CatalogMeta { - common_meta_app::schema::CatalogMeta { +fn new_catalog_meta() -> databend_common_meta_app::schema::CatalogMeta { + databend_common_meta_app::schema::CatalogMeta { catalog_option: CatalogOption::Iceberg(IcebergCatalogOption { - storage_params: Box::new(common_meta_app::storage::StorageParams::S3( + storage_params: Box::new(databend_common_meta_app::storage::StorageParams::S3( StorageS3Config { endpoint_url: "http://127.0.0.1:9900".to_string(), region: "hello".to_string(), @@ -355,7 +355,7 @@ fn test_pb_from_to() -> anyhow::Result<()> { let data_mask_meta = new_data_mask_meta(); let p = data_mask_meta.to_pb()?; - let got = common_meta_app::data_mask::DatamaskMeta::from_pb(p)?; + let got = databend_common_meta_app::data_mask::DatamaskMeta::from_pb(p)?; assert_eq!(data_mask_meta, got); let lvt = new_lvt(); @@ -413,7 +413,7 @@ fn test_build_pb_buf() -> anyhow::Result<()> { let p = db_meta.to_pb()?; let mut buf = vec![]; - common_protos::prost::Message::encode(&p, &mut buf)?; + databend_common_protos::prost::Message::encode(&p, &mut buf)?; println!("db:{:?}", buf); } @@ -424,7 +424,7 @@ fn test_build_pb_buf() -> anyhow::Result<()> { let p = tbl.to_pb()?; let mut buf = vec![]; - common_protos::prost::Message::encode(&p, &mut buf)?; + databend_common_protos::prost::Message::encode(&p, &mut buf)?; println!("table:{:?}", buf); } @@ -435,7 +435,7 @@ fn test_build_pb_buf() -> anyhow::Result<()> { let p = tbl.to_pb()?; let mut buf = vec![]; - common_protos::prost::Message::encode(&p, &mut buf)?; + databend_common_protos::prost::Message::encode(&p, &mut buf)?; println!("share:{:?}", buf); } @@ -446,7 +446,7 @@ fn test_build_pb_buf() -> anyhow::Result<()> { let p = share_account_meta.to_pb()?; let mut buf = vec![]; - common_protos::prost::Message::encode(&p, &mut buf)?; + databend_common_protos::prost::Message::encode(&p, &mut buf)?; println!("share account:{:?}", buf); } @@ -456,7 +456,7 @@ fn test_build_pb_buf() -> anyhow::Result<()> { let p = index.to_pb()?; let mut buf = vec![]; - common_protos::prost::Message::encode(&p, &mut buf)?; + databend_common_protos::prost::Message::encode(&p, &mut buf)?; println!("index:{buf:?}"); } @@ -466,7 +466,7 @@ fn test_build_pb_buf() -> anyhow::Result<()> { let p = copied_file.to_pb()?; let mut buf = vec![]; - common_protos::prost::Message::encode(&p, &mut buf)?; + databend_common_protos::prost::Message::encode(&p, &mut buf)?; println!("copied_file:{:?}", buf); } @@ -476,7 +476,7 @@ fn test_build_pb_buf() -> anyhow::Result<()> { let p = empty_proto.to_pb()?; let mut buf = vec![]; - common_protos::prost::Message::encode(&p, &mut buf)?; + databend_common_protos::prost::Message::encode(&p, &mut buf)?; println!("empty_proto:{:?}", buf); } @@ -486,7 +486,7 @@ fn test_build_pb_buf() -> anyhow::Result<()> { let p = table_lock_meta.to_pb()?; let mut buf = vec![]; - common_protos::prost::Message::encode(&p, &mut buf)?; + databend_common_protos::prost::Message::encode(&p, &mut buf)?; } // schema @@ -495,7 +495,7 @@ fn test_build_pb_buf() -> anyhow::Result<()> { let p = schema.to_pb()?; let mut buf = vec![]; - common_protos::prost::Message::encode(&p, &mut buf)?; + databend_common_protos::prost::Message::encode(&p, &mut buf)?; println!("schema:{:?}", buf); } @@ -505,7 +505,7 @@ fn test_build_pb_buf() -> anyhow::Result<()> { let p = data_mask_meta.to_pb()?; let mut buf = vec![]; - common_protos::prost::Message::encode(&p, &mut buf)?; + databend_common_protos::prost::Message::encode(&p, &mut buf)?; println!("data mask:{:?}", buf); } @@ -515,7 +515,7 @@ fn test_build_pb_buf() -> anyhow::Result<()> { let p = table_statistics.to_pb()?; let mut buf = vec![]; - common_protos::prost::Message::encode(&p, &mut buf)?; + databend_common_protos::prost::Message::encode(&p, &mut buf)?; println!("table statistics:{:?}", buf); } @@ -525,7 +525,7 @@ fn test_build_pb_buf() -> anyhow::Result<()> { let p = catalog_meta.to_pb()?; let mut buf = vec![]; - common_protos::prost::Message::encode(&p, &mut buf)?; + databend_common_protos::prost::Message::encode(&p, &mut buf)?; println!("catalog catalog_meta:{:?}", buf); } @@ -535,7 +535,7 @@ fn test_build_pb_buf() -> anyhow::Result<()> { let p = lvt.to_pb()?; let mut buf = vec![]; - common_protos::prost::Message::encode(&p, &mut buf)?; + databend_common_protos::prost::Message::encode(&p, &mut buf)?; println!("lvt:{:?}", buf); } diff --git a/src/meta/proto-conv/tests/it/user_proto_conv.rs b/src/meta/proto-conv/tests/it/user_proto_conv.rs index 9e7be26afc61..9d2a151bb795 100644 --- a/src/meta/proto-conv/tests/it/user_proto_conv.rs +++ b/src/meta/proto-conv/tests/it/user_proto_conv.rs @@ -19,21 +19,21 @@ use chrono::NaiveDateTime; use chrono::NaiveTime; use chrono::TimeZone; use chrono::Utc; -use common_meta_app as mt; -use common_meta_app::principal::UserIdentity; -use common_meta_app::principal::UserPrivilegeType; -use common_meta_app::storage::StorageCosConfig; -use common_meta_app::storage::StorageFsConfig; -use common_meta_app::storage::StorageGcsConfig; -use common_meta_app::storage::StorageObsConfig; -use common_meta_app::storage::StorageOssConfig; -use common_meta_app::storage::StorageParams; -use common_meta_app::storage::StorageS3Config; -use common_meta_app::storage::StorageWebhdfsConfig; -use common_proto_conv::FromToProto; -use common_proto_conv::Incompatible; -use common_proto_conv::VER; -use common_protos::pb; +use databend_common_meta_app as mt; +use databend_common_meta_app::principal::UserIdentity; +use databend_common_meta_app::principal::UserPrivilegeType; +use databend_common_meta_app::storage::StorageCosConfig; +use databend_common_meta_app::storage::StorageFsConfig; +use databend_common_meta_app::storage::StorageGcsConfig; +use databend_common_meta_app::storage::StorageObsConfig; +use databend_common_meta_app::storage::StorageOssConfig; +use databend_common_meta_app::storage::StorageParams; +use databend_common_meta_app::storage::StorageS3Config; +use databend_common_meta_app::storage::StorageWebhdfsConfig; +use databend_common_proto_conv::FromToProto; +use databend_common_proto_conv::Incompatible; +use databend_common_proto_conv::VER; +use databend_common_protos::pb; use enumflags2::make_bitflags; use pretty_assertions::assert_eq; @@ -603,7 +603,7 @@ fn test_build_user_pb_buf() -> anyhow::Result<()> { let p = user_info.to_pb()?; let mut buf = vec![]; - common_protos::prost::Message::encode(&p, &mut buf)?; + databend_common_protos::prost::Message::encode(&p, &mut buf)?; println!("user_info: {:?}", buf); } @@ -612,7 +612,7 @@ fn test_build_user_pb_buf() -> anyhow::Result<()> { let stage_file = test_stage_file(); let p = stage_file.to_pb()?; let mut buf = vec![]; - common_protos::prost::Message::encode(&p, &mut buf)?; + databend_common_protos::prost::Message::encode(&p, &mut buf)?; println!("stage_file: {:?}", buf); } @@ -623,7 +623,7 @@ fn test_build_user_pb_buf() -> anyhow::Result<()> { let p = fs_stage_info.to_pb()?; let mut buf = vec![]; - common_protos::prost::Message::encode(&p, &mut buf)?; + databend_common_protos::prost::Message::encode(&p, &mut buf)?; println!("fs_stage_info: {:?}", buf); } @@ -634,7 +634,7 @@ fn test_build_user_pb_buf() -> anyhow::Result<()> { let p = s3_stage_info.to_pb()?; let mut buf = vec![]; - common_protos::prost::Message::encode(&p, &mut buf)?; + databend_common_protos::prost::Message::encode(&p, &mut buf)?; println!("s3_stage_info: {:?}", buf); } @@ -645,7 +645,7 @@ fn test_build_user_pb_buf() -> anyhow::Result<()> { let p = s3_stage_info.to_pb()?; let mut buf = vec![]; - common_protos::prost::Message::encode(&p, &mut buf)?; + databend_common_protos::prost::Message::encode(&p, &mut buf)?; println!("s3_stage_info_v16: {:?}", buf); } @@ -656,7 +656,7 @@ fn test_build_user_pb_buf() -> anyhow::Result<()> { let p = s3_stage_info.to_pb()?; let mut buf = vec![]; - common_protos::prost::Message::encode(&p, &mut buf)?; + databend_common_protos::prost::Message::encode(&p, &mut buf)?; println!("s3_stage_info_v14: {:?}", buf); } @@ -665,7 +665,7 @@ fn test_build_user_pb_buf() -> anyhow::Result<()> { let gcs_stage_info = test_gcs_stage_info(); let p = gcs_stage_info.to_pb()?; let mut buf = vec![]; - common_protos::prost::Message::encode(&p, &mut buf)?; + databend_common_protos::prost::Message::encode(&p, &mut buf)?; println!("gcs_stage_info: {:?}", buf); } @@ -674,7 +674,7 @@ fn test_build_user_pb_buf() -> anyhow::Result<()> { let oss_stage_info = test_oss_stage_info(); let p = oss_stage_info.to_pb()?; let mut buf = vec![]; - common_protos::prost::Message::encode(&p, &mut buf)?; + databend_common_protos::prost::Message::encode(&p, &mut buf)?; println!("oss_stage_info: {:?}", buf); } @@ -696,7 +696,8 @@ fn test_load_old_user() -> anyhow::Result<()> { 160, 6, 4, 168, 6, 1, 160, 6, 4, 168, 6, 1, ]; let p: pb::UserInfo = - common_protos::prost::Message::decode(user_info_v4.as_slice()).map_err(print_err)?; + databend_common_protos::prost::Message::decode(user_info_v4.as_slice()) + .map_err(print_err)?; let got = mt::principal::UserInfo::from_pb(p).map_err(print_err)?; let want = test_user_info(); @@ -713,7 +714,8 @@ fn test_load_old_user() -> anyhow::Result<()> { 160, 6, 1, 160, 6, 1, ]; let p: pb::UserInfo = - common_protos::prost::Message::decode(user_info_v1.as_slice()).map_err(print_err)?; + databend_common_protos::prost::Message::decode(user_info_v1.as_slice()) + .map_err(print_err)?; let got = mt::principal::UserInfo::from_pb(p).map_err(print_err)?; assert_eq!(got.name, "test_user".to_string()); assert_eq!(got.option.default_role().clone(), None); @@ -729,7 +731,8 @@ fn test_load_old_user() -> anyhow::Result<()> { 160, 6, 3, 168, 6, 1, 160, 6, 3, 168, 6, 1, ]; let p: pb::UserInfo = - common_protos::prost::Message::decode(user_info_v3.as_slice()).map_err(print_err)?; + databend_common_protos::prost::Message::decode(user_info_v3.as_slice()) + .map_err(print_err)?; let got = mt::principal::UserInfo::from_pb(p).map_err(print_err)?; let want = test_user_info(); assert_eq!(want, got); @@ -746,7 +749,8 @@ fn test_load_old_user() -> anyhow::Result<()> { 160, 6, 3, 168, 6, 1, 160, 6, 3, 168, 6, 1, ]; let p: pb::UserInfo = - common_protos::prost::Message::decode(user_info_v3.as_slice()).map_err(print_err)?; + databend_common_protos::prost::Message::decode(user_info_v3.as_slice()) + .map_err(print_err)?; let got = mt::principal::UserInfo::from_pb(p).map_err(print_err)?; assert!(got.option.flags().is_empty()); } @@ -764,7 +768,8 @@ fn test_load_old_user() -> anyhow::Result<()> { ]; let p: pb::UserInfo = - common_protos::prost::Message::decode(user_info_v5.as_slice()).map_err(print_err)?; + databend_common_protos::prost::Message::decode(user_info_v5.as_slice()) + .map_err(print_err)?; let got = mt::principal::UserInfo::from_pb(p).map_err(print_err)?; let mut want = test_user_info(); want.option = want @@ -789,7 +794,8 @@ fn test_old_stage_file() -> anyhow::Result<()> { 168, 6, 1, 160, 6, 8, 168, 6, 1, ]; let p: pb::StageFile = - common_protos::prost::Message::decode(stage_file_v7.as_slice()).map_err(print_err)?; + databend_common_protos::prost::Message::decode(stage_file_v7.as_slice()) + .map_err(print_err)?; let got = mt::principal::StageFile::from_pb(p).map_err(print_err)?; let dt = NaiveDateTime::new( diff --git a/src/meta/proto-conv/tests/it/user_stage.rs b/src/meta/proto-conv/tests/it/user_stage.rs index fd57a3e9bf44..38cb95616773 100644 --- a/src/meta/proto-conv/tests/it/user_stage.rs +++ b/src/meta/proto-conv/tests/it/user_stage.rs @@ -14,7 +14,7 @@ //! Test StageInfo -use common_meta_app as mt; +use databend_common_meta_app as mt; use minitrace::func_name; use crate::common; diff --git a/src/meta/proto-conv/tests/it/v002_database_meta.rs b/src/meta/proto-conv/tests/it/v002_database_meta.rs index c79bd3f4f24c..bda415a2892d 100644 --- a/src/meta/proto-conv/tests/it/v002_database_meta.rs +++ b/src/meta/proto-conv/tests/it/v002_database_meta.rs @@ -16,7 +16,7 @@ use std::collections::BTreeSet; use chrono::TimeZone; use chrono::Utc; -use common_meta_app::schema as mt; +use databend_common_meta_app::schema as mt; use maplit::btreemap; use minitrace::func_name; diff --git a/src/meta/proto-conv/tests/it/v002_share_account_meta.rs b/src/meta/proto-conv/tests/it/v002_share_account_meta.rs index dfbe37521452..40711bbcdfd4 100644 --- a/src/meta/proto-conv/tests/it/v002_share_account_meta.rs +++ b/src/meta/proto-conv/tests/it/v002_share_account_meta.rs @@ -14,7 +14,7 @@ use chrono::TimeZone; use chrono::Utc; -use common_meta_app::share; +use databend_common_meta_app::share; use minitrace::func_name; use crate::common; diff --git a/src/meta/proto-conv/tests/it/v002_share_meta.rs b/src/meta/proto-conv/tests/it/v002_share_meta.rs index 9c0e96c7adb1..a96e142bf12a 100644 --- a/src/meta/proto-conv/tests/it/v002_share_meta.rs +++ b/src/meta/proto-conv/tests/it/v002_share_meta.rs @@ -17,7 +17,7 @@ use std::collections::BTreeSet; use chrono::TimeZone; use chrono::Utc; -use common_meta_app::share; +use databend_common_meta_app::share; use minitrace::func_name; use crate::common; diff --git a/src/meta/proto-conv/tests/it/v002_table_meta.rs b/src/meta/proto-conv/tests/it/v002_table_meta.rs index 9a5082b4b6d3..9c24ed3e6d71 100644 --- a/src/meta/proto-conv/tests/it/v002_table_meta.rs +++ b/src/meta/proto-conv/tests/it/v002_table_meta.rs @@ -17,9 +17,9 @@ use std::sync::Arc; use chrono::TimeZone; use chrono::Utc; -use common_expression as ce; -use common_expression::types::NumberDataType; -use common_meta_app::schema as mt; +use databend_common_expression as ce; +use databend_common_expression::types::NumberDataType; +use databend_common_meta_app::schema as mt; use maplit::btreemap; use minitrace::func_name; diff --git a/src/meta/proto-conv/tests/it/v005_database_meta.rs b/src/meta/proto-conv/tests/it/v005_database_meta.rs index fe85b7ca2c71..82f9c233348e 100644 --- a/src/meta/proto-conv/tests/it/v005_database_meta.rs +++ b/src/meta/proto-conv/tests/it/v005_database_meta.rs @@ -16,8 +16,8 @@ use std::collections::BTreeSet; use chrono::TimeZone; use chrono::Utc; -use common_meta_app::schema as mt; -use common_meta_app::share; +use databend_common_meta_app::schema as mt; +use databend_common_meta_app::share; use maplit::btreemap; use minitrace::func_name; diff --git a/src/meta/proto-conv/tests/it/v005_share_meta.rs b/src/meta/proto-conv/tests/it/v005_share_meta.rs index 5357e476cf72..8437c0df4536 100644 --- a/src/meta/proto-conv/tests/it/v005_share_meta.rs +++ b/src/meta/proto-conv/tests/it/v005_share_meta.rs @@ -17,7 +17,7 @@ use std::collections::BTreeSet; use chrono::TimeZone; use chrono::Utc; -use common_meta_app::share; +use databend_common_meta_app::share; use minitrace::func_name; use crate::common; diff --git a/src/meta/proto-conv/tests/it/v006_copied_file_info.rs b/src/meta/proto-conv/tests/it/v006_copied_file_info.rs index b9260bf89212..8192c5158ac4 100644 --- a/src/meta/proto-conv/tests/it/v006_copied_file_info.rs +++ b/src/meta/proto-conv/tests/it/v006_copied_file_info.rs @@ -14,7 +14,7 @@ use chrono::TimeZone; use chrono::Utc; -use common_meta_app::schema as mt; +use databend_common_meta_app::schema as mt; use minitrace::func_name; use crate::common; diff --git a/src/meta/proto-conv/tests/it/v010_table_meta.rs b/src/meta/proto-conv/tests/it/v010_table_meta.rs index 05be67d524ec..9e0a09f9cfad 100644 --- a/src/meta/proto-conv/tests/it/v010_table_meta.rs +++ b/src/meta/proto-conv/tests/it/v010_table_meta.rs @@ -17,9 +17,9 @@ use std::sync::Arc; use chrono::TimeZone; use chrono::Utc; -use common_expression as ce; -use common_expression::types::NumberDataType; -use common_meta_app::schema as mt; +use databend_common_expression as ce; +use databend_common_expression::types::NumberDataType; +use databend_common_meta_app::schema as mt; use maplit::btreemap; use minitrace::func_name; diff --git a/src/meta/proto-conv/tests/it/v012_table_meta.rs b/src/meta/proto-conv/tests/it/v012_table_meta.rs index fde170768f99..66612a34bf81 100644 --- a/src/meta/proto-conv/tests/it/v012_table_meta.rs +++ b/src/meta/proto-conv/tests/it/v012_table_meta.rs @@ -17,10 +17,10 @@ use std::sync::Arc; use chrono::TimeZone; use chrono::Utc; -use common_expression as ce; -use common_expression::types::NumberDataType; -use common_meta_app::schema as mt; -use common_meta_app::storage::StorageParams; +use databend_common_expression as ce; +use databend_common_expression::types::NumberDataType; +use databend_common_meta_app::schema as mt; +use databend_common_meta_app::storage::StorageParams; use maplit::btreemap; use minitrace::func_name; diff --git a/src/meta/proto-conv/tests/it/v023_table_meta.rs b/src/meta/proto-conv/tests/it/v023_table_meta.rs index 1f72709e34de..1f78689d93d4 100644 --- a/src/meta/proto-conv/tests/it/v023_table_meta.rs +++ b/src/meta/proto-conv/tests/it/v023_table_meta.rs @@ -17,10 +17,10 @@ use std::sync::Arc; use chrono::TimeZone; use chrono::Utc; -use common_expression as ex; -use common_expression::types::NumberDataType; -use common_meta_app::schema as mt; -use common_meta_app::storage::StorageParams; +use databend_common_expression as ex; +use databend_common_expression::types::NumberDataType; +use databend_common_meta_app::schema as mt; +use databend_common_meta_app::storage::StorageParams; use maplit::btreemap; use minitrace::func_name; diff --git a/src/meta/proto-conv/tests/it/v024_table_meta.rs b/src/meta/proto-conv/tests/it/v024_table_meta.rs index e588c691ec5a..7d8e13b8c5dd 100644 --- a/src/meta/proto-conv/tests/it/v024_table_meta.rs +++ b/src/meta/proto-conv/tests/it/v024_table_meta.rs @@ -17,10 +17,10 @@ use std::sync::Arc; use chrono::TimeZone; use chrono::Utc; -use common_expression as ex; -use common_expression::types::NumberDataType; -use common_meta_app::schema as mt; -use common_meta_app::storage::StorageParams; +use databend_common_expression as ex; +use databend_common_expression::types::NumberDataType; +use databend_common_meta_app::schema as mt; +use databend_common_meta_app::storage::StorageParams; use maplit::btreemap; use minitrace::func_name; diff --git a/src/meta/proto-conv/tests/it/v025_user_stage.rs b/src/meta/proto-conv/tests/it/v025_user_stage.rs index 9a751dd82dd6..e660c17e7dbc 100644 --- a/src/meta/proto-conv/tests/it/v025_user_stage.rs +++ b/src/meta/proto-conv/tests/it/v025_user_stage.rs @@ -14,10 +14,10 @@ use chrono::DateTime; use chrono::Utc; -use common_meta_app as mt; -use common_meta_app::principal::UserIdentity; -use common_meta_app::storage::StorageFsConfig; -use common_meta_app::storage::StorageParams; +use databend_common_meta_app as mt; +use databend_common_meta_app::principal::UserIdentity; +use databend_common_meta_app::storage::StorageFsConfig; +use databend_common_meta_app::storage::StorageParams; use minitrace::func_name; use crate::common; diff --git a/src/meta/proto-conv/tests/it/v026_schema.rs b/src/meta/proto-conv/tests/it/v026_schema.rs index 4abde835f3ba..6c3e3557f15a 100644 --- a/src/meta/proto-conv/tests/it/v026_schema.rs +++ b/src/meta/proto-conv/tests/it/v026_schema.rs @@ -12,10 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_expression::types::NumberDataType; -use common_expression::TableDataType; -use common_expression::TableField; -use common_expression::TableSchema; +use databend_common_expression::types::NumberDataType; +use databend_common_expression::TableDataType; +use databend_common_expression::TableField; +use databend_common_expression::TableSchema; use minitrace::func_name; use crate::common; diff --git a/src/meta/proto-conv/tests/it/v027_schema.rs b/src/meta/proto-conv/tests/it/v027_schema.rs index 41b2e06a5868..b98c994975ba 100644 --- a/src/meta/proto-conv/tests/it/v027_schema.rs +++ b/src/meta/proto-conv/tests/it/v027_schema.rs @@ -12,12 +12,12 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_expression::types::decimal::DecimalSize; -use common_expression::types::DecimalDataType; -use common_expression::types::NumberDataType; -use common_expression::TableDataType; -use common_expression::TableField; -use common_expression::TableSchema; +use databend_common_expression::types::decimal::DecimalSize; +use databend_common_expression::types::DecimalDataType; +use databend_common_expression::types::NumberDataType; +use databend_common_expression::TableDataType; +use databend_common_expression::TableField; +use databend_common_expression::TableSchema; use minitrace::func_name; use crate::common; diff --git a/src/meta/proto-conv/tests/it/v028_schema.rs b/src/meta/proto-conv/tests/it/v028_schema.rs index 0cf2d42ae472..5ff7e401cf03 100644 --- a/src/meta/proto-conv/tests/it/v028_schema.rs +++ b/src/meta/proto-conv/tests/it/v028_schema.rs @@ -12,12 +12,12 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_expression::types::decimal::DecimalSize; -use common_expression::types::DecimalDataType; -use common_expression::types::NumberDataType; -use common_expression::TableDataType; -use common_expression::TableField; -use common_expression::TableSchema; +use databend_common_expression::types::decimal::DecimalSize; +use databend_common_expression::types::DecimalDataType; +use databend_common_expression::types::NumberDataType; +use databend_common_expression::TableDataType; +use databend_common_expression::TableField; +use databend_common_expression::TableSchema; use minitrace::func_name; use crate::common; diff --git a/src/meta/proto-conv/tests/it/v029_schema.rs b/src/meta/proto-conv/tests/it/v029_schema.rs index 7295502ece21..593143dbad6a 100644 --- a/src/meta/proto-conv/tests/it/v029_schema.rs +++ b/src/meta/proto-conv/tests/it/v029_schema.rs @@ -12,12 +12,12 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_expression::types::decimal::DecimalSize; -use common_expression::types::DecimalDataType; -use common_expression::types::NumberDataType; -use common_expression::TableDataType; -use common_expression::TableField; -use common_expression::TableSchema; +use databend_common_expression::types::decimal::DecimalSize; +use databend_common_expression::types::DecimalDataType; +use databend_common_expression::types::NumberDataType; +use databend_common_expression::TableDataType; +use databend_common_expression::TableField; +use databend_common_expression::TableSchema; use minitrace::func_name; use crate::common; diff --git a/src/meta/proto-conv/tests/it/v030_user_stage.rs b/src/meta/proto-conv/tests/it/v030_user_stage.rs index e828200d8d90..6322bc8d00ec 100644 --- a/src/meta/proto-conv/tests/it/v030_user_stage.rs +++ b/src/meta/proto-conv/tests/it/v030_user_stage.rs @@ -12,9 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_meta_app as mt; -use common_meta_app::storage::StorageParams; -use common_meta_app::storage::StorageWebhdfsConfig; +use databend_common_meta_app as mt; +use databend_common_meta_app::storage::StorageParams; +use databend_common_meta_app::storage::StorageWebhdfsConfig; use minitrace::func_name; use crate::common; diff --git a/src/meta/proto-conv/tests/it/v031_copy_max_file.rs b/src/meta/proto-conv/tests/it/v031_copy_max_file.rs index 8a73c6fc330a..6d3f174e707a 100644 --- a/src/meta/proto-conv/tests/it/v031_copy_max_file.rs +++ b/src/meta/proto-conv/tests/it/v031_copy_max_file.rs @@ -12,9 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_meta_app as mt; -use common_meta_app::storage::StorageParams; -use common_meta_app::storage::StorageWebhdfsConfig; +use databend_common_meta_app as mt; +use databend_common_meta_app::storage::StorageParams; +use databend_common_meta_app::storage::StorageWebhdfsConfig; use minitrace::func_name; use crate::common; diff --git a/src/meta/proto-conv/tests/it/v032_file_format_params.rs b/src/meta/proto-conv/tests/it/v032_file_format_params.rs index 11ec6a49d390..62d53431d162 100644 --- a/src/meta/proto-conv/tests/it/v032_file_format_params.rs +++ b/src/meta/proto-conv/tests/it/v032_file_format_params.rs @@ -12,11 +12,11 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_meta_app as mt; -use common_meta_app::principal::CsvFileFormatParams; -use common_meta_app::principal::JsonNullAs; -use common_meta_app::principal::StageFileCompression; -use common_meta_app::principal::TsvFileFormatParams; +use databend_common_meta_app as mt; +use databend_common_meta_app::principal::CsvFileFormatParams; +use databend_common_meta_app::principal::JsonNullAs; +use databend_common_meta_app::principal::StageFileCompression; +use databend_common_meta_app::principal::TsvFileFormatParams; use minitrace::func_name; use crate::common; diff --git a/src/meta/proto-conv/tests/it/v033_table_meta.rs b/src/meta/proto-conv/tests/it/v033_table_meta.rs index 0129c05edeef..7e2593616938 100644 --- a/src/meta/proto-conv/tests/it/v033_table_meta.rs +++ b/src/meta/proto-conv/tests/it/v033_table_meta.rs @@ -16,9 +16,9 @@ use std::sync::Arc; use chrono::TimeZone; use chrono::Utc; -use common_expression as ce; -use common_expression::types::NumberDataType; -use common_meta_app::schema as mt; +use databend_common_expression as ce; +use databend_common_expression::types::NumberDataType; +use databend_common_meta_app::schema as mt; use maplit::btreemap; use maplit::btreeset; use minitrace::func_name; diff --git a/src/meta/proto-conv/tests/it/v034_schema.rs b/src/meta/proto-conv/tests/it/v034_schema.rs index c1890cc53607..688e25cd482b 100644 --- a/src/meta/proto-conv/tests/it/v034_schema.rs +++ b/src/meta/proto-conv/tests/it/v034_schema.rs @@ -1,88 +1,88 @@ -// Copyright 2023 Datafuse Labs. -// -// Licensed 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. - -use common_expression::types::decimal::DecimalSize; -use common_expression::types::DecimalDataType; -use common_expression::types::NumberDataType; -use common_expression::TableDataType; -use common_expression::TableField; -use common_expression::TableSchema; -use minitrace::func_name; - -use crate::common; - -// These bytes are built when a new version in introduced, -// and are kept for backward compatibility test. -// -// ************************************************************* -// * These messages should never be updated, * -// * only be added when a new version is added, * -// * or be removed when an old version is no longer supported. * -// ************************************************************* -// -// The message bytes are built from the output of `test_build_pb_buf()` -#[test] -fn test_decode_v34_schema() -> anyhow::Result<()> { - let schema_v34 = [ - 10, 28, 10, 1, 97, 26, 17, 154, 2, 8, 34, 0, 160, 6, 34, 168, 6, 24, 160, 6, 34, 168, 6, - 24, 160, 6, 34, 168, 6, 24, 10, 104, 10, 1, 98, 26, 91, 202, 2, 82, 10, 2, 98, 49, 10, 2, - 98, 50, 18, 47, 202, 2, 38, 10, 3, 98, 49, 49, 10, 3, 98, 49, 50, 18, 9, 138, 2, 0, 160, 6, - 34, 168, 6, 24, 18, 9, 146, 2, 0, 160, 6, 34, 168, 6, 24, 160, 6, 34, 168, 6, 24, 160, 6, - 34, 168, 6, 24, 18, 17, 154, 2, 8, 66, 0, 160, 6, 34, 168, 6, 24, 160, 6, 34, 168, 6, 24, - 160, 6, 34, 168, 6, 24, 160, 6, 34, 168, 6, 24, 32, 1, 160, 6, 34, 168, 6, 24, 10, 30, 10, - 1, 99, 26, 17, 154, 2, 8, 34, 0, 160, 6, 34, 168, 6, 24, 160, 6, 34, 168, 6, 24, 32, 4, - 160, 6, 34, 168, 6, 24, 10, 49, 10, 10, 100, 101, 99, 105, 109, 97, 108, 49, 50, 56, 26, - 27, 218, 2, 18, 10, 10, 8, 18, 16, 3, 160, 6, 34, 168, 6, 24, 160, 6, 34, 168, 6, 24, 160, - 6, 34, 168, 6, 24, 32, 5, 160, 6, 34, 168, 6, 24, 10, 49, 10, 10, 100, 101, 99, 105, 109, - 97, 108, 50, 53, 54, 26, 27, 218, 2, 18, 18, 10, 8, 46, 16, 6, 160, 6, 34, 168, 6, 24, 160, - 6, 34, 168, 6, 24, 160, 6, 34, 168, 6, 24, 32, 6, 160, 6, 34, 168, 6, 24, 10, 30, 10, 9, - 101, 109, 112, 116, 121, 95, 109, 97, 112, 26, 9, 226, 2, 0, 160, 6, 34, 168, 6, 24, 32, 7, - 160, 6, 34, 168, 6, 24, 10, 27, 10, 6, 98, 105, 116, 109, 97, 112, 26, 9, 234, 2, 0, 160, - 6, 34, 168, 6, 24, 32, 8, 160, 6, 34, 168, 6, 24, 24, 9, 160, 6, 34, 168, 6, 24, - ]; - - let b1 = TableDataType::Tuple { - fields_name: vec!["b11".to_string(), "b12".to_string()], - fields_type: vec![TableDataType::Boolean, TableDataType::String], - }; - let b = TableDataType::Tuple { - fields_name: vec!["b1".to_string(), "b2".to_string()], - fields_type: vec![b1, TableDataType::Number(NumberDataType::Int64)], - }; - let fields = vec![ - TableField::new("a", TableDataType::Number(NumberDataType::UInt64)), - TableField::new("b", b), - TableField::new("c", TableDataType::Number(NumberDataType::UInt64)), - TableField::new( - "decimal128", - TableDataType::Decimal(DecimalDataType::Decimal128(DecimalSize { - precision: 18, - scale: 3, - })), - ), - TableField::new( - "decimal256", - TableDataType::Decimal(DecimalDataType::Decimal256(DecimalSize { - precision: 46, - scale: 6, - })), - ), - TableField::new("empty_map", TableDataType::EmptyMap), - TableField::new("bitmap", TableDataType::Bitmap), - ]; - let want = || TableSchema::new(fields.clone()); - common::test_load_old(func_name!(), schema_v34.as_slice(), 34, want())?; - common::test_pb_from_to(func_name!(), want())?; - Ok(()) -} +// Copyright 2023 Datafuse Labs. +// +// Licensed 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. + +use databend_common_expression::types::decimal::DecimalSize; +use databend_common_expression::types::DecimalDataType; +use databend_common_expression::types::NumberDataType; +use databend_common_expression::TableDataType; +use databend_common_expression::TableField; +use databend_common_expression::TableSchema; +use minitrace::func_name; + +use crate::common; + +// These bytes are built when a new version in introduced, +// and are kept for backward compatibility test. +// +// ************************************************************* +// * These messages should never be updated, * +// * only be added when a new version is added, * +// * or be removed when an old version is no longer supported. * +// ************************************************************* +// +// The message bytes are built from the output of `test_build_pb_buf()` +#[test] +fn test_decode_v34_schema() -> anyhow::Result<()> { + let schema_v34 = [ + 10, 28, 10, 1, 97, 26, 17, 154, 2, 8, 34, 0, 160, 6, 34, 168, 6, 24, 160, 6, 34, 168, 6, + 24, 160, 6, 34, 168, 6, 24, 10, 104, 10, 1, 98, 26, 91, 202, 2, 82, 10, 2, 98, 49, 10, 2, + 98, 50, 18, 47, 202, 2, 38, 10, 3, 98, 49, 49, 10, 3, 98, 49, 50, 18, 9, 138, 2, 0, 160, 6, + 34, 168, 6, 24, 18, 9, 146, 2, 0, 160, 6, 34, 168, 6, 24, 160, 6, 34, 168, 6, 24, 160, 6, + 34, 168, 6, 24, 18, 17, 154, 2, 8, 66, 0, 160, 6, 34, 168, 6, 24, 160, 6, 34, 168, 6, 24, + 160, 6, 34, 168, 6, 24, 160, 6, 34, 168, 6, 24, 32, 1, 160, 6, 34, 168, 6, 24, 10, 30, 10, + 1, 99, 26, 17, 154, 2, 8, 34, 0, 160, 6, 34, 168, 6, 24, 160, 6, 34, 168, 6, 24, 32, 4, + 160, 6, 34, 168, 6, 24, 10, 49, 10, 10, 100, 101, 99, 105, 109, 97, 108, 49, 50, 56, 26, + 27, 218, 2, 18, 10, 10, 8, 18, 16, 3, 160, 6, 34, 168, 6, 24, 160, 6, 34, 168, 6, 24, 160, + 6, 34, 168, 6, 24, 32, 5, 160, 6, 34, 168, 6, 24, 10, 49, 10, 10, 100, 101, 99, 105, 109, + 97, 108, 50, 53, 54, 26, 27, 218, 2, 18, 18, 10, 8, 46, 16, 6, 160, 6, 34, 168, 6, 24, 160, + 6, 34, 168, 6, 24, 160, 6, 34, 168, 6, 24, 32, 6, 160, 6, 34, 168, 6, 24, 10, 30, 10, 9, + 101, 109, 112, 116, 121, 95, 109, 97, 112, 26, 9, 226, 2, 0, 160, 6, 34, 168, 6, 24, 32, 7, + 160, 6, 34, 168, 6, 24, 10, 27, 10, 6, 98, 105, 116, 109, 97, 112, 26, 9, 234, 2, 0, 160, + 6, 34, 168, 6, 24, 32, 8, 160, 6, 34, 168, 6, 24, 24, 9, 160, 6, 34, 168, 6, 24, + ]; + + let b1 = TableDataType::Tuple { + fields_name: vec!["b11".to_string(), "b12".to_string()], + fields_type: vec![TableDataType::Boolean, TableDataType::String], + }; + let b = TableDataType::Tuple { + fields_name: vec!["b1".to_string(), "b2".to_string()], + fields_type: vec![b1, TableDataType::Number(NumberDataType::Int64)], + }; + let fields = vec![ + TableField::new("a", TableDataType::Number(NumberDataType::UInt64)), + TableField::new("b", b), + TableField::new("c", TableDataType::Number(NumberDataType::UInt64)), + TableField::new( + "decimal128", + TableDataType::Decimal(DecimalDataType::Decimal128(DecimalSize { + precision: 18, + scale: 3, + })), + ), + TableField::new( + "decimal256", + TableDataType::Decimal(DecimalDataType::Decimal256(DecimalSize { + precision: 46, + scale: 6, + })), + ), + TableField::new("empty_map", TableDataType::EmptyMap), + TableField::new("bitmap", TableDataType::Bitmap), + ]; + let want = || TableSchema::new(fields.clone()); + common::test_load_old(func_name!(), schema_v34.as_slice(), 34, want())?; + common::test_pb_from_to(func_name!(), want())?; + Ok(()) +} diff --git a/src/meta/proto-conv/tests/it/v035_user_stage.rs b/src/meta/proto-conv/tests/it/v035_user_stage.rs index daddf737a9e2..1fc5ac75cf9e 100644 --- a/src/meta/proto-conv/tests/it/v035_user_stage.rs +++ b/src/meta/proto-conv/tests/it/v035_user_stage.rs @@ -14,10 +14,10 @@ use chrono::DateTime; use chrono::Utc; -use common_meta_app as mt; -use common_meta_app::principal::UserIdentity; -use common_meta_app::storage::StorageFsConfig; -use common_meta_app::storage::StorageParams; +use databend_common_meta_app as mt; +use databend_common_meta_app::principal::UserIdentity; +use databend_common_meta_app::storage::StorageFsConfig; +use databend_common_meta_app::storage::StorageParams; use minitrace::func_name; use crate::common; diff --git a/src/meta/proto-conv/tests/it/v037_index_meta.rs b/src/meta/proto-conv/tests/it/v037_index_meta.rs index 089cf3cb4028..c98030bc8e2d 100644 --- a/src/meta/proto-conv/tests/it/v037_index_meta.rs +++ b/src/meta/proto-conv/tests/it/v037_index_meta.rs @@ -14,8 +14,8 @@ use chrono::TimeZone; use chrono::Utc; -use common_meta_app::schema::IndexMeta; -use common_meta_app::schema::IndexType; +use databend_common_meta_app::schema::IndexMeta; +use databend_common_meta_app::schema::IndexType; use minitrace::func_name; use crate::common; diff --git a/src/meta/proto-conv/tests/it/v038_empty_proto.rs b/src/meta/proto-conv/tests/it/v038_empty_proto.rs index 2db6440f1a69..e6d0c32802e8 100644 --- a/src/meta/proto-conv/tests/it/v038_empty_proto.rs +++ b/src/meta/proto-conv/tests/it/v038_empty_proto.rs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_meta_app::schema as mt; +use databend_common_meta_app::schema as mt; use minitrace::func_name; use crate::common; diff --git a/src/meta/proto-conv/tests/it/v039_data_mask.rs b/src/meta/proto-conv/tests/it/v039_data_mask.rs index e6b4213a2651..d311ff319724 100644 --- a/src/meta/proto-conv/tests/it/v039_data_mask.rs +++ b/src/meta/proto-conv/tests/it/v039_data_mask.rs @@ -41,7 +41,7 @@ fn test_decode_v39_data_mask() -> anyhow::Result<()> { 84, 67, 160, 6, 39, 168, 6, 24, ]; - let want = || common_meta_app::data_mask::DatamaskMeta { + let want = || databend_common_meta_app::data_mask::DatamaskMeta { args: vec![("a".to_string(), "String".to_string())], return_type: "String".to_string(), body: "CASE WHEN current_role() IN('ANALYST') THEN VAL ELSE '*********' END".to_string(), diff --git a/src/meta/proto-conv/tests/it/v040_table_meta.rs b/src/meta/proto-conv/tests/it/v040_table_meta.rs index 05a815fc6b0d..95191bf4608c 100644 --- a/src/meta/proto-conv/tests/it/v040_table_meta.rs +++ b/src/meta/proto-conv/tests/it/v040_table_meta.rs @@ -16,9 +16,9 @@ use std::sync::Arc; use chrono::TimeZone; use chrono::Utc; -use common_expression as ce; -use common_expression::types::NumberDataType; -use common_meta_app::schema as mt; +use databend_common_expression as ce; +use databend_common_expression::types::NumberDataType; +use databend_common_meta_app::schema as mt; use maplit::btreemap; use maplit::btreeset; use minitrace::func_name; diff --git a/src/meta/proto-conv/tests/it/v041_virtual_column.rs b/src/meta/proto-conv/tests/it/v041_virtual_column.rs index cc56548d8623..174133133269 100644 --- a/src/meta/proto-conv/tests/it/v041_virtual_column.rs +++ b/src/meta/proto-conv/tests/it/v041_virtual_column.rs @@ -14,7 +14,7 @@ use chrono::TimeZone; use chrono::Utc; -use common_meta_app::schema::VirtualColumnMeta; +use databend_common_meta_app::schema::VirtualColumnMeta; use minitrace::func_name; use crate::common; diff --git a/src/meta/proto-conv/tests/it/v042_s3_stage_new_field.rs b/src/meta/proto-conv/tests/it/v042_s3_stage_new_field.rs index fa6087dd24cf..98d7a4f4fab1 100644 --- a/src/meta/proto-conv/tests/it/v042_s3_stage_new_field.rs +++ b/src/meta/proto-conv/tests/it/v042_s3_stage_new_field.rs @@ -14,9 +14,9 @@ use chrono::DateTime; use chrono::Utc; -use common_meta_app as mt; -use common_meta_app::principal::UserIdentity; -use common_meta_app::storage::StorageParams; +use databend_common_meta_app as mt; +use databend_common_meta_app::principal::UserIdentity; +use databend_common_meta_app::storage::StorageParams; use minitrace::func_name; use mt::storage::StorageS3Config; diff --git a/src/meta/proto-conv/tests/it/v043_table_statistics.rs b/src/meta/proto-conv/tests/it/v043_table_statistics.rs index 5bf613c9266f..133c4237d7af 100644 --- a/src/meta/proto-conv/tests/it/v043_table_statistics.rs +++ b/src/meta/proto-conv/tests/it/v043_table_statistics.rs @@ -31,7 +31,7 @@ fn test_decode_v43_table_statistics() -> anyhow::Result<()> { let bytes_table_statistics_v43 = [ 8, 100, 16, 200, 1, 24, 15, 32, 20, 40, 1, 48, 2, 160, 6, 43, 168, 6, 24, ]; - let want = || common_meta_app::schema::TableStatistics { + let want = || databend_common_meta_app::schema::TableStatistics { number_of_rows: 100, data_bytes: 200, compressed_data_bytes: 15, diff --git a/src/meta/proto-conv/tests/it/v044_table_meta.rs b/src/meta/proto-conv/tests/it/v044_table_meta.rs index aae725cd83c0..7b13f5751611 100644 --- a/src/meta/proto-conv/tests/it/v044_table_meta.rs +++ b/src/meta/proto-conv/tests/it/v044_table_meta.rs @@ -16,10 +16,10 @@ use std::sync::Arc; use chrono::TimeZone; use chrono::Utc; -use common_expression as ce; -use common_expression::types::NumberDataType; -use common_expression::ComputedExpr; -use common_meta_app::schema as mt; +use databend_common_expression as ce; +use databend_common_expression::types::NumberDataType; +use databend_common_expression::ComputedExpr; +use databend_common_meta_app::schema as mt; use maplit::btreemap; use maplit::btreeset; use minitrace::func_name; diff --git a/src/meta/proto-conv/tests/it/v045_background.rs b/src/meta/proto-conv/tests/it/v045_background.rs index b315ac0ef44a..b251fc3fe588 100644 --- a/src/meta/proto-conv/tests/it/v045_background.rs +++ b/src/meta/proto-conv/tests/it/v045_background.rs @@ -16,16 +16,16 @@ use std::time::Duration; use chrono::TimeZone; use chrono::Utc; -use common_meta_app::background::BackgroundJobIdent; -use common_meta_app::background::BackgroundJobParams; -use common_meta_app::background::BackgroundJobState; -use common_meta_app::background::BackgroundJobStatus; -use common_meta_app::background::BackgroundJobType; -use common_meta_app::background::BackgroundTaskState; -use common_meta_app::background::BackgroundTaskType; -use common_meta_app::background::CompactionStats; -use common_meta_app::background::VacuumStats; -use common_meta_app::schema::TableStatistics; +use databend_common_meta_app::background::BackgroundJobIdent; +use databend_common_meta_app::background::BackgroundJobParams; +use databend_common_meta_app::background::BackgroundJobState; +use databend_common_meta_app::background::BackgroundJobStatus; +use databend_common_meta_app::background::BackgroundJobType; +use databend_common_meta_app::background::BackgroundTaskState; +use databend_common_meta_app::background::BackgroundTaskType; +use databend_common_meta_app::background::CompactionStats; +use databend_common_meta_app::background::VacuumStats; +use databend_common_meta_app::schema::TableStatistics; use minitrace::func_name; use crate::common; @@ -48,7 +48,7 @@ fn test_decode_v44_background_task() -> anyhow::Result<()> { 32, 48, 48, 58, 48, 48, 58, 48, 48, 32, 85, 84, 67, 160, 6, 45, 168, 6, 24, ]; - let want = || common_meta_app::background::BackgroundTaskInfo { + let want = || databend_common_meta_app::background::BackgroundTaskInfo { last_updated: Some(Utc.with_ymd_and_hms(2014, 11, 28, 12, 0, 9).unwrap()), task_type: BackgroundTaskType::COMPACTION, task_state: BackgroundTaskState::DONE, @@ -79,7 +79,7 @@ fn test_decode_v40_background_task_case_2() -> anyhow::Result<()> { 85, 84, 67, 160, 6, 45, 168, 6, 24, ]; - let want = || common_meta_app::background::BackgroundTaskInfo { + let want = || databend_common_meta_app::background::BackgroundTaskInfo { last_updated: Some(Utc.with_ymd_and_hms(2014, 11, 28, 12, 0, 9).unwrap()), task_type: BackgroundTaskType::VACUUM, task_state: BackgroundTaskState::STARTED, @@ -130,7 +130,7 @@ fn test_decode_v44_background_job() -> anyhow::Result<()> { 32, 48, 48, 58, 48, 48, 58, 48, 48, 32, 85, 84, 67, 160, 6, 45, 168, 6, 24, ]; - let want = || common_meta_app::background::BackgroundJobInfo { + let want = || databend_common_meta_app::background::BackgroundJobInfo { job_params: Some(BackgroundJobParams { job_type: BackgroundJobType::INTERVAL, scheduled_job_interval: std::time::Duration::from_secs(100), diff --git a/src/meta/proto-conv/tests/it/v046_index_meta.rs b/src/meta/proto-conv/tests/it/v046_index_meta.rs index 6f494e535a24..0249f695db1b 100644 --- a/src/meta/proto-conv/tests/it/v046_index_meta.rs +++ b/src/meta/proto-conv/tests/it/v046_index_meta.rs @@ -14,8 +14,8 @@ use chrono::TimeZone; use chrono::Utc; -use common_meta_app::schema::IndexMeta; -use common_meta_app::schema::IndexType; +use databend_common_meta_app::schema::IndexMeta; +use databend_common_meta_app::schema::IndexType; use minitrace::func_name; use crate::common; diff --git a/src/meta/proto-conv/tests/it/v047_catalog_meta.rs b/src/meta/proto-conv/tests/it/v047_catalog_meta.rs index f891c60cbb01..1395c3b31b7a 100644 --- a/src/meta/proto-conv/tests/it/v047_catalog_meta.rs +++ b/src/meta/proto-conv/tests/it/v047_catalog_meta.rs @@ -14,9 +14,9 @@ use chrono::TimeZone; use chrono::Utc; -use common_meta_app::schema::CatalogOption; -use common_meta_app::schema::IcebergCatalogOption; -use common_meta_app::storage::StorageS3Config; +use databend_common_meta_app::schema::CatalogOption; +use databend_common_meta_app::schema::IcebergCatalogOption; +use databend_common_meta_app::storage::StorageS3Config; use minitrace::func_name; use crate::common; @@ -43,9 +43,9 @@ fn test_decode_v47_catalog() -> anyhow::Result<()> { 49, 50, 58, 48, 48, 58, 48, 57, 32, 85, 84, 67, 160, 6, 47, 168, 6, 24, ]; - let want = || common_meta_app::schema::CatalogMeta { + let want = || databend_common_meta_app::schema::CatalogMeta { catalog_option: CatalogOption::Iceberg(IcebergCatalogOption { - storage_params: Box::new(common_meta_app::storage::StorageParams::S3( + storage_params: Box::new(databend_common_meta_app::storage::StorageParams::S3( StorageS3Config { endpoint_url: "http://127.0.0.1:9900".to_string(), region: "hello".to_string(), diff --git a/src/meta/proto-conv/tests/it/v048_background.rs b/src/meta/proto-conv/tests/it/v048_background.rs index c052a6f2cde7..2bafb122f06f 100644 --- a/src/meta/proto-conv/tests/it/v048_background.rs +++ b/src/meta/proto-conv/tests/it/v048_background.rs @@ -16,17 +16,17 @@ use std::time::Duration; use chrono::TimeZone; use chrono::Utc; -use common_meta_app::background::BackgroundJobIdent; -use common_meta_app::background::BackgroundJobParams; -use common_meta_app::background::BackgroundJobState; -use common_meta_app::background::BackgroundJobStatus; -use common_meta_app::background::BackgroundJobType; -use common_meta_app::background::BackgroundTaskState; -use common_meta_app::background::BackgroundTaskType; -use common_meta_app::background::CompactionStats; -use common_meta_app::background::ManualTriggerParams; -use common_meta_app::background::VacuumStats; -use common_meta_app::schema::TableStatistics; +use databend_common_meta_app::background::BackgroundJobIdent; +use databend_common_meta_app::background::BackgroundJobParams; +use databend_common_meta_app::background::BackgroundJobState; +use databend_common_meta_app::background::BackgroundJobStatus; +use databend_common_meta_app::background::BackgroundJobType; +use databend_common_meta_app::background::BackgroundTaskState; +use databend_common_meta_app::background::BackgroundTaskType; +use databend_common_meta_app::background::CompactionStats; +use databend_common_meta_app::background::ManualTriggerParams; +use databend_common_meta_app::background::VacuumStats; +use databend_common_meta_app::schema::TableStatistics; use minitrace::func_name; use crate::common; @@ -57,7 +57,7 @@ fn test_decode_v48_background_task_case_2() -> anyhow::Result<()> { 85, 84, 67, 160, 6, 48, 168, 6, 24, ]; - let want = || common_meta_app::background::BackgroundTaskInfo { + let want = || databend_common_meta_app::background::BackgroundTaskInfo { last_updated: Some(Utc.with_ymd_and_hms(2014, 11, 28, 12, 0, 9).unwrap()), task_type: BackgroundTaskType::VACUUM, task_state: BackgroundTaskState::STARTED, @@ -115,7 +115,7 @@ fn test_decode_v48_background_job() -> anyhow::Result<()> { 32, 48, 48, 58, 48, 48, 58, 48, 48, 32, 85, 84, 67, 160, 6, 48, 168, 6, 24, ]; - let want = || common_meta_app::background::BackgroundJobInfo { + let want = || databend_common_meta_app::background::BackgroundJobInfo { job_params: Some(BackgroundJobParams { job_type: BackgroundJobType::INTERVAL, scheduled_job_interval: std::time::Duration::from_secs(100), diff --git a/src/meta/proto-conv/tests/it/v049_network_policy.rs b/src/meta/proto-conv/tests/it/v049_network_policy.rs index fb5ef87af5f4..b3cd6c122641 100644 --- a/src/meta/proto-conv/tests/it/v049_network_policy.rs +++ b/src/meta/proto-conv/tests/it/v049_network_policy.rs @@ -39,7 +39,7 @@ fn test_decode_v49_network_policy() -> anyhow::Result<()> { 49, 168, 6, 24, ]; - let want = || common_meta_app::principal::NetworkPolicy { + let want = || databend_common_meta_app::principal::NetworkPolicy { name: "testpolicy1".to_string(), allowed_ip_list: vec!["192.168.1.0/24".to_string()], blocked_ip_list: vec!["192.168.1.10".to_string()], diff --git a/src/meta/proto-conv/tests/it/v050_user_info.rs b/src/meta/proto-conv/tests/it/v050_user_info.rs index d99d90373fee..d620b6f6fd10 100644 --- a/src/meta/proto-conv/tests/it/v050_user_info.rs +++ b/src/meta/proto-conv/tests/it/v050_user_info.rs @@ -14,7 +14,7 @@ use std::collections::HashSet; -use common_meta_app::principal::UserPrivilegeType; +use databend_common_meta_app::principal::UserPrivilegeType; use enumflags2::make_bitflags; use minitrace::func_name; @@ -41,30 +41,30 @@ fn test_decode_v50_user_info() -> anyhow::Result<()> { 6, 49, 168, 6, 24, 160, 6, 50, 168, 6, 24, ]; - let want = || common_meta_app::principal::UserInfo { + let want = || databend_common_meta_app::principal::UserInfo { name: "test_user".to_string(), hostname: "%".to_string(), - auth_info: common_meta_app::principal::AuthInfo::Password { + auth_info: databend_common_meta_app::principal::AuthInfo::Password { hash_value: [ 116, 101, 115, 116, 95, 112, 97, 115, 115, 119, 111, 114, 100, ] .to_vec(), - hash_method: common_meta_app::principal::PasswordHashMethod::DoubleSha1, + hash_method: databend_common_meta_app::principal::PasswordHashMethod::DoubleSha1, }, - grants: common_meta_app::principal::UserGrantSet::new( - vec![common_meta_app::principal::GrantEntry::new( - common_meta_app::principal::GrantObject::Global, + grants: databend_common_meta_app::principal::UserGrantSet::new( + vec![databend_common_meta_app::principal::GrantEntry::new( + databend_common_meta_app::principal::GrantObject::Global, make_bitflags!(UserPrivilegeType::{Create}), )], HashSet::new(), ), - quota: common_meta_app::principal::UserQuota { + quota: databend_common_meta_app::principal::UserQuota { max_cpu: 10, max_memory_in_bytes: 10240, max_storage_in_bytes: 20480, }, - option: common_meta_app::principal::UserOption::default() - .with_set_flag(common_meta_app::principal::UserOptionFlag::TenantSetting) + option: databend_common_meta_app::principal::UserOption::default() + .with_set_flag(databend_common_meta_app::principal::UserOptionFlag::TenantSetting) .with_default_role(Some("role1".into())) .with_network_policy(Some("mypolicy".to_string())), }; diff --git a/src/meta/proto-conv/tests/it/v051_obs_and_cos_storage.rs b/src/meta/proto-conv/tests/it/v051_obs_and_cos_storage.rs index cf28b31e5bf7..b77efd7d3490 100644 --- a/src/meta/proto-conv/tests/it/v051_obs_and_cos_storage.rs +++ b/src/meta/proto-conv/tests/it/v051_obs_and_cos_storage.rs @@ -12,10 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_meta_app as mt; -use common_meta_app::storage::StorageCosConfig; -use common_meta_app::storage::StorageObsConfig; -use common_meta_app::storage::StorageParams; +use databend_common_meta_app as mt; +use databend_common_meta_app::storage::StorageCosConfig; +use databend_common_meta_app::storage::StorageObsConfig; +use databend_common_meta_app::storage::StorageParams; use minitrace::func_name; use crate::common; diff --git a/src/meta/proto-conv/tests/it/v052_hive_catalog_config.rs b/src/meta/proto-conv/tests/it/v052_hive_catalog_config.rs index 143f2a2c7e0c..112f22355e9b 100644 --- a/src/meta/proto-conv/tests/it/v052_hive_catalog_config.rs +++ b/src/meta/proto-conv/tests/it/v052_hive_catalog_config.rs @@ -14,9 +14,9 @@ use chrono::TimeZone; use chrono::Utc; -use common_meta_app::schema::CatalogOption; -use common_meta_app::schema::HiveCatalogOption; -use common_meta_app::storage::StorageS3Config; +use databend_common_meta_app::schema::CatalogOption; +use databend_common_meta_app::schema::HiveCatalogOption; +use databend_common_meta_app::storage::StorageS3Config; use minitrace::func_name; use crate::common; @@ -44,19 +44,19 @@ fn test_decode_v52_hive_catalog() -> anyhow::Result<()> { 58, 48, 57, 32, 85, 84, 67, 160, 6, 52, 168, 6, 24, ]; - let want = || common_meta_app::schema::CatalogMeta { + let want = || databend_common_meta_app::schema::CatalogMeta { catalog_option: CatalogOption::Hive(HiveCatalogOption { address: "127.0.0.1:10000".to_string(), - storage_params: Some(Box::new(common_meta_app::storage::StorageParams::S3( - StorageS3Config { + storage_params: Some(Box::new( + databend_common_meta_app::storage::StorageParams::S3(StorageS3Config { endpoint_url: "http://127.0.0.1:9900".to_string(), region: "hello".to_string(), bucket: "world".to_string(), access_key_id: "databend_has_super_power".to_string(), secret_access_key: "databend_has_super_power".to_string(), ..Default::default() - }, - ))), + }), + )), }), created_on: Utc.with_ymd_and_hms(2014, 11, 28, 12, 0, 9).unwrap(), }; diff --git a/src/meta/proto-conv/tests/it/v053_csv_format_params.rs b/src/meta/proto-conv/tests/it/v053_csv_format_params.rs index a1a75e9b84d1..e9d6872bf572 100644 --- a/src/meta/proto-conv/tests/it/v053_csv_format_params.rs +++ b/src/meta/proto-conv/tests/it/v053_csv_format_params.rs @@ -12,9 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_meta_app as mt; -use common_meta_app::principal::CsvFileFormatParams; -use common_meta_app::principal::StageFileCompression; +use databend_common_meta_app as mt; +use databend_common_meta_app::principal::CsvFileFormatParams; +use databend_common_meta_app::principal::StageFileCompression; use minitrace::func_name; use crate::common; diff --git a/src/meta/proto-conv/tests/it/v054_index_meta.rs b/src/meta/proto-conv/tests/it/v054_index_meta.rs index 30622a4b1979..dcb7bbc70f45 100644 --- a/src/meta/proto-conv/tests/it/v054_index_meta.rs +++ b/src/meta/proto-conv/tests/it/v054_index_meta.rs @@ -14,8 +14,8 @@ use chrono::TimeZone; use chrono::Utc; -use common_meta_app::schema::IndexMeta; -use common_meta_app::schema::IndexType; +use databend_common_meta_app::schema::IndexMeta; +use databend_common_meta_app::schema::IndexType; use minitrace::func_name; use crate::common; diff --git a/src/meta/proto-conv/tests/it/v055_table_meta.rs b/src/meta/proto-conv/tests/it/v055_table_meta.rs index 11db2868d3b7..a3d8746f57ca 100644 --- a/src/meta/proto-conv/tests/it/v055_table_meta.rs +++ b/src/meta/proto-conv/tests/it/v055_table_meta.rs @@ -13,12 +13,12 @@ use std::sync::Arc; use chrono::TimeZone; use chrono::Utc; -use common_expression as ce; -use common_expression::types::NumberDataType; -use common_expression::ComputedExpr; -use common_meta_app::schema as mt; -use common_meta_app::schema::Ownership; -use common_meta_app::share; +use databend_common_expression as ce; +use databend_common_expression::types::NumberDataType; +use databend_common_expression::ComputedExpr; +use databend_common_meta_app::schema as mt; +use databend_common_meta_app::schema::Ownership; +use databend_common_meta_app::share; use maplit::btreemap; use maplit::btreeset; use minitrace::func_name; diff --git a/src/meta/proto-conv/tests/it/v057_hdfs_storage.rs b/src/meta/proto-conv/tests/it/v057_hdfs_storage.rs index 27cef4f6c12b..d1e5f4494ec2 100644 --- a/src/meta/proto-conv/tests/it/v057_hdfs_storage.rs +++ b/src/meta/proto-conv/tests/it/v057_hdfs_storage.rs @@ -12,9 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_meta_app as mt; -use common_meta_app::storage::StorageHdfsConfig; -use common_meta_app::storage::StorageParams; +use databend_common_meta_app as mt; +use databend_common_meta_app::storage::StorageHdfsConfig; +use databend_common_meta_app::storage::StorageParams; use minitrace::func_name; use crate::common; diff --git a/src/meta/proto-conv/tests/it/v058_udf.rs b/src/meta/proto-conv/tests/it/v058_udf.rs index 9c4acd421350..9279156a3ff3 100644 --- a/src/meta/proto-conv/tests/it/v058_udf.rs +++ b/src/meta/proto-conv/tests/it/v058_udf.rs @@ -12,11 +12,11 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_expression::types::DataType; -use common_expression::types::NumberDataType; -use common_meta_app::principal::UDFDefinition; -use common_meta_app::principal::UDFServer; -use common_meta_app::principal::UserDefinedFunction; +use databend_common_expression::types::DataType; +use databend_common_expression::types::NumberDataType; +use databend_common_meta_app::principal::UDFDefinition; +use databend_common_meta_app::principal::UDFServer; +use databend_common_meta_app::principal::UserDefinedFunction; use minitrace::func_name; use crate::common; diff --git a/src/meta/proto-conv/tests/it/v059_csv_format_params.rs b/src/meta/proto-conv/tests/it/v059_csv_format_params.rs index 1f7ba691db13..7de90b932b79 100644 --- a/src/meta/proto-conv/tests/it/v059_csv_format_params.rs +++ b/src/meta/proto-conv/tests/it/v059_csv_format_params.rs @@ -12,9 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_meta_app as mt; -use common_meta_app::principal::CsvFileFormatParams; -use common_meta_app::principal::StageFileCompression; +use databend_common_meta_app as mt; +use databend_common_meta_app::principal::CsvFileFormatParams; +use databend_common_meta_app::principal::StageFileCompression; use minitrace::func_name; use crate::common; diff --git a/src/meta/proto-conv/tests/it/v060_copy_options.rs b/src/meta/proto-conv/tests/it/v060_copy_options.rs index 04099526d5ea..f2fa0e1ba359 100644 --- a/src/meta/proto-conv/tests/it/v060_copy_options.rs +++ b/src/meta/proto-conv/tests/it/v060_copy_options.rs @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_meta_app::principal::CopyOptions; -use common_meta_app::principal::OnErrorMode; +use databend_common_meta_app::principal::CopyOptions; +use databend_common_meta_app::principal::OnErrorMode; use minitrace::func_name; use crate::common; diff --git a/src/meta/proto-conv/tests/it/v061_oss_sse_options.rs b/src/meta/proto-conv/tests/it/v061_oss_sse_options.rs index 7dbc128fb719..89470dd1cd10 100644 --- a/src/meta/proto-conv/tests/it/v061_oss_sse_options.rs +++ b/src/meta/proto-conv/tests/it/v061_oss_sse_options.rs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_meta_app::storage::StorageOssConfig; +use databend_common_meta_app::storage::StorageOssConfig; use minitrace::func_name; use crate::common; diff --git a/src/meta/proto-conv/tests/it/v062_table_lock_meta.rs b/src/meta/proto-conv/tests/it/v062_table_lock_meta.rs index 9bec7c3916c2..fd116efd2f70 100644 --- a/src/meta/proto-conv/tests/it/v062_table_lock_meta.rs +++ b/src/meta/proto-conv/tests/it/v062_table_lock_meta.rs @@ -16,8 +16,8 @@ use std::collections::BTreeMap; use chrono::TimeZone; use chrono::Utc; -use common_meta_app::schema::LockMeta; -use common_meta_app::schema::LockType; +use databend_common_meta_app::schema::LockMeta; +use databend_common_meta_app::schema::LockType; use minitrace::func_name; use crate::common; diff --git a/src/meta/proto-conv/tests/it/v063_connection.rs b/src/meta/proto-conv/tests/it/v063_connection.rs index 0d14cf611cad..038b581014a3 100644 --- a/src/meta/proto-conv/tests/it/v063_connection.rs +++ b/src/meta/proto-conv/tests/it/v063_connection.rs @@ -14,7 +14,7 @@ use std::collections::BTreeMap; -use common_meta_app::principal::UserDefinedConnection; +use databend_common_meta_app::principal::UserDefinedConnection; use minitrace::func_name; use crate::common; diff --git a/src/meta/proto-conv/tests/it/v064_ndjson_format_params.rs b/src/meta/proto-conv/tests/it/v064_ndjson_format_params.rs index 755b73d8956e..385c7dca2fc8 100644 --- a/src/meta/proto-conv/tests/it/v064_ndjson_format_params.rs +++ b/src/meta/proto-conv/tests/it/v064_ndjson_format_params.rs @@ -12,10 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_meta_app as mt; -use common_meta_app::principal::JsonNullAs; -use common_meta_app::principal::NdJsonFileFormatParams; -use common_meta_app::principal::StageFileCompression; +use databend_common_meta_app as mt; +use databend_common_meta_app::principal::JsonNullAs; +use databend_common_meta_app::principal::NdJsonFileFormatParams; +use databend_common_meta_app::principal::StageFileCompression; use minitrace::func_name; use crate::common; diff --git a/src/meta/proto-conv/tests/it/v065_least_visible_time.rs b/src/meta/proto-conv/tests/it/v065_least_visible_time.rs index 18e0869b0961..f9c4f3a2e258 100644 --- a/src/meta/proto-conv/tests/it/v065_least_visible_time.rs +++ b/src/meta/proto-conv/tests/it/v065_least_visible_time.rs @@ -10,7 +10,7 @@ use chrono::DateTime; use chrono::Utc; -use common_meta_app::schema as mt; +use databend_common_meta_app::schema as mt; use minitrace::func_name; use crate::common; diff --git a/src/meta/proto-conv/tests/it/v066_stage_create_on.rs b/src/meta/proto-conv/tests/it/v066_stage_create_on.rs index d7f3d4b4dcb9..287859799c83 100644 --- a/src/meta/proto-conv/tests/it/v066_stage_create_on.rs +++ b/src/meta/proto-conv/tests/it/v066_stage_create_on.rs @@ -14,10 +14,10 @@ use chrono::DateTime; use chrono::Utc; -use common_meta_app as mt; -use common_meta_app::principal::UserIdentity; -use common_meta_app::storage::StorageParams; -use common_meta_app::storage::StorageS3Config; +use databend_common_meta_app as mt; +use databend_common_meta_app::principal::UserIdentity; +use databend_common_meta_app::storage::StorageParams; +use databend_common_meta_app::storage::StorageS3Config; use minitrace::func_name; use crate::common; diff --git a/src/meta/protos/Cargo.toml b/src/meta/protos/Cargo.toml index bf8ee357364a..ad983e55d7f3 100644 --- a/src/meta/protos/Cargo.toml +++ b/src/meta/protos/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "common-protos" +name = "databend-common-protos" version = { workspace = true } authors = { workspace = true } license = { workspace = true } diff --git a/src/meta/raft-store/Cargo.toml b/src/meta/raft-store/Cargo.toml index 507a2b0ff6b2..4c5e23a09bb1 100644 --- a/src/meta/raft-store/Cargo.toml +++ b/src/meta/raft-store/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "common-meta-raft-store" +name = "databend-common-meta-raft-store" description = "Raft state machine" version = { workspace = true } authors = { workspace = true } @@ -12,17 +12,17 @@ doctest = false test = true [features] -io-uring = ["common-meta-sled-store/io-uring"] +io-uring = ["databend-common-meta-sled-store/io-uring"] [dependencies] -common-exception = { path = "../../common/exception" } -common-grpc = { path = "../../common/grpc" } -common-meta-api = { path = "../api" } -common-meta-kvapi = { path = "../kvapi" } -common-meta-sled-store = { path = "../sled-store" } -common-meta-stoerr = { path = "../stoerr" } -common-meta-types = { path = "../types" } -common-tracing = { path = "../../common/tracing" } +databend-common-exception = { path = "../../common/exception" } +databend-common-grpc = { path = "../../common/grpc" } +databend-common-meta-api = { path = "../api" } +databend-common-meta-kvapi = { path = "../kvapi" } +databend-common-meta-sled-store = { path = "../sled-store" } +databend-common-meta-stoerr = { path = "../stoerr" } +databend-common-meta-types = { path = "../types" } +databend-common-tracing = { path = "../../common/tracing" } openraft = { workspace = true } @@ -48,7 +48,7 @@ thiserror = { workspace = true } tokio = { workspace = true } [dev-dependencies] -common-base = { path = "../../common/base" } +databend-common-base = { path = "../../common/base" } pretty_assertions = "1.3.0" tempfile = "3.4.0" test-harness = "0.1.1" diff --git a/src/meta/raft-store/src/applier.rs b/src/meta/raft-store/src/applier.rs index e9948bee8d99..bd077b4bef13 100644 --- a/src/meta/raft-store/src/applier.rs +++ b/src/meta/raft-store/src/applier.rs @@ -16,37 +16,37 @@ use std::io; use std::time::Duration; use std::time::SystemTime; -use common_meta_types::protobuf as pb; -use common_meta_types::txn_condition; -use common_meta_types::txn_op; -use common_meta_types::txn_op_response; -use common_meta_types::AppliedState; -use common_meta_types::Change; -use common_meta_types::Cmd; -use common_meta_types::ConditionResult; -use common_meta_types::Entry; -use common_meta_types::EntryPayload; -use common_meta_types::KVMeta; -use common_meta_types::MatchSeq; -use common_meta_types::Node; -use common_meta_types::SeqV; -use common_meta_types::SeqValue; -use common_meta_types::StoredMembership; -use common_meta_types::TxnCondition; -use common_meta_types::TxnDeleteByPrefixRequest; -use common_meta_types::TxnDeleteByPrefixResponse; -use common_meta_types::TxnDeleteRequest; -use common_meta_types::TxnDeleteResponse; -use common_meta_types::TxnGetRequest; -use common_meta_types::TxnGetResponse; -use common_meta_types::TxnOp; -use common_meta_types::TxnOpResponse; -use common_meta_types::TxnPutRequest; -use common_meta_types::TxnPutResponse; -use common_meta_types::TxnReply; -use common_meta_types::TxnRequest; -use common_meta_types::UpsertKV; -use common_meta_types::With; +use databend_common_meta_types::protobuf as pb; +use databend_common_meta_types::txn_condition; +use databend_common_meta_types::txn_op; +use databend_common_meta_types::txn_op_response; +use databend_common_meta_types::AppliedState; +use databend_common_meta_types::Change; +use databend_common_meta_types::Cmd; +use databend_common_meta_types::ConditionResult; +use databend_common_meta_types::Entry; +use databend_common_meta_types::EntryPayload; +use databend_common_meta_types::KVMeta; +use databend_common_meta_types::MatchSeq; +use databend_common_meta_types::Node; +use databend_common_meta_types::SeqV; +use databend_common_meta_types::SeqValue; +use databend_common_meta_types::StoredMembership; +use databend_common_meta_types::TxnCondition; +use databend_common_meta_types::TxnDeleteByPrefixRequest; +use databend_common_meta_types::TxnDeleteByPrefixResponse; +use databend_common_meta_types::TxnDeleteRequest; +use databend_common_meta_types::TxnDeleteResponse; +use databend_common_meta_types::TxnGetRequest; +use databend_common_meta_types::TxnGetResponse; +use databend_common_meta_types::TxnOp; +use databend_common_meta_types::TxnOpResponse; +use databend_common_meta_types::TxnPutRequest; +use databend_common_meta_types::TxnPutResponse; +use databend_common_meta_types::TxnReply; +use databend_common_meta_types::TxnRequest; +use databend_common_meta_types::UpsertKV; +use databend_common_meta_types::With; use futures::stream::TryStreamExt; use log::as_debug; use log::as_display; diff --git a/src/meta/raft-store/src/config.rs b/src/meta/raft-store/src/config.rs index 621d73624497..cf7c3399318b 100644 --- a/src/meta/raft-store/src/config.rs +++ b/src/meta/raft-store/src/config.rs @@ -15,11 +15,11 @@ use std::net::Ipv4Addr; use std::sync::LazyLock; -use common_exception::Result; -use common_grpc::DNSResolver; -use common_meta_types::Endpoint; -use common_meta_types::MetaStartupError; -use common_meta_types::NodeId; +use databend_common_exception::Result; +use databend_common_grpc::DNSResolver; +use databend_common_meta_types::Endpoint; +use databend_common_meta_types::MetaStartupError; +use databend_common_meta_types::NodeId; pub static DATABEND_COMMIT_VERSION: LazyLock = LazyLock::new(|| { let build_semver = option_env!("VERGEN_BUILD_SEMVER"); diff --git a/src/meta/raft-store/src/key_spaces.rs b/src/meta/raft-store/src/key_spaces.rs index fd0d1bfff298..a8e8bf52ea01 100644 --- a/src/meta/raft-store/src/key_spaces.rs +++ b/src/meta/raft-store/src/key_spaces.rs @@ -15,18 +15,18 @@ //! Defines application key spaces that are defined by raft-store. //! All of the key spaces stores key-value pairs in the underlying sled db. -use common_meta_sled_store::sled; -use common_meta_sled_store::SledKeySpace; -use common_meta_sled_store::SledOrderedSerde; -use common_meta_sled_store::SledSerde; -use common_meta_stoerr::MetaStorageError; -use common_meta_types::compat07; -use common_meta_types::Entry; -use common_meta_types::LogIndex; -use common_meta_types::Node; -use common_meta_types::NodeId; -use common_meta_types::SeqNum; -use common_meta_types::SeqV; +use databend_common_meta_sled_store::sled; +use databend_common_meta_sled_store::SledKeySpace; +use databend_common_meta_sled_store::SledOrderedSerde; +use databend_common_meta_sled_store::SledSerde; +use databend_common_meta_stoerr::MetaStorageError; +use databend_common_meta_types::compat07; +use databend_common_meta_types::Entry; +use databend_common_meta_types::LogIndex; +use databend_common_meta_types::Node; +use databend_common_meta_types::NodeId; +use databend_common_meta_types::SeqNum; +use databend_common_meta_types::SeqV; use serde::Deserialize; use serde::Serialize; diff --git a/src/meta/raft-store/src/log/raft_log.rs b/src/meta/raft-store/src/log/raft_log.rs index a60727d46e20..69c29730a459 100644 --- a/src/meta/raft-store/src/log/raft_log.rs +++ b/src/meta/raft-store/src/log/raft_log.rs @@ -14,13 +14,13 @@ use std::ops::RangeBounds; -use common_meta_sled_store::sled; -use common_meta_sled_store::AsKeySpace; -use common_meta_sled_store::SledTree; -use common_meta_stoerr::MetaStorageError; -use common_meta_types::Entry; -use common_meta_types::LogId; -use common_meta_types::LogIndex; +use databend_common_meta_sled_store::sled; +use databend_common_meta_sled_store::AsKeySpace; +use databend_common_meta_sled_store::SledTree; +use databend_common_meta_stoerr::MetaStorageError; +use databend_common_meta_types::Entry; +use databend_common_meta_types::LogId; +use databend_common_meta_types::LogIndex; use log::as_debug; use log::info; diff --git a/src/meta/raft-store/src/ondisk/header.rs b/src/meta/raft-store/src/ondisk/header.rs index 57c6dfc6355f..242425efb09f 100644 --- a/src/meta/raft-store/src/ondisk/header.rs +++ b/src/meta/raft-store/src/ondisk/header.rs @@ -14,9 +14,9 @@ use std::fmt; -use common_meta_sled_store::sled; -use common_meta_sled_store::SledBytesError; -use common_meta_sled_store::SledSerde; +use databend_common_meta_sled_store::sled; +use databend_common_meta_sled_store::SledBytesError; +use databend_common_meta_sled_store::SledSerde; use crate::ondisk::DataVersion; use crate::ondisk::DATA_VERSION; diff --git a/src/meta/raft-store/src/ondisk/mod.rs b/src/meta/raft-store/src/ondisk/mod.rs index f34152f210cb..8e3aae53a8f6 100644 --- a/src/meta/raft-store/src/ondisk/mod.rs +++ b/src/meta/raft-store/src/ondisk/mod.rs @@ -22,10 +22,10 @@ use std::collections::BTreeSet; use std::fmt; use std::fmt::Debug; -use common_meta_sled_store::sled; -use common_meta_sled_store::SledTree; -use common_meta_stoerr::MetaStorageError; pub use data_version::DataVersion; +use databend_common_meta_sled_store::sled; +use databend_common_meta_sled_store::SledTree; +use databend_common_meta_stoerr::MetaStorageError; pub use header::Header; use log::as_debug; use log::debug; diff --git a/src/meta/raft-store/src/sm_v002/importer.rs b/src/meta/raft-store/src/sm_v002/importer.rs index 592ca352ce3b..065eb3c49856 100644 --- a/src/meta/raft-store/src/sm_v002/importer.rs +++ b/src/meta/raft-store/src/sm_v002/importer.rs @@ -15,9 +15,9 @@ use std::collections::BTreeMap; use std::io; -use common_meta_types::anyerror::AnyError; -use common_meta_types::LogId; -use common_meta_types::StoredMembership; +use databend_common_meta_types::anyerror::AnyError; +use databend_common_meta_types::LogId; +use databend_common_meta_types::StoredMembership; use crate::key_spaces::RaftStoreEntry; use crate::sm_v002::leveled_store::level::Level; diff --git a/src/meta/raft-store/src/sm_v002/leveled_store/level.rs b/src/meta/raft-store/src/sm_v002/leveled_store/level.rs index ec2c5bd7d609..ac560b330f58 100644 --- a/src/meta/raft-store/src/sm_v002/leveled_store/level.rs +++ b/src/meta/raft-store/src/sm_v002/leveled_store/level.rs @@ -17,7 +17,7 @@ use std::collections::BTreeMap; use std::io; use std::ops::RangeBounds; -use common_meta_types::KVMeta; +use databend_common_meta_types::KVMeta; use futures_util::StreamExt; use crate::sm_v002::leveled_store::map_api::AsMap; diff --git a/src/meta/raft-store/src/sm_v002/leveled_store/leveled_map.rs b/src/meta/raft-store/src/sm_v002/leveled_store/leveled_map.rs index ca24e994b69b..5db4a2f4d584 100644 --- a/src/meta/raft-store/src/sm_v002/leveled_store/leveled_map.rs +++ b/src/meta/raft-store/src/sm_v002/leveled_store/leveled_map.rs @@ -18,7 +18,7 @@ use std::io; use std::ops::RangeBounds; use std::sync::Arc; -use common_meta_types::KVMeta; +use databend_common_meta_types::KVMeta; use crate::sm_v002::leveled_store::level::Level; use crate::sm_v002::leveled_store::map_api::compacted_get; diff --git a/src/meta/raft-store/src/sm_v002/leveled_store/leveled_map_test.rs b/src/meta/raft-store/src/sm_v002/leveled_store/leveled_map_test.rs index 94df7072e3e8..024631aa6e38 100644 --- a/src/meta/raft-store/src/sm_v002/leveled_store/leveled_map_test.rs +++ b/src/meta/raft-store/src/sm_v002/leveled_store/leveled_map_test.rs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_meta_types::KVMeta; +use databend_common_meta_types::KVMeta; use futures_util::TryStreamExt; use crate::sm_v002::leveled_store::leveled_map::LeveledMap; diff --git a/src/meta/raft-store/src/sm_v002/leveled_store/map_api.rs b/src/meta/raft-store/src/sm_v002/leveled_store/map_api.rs index 5a95c918e970..87ff7332a76f 100644 --- a/src/meta/raft-store/src/sm_v002/leveled_store/map_api.rs +++ b/src/meta/raft-store/src/sm_v002/leveled_store/map_api.rs @@ -17,7 +17,7 @@ use std::fmt; use std::io; use std::ops::RangeBounds; -use common_meta_types::KVMeta; +use databend_common_meta_types::KVMeta; use futures::stream::StreamExt; use futures_util::stream::BoxStream; use stream_more::KMerge; diff --git a/src/meta/raft-store/src/sm_v002/leveled_store/ref_mut.rs b/src/meta/raft-store/src/sm_v002/leveled_store/ref_mut.rs index 86d3912847b6..d2cd5c69a422 100644 --- a/src/meta/raft-store/src/sm_v002/leveled_store/ref_mut.rs +++ b/src/meta/raft-store/src/sm_v002/leveled_store/ref_mut.rs @@ -17,7 +17,7 @@ use std::io; use std::ops::RangeBounds; use std::sync::Arc; -use common_meta_types::KVMeta; +use databend_common_meta_types::KVMeta; use crate::sm_v002::leveled_store::level::Level; use crate::sm_v002::leveled_store::map_api::compacted_get; diff --git a/src/meta/raft-store/src/sm_v002/leveled_store/sys_data.rs b/src/meta/raft-store/src/sm_v002/leveled_store/sys_data.rs index f24316a55537..97f9518a7922 100644 --- a/src/meta/raft-store/src/sm_v002/leveled_store/sys_data.rs +++ b/src/meta/raft-store/src/sm_v002/leveled_store/sys_data.rs @@ -14,10 +14,10 @@ use std::collections::BTreeMap; -use common_meta_types::LogId; -use common_meta_types::Node; -use common_meta_types::NodeId; -use common_meta_types::StoredMembership; +use databend_common_meta_types::LogId; +use databend_common_meta_types::Node; +use databend_common_meta_types::NodeId; +use databend_common_meta_types::StoredMembership; use log::debug; use crate::sm_v002::leveled_store::sys_data_api::SysDataApiRO; diff --git a/src/meta/raft-store/src/sm_v002/leveled_store/sys_data_api.rs b/src/meta/raft-store/src/sm_v002/leveled_store/sys_data_api.rs index 4d94634f906c..8262721e7410 100644 --- a/src/meta/raft-store/src/sm_v002/leveled_store/sys_data_api.rs +++ b/src/meta/raft-store/src/sm_v002/leveled_store/sys_data_api.rs @@ -14,10 +14,10 @@ use std::collections::BTreeMap; -use common_meta_types::LogId; -use common_meta_types::Node; -use common_meta_types::NodeId; -use common_meta_types::StoredMembership; +use databend_common_meta_types::LogId; +use databend_common_meta_types::Node; +use databend_common_meta_types::NodeId; +use databend_common_meta_types::StoredMembership; /// APIs to access the non-user-data of the state machine(leveled map). pub trait SysDataApiRO { diff --git a/src/meta/raft-store/src/sm_v002/marked/marked_test.rs b/src/meta/raft-store/src/sm_v002/marked/marked_test.rs index 9556ec4f4b55..2d1e79c9bd1b 100644 --- a/src/meta/raft-store/src/sm_v002/marked/marked_test.rs +++ b/src/meta/raft-store/src/sm_v002/marked/marked_test.rs @@ -12,9 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_meta_types::KVMeta; -use common_meta_types::SeqV; -use common_meta_types::SeqValue; +use databend_common_meta_types::KVMeta; +use databend_common_meta_types::SeqV; +use databend_common_meta_types::SeqValue; use crate::sm_v002::marked::InternalSeq; use crate::sm_v002::marked::Marked; diff --git a/src/meta/raft-store/src/sm_v002/marked/mod.rs b/src/meta/raft-store/src/sm_v002/marked/mod.rs index 02dd3e6489bf..7579abdc519b 100644 --- a/src/meta/raft-store/src/sm_v002/marked/mod.rs +++ b/src/meta/raft-store/src/sm_v002/marked/mod.rs @@ -17,9 +17,9 @@ mod marked_test; mod internal_seq; -use common_meta_types::KVMeta; -use common_meta_types::SeqV; -use common_meta_types::SeqValue; +use databend_common_meta_types::KVMeta; +use databend_common_meta_types::SeqV; +use databend_common_meta_types::SeqValue; pub(in crate::sm_v002) use internal_seq::InternalSeq; use crate::state_machine::ExpireValue; @@ -240,7 +240,7 @@ impl From> for Option { #[cfg(test)] mod tests { - use common_meta_types::KVMeta; + use databend_common_meta_types::KVMeta; use crate::sm_v002::marked::Marked; diff --git a/src/meta/raft-store/src/sm_v002/sm_v002.rs b/src/meta/raft-store/src/sm_v002/sm_v002.rs index a164257317b9..b261102577c5 100644 --- a/src/meta/raft-store/src/sm_v002/sm_v002.rs +++ b/src/meta/raft-store/src/sm_v002/sm_v002.rs @@ -17,24 +17,24 @@ use std::future; use std::io; use std::sync::Arc; -use common_meta_kvapi::kvapi; -use common_meta_kvapi::kvapi::GetKVReply; -use common_meta_kvapi::kvapi::KVStream; -use common_meta_kvapi::kvapi::MGetKVReply; -use common_meta_kvapi::kvapi::UpsertKVReply; -use common_meta_kvapi::kvapi::UpsertKVReq; -use common_meta_types::protobuf::StreamItem; -use common_meta_types::AppliedState; -use common_meta_types::Entry; -use common_meta_types::MatchSeqExt; -use common_meta_types::Operation; -use common_meta_types::SeqV; -use common_meta_types::SeqValue; -use common_meta_types::SnapshotData; -use common_meta_types::StorageIOError; -use common_meta_types::TxnReply; -use common_meta_types::TxnRequest; -use common_meta_types::UpsertKV; +use databend_common_meta_kvapi::kvapi; +use databend_common_meta_kvapi::kvapi::GetKVReply; +use databend_common_meta_kvapi::kvapi::KVStream; +use databend_common_meta_kvapi::kvapi::MGetKVReply; +use databend_common_meta_kvapi::kvapi::UpsertKVReply; +use databend_common_meta_kvapi::kvapi::UpsertKVReq; +use databend_common_meta_types::protobuf::StreamItem; +use databend_common_meta_types::AppliedState; +use databend_common_meta_types::Entry; +use databend_common_meta_types::MatchSeqExt; +use databend_common_meta_types::Operation; +use databend_common_meta_types::SeqV; +use databend_common_meta_types::SeqValue; +use databend_common_meta_types::SnapshotData; +use databend_common_meta_types::StorageIOError; +use databend_common_meta_types::TxnReply; +use databend_common_meta_types::TxnRequest; +use databend_common_meta_types::UpsertKV; use futures::Stream; use futures_util::StreamExt; use futures_util::TryStreamExt; diff --git a/src/meta/raft-store/src/sm_v002/sm_v002_test.rs b/src/meta/raft-store/src/sm_v002/sm_v002_test.rs index b0ba97a197ac..4633d0434188 100644 --- a/src/meta/raft-store/src/sm_v002/sm_v002_test.rs +++ b/src/meta/raft-store/src/sm_v002/sm_v002_test.rs @@ -12,9 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_meta_types::SeqV; -use common_meta_types::SeqValue; -use common_meta_types::UpsertKV; +use databend_common_meta_types::SeqV; +use databend_common_meta_types::SeqValue; +use databend_common_meta_types::UpsertKV; use futures_util::TryStreamExt; use pretty_assertions::assert_eq; @@ -159,7 +159,7 @@ async fn test_update_expire_index() -> anyhow::Result<()> { /// /// | kv | expire /// | --- | --- -/// l1 | a₄ c₃ | 10,1₄ -> ø 15,4₄ -> a 20,3₃ -> c +/// l1 | a₄ c₃ | 10,1₄ -> ø 15,4₄ -> a 20,3₃ -> c /// ------------------------------------------------------------ /// l0 | a₁ b₂ | 5,2₂ -> b 10,1₁ -> a async fn build_sm_with_expire() -> anyhow::Result { diff --git a/src/meta/raft-store/src/sm_v002/snapshot_store.rs b/src/meta/raft-store/src/sm_v002/snapshot_store.rs index 96afa87c5630..752dd7bedc86 100644 --- a/src/meta/raft-store/src/sm_v002/snapshot_store.rs +++ b/src/meta/raft-store/src/sm_v002/snapshot_store.rs @@ -19,11 +19,11 @@ use std::str::FromStr; use std::time::SystemTime; use std::time::UNIX_EPOCH; -use common_meta_types::ErrorSubject; -use common_meta_types::SnapshotData; -use common_meta_types::SnapshotMeta; -use common_meta_types::StorageError; -use common_meta_types::StorageIOError; +use databend_common_meta_types::ErrorSubject; +use databend_common_meta_types::SnapshotData; +use databend_common_meta_types::SnapshotMeta; +use databend_common_meta_types::StorageError; +use databend_common_meta_types::StorageIOError; use log::error; use log::info; use log::warn; diff --git a/src/meta/raft-store/src/sm_v002/snapshot_view_v002.rs b/src/meta/raft-store/src/sm_v002/snapshot_view_v002.rs index 44f63d5e6700..b09a62d7171b 100644 --- a/src/meta/raft-store/src/sm_v002/snapshot_view_v002.rs +++ b/src/meta/raft-store/src/sm_v002/snapshot_view_v002.rs @@ -16,9 +16,9 @@ use std::future; use std::io; use std::sync::Arc; -use common_meta_types::SeqNum; -use common_meta_types::SeqV; -use common_meta_types::SnapshotMeta; +use databend_common_meta_types::SeqNum; +use databend_common_meta_types::SeqV; +use databend_common_meta_types::SnapshotMeta; use futures_util::StreamExt; use futures_util::TryStreamExt; diff --git a/src/meta/raft-store/src/sm_v002/snapshot_view_v002_test.rs b/src/meta/raft-store/src/sm_v002/snapshot_view_v002_test.rs index d3dff6c13027..5bb6a352aa82 100644 --- a/src/meta/raft-store/src/sm_v002/snapshot_view_v002_test.rs +++ b/src/meta/raft-store/src/sm_v002/snapshot_view_v002_test.rs @@ -14,12 +14,12 @@ use std::sync::Arc; -use common_meta_types::Endpoint; -use common_meta_types::KVMeta; -use common_meta_types::Membership; -use common_meta_types::Node; -use common_meta_types::StoredMembership; -use common_meta_types::UpsertKV; +use databend_common_meta_types::Endpoint; +use databend_common_meta_types::KVMeta; +use databend_common_meta_types::Membership; +use databend_common_meta_types::Node; +use databend_common_meta_types::StoredMembership; +use databend_common_meta_types::UpsertKV; use futures_util::TryStreamExt; use maplit::btreemap; use openraft::testing::log_id; @@ -280,7 +280,7 @@ async fn build_3_levels() -> anyhow::Result { /// /// | kv | expire /// | --- | --- -/// l1 | a₄ c₃ | 10,1₄ -> ø 15,4₄ -> a 20,3₃ -> c +/// l1 | a₄ c₃ | 10,1₄ -> ø 15,4₄ -> a 20,3₃ -> c /// ------------------------------------------------------------ /// l0 | a₁ b₂ | 5,2₂ -> b 10,1₁ -> a async fn build_sm_with_expire() -> anyhow::Result { diff --git a/src/meta/raft-store/src/sm_v002/writer_v002.rs b/src/meta/raft-store/src/sm_v002/writer_v002.rs index b03c84a73991..5cc1f3ac1c29 100644 --- a/src/meta/raft-store/src/sm_v002/writer_v002.rs +++ b/src/meta/raft-store/src/sm_v002/writer_v002.rs @@ -18,7 +18,7 @@ use std::io::BufWriter; use std::io::Seek; use std::io::Write; -use common_meta_types::LogId; +use databend_common_meta_types::LogId; use futures::Stream; use futures_util::StreamExt; use log::as_debug; diff --git a/src/meta/raft-store/src/state/raft_state.rs b/src/meta/raft-store/src/state/raft_state.rs index bf52c5dce84a..c87a662aa0a2 100644 --- a/src/meta/raft-store/src/state/raft_state.rs +++ b/src/meta/raft-store/src/state/raft_state.rs @@ -14,14 +14,14 @@ use std::fmt::Debug; -use common_meta_sled_store::sled; -use common_meta_sled_store::AsKeySpace; -use common_meta_sled_store::SledTree; -use common_meta_stoerr::MetaStorageError; -use common_meta_types::LogId; -use common_meta_types::MetaStartupError; -use common_meta_types::NodeId; -use common_meta_types::Vote; +use databend_common_meta_sled_store::sled; +use databend_common_meta_sled_store::AsKeySpace; +use databend_common_meta_sled_store::SledTree; +use databend_common_meta_stoerr::MetaStorageError; +use databend_common_meta_types::LogId; +use databend_common_meta_types::MetaStartupError; +use databend_common_meta_types::NodeId; +use databend_common_meta_types::Vote; use log::as_debug; use log::debug; use log::info; diff --git a/src/meta/raft-store/src/state/raft_state_kv.rs b/src/meta/raft-store/src/state/raft_state_kv.rs index 891636d8ed25..1287b06129be 100644 --- a/src/meta/raft-store/src/state/raft_state_kv.rs +++ b/src/meta/raft-store/src/state/raft_state_kv.rs @@ -14,13 +14,13 @@ use std::fmt; -use common_meta_sled_store::sled; -use common_meta_sled_store::SledBytesError; -use common_meta_sled_store::SledOrderedSerde; -use common_meta_types::anyerror::AnyError; -use common_meta_types::LogId; -use common_meta_types::NodeId; -use common_meta_types::Vote; +use databend_common_meta_sled_store::sled; +use databend_common_meta_sled_store::SledBytesError; +use databend_common_meta_sled_store::SledOrderedSerde; +use databend_common_meta_types::anyerror::AnyError; +use databend_common_meta_types::LogId; +use databend_common_meta_types::NodeId; +use databend_common_meta_types::Vote; use serde::Deserialize; use serde::Serialize; use sled::IVec; @@ -129,11 +129,11 @@ impl From for Option { } pub(crate) mod compat_with_07 { - use common_meta_sled_store::SledBytesError; - use common_meta_sled_store::SledSerde; - use common_meta_types::compat07; - use common_meta_types::compat07::LogId; - use common_meta_types::NodeId; + use databend_common_meta_sled_store::SledBytesError; + use databend_common_meta_sled_store::SledSerde; + use databend_common_meta_types::compat07; + use databend_common_meta_types::compat07::LogId; + use databend_common_meta_types::NodeId; use openraft::compat::Upgrade; use crate::state::RaftStateValue; diff --git a/src/meta/raft-store/src/state_machine/client_last_resp.rs b/src/meta/raft-store/src/state_machine/client_last_resp.rs index 954cebe8af41..50317283aa92 100644 --- a/src/meta/raft-store/src/state_machine/client_last_resp.rs +++ b/src/meta/raft-store/src/state_machine/client_last_resp.rs @@ -12,26 +12,26 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_meta_sled_store::SledBytesError; -use common_meta_sled_store::SledSerde; -use common_meta_types::AppliedState; -use serde::Deserialize; -use serde::Serialize; - -/// Client last response that is stored in SledTree -/// raft state: A mapping of client serial IDs to their state info: -/// (serial, RaftResponse) -/// This is used to de-dup client request, to impl idempotent operations. -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] -pub struct ClientLastRespValue { - pub req_serial_num: u64, - pub res: AppliedState, -} - -impl SledSerde for ClientLastRespValue { - fn de>(v: T) -> Result - where Self: Sized { - let s = serde_json::from_slice(v.as_ref())?; - Ok(s) - } -} +use databend_common_meta_sled_store::SledBytesError; +use databend_common_meta_sled_store::SledSerde; +use databend_common_meta_types::AppliedState; +use serde::Deserialize; +use serde::Serialize; + +/// Client last response that is stored in SledTree +/// raft state: A mapping of client serial IDs to their state info: +/// (serial, RaftResponse) +/// This is used to de-dup client request, to impl idempotent operations. +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +pub struct ClientLastRespValue { + pub req_serial_num: u64, + pub res: AppliedState, +} + +impl SledSerde for ClientLastRespValue { + fn de>(v: T) -> Result + where Self: Sized { + let s = serde_json::from_slice(v.as_ref())?; + Ok(s) + } +} diff --git a/src/meta/raft-store/src/state_machine/expire.rs b/src/meta/raft-store/src/state_machine/expire.rs index e748978fe1e2..b37d8c1de450 100644 --- a/src/meta/raft-store/src/state_machine/expire.rs +++ b/src/meta/raft-store/src/state_machine/expire.rs @@ -27,10 +27,10 @@ use byteorder::BigEndian; use byteorder::ByteOrder; use chrono::DateTime; use chrono::Utc; -use common_meta_sled_store::sled::IVec; -use common_meta_sled_store::SledBytesError; -use common_meta_sled_store::SledOrderedSerde; -use common_meta_sled_store::SledSerde; +use databend_common_meta_sled_store::sled::IVec; +use databend_common_meta_sled_store::SledBytesError; +use databend_common_meta_sled_store::SledOrderedSerde; +use databend_common_meta_sled_store::SledSerde; /// The identifier of the index for kv with expiration. #[derive( @@ -131,7 +131,7 @@ impl ExpireKey { #[cfg(test)] mod tests { - use common_meta_sled_store::SledOrderedSerde; + use databend_common_meta_sled_store::SledOrderedSerde; use crate::state_machine::ExpireKey; use crate::state_machine::ExpireValue; diff --git a/src/meta/raft-store/src/state_machine/log_meta.rs b/src/meta/raft-store/src/state_machine/log_meta.rs index 7b15e07a7155..ad7a75862683 100644 --- a/src/meta/raft-store/src/state_machine/log_meta.rs +++ b/src/meta/raft-store/src/state_machine/log_meta.rs @@ -14,11 +14,11 @@ use std::fmt; -use common_meta_sled_store::sled; -use common_meta_sled_store::SledBytesError; -use common_meta_sled_store::SledOrderedSerde; -use common_meta_types::anyerror::AnyError; -use common_meta_types::LogId; +use databend_common_meta_sled_store::sled; +use databend_common_meta_sled_store::SledBytesError; +use databend_common_meta_sled_store::SledOrderedSerde; +use databend_common_meta_types::anyerror::AnyError; +use databend_common_meta_types::LogId; use serde::Deserialize; use serde::Serialize; use sled::IVec; @@ -68,9 +68,9 @@ impl SledOrderedSerde for LogMetaKey { } pub(crate) mod compat_with_07 { - use common_meta_sled_store::SledBytesError; - use common_meta_sled_store::SledSerde; - use common_meta_types::compat07; + use databend_common_meta_sled_store::SledBytesError; + use databend_common_meta_sled_store::SledSerde; + use databend_common_meta_types::compat07; use openraft::compat::Upgrade; use super::LogMetaValue; diff --git a/src/meta/raft-store/src/state_machine/sm.rs b/src/meta/raft-store/src/state_machine/sm.rs index ef4f6d0186d4..8b172822c4d7 100644 --- a/src/meta/raft-store/src/state_machine/sm.rs +++ b/src/meta/raft-store/src/state_machine/sm.rs @@ -19,48 +19,48 @@ use std::time::Duration; use std::time::Instant; use std::time::SystemTime; -use common_meta_sled_store::get_sled_db; -use common_meta_sled_store::openraft::MessageSummary; -use common_meta_sled_store::AsKeySpace; -use common_meta_sled_store::SledKeySpace; -use common_meta_sled_store::SledTree; -use common_meta_sled_store::Store; -use common_meta_sled_store::TransactionSledTree; -use common_meta_stoerr::MetaStorageError; -use common_meta_types::protobuf as pb; -use common_meta_types::txn_condition; -use common_meta_types::txn_op; -use common_meta_types::txn_op_response; -use common_meta_types::AppliedState; -use common_meta_types::Change; -use common_meta_types::Cmd; -use common_meta_types::ConditionResult; -use common_meta_types::Entry; -use common_meta_types::EntryPayload; -use common_meta_types::KVMeta; -use common_meta_types::LogId; -use common_meta_types::MatchSeq; -use common_meta_types::MatchSeqExt; -use common_meta_types::Node; -use common_meta_types::NodeId; -use common_meta_types::Operation; -use common_meta_types::SeqV; -use common_meta_types::StoredMembership; -use common_meta_types::TxnCondition; -use common_meta_types::TxnDeleteByPrefixRequest; -use common_meta_types::TxnDeleteByPrefixResponse; -use common_meta_types::TxnDeleteRequest; -use common_meta_types::TxnDeleteResponse; -use common_meta_types::TxnGetRequest; -use common_meta_types::TxnGetResponse; -use common_meta_types::TxnOp; -use common_meta_types::TxnOpResponse; -use common_meta_types::TxnPutRequest; -use common_meta_types::TxnPutResponse; -use common_meta_types::TxnReply; -use common_meta_types::TxnRequest; -use common_meta_types::UpsertKV; -use common_meta_types::With; +use databend_common_meta_sled_store::get_sled_db; +use databend_common_meta_sled_store::openraft::MessageSummary; +use databend_common_meta_sled_store::AsKeySpace; +use databend_common_meta_sled_store::SledKeySpace; +use databend_common_meta_sled_store::SledTree; +use databend_common_meta_sled_store::Store; +use databend_common_meta_sled_store::TransactionSledTree; +use databend_common_meta_stoerr::MetaStorageError; +use databend_common_meta_types::protobuf as pb; +use databend_common_meta_types::txn_condition; +use databend_common_meta_types::txn_op; +use databend_common_meta_types::txn_op_response; +use databend_common_meta_types::AppliedState; +use databend_common_meta_types::Change; +use databend_common_meta_types::Cmd; +use databend_common_meta_types::ConditionResult; +use databend_common_meta_types::Entry; +use databend_common_meta_types::EntryPayload; +use databend_common_meta_types::KVMeta; +use databend_common_meta_types::LogId; +use databend_common_meta_types::MatchSeq; +use databend_common_meta_types::MatchSeqExt; +use databend_common_meta_types::Node; +use databend_common_meta_types::NodeId; +use databend_common_meta_types::Operation; +use databend_common_meta_types::SeqV; +use databend_common_meta_types::StoredMembership; +use databend_common_meta_types::TxnCondition; +use databend_common_meta_types::TxnDeleteByPrefixRequest; +use databend_common_meta_types::TxnDeleteByPrefixResponse; +use databend_common_meta_types::TxnDeleteRequest; +use databend_common_meta_types::TxnDeleteResponse; +use databend_common_meta_types::TxnGetRequest; +use databend_common_meta_types::TxnGetResponse; +use databend_common_meta_types::TxnOp; +use databend_common_meta_types::TxnOpResponse; +use databend_common_meta_types::TxnPutRequest; +use databend_common_meta_types::TxnPutResponse; +use databend_common_meta_types::TxnReply; +use databend_common_meta_types::TxnRequest; +use databend_common_meta_types::UpsertKV; +use databend_common_meta_types::With; use log::as_debug; use log::as_display; use log::debug; @@ -1063,8 +1063,8 @@ impl StateMachine { #[cfg(test)] mod tests { - use common_meta_types::KVMeta; - use common_meta_types::SeqV; + use databend_common_meta_types::KVMeta; + use databend_common_meta_types::SeqV; use crate::state_machine::StateMachine; diff --git a/src/meta/raft-store/src/state_machine/sm_kv_api_impl.rs b/src/meta/raft-store/src/state_machine/sm_kv_api_impl.rs index afb28a0fb80f..282692635e93 100644 --- a/src/meta/raft-store/src/state_machine/sm_kv_api_impl.rs +++ b/src/meta/raft-store/src/state_machine/sm_kv_api_impl.rs @@ -12,20 +12,20 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_meta_kvapi::kvapi; -use common_meta_kvapi::kvapi::GetKVReply; -use common_meta_kvapi::kvapi::KVStream; -use common_meta_kvapi::kvapi::MGetKVReply; -use common_meta_kvapi::kvapi::UpsertKVReply; -use common_meta_kvapi::kvapi::UpsertKVReq; -use common_meta_types::protobuf::StreamItem; -use common_meta_types::AppliedState; -use common_meta_types::Cmd; -use common_meta_types::MetaError; -use common_meta_types::SeqV; -use common_meta_types::TxnReply; -use common_meta_types::TxnRequest; -use common_meta_types::UpsertKV; +use databend_common_meta_kvapi::kvapi; +use databend_common_meta_kvapi::kvapi::GetKVReply; +use databend_common_meta_kvapi::kvapi::KVStream; +use databend_common_meta_kvapi::kvapi::MGetKVReply; +use databend_common_meta_kvapi::kvapi::UpsertKVReply; +use databend_common_meta_kvapi::kvapi::UpsertKVReq; +use databend_common_meta_types::protobuf::StreamItem; +use databend_common_meta_types::AppliedState; +use databend_common_meta_types::Cmd; +use databend_common_meta_types::MetaError; +use databend_common_meta_types::SeqV; +use databend_common_meta_types::TxnReply; +use databend_common_meta_types::TxnRequest; +use databend_common_meta_types::UpsertKV; use futures_util::StreamExt; use log::debug; diff --git a/src/meta/raft-store/src/state_machine/snapshot.rs b/src/meta/raft-store/src/state_machine/snapshot.rs index b3c4061048cd..5fdc8514dcb8 100644 --- a/src/meta/raft-store/src/state_machine/snapshot.rs +++ b/src/meta/raft-store/src/state_machine/snapshot.rs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_meta_types::SnapshotMeta; +use databend_common_meta_types::SnapshotMeta; use serde::Deserialize; use serde::Serialize; diff --git a/src/meta/raft-store/src/state_machine/snapshot_id.rs b/src/meta/raft-store/src/state_machine/snapshot_id.rs index b3aa692993fc..bcf3efa6cfaf 100644 --- a/src/meta/raft-store/src/state_machine/snapshot_id.rs +++ b/src/meta/raft-store/src/state_machine/snapshot_id.rs @@ -16,8 +16,8 @@ use std::str::FromStr; use std::time::SystemTime; use std::time::UNIX_EPOCH; -use common_meta_types::new_log_id; -use common_meta_types::LogId; +use databend_common_meta_types::new_log_id; +use databend_common_meta_types::LogId; /// Structured snapshot id used by meta service #[derive(Clone, Debug, Default, PartialEq, Eq, PartialOrd, Ord)] @@ -106,7 +106,7 @@ impl ToString for MetaSnapshotId { mod tests { use std::str::FromStr; - use common_meta_types::new_log_id; + use databend_common_meta_types::new_log_id; use crate::state_machine::snapshot_id::MetaSnapshotId; diff --git a/src/meta/raft-store/src/state_machine/state_machine_meta.rs b/src/meta/raft-store/src/state_machine/state_machine_meta.rs index ca66d07766dc..169a4f8321ce 100644 --- a/src/meta/raft-store/src/state_machine/state_machine_meta.rs +++ b/src/meta/raft-store/src/state_machine/state_machine_meta.rs @@ -14,12 +14,12 @@ use std::fmt; -use common_meta_sled_store::sled; -use common_meta_sled_store::SledBytesError; -use common_meta_sled_store::SledOrderedSerde; -use common_meta_types::anyerror::AnyError; -use common_meta_types::LogId; -use common_meta_types::StoredMembership; +use databend_common_meta_sled_store::sled; +use databend_common_meta_sled_store::SledBytesError; +use databend_common_meta_sled_store::SledOrderedSerde; +use databend_common_meta_types::anyerror::AnyError; +use databend_common_meta_types::LogId; +use databend_common_meta_types::StoredMembership; use serde::Deserialize; use serde::Serialize; use sled::IVec; @@ -87,9 +87,9 @@ impl SledOrderedSerde for StateMachineMetaKey { } pub(crate) mod compat_with_07 { - use common_meta_sled_store::SledBytesError; - use common_meta_sled_store::SledSerde; - use common_meta_types::compat07; + use databend_common_meta_sled_store::SledBytesError; + use databend_common_meta_sled_store::SledSerde; + use databend_common_meta_types::compat07; use openraft::compat::Upgrade; use crate::state_machine::StateMachineMetaValue; diff --git a/src/meta/raft-store/src/state_machine/testing.rs b/src/meta/raft-store/src/state_machine/testing.rs index 57bc62b33d8c..f3a642661fce 100644 --- a/src/meta/raft-store/src/state_machine/testing.rs +++ b/src/meta/raft-store/src/state_machine/testing.rs @@ -12,14 +12,14 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_meta_sled_store::openraft; -use common_meta_types::new_log_id; -use common_meta_types::Cmd; -use common_meta_types::Entry; -use common_meta_types::EntryPayload; -use common_meta_types::LogEntry; -use common_meta_types::RaftTxId; -use common_meta_types::UpsertKV; +use databend_common_meta_sled_store::openraft; +use databend_common_meta_types::new_log_id; +use databend_common_meta_types::Cmd; +use databend_common_meta_types::Entry; +use databend_common_meta_types::EntryPayload; +use databend_common_meta_types::LogEntry; +use databend_common_meta_types::RaftTxId; +use databend_common_meta_types::UpsertKV; use maplit::btreeset; use openraft::Membership; diff --git a/src/meta/raft-store/tests/it/config.rs b/src/meta/raft-store/tests/it/config.rs index 68c8feb703d5..05eb8a9e7f98 100644 --- a/src/meta/raft-store/tests/it/config.rs +++ b/src/meta/raft-store/tests/it/config.rs @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_meta_raft_store::config::RaftConfig; -use common_meta_types::MetaStartupError; +use databend_common_meta_raft_store::config::RaftConfig; +use databend_common_meta_types::MetaStartupError; #[test] fn test_raft_config() -> anyhow::Result<()> { diff --git a/src/meta/raft-store/tests/it/log.rs b/src/meta/raft-store/tests/it/log.rs index 7dc460bd59ec..a221ad65ab3d 100644 --- a/src/meta/raft-store/tests/it/log.rs +++ b/src/meta/raft-store/tests/it/log.rs @@ -12,13 +12,13 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_meta_raft_store::log::RaftLog; -use common_meta_types::new_log_id; -use common_meta_types::Cmd; -use common_meta_types::Entry; -use common_meta_types::EntryPayload; -use common_meta_types::LogEntry; -use common_meta_types::UpsertKV; +use databend_common_meta_raft_store::log::RaftLog; +use databend_common_meta_types::new_log_id; +use databend_common_meta_types::Cmd; +use databend_common_meta_types::Entry; +use databend_common_meta_types::EntryPayload; +use databend_common_meta_types::LogEntry; +use databend_common_meta_types::UpsertKV; use test_harness::test; use crate::testing::new_raft_test_context; diff --git a/src/meta/raft-store/tests/it/state.rs b/src/meta/raft-store/tests/it/state.rs index e9149c0dd54d..3128f62f5051 100644 --- a/src/meta/raft-store/tests/it/state.rs +++ b/src/meta/raft-store/tests/it/state.rs @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_meta_raft_store::state::RaftState; -use common_meta_types::Vote; +use databend_common_meta_raft_store::state::RaftState; +use databend_common_meta_types::Vote; use test_harness::test; use crate::testing::new_raft_test_context; diff --git a/src/meta/raft-store/tests/it/state_machine/expire.rs b/src/meta/raft-store/tests/it/state_machine/expire.rs index c9c69d72db72..221e53bc2656 100644 --- a/src/meta/raft-store/tests/it/state_machine/expire.rs +++ b/src/meta/raft-store/tests/it/state_machine/expire.rs @@ -15,19 +15,19 @@ use std::time::SystemTime; use std::time::UNIX_EPOCH; -use common_meta_raft_store::key_spaces::Expire; -use common_meta_raft_store::key_spaces::GenericKV; -use common_meta_raft_store::state_machine::ExpireKey; -use common_meta_raft_store::state_machine::StateMachine; -use common_meta_sled_store::AsKeySpace; -use common_meta_types::new_log_id; -use common_meta_types::Cmd; -use common_meta_types::Entry; -use common_meta_types::EntryPayload; -use common_meta_types::KVMeta; -use common_meta_types::LogEntry; -use common_meta_types::UpsertKV; -use common_meta_types::With; +use databend_common_meta_raft_store::key_spaces::Expire; +use databend_common_meta_raft_store::key_spaces::GenericKV; +use databend_common_meta_raft_store::state_machine::ExpireKey; +use databend_common_meta_raft_store::state_machine::StateMachine; +use databend_common_meta_sled_store::AsKeySpace; +use databend_common_meta_types::new_log_id; +use databend_common_meta_types::Cmd; +use databend_common_meta_types::Entry; +use databend_common_meta_types::EntryPayload; +use databend_common_meta_types::KVMeta; +use databend_common_meta_types::LogEntry; +use databend_common_meta_types::UpsertKV; +use databend_common_meta_types::With; use test_harness::test; use crate::testing::new_raft_test_context; diff --git a/src/meta/raft-store/tests/it/state_machine/mod.rs b/src/meta/raft-store/tests/it/state_machine/mod.rs index 5b843e6d361a..a3b21805fc6a 100644 --- a/src/meta/raft-store/tests/it/state_machine/mod.rs +++ b/src/meta/raft-store/tests/it/state_machine/mod.rs @@ -15,23 +15,23 @@ use std::time::SystemTime; use std::time::UNIX_EPOCH; -use common_meta_kvapi::kvapi::KVApi; -use common_meta_raft_store::state_machine::StateMachine; -use common_meta_types::new_log_id; -use common_meta_types::AppliedState; -use common_meta_types::Change; -use common_meta_types::Cmd; -use common_meta_types::Endpoint; -use common_meta_types::Entry; -use common_meta_types::EntryPayload; -use common_meta_types::KVMeta; -use common_meta_types::LogEntry; -use common_meta_types::MatchSeq; -use common_meta_types::Node; -use common_meta_types::Operation; -use common_meta_types::SeqV; -use common_meta_types::UpsertKV; -use common_meta_types::With; +use databend_common_meta_kvapi::kvapi::KVApi; +use databend_common_meta_raft_store::state_machine::StateMachine; +use databend_common_meta_types::new_log_id; +use databend_common_meta_types::AppliedState; +use databend_common_meta_types::Change; +use databend_common_meta_types::Cmd; +use databend_common_meta_types::Endpoint; +use databend_common_meta_types::Entry; +use databend_common_meta_types::EntryPayload; +use databend_common_meta_types::KVMeta; +use databend_common_meta_types::LogEntry; +use databend_common_meta_types::MatchSeq; +use databend_common_meta_types::Node; +use databend_common_meta_types::Operation; +use databend_common_meta_types::SeqV; +use databend_common_meta_types::UpsertKV; +use databend_common_meta_types::With; use log::info; use pretty_assertions::assert_eq; use test_harness::test; diff --git a/src/meta/raft-store/tests/it/state_machine/schema_api_impl.rs b/src/meta/raft-store/tests/it/state_machine/schema_api_impl.rs index 990a8e987a28..2616da905302 100644 --- a/src/meta/raft-store/tests/it/state_machine/schema_api_impl.rs +++ b/src/meta/raft-store/tests/it/state_machine/schema_api_impl.rs @@ -16,11 +16,11 @@ use std::sync::Arc; use std::sync::Mutex; use async_trait::async_trait; -use common_meta_api::BackgroundApiTestSuite; -use common_meta_api::SchemaApiTestSuite; -use common_meta_api::ShareApiTestSuite; -use common_meta_kvapi::kvapi; -use common_meta_raft_store::state_machine::StateMachine; +use databend_common_meta_api::BackgroundApiTestSuite; +use databend_common_meta_api::SchemaApiTestSuite; +use databend_common_meta_api::ShareApiTestSuite; +use databend_common_meta_kvapi::kvapi; +use databend_common_meta_raft_store::state_machine::StateMachine; use test_harness::test; use crate::testing::new_raft_test_context; diff --git a/src/meta/raft-store/tests/it/testing.rs b/src/meta/raft-store/tests/it/testing.rs index 67922226e82b..9aeaccad9c78 100644 --- a/src/meta/raft-store/tests/it/testing.rs +++ b/src/meta/raft-store/tests/it/testing.rs @@ -15,13 +15,13 @@ use std::collections::BTreeMap; use std::sync::Once; -use common_base::base::GlobalSequence; -use common_meta_raft_store::config::RaftConfig; -use common_meta_sled_store::get_sled_db; -use common_meta_sled_store::sled; -use common_tracing::closure_name; -use common_tracing::init_logging; -use common_tracing::Config; +use databend_common_base::base::GlobalSequence; +use databend_common_meta_raft_store::config::RaftConfig; +use databend_common_meta_sled_store::get_sled_db; +use databend_common_meta_sled_store::sled; +use databend_common_tracing::closure_name; +use databend_common_tracing::init_logging; +use databend_common_tracing::Config; use minitrace::prelude::*; pub struct RaftTestContext { @@ -66,7 +66,7 @@ fn setup_test() { static INIT: Once = Once::new(); INIT.call_once(|| { let t = tempfile::tempdir().expect("create temp dir to sled db"); - common_meta_sled_store::init_temp_sled_db(t); + databend_common_meta_sled_store::init_temp_sled_db(t); let guards = init_logging("meta_unittests", &Config::new_testing(), BTreeMap::new()); Box::leak(Box::new(guards)); diff --git a/src/meta/raft-store/tests/it/types.rs b/src/meta/raft-store/tests/it/types.rs index a3093427c932..8cb8e142c2d4 100644 --- a/src/meta/raft-store/tests/it/types.rs +++ b/src/meta/raft-store/tests/it/types.rs @@ -14,10 +14,10 @@ use std::ops::Bound; -use common_meta_sled_store::sled; -use common_meta_sled_store::SledOrderedSerde; -use common_meta_sled_store::SledRangeSerde; -use common_meta_types::NodeId; +use databend_common_meta_sled_store::sled; +use databend_common_meta_sled_store::SledOrderedSerde; +use databend_common_meta_sled_store::SledRangeSerde; +use databend_common_meta_types::NodeId; #[test] fn test_node_id_serde_ser() -> anyhow::Result<()> { diff --git a/src/meta/service/Cargo.toml b/src/meta/service/Cargo.toml index c026a160193c..b9ab688753a9 100644 --- a/src/meta/service/Cargo.toml +++ b/src/meta/service/Cargo.toml @@ -13,32 +13,32 @@ test = true [features] default = ["simd"] -memory-profiling = ["common-base/memory-profiling", "common-http/memory-profiling"] -simd = ["common-arrow/simd"] -tokio-console = ["common-tracing/console", "common-base/tracing"] +memory-profiling = ["databend-common-base/memory-profiling", "databend-common-http/memory-profiling"] +simd = ["databend-common-arrow/simd"] +tokio-console = ["databend-common-tracing/console", "databend-common-base/tracing"] io-uring = [ "sled/io_uring", - "common-meta-sled-store/io-uring", - "common-meta-raft-store/io-uring", + "databend-common-meta-sled-store/io-uring", + "databend-common-meta-raft-store/io-uring", ] -enable-histogram = ["common-metrics/enable-histogram"] +enable-histogram = ["databend-common-metrics/enable-histogram"] [dependencies] # Workspace dependencies -common-arrow = { path = "../../common/arrow" } -common-base = { path = "../../common/base" } -common-grpc = { path = "../../common/grpc" } -common-http = { path = "../../common/http" } -common-meta-api = { path = "../api" } -common-meta-client = { path = "../client" } -common-meta-kvapi = { path = "../kvapi" } -common-meta-raft-store = { path = "../raft-store" } -common-meta-sled-store = { path = "../sled-store" } -common-meta-stoerr = { path = "../stoerr" } -common-meta-types = { path = "../types" } -common-metrics = { path = "../../common/metrics" } -common-tracing = { path = "../../common/tracing" } +databend-common-arrow = { path = "../../common/arrow" } +databend-common-base = { path = "../../common/base" } +databend-common-grpc = { path = "../../common/grpc" } +databend-common-http = { path = "../../common/http" } +databend-common-meta-api = { path = "../api" } +databend-common-meta-client = { path = "../client" } +databend-common-meta-kvapi = { path = "../kvapi" } +databend-common-meta-raft-store = { path = "../raft-store" } +databend-common-meta-sled-store = { path = "../sled-store" } +databend-common-meta-stoerr = { path = "../stoerr" } +databend-common-meta-types = { path = "../types" } +databend-common-metrics = { path = "../../common/metrics" } +databend-common-tracing = { path = "../../common/tracing" } # GitHub dependencies sled = { workspace = true } @@ -79,4 +79,4 @@ tempfile = "3.4.0" test-harness = "0.1.1" [build-dependencies] -common-building = { path = "../../common/building" } +databend-common-building = { path = "../../common/building" } diff --git a/src/meta/service/build.rs b/src/meta/service/build.rs index f15f5ed5e215..a69a90fdcb0f 100644 --- a/src/meta/service/build.rs +++ b/src/meta/service/build.rs @@ -13,5 +13,5 @@ // limitations under the License. fn main() { - common_building::setup(); + databend_common_building::setup(); } diff --git a/src/meta/service/src/api/grpc/grpc_service.rs b/src/meta/service/src/api/grpc/grpc_service.rs index b415a0031d63..87f4b3e2f79c 100644 --- a/src/meta/service/src/api/grpc/grpc_service.rs +++ b/src/meta/service/src/api/grpc/grpc_service.rs @@ -16,31 +16,31 @@ use std::io; use std::pin::Pin; use std::sync::Arc; -use common_arrow::arrow_format::flight::data::BasicAuth; -use common_base::base::tokio::sync::mpsc; -use common_base::base::tokio::time::Instant; -use common_grpc::GrpcClaim; -use common_grpc::GrpcToken; -use common_meta_client::MetaGrpcReadReq; -use common_meta_client::MetaGrpcReq; -use common_meta_kvapi::kvapi::KVApi; -use common_meta_types::protobuf::meta_service_server::MetaService; -use common_meta_types::protobuf::ClientInfo; -use common_meta_types::protobuf::ClusterStatus; -use common_meta_types::protobuf::Empty; -use common_meta_types::protobuf::ExportedChunk; -use common_meta_types::protobuf::HandshakeRequest; -use common_meta_types::protobuf::HandshakeResponse; -use common_meta_types::protobuf::MemberListReply; -use common_meta_types::protobuf::MemberListRequest; -use common_meta_types::protobuf::RaftReply; -use common_meta_types::protobuf::RaftRequest; -use common_meta_types::protobuf::StreamItem; -use common_meta_types::protobuf::WatchRequest; -use common_meta_types::protobuf::WatchResponse; -use common_meta_types::TxnReply; -use common_meta_types::TxnRequest; -use common_metrics::count::Count; +use databend_common_arrow::arrow_format::flight::data::BasicAuth; +use databend_common_base::base::tokio::sync::mpsc; +use databend_common_base::base::tokio::time::Instant; +use databend_common_grpc::GrpcClaim; +use databend_common_grpc::GrpcToken; +use databend_common_meta_client::MetaGrpcReadReq; +use databend_common_meta_client::MetaGrpcReq; +use databend_common_meta_kvapi::kvapi::KVApi; +use databend_common_meta_types::protobuf::meta_service_server::MetaService; +use databend_common_meta_types::protobuf::ClientInfo; +use databend_common_meta_types::protobuf::ClusterStatus; +use databend_common_meta_types::protobuf::Empty; +use databend_common_meta_types::protobuf::ExportedChunk; +use databend_common_meta_types::protobuf::HandshakeRequest; +use databend_common_meta_types::protobuf::HandshakeResponse; +use databend_common_meta_types::protobuf::MemberListReply; +use databend_common_meta_types::protobuf::MemberListRequest; +use databend_common_meta_types::protobuf::RaftReply; +use databend_common_meta_types::protobuf::RaftRequest; +use databend_common_meta_types::protobuf::StreamItem; +use databend_common_meta_types::protobuf::WatchRequest; +use databend_common_meta_types::protobuf::WatchResponse; +use databend_common_meta_types::TxnReply; +use databend_common_meta_types::TxnRequest; +use databend_common_metrics::count::Count; use futures::stream::TryChunksError; use futures::StreamExt; use futures::TryStreamExt; @@ -259,7 +259,7 @@ impl MetaService for MetaServiceImpl { network_metrics::incr_recv_bytes(request.get_ref().encoded_len() as u64); let _guard = RequestInFlight::guard(); - let root = common_tracing::start_trace_for_remote_request(full_name!(), &request); + let root = databend_common_tracing::start_trace_for_remote_request(full_name!(), &request); let reply = self.handle_kv_api(request).in_span(root).await?; network_metrics::incr_sent_bytes(reply.encoded_len() as u64); @@ -276,7 +276,7 @@ impl MetaService for MetaServiceImpl { self.check_token(request.metadata())?; network_metrics::incr_recv_bytes(request.get_ref().encoded_len() as u64); - let root = common_tracing::start_trace_for_remote_request(full_name!(), &request); + let root = databend_common_tracing::start_trace_for_remote_request(full_name!(), &request); let strm = self.handle_kv_read_v1(request).in_span(root).await?; @@ -292,7 +292,7 @@ impl MetaService for MetaServiceImpl { network_metrics::incr_recv_bytes(request.get_ref().encoded_len() as u64); let _guard = RequestInFlight::guard(); - let root = common_tracing::start_trace_for_remote_request(full_name!(), &request); + let root = databend_common_tracing::start_trace_for_remote_request(full_name!(), &request); let reply = self.handle_txn(request).in_span(root).await?; network_metrics::incr_sent_bytes(reply.encoded_len() as u64); @@ -308,7 +308,7 @@ impl MetaService for MetaServiceImpl { /// The exported data is a series of JSON encoded strings of `RaftStoreEntry`. async fn export( &self, - _request: Request, + _request: Request, ) -> Result, Status> { let _guard = RequestInFlight::guard(); diff --git a/src/meta/service/src/api/grpc_server.rs b/src/meta/service/src/api/grpc_server.rs index 289948f2931f..1a46aebed729 100644 --- a/src/meta/service/src/api/grpc_server.rs +++ b/src/meta/service/src/api/grpc_server.rs @@ -15,16 +15,16 @@ use std::sync::Arc; use anyerror::AnyError; -use common_base::base::tokio; -use common_base::base::tokio::sync::oneshot; -use common_base::base::tokio::sync::oneshot::Receiver; -use common_base::base::tokio::sync::oneshot::Sender; -use common_base::base::tokio::task::JoinHandle; -use common_base::base::Stoppable; -use common_meta_types::protobuf::meta_service_server::MetaServiceServer; -use common_meta_types::protobuf::FILE_DESCRIPTOR_SET; -use common_meta_types::GrpcConfig; -use common_meta_types::MetaNetworkError; +use databend_common_base::base::tokio; +use databend_common_base::base::tokio::sync::oneshot; +use databend_common_base::base::tokio::sync::oneshot::Receiver; +use databend_common_base::base::tokio::sync::oneshot::Sender; +use databend_common_base::base::tokio::task::JoinHandle; +use databend_common_base::base::Stoppable; +use databend_common_meta_types::protobuf::meta_service_server::MetaServiceServer; +use databend_common_meta_types::protobuf::FILE_DESCRIPTOR_SET; +use databend_common_meta_types::GrpcConfig; +use databend_common_meta_types::MetaNetworkError; use futures::future::Either; use log::info; use minitrace::prelude::*; diff --git a/src/meta/service/src/api/http_service.rs b/src/meta/service/src/api/http_service.rs index d1e330455022..cacc8b27abf0 100644 --- a/src/meta/service/src/api/http_service.rs +++ b/src/meta/service/src/api/http_service.rs @@ -16,16 +16,16 @@ use std::net::SocketAddr; use std::sync::Arc; use anyerror::AnyError; -use common_base::base::tokio::sync::broadcast; -use common_base::base::Stoppable; -use common_http::health_handler; -use common_http::home::debug_home_handler; +use databend_common_base::base::tokio::sync::broadcast; +use databend_common_base::base::Stoppable; +use databend_common_http::health_handler; +use databend_common_http::home::debug_home_handler; #[cfg(feature = "memory-profiling")] -use common_http::jeprof::debug_jeprof_dump_handler; -use common_http::pprof::debug_pprof_handler; -use common_http::HttpError; -use common_http::HttpShutdownHandler; -use common_meta_types::MetaNetworkError; +use databend_common_http::jeprof::debug_jeprof_dump_handler; +use databend_common_http::pprof::debug_pprof_handler; +use databend_common_http::HttpError; +use databend_common_http::HttpShutdownHandler; +use databend_common_meta_types::MetaNetworkError; use log::info; use log::warn; use poem::get; diff --git a/src/meta/service/src/configs/inner.rs b/src/meta/service/src/configs/inner.rs index 611692a3cfc4..ccae63cdf840 100644 --- a/src/meta/service/src/configs/inner.rs +++ b/src/meta/service/src/configs/inner.rs @@ -14,10 +14,10 @@ use std::net::SocketAddr; -use common_meta_raft_store::config::RaftConfig; -use common_meta_types::MetaStartupError; -use common_meta_types::Node; -use common_tracing::Config as LogConfig; +use databend_common_meta_raft_store::config::RaftConfig; +use databend_common_meta_types::MetaStartupError; +use databend_common_meta_types::Node; +use databend_common_tracing::Config as LogConfig; use super::outer_v0::Config as OuterV0Config; diff --git a/src/meta/service/src/configs/outer_v0.rs b/src/meta/service/src/configs/outer_v0.rs index 354b439847a1..c740f115f0c9 100644 --- a/src/meta/service/src/configs/outer_v0.rs +++ b/src/meta/service/src/configs/outer_v0.rs @@ -17,16 +17,16 @@ use std::env; use clap::ArgAction; use clap::Args; use clap::Parser; -use common_meta_raft_store::config::get_default_raft_advertise_host; -use common_meta_raft_store::config::RaftConfig as InnerRaftConfig; -use common_meta_types::MetaStartupError; -use common_tracing::Config as InnerLogConfig; -use common_tracing::FileConfig as InnerFileLogConfig; -use common_tracing::OTLPConfig; -use common_tracing::ProfileLogConfig; -use common_tracing::QueryLogConfig; -use common_tracing::StderrConfig as InnerStderrLogConfig; -use common_tracing::TracingConfig; +use databend_common_meta_raft_store::config::get_default_raft_advertise_host; +use databend_common_meta_raft_store::config::RaftConfig as InnerRaftConfig; +use databend_common_meta_types::MetaStartupError; +use databend_common_tracing::Config as InnerLogConfig; +use databend_common_tracing::FileConfig as InnerFileLogConfig; +use databend_common_tracing::OTLPConfig; +use databend_common_tracing::ProfileLogConfig; +use databend_common_tracing::QueryLogConfig; +use databend_common_tracing::StderrConfig as InnerStderrLogConfig; +use databend_common_tracing::TracingConfig; use serde::Deserialize; use serde::Serialize; use serfig::collectors::from_env; diff --git a/src/meta/service/src/export.rs b/src/meta/service/src/export.rs index 835743823eca..6064b0269df8 100644 --- a/src/meta/service/src/export.rs +++ b/src/meta/service/src/export.rs @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_meta_raft_store::key_spaces::RaftStoreEntry; -use common_meta_stoerr::MetaStorageError; +use databend_common_meta_raft_store::key_spaces::RaftStoreEntry; +use databend_common_meta_stoerr::MetaStorageError; /// Convert one line of serialized key-value into json. /// diff --git a/src/meta/service/src/grpc_helper.rs b/src/meta/service/src/grpc_helper.rs index 6d2ee03695d2..a805ab0a5be8 100644 --- a/src/meta/service/src/grpc_helper.rs +++ b/src/meta/service/src/grpc_helper.rs @@ -16,9 +16,9 @@ use std::error::Error; -use common_meta_types::protobuf::RaftReply; -use common_meta_types::protobuf::RaftRequest; -use common_meta_types::RaftError; +use databend_common_meta_types::protobuf::RaftReply; +use databend_common_meta_types::protobuf::RaftRequest; +use databend_common_meta_types::RaftError; pub struct GrpcHelper; @@ -26,7 +26,7 @@ impl GrpcHelper { /// Inject span into a tonic request, so that on the remote peer the tracing context can be restored. pub fn traced_req(t: T) -> tonic::Request { let req = tonic::Request::new(t); - common_tracing::inject_span_to_tonic_request(req) + databend_common_tracing::inject_span_to_tonic_request(req) } pub fn encode_raft_request(v: &T) -> Result diff --git a/src/meta/service/src/message.rs b/src/meta/service/src/message.rs index c1f92435cbc5..90c3b5f7ff15 100644 --- a/src/meta/service/src/message.rs +++ b/src/meta/service/src/message.rs @@ -13,19 +13,19 @@ // limitations under the License. use anyerror::AnyError; -use common_meta_client::MetaGrpcReadReq; -use common_meta_kvapi::kvapi::GetKVReply; -use common_meta_kvapi::kvapi::GetKVReq; -use common_meta_kvapi::kvapi::ListKVReply; -use common_meta_kvapi::kvapi::ListKVReq; -use common_meta_kvapi::kvapi::MGetKVReply; -use common_meta_kvapi::kvapi::MGetKVReq; -use common_meta_types::protobuf::RaftRequest; -use common_meta_types::AppliedState; -use common_meta_types::Endpoint; -use common_meta_types::LogEntry; -use common_meta_types::MetaAPIError; -use common_meta_types::NodeId; +use databend_common_meta_client::MetaGrpcReadReq; +use databend_common_meta_kvapi::kvapi::GetKVReply; +use databend_common_meta_kvapi::kvapi::GetKVReq; +use databend_common_meta_kvapi::kvapi::ListKVReply; +use databend_common_meta_kvapi::kvapi::ListKVReq; +use databend_common_meta_kvapi::kvapi::MGetKVReply; +use databend_common_meta_kvapi::kvapi::MGetKVReq; +use databend_common_meta_types::protobuf::RaftRequest; +use databend_common_meta_types::AppliedState; +use databend_common_meta_types::Endpoint; +use databend_common_meta_types::LogEntry; +use databend_common_meta_types::MetaAPIError; +use databend_common_meta_types::NodeId; #[derive(serde::Serialize, serde::Deserialize, Debug, Default, Clone, PartialEq, Eq)] pub struct JoinRequest { diff --git a/src/meta/service/src/meta_service/errors.rs b/src/meta/service/src/meta_service/errors.rs index a055b320ff09..1b2d6a10bd95 100644 --- a/src/meta/service/src/meta_service/errors.rs +++ b/src/meta/service/src/meta_service/errors.rs @@ -12,9 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_grpc::GrpcConnectionError; -use common_meta_types::ConnectionError; -use common_meta_types::MetaNetworkError; +use databend_common_grpc::GrpcConnectionError; +use databend_common_meta_types::ConnectionError; +use databend_common_meta_types::MetaNetworkError; pub(crate) fn grpc_error_to_network_err(e: GrpcConnectionError) -> MetaNetworkError { match e { diff --git a/src/meta/service/src/meta_service/forwarder.rs b/src/meta/service/src/meta_service/forwarder.rs index 15f1021b9092..cd40524f9faf 100644 --- a/src/meta/service/src/meta_service/forwarder.rs +++ b/src/meta/service/src/meta_service/forwarder.rs @@ -14,17 +14,17 @@ //! Forward request to another node -use common_meta_api::reply::reply_to_api_result; -use common_meta_client::MetaGrpcReadReq; -use common_meta_types::protobuf::raft_service_client::RaftServiceClient; -use common_meta_types::protobuf::StreamItem; -use common_meta_types::ConnectionError; -use common_meta_types::Endpoint; -use common_meta_types::ForwardRPCError; -use common_meta_types::GrpcConfig; -use common_meta_types::MetaAPIError; -use common_meta_types::MetaNetworkError; -use common_meta_types::NodeId; +use databend_common_meta_api::reply::reply_to_api_result; +use databend_common_meta_client::MetaGrpcReadReq; +use databend_common_meta_types::protobuf::raft_service_client::RaftServiceClient; +use databend_common_meta_types::protobuf::StreamItem; +use databend_common_meta_types::ConnectionError; +use databend_common_meta_types::Endpoint; +use databend_common_meta_types::ForwardRPCError; +use databend_common_meta_types::GrpcConfig; +use databend_common_meta_types::MetaAPIError; +use databend_common_meta_types::MetaNetworkError; +use databend_common_meta_types::NodeId; use log::debug; use tonic::codegen::BoxStream; use tonic::transport::Channel; diff --git a/src/meta/service/src/meta_service/meta_leader.rs b/src/meta/service/src/meta_service/meta_leader.rs index aa62aa47d5f3..bb607ccc40b7 100644 --- a/src/meta/service/src/meta_service/meta_leader.rs +++ b/src/meta/service/src/meta_service/meta_leader.rs @@ -14,27 +14,27 @@ use std::collections::BTreeSet; -use common_base::base::tokio::sync::RwLockReadGuard; -use common_meta_client::MetaGrpcReadReq; -use common_meta_kvapi::kvapi::KVApi; -use common_meta_raft_store::sm_v002::leveled_store::sys_data_api::SysDataApiRO; -use common_meta_raft_store::sm_v002::SMV002; -use common_meta_sled_store::openraft::ChangeMembers; -use common_meta_stoerr::MetaStorageError; -use common_meta_types::protobuf::StreamItem; -use common_meta_types::AppliedState; -use common_meta_types::ClientWriteError; -use common_meta_types::Cmd; -use common_meta_types::LogEntry; -use common_meta_types::MembershipNode; -use common_meta_types::MetaDataError; -use common_meta_types::MetaDataReadError; -use common_meta_types::MetaOperationError; -use common_meta_types::Node; -use common_meta_types::NodeId; -use common_meta_types::RaftError; -use common_meta_types::SeqV; -use common_metrics::count::Count; +use databend_common_base::base::tokio::sync::RwLockReadGuard; +use databend_common_meta_client::MetaGrpcReadReq; +use databend_common_meta_kvapi::kvapi::KVApi; +use databend_common_meta_raft_store::sm_v002::leveled_store::sys_data_api::SysDataApiRO; +use databend_common_meta_raft_store::sm_v002::SMV002; +use databend_common_meta_sled_store::openraft::ChangeMembers; +use databend_common_meta_stoerr::MetaStorageError; +use databend_common_meta_types::protobuf::StreamItem; +use databend_common_meta_types::AppliedState; +use databend_common_meta_types::ClientWriteError; +use databend_common_meta_types::Cmd; +use databend_common_meta_types::LogEntry; +use databend_common_meta_types::MembershipNode; +use databend_common_meta_types::MetaDataError; +use databend_common_meta_types::MetaDataReadError; +use databend_common_meta_types::MetaOperationError; +use databend_common_meta_types::Node; +use databend_common_meta_types::NodeId; +use databend_common_meta_types::RaftError; +use databend_common_meta_types::SeqV; +use databend_common_metrics::count::Count; use futures::StreamExt; use log::as_debug; use log::debug; diff --git a/src/meta/service/src/meta_service/meta_node.rs b/src/meta/service/src/meta_service/meta_node.rs index 53e5b7012eac..b86763012255 100644 --- a/src/meta/service/src/meta_service/meta_node.rs +++ b/src/meta/service/src/meta_service/meta_node.rs @@ -21,49 +21,49 @@ use std::sync::Arc; use std::time::Duration; use anyerror::AnyError; -use common_base::base::tokio; -use common_base::base::tokio::sync::watch; -use common_base::base::tokio::sync::watch::error::RecvError; -use common_base::base::tokio::sync::Mutex; -use common_base::base::tokio::task::JoinHandle; -use common_base::base::tokio::time::sleep; -use common_base::base::tokio::time::Instant; -use common_grpc::ConnectionFactory; -use common_grpc::DNSResolver; -use common_meta_client::reply_to_api_result; -use common_meta_client::RequestFor; -use common_meta_raft_store::config::RaftConfig; -use common_meta_raft_store::ondisk::DataVersion; -use common_meta_raft_store::ondisk::DATA_VERSION; -use common_meta_raft_store::sm_v002::leveled_store::sys_data_api::SysDataApiRO; -use common_meta_sled_store::openraft; -use common_meta_sled_store::openraft::storage::Adaptor; -use common_meta_sled_store::openraft::ChangeMembers; -use common_meta_stoerr::MetaStorageError; -use common_meta_types::protobuf::raft_service_client::RaftServiceClient; -use common_meta_types::protobuf::raft_service_server::RaftServiceServer; -use common_meta_types::protobuf::WatchRequest; -use common_meta_types::AppliedState; -use common_meta_types::Cmd; -use common_meta_types::CommittedLeaderId; -use common_meta_types::Endpoint; -use common_meta_types::ForwardRPCError; -use common_meta_types::ForwardToLeader; -use common_meta_types::GrpcConfig; -use common_meta_types::InvalidReply; -use common_meta_types::LogEntry; -use common_meta_types::LogId; -use common_meta_types::MembershipNode; -use common_meta_types::MetaAPIError; -use common_meta_types::MetaError; -use common_meta_types::MetaManagementError; -use common_meta_types::MetaNetworkError; -use common_meta_types::MetaOperationError; -use common_meta_types::MetaStartupError; -use common_meta_types::Node; -use common_meta_types::NodeId; -use common_meta_types::RaftMetrics; -use common_meta_types::TypeConfig; +use databend_common_base::base::tokio; +use databend_common_base::base::tokio::sync::watch; +use databend_common_base::base::tokio::sync::watch::error::RecvError; +use databend_common_base::base::tokio::sync::Mutex; +use databend_common_base::base::tokio::task::JoinHandle; +use databend_common_base::base::tokio::time::sleep; +use databend_common_base::base::tokio::time::Instant; +use databend_common_grpc::ConnectionFactory; +use databend_common_grpc::DNSResolver; +use databend_common_meta_client::reply_to_api_result; +use databend_common_meta_client::RequestFor; +use databend_common_meta_raft_store::config::RaftConfig; +use databend_common_meta_raft_store::ondisk::DataVersion; +use databend_common_meta_raft_store::ondisk::DATA_VERSION; +use databend_common_meta_raft_store::sm_v002::leveled_store::sys_data_api::SysDataApiRO; +use databend_common_meta_sled_store::openraft; +use databend_common_meta_sled_store::openraft::storage::Adaptor; +use databend_common_meta_sled_store::openraft::ChangeMembers; +use databend_common_meta_stoerr::MetaStorageError; +use databend_common_meta_types::protobuf::raft_service_client::RaftServiceClient; +use databend_common_meta_types::protobuf::raft_service_server::RaftServiceServer; +use databend_common_meta_types::protobuf::WatchRequest; +use databend_common_meta_types::AppliedState; +use databend_common_meta_types::Cmd; +use databend_common_meta_types::CommittedLeaderId; +use databend_common_meta_types::Endpoint; +use databend_common_meta_types::ForwardRPCError; +use databend_common_meta_types::ForwardToLeader; +use databend_common_meta_types::GrpcConfig; +use databend_common_meta_types::InvalidReply; +use databend_common_meta_types::LogEntry; +use databend_common_meta_types::LogId; +use databend_common_meta_types::MembershipNode; +use databend_common_meta_types::MetaAPIError; +use databend_common_meta_types::MetaError; +use databend_common_meta_types::MetaManagementError; +use databend_common_meta_types::MetaNetworkError; +use databend_common_meta_types::MetaOperationError; +use databend_common_meta_types::MetaStartupError; +use databend_common_meta_types::Node; +use databend_common_meta_types::NodeId; +use databend_common_meta_types::RaftMetrics; +use databend_common_meta_types::TypeConfig; use futures::channel::oneshot; use itertools::Itertools; use log::as_debug; diff --git a/src/meta/service/src/meta_service/meta_node_kv_api_impl.rs b/src/meta/service/src/meta_service/meta_node_kv_api_impl.rs index ecf75e9e5719..3a1fd2735707 100644 --- a/src/meta/service/src/meta_service/meta_node_kv_api_impl.rs +++ b/src/meta/service/src/meta_service/meta_node_kv_api_impl.rs @@ -13,24 +13,24 @@ // limitations under the License. use async_trait::async_trait; -use common_meta_client::MetaGrpcReadReq; -use common_meta_kvapi::kvapi; -use common_meta_kvapi::kvapi::GetKVReply; -use common_meta_kvapi::kvapi::GetKVReq; -use common_meta_kvapi::kvapi::KVStream; -use common_meta_kvapi::kvapi::ListKVReq; -use common_meta_kvapi::kvapi::MGetKVReply; -use common_meta_kvapi::kvapi::MGetKVReq; -use common_meta_kvapi::kvapi::UpsertKVReply; -use common_meta_kvapi::kvapi::UpsertKVReq; -use common_meta_types::AppliedState; -use common_meta_types::Cmd; -use common_meta_types::LogEntry; -use common_meta_types::MetaAPIError; -use common_meta_types::MetaNetworkError; -use common_meta_types::TxnReply; -use common_meta_types::TxnRequest; -use common_meta_types::UpsertKV; +use databend_common_meta_client::MetaGrpcReadReq; +use databend_common_meta_kvapi::kvapi; +use databend_common_meta_kvapi::kvapi::GetKVReply; +use databend_common_meta_kvapi::kvapi::GetKVReq; +use databend_common_meta_kvapi::kvapi::KVStream; +use databend_common_meta_kvapi::kvapi::ListKVReq; +use databend_common_meta_kvapi::kvapi::MGetKVReply; +use databend_common_meta_kvapi::kvapi::MGetKVReq; +use databend_common_meta_kvapi::kvapi::UpsertKVReply; +use databend_common_meta_kvapi::kvapi::UpsertKVReq; +use databend_common_meta_types::AppliedState; +use databend_common_meta_types::Cmd; +use databend_common_meta_types::LogEntry; +use databend_common_meta_types::MetaAPIError; +use databend_common_meta_types::MetaNetworkError; +use databend_common_meta_types::TxnReply; +use databend_common_meta_types::TxnRequest; +use databend_common_meta_types::UpsertKV; use futures::StreamExt; use futures::TryStreamExt; use log::info; diff --git a/src/meta/service/src/meta_service/raft_service_impl.rs b/src/meta/service/src/meta_service/raft_service_impl.rs index ccae1033df1c..b96952561601 100644 --- a/src/meta/service/src/meta_service/raft_service_impl.rs +++ b/src/meta/service/src/meta_service/raft_service_impl.rs @@ -18,17 +18,17 @@ use std::sync::Arc; use std::time::Duration; -use common_base::future::TimingFutureExt; -use common_meta_client::MetaGrpcReadReq; -use common_meta_types::protobuf::raft_service_server::RaftService; -use common_meta_types::protobuf::RaftReply; -use common_meta_types::protobuf::RaftRequest; -use common_meta_types::protobuf::SnapshotChunkRequest; -use common_meta_types::protobuf::StreamItem; -use common_meta_types::InstallSnapshotRequest; -use common_meta_types::SnapshotMeta; -use common_meta_types::Vote; -use common_metrics::count::Count; +use databend_common_base::future::TimingFutureExt; +use databend_common_meta_client::MetaGrpcReadReq; +use databend_common_meta_types::protobuf::raft_service_server::RaftService; +use databend_common_meta_types::protobuf::RaftReply; +use databend_common_meta_types::protobuf::RaftRequest; +use databend_common_meta_types::protobuf::SnapshotChunkRequest; +use databend_common_meta_types::protobuf::StreamItem; +use databend_common_meta_types::InstallSnapshotRequest; +use databend_common_meta_types::SnapshotMeta; +use databend_common_meta_types::Vote; +use databend_common_metrics::count::Count; use minitrace::full_name; use minitrace::prelude::*; use tonic::codegen::BoxStream; @@ -131,7 +131,7 @@ impl RaftServiceImpl { #[async_trait::async_trait] impl RaftService for RaftServiceImpl { async fn forward(&self, request: Request) -> Result, Status> { - let root = common_tracing::start_trace_for_remote_request(full_name!(), &request); + let root = databend_common_tracing::start_trace_for_remote_request(full_name!(), &request); async { let forward_req: ForwardRequest = GrpcHelper::parse_req(request)?; @@ -152,7 +152,7 @@ impl RaftService for RaftServiceImpl { &self, request: Request, ) -> Result, Status> { - let root = common_tracing::start_trace_for_remote_request(full_name!(), &request); + let root = databend_common_tracing::start_trace_for_remote_request(full_name!(), &request); async { let forward_req: ForwardRequest = GrpcHelper::parse_req(request)?; @@ -173,7 +173,7 @@ impl RaftService for RaftServiceImpl { &self, request: Request, ) -> Result, Status> { - let root = common_tracing::start_trace_for_remote_request(full_name!(), &request); + let root = databend_common_tracing::start_trace_for_remote_request(full_name!(), &request); async { self.incr_meta_metrics_recv_bytes_from_peer(&request); @@ -196,7 +196,7 @@ impl RaftService for RaftServiceImpl { &self, request: Request, ) -> Result, Status> { - let root = common_tracing::start_trace_for_remote_request(full_name!(), &request); + let root = databend_common_tracing::start_trace_for_remote_request(full_name!(), &request); self.do_install_snapshot(request).in_span(root).await } @@ -204,12 +204,12 @@ impl RaftService for RaftServiceImpl { &self, request: Request, ) -> Result, Status> { - let root = common_tracing::start_trace_for_remote_request(full_name!(), &request); + let root = databend_common_tracing::start_trace_for_remote_request(full_name!(), &request); self.do_install_snapshot_v1(request).in_span(root).await } async fn vote(&self, request: Request) -> Result, Status> { - let root = common_tracing::start_trace_for_remote_request(full_name!(), &request); + let root = databend_common_tracing::start_trace_for_remote_request(full_name!(), &request); async { self.incr_meta_metrics_recv_bytes_from_peer(&request); diff --git a/src/meta/service/src/metrics/meta_metrics.rs b/src/meta/service/src/metrics/meta_metrics.rs index 8a4c0f867458..5ab8787abf37 100644 --- a/src/meta/service/src/metrics/meta_metrics.rs +++ b/src/meta/service/src/metrics/meta_metrics.rs @@ -26,13 +26,13 @@ use std::time::Instant; -use common_metrics::count; +use databend_common_metrics::count; use prometheus_client::encoding::text::encode as prometheus_encode; pub mod server_metrics { use std::sync::LazyLock; - use common_meta_types::NodeId; + use databend_common_meta_types::NodeId; use prometheus_client::metrics::counter::Counter; use prometheus_client::metrics::gauge::Gauge; @@ -198,7 +198,7 @@ pub mod raft_metrics { pub mod network { use std::sync::LazyLock; - use common_meta_types::NodeId; + use databend_common_meta_types::NodeId; use prometheus_client; use prometheus_client::encoding::EncodeLabelSet; use prometheus_client::metrics::counter::Counter; diff --git a/src/meta/service/src/network.rs b/src/meta/service/src/network.rs index fa19a62a4dc4..dd08bc011dd2 100644 --- a/src/meta/service/src/network.rs +++ b/src/meta/service/src/network.rs @@ -20,33 +20,33 @@ use std::time::Duration; use anyerror::AnyError; use backon::BackoffBuilder; use backon::ExponentialBuilder; -use common_base::base::tokio::time::sleep; -use common_base::containers::ItemManager; -use common_base::containers::Pool; -use common_base::future::TimingFutureExt; -use common_meta_sled_store::openraft; -use common_meta_sled_store::openraft::error::PayloadTooLarge; -use common_meta_sled_store::openraft::MessageSummary; -use common_meta_sled_store::openraft::RaftNetworkFactory; -use common_meta_types::protobuf::RaftRequest; -use common_meta_types::protobuf::SnapshotChunkRequest; -use common_meta_types::AppendEntriesRequest; -use common_meta_types::AppendEntriesResponse; -use common_meta_types::GrpcConfig; -use common_meta_types::InstallSnapshotError; -use common_meta_types::InstallSnapshotRequest; -use common_meta_types::InstallSnapshotResponse; -use common_meta_types::MembershipNode; -use common_meta_types::MetaNetworkError; -use common_meta_types::NetworkError; -use common_meta_types::NodeId; -use common_meta_types::RPCError; -use common_meta_types::RaftError; -use common_meta_types::RemoteError; -use common_meta_types::TypeConfig; -use common_meta_types::VoteRequest; -use common_meta_types::VoteResponse; -use common_metrics::count::Count; +use databend_common_base::base::tokio::time::sleep; +use databend_common_base::containers::ItemManager; +use databend_common_base::containers::Pool; +use databend_common_base::future::TimingFutureExt; +use databend_common_meta_sled_store::openraft; +use databend_common_meta_sled_store::openraft::error::PayloadTooLarge; +use databend_common_meta_sled_store::openraft::MessageSummary; +use databend_common_meta_sled_store::openraft::RaftNetworkFactory; +use databend_common_meta_types::protobuf::RaftRequest; +use databend_common_meta_types::protobuf::SnapshotChunkRequest; +use databend_common_meta_types::AppendEntriesRequest; +use databend_common_meta_types::AppendEntriesResponse; +use databend_common_meta_types::GrpcConfig; +use databend_common_meta_types::InstallSnapshotError; +use databend_common_meta_types::InstallSnapshotRequest; +use databend_common_meta_types::InstallSnapshotResponse; +use databend_common_meta_types::MembershipNode; +use databend_common_meta_types::MetaNetworkError; +use databend_common_meta_types::NetworkError; +use databend_common_meta_types::NodeId; +use databend_common_meta_types::RPCError; +use databend_common_meta_types::RaftError; +use databend_common_meta_types::RemoteError; +use databend_common_meta_types::TypeConfig; +use databend_common_meta_types::VoteRequest; +use databend_common_meta_types::VoteResponse; +use databend_common_metrics::count::Count; use log::debug; use log::info; use log::warn; @@ -377,7 +377,7 @@ impl RaftNetwork for NetworkConnection { // Send via v1 API let v1_req = SnapshotChunkRequest::new_v1(rpc.clone()); - let req = common_tracing::inject_span_to_tonic_request(v1_req); + let req = databend_common_tracing::inject_span_to_tonic_request(v1_req); let res = client .install_snapshot_v1(req) .timed(observe_snapshot_send_spent(self.target)) @@ -401,7 +401,7 @@ impl RaftNetwork for NetworkConnection { self.install_snapshot_via_v0 -= 1; - let req = common_tracing::inject_span_to_tonic_request(rpc.clone()); + let req = databend_common_tracing::inject_span_to_tonic_request(rpc.clone()); client .install_snapshot(req) .timed(observe_snapshot_send_spent(self.target)) diff --git a/src/meta/service/src/raft_client.rs b/src/meta/service/src/raft_client.rs index d6daedbe0a30..5428893fbe21 100644 --- a/src/meta/service/src/raft_client.rs +++ b/src/meta/service/src/raft_client.rs @@ -12,11 +12,11 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_meta_types::protobuf::raft_service_client::RaftServiceClient; -use common_meta_types::Endpoint; -use common_meta_types::GrpcConfig; -use common_meta_types::NodeId; -use common_metrics::count; +use databend_common_meta_types::protobuf::raft_service_client::RaftServiceClient; +use databend_common_meta_types::Endpoint; +use databend_common_meta_types::GrpcConfig; +use databend_common_meta_types::NodeId; +use databend_common_metrics::count; use log::debug; use tonic::transport::channel::Channel; diff --git a/src/meta/service/src/request_handling.rs b/src/meta/service/src/request_handling.rs index b557e33ce345..442053c0ff1b 100644 --- a/src/meta/service/src/request_handling.rs +++ b/src/meta/service/src/request_handling.rs @@ -12,10 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_meta_client::RequestFor; -use common_meta_types::ForwardRPCError; -use common_meta_types::MetaOperationError; -use common_meta_types::NodeId; +use databend_common_meta_client::RequestFor; +use databend_common_meta_types::ForwardRPCError; +use databend_common_meta_types::MetaOperationError; +use databend_common_meta_types::NodeId; use crate::message::ForwardRequest; use crate::message::ForwardRequestBody; diff --git a/src/meta/service/src/store/store.rs b/src/meta/service/src/store/store.rs index 734fae58233a..f6dd202bce9e 100644 --- a/src/meta/service/src/store/store.rs +++ b/src/meta/service/src/store/store.rs @@ -18,28 +18,28 @@ use std::ops::RangeBounds; use std::sync::Arc; use async_trait::async_trait; -use common_meta_raft_store::config::RaftConfig; -use common_meta_raft_store::ondisk::DATA_VERSION; -use common_meta_raft_store::sm_v002::leveled_store::sys_data_api::SysDataApiRO; -use common_meta_raft_store::sm_v002::SnapshotStoreV002; -use common_meta_raft_store::state_machine::StoredSnapshot; -use common_meta_sled_store::openraft::ErrorSubject; -use common_meta_sled_store::openraft::ErrorVerb; -use common_meta_sled_store::openraft::LogState; -use common_meta_sled_store::openraft::RaftLogReader; -use common_meta_sled_store::openraft::RaftSnapshotBuilder; -use common_meta_sled_store::openraft::RaftStorage; -use common_meta_types::AppliedState; -use common_meta_types::Entry; -use common_meta_types::LogId; -use common_meta_types::MetaStartupError; -use common_meta_types::Snapshot; -use common_meta_types::SnapshotData; -use common_meta_types::SnapshotMeta; -use common_meta_types::StorageError; -use common_meta_types::StoredMembership; -use common_meta_types::TypeConfig; -use common_meta_types::Vote; +use databend_common_meta_raft_store::config::RaftConfig; +use databend_common_meta_raft_store::ondisk::DATA_VERSION; +use databend_common_meta_raft_store::sm_v002::leveled_store::sys_data_api::SysDataApiRO; +use databend_common_meta_raft_store::sm_v002::SnapshotStoreV002; +use databend_common_meta_raft_store::state_machine::StoredSnapshot; +use databend_common_meta_sled_store::openraft::ErrorSubject; +use databend_common_meta_sled_store::openraft::ErrorVerb; +use databend_common_meta_sled_store::openraft::LogState; +use databend_common_meta_sled_store::openraft::RaftLogReader; +use databend_common_meta_sled_store::openraft::RaftSnapshotBuilder; +use databend_common_meta_sled_store::openraft::RaftStorage; +use databend_common_meta_types::AppliedState; +use databend_common_meta_types::Entry; +use databend_common_meta_types::LogId; +use databend_common_meta_types::MetaStartupError; +use databend_common_meta_types::Snapshot; +use databend_common_meta_types::SnapshotData; +use databend_common_meta_types::SnapshotMeta; +use databend_common_meta_types::StorageError; +use databend_common_meta_types::StoredMembership; +use databend_common_meta_types::TypeConfig; +use databend_common_meta_types::Vote; use log::as_debug; use log::debug; use log::error; diff --git a/src/meta/service/src/store/store_inner.rs b/src/meta/service/src/store/store_inner.rs index 0113cd963678..a31136670389 100644 --- a/src/meta/service/src/store/store_inner.rs +++ b/src/meta/service/src/store/store_inner.rs @@ -18,46 +18,46 @@ use std::sync::Arc; use std::time::Duration; use anyerror::AnyError; -use common_base::base::tokio; -use common_base::base::tokio::io::AsyncBufReadExt; -use common_base::base::tokio::io::BufReader; -use common_base::base::tokio::sync::RwLock; -use common_base::base::tokio::sync::RwLockWriteGuard; -use common_meta_raft_store::config::RaftConfig; -use common_meta_raft_store::key_spaces::RaftStateKV; -use common_meta_raft_store::key_spaces::RaftStoreEntry; -use common_meta_raft_store::log::RaftLog; -use common_meta_raft_store::ondisk::DATA_VERSION; -use common_meta_raft_store::ondisk::TREE_HEADER; -use common_meta_raft_store::sm_v002::leveled_store::sys_data_api::SysDataApiRO; -use common_meta_raft_store::sm_v002::SnapshotStoreError; -use common_meta_raft_store::sm_v002::SnapshotStoreV002; -use common_meta_raft_store::sm_v002::SnapshotViewV002; -use common_meta_raft_store::sm_v002::SMV002; -use common_meta_raft_store::state::RaftState; -use common_meta_raft_store::state::RaftStateKey; -use common_meta_raft_store::state::RaftStateValue; -use common_meta_raft_store::state_machine::MetaSnapshotId; -use common_meta_raft_store::state_machine::StoredSnapshot; -use common_meta_sled_store::get_sled_db; -use common_meta_sled_store::openraft::ErrorSubject; -use common_meta_sled_store::openraft::ErrorVerb; -use common_meta_sled_store::SledTree; -use common_meta_stoerr::MetaStorageError; -use common_meta_types::Endpoint; -use common_meta_types::LogId; -use common_meta_types::Membership; -use common_meta_types::MetaError; -use common_meta_types::MetaNetworkError; -use common_meta_types::MetaStartupError; -use common_meta_types::Node; -use common_meta_types::NodeId; -use common_meta_types::Snapshot; -use common_meta_types::SnapshotData; -use common_meta_types::SnapshotMeta; -use common_meta_types::StorageError; -use common_meta_types::StorageIOError; -use common_meta_types::Vote; +use databend_common_base::base::tokio; +use databend_common_base::base::tokio::io::AsyncBufReadExt; +use databend_common_base::base::tokio::io::BufReader; +use databend_common_base::base::tokio::sync::RwLock; +use databend_common_base::base::tokio::sync::RwLockWriteGuard; +use databend_common_meta_raft_store::config::RaftConfig; +use databend_common_meta_raft_store::key_spaces::RaftStateKV; +use databend_common_meta_raft_store::key_spaces::RaftStoreEntry; +use databend_common_meta_raft_store::log::RaftLog; +use databend_common_meta_raft_store::ondisk::DATA_VERSION; +use databend_common_meta_raft_store::ondisk::TREE_HEADER; +use databend_common_meta_raft_store::sm_v002::leveled_store::sys_data_api::SysDataApiRO; +use databend_common_meta_raft_store::sm_v002::SnapshotStoreError; +use databend_common_meta_raft_store::sm_v002::SnapshotStoreV002; +use databend_common_meta_raft_store::sm_v002::SnapshotViewV002; +use databend_common_meta_raft_store::sm_v002::SMV002; +use databend_common_meta_raft_store::state::RaftState; +use databend_common_meta_raft_store::state::RaftStateKey; +use databend_common_meta_raft_store::state::RaftStateValue; +use databend_common_meta_raft_store::state_machine::MetaSnapshotId; +use databend_common_meta_raft_store::state_machine::StoredSnapshot; +use databend_common_meta_sled_store::get_sled_db; +use databend_common_meta_sled_store::openraft::ErrorSubject; +use databend_common_meta_sled_store::openraft::ErrorVerb; +use databend_common_meta_sled_store::SledTree; +use databend_common_meta_stoerr::MetaStorageError; +use databend_common_meta_types::Endpoint; +use databend_common_meta_types::LogId; +use databend_common_meta_types::Membership; +use databend_common_meta_types::MetaError; +use databend_common_meta_types::MetaNetworkError; +use databend_common_meta_types::MetaStartupError; +use databend_common_meta_types::Node; +use databend_common_meta_types::NodeId; +use databend_common_meta_types::Snapshot; +use databend_common_meta_types::SnapshotData; +use databend_common_meta_types::SnapshotMeta; +use databend_common_meta_types::StorageError; +use databend_common_meta_types::StorageIOError; +use databend_common_meta_types::Vote; use futures::Stream; use log::as_display; use log::debug; diff --git a/src/meta/service/src/store/to_storage_error.rs b/src/meta/service/src/store/to_storage_error.rs index d2cf5264b291..5374177f2efa 100644 --- a/src/meta/service/src/store/to_storage_error.rs +++ b/src/meta/service/src/store/to_storage_error.rs @@ -13,14 +13,14 @@ // limitations under the License. use anyerror::AnyError; -use common_meta_sled_store::openraft; -use common_meta_stoerr::MetaStorageError; -use common_meta_types::ErrorSubject; -use common_meta_types::StorageError; +use databend_common_meta_sled_store::openraft; +use databend_common_meta_stoerr::MetaStorageError; +use databend_common_meta_types::ErrorSubject; +use databend_common_meta_types::StorageError; use openraft::ErrorVerb; use openraft::StorageIOError; -/// Convert MetaStorageError to openraft::StorageError; +/// Convert MetaStorageError to openraft::StorageError; pub trait ToStorageError { fn map_to_sto_err(self, subject: ErrorSubject, verb: ErrorVerb) -> Result; } diff --git a/src/meta/service/src/watcher/watcher_manager.rs b/src/meta/service/src/watcher/watcher_manager.rs index 44d74b66e0fd..2ceea617f495 100644 --- a/src/meta/service/src/watcher/watcher_manager.rs +++ b/src/meta/service/src/watcher/watcher_manager.rs @@ -14,18 +14,18 @@ use core::ops::Range; -use common_base::base::tokio; -use common_base::base::tokio::sync::mpsc; -use common_base::base::tokio::sync::oneshot; -use common_base::rangemap::RangeMap; -use common_base::rangemap::RangeMapKey; -use common_meta_raft_store::state_machine::StateMachineSubscriber; -use common_meta_types::protobuf as pb; -use common_meta_types::protobuf::watch_request::FilterType; -use common_meta_types::protobuf::Event; -use common_meta_types::protobuf::WatchRequest; -use common_meta_types::protobuf::WatchResponse; -use common_meta_types::Change; +use databend_common_base::base::tokio; +use databend_common_base::base::tokio::sync::mpsc; +use databend_common_base::base::tokio::sync::oneshot; +use databend_common_base::rangemap::RangeMap; +use databend_common_base::rangemap::RangeMapKey; +use databend_common_meta_raft_store::state_machine::StateMachineSubscriber; +use databend_common_meta_types::protobuf as pb; +use databend_common_meta_types::protobuf::watch_request::FilterType; +use databend_common_meta_types::protobuf::Event; +use databend_common_meta_types::protobuf::WatchRequest; +use databend_common_meta_types::protobuf::WatchResponse; +use databend_common_meta_types::Change; use log::info; use log::warn; use prost::Message; diff --git a/src/meta/service/src/watcher/watcher_stream.rs b/src/meta/service/src/watcher/watcher_stream.rs index 1040bd4783c0..db728834ae67 100644 --- a/src/meta/service/src/watcher/watcher_stream.rs +++ b/src/meta/service/src/watcher/watcher_stream.rs @@ -17,11 +17,11 @@ use std::pin::Pin; use std::task::Context; use std::task::Poll; -use common_base::base::tokio::sync::mpsc::error::SendError; -use common_base::base::tokio::sync::mpsc::Receiver; -use common_base::rangemap::RangeMapKey; -use common_meta_types::protobuf::watch_request::FilterType; -use common_meta_types::protobuf::WatchResponse; +use databend_common_base::base::tokio::sync::mpsc::error::SendError; +use databend_common_base::base::tokio::sync::mpsc::Receiver; +use databend_common_base::rangemap::RangeMapKey; +use databend_common_meta_types::protobuf::watch_request::FilterType; +use databend_common_meta_types::protobuf::WatchResponse; use futures::Stream; use tonic::Status; diff --git a/src/meta/service/tests/it/api/http/cluster_state_test.rs b/src/meta/service/tests/it/api/http/cluster_state_test.rs index 55ef1246f7ff..91ab41762e0a 100644 --- a/src/meta/service/tests/it/api/http/cluster_state_test.rs +++ b/src/meta/service/tests/it/api/http/cluster_state_test.rs @@ -17,10 +17,10 @@ use std::io::Read; use std::string::String; use std::time::Duration; -use common_base::base::tokio; -use common_base::base::tokio::time::Instant; -use common_base::base::Stoppable; -use common_meta_types::Node; +use databend_common_base::base::tokio; +use databend_common_base::base::tokio::time::Instant; +use databend_common_base::base::Stoppable; +use databend_common_meta_types::Node; use databend_meta::api::http::v1::cluster_state::nodes_handler; use databend_meta::api::http::v1::cluster_state::status_handler; use databend_meta::api::HttpService; diff --git a/src/meta/service/tests/it/api/http/config.rs b/src/meta/service/tests/it/api/http/config.rs index 8d1e13dabb87..9e2db739189a 100644 --- a/src/meta/service/tests/it/api/http/config.rs +++ b/src/meta/service/tests/it/api/http/config.rs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_base::base::tokio; +use databend_common_base::base::tokio; use databend_meta::api::http::v1::config::config_handler; use databend_meta::configs::Config; use poem::get; diff --git a/src/meta/service/tests/it/api/http_service.rs b/src/meta/service/tests/it/api/http_service.rs index e07209d97887..4c482faaf772 100644 --- a/src/meta/service/tests/it/api/http_service.rs +++ b/src/meta/service/tests/it/api/http_service.rs @@ -15,7 +15,7 @@ use std::fs::File; use std::io::Read; -use common_base::base::Stoppable; +use databend_common_base::base::Stoppable; use databend_meta::api::HttpService; use databend_meta::configs::Config; use databend_meta::meta_service::MetaNode; diff --git a/src/meta/service/tests/it/grpc/metasrv_connection_error.rs b/src/meta/service/tests/it/grpc/metasrv_connection_error.rs index 68acf96cfd20..bae768343b97 100644 --- a/src/meta/service/tests/it/grpc/metasrv_connection_error.rs +++ b/src/meta/service/tests/it/grpc/metasrv_connection_error.rs @@ -19,12 +19,12 @@ use std::fmt::Display; use std::sync::Arc; use std::time::Duration; -use common_base::base::Stoppable; -use common_meta_client::ClientHandle; -use common_meta_client::MetaGrpcClient; -use common_meta_kvapi::kvapi::KVApi; -use common_meta_kvapi::kvapi::UpsertKVReq; -use common_meta_types::MetaClientError; +use databend_common_base::base::Stoppable; +use databend_common_meta_client::ClientHandle; +use databend_common_meta_client::MetaGrpcClient; +use databend_common_meta_kvapi::kvapi::KVApi; +use databend_common_meta_kvapi::kvapi::UpsertKVReq; +use databend_common_meta_types::MetaClientError; use log::info; use test_harness::test; diff --git a/src/meta/service/tests/it/grpc/metasrv_grpc_api.rs b/src/meta/service/tests/it/grpc/metasrv_grpc_api.rs index 7492e7b89192..d7a4d3dfd13a 100644 --- a/src/meta/service/tests/it/grpc/metasrv_grpc_api.rs +++ b/src/meta/service/tests/it/grpc/metasrv_grpc_api.rs @@ -15,12 +15,12 @@ //! Test arrow-grpc API of metasrv use std::collections::HashSet; -use common_base::base::tokio; -use common_base::base::Stoppable; -use common_meta_kvapi::kvapi::KVApi; -use common_meta_kvapi::kvapi::UpsertKVReply; -use common_meta_kvapi::kvapi::UpsertKVReq; -use common_meta_types::SeqV; +use databend_common_base::base::tokio; +use databend_common_base::base::Stoppable; +use databend_common_meta_kvapi::kvapi::KVApi; +use databend_common_meta_kvapi::kvapi::UpsertKVReply; +use databend_common_meta_kvapi::kvapi::UpsertKVReq; +use databend_common_meta_types::SeqV; use log::debug; use log::info; use pretty_assertions::assert_eq; diff --git a/src/meta/service/tests/it/grpc/metasrv_grpc_export.rs b/src/meta/service/tests/it/grpc/metasrv_grpc_export.rs index 054b83b09a0b..58d1f9bbfa12 100644 --- a/src/meta/service/tests/it/grpc/metasrv_grpc_export.rs +++ b/src/meta/service/tests/it/grpc/metasrv_grpc_export.rs @@ -14,10 +14,10 @@ use std::time::Duration; -use common_base::base::tokio::time::sleep; -use common_meta_kvapi::kvapi::KVApi; -use common_meta_kvapi::kvapi::UpsertKVReq; -use common_meta_types::protobuf::Empty; +use databend_common_base::base::tokio::time::sleep; +use databend_common_meta_kvapi::kvapi::KVApi; +use databend_common_meta_kvapi::kvapi::UpsertKVReq; +use databend_common_meta_types::protobuf::Empty; use log::info; use pretty_assertions::assert_eq; use regex::Regex; diff --git a/src/meta/service/tests/it/grpc/metasrv_grpc_handshake.rs b/src/meta/service/tests/it/grpc/metasrv_grpc_handshake.rs index c513f00f48b3..5f006daf3e2e 100644 --- a/src/meta/service/tests/it/grpc/metasrv_grpc_handshake.rs +++ b/src/meta/service/tests/it/grpc/metasrv_grpc_handshake.rs @@ -18,12 +18,12 @@ use std::ops::Deref; use std::time::Duration; -use common_grpc::ConnectionFactory; -use common_meta_client::from_digit_ver; -use common_meta_client::to_digit_ver; -use common_meta_client::MetaGrpcClient; -use common_meta_client::METACLI_COMMIT_SEMVER; -use common_meta_client::MIN_METASRV_SEMVER; +use databend_common_grpc::ConnectionFactory; +use databend_common_meta_client::from_digit_ver; +use databend_common_meta_client::to_digit_ver; +use databend_common_meta_client::MetaGrpcClient; +use databend_common_meta_client::METACLI_COMMIT_SEMVER; +use databend_common_meta_client::MIN_METASRV_SEMVER; use databend_meta::version::MIN_METACLI_SEMVER; use log::debug; use log::info; diff --git a/src/meta/service/tests/it/grpc/metasrv_grpc_kv_api.rs b/src/meta/service/tests/it/grpc/metasrv_grpc_kv_api.rs index 040c8e1b52dc..a17d2b0347ee 100644 --- a/src/meta/service/tests/it/grpc/metasrv_grpc_kv_api.rs +++ b/src/meta/service/tests/it/grpc/metasrv_grpc_kv_api.rs @@ -15,7 +15,7 @@ use std::sync::Arc; use std::sync::Mutex; -use common_meta_kvapi::kvapi; +use databend_common_meta_kvapi::kvapi; use test_harness::test; use crate::testing::meta_service_test_harness; diff --git a/src/meta/service/tests/it/grpc/metasrv_grpc_kv_api_restart_cluster.rs b/src/meta/service/tests/it/grpc/metasrv_grpc_kv_api_restart_cluster.rs index 6ce81b55ea16..d1b55091eb1c 100644 --- a/src/meta/service/tests/it/grpc/metasrv_grpc_kv_api_restart_cluster.rs +++ b/src/meta/service/tests/it/grpc/metasrv_grpc_kv_api_restart_cluster.rs @@ -17,11 +17,11 @@ use std::time::Duration; -use common_base::base::Stoppable; -use common_meta_client::ClientHandle; -use common_meta_client::MetaGrpcClient; -use common_meta_kvapi::kvapi::KVApi; -use common_meta_kvapi::kvapi::UpsertKVReq; +use databend_common_base::base::Stoppable; +use databend_common_meta_client::ClientHandle; +use databend_common_meta_client::MetaGrpcClient; +use databend_common_meta_kvapi::kvapi::KVApi; +use databend_common_meta_kvapi::kvapi::UpsertKVReq; use log::info; use test_harness::test; diff --git a/src/meta/service/tests/it/grpc/metasrv_grpc_kv_read_v1.rs b/src/meta/service/tests/it/grpc/metasrv_grpc_kv_read_v1.rs index d14edcd12104..9682c827c7e8 100644 --- a/src/meta/service/tests/it/grpc/metasrv_grpc_kv_read_v1.rs +++ b/src/meta/service/tests/it/grpc/metasrv_grpc_kv_read_v1.rs @@ -16,18 +16,18 @@ use std::sync::Arc; -use common_meta_client::ClientHandle; -use common_meta_client::Streamed; -use common_meta_kvapi::kvapi::GetKVReq; -use common_meta_kvapi::kvapi::KVApi; -use common_meta_kvapi::kvapi::ListKVReq; -use common_meta_kvapi::kvapi::MGetKVReq; -use common_meta_kvapi::kvapi::UpsertKVReq; -use common_meta_types::protobuf as pb; -use common_meta_types::protobuf::KvMeta; -use common_meta_types::KVMeta; -use common_meta_types::SeqV; -use common_meta_types::With; +use databend_common_meta_client::ClientHandle; +use databend_common_meta_client::Streamed; +use databend_common_meta_kvapi::kvapi::GetKVReq; +use databend_common_meta_kvapi::kvapi::KVApi; +use databend_common_meta_kvapi::kvapi::ListKVReq; +use databend_common_meta_kvapi::kvapi::MGetKVReq; +use databend_common_meta_kvapi::kvapi::UpsertKVReq; +use databend_common_meta_types::protobuf as pb; +use databend_common_meta_types::protobuf::KvMeta; +use databend_common_meta_types::KVMeta; +use databend_common_meta_types::SeqV; +use databend_common_meta_types::With; use futures::stream::StreamExt; use futures::TryStreamExt; use log::info; diff --git a/src/meta/service/tests/it/grpc/metasrv_grpc_schema_api.rs b/src/meta/service/tests/it/grpc/metasrv_grpc_schema_api.rs index d4bd7d961f47..693ff5c9b5fb 100644 --- a/src/meta/service/tests/it/grpc/metasrv_grpc_schema_api.rs +++ b/src/meta/service/tests/it/grpc/metasrv_grpc_schema_api.rs @@ -17,9 +17,9 @@ use std::sync::Arc; use std::sync::Mutex; -use common_meta_api::BackgroundApiTestSuite; -use common_meta_api::SchemaApiTestSuite; -use common_meta_api::ShareApiTestSuite; +use databend_common_meta_api::BackgroundApiTestSuite; +use databend_common_meta_api::SchemaApiTestSuite; +use databend_common_meta_api::ShareApiTestSuite; use test_harness::test; use crate::testing::meta_service_test_harness; diff --git a/src/meta/service/tests/it/grpc/metasrv_grpc_schema_api_follower_follower.rs b/src/meta/service/tests/it/grpc/metasrv_grpc_schema_api_follower_follower.rs index 5f3ce95716f0..d505cef152d6 100644 --- a/src/meta/service/tests/it/grpc/metasrv_grpc_schema_api_follower_follower.rs +++ b/src/meta/service/tests/it/grpc/metasrv_grpc_schema_api_follower_follower.rs @@ -14,7 +14,7 @@ //! Test metasrv SchemaApi by writing to one follower and then reading from another follower. -use common_meta_api::SchemaApiTestSuite; +use databend_common_meta_api::SchemaApiTestSuite; use test_harness::test; use crate::testing::meta_service_test_harness; diff --git a/src/meta/service/tests/it/grpc/metasrv_grpc_schema_api_leader_follower.rs b/src/meta/service/tests/it/grpc/metasrv_grpc_schema_api_leader_follower.rs index 6f688ea53d78..9fb32feed888 100644 --- a/src/meta/service/tests/it/grpc/metasrv_grpc_schema_api_leader_follower.rs +++ b/src/meta/service/tests/it/grpc/metasrv_grpc_schema_api_leader_follower.rs @@ -14,7 +14,7 @@ //! Test metasrv SchemaApi by writing to leader and then reading from a follower. -use common_meta_api::SchemaApiTestSuite; +use databend_common_meta_api::SchemaApiTestSuite; use test_harness::test; use crate::testing::meta_service_test_harness; diff --git a/src/meta/service/tests/it/grpc/metasrv_grpc_tls.rs b/src/meta/service/tests/it/grpc/metasrv_grpc_tls.rs index 774f42b4805e..5b17b8704d7a 100644 --- a/src/meta/service/tests/it/grpc/metasrv_grpc_tls.rs +++ b/src/meta/service/tests/it/grpc/metasrv_grpc_tls.rs @@ -14,13 +14,13 @@ use std::time::Duration; -use common_grpc::RpcClientTlsConfig; -use common_meta_api::SchemaApi; -use common_meta_client::MetaGrpcClient; -use common_meta_kvapi::kvapi::KVApi; -use common_meta_types::MetaClientError; -use common_meta_types::MetaError; -use common_meta_types::MetaNetworkError; +use databend_common_grpc::RpcClientTlsConfig; +use databend_common_meta_api::SchemaApi; +use databend_common_meta_client::MetaGrpcClient; +use databend_common_meta_kvapi::kvapi::KVApi; +use databend_common_meta_types::MetaClientError; +use databend_common_meta_types::MetaError; +use databend_common_meta_types::MetaNetworkError; use test_harness::test; use crate::testing::meta_service_test_harness; diff --git a/src/meta/service/tests/it/grpc/metasrv_grpc_watch.rs b/src/meta/service/tests/it/grpc/metasrv_grpc_watch.rs index 17958ceeff17..0b6b748cdd52 100644 --- a/src/meta/service/tests/it/grpc/metasrv_grpc_watch.rs +++ b/src/meta/service/tests/it/grpc/metasrv_grpc_watch.rs @@ -17,29 +17,29 @@ use std::time::Duration; use std::time::SystemTime; use std::time::UNIX_EPOCH; -use common_base::base::tokio; -use common_base::base::tokio::time::sleep; -use common_meta_client::ClientHandle; -use common_meta_client::MetaGrpcClient; -use common_meta_kvapi::kvapi; -use common_meta_kvapi::kvapi::KVApi; -use common_meta_kvapi::kvapi::UpsertKVReq; -use common_meta_types::protobuf::watch_request::FilterType; -use common_meta_types::protobuf::Event; -use common_meta_types::protobuf::KvMeta; -use common_meta_types::protobuf::SeqV; -use common_meta_types::protobuf::TxnRequest; -use common_meta_types::protobuf::WatchRequest; -use common_meta_types::txn_condition; -use common_meta_types::txn_op; -use common_meta_types::ConditionResult; -use common_meta_types::MatchSeq; -use common_meta_types::Operation; -use common_meta_types::TxnCondition; -use common_meta_types::TxnDeleteByPrefixRequest; -use common_meta_types::TxnDeleteRequest; -use common_meta_types::TxnOp; -use common_meta_types::TxnPutRequest; +use databend_common_base::base::tokio; +use databend_common_base::base::tokio::time::sleep; +use databend_common_meta_client::ClientHandle; +use databend_common_meta_client::MetaGrpcClient; +use databend_common_meta_kvapi::kvapi; +use databend_common_meta_kvapi::kvapi::KVApi; +use databend_common_meta_kvapi::kvapi::UpsertKVReq; +use databend_common_meta_types::protobuf::watch_request::FilterType; +use databend_common_meta_types::protobuf::Event; +use databend_common_meta_types::protobuf::KvMeta; +use databend_common_meta_types::protobuf::SeqV; +use databend_common_meta_types::protobuf::TxnRequest; +use databend_common_meta_types::protobuf::WatchRequest; +use databend_common_meta_types::txn_condition; +use databend_common_meta_types::txn_op; +use databend_common_meta_types::ConditionResult; +use databend_common_meta_types::MatchSeq; +use databend_common_meta_types::Operation; +use databend_common_meta_types::TxnCondition; +use databend_common_meta_types::TxnDeleteByPrefixRequest; +use databend_common_meta_types::TxnDeleteRequest; +use databend_common_meta_types::TxnOp; +use databend_common_meta_types::TxnPutRequest; use databend_meta::meta_service::MetaNode; use log::info; use test_harness::test; diff --git a/src/meta/service/tests/it/meta_node/meta_node_kv_api.rs b/src/meta/service/tests/it/meta_node/meta_node_kv_api.rs index fe67dd739da6..f9e2aa57d501 100644 --- a/src/meta/service/tests/it/meta_node/meta_node_kv_api.rs +++ b/src/meta/service/tests/it/meta_node/meta_node_kv_api.rs @@ -16,7 +16,7 @@ use std::sync::Arc; use std::sync::Mutex; use async_trait::async_trait; -use common_meta_kvapi::kvapi; +use databend_common_meta_kvapi::kvapi; use databend_meta::meta_service::MetaNode; use maplit::btreeset; use test_harness::test; diff --git a/src/meta/service/tests/it/meta_node/meta_node_kv_api_expire.rs b/src/meta/service/tests/it/meta_node/meta_node_kv_api_expire.rs index d9d93ccffee3..6281e3e0172c 100644 --- a/src/meta/service/tests/it/meta_node/meta_node_kv_api_expire.rs +++ b/src/meta/service/tests/it/meta_node/meta_node_kv_api_expire.rs @@ -14,15 +14,15 @@ use std::time::Duration; -use common_base::base::tokio::time::sleep; -use common_meta_kvapi::kvapi::KVApi; -use common_meta_types::Cmd; -use common_meta_types::KVMeta; -use common_meta_types::LogEntry; -use common_meta_types::MatchSeq; -use common_meta_types::SeqV; -use common_meta_types::UpsertKV; -use common_meta_types::With; +use databend_common_base::base::tokio::time::sleep; +use databend_common_meta_kvapi::kvapi::KVApi; +use databend_common_meta_types::Cmd; +use databend_common_meta_types::KVMeta; +use databend_common_meta_types::LogEntry; +use databend_common_meta_types::MatchSeq; +use databend_common_meta_types::SeqV; +use databend_common_meta_types::UpsertKV; +use databend_common_meta_types::With; use log::info; use test_harness::test; diff --git a/src/meta/service/tests/it/meta_node/meta_node_lifecycle.rs b/src/meta/service/tests/it/meta_node/meta_node_lifecycle.rs index 5e9fb223d27b..b74fd70e79ea 100644 --- a/src/meta/service/tests/it/meta_node/meta_node_lifecycle.rs +++ b/src/meta/service/tests/it/meta_node/meta_node_lifecycle.rs @@ -15,17 +15,17 @@ use std::sync::Arc; use std::time::Duration; -use common_base::base::tokio::time::sleep; -use common_meta_kvapi::kvapi::KVApi; -use common_meta_sled_store::openraft::LogIdOptionExt; -use common_meta_sled_store::openraft::ServerState; -use common_meta_types::new_log_id; -use common_meta_types::protobuf::raft_service_client::RaftServiceClient; -use common_meta_types::Cmd; -use common_meta_types::Endpoint; -use common_meta_types::LogEntry; -use common_meta_types::NodeId; -use common_meta_types::UpsertKV; +use databend_common_base::base::tokio::time::sleep; +use databend_common_meta_kvapi::kvapi::KVApi; +use databend_common_meta_sled_store::openraft::LogIdOptionExt; +use databend_common_meta_sled_store::openraft::ServerState; +use databend_common_meta_types::new_log_id; +use databend_common_meta_types::protobuf::raft_service_client::RaftServiceClient; +use databend_common_meta_types::Cmd; +use databend_common_meta_types::Endpoint; +use databend_common_meta_types::LogEntry; +use databend_common_meta_types::NodeId; +use databend_common_meta_types::UpsertKV; use databend_meta::configs; use databend_meta::message::ForwardRequest; use databend_meta::message::ForwardRequestBody; diff --git a/src/meta/service/tests/it/meta_node/meta_node_raft_api.rs b/src/meta/service/tests/it/meta_node/meta_node_raft_api.rs index ba58361d6a45..b3951039def2 100644 --- a/src/meta/service/tests/it/meta_node/meta_node_raft_api.rs +++ b/src/meta/service/tests/it/meta_node/meta_node_raft_api.rs @@ -16,10 +16,10 @@ use std::time::Duration; -use common_base::base::tokio; -use common_meta_types::Cmd; -use common_meta_types::LogEntry; -use common_meta_types::UpsertKV; +use databend_common_base::base::tokio; +use databend_common_meta_types::Cmd; +use databend_common_meta_types::LogEntry; +use databend_common_meta_types::UpsertKV; use log::info; use maplit::btreeset; use test_harness::test; diff --git a/src/meta/service/tests/it/meta_node/meta_node_replication.rs b/src/meta/service/tests/it/meta_node/meta_node_replication.rs index fb362b9f2c61..a46dacb88c19 100644 --- a/src/meta/service/tests/it/meta_node/meta_node_replication.rs +++ b/src/meta/service/tests/it/meta_node/meta_node_replication.rs @@ -12,12 +12,12 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_meta_sled_store::openraft::LogIdOptionExt; -use common_meta_sled_store::openraft::ServerState; -use common_meta_types::Cmd; -use common_meta_types::LogEntry; -use common_meta_types::SeqV; -use common_meta_types::UpsertKV; +use databend_common_meta_sled_store::openraft::LogIdOptionExt; +use databend_common_meta_sled_store::openraft::ServerState; +use databend_common_meta_types::Cmd; +use databend_common_meta_types::LogEntry; +use databend_common_meta_types::SeqV; +use databend_common_meta_types::UpsertKV; use databend_meta::meta_service::MetaNode; use log::info; use test_harness::test; diff --git a/src/meta/service/tests/it/meta_node/meta_node_request_forwarding.rs b/src/meta/service/tests/it/meta_node/meta_node_request_forwarding.rs index 7175a74d9c9a..55b2c999e18b 100644 --- a/src/meta/service/tests/it/meta_node/meta_node_request_forwarding.rs +++ b/src/meta/service/tests/it/meta_node/meta_node_request_forwarding.rs @@ -14,12 +14,12 @@ use std::sync::Arc; -use common_meta_sled_store::openraft::error::RaftError; -use common_meta_types::ClientWriteError; -use common_meta_types::Cmd; -use common_meta_types::ForwardToLeader; -use common_meta_types::LogEntry; -use common_meta_types::UpsertKV; +use databend_common_meta_sled_store::openraft::error::RaftError; +use databend_common_meta_types::ClientWriteError; +use databend_common_meta_types::Cmd; +use databend_common_meta_types::ForwardToLeader; +use databend_common_meta_types::LogEntry; +use databend_common_meta_types::UpsertKV; use databend_meta::meta_service::meta_leader::MetaLeader; use databend_meta::meta_service::MetaNode; use maplit::btreeset; diff --git a/src/meta/service/tests/it/store.rs b/src/meta/service/tests/it/store.rs index ca539d81903d..d958a41ec1b8 100644 --- a/src/meta/service/tests/it/store.rs +++ b/src/meta/service/tests/it/store.rs @@ -12,23 +12,23 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_meta_raft_store::sm_v002::leveled_store::sys_data_api::SysDataApiRO; -use common_meta_raft_store::state_machine::testing::snapshot_logs; -use common_meta_sled_store::openraft::async_trait::async_trait; -use common_meta_sled_store::openraft::entry::RaftEntry; -use common_meta_sled_store::openraft::storage::Adaptor; -use common_meta_sled_store::openraft::storage::RaftLogReaderExt; -use common_meta_sled_store::openraft::testing::log_id; -use common_meta_sled_store::openraft::testing::StoreBuilder; -use common_meta_sled_store::openraft::RaftSnapshotBuilder; -use common_meta_sled_store::openraft::RaftStorage; -use common_meta_types::new_log_id; -use common_meta_types::Entry; -use common_meta_types::Membership; -use common_meta_types::StorageError; -use common_meta_types::StoredMembership; -use common_meta_types::TypeConfig; -use common_meta_types::Vote; +use databend_common_meta_raft_store::sm_v002::leveled_store::sys_data_api::SysDataApiRO; +use databend_common_meta_raft_store::state_machine::testing::snapshot_logs; +use databend_common_meta_sled_store::openraft::async_trait::async_trait; +use databend_common_meta_sled_store::openraft::entry::RaftEntry; +use databend_common_meta_sled_store::openraft::storage::Adaptor; +use databend_common_meta_sled_store::openraft::storage::RaftLogReaderExt; +use databend_common_meta_sled_store::openraft::testing::log_id; +use databend_common_meta_sled_store::openraft::testing::StoreBuilder; +use databend_common_meta_sled_store::openraft::RaftSnapshotBuilder; +use databend_common_meta_sled_store::openraft::RaftStorage; +use databend_common_meta_types::new_log_id; +use databend_common_meta_types::Entry; +use databend_common_meta_types::Membership; +use databend_common_meta_types::StorageError; +use databend_common_meta_types::StoredMembership; +use databend_common_meta_types::TypeConfig; +use databend_common_meta_types::Vote; use databend_meta::meta_service::meta_node::LogStore; use databend_meta::meta_service::meta_node::SMStore; use databend_meta::store::RaftStore; @@ -65,7 +65,7 @@ fn test_impl_raft_storage() -> anyhow::Result<()> { let root = Span::root(full_name!(), SpanContext::random()); let _guard = root.set_local_parent(); - common_meta_sled_store::openraft::testing::Suite::test_all(MetaStoreBuilder {})?; + databend_common_meta_sled_store::openraft::testing::Suite::test_all(MetaStoreBuilder {})?; Ok(()) } diff --git a/src/meta/service/tests/it/testing.rs b/src/meta/service/tests/it/testing.rs index beb630c35a35..05af62b21c89 100644 --- a/src/meta/service/tests/it/testing.rs +++ b/src/meta/service/tests/it/testing.rs @@ -15,10 +15,10 @@ use std::collections::BTreeMap; use std::sync::Once; -use common_base::base::tokio; -use common_tracing::closure_name; -use common_tracing::init_logging; -use common_tracing::Config; +use databend_common_base::base::tokio; +use databend_common_tracing::closure_name; +use databend_common_tracing::init_logging; +use databend_common_tracing::Config; use minitrace::prelude::*; pub fn meta_service_test_harness(test: F) @@ -56,7 +56,7 @@ fn setup_test() { static INIT: Once = Once::new(); INIT.call_once(|| { let t = tempfile::tempdir().expect("create temp dir to sled db"); - common_meta_sled_store::init_temp_sled_db(t); + databend_common_meta_sled_store::init_temp_sled_db(t); let guards = init_logging("meta_unittests", &Config::new_testing(), BTreeMap::new()); Box::leak(Box::new(guards)); diff --git a/src/meta/service/tests/it/tests/meta_node.rs b/src/meta/service/tests/it/tests/meta_node.rs index 5ca3a5b86a3a..bc6df8dac66f 100644 --- a/src/meta/service/tests/it/tests/meta_node.rs +++ b/src/meta/service/tests/it/tests/meta_node.rs @@ -18,10 +18,10 @@ use std::collections::BTreeSet; use std::sync::Arc; use std::time::Duration; -use common_meta_sled_store::openraft::ServerState; -use common_meta_types::AppliedState; -use common_meta_types::Node; -use common_meta_types::NodeId; +use databend_common_meta_sled_store::openraft::ServerState; +use databend_common_meta_types::AppliedState; +use databend_common_meta_types::Node; +use databend_common_meta_types::NodeId; use databend_meta::meta_service::MetaNode; use databend_meta::Opened; use log::info; diff --git a/src/meta/service/tests/it/tests/service.rs b/src/meta/service/tests/it/tests/service.rs index e326488363cc..025f2e667e54 100644 --- a/src/meta/service/tests/it/tests/service.rs +++ b/src/meta/service/tests/it/tests/service.rs @@ -20,14 +20,14 @@ use std::time::Duration; use anyhow::Result; use async_trait::async_trait; -use common_base::base::tokio; -use common_base::base::GlobalSequence; -use common_base::base::Stoppable; -use common_meta_client::ClientHandle; -use common_meta_client::MetaGrpcClient; -use common_meta_kvapi::kvapi; -use common_meta_types::protobuf::raft_service_client::RaftServiceClient; -use common_meta_types::NodeId; +use databend_common_base::base::tokio; +use databend_common_base::base::GlobalSequence; +use databend_common_base::base::Stoppable; +use databend_common_meta_client::ClientHandle; +use databend_common_meta_client::MetaGrpcClient; +use databend_common_meta_kvapi::kvapi; +use databend_common_meta_types::protobuf::raft_service_client::RaftServiceClient; +use databend_common_meta_types::NodeId; use databend_meta::api::GrpcServer; use databend_meta::configs; use databend_meta::message::ForwardRequest; diff --git a/src/meta/sled-store/Cargo.toml b/src/meta/sled-store/Cargo.toml index baad7bd34c43..4b37939bd482 100644 --- a/src/meta/sled-store/Cargo.toml +++ b/src/meta/sled-store/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "common-meta-sled-store" +name = "databend-common-meta-sled-store" description = "Sled store backend for raft state machine" version = { workspace = true } authors = { workspace = true } @@ -15,9 +15,9 @@ test = true io-uring = ["sled/io_uring"] [dependencies] -common-meta-stoerr = { path = "../stoerr" } -common-meta-types = { path = "../types" } -common-tracing = { path = "../../common/tracing" } +databend-common-meta-stoerr = { path = "../stoerr" } +databend-common-meta-types = { path = "../types" } +databend-common-tracing = { path = "../../common/tracing" } openraft = { workspace = true } sled = { workspace = true } @@ -33,7 +33,7 @@ thiserror = { workspace = true } [dev-dependencies] anyhow = { workspace = true } -common-base = { path = "../../common/base" } +databend-common-base = { path = "../../common/base" } pretty_assertions = "1.3.0" test-harness = "0.1.1" tokio = { workspace = true } diff --git a/src/meta/sled-store/src/bytes_error.rs b/src/meta/sled-store/src/bytes_error.rs index 6685c71d2592..1a6739e5d78e 100644 --- a/src/meta/sled-store/src/bytes_error.rs +++ b/src/meta/sled-store/src/bytes_error.rs @@ -13,8 +13,8 @@ // limitations under the License. use anyerror::AnyError; -use common_meta_stoerr::MetaBytesError; -use common_meta_stoerr::MetaStorageError; +use databend_common_meta_stoerr::MetaBytesError; +use databend_common_meta_stoerr::MetaStorageError; /// Errors that occur when encode/decode #[derive(Debug, Clone, serde::Serialize, serde::Deserialize, PartialEq, Eq, thiserror::Error)] diff --git a/src/meta/sled-store/src/sled_serde.rs b/src/meta/sled-store/src/sled_serde.rs index 434b1730df97..f06fe025ec2b 100644 --- a/src/meta/sled-store/src/sled_serde.rs +++ b/src/meta/sled-store/src/sled_serde.rs @@ -18,7 +18,7 @@ use std::ops::RangeBounds; use byteorder::BigEndian; use byteorder::ByteOrder; -use common_meta_types::Entry; +use databend_common_meta_types::Entry; use serde::de::DeserializeOwned; use serde::Serialize; use sled::IVec; diff --git a/src/meta/sled-store/src/sled_serde_impl.rs b/src/meta/sled-store/src/sled_serde_impl.rs index 158bc7a05267..71b01450262f 100644 --- a/src/meta/sled-store/src/sled_serde_impl.rs +++ b/src/meta/sled-store/src/sled_serde_impl.rs @@ -12,16 +12,16 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_meta_types::Entry; -use common_meta_types::EntryPayload; -use common_meta_types::LogId; -use common_meta_types::Membership; -use common_meta_types::Node; -use common_meta_types::SeqNum; -use common_meta_types::SeqV; -use common_meta_types::SnapshotMeta; -use common_meta_types::StoredMembership; -use common_meta_types::Vote; +use databend_common_meta_types::Entry; +use databend_common_meta_types::EntryPayload; +use databend_common_meta_types::LogId; +use databend_common_meta_types::Membership; +use databend_common_meta_types::Node; +use databend_common_meta_types::SeqNum; +use databend_common_meta_types::SeqV; +use databend_common_meta_types::SnapshotMeta; +use databend_common_meta_types::StoredMembership; +use databend_common_meta_types::Vote; use crate::SledBytesError; use crate::SledSerde; @@ -117,7 +117,7 @@ impl SledSerde for Node { } pub(crate) mod impl_compat07 { - use common_meta_types::compat07; + use databend_common_meta_types::compat07; use crate::SledBytesError; use crate::SledSerde; diff --git a/src/meta/sled-store/src/sled_tree.rs b/src/meta/sled-store/src/sled_tree.rs index 375f0d9a1907..a455254fb453 100644 --- a/src/meta/sled-store/src/sled_tree.rs +++ b/src/meta/sled-store/src/sled_tree.rs @@ -17,10 +17,10 @@ use std::marker::PhantomData; use std::ops::Deref; use std::ops::RangeBounds; -use common_meta_stoerr::MetaStorageError; -use common_meta_types::anyerror::AnyError; -use common_meta_types::Change; -use common_meta_types::SeqV; +use databend_common_meta_stoerr::MetaStorageError; +use databend_common_meta_types::anyerror::AnyError; +use databend_common_meta_types::Change; +use databend_common_meta_types::SeqV; use log::debug; use log::warn; use minitrace::func_name; diff --git a/src/meta/sled-store/tests/it/sled_iter.rs b/src/meta/sled-store/tests/it/sled_iter.rs index e9dec9d6f245..201292fdbaa8 100644 --- a/src/meta/sled-store/tests/it/sled_iter.rs +++ b/src/meta/sled-store/tests/it/sled_iter.rs @@ -12,14 +12,14 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_meta_sled_store::SledItem; -use common_meta_sled_store::SledTree; -use common_meta_types::new_log_id; -use common_meta_types::Cmd; -use common_meta_types::Entry; -use common_meta_types::EntryPayload; -use common_meta_types::LogEntry; -use common_meta_types::UpsertKV; +use databend_common_meta_sled_store::SledItem; +use databend_common_meta_sled_store::SledTree; +use databend_common_meta_types::new_log_id; +use databend_common_meta_types::Cmd; +use databend_common_meta_types::Entry; +use databend_common_meta_types::EntryPayload; +use databend_common_meta_types::LogEntry; +use databend_common_meta_types::UpsertKV; use log::info; use pretty_assertions::assert_eq; use sled::IVec; @@ -74,7 +74,7 @@ async fn test_sled_iter() -> anyhow::Result<()> { let mut trees = vec![t1.clone(), t2.clone()]; - for tree_iter in common_meta_sled_store::iter::() { + for tree_iter in databend_common_meta_sled_store::iter::() { let (tree_name, item_iter) = tree_iter?; if tree_name == "__sled__default" { @@ -110,7 +110,7 @@ async fn test_sled_iter() -> anyhow::Result<()> { let trees = vec![t1, t2]; let mut got = vec![]; - for tree_iter in common_meta_sled_store::iter::>() { + for tree_iter in databend_common_meta_sled_store::iter::>() { let (tree_name, item_iter) = tree_iter?; if !trees.contains(&tree_name) { diff --git a/src/meta/sled-store/tests/it/sled_tree.rs b/src/meta/sled-store/tests/it/sled_tree.rs index 6a95af86eb00..e42af93d3a8e 100644 --- a/src/meta/sled-store/tests/it/sled_tree.rs +++ b/src/meta/sled-store/tests/it/sled_tree.rs @@ -12,15 +12,15 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_meta_sled_store::SledTree; -use common_meta_types::new_log_id; -use common_meta_types::Cmd; -use common_meta_types::Entry; -use common_meta_types::EntryPayload; -use common_meta_types::LogEntry; -use common_meta_types::LogIndex; -use common_meta_types::SeqV; -use common_meta_types::UpsertKV; +use databend_common_meta_sled_store::SledTree; +use databend_common_meta_types::new_log_id; +use databend_common_meta_types::Cmd; +use databend_common_meta_types::Entry; +use databend_common_meta_types::EntryPayload; +use databend_common_meta_types::LogEntry; +use databend_common_meta_types::LogIndex; +use databend_common_meta_types::SeqV; +use databend_common_meta_types::UpsertKV; use test_harness::test; use crate::testing::fake_key_spaces::Files; diff --git a/src/meta/sled-store/tests/it/sled_txn_tree.rs b/src/meta/sled-store/tests/it/sled_txn_tree.rs index e550401c2a01..08d1991d2aa1 100644 --- a/src/meta/sled-store/tests/it/sled_txn_tree.rs +++ b/src/meta/sled-store/tests/it/sled_txn_tree.rs @@ -12,10 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_meta_sled_store::SledTree; -use common_meta_sled_store::Store; -use common_meta_types::Endpoint; -use common_meta_types::Node; +use databend_common_meta_sled_store::SledTree; +use databend_common_meta_sled_store::Store; +use databend_common_meta_types::Endpoint; +use databend_common_meta_types::Node; use test_harness::test; use crate::testing::fake_key_spaces::Nodes; diff --git a/src/meta/sled-store/tests/it/testing/fake_key_spaces.rs b/src/meta/sled-store/tests/it/testing/fake_key_spaces.rs index fcbb26407d8c..9b2f7ba9789d 100644 --- a/src/meta/sled-store/tests/it/testing/fake_key_spaces.rs +++ b/src/meta/sled-store/tests/it/testing/fake_key_spaces.rs @@ -12,12 +12,12 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_meta_sled_store::SledKeySpace; -use common_meta_types::Entry; -use common_meta_types::LogIndex; -use common_meta_types::Node; -use common_meta_types::NodeId; -use common_meta_types::SeqV; +use databend_common_meta_sled_store::SledKeySpace; +use databend_common_meta_types::Entry; +use databend_common_meta_types::LogIndex; +use databend_common_meta_types::Node; +use databend_common_meta_types::NodeId; +use databend_common_meta_types::SeqV; use crate::testing::fake_state_machine_meta::StateMachineMetaKey; use crate::testing::fake_state_machine_meta::StateMachineMetaValue; diff --git a/src/meta/sled-store/tests/it/testing/fake_state_machine_meta.rs b/src/meta/sled-store/tests/it/testing/fake_state_machine_meta.rs index 53aca391cde6..57d0571da4ee 100644 --- a/src/meta/sled-store/tests/it/testing/fake_state_machine_meta.rs +++ b/src/meta/sled-store/tests/it/testing/fake_state_machine_meta.rs @@ -14,12 +14,12 @@ use std::fmt; -use common_meta_sled_store::SledBytesError; -use common_meta_sled_store::SledOrderedSerde; -use common_meta_sled_store::SledSerde; -use common_meta_types::anyerror::AnyError; -use common_meta_types::LogId; -use common_meta_types::Membership; +use databend_common_meta_sled_store::SledBytesError; +use databend_common_meta_sled_store::SledOrderedSerde; +use databend_common_meta_sled_store::SledSerde; +use databend_common_meta_types::anyerror::AnyError; +use databend_common_meta_types::LogId; +use databend_common_meta_types::Membership; use serde::Deserialize; use serde::Serialize; use sled::IVec; diff --git a/src/meta/sled-store/tests/it/testing/mod.rs b/src/meta/sled-store/tests/it/testing/mod.rs index 7e821788f82c..0aedf9246e4b 100644 --- a/src/meta/sled-store/tests/it/testing/mod.rs +++ b/src/meta/sled-store/tests/it/testing/mod.rs @@ -18,11 +18,11 @@ pub mod fake_state_machine_meta; use std::collections::BTreeMap; use std::sync::Once; -use common_base::base::GlobalSequence; -use common_meta_sled_store::get_sled_db; -use common_tracing::closure_name; -use common_tracing::init_logging; -use common_tracing::Config; +use databend_common_base::base::GlobalSequence; +use databend_common_meta_sled_store::get_sled_db; +use databend_common_tracing::closure_name; +use databend_common_tracing::init_logging; +use databend_common_tracing::Config; use minitrace::prelude::*; pub struct SledTestContext { @@ -65,7 +65,7 @@ fn setup_test() { static INIT: Once = Once::new(); INIT.call_once(|| { let t = tempfile::tempdir().expect("create temp dir to sled db"); - common_meta_sled_store::init_temp_sled_db(t); + databend_common_meta_sled_store::init_temp_sled_db(t); let guards = init_logging("meta_unittests", &Config::new_testing(), BTreeMap::new()); Box::leak(Box::new(guards)); diff --git a/src/meta/stoerr/Cargo.toml b/src/meta/stoerr/Cargo.toml index ee89a8fffc46..d5e9b6025071 100644 --- a/src/meta/stoerr/Cargo.toml +++ b/src/meta/stoerr/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "common-meta-stoerr" +name = "databend-common-meta-stoerr" version = { workspace = true } authors = { workspace = true } license = { workspace = true } diff --git a/src/meta/store/Cargo.toml b/src/meta/store/Cargo.toml index 454983db6d25..0edbaf49125c 100644 --- a/src/meta/store/Cargo.toml +++ b/src/meta/store/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "common-meta-store" +name = "databend-common-meta-store" description = "MetaStore is impl with either a local embedded meta store, or a grpc-client of metasrv" version = { workspace = true } authors = { workspace = true } @@ -12,15 +12,15 @@ doctest = false test = true [features] -io-uring = ["common-meta-embedded/io-uring"] +io-uring = ["databend-common-meta-embedded/io-uring"] [dependencies] # Workspace dependencies -common-grpc = { path = "../../common/grpc" } -common-meta-client = { path = "../client" } -common-meta-embedded = { path = "../embedded" } -common-meta-kvapi = { path = "../kvapi" } -common-meta-types = { path = "../types" } +databend-common-grpc = { path = "../../common/grpc" } +databend-common-meta-client = { path = "../client" } +databend-common-meta-embedded = { path = "../embedded" } +databend-common-meta-kvapi = { path = "../kvapi" } +databend-common-meta-types = { path = "../types" } # Crates.io dependencies async-trait = { workspace = true } diff --git a/src/meta/store/src/lib.rs b/src/meta/store/src/lib.rs index 76c8f9dfcbd5..5b1e4888a069 100644 --- a/src/meta/store/src/lib.rs +++ b/src/meta/store/src/lib.rs @@ -17,21 +17,21 @@ use std::sync::Arc; use std::task::Context; use std::task::Poll; -use common_grpc::RpcClientConf; -use common_meta_client::ClientHandle; -use common_meta_client::MetaGrpcClient; -use common_meta_embedded::MetaEmbedded; -use common_meta_kvapi::kvapi; -use common_meta_kvapi::kvapi::GetKVReply; -use common_meta_kvapi::kvapi::KVStream; -use common_meta_kvapi::kvapi::MGetKVReply; -use common_meta_kvapi::kvapi::UpsertKVReply; -use common_meta_kvapi::kvapi::UpsertKVReq; -use common_meta_types::protobuf::WatchRequest; -use common_meta_types::protobuf::WatchResponse; -use common_meta_types::MetaError; -use common_meta_types::TxnReply; -use common_meta_types::TxnRequest; +use databend_common_grpc::RpcClientConf; +use databend_common_meta_client::ClientHandle; +use databend_common_meta_client::MetaGrpcClient; +use databend_common_meta_embedded::MetaEmbedded; +use databend_common_meta_kvapi::kvapi; +use databend_common_meta_kvapi::kvapi::GetKVReply; +use databend_common_meta_kvapi::kvapi::KVStream; +use databend_common_meta_kvapi::kvapi::MGetKVReply; +use databend_common_meta_kvapi::kvapi::UpsertKVReply; +use databend_common_meta_kvapi::kvapi::UpsertKVReq; +use databend_common_meta_types::protobuf::WatchRequest; +use databend_common_meta_types::protobuf::WatchResponse; +use databend_common_meta_types::MetaError; +use databend_common_meta_types::TxnReply; +use databend_common_meta_types::TxnRequest; use log::as_debug; use log::info; use tokio_stream::Stream; diff --git a/src/meta/types/Cargo.toml b/src/meta/types/Cargo.toml index 0d73f61df1b0..bd22c90aa7f0 100644 --- a/src/meta/types/Cargo.toml +++ b/src/meta/types/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "common-meta-types" +name = "databend-common-meta-types" version = { workspace = true } authors = { workspace = true } license = { workspace = true } @@ -11,7 +11,7 @@ doctest = false test = true [dependencies] -common-meta-stoerr = { path = "../stoerr" } +databend-common-meta-stoerr = { path = "../stoerr" } openraft = { workspace = true } @@ -27,7 +27,7 @@ tokio = { workspace = true } tonic = { workspace = true } [build-dependencies] -common-building = { path = "../../common/building" } +databend-common-building = { path = "../../common/building" } prost-build = { workspace = true } tonic-build = { workspace = true } diff --git a/src/meta/types/build.rs b/src/meta/types/build.rs index c18e6fdb28d8..d58111732b88 100644 --- a/src/meta/types/build.rs +++ b/src/meta/types/build.rs @@ -19,7 +19,7 @@ use std::path::Path; use std::path::PathBuf; fn main() { - common_building::setup(); + databend_common_building::setup(); build_proto(); } diff --git a/src/meta/types/src/errors/meta_errors.rs b/src/meta/types/src/errors/meta_errors.rs index a8ae13a1f777..dbe3d4e4f80b 100644 --- a/src/meta/types/src/errors/meta_errors.rs +++ b/src/meta/types/src/errors/meta_errors.rs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_meta_stoerr::MetaStorageError; +use databend_common_meta_stoerr::MetaStorageError; use serde::Deserialize; use serde::Serialize; use thiserror::Error; diff --git a/src/meta/types/src/errors/meta_startup_errors.rs b/src/meta/types/src/errors/meta_startup_errors.rs index 89ab54b4959f..d0a7cf831439 100644 --- a/src/meta/types/src/errors/meta_startup_errors.rs +++ b/src/meta/types/src/errors/meta_startup_errors.rs @@ -13,7 +13,7 @@ // limitations under the License. use anyerror::AnyError; -use common_meta_stoerr::MetaStorageError; +use databend_common_meta_stoerr::MetaStorageError; use crate::raft_types::InitializeError; use crate::MetaNetworkError; diff --git a/src/meta/types/tests/it/cluster.rs b/src/meta/types/tests/it/cluster.rs index 103690996970..b829c5b19a08 100644 --- a/src/meta/types/tests/it/cluster.rs +++ b/src/meta/types/tests/it/cluster.rs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_meta_types::NodeInfo; +use databend_common_meta_types::NodeInfo; #[test] fn test_node_info_ip_port() -> anyhow::Result<()> { diff --git a/src/meta/types/tests/it/main.rs b/src/meta/types/tests/it/main.rs index 57ed726600ed..6a905b2a019b 100644 --- a/src/meta/types/tests/it/main.rs +++ b/src/meta/types/tests/it/main.rs @@ -16,7 +16,7 @@ mod cluster; #[test] fn test_bin_commit_version() -> anyhow::Result<()> { - let v = &common_meta_types::config::DATABEND_COMMIT_VERSION; + let v = &databend_common_meta_types::config::DATABEND_COMMIT_VERSION; assert!(v.len() > 0); Ok(()) } diff --git a/src/query/ast/Cargo.toml b/src/query/ast/Cargo.toml index f7dff8879c28..4121907b9166 100644 --- a/src/query/ast/Cargo.toml +++ b/src/query/ast/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "common-ast" +name = "databend-common-ast" version = { workspace = true } authors = { workspace = true } license = { workspace = true } @@ -11,10 +11,10 @@ doctest = false [dependencies] # In alphabetical order # Workspace dependencies -common-base = { path = "../../common/base" } -common-exception = { path = "../../common/exception" } -common-io = { path = "../../common/io" } -common-meta-app = { path = "../../meta/app" } +databend-common-base = { path = "../../common/base" } +databend-common-exception = { path = "../../common/exception" } +databend-common-io = { path = "../../common/io" } +databend-common-meta-app = { path = "../../meta/app" } # Crates.io dependencies enum-as-inner = "0.5.1" @@ -34,8 +34,8 @@ strum_macros = "0.24" url = "2.3.1" [dev-dependencies] -common-base = { path = "../../common/base" } criterion = "0.4" +databend-common-base = { path = "../../common/base" } goldenfile = "1.4" pretty_assertions = "1.3.0" regex = { workspace = true } diff --git a/src/query/ast/benches/bench.rs b/src/query/ast/benches/bench.rs index efd4303be8e2..a192beb636be 100644 --- a/src/query/ast/benches/bench.rs +++ b/src/query/ast/benches/bench.rs @@ -15,12 +15,12 @@ #[macro_use] extern crate criterion; -use common_ast::parser::parse_expr; -use common_ast::parser::parse_sql; -use common_ast::parser::tokenize_sql; -use common_ast::Dialect; use criterion::black_box; use criterion::Criterion; +use databend_common_ast::parser::parse_expr; +use databend_common_ast::parser::parse_sql; +use databend_common_ast::parser::tokenize_sql; +use databend_common_ast::Dialect; fn bench(c: &mut Criterion) { let mut group = c.benchmark_group("bench_parser"); diff --git a/src/query/ast/fuzz/Cargo.toml b/src/query/ast/fuzz/Cargo.toml index b6f03b6b1c0e..1857e0e31adf 100644 --- a/src/query/ast/fuzz/Cargo.toml +++ b/src/query/ast/fuzz/Cargo.toml @@ -16,7 +16,7 @@ doctest = false test = false [dependencies] -common-ast = { path = ".." } +databend-common-ast = { path = ".." } afl = "0.12" diff --git a/src/query/ast/fuzz/fuzz_targets/fuzz_parse_sql.rs b/src/query/ast/fuzz/fuzz_targets/fuzz_parse_sql.rs index 23c3866d4e7c..f43a3ab5a8ed 100644 --- a/src/query/ast/fuzz/fuzz_targets/fuzz_parse_sql.rs +++ b/src/query/ast/fuzz/fuzz_targets/fuzz_parse_sql.rs @@ -15,9 +15,9 @@ #[macro_use] extern crate afl; -use common_ast::parser::parse_expr; -use common_ast::parser::tokenize_sql; -use common_ast::Backtrace; +use databend_common_ast::parser::parse_expr; +use databend_common_ast::parser::tokenize_sql; +use databend_common_ast::Backtrace; fn main() { loop { diff --git a/src/query/ast/src/ast/ast.rs b/src/query/ast/src/ast/ast.rs index ab8cdacdcf91..000d3f7a0b9d 100644 --- a/src/query/ast/src/ast/ast.rs +++ b/src/query/ast/src/ast/ast.rs @@ -15,7 +15,7 @@ use std::fmt::Display; use std::fmt::Formatter; -use common_exception::Span; +use databend_common_exception::Span; use crate::parser::quote::quote_ident; diff --git a/src/query/ast/src/ast/expr.rs b/src/query/ast/src/ast/expr.rs index dcf1d9e7f12a..8259dde4833e 100644 --- a/src/query/ast/src/ast/expr.rs +++ b/src/query/ast/src/ast/expr.rs @@ -15,11 +15,11 @@ use std::fmt::Display; use std::fmt::Formatter; -use common_exception::ErrorCode; -use common_exception::Result; -use common_exception::Span; -use common_io::display_decimal_256; -use common_io::escape_string_with_quote; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_exception::Span; +use databend_common_io::display_decimal_256; +use databend_common_io::escape_string_with_quote; use enum_as_inner::EnumAsInner; use ethnum::i256; diff --git a/src/query/ast/src/ast/format/ast_format.rs b/src/query/ast/src/ast/format/ast_format.rs index c112d51155dd..3ab8b1c42266 100644 --- a/src/query/ast/src/ast/format/ast_format.rs +++ b/src/query/ast/src/ast/format/ast_format.rs @@ -14,10 +14,10 @@ use std::fmt::Display; -use common_exception::Result; -use common_exception::Span; -use common_meta_app::principal::PrincipalIdentity; -use common_meta_app::principal::UserIdentity; +use databend_common_exception::Result; +use databend_common_exception::Span; +use databend_common_meta_app::principal::PrincipalIdentity; +use databend_common_meta_app::principal::UserIdentity; use crate::ast::*; use crate::visitors::Visitor; diff --git a/src/query/ast/src/ast/format/indent_format.rs b/src/query/ast/src/ast/format/indent_format.rs index a36ebe0c200c..84c6edf046fe 100644 --- a/src/query/ast/src/ast/format/indent_format.rs +++ b/src/query/ast/src/ast/format/indent_format.rs @@ -15,7 +15,7 @@ use std::fmt::Display; use std::fmt::Write; -use common_exception::Result; +use databend_common_exception::Result; use super::FormatTreeNode; diff --git a/src/query/ast/src/ast/format/pretty_format.rs b/src/query/ast/src/ast/format/pretty_format.rs index 8d203eafaf01..c56d42137273 100644 --- a/src/query/ast/src/ast/format/pretty_format.rs +++ b/src/query/ast/src/ast/format/pretty_format.rs @@ -15,7 +15,7 @@ use std::fmt::Display; use std::fmt::Write; -use common_exception::Result; +use databend_common_exception::Result; use super::FormatTreeNode; diff --git a/src/query/ast/src/ast/format/syntax/mod.rs b/src/query/ast/src/ast/format/syntax/mod.rs index f70e7138d51d..06eb3e8f8a7f 100644 --- a/src/query/ast/src/ast/format/syntax/mod.rs +++ b/src/query/ast/src/ast/format/syntax/mod.rs @@ -17,7 +17,7 @@ mod dml; mod expr; mod query; -use common_exception::Result; +use databend_common_exception::Result; use ddl::*; use dml::*; use pretty::RcDoc; diff --git a/src/query/ast/src/ast/query.rs b/src/query/ast/src/ast/query.rs index cc029d61d487..a2984ca59d96 100644 --- a/src/query/ast/src/ast/query.rs +++ b/src/query/ast/src/ast/query.rs @@ -15,7 +15,7 @@ use std::fmt::Display; use std::fmt::Formatter; -use common_exception::Span; +use databend_common_exception::Span; use super::Lambda; use crate::ast::write_comma_separated_list; diff --git a/src/query/ast/src/ast/statements/catalog.rs b/src/query/ast/src/ast/statements/catalog.rs index bd8d08c74c7c..608beff4fbe5 100644 --- a/src/query/ast/src/ast/statements/catalog.rs +++ b/src/query/ast/src/ast/statements/catalog.rs @@ -16,7 +16,7 @@ use std::collections::BTreeMap; use std::fmt::Display; use std::fmt::Formatter; -use common_meta_app::schema::CatalogType; +use databend_common_meta_app::schema::CatalogType; use super::ShowLimit; use crate::ast::write_comma_separated_map; diff --git a/src/query/ast/src/ast/statements/connection.rs b/src/query/ast/src/ast/statements/connection.rs index 8960f7eda9f1..d63094ddd5a7 100644 --- a/src/query/ast/src/ast/statements/connection.rs +++ b/src/query/ast/src/ast/statements/connection.rs @@ -16,7 +16,7 @@ use std::collections::BTreeMap; use std::fmt::Display; use std::fmt::Formatter; -use common_base::base::mask_string; +use databend_common_base::base::mask_string; use crate::ast::Identifier; diff --git a/src/query/ast/src/ast/statements/copy.rs b/src/query/ast/src/ast/statements/copy.rs index 898d3191c6bb..b0a5737861f5 100644 --- a/src/query/ast/src/ast/statements/copy.rs +++ b/src/query/ast/src/ast/statements/copy.rs @@ -21,11 +21,11 @@ use std::io::ErrorKind; use std::io::Result; use std::str::FromStr; -use common_base::base::mask_string; -use common_exception::ErrorCode; -use common_meta_app::principal::CopyOptions; -use common_meta_app::principal::OnErrorMode; -use common_meta_app::principal::COPY_MAX_FILES_PER_COMMIT; +use databend_common_base::base::mask_string; +use databend_common_exception::ErrorCode; +use databend_common_meta_app::principal::CopyOptions; +use databend_common_meta_app::principal::OnErrorMode; +use databend_common_meta_app::principal::COPY_MAX_FILES_PER_COMMIT; use itertools::Itertools; use url::Url; @@ -126,7 +126,7 @@ impl CopyIntoTableStmt { pub fn apply_to_copy_option( &self, copy_options: &mut CopyOptions, - ) -> common_exception::Result<()> { + ) -> databend_common_exception::Result<()> { copy_options.on_error = OnErrorMode::from_str(&self.on_error).map_err(ErrorCode::SyntaxException)?; @@ -387,7 +387,7 @@ impl UriLocation { uri: String, part_prefix: String, conns: BTreeMap, - ) -> common_exception::Result { + ) -> databend_common_exception::Result { // fs location is not a valid url, let's check it in advance. if let Some(path) = uri.strip_prefix("fs://") { return Ok(UriLocation::new( @@ -399,8 +399,9 @@ impl UriLocation { )); } - let parsed = Url::parse(&uri) - .map_err(|e| common_exception::ErrorCode::BadArguments(format!("invalid uri {}", e)))?; + let parsed = Url::parse(&uri).map_err(|e| { + databend_common_exception::ErrorCode::BadArguments(format!("invalid uri {}", e)) + })?; let protocol = parsed.scheme().to_string(); @@ -413,7 +414,7 @@ impl UriLocation { hostname.to_string() } }) - .ok_or_else(|| common_exception::ErrorCode::BadArguments("invalid uri"))?; + .ok_or_else(|| databend_common_exception::ErrorCode::BadArguments("invalid uri"))?; let path = if parsed.path().is_empty() { "/".to_string() diff --git a/src/query/ast/src/ast/statements/database.rs b/src/query/ast/src/ast/statements/database.rs index 10a61dfa07ab..f79004ad3b55 100644 --- a/src/query/ast/src/ast/statements/database.rs +++ b/src/query/ast/src/ast/statements/database.rs @@ -15,7 +15,7 @@ use std::fmt::Display; use std::fmt::Formatter; -use common_meta_app::share::ShareNameIdent; +use databend_common_meta_app::share::ShareNameIdent; use crate::ast::statements::show::ShowLimit; use crate::ast::write_dot_separated_list; diff --git a/src/query/ast/src/ast/statements/merge_into.rs b/src/query/ast/src/ast/statements/merge_into.rs index 5b8c1f5d5de7..4a52efbcd134 100644 --- a/src/query/ast/src/ast/statements/merge_into.rs +++ b/src/query/ast/src/ast/statements/merge_into.rs @@ -16,8 +16,8 @@ use std::collections::BTreeMap; use std::fmt::Display; use std::fmt::Formatter; -use common_exception::ErrorCode; -use common_exception::Result; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; use super::Hint; use crate::ast::write_comma_separated_list; diff --git a/src/query/ast/src/ast/statements/share.rs b/src/query/ast/src/ast/statements/share.rs index 89c2fd629885..adb110686137 100644 --- a/src/query/ast/src/ast/statements/share.rs +++ b/src/query/ast/src/ast/statements/share.rs @@ -16,8 +16,8 @@ use std::collections::BTreeMap; use std::fmt::Display; use std::fmt::Formatter; -use common_meta_app::share::ShareGrantObjectName; -use common_meta_app::share::ShareGrantObjectPrivilege; +use databend_common_meta_app::share::ShareGrantObjectName; +use databend_common_meta_app::share::ShareGrantObjectPrivilege; use itertools::Itertools; use super::UriLocation; diff --git a/src/query/ast/src/ast/statements/statement.rs b/src/query/ast/src/ast/statements/statement.rs index 6455d38cd104..d6ca54d4fb4c 100644 --- a/src/query/ast/src/ast/statements/statement.rs +++ b/src/query/ast/src/ast/statements/statement.rs @@ -15,9 +15,9 @@ use std::fmt::Display; use std::fmt::Formatter; -use common_meta_app::principal::FileFormatOptionsAst; -use common_meta_app::principal::PrincipalIdentity; -use common_meta_app::principal::UserIdentity; +use databend_common_meta_app::principal::FileFormatOptionsAst; +use databend_common_meta_app::principal::PrincipalIdentity; +use databend_common_meta_app::principal::UserIdentity; use super::merge_into::MergeIntoStmt; use super::*; diff --git a/src/query/ast/src/ast/statements/user.rs b/src/query/ast/src/ast/statements/user.rs index 1a00bae63a95..bacd63f294db 100644 --- a/src/query/ast/src/ast/statements/user.rs +++ b/src/query/ast/src/ast/statements/user.rs @@ -15,12 +15,12 @@ use std::fmt::Display; use std::fmt::Formatter; -use common_meta_app::principal::AuthType; -use common_meta_app::principal::PrincipalIdentity; -use common_meta_app::principal::UserIdentity; -use common_meta_app::principal::UserOption; -use common_meta_app::principal::UserOptionFlag; -use common_meta_app::principal::UserPrivilegeType; +use databend_common_meta_app::principal::AuthType; +use databend_common_meta_app::principal::PrincipalIdentity; +use databend_common_meta_app::principal::UserIdentity; +use databend_common_meta_app::principal::UserOption; +use databend_common_meta_app::principal::UserOptionFlag; +use databend_common_meta_app::principal::UserPrivilegeType; use crate::ast::write_comma_separated_list; diff --git a/src/query/ast/src/error.rs b/src/query/ast/src/error.rs index 1e35906cdb42..30e4716967e4 100644 --- a/src/query/ast/src/error.rs +++ b/src/query/ast/src/error.rs @@ -18,8 +18,8 @@ use std::fmt::Write; use std::num::IntErrorKind; use std::num::ParseIntError; -use common_exception::pretty_print_error; -use common_exception::Range; +use databend_common_exception::pretty_print_error; +use databend_common_exception::Range; use itertools::Itertools; use ordered_float::OrderedFloat; diff --git a/src/query/ast/src/parser/parser.rs b/src/query/ast/src/parser/parser.rs index 0fca438da613..a2a8bbb06bba 100644 --- a/src/query/ast/src/parser/parser.rs +++ b/src/query/ast/src/parser/parser.rs @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_exception::ErrorCode; -use common_exception::Result; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; use crate::ast::Expr; use crate::ast::Identifier; diff --git a/src/query/ast/src/parser/statement.rs b/src/query/ast/src/parser/statement.rs index 33453f6f9082..5dd2d967b4bc 100644 --- a/src/query/ast/src/parser/statement.rs +++ b/src/query/ast/src/parser/statement.rs @@ -15,15 +15,15 @@ use std::collections::BTreeMap; use std::time::Duration; -use common_meta_app::principal::AuthType; -use common_meta_app::principal::FileFormatOptionsAst; -use common_meta_app::principal::PrincipalIdentity; -use common_meta_app::principal::UserIdentity; -use common_meta_app::principal::UserPrivilegeType; -use common_meta_app::schema::CatalogType; -use common_meta_app::share::ShareGrantObjectName; -use common_meta_app::share::ShareGrantObjectPrivilege; -use common_meta_app::share::ShareNameIdent; +use databend_common_meta_app::principal::AuthType; +use databend_common_meta_app::principal::FileFormatOptionsAst; +use databend_common_meta_app::principal::PrincipalIdentity; +use databend_common_meta_app::principal::UserIdentity; +use databend_common_meta_app::principal::UserPrivilegeType; +use databend_common_meta_app::schema::CatalogType; +use databend_common_meta_app::share::ShareGrantObjectName; +use databend_common_meta_app::share::ShareGrantObjectPrivilege; +use databend_common_meta_app::share::ShareNameIdent; use nom::branch::alt; use nom::combinator::consumed; use nom::combinator::map; diff --git a/src/query/ast/src/parser/token.rs b/src/query/ast/src/parser/token.rs index 7d934d5ba84b..867dc9f3a120 100644 --- a/src/query/ast/src/parser/token.rs +++ b/src/query/ast/src/parser/token.rs @@ -12,9 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_exception::ErrorCode; -use common_exception::Range; -use common_exception::Result; +use databend_common_exception::ErrorCode; +use databend_common_exception::Range; +use databend_common_exception::Result; use logos::Lexer; use logos::Logos; use strum::IntoEnumIterator; diff --git a/src/query/ast/src/util.rs b/src/query/ast/src/util.rs index bfabe628735d..737352468472 100644 --- a/src/query/ast/src/util.rs +++ b/src/query/ast/src/util.rs @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_exception::Range; -use common_exception::Span; +use databend_common_exception::Range; +use databend_common_exception::Span; use nom::branch::alt; use nom::combinator::map; use nom::Offset; diff --git a/src/query/ast/src/visitors/visitor.rs b/src/query/ast/src/visitors/visitor.rs index 1571f5107d18..d3263e61dbbb 100644 --- a/src/query/ast/src/visitors/visitor.rs +++ b/src/query/ast/src/visitors/visitor.rs @@ -12,10 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_exception::Span; -use common_meta_app::principal::FileFormatOptionsAst; -use common_meta_app::principal::PrincipalIdentity; -use common_meta_app::principal::UserIdentity; +use databend_common_exception::Span; +use databend_common_meta_app::principal::FileFormatOptionsAst; +use databend_common_meta_app::principal::PrincipalIdentity; +use databend_common_meta_app::principal::UserIdentity; use super::walk::walk_cte; use super::walk::walk_expr; diff --git a/src/query/ast/src/visitors/visitor_mut.rs b/src/query/ast/src/visitors/visitor_mut.rs index 9e1a9ccf1219..f14c8513ed3c 100644 --- a/src/query/ast/src/visitors/visitor_mut.rs +++ b/src/query/ast/src/visitors/visitor_mut.rs @@ -12,10 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_exception::Span; -use common_meta_app::principal::FileFormatOptionsAst; -use common_meta_app::principal::PrincipalIdentity; -use common_meta_app::principal::UserIdentity; +use databend_common_exception::Span; +use databend_common_meta_app::principal::FileFormatOptionsAst; +use databend_common_meta_app::principal::PrincipalIdentity; +use databend_common_meta_app::principal::UserIdentity; use super::walk_mut::walk_cte_mut; use super::walk_mut::walk_expr_mut; diff --git a/src/query/ast/tests/it/decimal.rs b/src/query/ast/tests/it/decimal.rs index 15ee7b610cdc..c0d22a3d06e4 100644 --- a/src/query/ast/tests/it/decimal.rs +++ b/src/query/ast/tests/it/decimal.rs @@ -12,9 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_ast::ast::Literal; -use common_ast::parser::expr::parse_float; -use common_ast::parser::expr::parse_uint; +use databend_common_ast::ast::Literal; +use databend_common_ast::parser::expr::parse_float; +use databend_common_ast::parser::expr::parse_uint; use ethnum::i256; #[test] diff --git a/src/query/ast/tests/it/parser.rs b/src/query/ast/tests/it/parser.rs index 75346b0dd123..8461b19a72d7 100644 --- a/src/query/ast/tests/it/parser.rs +++ b/src/query/ast/tests/it/parser.rs @@ -16,19 +16,19 @@ use std::fmt::Debug; use std::fmt::Display; use std::io::Write; -use common_ast::display_parser_error; -use common_ast::parser::expr::*; -use common_ast::parser::parse_sql; -use common_ast::parser::query::*; -use common_ast::parser::quote::quote_ident; -use common_ast::parser::quote::unquote_ident; -use common_ast::parser::token::*; -use common_ast::parser::tokenize_sql; -use common_ast::rule; -use common_ast::Backtrace; -use common_ast::Dialect; -use common_ast::IResult; -use common_ast::Input; +use databend_common_ast::display_parser_error; +use databend_common_ast::parser::expr::*; +use databend_common_ast::parser::parse_sql; +use databend_common_ast::parser::query::*; +use databend_common_ast::parser::quote::quote_ident; +use databend_common_ast::parser::quote::unquote_ident; +use databend_common_ast::parser::token::*; +use databend_common_ast::parser::tokenize_sql; +use databend_common_ast::rule; +use databend_common_ast::Backtrace; +use databend_common_ast::Dialect; +use databend_common_ast::IResult; +use databend_common_ast::Input; use goldenfile::Mint; fn run_parser(file: &mut dyn Write, parser: P, src: &str) diff --git a/src/query/ast/tests/it/token.rs b/src/query/ast/tests/it/token.rs index efbcd5766010..e7c5cfb830a5 100644 --- a/src/query/ast/tests/it/token.rs +++ b/src/query/ast/tests/it/token.rs @@ -15,8 +15,8 @@ use std::fs::File; use std::io::Write; -use common_ast::parser::token::*; -use common_exception::Result; +use databend_common_ast::parser::token::*; +use databend_common_exception::Result; use goldenfile::Mint; fn run_lexer(file: &mut File, source: &str) { diff --git a/src/query/catalog/Cargo.toml b/src/query/catalog/Cargo.toml index c975cac20ccb..b44ee9e33abb 100644 --- a/src/query/catalog/Cargo.toml +++ b/src/query/catalog/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "common-catalog" +name = "databend-common-catalog" version = "0.1.0" edition = "2021" @@ -9,21 +9,21 @@ doctest = false test = false [dependencies] -common-arrow = { path = "../../common/arrow" } -common-base = { path = "../../common/base" } -common-config = { path = "../config" } -common-exception = { path = "../../common/exception" } -common-expression = { path = "../expression" } -common-io = { path = "../../common/io" } -common-meta-api = { path = "../../meta/api" } -common-meta-app = { path = "../../meta/app" } -common-meta-store = { path = "../../meta/store" } -common-meta-types = { path = "../../meta/types" } -common-pipeline-core = { path = "../pipeline/core" } -common-settings = { path = "../settings" } -common-storage = { path = "../../common/storage" } -common-users = { path = "../users" } -storages-common-table-meta = { path = "../storages/common/table_meta" } +databend-common-arrow = { path = "../../common/arrow" } +databend-common-base = { path = "../../common/base" } +databend-common-config = { path = "../config" } +databend-common-exception = { path = "../../common/exception" } +databend-common-expression = { path = "../expression" } +databend-common-io = { path = "../../common/io" } +databend-common-meta-api = { path = "../../meta/api" } +databend-common-meta-app = { path = "../../meta/app" } +databend-common-meta-store = { path = "../../meta/store" } +databend-common-meta-types = { path = "../../meta/types" } +databend-common-pipeline-core = { path = "../pipeline/core" } +databend-common-settings = { path = "../settings" } +databend-common-storage = { path = "../../common/storage" } +databend-common-users = { path = "../users" } +databend-storages-common-table-meta = { path = "../storages/common/table_meta" } arrow-schema = { workspace = true } async-backtrace = { workspace = true } diff --git a/src/query/catalog/src/catalog/interface.rs b/src/query/catalog/src/catalog/interface.rs index 7d30df7ed833..009277ecf2df 100644 --- a/src/query/catalog/src/catalog/interface.rs +++ b/src/query/catalog/src/catalog/interface.rs @@ -16,72 +16,72 @@ use std::any::Any; use std::fmt::Debug; use std::sync::Arc; -use common_exception::ErrorCode; -use common_exception::Result; -use common_meta_app::schema::CatalogInfo; -use common_meta_app::schema::CountTablesReply; -use common_meta_app::schema::CountTablesReq; -use common_meta_app::schema::CreateDatabaseReply; -use common_meta_app::schema::CreateDatabaseReq; -use common_meta_app::schema::CreateIndexReply; -use common_meta_app::schema::CreateIndexReq; -use common_meta_app::schema::CreateLockRevReply; -use common_meta_app::schema::CreateLockRevReq; -use common_meta_app::schema::CreateTableReply; -use common_meta_app::schema::CreateTableReq; -use common_meta_app::schema::CreateVirtualColumnReply; -use common_meta_app::schema::CreateVirtualColumnReq; -use common_meta_app::schema::DeleteLockRevReq; -use common_meta_app::schema::DropDatabaseReply; -use common_meta_app::schema::DropDatabaseReq; -use common_meta_app::schema::DropIndexReply; -use common_meta_app::schema::DropIndexReq; -use common_meta_app::schema::DropTableByIdReq; -use common_meta_app::schema::DropTableReply; -use common_meta_app::schema::DropVirtualColumnReply; -use common_meta_app::schema::DropVirtualColumnReq; -use common_meta_app::schema::DroppedId; -use common_meta_app::schema::ExtendLockRevReq; -use common_meta_app::schema::GcDroppedTableReq; -use common_meta_app::schema::GcDroppedTableResp; -use common_meta_app::schema::GetIndexReply; -use common_meta_app::schema::GetIndexReq; -use common_meta_app::schema::GetTableCopiedFileReply; -use common_meta_app::schema::GetTableCopiedFileReq; -use common_meta_app::schema::IndexMeta; -use common_meta_app::schema::ListDroppedTableReq; -use common_meta_app::schema::ListIndexesByIdReq; -use common_meta_app::schema::ListIndexesReq; -use common_meta_app::schema::ListLockRevReq; -use common_meta_app::schema::ListLocksReq; -use common_meta_app::schema::ListVirtualColumnsReq; -use common_meta_app::schema::LockInfo; -use common_meta_app::schema::LockMeta; -use common_meta_app::schema::RenameDatabaseReply; -use common_meta_app::schema::RenameDatabaseReq; -use common_meta_app::schema::RenameTableReply; -use common_meta_app::schema::RenameTableReq; -use common_meta_app::schema::SetTableColumnMaskPolicyReply; -use common_meta_app::schema::SetTableColumnMaskPolicyReq; -use common_meta_app::schema::TableIdent; -use common_meta_app::schema::TableInfo; -use common_meta_app::schema::TableMeta; -use common_meta_app::schema::TruncateTableReply; -use common_meta_app::schema::TruncateTableReq; -use common_meta_app::schema::UndropDatabaseReply; -use common_meta_app::schema::UndropDatabaseReq; -use common_meta_app::schema::UndropTableReply; -use common_meta_app::schema::UndropTableReq; -use common_meta_app::schema::UpdateIndexReply; -use common_meta_app::schema::UpdateIndexReq; -use common_meta_app::schema::UpdateTableMetaReply; -use common_meta_app::schema::UpdateTableMetaReq; -use common_meta_app::schema::UpdateVirtualColumnReply; -use common_meta_app::schema::UpdateVirtualColumnReq; -use common_meta_app::schema::UpsertTableOptionReply; -use common_meta_app::schema::UpsertTableOptionReq; -use common_meta_app::schema::VirtualColumnMeta; -use common_meta_types::MetaId; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_meta_app::schema::CatalogInfo; +use databend_common_meta_app::schema::CountTablesReply; +use databend_common_meta_app::schema::CountTablesReq; +use databend_common_meta_app::schema::CreateDatabaseReply; +use databend_common_meta_app::schema::CreateDatabaseReq; +use databend_common_meta_app::schema::CreateIndexReply; +use databend_common_meta_app::schema::CreateIndexReq; +use databend_common_meta_app::schema::CreateLockRevReply; +use databend_common_meta_app::schema::CreateLockRevReq; +use databend_common_meta_app::schema::CreateTableReply; +use databend_common_meta_app::schema::CreateTableReq; +use databend_common_meta_app::schema::CreateVirtualColumnReply; +use databend_common_meta_app::schema::CreateVirtualColumnReq; +use databend_common_meta_app::schema::DeleteLockRevReq; +use databend_common_meta_app::schema::DropDatabaseReply; +use databend_common_meta_app::schema::DropDatabaseReq; +use databend_common_meta_app::schema::DropIndexReply; +use databend_common_meta_app::schema::DropIndexReq; +use databend_common_meta_app::schema::DropTableByIdReq; +use databend_common_meta_app::schema::DropTableReply; +use databend_common_meta_app::schema::DropVirtualColumnReply; +use databend_common_meta_app::schema::DropVirtualColumnReq; +use databend_common_meta_app::schema::DroppedId; +use databend_common_meta_app::schema::ExtendLockRevReq; +use databend_common_meta_app::schema::GcDroppedTableReq; +use databend_common_meta_app::schema::GcDroppedTableResp; +use databend_common_meta_app::schema::GetIndexReply; +use databend_common_meta_app::schema::GetIndexReq; +use databend_common_meta_app::schema::GetTableCopiedFileReply; +use databend_common_meta_app::schema::GetTableCopiedFileReq; +use databend_common_meta_app::schema::IndexMeta; +use databend_common_meta_app::schema::ListDroppedTableReq; +use databend_common_meta_app::schema::ListIndexesByIdReq; +use databend_common_meta_app::schema::ListIndexesReq; +use databend_common_meta_app::schema::ListLockRevReq; +use databend_common_meta_app::schema::ListLocksReq; +use databend_common_meta_app::schema::ListVirtualColumnsReq; +use databend_common_meta_app::schema::LockInfo; +use databend_common_meta_app::schema::LockMeta; +use databend_common_meta_app::schema::RenameDatabaseReply; +use databend_common_meta_app::schema::RenameDatabaseReq; +use databend_common_meta_app::schema::RenameTableReply; +use databend_common_meta_app::schema::RenameTableReq; +use databend_common_meta_app::schema::SetTableColumnMaskPolicyReply; +use databend_common_meta_app::schema::SetTableColumnMaskPolicyReq; +use databend_common_meta_app::schema::TableIdent; +use databend_common_meta_app::schema::TableInfo; +use databend_common_meta_app::schema::TableMeta; +use databend_common_meta_app::schema::TruncateTableReply; +use databend_common_meta_app::schema::TruncateTableReq; +use databend_common_meta_app::schema::UndropDatabaseReply; +use databend_common_meta_app::schema::UndropDatabaseReq; +use databend_common_meta_app::schema::UndropTableReply; +use databend_common_meta_app::schema::UndropTableReq; +use databend_common_meta_app::schema::UpdateIndexReply; +use databend_common_meta_app::schema::UpdateIndexReq; +use databend_common_meta_app::schema::UpdateTableMetaReply; +use databend_common_meta_app::schema::UpdateTableMetaReq; +use databend_common_meta_app::schema::UpdateVirtualColumnReply; +use databend_common_meta_app::schema::UpdateVirtualColumnReq; +use databend_common_meta_app::schema::UpsertTableOptionReply; +use databend_common_meta_app::schema::UpsertTableOptionReq; +use databend_common_meta_app::schema::VirtualColumnMeta; +use databend_common_meta_types::MetaId; use dyn_clone::DynClone; use crate::database::Database; @@ -189,7 +189,7 @@ pub trait Catalog: DynClone + Send + Sync + Debug { async fn get_table_name_by_id(&self, table_id: MetaId) -> Result; // Get the db name by meta id. - async fn get_db_name_by_id(&self, db_id: MetaId) -> common_exception::Result; + async fn get_db_name_by_id(&self, db_id: MetaId) -> databend_common_exception::Result; // Get one table by db and table name. async fn get_table( diff --git a/src/query/catalog/src/catalog/manager.rs b/src/query/catalog/src/catalog/manager.rs index 9236ecc5d526..3e2c1c910118 100644 --- a/src/query/catalog/src/catalog/manager.rs +++ b/src/query/catalog/src/catalog/manager.rs @@ -16,25 +16,25 @@ use std::collections::HashMap; use std::sync::Arc; use chrono::Utc; -use common_base::base::GlobalInstance; -use common_config::CatalogConfig; -use common_config::InnerConfig; -use common_exception::ErrorCode; -use common_exception::Result; -use common_meta_api::SchemaApi; -use common_meta_app::schema::CatalogId; -use common_meta_app::schema::CatalogInfo; -use common_meta_app::schema::CatalogMeta; -use common_meta_app::schema::CatalogNameIdent; -use common_meta_app::schema::CatalogOption; -use common_meta_app::schema::CatalogType; -use common_meta_app::schema::CreateCatalogReq; -use common_meta_app::schema::DropCatalogReq; -use common_meta_app::schema::GetCatalogReq; -use common_meta_app::schema::HiveCatalogOption; -use common_meta_app::schema::ListCatalogReq; -use common_meta_store::MetaStore; -use common_meta_store::MetaStoreProvider; +use databend_common_base::base::GlobalInstance; +use databend_common_config::CatalogConfig; +use databend_common_config::InnerConfig; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_meta_api::SchemaApi; +use databend_common_meta_app::schema::CatalogId; +use databend_common_meta_app::schema::CatalogInfo; +use databend_common_meta_app::schema::CatalogMeta; +use databend_common_meta_app::schema::CatalogNameIdent; +use databend_common_meta_app::schema::CatalogOption; +use databend_common_meta_app::schema::CatalogType; +use databend_common_meta_app::schema::CreateCatalogReq; +use databend_common_meta_app::schema::DropCatalogReq; +use databend_common_meta_app::schema::GetCatalogReq; +use databend_common_meta_app::schema::HiveCatalogOption; +use databend_common_meta_app::schema::ListCatalogReq; +use databend_common_meta_store::MetaStore; +use databend_common_meta_store::MetaStoreProvider; use super::Catalog; use super::CatalogCreator; diff --git a/src/query/catalog/src/cluster_info.rs b/src/query/catalog/src/cluster_info.rs index fc74308f6322..a221f35b6294 100644 --- a/src/query/catalog/src/cluster_info.rs +++ b/src/query/catalog/src/cluster_info.rs @@ -14,7 +14,7 @@ use std::sync::Arc; -use common_meta_types::NodeInfo; +use databend_common_meta_types::NodeInfo; pub struct Cluster { pub local_id: String, diff --git a/src/query/catalog/src/database.rs b/src/query/catalog/src/database.rs index 3c56280103f3..f560a95eda33 100644 --- a/src/query/catalog/src/database.rs +++ b/src/query/catalog/src/database.rs @@ -15,28 +15,28 @@ use std::collections::BTreeMap; use std::sync::Arc; -use common_exception::ErrorCode; -use common_exception::Result; -use common_meta_app::schema::CreateTableReply; -use common_meta_app::schema::CreateTableReq; -use common_meta_app::schema::DatabaseInfo; -use common_meta_app::schema::DropTableByIdReq; -use common_meta_app::schema::DropTableReply; -use common_meta_app::schema::GetTableCopiedFileReply; -use common_meta_app::schema::GetTableCopiedFileReq; -use common_meta_app::schema::RenameTableReply; -use common_meta_app::schema::RenameTableReq; -use common_meta_app::schema::SetTableColumnMaskPolicyReply; -use common_meta_app::schema::SetTableColumnMaskPolicyReq; -use common_meta_app::schema::TableInfo; -use common_meta_app::schema::TruncateTableReply; -use common_meta_app::schema::TruncateTableReq; -use common_meta_app::schema::UndropTableReply; -use common_meta_app::schema::UndropTableReq; -use common_meta_app::schema::UpdateTableMetaReply; -use common_meta_app::schema::UpdateTableMetaReq; -use common_meta_app::schema::UpsertTableOptionReply; -use common_meta_app::schema::UpsertTableOptionReq; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_meta_app::schema::CreateTableReply; +use databend_common_meta_app::schema::CreateTableReq; +use databend_common_meta_app::schema::DatabaseInfo; +use databend_common_meta_app::schema::DropTableByIdReq; +use databend_common_meta_app::schema::DropTableReply; +use databend_common_meta_app::schema::GetTableCopiedFileReply; +use databend_common_meta_app::schema::GetTableCopiedFileReq; +use databend_common_meta_app::schema::RenameTableReply; +use databend_common_meta_app::schema::RenameTableReq; +use databend_common_meta_app::schema::SetTableColumnMaskPolicyReply; +use databend_common_meta_app::schema::SetTableColumnMaskPolicyReq; +use databend_common_meta_app::schema::TableInfo; +use databend_common_meta_app::schema::TruncateTableReply; +use databend_common_meta_app::schema::TruncateTableReq; +use databend_common_meta_app::schema::UndropTableReply; +use databend_common_meta_app::schema::UndropTableReq; +use databend_common_meta_app::schema::UpdateTableMetaReply; +use databend_common_meta_app::schema::UpdateTableMetaReq; +use databend_common_meta_app::schema::UpsertTableOptionReply; +use databend_common_meta_app::schema::UpsertTableOptionReq; use dyn_clone::DynClone; use crate::table::Table; diff --git a/src/query/catalog/src/lock.rs b/src/query/catalog/src/lock.rs index a08550e844d0..eb8872f064d3 100644 --- a/src/query/catalog/src/lock.rs +++ b/src/query/catalog/src/lock.rs @@ -14,14 +14,14 @@ use std::sync::Arc; -use common_exception::Result; -use common_meta_app::schema::CreateLockRevReq; -use common_meta_app::schema::DeleteLockRevReq; -use common_meta_app::schema::ExtendLockRevReq; -use common_meta_app::schema::ListLockRevReq; -use common_meta_app::schema::LockKey; -use common_meta_app::schema::LockType; -use common_pipeline_core::LockGuard; +use databend_common_exception::Result; +use databend_common_meta_app::schema::CreateLockRevReq; +use databend_common_meta_app::schema::DeleteLockRevReq; +use databend_common_meta_app::schema::ExtendLockRevReq; +use databend_common_meta_app::schema::ListLockRevReq; +use databend_common_meta_app::schema::LockKey; +use databend_common_meta_app::schema::LockType; +use databend_common_pipeline_core::LockGuard; use crate::catalog::Catalog; use crate::table_context::TableContext; diff --git a/src/query/catalog/src/plan/agg_index.rs b/src/query/catalog/src/plan/agg_index.rs index fea7e34d046f..ef5164c7d8e2 100644 --- a/src/query/catalog/src/plan/agg_index.rs +++ b/src/query/catalog/src/plan/agg_index.rs @@ -14,11 +14,11 @@ use std::fmt::Debug; -use common_exception::Result; -use common_expression::BlockMetaInfo; -use common_expression::BlockMetaInfoPtr; -use common_expression::RemoteExpr; -use common_expression::TableSchemaRef; +use databend_common_exception::Result; +use databend_common_expression::BlockMetaInfo; +use databend_common_expression::BlockMetaInfoPtr; +use databend_common_expression::RemoteExpr; +use databend_common_expression::TableSchemaRef; use super::Projection; diff --git a/src/query/catalog/src/plan/datasource/datasource_info/data_source_info.rs b/src/query/catalog/src/plan/datasource/datasource_info/data_source_info.rs index bf1c24de2bb1..1d471300f1c1 100644 --- a/src/query/catalog/src/plan/datasource/datasource_info/data_source_info.rs +++ b/src/query/catalog/src/plan/datasource/datasource_info/data_source_info.rs @@ -14,8 +14,8 @@ use std::sync::Arc; -use common_expression::TableSchema; -use common_meta_app::schema::TableInfo; +use databend_common_expression::TableSchema; +use databend_common_meta_app::schema::TableInfo; use crate::plan::Parquet2TableInfo; use crate::plan::ParquetTableInfo; diff --git a/src/query/catalog/src/plan/datasource/datasource_info/parquet.rs b/src/query/catalog/src/plan/datasource/datasource_info/parquet.rs index be3bf748d1ea..11a45bc06141 100644 --- a/src/query/catalog/src/plan/datasource/datasource_info/parquet.rs +++ b/src/query/catalog/src/plan/datasource/datasource_info/parquet.rs @@ -17,21 +17,21 @@ use std::io::Cursor; use std::sync::Arc; use arrow_schema::Schema as ArrowSchema; -use common_base::base::tokio::sync::Mutex; -use common_expression::ColumnId; -use common_expression::TableField; -use common_expression::TableSchema; -use common_meta_app::principal::StageInfo; -use common_meta_app::schema::TableInfo; -use common_storage::StageFileInfo; -use common_storage::StageFilesInfo; +use databend_common_base::base::tokio::sync::Mutex; +use databend_common_expression::ColumnId; +use databend_common_expression::TableField; +use databend_common_expression::TableSchema; +use databend_common_meta_app::principal::StageInfo; +use databend_common_meta_app::schema::TableInfo; +use databend_common_storage::StageFileInfo; +use databend_common_storage::StageFilesInfo; +use databend_storages_common_table_meta::meta::ColumnStatistics; use parquet_rs::file::metadata::ParquetMetaData; use parquet_rs::format::SchemaElement; use parquet_rs::schema::types; use parquet_rs::schema::types::SchemaDescPtr; use parquet_rs::schema::types::SchemaDescriptor; use serde::Deserialize; -use storages_common_table_meta::meta::ColumnStatistics; use thrift::protocol::TCompactInputProtocol; use thrift::protocol::TCompactOutputProtocol; use thrift::protocol::TInputProtocol; @@ -137,8 +137,8 @@ mod tests { use std::sync::Arc; use arrow_schema::Schema as ArrowSchema; - use common_base::base::tokio::sync::Mutex; - use common_storage::StageFilesInfo; + use databend_common_base::base::tokio::sync::Mutex; + use databend_common_storage::StageFilesInfo; use parquet_rs::basic::ConvertedType; use parquet_rs::basic::Repetition; use parquet_rs::basic::Type as PhysicalType; diff --git a/src/query/catalog/src/plan/datasource/datasource_info/parquet2.rs b/src/query/catalog/src/plan/datasource/datasource_info/parquet2.rs index 00cb2aba6aec..bc1be25eed95 100644 --- a/src/query/catalog/src/plan/datasource/datasource_info/parquet2.rs +++ b/src/query/catalog/src/plan/datasource/datasource_info/parquet2.rs @@ -14,13 +14,13 @@ use std::sync::Arc; -use common_arrow::arrow::datatypes::Schema as ArrowSchema; -use common_arrow::parquet::metadata::SchemaDescriptor; -use common_expression::TableSchema; -use common_meta_app::principal::StageInfo; -use common_meta_app::schema::TableInfo; -use common_storage::StageFileInfo; -use common_storage::StageFilesInfo; +use databend_common_arrow::arrow::datatypes::Schema as ArrowSchema; +use databend_common_arrow::parquet::metadata::SchemaDescriptor; +use databend_common_expression::TableSchema; +use databend_common_meta_app::principal::StageInfo; +use databend_common_meta_app::schema::TableInfo; +use databend_common_storage::StageFileInfo; +use databend_common_storage::StageFilesInfo; use crate::plan::datasource::datasource_info::parquet_read_options::ParquetReadOptions; use crate::table::Parquet2TableColumnStatisticsProvider; diff --git a/src/query/catalog/src/plan/datasource/datasource_info/result_scan.rs b/src/query/catalog/src/plan/datasource/datasource_info/result_scan.rs index 2d1c80342cd4..9d0ada28ac2d 100644 --- a/src/query/catalog/src/plan/datasource/datasource_info/result_scan.rs +++ b/src/query/catalog/src/plan/datasource/datasource_info/result_scan.rs @@ -12,24 +12,24 @@ // See the License for the specific language governing permissions and // limitations under the License. -use std::sync::Arc; - -use common_expression::TableSchema; -use common_meta_app::schema::TableInfo; - -#[derive(serde::Serialize, serde::Deserialize, Clone, PartialEq, Eq, Debug)] -pub struct ResultScanTableInfo { - pub table_info: TableInfo, - pub query_id: String, - pub block_raw_data: Vec, -} - -impl ResultScanTableInfo { - pub fn schema(&self) -> Arc { - self.table_info.schema() - } - - pub fn desc(&self) -> String { - "RESULT_SCAN table function".to_string() - } -} +use std::sync::Arc; + +use databend_common_expression::TableSchema; +use databend_common_meta_app::schema::TableInfo; + +#[derive(serde::Serialize, serde::Deserialize, Clone, PartialEq, Eq, Debug)] +pub struct ResultScanTableInfo { + pub table_info: TableInfo, + pub query_id: String, + pub block_raw_data: Vec, +} + +impl ResultScanTableInfo { + pub fn schema(&self) -> Arc { + self.table_info.schema() + } + + pub fn desc(&self) -> String { + "RESULT_SCAN table function".to_string() + } +} diff --git a/src/query/catalog/src/plan/datasource/datasource_info/stage.rs b/src/query/catalog/src/plan/datasource/datasource_info/stage.rs index a069185b964b..b8ad1c6922b0 100644 --- a/src/query/catalog/src/plan/datasource/datasource_info/stage.rs +++ b/src/query/catalog/src/plan/datasource/datasource_info/stage.rs @@ -16,14 +16,14 @@ use std::fmt::Debug; use std::fmt::Formatter; use std::sync::Arc; -use common_exception::Result; -use common_expression::Scalar; -use common_expression::TableSchema; -use common_expression::TableSchemaRef; -use common_meta_app::principal::StageInfo; -use common_storage::init_stage_operator; -use common_storage::StageFileInfo; -use common_storage::StageFilesInfo; +use databend_common_exception::Result; +use databend_common_expression::Scalar; +use databend_common_expression::TableSchema; +use databend_common_expression::TableSchemaRef; +use databend_common_meta_app::principal::StageInfo; +use databend_common_storage::init_stage_operator; +use databend_common_storage::StageFileInfo; +use databend_common_storage::StageFilesInfo; #[derive(serde::Serialize, serde::Deserialize, Clone, PartialEq, Eq)] pub struct StageTableInfo { diff --git a/src/query/catalog/src/plan/datasource/datasource_plan.rs b/src/query/catalog/src/plan/datasource/datasource_plan.rs index d118d7111092..99d0c2702353 100644 --- a/src/query/catalog/src/plan/datasource/datasource_plan.rs +++ b/src/query/catalog/src/plan/datasource/datasource_plan.rs @@ -14,11 +14,11 @@ use std::collections::BTreeMap; -use common_expression::FieldIndex; -use common_expression::RemoteExpr; -use common_expression::Scalar; -use common_expression::TableSchemaRef; -use common_meta_app::schema::CatalogInfo; +use databend_common_expression::FieldIndex; +use databend_common_expression::RemoteExpr; +use databend_common_expression::Scalar; +use databend_common_expression::TableSchemaRef; +use databend_common_meta_app::schema::CatalogInfo; use crate::plan::datasource::datasource_info::DataSourceInfo; use crate::plan::PartStatistics; diff --git a/src/query/catalog/src/plan/internal_column.rs b/src/query/catalog/src/plan/internal_column.rs index d14ecdadc6c4..bdb529a8de0e 100644 --- a/src/query/catalog/src/plan/internal_column.rs +++ b/src/query/catalog/src/plan/internal_column.rs @@ -14,34 +14,34 @@ use std::path::Path; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::types::string::StringColumnBuilder; -use common_expression::types::DataType; -use common_expression::types::DecimalDataType; -use common_expression::types::DecimalSize; -use common_expression::types::NumberDataType; -use common_expression::types::StringType; -use common_expression::types::UInt64Type; -use common_expression::BlockEntry; -use common_expression::BlockMetaInfo; -use common_expression::BlockMetaInfoDowncast; -use common_expression::BlockMetaInfoPtr; -use common_expression::ColumnId; -use common_expression::FromData; -use common_expression::Scalar; -use common_expression::TableDataType; -use common_expression::Value; -use common_expression::BASE_BLOCK_IDS_COLUMN_ID; -use common_expression::BASE_ROW_ID_COLUMN_ID; -use common_expression::BLOCK_NAME_COLUMN_ID; -use common_expression::CHANGE_ACTION_COLUMN_ID; -use common_expression::CHANGE_IS_UPDATE_COLUMN_ID; -use common_expression::CHANGE_ROW_ID_COLUMN_ID; -use common_expression::ROW_ID_COLUMN_ID; -use common_expression::SEGMENT_NAME_COLUMN_ID; -use common_expression::SNAPSHOT_NAME_COLUMN_ID; -use storages_common_table_meta::meta::NUM_BLOCK_ID_BITS; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::types::string::StringColumnBuilder; +use databend_common_expression::types::DataType; +use databend_common_expression::types::DecimalDataType; +use databend_common_expression::types::DecimalSize; +use databend_common_expression::types::NumberDataType; +use databend_common_expression::types::StringType; +use databend_common_expression::types::UInt64Type; +use databend_common_expression::BlockEntry; +use databend_common_expression::BlockMetaInfo; +use databend_common_expression::BlockMetaInfoDowncast; +use databend_common_expression::BlockMetaInfoPtr; +use databend_common_expression::ColumnId; +use databend_common_expression::FromData; +use databend_common_expression::Scalar; +use databend_common_expression::TableDataType; +use databend_common_expression::Value; +use databend_common_expression::BASE_BLOCK_IDS_COLUMN_ID; +use databend_common_expression::BASE_ROW_ID_COLUMN_ID; +use databend_common_expression::BLOCK_NAME_COLUMN_ID; +use databend_common_expression::CHANGE_ACTION_COLUMN_ID; +use databend_common_expression::CHANGE_IS_UPDATE_COLUMN_ID; +use databend_common_expression::CHANGE_ROW_ID_COLUMN_ID; +use databend_common_expression::ROW_ID_COLUMN_ID; +use databend_common_expression::SEGMENT_NAME_COLUMN_ID; +use databend_common_expression::SNAPSHOT_NAME_COLUMN_ID; +use databend_storages_common_table_meta::meta::NUM_BLOCK_ID_BITS; // Segment and Block id Bits when generate internal column `_row_id` // Assumes that the max block count of a segment is 2 ^ NUM_BLOCK_ID_BITS diff --git a/src/query/catalog/src/plan/partition.rs b/src/query/catalog/src/plan/partition.rs index 766294dc650b..ff70184e52f1 100644 --- a/src/query/catalog/src/plan/partition.rs +++ b/src/query/catalog/src/plan/partition.rs @@ -19,7 +19,7 @@ use std::fmt::Debug; use std::fmt::Formatter; use std::sync::Arc; -use common_exception::Result; +use databend_common_exception::Result; use parking_lot::RwLock; use rand::prelude::SliceRandom; use rand::thread_rng; diff --git a/src/query/catalog/src/plan/projection.rs b/src/query/catalog/src/plan/projection.rs index 090ea194b2a7..280b599bcb79 100644 --- a/src/query/catalog/src/plan/projection.rs +++ b/src/query/catalog/src/plan/projection.rs @@ -15,13 +15,13 @@ use std::collections::BTreeMap; use std::fmt::Formatter; -use common_exception::Result; -use common_expression::FieldIndex; -use common_expression::TableSchema; -use common_storage::parquet_rs::build_parquet_schema_tree; -use common_storage::parquet_rs::traverse_parquet_schema_tree; -use common_storage::ColumnNode; -use common_storage::ColumnNodes; +use databend_common_exception::Result; +use databend_common_expression::FieldIndex; +use databend_common_expression::TableSchema; +use databend_common_storage::parquet_rs::build_parquet_schema_tree; +use databend_common_storage::parquet_rs::traverse_parquet_schema_tree; +use databend_common_storage::ColumnNode; +use databend_common_storage::ColumnNodes; use parquet_rs::arrow::ProjectionMask; use parquet_rs::schema::types::SchemaDescriptor; diff --git a/src/query/catalog/src/plan/pushdown.rs b/src/query/catalog/src/plan/pushdown.rs index 5b4b40065ae1..db7bb587622b 100644 --- a/src/query/catalog/src/plan/pushdown.rs +++ b/src/query/catalog/src/plan/pushdown.rs @@ -14,12 +14,12 @@ use std::fmt::Debug; -use common_expression::types::DataType; -use common_expression::RemoteExpr; -use common_expression::Scalar; -use common_expression::TableDataType; -use common_expression::TableField; -use common_expression::TableSchema; +use databend_common_expression::types::DataType; +use databend_common_expression::RemoteExpr; +use databend_common_expression::Scalar; +use databend_common_expression::TableDataType; +use databend_common_expression::TableField; +use databend_common_expression::TableSchema; use super::AggIndexInfo; use crate::plan::Projection; diff --git a/src/query/catalog/src/plan/stream_column.rs b/src/query/catalog/src/plan/stream_column.rs index a946f42ae594..63be80456e1b 100644 --- a/src/query/catalog/src/plan/stream_column.rs +++ b/src/query/catalog/src/plan/stream_column.rs @@ -16,32 +16,32 @@ use std::any::Any; use std::path::Path; use std::sync::Arc; -use common_arrow::arrow::bitmap::Bitmap; -use common_base::base::uuid::Uuid; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::types::decimal::DecimalScalar; -use common_expression::types::nullable::NullableColumn; -use common_expression::types::AnyType; -use common_expression::types::DataType; -use common_expression::types::DecimalDataType; -use common_expression::types::DecimalSize; -use common_expression::types::NumberDataType; -use common_expression::types::UInt64Type; -use common_expression::BlockEntry; -use common_expression::BlockMetaInfo; -use common_expression::BlockMetaInfoDowncast; -use common_expression::BlockMetaInfoPtr; -use common_expression::Column; -use common_expression::ColumnId; -use common_expression::FromData; -use common_expression::Scalar; -use common_expression::TableDataType; -use common_expression::TableField; -use common_expression::Value; -use common_expression::ORIGIN_BLOCK_ID_COLUMN_ID; -use common_expression::ORIGIN_BLOCK_ROW_NUM_COLUMN_ID; -use common_expression::ORIGIN_VERSION_COLUMN_ID; +use databend_common_arrow::arrow::bitmap::Bitmap; +use databend_common_base::base::uuid::Uuid; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::types::decimal::DecimalScalar; +use databend_common_expression::types::nullable::NullableColumn; +use databend_common_expression::types::AnyType; +use databend_common_expression::types::DataType; +use databend_common_expression::types::DecimalDataType; +use databend_common_expression::types::DecimalSize; +use databend_common_expression::types::NumberDataType; +use databend_common_expression::types::UInt64Type; +use databend_common_expression::BlockEntry; +use databend_common_expression::BlockMetaInfo; +use databend_common_expression::BlockMetaInfoDowncast; +use databend_common_expression::BlockMetaInfoPtr; +use databend_common_expression::Column; +use databend_common_expression::ColumnId; +use databend_common_expression::FromData; +use databend_common_expression::Scalar; +use databend_common_expression::TableDataType; +use databend_common_expression::TableField; +use databend_common_expression::Value; +use databend_common_expression::ORIGIN_BLOCK_ID_COLUMN_ID; +use databend_common_expression::ORIGIN_BLOCK_ROW_NUM_COLUMN_ID; +use databend_common_expression::ORIGIN_VERSION_COLUMN_ID; use crate::plan::PartInfo; use crate::plan::PartInfoPtr; diff --git a/src/query/catalog/src/statistics/basic_statistics.rs b/src/query/catalog/src/statistics/basic_statistics.rs index be43d17498b3..50d476b0e0d3 100644 --- a/src/query/catalog/src/statistics/basic_statistics.rs +++ b/src/query/catalog/src/statistics/basic_statistics.rs @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_storage::Datum; -use storages_common_table_meta::meta::ColumnStatistics; +use databend_common_storage::Datum; +use databend_storages_common_table_meta::meta::ColumnStatistics; // #[derive(Debug, Clone)] #[derive(serde::Serialize, serde::Deserialize, Clone, Debug, Default)] diff --git a/src/query/catalog/src/table.rs b/src/query/catalog/src/table.rs index f33cfaa289ec..865c78e4c5a0 100644 --- a/src/query/catalog/src/table.rs +++ b/src/query/catalog/src/table.rs @@ -18,25 +18,25 @@ use std::sync::Arc; use chrono::DateTime; use chrono::Utc; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::BlockThresholds; -use common_expression::ColumnId; -use common_expression::RemoteExpr; -use common_expression::Scalar; -use common_expression::TableSchema; -use common_io::constants::DEFAULT_BLOCK_BUFFER_SIZE; -use common_io::constants::DEFAULT_BLOCK_MAX_ROWS; -use common_io::constants::DEFAULT_BLOCK_MIN_ROWS; -use common_meta_app::schema::DatabaseType; -use common_meta_app::schema::TableInfo; -use common_meta_app::schema::UpdateStreamMetaReq; -use common_meta_app::schema::UpsertTableCopiedFileReq; -use common_meta_types::MetaId; -use common_pipeline_core::Pipeline; -use common_storage::StorageMetrics; -use storages_common_table_meta::meta::SnapshotId; -use storages_common_table_meta::meta::TableSnapshot; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::BlockThresholds; +use databend_common_expression::ColumnId; +use databend_common_expression::RemoteExpr; +use databend_common_expression::Scalar; +use databend_common_expression::TableSchema; +use databend_common_io::constants::DEFAULT_BLOCK_BUFFER_SIZE; +use databend_common_io::constants::DEFAULT_BLOCK_MAX_ROWS; +use databend_common_io::constants::DEFAULT_BLOCK_MIN_ROWS; +use databend_common_meta_app::schema::DatabaseType; +use databend_common_meta_app::schema::TableInfo; +use databend_common_meta_app::schema::UpdateStreamMetaReq; +use databend_common_meta_app::schema::UpsertTableCopiedFileReq; +use databend_common_meta_types::MetaId; +use databend_common_pipeline_core::Pipeline; +use databend_common_storage::StorageMetrics; +use databend_storages_common_table_meta::meta::SnapshotId; +use databend_storages_common_table_meta::meta::TableSnapshot; use crate::lock::Lock; use crate::plan::DataSourceInfo; diff --git a/src/query/catalog/src/table_args.rs b/src/query/catalog/src/table_args.rs index 65e72d1cd3a1..88df0aa871c6 100644 --- a/src/query/catalog/src/table_args.rs +++ b/src/query/catalog/src/table_args.rs @@ -14,9 +14,9 @@ use std::collections::HashMap; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::Scalar; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::Scalar; #[derive(serde::Serialize, serde::Deserialize, Clone, Debug, PartialEq)] pub struct TableArgs { diff --git a/src/query/catalog/src/table_context.rs b/src/query/catalog/src/table_context.rs index e73662b62d95..85d1be88a2fa 100644 --- a/src/query/catalog/src/table_context.rs +++ b/src/query/catalog/src/table_context.rs @@ -21,33 +21,33 @@ use std::net::SocketAddr; use std::sync::Arc; use std::time::SystemTime; -use common_base::base::Progress; -use common_base::base::ProgressValues; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::DataBlock; -use common_expression::Expr; -use common_expression::FunctionContext; -use common_io::prelude::FormatSettings; -use common_meta_app::principal::FileFormatParams; -use common_meta_app::principal::OnErrorMode; -use common_meta_app::principal::RoleInfo; -use common_meta_app::principal::UserDefinedConnection; -use common_meta_app::principal::UserInfo; -use common_pipeline_core::processors::profile::PlanProfile; -use common_pipeline_core::processors::profile::Profile; -use common_pipeline_core::InputError; -use common_settings::Settings; -use common_storage::CopyStatus; -use common_storage::DataOperator; -use common_storage::FileStatus; -use common_storage::MergeStatus; -use common_storage::StageFileInfo; -use common_storage::StorageMetrics; -use common_users::GrantObjectVisibilityChecker; use dashmap::DashMap; +use databend_common_base::base::Progress; +use databend_common_base::base::ProgressValues; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::DataBlock; +use databend_common_expression::Expr; +use databend_common_expression::FunctionContext; +use databend_common_io::prelude::FormatSettings; +use databend_common_meta_app::principal::FileFormatParams; +use databend_common_meta_app::principal::OnErrorMode; +use databend_common_meta_app::principal::RoleInfo; +use databend_common_meta_app::principal::UserDefinedConnection; +use databend_common_meta_app::principal::UserInfo; +use databend_common_pipeline_core::processors::profile::PlanProfile; +use databend_common_pipeline_core::processors::profile::Profile; +use databend_common_pipeline_core::InputError; +use databend_common_settings::Settings; +use databend_common_storage::CopyStatus; +use databend_common_storage::DataOperator; +use databend_common_storage::FileStatus; +use databend_common_storage::MergeStatus; +use databend_common_storage::StageFileInfo; +use databend_common_storage::StorageMetrics; +use databend_common_users::GrantObjectVisibilityChecker; +use databend_storages_common_table_meta::meta::Location; use parking_lot::RwLock; -use storages_common_table_meta::meta::Location; use crate::catalog::Catalog; use crate::cluster_info::Cluster; diff --git a/src/query/catalog/tests/it/partitions.rs b/src/query/catalog/tests/it/partitions.rs index d0556a3fbd1d..3b886b5f6eb2 100644 --- a/src/query/catalog/tests/it/partitions.rs +++ b/src/query/catalog/tests/it/partitions.rs @@ -20,14 +20,14 @@ use std::hash::Hasher; use std::io::Write; use std::sync::Arc; -use common_catalog::plan::compute_row_id_prefix; -use common_catalog::plan::split_prefix; -use common_catalog::plan::PartInfo; -use common_catalog::plan::PartInfoPtr; -use common_catalog::plan::Partitions; -use common_catalog::plan::PartitionsShuffleKind; +use databend_common_catalog::plan::compute_row_id_prefix; +use databend_common_catalog::plan::split_prefix; +use databend_common_catalog::plan::PartInfo; +use databend_common_catalog::plan::PartInfoPtr; +use databend_common_catalog::plan::Partitions; +use databend_common_catalog::plan::PartitionsShuffleKind; +use databend_storages_common_table_meta::meta::NUM_BLOCK_ID_BITS; use goldenfile::Mint; -use storages_common_table_meta::meta::NUM_BLOCK_ID_BITS; #[derive(serde::Serialize, serde::Deserialize, PartialEq, Eq)] struct TestPartInfo { diff --git a/src/query/catalog/tests/it/projection.rs b/src/query/catalog/tests/it/projection.rs index b3a43d535256..58f60fa2661c 100644 --- a/src/query/catalog/tests/it/projection.rs +++ b/src/query/catalog/tests/it/projection.rs @@ -14,12 +14,12 @@ use std::collections::BTreeMap; -use common_catalog::plan::Projection; -use common_exception::Result; -use common_expression::types::NumberDataType; -use common_expression::TableDataType; -use common_expression::TableField; -use common_expression::TableSchema; +use databend_common_catalog::plan::Projection; +use databend_common_exception::Result; +use databend_common_expression::types::NumberDataType; +use databend_common_expression::TableDataType; +use databend_common_expression::TableField; +use databend_common_expression::TableSchema; use parquet_rs::arrow::arrow_to_parquet_schema; #[test] diff --git a/src/query/codegen/Cargo.toml b/src/query/codegen/Cargo.toml index 46b016e7c5cd..96dc61e72a92 100644 --- a/src/query/codegen/Cargo.toml +++ b/src/query/codegen/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "codegen" +name = "databend-codegen" version = { workspace = true } authors = { workspace = true } license = { workspace = true } @@ -15,6 +15,6 @@ name = "codegen" path = "src/bin/codegen.rs" [dependencies] -common-expression = { path = "../expression" } +databend-common-expression = { path = "../expression" } itertools = { workspace = true } diff --git a/src/query/codegen/src/bin/codegen.rs b/src/query/codegen/src/bin/codegen.rs index 5a7505b71951..202caa5b97bd 100644 --- a/src/query/codegen/src/bin/codegen.rs +++ b/src/query/codegen/src/bin/codegen.rs @@ -13,6 +13,6 @@ // limitations under the License. fn main() { - codegen::writes::codegen_arithmetic_type(); - codegen::writes::codegen_register(); + databend_codegen::writes::codegen_arithmetic_type(); + databend_codegen::writes::codegen_register(); } diff --git a/src/query/codegen/src/writes/arithmetics_type.rs b/src/query/codegen/src/writes/arithmetics_type.rs index 019534ebbd60..3b1bb6d5b131 100644 --- a/src/query/codegen/src/writes/arithmetics_type.rs +++ b/src/query/codegen/src/writes/arithmetics_type.rs @@ -16,7 +16,7 @@ use std::fs::File; use std::io::Write; use std::path::Path; -use common_expression::types::NumberDataType; +use databend_common_expression::types::NumberDataType; pub enum OP { Plus, diff --git a/src/query/codegen/src/writes/register.rs b/src/query/codegen/src/writes/register.rs index 90258c718fd8..9a78c07e9146 100644 --- a/src/query/codegen/src/writes/register.rs +++ b/src/query/codegen/src/writes/register.rs @@ -733,7 +733,7 @@ pub fn codegen_register() { let validity = ctx.validity.as_ref().map(|valid| valid & (&and_validity)).unwrap_or(and_validity); ctx.validity = Some(validity.clone()); let nullable_column = func({func_arg} ctx).into_column().unwrap(); - let combine_validity = common_arrow::arrow::bitmap::and(&validity, &nullable_column.validity); + let combine_validity = databend_common_arrow::arrow::bitmap::and(&validity, &nullable_column.validity); Value::Column(NullableColumn {{ column: nullable_column.column, validity: combine_validity }}) }}" ) diff --git a/src/query/config/Cargo.toml b/src/query/config/Cargo.toml index 627896b643a0..88694103de45 100644 --- a/src/query/config/Cargo.toml +++ b/src/query/config/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "common-config" +name = "databend-common-config" version = "0.1.0" edition = "2021" @@ -10,20 +10,20 @@ test = true [features] default = [] -storage-hdfs = ["common-storage/storage-hdfs"] +storage-hdfs = ["databend-common-storage/storage-hdfs"] [package.metadata.cargo-machete] ignored = ["strum"] [dependencies] chrono-tz = { workspace = true } -common-base = { path = "../../common/base" } -common-exception = { path = "../../common/exception" } -common-grpc = { path = "../../common/grpc" } -common-meta-app = { path = "../../meta/app" } -common-storage = { path = "../../common/storage" } -common-tracing = { path = "../../common/tracing" } -common-users = { path = "../users" } +databend-common-base = { path = "../../common/base" } +databend-common-exception = { path = "../../common/exception" } +databend-common-grpc = { path = "../../common/grpc" } +databend-common-meta-app = { path = "../../meta/app" } +databend-common-storage = { path = "../../common/storage" } +databend-common-tracing = { path = "../../common/tracing" } +databend-common-users = { path = "../users" } clap = { workspace = true } hex = "0.4.3" @@ -37,4 +37,4 @@ strum = "0.24.1" pretty_assertions = "1.3.0" [build-dependencies] -common-building = { path = "../../common/building" } +databend-common-building = { path = "../../common/building" } diff --git a/src/query/config/build.rs b/src/query/config/build.rs index f15f5ed5e215..a69a90fdcb0f 100644 --- a/src/query/config/build.rs +++ b/src/query/config/build.rs @@ -13,5 +13,5 @@ // limitations under the License. fn main() { - common_building::setup(); + databend_common_building::setup(); } diff --git a/src/query/config/src/background_config.rs b/src/query/config/src/background_config.rs index aa49e5cc3bfa..f6ae6f3fb067 100644 --- a/src/query/config/src/background_config.rs +++ b/src/query/config/src/background_config.rs @@ -17,10 +17,10 @@ use std::fmt::Formatter; use std::str::FromStr; use clap::Args; -use common_exception::ErrorCode; -use common_exception::Result; -use common_meta_app::background::BackgroundJobParams; -use common_meta_app::background::BackgroundJobType; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_meta_app::background::BackgroundJobParams; +use databend_common_meta_app::background::BackgroundJobType; use serde::Deserialize; use serde::Serialize; diff --git a/src/query/config/src/config.rs b/src/query/config/src/config.rs index 282f56689c5a..014e72330624 100644 --- a/src/query/config/src/config.rs +++ b/src/query/config/src/config.rs @@ -25,32 +25,32 @@ use clap::Args; use clap::Parser; use clap::Subcommand; use clap::ValueEnum; -use common_base::base::mask_string; -use common_exception::ErrorCode; -use common_exception::Result; -use common_meta_app::principal::AuthInfo; -use common_meta_app::principal::AuthType; -use common_meta_app::storage::StorageAzblobConfig as InnerStorageAzblobConfig; -use common_meta_app::storage::StorageCosConfig as InnerStorageCosConfig; -use common_meta_app::storage::StorageFsConfig as InnerStorageFsConfig; -use common_meta_app::storage::StorageGcsConfig as InnerStorageGcsConfig; -use common_meta_app::storage::StorageHdfsConfig as InnerStorageHdfsConfig; -use common_meta_app::storage::StorageMokaConfig as InnerStorageMokaConfig; -use common_meta_app::storage::StorageObsConfig as InnerStorageObsConfig; -use common_meta_app::storage::StorageOssConfig as InnerStorageOssConfig; -use common_meta_app::storage::StorageParams; -use common_meta_app::storage::StorageS3Config as InnerStorageS3Config; -use common_meta_app::storage::StorageWebhdfsConfig as InnerStorageWebhdfsConfig; -use common_meta_app::tenant::TenantQuota; -use common_storage::StorageConfig as InnerStorageConfig; -use common_tracing::Config as InnerLogConfig; -use common_tracing::FileConfig as InnerFileLogConfig; -use common_tracing::OTLPConfig as InnerOTLPLogConfig; -use common_tracing::ProfileLogConfig as InnerProfileLogConfig; -use common_tracing::QueryLogConfig as InnerQueryLogConfig; -use common_tracing::StderrConfig as InnerStderrLogConfig; -use common_tracing::TracingConfig as InnerTracingConfig; -use common_users::idm_config::IDMConfig as InnerIDMConfig; +use databend_common_base::base::mask_string; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_meta_app::principal::AuthInfo; +use databend_common_meta_app::principal::AuthType; +use databend_common_meta_app::storage::StorageAzblobConfig as InnerStorageAzblobConfig; +use databend_common_meta_app::storage::StorageCosConfig as InnerStorageCosConfig; +use databend_common_meta_app::storage::StorageFsConfig as InnerStorageFsConfig; +use databend_common_meta_app::storage::StorageGcsConfig as InnerStorageGcsConfig; +use databend_common_meta_app::storage::StorageHdfsConfig as InnerStorageHdfsConfig; +use databend_common_meta_app::storage::StorageMokaConfig as InnerStorageMokaConfig; +use databend_common_meta_app::storage::StorageObsConfig as InnerStorageObsConfig; +use databend_common_meta_app::storage::StorageOssConfig as InnerStorageOssConfig; +use databend_common_meta_app::storage::StorageParams; +use databend_common_meta_app::storage::StorageS3Config as InnerStorageS3Config; +use databend_common_meta_app::storage::StorageWebhdfsConfig as InnerStorageWebhdfsConfig; +use databend_common_meta_app::tenant::TenantQuota; +use databend_common_storage::StorageConfig as InnerStorageConfig; +use databend_common_tracing::Config as InnerLogConfig; +use databend_common_tracing::FileConfig as InnerFileLogConfig; +use databend_common_tracing::OTLPConfig as InnerOTLPLogConfig; +use databend_common_tracing::ProfileLogConfig as InnerProfileLogConfig; +use databend_common_tracing::QueryLogConfig as InnerQueryLogConfig; +use databend_common_tracing::StderrConfig as InnerStderrLogConfig; +use databend_common_tracing::TracingConfig as InnerTracingConfig; +use databend_common_users::idm_config::IDMConfig as InnerIDMConfig; use serde::Deserialize; use serde::Serialize; use serfig::collectors::from_env; diff --git a/src/query/config/src/global.rs b/src/query/config/src/global.rs index 51cb6e216eeb..adf556a2d668 100644 --- a/src/query/config/src/global.rs +++ b/src/query/config/src/global.rs @@ -14,8 +14,8 @@ use std::sync::Arc; -use common_base::base::GlobalInstance; -use common_exception::Result; +use databend_common_base::base::GlobalInstance; +use databend_common_exception::Result; use crate::InnerConfig; diff --git a/src/query/config/src/inner.rs b/src/query/config/src/inner.rs index 862991d17429..cfcb519d11c4 100644 --- a/src/query/config/src/inner.rs +++ b/src/query/config/src/inner.rs @@ -20,16 +20,16 @@ use std::fmt::Formatter; use std::str::FromStr; use std::time::Duration; -use common_base::base::mask_string; -use common_base::base::GlobalUniqName; -use common_exception::ErrorCode; -use common_exception::Result; -use common_grpc::RpcClientConf; -use common_grpc::RpcClientTlsConfig; -use common_meta_app::tenant::TenantQuota; -use common_storage::StorageConfig; -use common_tracing::Config as LogConfig; -use common_users::idm_config::IDMConfig; +use databend_common_base::base::mask_string; +use databend_common_base::base::GlobalUniqName; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_grpc::RpcClientConf; +use databend_common_grpc::RpcClientTlsConfig; +use databend_common_meta_app::tenant::TenantQuota; +use databend_common_storage::StorageConfig; +use databend_common_tracing::Config as LogConfig; +use databend_common_users::idm_config::IDMConfig; use super::config::Commands; use super::config::Config; diff --git a/src/query/config/src/obsolete.rs b/src/query/config/src/obsolete.rs index 202b1c2dbe86..a65747e00438 100644 --- a/src/query/config/src/obsolete.rs +++ b/src/query/config/src/obsolete.rs @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_exception::ErrorCode; -use common_exception::Result; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; use crate::Config; @@ -50,7 +50,7 @@ impl Config { data_cache_storage = "disk" ... [cache.disk] - max_bytes = [MAX_BYTES] + max_bytes = [MAX_BYTES] ... "#, "CACHE_DISK_MAX_BYTES", @@ -89,7 +89,7 @@ impl Config { data_cache_storage = "disk" ... [cache.disk] - max_bytes = [MAX_BYTES] + max_bytes = [MAX_BYTES] path = [PATH] ... "#, @@ -184,7 +184,7 @@ impl Config { format!( " -------------------------------------------------------------- - *** {cli_arg_name} *** is obsoleted : + *** {cli_arg_name} *** is obsoleted : -------------------------------------------------------------- alternative command-line options : {alternative_cli_arg} alternative environment variable : {alternative_env_var} diff --git a/src/query/config/tests/main.rs b/src/query/config/tests/main.rs index 7769d6b02edc..745cdf284d7c 100644 --- a/src/query/config/tests/main.rs +++ b/src/query/config/tests/main.rs @@ -15,8 +15,8 @@ use std::ffi::OsString; use clap::Parser; -use common_config::Config; -use common_config::InnerConfig; +use databend_common_config::Config; +use databend_common_config::InnerConfig; use pretty_assertions::assert_eq; /// It's required to make sure setting's default value is the same with clap. diff --git a/src/query/constraint/Cargo.toml b/src/query/constraint/Cargo.toml index da626429bd64..2718507d10f4 100644 --- a/src/query/constraint/Cargo.toml +++ b/src/query/constraint/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "common-constraint" +name = "databend-common-constraint" version = { workspace = true } authors = { workspace = true } license = { workspace = true } @@ -16,8 +16,8 @@ test = false z3 = { version = "0.12.1", features = ["static-link-z3"] } [dev-dependencies] -common-ast = { path = "../ast" } criterion = "0.4" +databend-common-ast = { path = "../ast" } goldenfile = "1.4" [[bench]] diff --git a/src/query/constraint/benches/bench.rs b/src/query/constraint/benches/bench.rs index 1280e1b784d0..1a3f597bf45f 100644 --- a/src/query/constraint/benches/bench.rs +++ b/src/query/constraint/benches/bench.rs @@ -15,14 +15,14 @@ #[macro_use] extern crate criterion; -use common_constraint::mir::MirBinaryOperator; -use common_constraint::mir::MirConstant; -use common_constraint::mir::MirDataType; -use common_constraint::mir::MirExpr; -use common_constraint::problem::variable_must_not_null; -use common_constraint::simplify::simplify; use criterion::black_box; use criterion::Criterion; +use databend_common_constraint::mir::MirBinaryOperator; +use databend_common_constraint::mir::MirConstant; +use databend_common_constraint::mir::MirDataType; +use databend_common_constraint::mir::MirExpr; +use databend_common_constraint::problem::variable_must_not_null; +use databend_common_constraint::simplify::simplify; fn bench(c: &mut Criterion) { let mut group = c.benchmark_group("bench_solver"); diff --git a/src/query/constraint/src/problem.rs b/src/query/constraint/src/problem.rs index c90f1511194e..db9e93a6b673 100644 --- a/src/query/constraint/src/problem.rs +++ b/src/query/constraint/src/problem.rs @@ -33,8 +33,8 @@ use crate::mir::MirUnaryOperator; /// ∀x. assertion(x) -> x is not null /// /// ``` -/// use common_constraint::mir::*; -/// use common_constraint::problem::variable_must_not_null; +/// use databend_common_constraint::mir::*; +/// use databend_common_constraint::problem::variable_must_not_null; /// /// // a > 0 /// let assertion = MirExpr::BinaryOperator { diff --git a/src/query/constraint/tests/it/declare.rs b/src/query/constraint/tests/it/declare.rs index 8c2076d07645..ad56028f5d3f 100644 --- a/src/query/constraint/tests/it/declare.rs +++ b/src/query/constraint/tests/it/declare.rs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_constraint::declare::*; +use databend_common_constraint::declare::*; use z3::Config; use z3::Context; use z3::SatResult; diff --git a/src/query/constraint/tests/it/parser.rs b/src/query/constraint/tests/it/parser.rs index 34825f81b41a..d9717aec9443 100644 --- a/src/query/constraint/tests/it/parser.rs +++ b/src/query/constraint/tests/it/parser.rs @@ -14,20 +14,20 @@ use std::collections::HashMap; -use common_ast::ast::BinaryOperator as ASTBinaryOperator; -use common_ast::ast::ColumnID; -use common_ast::ast::Expr as ASTExpr; -use common_ast::ast::Identifier; -use common_ast::ast::Literal; -use common_ast::ast::UnaryOperator as ASTUnaryOperator; -use common_ast::parser::parse_expr; -use common_ast::parser::tokenize_sql; -use common_ast::Dialect; -use common_constraint::mir::MirBinaryOperator; -use common_constraint::mir::MirConstant; -use common_constraint::mir::MirDataType; -use common_constraint::mir::MirExpr; -use common_constraint::mir::MirUnaryOperator; +use databend_common_ast::ast::BinaryOperator as ASTBinaryOperator; +use databend_common_ast::ast::ColumnID; +use databend_common_ast::ast::Expr as ASTExpr; +use databend_common_ast::ast::Identifier; +use databend_common_ast::ast::Literal; +use databend_common_ast::ast::UnaryOperator as ASTUnaryOperator; +use databend_common_ast::parser::parse_expr; +use databend_common_ast::parser::tokenize_sql; +use databend_common_ast::Dialect; +use databend_common_constraint::mir::MirBinaryOperator; +use databend_common_constraint::mir::MirConstant; +use databend_common_constraint::mir::MirDataType; +use databend_common_constraint::mir::MirExpr; +use databend_common_constraint::mir::MirUnaryOperator; pub fn parse_mir_expr(text: &str, variables: &HashMap) -> MirExpr { let tokens = tokenize_sql(text).unwrap(); diff --git a/src/query/constraint/tests/it/problem.rs b/src/query/constraint/tests/it/problem.rs index e3e83bc61a89..959b0964921e 100644 --- a/src/query/constraint/tests/it/problem.rs +++ b/src/query/constraint/tests/it/problem.rs @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_constraint::mir::MirDataType; -use common_constraint::problem::variable_must_not_null; +use databend_common_constraint::mir::MirDataType; +use databend_common_constraint::problem::variable_must_not_null; use crate::parser::parse_mir_expr; diff --git a/src/query/constraint/tests/it/simplify.rs b/src/query/constraint/tests/it/simplify.rs index 23302e3b51d1..e31e5b0ce41c 100644 --- a/src/query/constraint/tests/it/simplify.rs +++ b/src/query/constraint/tests/it/simplify.rs @@ -15,10 +15,10 @@ use std::collections::HashMap; use std::io::Write; -use common_constraint::mir::MirDataType; -use common_constraint::mir::MirExpr; -use common_constraint::simplify::mir_to_z3_assertion; -use common_constraint::simplify::simplify_z3_ast; +use databend_common_constraint::mir::MirDataType; +use databend_common_constraint::mir::MirExpr; +use databend_common_constraint::simplify::mir_to_z3_assertion; +use databend_common_constraint::simplify::simplify_z3_ast; use goldenfile::Mint; use z3::Config; use z3::Context; diff --git a/src/query/datavalues/Cargo.toml b/src/query/datavalues/Cargo.toml index de2aeb5472ec..b7d43f12441f 100644 --- a/src/query/datavalues/Cargo.toml +++ b/src/query/datavalues/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "common-datavalues" +name = "databend-common-datavalues" version = { workspace = true } authors = { workspace = true } license = { workspace = true } diff --git a/src/query/ee/Cargo.toml b/src/query/ee/Cargo.toml index 85001cde6ba2..f9afb52b5860 100644 --- a/src/query/ee/Cargo.toml +++ b/src/query/ee/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "enterprise-query" +name = "databend-enterprise-query" description = "A real-time Cloud Distributed Query Engine" version = { workspace = true } authors = { workspace = true } @@ -13,35 +13,35 @@ test = false [dependencies] # Workspace dependencies -aggregating-index = { path = "../ee_features/aggregating_index" } async-backtrace = { workspace = true } -background-service = { path = "../ee_features/background_service" } -common-base = { path = "../../common/base" } -common-catalog = { path = "../catalog" } -common-config = { path = "../config" } -common-exception = { path = "../../common/exception" } -common-expression = { path = "../expression" } -common-functions = { path = "../functions" } -common-io = { path = "../../common/io" } -common-license = { path = "../../common/license" } -common-meta-api = { path = "../../meta/api" } -common-meta-app = { path = "../../meta/app" } -common-meta-store = { path = "../../meta/store" } -common-meta-types = { path = "../../meta/types" } -common-sql = { path = "../sql" } -common-storages-fuse = { path = "../storages/fuse" } -common-storages-stream = { path = "../storages/stream" } -common-tracing = { path = "../../common/tracing" } -common-users = { path = "../users" } -data-mask-feature = { path = "../ee_features/data_mask" } +databend-common-base = { path = "../../common/base" } +databend-common-catalog = { path = "../catalog" } +databend-common-config = { path = "../config" } +databend-common-exception = { path = "../../common/exception" } +databend-common-expression = { path = "../expression" } +databend-common-functions = { path = "../functions" } +databend-common-io = { path = "../../common/io" } +databend-common-license = { path = "../../common/license" } +databend-common-meta-api = { path = "../../meta/api" } +databend-common-meta-app = { path = "../../meta/app" } +databend-common-meta-store = { path = "../../meta/store" } +databend-common-meta-types = { path = "../../meta/types" } +databend-common-sql = { path = "../sql" } +databend-common-storages-fuse = { path = "../storages/fuse" } +databend-common-storages-stream = { path = "../storages/stream" } +databend-common-tracing = { path = "../../common/tracing" } +databend-common-users = { path = "../users" } +databend-enterprise-aggregating-index = { path = "../ee_features/aggregating_index" } +databend-enterprise-background-service = { path = "../ee_features/background_service" } +databend-enterprise-data-mask-feature = { path = "../ee_features/data_mask" } +databend-enterprise-storage-encryption = { path = "../ee_features/storage_encryption" } +databend-enterprise-stream-handler = { path = "../ee_features/stream_handler" } +databend-enterprise-vacuum-handler = { path = "../ee_features/vacuum_handler" } +databend-enterprise-virtual-column = { path = "../ee_features/virtual_column" } databend-query = { path = "../service" } +databend-storages-common-cache = { path = "../storages/common/cache" } +databend-storages-common-table-meta = { path = "../storages/common/table_meta" } opendal = { workspace = true } -storage-encryption = { path = "../ee_features/storage_encryption" } -storages-common-cache = { path = "../storages/common/cache" } -storages-common-table-meta = { path = "../storages/common/table_meta" } -stream-handler = { path = "../ee_features/stream_handler" } -vacuum-handler = { path = "../ee_features/vacuum_handler" } -virtual-column = { path = "../ee_features/virtual_column" } arrow-array = { workspace = true } async-trait = { workspace = true } @@ -58,4 +58,4 @@ tempfile = "3.4.0" [dev-dependencies] [build-dependencies] -common-building = { path = "../../common/building" } +databend-common-building = { path = "../../common/building" } diff --git a/src/query/ee/build.rs b/src/query/ee/build.rs index b91102ea0c6b..c29590fb8eed 100644 --- a/src/query/ee/build.rs +++ b/src/query/ee/build.rs @@ -13,5 +13,5 @@ // limitations under the License. fn main() { - common_building::setup(); + databend_common_building::setup(); } diff --git a/src/query/ee/src/aggregating_index/aggregating_index_handler.rs b/src/query/ee/src/aggregating_index/aggregating_index_handler.rs index 6a364d9df467..734e1ab34d10 100644 --- a/src/query/ee/src/aggregating_index/aggregating_index_handler.rs +++ b/src/query/ee/src/aggregating_index/aggregating_index_handler.rs @@ -14,19 +14,19 @@ use std::sync::Arc; -use aggregating_index::AggregatingIndexHandler; -use aggregating_index::AggregatingIndexHandlerWrapper; -use common_base::base::GlobalInstance; -use common_catalog::catalog::Catalog; -use common_exception::Result; -use common_meta_app::schema::CreateIndexReply; -use common_meta_app::schema::CreateIndexReq; -use common_meta_app::schema::DropIndexReply; -use common_meta_app::schema::DropIndexReq; -use common_meta_app::schema::GetIndexReply; -use common_meta_app::schema::GetIndexReq; -use common_meta_app::schema::UpdateIndexReply; -use common_meta_app::schema::UpdateIndexReq; +use databend_common_base::base::GlobalInstance; +use databend_common_catalog::catalog::Catalog; +use databend_common_exception::Result; +use databend_common_meta_app::schema::CreateIndexReply; +use databend_common_meta_app::schema::CreateIndexReq; +use databend_common_meta_app::schema::DropIndexReply; +use databend_common_meta_app::schema::DropIndexReq; +use databend_common_meta_app::schema::GetIndexReply; +use databend_common_meta_app::schema::GetIndexReq; +use databend_common_meta_app::schema::UpdateIndexReply; +use databend_common_meta_app::schema::UpdateIndexReq; +use databend_enterprise_aggregating_index::AggregatingIndexHandler; +use databend_enterprise_aggregating_index::AggregatingIndexHandlerWrapper; pub struct RealAggregatingIndexHandler {} diff --git a/src/query/ee/src/background_service/background_service_handler.rs b/src/query/ee/src/background_service/background_service_handler.rs index ce7179aeea79..2dc4f4961ee6 100644 --- a/src/query/ee/src/background_service/background_service_handler.rs +++ b/src/query/ee/src/background_service/background_service_handler.rs @@ -15,30 +15,30 @@ use std::sync::Arc; use arrow_array::RecordBatch; -use background_service::background_service::BackgroundServiceHandlerWrapper; -use background_service::BackgroundServiceHandler; -use common_base::base::tokio::sync::mpsc::Sender; -use common_base::base::tokio::sync::Mutex; -use common_base::base::uuid::Uuid; -use common_base::base::GlobalInstance; -use common_config::InnerConfig; -use common_exception::ErrorCode; -use common_exception::Result; -use common_license::license::Feature; -use common_license::license_manager::get_license_manager; -use common_meta_api::BackgroundApi; -use common_meta_app::background::BackgroundJobIdent; -use common_meta_app::background::BackgroundJobInfo; -use common_meta_app::background::BackgroundJobParams; -use common_meta_app::background::BackgroundJobState; -use common_meta_app::background::CreateBackgroundJobReq; -use common_meta_app::background::GetBackgroundJobReq; -use common_meta_app::background::ManualTriggerParams; -use common_meta_app::background::UpdateBackgroundJobParamsReq; -use common_meta_app::background::UpdateBackgroundJobStatusReq; -use common_meta_app::principal::UserIdentity; -use common_meta_store::MetaStore; -use common_users::UserApiProvider; +use databend_common_base::base::tokio::sync::mpsc::Sender; +use databend_common_base::base::tokio::sync::Mutex; +use databend_common_base::base::uuid::Uuid; +use databend_common_base::base::GlobalInstance; +use databend_common_config::InnerConfig; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_license::license::Feature; +use databend_common_license::license_manager::get_license_manager; +use databend_common_meta_api::BackgroundApi; +use databend_common_meta_app::background::BackgroundJobIdent; +use databend_common_meta_app::background::BackgroundJobInfo; +use databend_common_meta_app::background::BackgroundJobParams; +use databend_common_meta_app::background::BackgroundJobState; +use databend_common_meta_app::background::CreateBackgroundJobReq; +use databend_common_meta_app::background::GetBackgroundJobReq; +use databend_common_meta_app::background::ManualTriggerParams; +use databend_common_meta_app::background::UpdateBackgroundJobParamsReq; +use databend_common_meta_app::background::UpdateBackgroundJobStatusReq; +use databend_common_meta_app::principal::UserIdentity; +use databend_common_meta_store::MetaStore; +use databend_common_users::UserApiProvider; +use databend_enterprise_background_service::background_service::BackgroundServiceHandlerWrapper; +use databend_enterprise_background_service::BackgroundServiceHandler; use databend_query::sessions::SessionManager; use databend_query::sessions::SessionType; use databend_query::table_functions::SuggestedBackgroundTasksSource; diff --git a/src/query/ee/src/background_service/compaction_job.rs b/src/query/ee/src/background_service/compaction_job.rs index b902769db22d..16e37f4266c0 100644 --- a/src/query/ee/src/background_service/compaction_job.rs +++ b/src/query/ee/src/background_service/compaction_job.rs @@ -21,29 +21,29 @@ use arrow_array::LargeBinaryArray; use arrow_array::RecordBatch; use arrow_array::UInt64Array; use chrono::Utc; -use common_base::base::tokio::sync::mpsc::Sender; -use common_base::base::tokio::sync::Mutex; -use common_base::base::tokio::time::Instant; -use common_base::base::uuid::Uuid; -use common_config::InnerConfig; -use common_exception::Result; -use common_meta_api::BackgroundApi; -use common_meta_app::background::BackgroundJobIdent; -use common_meta_app::background::BackgroundJobInfo; -use common_meta_app::background::BackgroundJobParams; -use common_meta_app::background::BackgroundJobStatus; -use common_meta_app::background::BackgroundJobType::ONESHOT; -use common_meta_app::background::BackgroundTaskIdent; -use common_meta_app::background::BackgroundTaskInfo; -use common_meta_app::background::BackgroundTaskState; -use common_meta_app::background::GetBackgroundJobReq; -use common_meta_app::background::ManualTriggerParams; -use common_meta_app::background::UpdateBackgroundJobParamsReq; -use common_meta_app::background::UpdateBackgroundJobStatusReq; -use common_meta_app::background::UpdateBackgroundTaskReq; -use common_meta_app::schema::TableStatistics; -use common_meta_store::MetaStore; -use common_users::UserApiProvider; +use databend_common_base::base::tokio::sync::mpsc::Sender; +use databend_common_base::base::tokio::sync::Mutex; +use databend_common_base::base::tokio::time::Instant; +use databend_common_base::base::uuid::Uuid; +use databend_common_config::InnerConfig; +use databend_common_exception::Result; +use databend_common_meta_api::BackgroundApi; +use databend_common_meta_app::background::BackgroundJobIdent; +use databend_common_meta_app::background::BackgroundJobInfo; +use databend_common_meta_app::background::BackgroundJobParams; +use databend_common_meta_app::background::BackgroundJobStatus; +use databend_common_meta_app::background::BackgroundJobType::ONESHOT; +use databend_common_meta_app::background::BackgroundTaskIdent; +use databend_common_meta_app::background::BackgroundTaskInfo; +use databend_common_meta_app::background::BackgroundTaskState; +use databend_common_meta_app::background::GetBackgroundJobReq; +use databend_common_meta_app::background::ManualTriggerParams; +use databend_common_meta_app::background::UpdateBackgroundJobParamsReq; +use databend_common_meta_app::background::UpdateBackgroundJobStatusReq; +use databend_common_meta_app::background::UpdateBackgroundTaskReq; +use databend_common_meta_app::schema::TableStatistics; +use databend_common_meta_store::MetaStore; +use databend_common_users::UserApiProvider; use databend_query::sessions::QueryContext; use databend_query::sessions::Session; use databend_query::table_functions::SuggestedBackgroundTasksSource; diff --git a/src/query/ee/src/background_service/job.rs b/src/query/ee/src/background_service/job.rs index 5a694ef61c03..66c0c3f5fd72 100644 --- a/src/query/ee/src/background_service/job.rs +++ b/src/query/ee/src/background_service/job.rs @@ -13,11 +13,11 @@ // limitations under the License. use async_trait::async_trait; -use common_exception::Result; -use common_meta_app::background::BackgroundJobIdent; -use common_meta_app::background::BackgroundJobInfo; -use common_meta_app::background::BackgroundJobParams; -use common_meta_app::background::BackgroundJobStatus; +use databend_common_exception::Result; +use databend_common_meta_app::background::BackgroundJobIdent; +use databend_common_meta_app::background::BackgroundJobInfo; +use databend_common_meta_app::background::BackgroundJobParams; +use databend_common_meta_app::background::BackgroundJobStatus; /// A trait for implementing a background job /// diff --git a/src/query/ee/src/background_service/job_scheduler.rs b/src/query/ee/src/background_service/job_scheduler.rs index e7d220e3317f..5e307a336eaf 100644 --- a/src/query/ee/src/background_service/job_scheduler.rs +++ b/src/query/ee/src/background_service/job_scheduler.rs @@ -17,16 +17,16 @@ use std::time::Duration; use chrono::DateTime; use chrono::Utc; -use common_base::base::tokio; -use common_base::base::tokio::sync::mpsc::error::TryRecvError; -use common_base::base::tokio::sync::mpsc::Receiver; -use common_base::base::tokio::sync::mpsc::Sender; -use common_base::base::tokio::sync::Mutex; -use common_exception::Result; -use common_meta_app::background::BackgroundJobInfo; -use common_meta_app::background::BackgroundJobState; -use common_meta_app::background::BackgroundJobType; use dashmap::DashMap; +use databend_common_base::base::tokio; +use databend_common_base::base::tokio::sync::mpsc::error::TryRecvError; +use databend_common_base::base::tokio::sync::mpsc::Receiver; +use databend_common_base::base::tokio::sync::mpsc::Sender; +use databend_common_base::base::tokio::sync::Mutex; +use databend_common_exception::Result; +use databend_common_meta_app::background::BackgroundJobInfo; +use databend_common_meta_app::background::BackgroundJobState; +use databend_common_meta_app::background::BackgroundJobType; use log::as_debug; use log::info; diff --git a/src/query/ee/src/background_service/session.rs b/src/query/ee/src/background_service/session.rs index 6bc4c159f95e..67d65f0955f3 100644 --- a/src/query/ee/src/background_service/session.rs +++ b/src/query/ee/src/background_service/session.rs @@ -14,12 +14,12 @@ use std::sync::Arc; -use common_config::InnerConfig; -use common_exception::Result; -use common_meta_app::principal::GrantObject; -use common_meta_app::principal::UserInfo; -use common_meta_app::principal::UserPrivilegeType; -use common_users::BUILTIN_ROLE_ACCOUNT_ADMIN; +use databend_common_config::InnerConfig; +use databend_common_exception::Result; +use databend_common_meta_app::principal::GrantObject; +use databend_common_meta_app::principal::UserInfo; +use databend_common_meta_app::principal::UserPrivilegeType; +use databend_common_users::BUILTIN_ROLE_ACCOUNT_ADMIN; use databend_query::sessions::Session; use databend_query::sessions::SessionManager; use databend_query::sessions::SessionType; diff --git a/src/query/ee/src/data_mask/data_mask_handler.rs b/src/query/ee/src/data_mask/data_mask_handler.rs index ae66f39d9d01..6d0facec4bd3 100644 --- a/src/query/ee/src/data_mask/data_mask_handler.rs +++ b/src/query/ee/src/data_mask/data_mask_handler.rs @@ -14,17 +14,17 @@ use std::sync::Arc; -use common_base::base::GlobalInstance; -use common_exception::Result; -use common_meta_api::DatamaskApi; -use common_meta_app::data_mask::CreateDatamaskReq; -use common_meta_app::data_mask::DatamaskMeta; -use common_meta_app::data_mask::DatamaskNameIdent; -use common_meta_app::data_mask::DropDatamaskReq; -use common_meta_app::data_mask::GetDatamaskReq; -use common_meta_store::MetaStore; -use data_mask_feature::data_mask_handler::DatamaskHandler; -use data_mask_feature::data_mask_handler::DatamaskHandlerWrapper; +use databend_common_base::base::GlobalInstance; +use databend_common_exception::Result; +use databend_common_meta_api::DatamaskApi; +use databend_common_meta_app::data_mask::CreateDatamaskReq; +use databend_common_meta_app::data_mask::DatamaskMeta; +use databend_common_meta_app::data_mask::DatamaskNameIdent; +use databend_common_meta_app::data_mask::DropDatamaskReq; +use databend_common_meta_app::data_mask::GetDatamaskReq; +use databend_common_meta_store::MetaStore; +use databend_enterprise_data_mask_feature::data_mask_handler::DatamaskHandler; +use databend_enterprise_data_mask_feature::data_mask_handler::DatamaskHandlerWrapper; pub struct RealDatamaskHandler {} diff --git a/src/query/ee/src/enterprise_services.rs b/src/query/ee/src/enterprise_services.rs index ba84dbbf5bde..012bcd9701e9 100644 --- a/src/query/ee/src/enterprise_services.rs +++ b/src/query/ee/src/enterprise_services.rs @@ -12,9 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_config::InnerConfig; -use common_exception::Result; -use common_license::license_manager::LicenseManager; +use databend_common_config::InnerConfig; +use databend_common_exception::Result; +use databend_common_license::license_manager::LicenseManager; use crate::aggregating_index::RealAggregatingIndexHandler; use crate::background_service::RealBackgroundService; diff --git a/src/query/ee/src/license/license_mgr.rs b/src/query/ee/src/license/license_mgr.rs index 18f8e27b4bef..0049522d95c6 100644 --- a/src/query/ee/src/license/license_mgr.rs +++ b/src/query/ee/src/license/license_mgr.rs @@ -14,15 +14,15 @@ use std::sync::Arc; -use common_base::base::GlobalInstance; -use common_exception::exception::ErrorCode; -use common_exception::Result; -use common_exception::ToErrorCode; -use common_license::license::Feature; -use common_license::license::LicenseInfo; -use common_license::license_manager::LicenseManager; -use common_license::license_manager::LicenseManagerWrapper; use dashmap::DashMap; +use databend_common_base::base::GlobalInstance; +use databend_common_exception::exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_exception::ToErrorCode; +use databend_common_license::license::Feature; +use databend_common_license::license::LicenseInfo; +use databend_common_license::license_manager::LicenseManager; +use databend_common_license::license_manager::LicenseManagerWrapper; use jwt_simple::algorithms::ES256PublicKey; use jwt_simple::claims::JWTClaims; use jwt_simple::prelude::Clock; diff --git a/src/query/ee/src/storage_encryption/handler.rs b/src/query/ee/src/storage_encryption/handler.rs index 3f303edbd920..041655d54572 100644 --- a/src/query/ee/src/storage_encryption/handler.rs +++ b/src/query/ee/src/storage_encryption/handler.rs @@ -14,15 +14,15 @@ use std::sync::Arc; -use common_base::base::GlobalInstance; -use common_config::InnerConfig; -use common_exception::Result; -use common_license::license::Feature; -use common_license::license_manager::get_license_manager; +use databend_common_base::base::GlobalInstance; +use databend_common_config::InnerConfig; +use databend_common_exception::Result; +use databend_common_license::license::Feature; +use databend_common_license::license_manager::get_license_manager; +use databend_enterprise_storage_encryption::StorageEncryptionHandler; +use databend_enterprise_storage_encryption::StorageEncryptionHandlerWrapper; use databend_query::sessions::SessionManager; use databend_query::sessions::SessionType; -use storage_encryption::StorageEncryptionHandler; -use storage_encryption::StorageEncryptionHandlerWrapper; pub struct RealStorageEncryptionHandler { cfg: InnerConfig, diff --git a/src/query/ee/src/storages/fuse/io/snapshots.rs b/src/query/ee/src/storages/fuse/io/snapshots.rs index ad23ceeafd3b..07b36cdffc7b 100644 --- a/src/query/ee/src/storages/fuse/io/snapshots.rs +++ b/src/query/ee/src/storages/fuse/io/snapshots.rs @@ -18,11 +18,11 @@ use std::sync::Arc; use std::time::Instant; -use common_exception::Result; -use common_storages_fuse::io::SnapshotLiteExtended; -use common_storages_fuse::io::SnapshotsIO; +use databend_common_exception::Result; +use databend_common_storages_fuse::io::SnapshotLiteExtended; +use databend_common_storages_fuse::io::SnapshotsIO; +use databend_storages_common_table_meta::meta::Location; use log::info; -use storages_common_table_meta::meta::Location; #[async_backtrace::framed] pub async fn get_snapshot_referenced_segments( diff --git a/src/query/ee/src/storages/fuse/operations/handler.rs b/src/query/ee/src/storages/fuse/operations/handler.rs index 17f61979ad49..dd29d2d17b0b 100644 --- a/src/query/ee/src/storages/fuse/operations/handler.rs +++ b/src/query/ee/src/storages/fuse/operations/handler.rs @@ -16,13 +16,13 @@ use std::sync::Arc; use chrono::DateTime; use chrono::Utc; -use common_base::base::GlobalInstance; -use common_catalog::table::Table; -use common_catalog::table_context::TableContext; -use common_exception::Result; -use common_storages_fuse::FuseTable; -use vacuum_handler::VacuumHandler; -use vacuum_handler::VacuumHandlerWrapper; +use databend_common_base::base::GlobalInstance; +use databend_common_catalog::table::Table; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::Result; +use databend_common_storages_fuse::FuseTable; +use databend_enterprise_vacuum_handler::VacuumHandler; +use databend_enterprise_vacuum_handler::VacuumHandlerWrapper; use crate::storages::fuse::do_vacuum; use crate::storages::fuse::do_vacuum_drop_tables; diff --git a/src/query/ee/src/storages/fuse/operations/vacuum_drop_tables.rs b/src/query/ee/src/storages/fuse/operations/vacuum_drop_tables.rs index b3736b7ecb45..efb2df4daa83 100644 --- a/src/query/ee/src/storages/fuse/operations/vacuum_drop_tables.rs +++ b/src/query/ee/src/storages/fuse/operations/vacuum_drop_tables.rs @@ -15,9 +15,9 @@ use std::sync::Arc; use std::time::Instant; -use common_catalog::table::Table; -use common_exception::Result; -use common_storages_fuse::FuseTable; +use databend_common_catalog::table::Table; +use databend_common_exception::Result; +use databend_common_storages_fuse::FuseTable; use futures_util::TryStreamExt; use log::info; use opendal::EntryMode; diff --git a/src/query/ee/src/storages/fuse/operations/vacuum_table.rs b/src/query/ee/src/storages/fuse/operations/vacuum_table.rs index 481bfb35fd79..44ad92aa83dc 100644 --- a/src/query/ee/src/storages/fuse/operations/vacuum_table.rs +++ b/src/query/ee/src/storages/fuse/operations/vacuum_table.rs @@ -19,18 +19,18 @@ use std::time::Instant; use chrono::DateTime; use chrono::Duration; use chrono::Utc; -use common_catalog::table::NavigationPoint; -use common_catalog::table::Table; -use common_catalog::table_context::TableContext; -use common_exception::ErrorCode; -use common_exception::Result; -use common_storages_fuse::io::MetaReaders; -use common_storages_fuse::io::SnapshotLiteExtended; -use common_storages_fuse::io::SnapshotsIO; -use common_storages_fuse::io::TableMetaLocationGenerator; -use common_storages_fuse::FuseTable; -use storages_common_cache::LoadParams; -use storages_common_table_meta::meta::CompactSegmentInfo; +use databend_common_catalog::table::NavigationPoint; +use databend_common_catalog::table::Table; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_storages_fuse::io::MetaReaders; +use databend_common_storages_fuse::io::SnapshotLiteExtended; +use databend_common_storages_fuse::io::SnapshotsIO; +use databend_common_storages_fuse::io::TableMetaLocationGenerator; +use databend_common_storages_fuse::FuseTable; +use databend_storages_common_cache::LoadParams; +use databend_storages_common_table_meta::meta::CompactSegmentInfo; use crate::storages::fuse::get_snapshot_referenced_segments; diff --git a/src/query/ee/src/storages/fuse/operations/virtual_columns.rs b/src/query/ee/src/storages/fuse/operations/virtual_columns.rs index c9f6fd590997..a182e1759430 100644 --- a/src/query/ee/src/storages/fuse/operations/virtual_columns.rs +++ b/src/query/ee/src/storages/fuse/operations/virtual_columns.rs @@ -14,33 +14,33 @@ use std::sync::Arc; -use common_catalog::plan::Projection; -use common_catalog::table::Table; -use common_catalog::table_context::TableContext; -use common_exception::Result; -use common_expression::infer_schema_type; -use common_expression::BlockEntry; -use common_expression::DataBlock; -use common_expression::DataSchema; -use common_expression::DataSchemaRef; -use common_expression::Evaluator; -use common_expression::TableDataType; -use common_expression::TableField; -use common_expression::TableSchemaRefExt; -use common_functions::BUILTIN_FUNCTIONS; -use common_io::constants::DEFAULT_BLOCK_BUFFER_SIZE; -use common_sql::parse_computed_expr; -use common_storages_fuse::io::serialize_block; -use common_storages_fuse::io::write_data; -use common_storages_fuse::io::MetaReaders; -use common_storages_fuse::io::ReadSettings; -use common_storages_fuse::io::TableMetaLocationGenerator; -use common_storages_fuse::io::WriteSettings; -use common_storages_fuse::FuseStorageFormat; -use common_storages_fuse::FuseTable; +use databend_common_catalog::plan::Projection; +use databend_common_catalog::table::Table; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::Result; +use databend_common_expression::infer_schema_type; +use databend_common_expression::BlockEntry; +use databend_common_expression::DataBlock; +use databend_common_expression::DataSchema; +use databend_common_expression::DataSchemaRef; +use databend_common_expression::Evaluator; +use databend_common_expression::TableDataType; +use databend_common_expression::TableField; +use databend_common_expression::TableSchemaRefExt; +use databend_common_functions::BUILTIN_FUNCTIONS; +use databend_common_io::constants::DEFAULT_BLOCK_BUFFER_SIZE; +use databend_common_sql::parse_computed_expr; +use databend_common_storages_fuse::io::serialize_block; +use databend_common_storages_fuse::io::write_data; +use databend_common_storages_fuse::io::MetaReaders; +use databend_common_storages_fuse::io::ReadSettings; +use databend_common_storages_fuse::io::TableMetaLocationGenerator; +use databend_common_storages_fuse::io::WriteSettings; +use databend_common_storages_fuse::FuseStorageFormat; +use databend_common_storages_fuse::FuseTable; +use databend_storages_common_cache::LoadParams; +use databend_storages_common_table_meta::meta::Location; use opendal::Operator; -use storages_common_cache::LoadParams; -use storages_common_table_meta::meta::Location; #[async_backtrace::framed] pub async fn do_refresh_virtual_column( diff --git a/src/query/ee/src/stream/handler.rs b/src/query/ee/src/stream/handler.rs index 8c02f85bf52f..011d4658f9d9 100644 --- a/src/query/ee/src/stream/handler.rs +++ b/src/query/ee/src/stream/handler.rs @@ -16,35 +16,35 @@ use std::collections::BTreeMap; use std::collections::HashMap; use std::sync::Arc; -use common_base::base::GlobalInstance; -use common_catalog::table::Table; -use common_exception::ErrorCode; -use common_exception::Result; -use common_meta_app::schema::CreateTableReply; -use common_meta_app::schema::CreateTableReq; -use common_meta_app::schema::DropTableByIdReq; -use common_meta_app::schema::DropTableReply; -use common_meta_app::schema::TableMeta; -use common_meta_app::schema::TableNameIdent; -use common_meta_app::schema::UpsertTableOptionReq; -use common_meta_types::MatchSeq; -use common_sql::plans::CreateStreamPlan; -use common_sql::plans::DropStreamPlan; -use common_sql::plans::StreamNavigation; -use common_storages_fuse::FuseTable; -use common_storages_fuse::TableContext; -use common_storages_stream::stream_table::StreamTable; -use common_storages_stream::stream_table::MODE_APPEND_ONLY; -use common_storages_stream::stream_table::OPT_KEY_DATABASE_NAME; -use common_storages_stream::stream_table::OPT_KEY_MODE; -use common_storages_stream::stream_table::OPT_KEY_TABLE_ID; -use common_storages_stream::stream_table::OPT_KEY_TABLE_NAME; -use common_storages_stream::stream_table::OPT_KEY_TABLE_VER; -use common_storages_stream::stream_table::STREAM_ENGINE; -use storages_common_table_meta::table::OPT_KEY_CHANGE_TRACKING; -use storages_common_table_meta::table::OPT_KEY_SNAPSHOT_LOCATION; -use stream_handler::StreamHandler; -use stream_handler::StreamHandlerWrapper; +use databend_common_base::base::GlobalInstance; +use databend_common_catalog::table::Table; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_meta_app::schema::CreateTableReply; +use databend_common_meta_app::schema::CreateTableReq; +use databend_common_meta_app::schema::DropTableByIdReq; +use databend_common_meta_app::schema::DropTableReply; +use databend_common_meta_app::schema::TableMeta; +use databend_common_meta_app::schema::TableNameIdent; +use databend_common_meta_app::schema::UpsertTableOptionReq; +use databend_common_meta_types::MatchSeq; +use databend_common_sql::plans::CreateStreamPlan; +use databend_common_sql::plans::DropStreamPlan; +use databend_common_sql::plans::StreamNavigation; +use databend_common_storages_fuse::FuseTable; +use databend_common_storages_fuse::TableContext; +use databend_common_storages_stream::stream_table::StreamTable; +use databend_common_storages_stream::stream_table::MODE_APPEND_ONLY; +use databend_common_storages_stream::stream_table::OPT_KEY_DATABASE_NAME; +use databend_common_storages_stream::stream_table::OPT_KEY_MODE; +use databend_common_storages_stream::stream_table::OPT_KEY_TABLE_ID; +use databend_common_storages_stream::stream_table::OPT_KEY_TABLE_NAME; +use databend_common_storages_stream::stream_table::OPT_KEY_TABLE_VER; +use databend_common_storages_stream::stream_table::STREAM_ENGINE; +use databend_enterprise_stream_handler::StreamHandler; +use databend_enterprise_stream_handler::StreamHandlerWrapper; +use databend_storages_common_table_meta::table::OPT_KEY_CHANGE_TRACKING; +use databend_storages_common_table_meta::table::OPT_KEY_SNAPSHOT_LOCATION; pub struct RealStreamHandler {} diff --git a/src/query/ee/src/test_kits/context.rs b/src/query/ee/src/test_kits/context.rs index fc5941e6c8f1..8d796120467b 100644 --- a/src/query/ee/src/test_kits/context.rs +++ b/src/query/ee/src/test_kits/context.rs @@ -12,11 +12,11 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_config::InnerConfig; -use common_exception::Result; -use common_license::license::LicenseInfo; -use common_meta_app::storage::StorageFsConfig; -use common_meta_app::storage::StorageParams; +use databend_common_config::InnerConfig; +use databend_common_exception::Result; +use databend_common_license::license::LicenseInfo; +use databend_common_meta_app::storage::StorageFsConfig; +use databend_common_meta_app::storage::StorageParams; use databend_query::test_kits::*; use jwt_simple::algorithms::ECDSAP256KeyPairLike; use jwt_simple::prelude::Claims; diff --git a/src/query/ee/src/test_kits/mock_services.rs b/src/query/ee/src/test_kits/mock_services.rs index fbd3ead73c84..094d3f25bdc8 100644 --- a/src/query/ee/src/test_kits/mock_services.rs +++ b/src/query/ee/src/test_kits/mock_services.rs @@ -14,10 +14,10 @@ use std::sync::Arc; -use common_base::base::GlobalInstance; -use common_config::InnerConfig; -use common_exception::Result; -use common_license::license_manager::LicenseManagerWrapper; +use databend_common_base::base::GlobalInstance; +use databend_common_config::InnerConfig; +use databend_common_exception::Result; +use databend_common_license::license_manager::LicenseManagerWrapper; use crate::aggregating_index::RealAggregatingIndexHandler; use crate::data_mask::RealDatamaskHandler; diff --git a/src/query/ee/src/test_kits/setup.rs b/src/query/ee/src/test_kits/setup.rs index 7ac412f545db..ba2b469d9aa0 100644 --- a/src/query/ee/src/test_kits/setup.rs +++ b/src/query/ee/src/test_kits/setup.rs @@ -12,9 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_config::InnerConfig; -use common_exception::Result; -use common_tracing::set_panic_hook; +use databend_common_config::InnerConfig; +use databend_common_exception::Result; +use databend_common_tracing::set_panic_hook; use databend_query::clusters::ClusterDiscovery; use databend_query::GlobalServices; use log::info; @@ -31,7 +31,7 @@ impl TestFixture { #[cfg(debug_assertions)] { let thread_name = std::thread::current().name().unwrap().to_string(); - common_base::base::GlobalInstance::init_testing(&thread_name); + databend_common_base::base::GlobalInstance::init_testing(&thread_name); } GlobalServices::init_with(config).await?; diff --git a/src/query/ee/src/virtual_column/virtual_column_handler.rs b/src/query/ee/src/virtual_column/virtual_column_handler.rs index b97d463f4ff8..e767009933cb 100644 --- a/src/query/ee/src/virtual_column/virtual_column_handler.rs +++ b/src/query/ee/src/virtual_column/virtual_column_handler.rs @@ -14,22 +14,22 @@ use std::sync::Arc; -use common_base::base::GlobalInstance; -use common_catalog::catalog::Catalog; -use common_catalog::table_context::TableContext; -use common_exception::Result; -use common_meta_app::schema::CreateVirtualColumnReply; -use common_meta_app::schema::CreateVirtualColumnReq; -use common_meta_app::schema::DropVirtualColumnReply; -use common_meta_app::schema::DropVirtualColumnReq; -use common_meta_app::schema::ListVirtualColumnsReq; -use common_meta_app::schema::UpdateVirtualColumnReply; -use common_meta_app::schema::UpdateVirtualColumnReq; -use common_meta_app::schema::VirtualColumnMeta; -use common_storages_fuse::FuseTable; -use storages_common_table_meta::meta::Location; -use virtual_column::VirtualColumnHandler; -use virtual_column::VirtualColumnHandlerWrapper; +use databend_common_base::base::GlobalInstance; +use databend_common_catalog::catalog::Catalog; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::Result; +use databend_common_meta_app::schema::CreateVirtualColumnReply; +use databend_common_meta_app::schema::CreateVirtualColumnReq; +use databend_common_meta_app::schema::DropVirtualColumnReply; +use databend_common_meta_app::schema::DropVirtualColumnReq; +use databend_common_meta_app::schema::ListVirtualColumnsReq; +use databend_common_meta_app::schema::UpdateVirtualColumnReply; +use databend_common_meta_app::schema::UpdateVirtualColumnReq; +use databend_common_meta_app::schema::VirtualColumnMeta; +use databend_common_storages_fuse::FuseTable; +use databend_enterprise_virtual_column::VirtualColumnHandler; +use databend_enterprise_virtual_column::VirtualColumnHandlerWrapper; +use databend_storages_common_table_meta::meta::Location; use crate::storages::fuse::do_refresh_virtual_column; diff --git a/src/query/ee/tests/it/aggregating_index/index_refresh.rs b/src/query/ee/tests/it/aggregating_index/index_refresh.rs index 1b99547bb518..bb988368ab95 100644 --- a/src/query/ee/tests/it/aggregating_index/index_refresh.rs +++ b/src/query/ee/tests/it/aggregating_index/index_refresh.rs @@ -17,25 +17,25 @@ use std::path::Path; use std::path::PathBuf; use std::sync::Arc; -use aggregating_index::get_agg_index_handler; use chrono::Utc; -use common_base::base::tokio; -use common_catalog::table_context::TableContext; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::block_debug::assert_two_blocks_sorted_eq_with_name; -use common_expression::DataBlock; -use common_expression::SendableDataBlockStream; -use common_meta_app::schema::CreateIndexReq; -use common_meta_app::schema::IndexMeta; -use common_meta_app::schema::IndexNameIdent; -use common_meta_app::schema::IndexType; -use common_sql::plans::Plan; -use common_sql::Planner; +use databend_common_base::base::tokio; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::block_debug::assert_two_blocks_sorted_eq_with_name; +use databend_common_expression::DataBlock; +use databend_common_expression::SendableDataBlockStream; +use databend_common_meta_app::schema::CreateIndexReq; +use databend_common_meta_app::schema::IndexMeta; +use databend_common_meta_app::schema::IndexNameIdent; +use databend_common_meta_app::schema::IndexType; +use databend_common_sql::plans::Plan; +use databend_common_sql::Planner; +use databend_enterprise_aggregating_index::get_agg_index_handler; +use databend_enterprise_query::test_kits::context::EESetup; use databend_query::interpreters::InterpreterFactory; use databend_query::sessions::QueryContext; use databend_query::test_kits::*; -use enterprise_query::test_kits::context::EESetup; use futures_util::TryStreamExt; async fn plan_sql(ctx: Arc, sql: &str) -> Result { diff --git a/src/query/ee/tests/it/aggregating_index/index_scan.rs b/src/query/ee/tests/it/aggregating_index/index_scan.rs index 6be587f2e24a..eaafd70ff0c0 100644 --- a/src/query/ee/tests/it/aggregating_index/index_scan.rs +++ b/src/query/ee/tests/it/aggregating_index/index_scan.rs @@ -16,20 +16,20 @@ use std::collections::HashMap; use std::fmt::Display; use std::sync::Arc; -use common_base::base::tokio; -use common_exception::Result; -use common_expression::block_debug::pretty_format_blocks; -use common_expression::DataBlock; -use common_expression::SendableDataBlockStream; -use common_expression::SortColumnDescription; -use common_sql::optimizer::SExpr; -use common_sql::planner::plans::Plan; -use common_sql::plans::RelOperator; -use common_sql::Planner; +use databend_common_base::base::tokio; +use databend_common_exception::Result; +use databend_common_expression::block_debug::pretty_format_blocks; +use databend_common_expression::DataBlock; +use databend_common_expression::SendableDataBlockStream; +use databend_common_expression::SortColumnDescription; +use databend_common_sql::optimizer::SExpr; +use databend_common_sql::planner::plans::Plan; +use databend_common_sql::plans::RelOperator; +use databend_common_sql::Planner; +use databend_enterprise_query::test_kits::context::EESetup; use databend_query::interpreters::InterpreterFactory; use databend_query::sessions::QueryContext; use databend_query::test_kits::*; -use enterprise_query::test_kits::context::EESetup; use futures_util::TryStreamExt; #[tokio::test(flavor = "multi_thread")] diff --git a/src/query/ee/tests/it/background_service/compaction_job.rs b/src/query/ee/tests/it/background_service/compaction_job.rs index 856fc53e65d5..1d85c1b47d0d 100644 --- a/src/query/ee/tests/it/background_service/compaction_job.rs +++ b/src/query/ee/tests/it/background_service/compaction_job.rs @@ -14,11 +14,11 @@ use core::default::Default; -use common_base::base::tokio; -use common_exception::Result; -use common_meta_app::schema::TableStatistics; -use enterprise_query::background_service::should_continue_compaction; -use enterprise_query::background_service::CompactionJob; +use databend_common_base::base::tokio; +use databend_common_exception::Result; +use databend_common_meta_app::schema::TableStatistics; +use databend_enterprise_query::background_service::should_continue_compaction; +use databend_enterprise_query::background_service::CompactionJob; #[tokio::test(flavor = "multi_thread")] async fn test_get_compaction_advice_sql() -> Result<()> { diff --git a/src/query/ee/tests/it/background_service/job_scheduler.rs b/src/query/ee/tests/it/background_service/job_scheduler.rs index 4afb44468b34..a76dd90a8ed6 100644 --- a/src/query/ee/tests/it/background_service/job_scheduler.rs +++ b/src/query/ee/tests/it/background_service/job_scheduler.rs @@ -19,17 +19,17 @@ use std::time::Duration; use chrono::TimeZone; use chrono::Utc; use chrono_tz::Tz; -use common_base::base::tokio; -use common_base::base::tokio::sync::mpsc::Sender; -use common_base::base::tokio::sync::Mutex; -use common_exception::Result; -use common_meta_app::background::BackgroundJobIdent; -use common_meta_app::background::BackgroundJobInfo; -use common_meta_app::background::BackgroundJobParams; -use common_meta_app::background::BackgroundJobStatus; -use common_meta_app::principal::UserIdentity; -use enterprise_query::background_service::Job; -use enterprise_query::background_service::JobScheduler; +use databend_common_base::base::tokio; +use databend_common_base::base::tokio::sync::mpsc::Sender; +use databend_common_base::base::tokio::sync::Mutex; +use databend_common_exception::Result; +use databend_common_meta_app::background::BackgroundJobIdent; +use databend_common_meta_app::background::BackgroundJobInfo; +use databend_common_meta_app::background::BackgroundJobParams; +use databend_common_meta_app::background::BackgroundJobStatus; +use databend_common_meta_app::principal::UserIdentity; +use databend_enterprise_query::background_service::Job; +use databend_enterprise_query::background_service::JobScheduler; #[derive(Clone)] struct TestJob { diff --git a/src/query/ee/tests/it/license/license_mgr.rs b/src/query/ee/tests/it/license/license_mgr.rs index 01d916031451..9dfaacf021d1 100644 --- a/src/query/ee/tests/it/license/license_mgr.rs +++ b/src/query/ee/tests/it/license/license_mgr.rs @@ -12,12 +12,12 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_base::base::tokio; -use common_license::license::Feature; -use common_license::license::LicenseInfo; -use common_license::license_manager::LicenseManager; +use databend_common_base::base::tokio; +use databend_common_license::license::Feature; +use databend_common_license::license::LicenseInfo; +use databend_common_license::license_manager::LicenseManager; +use databend_enterprise_query::license::RealLicenseManager; use databend_query::test_kits::*; -use enterprise_query::license::RealLicenseManager; use jwt_simple::algorithms::ES256KeyPair; use jwt_simple::claims::Claims; use jwt_simple::prelude::Duration; @@ -38,7 +38,7 @@ fn build_custom_claims( } #[tokio::test(flavor = "multi_thread")] -async fn test_parse_license() -> common_exception::Result<()> { +async fn test_parse_license() -> databend_common_exception::Result<()> { let fixture = TestFixture::setup().await?; let key_pair = ES256KeyPair::generate(); @@ -86,7 +86,7 @@ async fn test_parse_license() -> common_exception::Result<()> { } #[tokio::test(flavor = "multi_thread")] -async fn test_license_features() -> common_exception::Result<()> { +async fn test_license_features() -> databend_common_exception::Result<()> { let fixture = TestFixture::setup().await?; let key_pair = ES256KeyPair::generate(); diff --git a/src/query/ee/tests/it/storages/fuse/operations/computed_columns.rs b/src/query/ee/tests/it/storages/fuse/operations/computed_columns.rs index d3d7ccf77784..998ce272f623 100644 --- a/src/query/ee/tests/it/storages/fuse/operations/computed_columns.rs +++ b/src/query/ee/tests/it/storages/fuse/operations/computed_columns.rs @@ -12,10 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_base::base::tokio; -use common_exception::Result; +use databend_common_base::base::tokio; +use databend_common_exception::Result; +use databend_enterprise_query::test_kits::context::EESetup; use databend_query::test_kits::*; -use enterprise_query::test_kits::context::EESetup; use futures::TryStreamExt; #[tokio::test(flavor = "multi_thread")] diff --git a/src/query/ee/tests/it/storages/fuse/operations/vacuum.rs b/src/query/ee/tests/it/storages/fuse/operations/vacuum.rs index 112c07a71004..bc2eab3b9d31 100644 --- a/src/query/ee/tests/it/storages/fuse/operations/vacuum.rs +++ b/src/query/ee/tests/it/storages/fuse/operations/vacuum.rs @@ -12,10 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_base::base::tokio; -use common_exception::Result; +use databend_common_base::base::tokio; +use databend_common_exception::Result; +use databend_enterprise_query::storages::fuse::do_vacuum_drop_tables; use databend_query::test_kits::*; -use enterprise_query::storages::fuse::do_vacuum_drop_tables; #[tokio::test(flavor = "multi_thread")] async fn test_fuse_do_vacuum_drop_table() -> Result<()> { diff --git a/src/query/ee/tests/it/storages/fuse/operations/virtual_columns.rs b/src/query/ee/tests/it/storages/fuse/operations/virtual_columns.rs index 753b9c6c0bb6..c4bef5f20afa 100644 --- a/src/query/ee/tests/it/storages/fuse/operations/virtual_columns.rs +++ b/src/query/ee/tests/it/storages/fuse/operations/virtual_columns.rs @@ -12,16 +12,16 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_base::base::tokio; -use common_catalog::plan::Projection; -use common_exception::Result; -use common_storages_fuse::io::MetaReaders; -use common_storages_fuse::io::TableMetaLocationGenerator; -use common_storages_fuse::FuseStorageFormat; -use common_storages_fuse::FuseTable; +use databend_common_base::base::tokio; +use databend_common_catalog::plan::Projection; +use databend_common_exception::Result; +use databend_common_storages_fuse::io::MetaReaders; +use databend_common_storages_fuse::io::TableMetaLocationGenerator; +use databend_common_storages_fuse::FuseStorageFormat; +use databend_common_storages_fuse::FuseTable; +use databend_enterprise_query::storages::fuse::operations::virtual_columns::do_refresh_virtual_column; use databend_query::test_kits::*; -use enterprise_query::storages::fuse::operations::virtual_columns::do_refresh_virtual_column; -use storages_common_cache::LoadParams; +use databend_storages_common_cache::LoadParams; #[tokio::test(flavor = "multi_thread")] async fn test_fuse_do_refresh_virtual_column() -> Result<()> { diff --git a/src/query/ee_features/aggregating_index/Cargo.toml b/src/query/ee_features/aggregating_index/Cargo.toml index aa9d5a4f8b2b..c47b93318797 100644 --- a/src/query/ee_features/aggregating_index/Cargo.toml +++ b/src/query/ee_features/aggregating_index/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "aggregating-index" +name = "databend-enterprise-aggregating-index" description = "aggregating index handler" version = { workspace = true } authors = { workspace = true } @@ -13,10 +13,10 @@ test = false [dependencies] # Workspace dependencies -common-base = { path = "../../../common/base" } -common-catalog = { path = "../../catalog" } -common-exception = { path = "../../../common/exception" } -common-meta-app = { path = "../../../meta/app" } +databend-common-base = { path = "../../../common/base" } +databend-common-catalog = { path = "../../catalog" } +databend-common-exception = { path = "../../../common/exception" } +databend-common-meta-app = { path = "../../../meta/app" } async-backtrace = { workspace = true } async-trait = { workspace = true } diff --git a/src/query/ee_features/aggregating_index/src/aggregating_index_handler.rs b/src/query/ee_features/aggregating_index/src/aggregating_index_handler.rs index ff11cb345a35..e37600ff0629 100644 --- a/src/query/ee_features/aggregating_index/src/aggregating_index_handler.rs +++ b/src/query/ee_features/aggregating_index/src/aggregating_index_handler.rs @@ -14,17 +14,17 @@ use std::sync::Arc; -use common_base::base::GlobalInstance; -use common_catalog::catalog::Catalog; -use common_exception::Result; -use common_meta_app::schema::CreateIndexReply; -use common_meta_app::schema::CreateIndexReq; -use common_meta_app::schema::DropIndexReply; -use common_meta_app::schema::DropIndexReq; -use common_meta_app::schema::GetIndexReply; -use common_meta_app::schema::GetIndexReq; -use common_meta_app::schema::UpdateIndexReply; -use common_meta_app::schema::UpdateIndexReq; +use databend_common_base::base::GlobalInstance; +use databend_common_catalog::catalog::Catalog; +use databend_common_exception::Result; +use databend_common_meta_app::schema::CreateIndexReply; +use databend_common_meta_app::schema::CreateIndexReq; +use databend_common_meta_app::schema::DropIndexReply; +use databend_common_meta_app::schema::DropIndexReq; +use databend_common_meta_app::schema::GetIndexReply; +use databend_common_meta_app::schema::GetIndexReq; +use databend_common_meta_app::schema::UpdateIndexReply; +use databend_common_meta_app::schema::UpdateIndexReq; #[async_trait::async_trait] pub trait AggregatingIndexHandler: Sync + Send { diff --git a/src/query/ee_features/background_service/Cargo.toml b/src/query/ee_features/background_service/Cargo.toml index 7bba03898627..c63fcd82df11 100644 --- a/src/query/ee_features/background_service/Cargo.toml +++ b/src/query/ee_features/background_service/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "background-service" +name = "databend-enterprise-background-service" description = "background service to run automatic optimization for databend cluster" version = { workspace = true } authors = { workspace = true } @@ -13,9 +13,9 @@ test = false [dependencies] # Workspace dependencies -common-base = { path = "../../../common/base" } -common-exception = { path = "../../../common/exception" } -common-meta-app = { path = "../../../meta/app" } +databend-common-base = { path = "../../../common/base" } +databend-common-exception = { path = "../../../common/exception" } +databend-common-meta-app = { path = "../../../meta/app" } arrow-array = { workspace = true } async-backtrace = { workspace = true } diff --git a/src/query/ee_features/background_service/src/background_service.rs b/src/query/ee_features/background_service/src/background_service.rs index 12c10b0df636..3b2b16bf4ab2 100644 --- a/src/query/ee_features/background_service/src/background_service.rs +++ b/src/query/ee_features/background_service/src/background_service.rs @@ -15,9 +15,9 @@ use std::sync::Arc; use arrow_array::RecordBatch; -use common_base::base::GlobalInstance; -use common_exception::Result; -use common_meta_app::principal::UserIdentity; +use databend_common_base::base::GlobalInstance; +use databend_common_exception::Result; +use databend_common_meta_app::principal::UserIdentity; #[async_trait::async_trait] pub trait BackgroundServiceHandler: Sync + Send { diff --git a/src/query/ee_features/background_service/src/management_suggestions.rs b/src/query/ee_features/background_service/src/management_suggestions.rs index 9edb985d62f8..2f0c95ea95a8 100644 --- a/src/query/ee_features/background_service/src/management_suggestions.rs +++ b/src/query/ee_features/background_service/src/management_suggestions.rs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_meta_app::schema::TableStatistics; +use databend_common_meta_app::schema::TableStatistics; pub use serde::Deserialize; pub use serde::Serialize; diff --git a/src/query/ee_features/data_mask/Cargo.toml b/src/query/ee_features/data_mask/Cargo.toml index 19035e8bcd78..6c81f4ddbe32 100644 --- a/src/query/ee_features/data_mask/Cargo.toml +++ b/src/query/ee_features/data_mask/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "data-mask-feature" +name = "databend-enterprise-data-mask-feature" description = "data mask" version = { workspace = true } authors = { workspace = true } @@ -13,10 +13,10 @@ test = false [dependencies] # Workspace dependencies -common-base = { path = "../../../common/base" } -common-exception = { path = "../../../common/exception" } -common-meta-app = { path = "../../../meta/app" } -common-meta-store = { path = "../../../meta/store" } +databend-common-base = { path = "../../../common/base" } +databend-common-exception = { path = "../../../common/exception" } +databend-common-meta-app = { path = "../../../meta/app" } +databend-common-meta-store = { path = "../../../meta/store" } async-trait = { workspace = true } diff --git a/src/query/ee_features/data_mask/src/data_mask_handler.rs b/src/query/ee_features/data_mask/src/data_mask_handler.rs index d9a7aca2ad28..7cf41824bbff 100644 --- a/src/query/ee_features/data_mask/src/data_mask_handler.rs +++ b/src/query/ee_features/data_mask/src/data_mask_handler.rs @@ -28,12 +28,12 @@ use std::sync::Arc; -use common_base::base::GlobalInstance; -use common_exception::Result; -use common_meta_app::data_mask::CreateDatamaskReq; -use common_meta_app::data_mask::DatamaskMeta; -use common_meta_app::data_mask::DropDatamaskReq; -use common_meta_store::MetaStore; +use databend_common_base::base::GlobalInstance; +use databend_common_exception::Result; +use databend_common_meta_app::data_mask::CreateDatamaskReq; +use databend_common_meta_app::data_mask::DatamaskMeta; +use databend_common_meta_app::data_mask::DropDatamaskReq; +use databend_common_meta_store::MetaStore; #[async_trait::async_trait] pub trait DatamaskHandler: Sync + Send { diff --git a/src/query/ee_features/storage_encryption/Cargo.toml b/src/query/ee_features/storage_encryption/Cargo.toml index a7373c4aa31d..df24b93deeda 100644 --- a/src/query/ee_features/storage_encryption/Cargo.toml +++ b/src/query/ee_features/storage_encryption/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "storage-encryption" +name = "databend-enterprise-storage-encryption" version = { workspace = true } authors = { workspace = true } license = { workspace = true } @@ -12,8 +12,8 @@ test = false [dependencies] # Workspace dependencies -common-base = { path = "../../../common/base" } -common-exception = { path = "../../../common/exception" } +databend-common-base = { path = "../../../common/base" } +databend-common-exception = { path = "../../../common/exception" } async-trait = { workspace = true } diff --git a/src/query/ee_features/storage_encryption/src/handler.rs b/src/query/ee_features/storage_encryption/src/handler.rs index 37506eed6f4a..f9801bd962a7 100644 --- a/src/query/ee_features/storage_encryption/src/handler.rs +++ b/src/query/ee_features/storage_encryption/src/handler.rs @@ -14,9 +14,9 @@ use std::sync::Arc; -use common_base::base::GlobalInstance; -use common_exception::ErrorCode; -use common_exception::Result; +use databend_common_base::base::GlobalInstance; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; /// StorageEncryptionHandler is a trait that defines whether we support storage encryption or not. #[async_trait::async_trait] diff --git a/src/query/ee_features/stream_handler/Cargo.toml b/src/query/ee_features/stream_handler/Cargo.toml index 9c45fde89948..e451a91dad4d 100644 --- a/src/query/ee_features/stream_handler/Cargo.toml +++ b/src/query/ee_features/stream_handler/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "stream-handler" +name = "databend-enterprise-stream-handler" version = { workspace = true } authors = { workspace = true } license = { workspace = true } @@ -12,11 +12,11 @@ test = false [dependencies] # Workspace dependencies -common-base = { path = "../../../common/base" } -common-catalog = { path = "../../catalog" } -common-exception = { path = "../../../common/exception" } -common-meta-app = { path = "../../../meta/app" } -common-sql = { path = "../../sql" } +databend-common-base = { path = "../../../common/base" } +databend-common-catalog = { path = "../../catalog" } +databend-common-exception = { path = "../../../common/exception" } +databend-common-meta-app = { path = "../../../meta/app" } +databend-common-sql = { path = "../../sql" } # Github dependencies async-backtrace = { workspace = true } diff --git a/src/query/ee_features/stream_handler/src/handler.rs b/src/query/ee_features/stream_handler/src/handler.rs index 6301f9747167..050dd336e3f1 100644 --- a/src/query/ee_features/stream_handler/src/handler.rs +++ b/src/query/ee_features/stream_handler/src/handler.rs @@ -14,13 +14,13 @@ use std::sync::Arc; -use common_base::base::GlobalInstance; -use common_catalog::table_context::TableContext; -use common_exception::Result; -use common_meta_app::schema::CreateTableReply; -use common_meta_app::schema::DropTableReply; -use common_sql::plans::CreateStreamPlan; -use common_sql::plans::DropStreamPlan; +use databend_common_base::base::GlobalInstance; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::Result; +use databend_common_meta_app::schema::CreateTableReply; +use databend_common_meta_app::schema::DropTableReply; +use databend_common_sql::plans::CreateStreamPlan; +use databend_common_sql::plans::DropStreamPlan; #[async_trait::async_trait] pub trait StreamHandler: Sync + Send { diff --git a/src/query/ee_features/vacuum_handler/Cargo.toml b/src/query/ee_features/vacuum_handler/Cargo.toml index cbbbc345c931..1ffc6814f7f5 100644 --- a/src/query/ee_features/vacuum_handler/Cargo.toml +++ b/src/query/ee_features/vacuum_handler/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "vacuum-handler" +name = "databend-enterprise-vacuum-handler" description = "vacuum handler" version = { workspace = true } authors = { workspace = true } @@ -13,10 +13,10 @@ test = false [dependencies] # Workspace dependencies -common-base = { path = "../../../common/base" } -common-catalog = { path = "../../catalog" } -common-exception = { path = "../../../common/exception" } -common-storages-fuse = { path = "../../storages/fuse" } +databend-common-base = { path = "../../../common/base" } +databend-common-catalog = { path = "../../catalog" } +databend-common-exception = { path = "../../../common/exception" } +databend-common-storages-fuse = { path = "../../storages/fuse" } async-backtrace = { workspace = true } async-trait = { workspace = true } diff --git a/src/query/ee_features/vacuum_handler/src/vacuum_handler.rs b/src/query/ee_features/vacuum_handler/src/vacuum_handler.rs index 0430e3dc723a..e1d8f3406631 100644 --- a/src/query/ee_features/vacuum_handler/src/vacuum_handler.rs +++ b/src/query/ee_features/vacuum_handler/src/vacuum_handler.rs @@ -16,11 +16,11 @@ use std::sync::Arc; use chrono::DateTime; use chrono::Utc; -use common_base::base::GlobalInstance; -use common_catalog::table::Table; -use common_catalog::table_context::TableContext; -use common_exception::Result; -use common_storages_fuse::FuseTable; +use databend_common_base::base::GlobalInstance; +use databend_common_catalog::table::Table; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::Result; +use databend_common_storages_fuse::FuseTable; #[async_trait::async_trait] pub trait VacuumHandler: Sync + Send { diff --git a/src/query/ee_features/virtual_column/Cargo.toml b/src/query/ee_features/virtual_column/Cargo.toml index ecc8475cb802..4641f2889e29 100644 --- a/src/query/ee_features/virtual_column/Cargo.toml +++ b/src/query/ee_features/virtual_column/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "virtual-column" +name = "databend-enterprise-virtual-column" description = "virtual column handler" version = { workspace = true } authors = { workspace = true } @@ -13,12 +13,12 @@ test = false [dependencies] # Workspace dependencies -common-base = { path = "../../../common/base" } -common-catalog = { path = "../../catalog" } -common-exception = { path = "../../../common/exception" } -common-meta-app = { path = "../../../meta/app" } -common-storages-fuse = { path = "../../storages/fuse" } -storages-common-table-meta = { path = "../../storages/common/table_meta" } +databend-common-base = { path = "../../../common/base" } +databend-common-catalog = { path = "../../catalog" } +databend-common-exception = { path = "../../../common/exception" } +databend-common-meta-app = { path = "../../../meta/app" } +databend-common-storages-fuse = { path = "../../storages/fuse" } +databend-storages-common-table-meta = { path = "../../storages/common/table_meta" } async-backtrace = { workspace = true } async-trait = { workspace = true } diff --git a/src/query/ee_features/virtual_column/src/virtual_column.rs b/src/query/ee_features/virtual_column/src/virtual_column.rs index 30f4ef0b9297..a3547a16e4e0 100644 --- a/src/query/ee_features/virtual_column/src/virtual_column.rs +++ b/src/query/ee_features/virtual_column/src/virtual_column.rs @@ -14,20 +14,20 @@ use std::sync::Arc; -use common_base::base::GlobalInstance; -use common_catalog::catalog::Catalog; -use common_catalog::table_context::TableContext; -use common_exception::Result; -use common_meta_app::schema::CreateVirtualColumnReply; -use common_meta_app::schema::CreateVirtualColumnReq; -use common_meta_app::schema::DropVirtualColumnReply; -use common_meta_app::schema::DropVirtualColumnReq; -use common_meta_app::schema::ListVirtualColumnsReq; -use common_meta_app::schema::UpdateVirtualColumnReply; -use common_meta_app::schema::UpdateVirtualColumnReq; -use common_meta_app::schema::VirtualColumnMeta; -use common_storages_fuse::FuseTable; -use storages_common_table_meta::meta::Location; +use databend_common_base::base::GlobalInstance; +use databend_common_catalog::catalog::Catalog; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::Result; +use databend_common_meta_app::schema::CreateVirtualColumnReply; +use databend_common_meta_app::schema::CreateVirtualColumnReq; +use databend_common_meta_app::schema::DropVirtualColumnReply; +use databend_common_meta_app::schema::DropVirtualColumnReq; +use databend_common_meta_app::schema::ListVirtualColumnsReq; +use databend_common_meta_app::schema::UpdateVirtualColumnReply; +use databend_common_meta_app::schema::UpdateVirtualColumnReq; +use databend_common_meta_app::schema::VirtualColumnMeta; +use databend_common_storages_fuse::FuseTable; +use databend_storages_common_table_meta::meta::Location; #[async_trait::async_trait] pub trait VirtualColumnHandler: Sync + Send { diff --git a/src/query/expression/Cargo.toml b/src/query/expression/Cargo.toml index c9a4645456c5..326ba470a490 100755 --- a/src/query/expression/Cargo.toml +++ b/src/query/expression/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "common-expression" +name = "databend-common-expression" version = { workspace = true } authors = { workspace = true } license = { workspace = true } @@ -11,11 +11,11 @@ test = false [dependencies] # In alphabetical order # Workspace dependencies -common-arrow = { path = "../../common/arrow" } -common-datavalues = { path = "../datavalues" } -common-exception = { path = "../../common/exception" } -common-hashtable = { path = "../../common/hashtable" } -common-io = { path = "../../common/io" } +databend-common-arrow = { path = "../../common/arrow" } +databend-common-datavalues = { path = "../datavalues" } +databend-common-exception = { path = "../../common/exception" } +databend-common-hashtable = { path = "../../common/hashtable" } +databend-common-io = { path = "../../common/io" } # GitHub dependencies @@ -56,7 +56,7 @@ unicode-segmentation = "1.10.1" [dev-dependencies] arrow-ord = { workspace = true } -common-ast = { path = "../ast" } +databend-common-ast = { path = "../ast" } goldenfile = "1.4" pretty_assertions = "1.3.0" rand = { workspace = true } diff --git a/src/query/expression/src/aggregate/aggregate_function.rs b/src/query/expression/src/aggregate/aggregate_function.rs index 405a35379955..0a52a670595a 100755 --- a/src/query/expression/src/aggregate/aggregate_function.rs +++ b/src/query/expression/src/aggregate/aggregate_function.rs @@ -16,8 +16,8 @@ use std::alloc::Layout; use std::fmt; use std::sync::Arc; -use common_arrow::arrow::bitmap::Bitmap; -use common_exception::Result; +use databend_common_arrow::arrow::bitmap::Bitmap; +use databend_common_exception::Result; use super::StateAddr; use crate::types::string::StringColumnBuilder; diff --git a/src/query/expression/src/aggregate/aggregate_function_state.rs b/src/query/expression/src/aggregate/aggregate_function_state.rs index 655604737128..6e20b194f424 100644 --- a/src/query/expression/src/aggregate/aggregate_function_state.rs +++ b/src/query/expression/src/aggregate/aggregate_function_state.rs @@ -15,8 +15,8 @@ use std::alloc::Layout; use std::ptr::NonNull; -use common_exception::ErrorCode; -use common_exception::Result; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; use super::AggregateFunctionRef; diff --git a/src/query/expression/src/aggregate/aggregate_hashtable.rs b/src/query/expression/src/aggregate/aggregate_hashtable.rs index ffb674bf17bc..f005fb722624 100644 --- a/src/query/expression/src/aggregate/aggregate_hashtable.rs +++ b/src/query/expression/src/aggregate/aggregate_hashtable.rs @@ -16,7 +16,7 @@ use std::sync::Arc; -use common_exception::Result; +use databend_common_exception::Result; use super::payload::Payload; use super::payload_flush::PayloadFlushState; diff --git a/src/query/expression/src/aggregate/group_hash.rs b/src/query/expression/src/aggregate/group_hash.rs index 129f79d4545d..1b7d44df1cee 100644 --- a/src/query/expression/src/aggregate/group_hash.rs +++ b/src/query/expression/src/aggregate/group_hash.rs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_hashtable::FastHash; +use databend_common_hashtable::FastHash; use ethnum::i256; use crate::types::decimal::DecimalType; diff --git a/src/query/expression/src/aggregate/payload_row.rs b/src/query/expression/src/aggregate/payload_row.rs index ffe92e85eaf0..37202ff62f8f 100644 --- a/src/query/expression/src/aggregate/payload_row.rs +++ b/src/query/expression/src/aggregate/payload_row.rs @@ -13,7 +13,7 @@ // limitations under the License. use bumpalo::Bump; -use common_arrow::arrow::bitmap::Bitmap; +use databend_common_arrow::arrow::bitmap::Bitmap; use ethnum::i256; use crate::load; diff --git a/src/query/expression/src/block.rs b/src/query/expression/src/block.rs index 383e344d8c22..1e46884df4bd 100644 --- a/src/query/expression/src/block.rs +++ b/src/query/expression/src/block.rs @@ -17,11 +17,11 @@ use std::collections::HashSet; use std::fmt::Debug; use std::ops::Range; -use common_arrow::arrow::array::Array; -use common_arrow::arrow::chunk::Chunk as ArrowChunk; -use common_arrow::ArrayRef; -use common_exception::ErrorCode; -use common_exception::Result; +use databend_common_arrow::arrow::array::Array; +use databend_common_arrow::arrow::chunk::Chunk as ArrowChunk; +use databend_common_arrow::ArrayRef; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; use crate::schema::DataSchema; use crate::types::AnyType; diff --git a/src/query/expression/src/convert_arrow_rs/array.rs b/src/query/expression/src/convert_arrow_rs/array.rs index 7206db76b521..31aecb0764f4 100644 --- a/src/query/expression/src/convert_arrow_rs/array.rs +++ b/src/query/expression/src/convert_arrow_rs/array.rs @@ -28,7 +28,7 @@ impl Column { } pub fn from_arrow_rs(array: Arc, field: &DataField) -> Result { - let arrow2_array: Box = array.into(); + let arrow2_array: Box = array.into(); Ok(Column::from_arrow(arrow2_array.as_ref(), field.data_type())) } diff --git a/src/query/expression/src/converts/from.rs b/src/query/expression/src/converts/from.rs index 6924883b5979..93a6b13508b8 100644 --- a/src/query/expression/src/converts/from.rs +++ b/src/query/expression/src/converts/from.rs @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_datavalues::DataTypeImpl; -use common_datavalues::DataValue; +use databend_common_datavalues::DataTypeImpl; +use databend_common_datavalues::DataValue; use crate::types::number::NumberScalar; use crate::types::*; @@ -73,7 +73,7 @@ pub fn from_type(datatype: &DataTypeImpl) -> TableDataType { } } -pub fn from_schema(schema: &common_datavalues::DataSchema) -> TableSchema { +pub fn from_schema(schema: &databend_common_datavalues::DataSchema) -> TableSchema { let fields = schema .fields() .iter() diff --git a/src/query/expression/src/converts/to.rs b/src/query/expression/src/converts/to.rs index 992dfa7a9158..d00683c44fdf 100644 --- a/src/query/expression/src/converts/to.rs +++ b/src/query/expression/src/converts/to.rs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_datavalues::DataValue; +use databend_common_datavalues::DataValue; use ordered_float::OrderedFloat; use crate::Scalar; diff --git a/src/query/expression/src/evaluator.rs b/src/query/expression/src/evaluator.rs index 2482064ace82..82145643d517 100644 --- a/src/query/expression/src/evaluator.rs +++ b/src/query/expression/src/evaluator.rs @@ -15,12 +15,12 @@ use std::collections::HashMap; use std::ops::Not; -use common_arrow::arrow::bitmap; -use common_arrow::arrow::bitmap::Bitmap; -use common_arrow::arrow::bitmap::MutableBitmap; -use common_exception::ErrorCode; -use common_exception::Result; -use common_exception::Span; +use databend_common_arrow::arrow::bitmap; +use databend_common_arrow::arrow::bitmap::Bitmap; +use databend_common_arrow::arrow::bitmap::MutableBitmap; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_exception::Span; use itertools::Itertools; use log::error; diff --git a/src/query/expression/src/expression.rs b/src/query/expression/src/expression.rs index ea9766a665db..9cab633d49c1 100644 --- a/src/query/expression/src/expression.rs +++ b/src/query/expression/src/expression.rs @@ -17,7 +17,7 @@ use std::fmt::Debug; use std::hash::Hash; use std::sync::Arc; -use common_exception::Span; +use databend_common_exception::Span; use educe::Educe; use enum_as_inner::EnumAsInner; use serde::Deserialize; diff --git a/src/query/expression/src/function.rs b/src/query/expression/src/function.rs index 8e2ea3019eb8..cc9aa9b4ca13 100755 --- a/src/query/expression/src/function.rs +++ b/src/query/expression/src/function.rs @@ -19,11 +19,11 @@ use std::ops::BitOr; use std::ops::Not; use std::sync::Arc; -use common_arrow::arrow::bitmap::Bitmap; -use common_arrow::arrow::bitmap::MutableBitmap; -use common_exception::ErrorCode; -use common_exception::Result; -use common_exception::Span; +use databend_common_arrow::arrow::bitmap::Bitmap; +use databend_common_arrow::arrow::bitmap::MutableBitmap; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_exception::Span; use enum_as_inner::EnumAsInner; use itertools::Itertools; use serde::Deserialize; @@ -650,8 +650,10 @@ where F: Fn(&[ValueRef], &mut EvalContext) -> Value { let result = match column { Column::Nullable(box nullable_column) => { let validity = bitmap.into(); - let validity = - common_arrow::arrow::bitmap::and(&nullable_column.validity, &validity); + let validity = databend_common_arrow::arrow::bitmap::and( + &nullable_column.validity, + &validity, + ); Column::Nullable(Box::new(NullableColumn { column: nullable_column.column, validity, diff --git a/src/query/expression/src/kernels/concat.rs b/src/query/expression/src/kernels/concat.rs index 1d2ea5472e7d..6d198a2e21c1 100644 --- a/src/query/expression/src/kernels/concat.rs +++ b/src/query/expression/src/kernels/concat.rs @@ -15,10 +15,10 @@ use std::iter::TrustedLen; use std::sync::Arc; -use common_arrow::arrow::bitmap::Bitmap; -use common_arrow::arrow::buffer::Buffer; -use common_exception::ErrorCode; -use common_exception::Result; +use databend_common_arrow::arrow::bitmap::Bitmap; +use databend_common_arrow::arrow::buffer::Buffer; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; use itertools::Itertools; use crate::kernels::take::BIT_MASK; diff --git a/src/query/expression/src/kernels/filter.rs b/src/query/expression/src/kernels/filter.rs index faa265c35938..c5aef299f3df 100644 --- a/src/query/expression/src/kernels/filter.rs +++ b/src/query/expression/src/kernels/filter.rs @@ -14,11 +14,11 @@ use std::sync::Arc; -use common_arrow::arrow::bitmap::utils::BitChunkIterExact; -use common_arrow::arrow::bitmap::utils::BitChunksExact; -use common_arrow::arrow::bitmap::Bitmap; -use common_arrow::arrow::buffer::Buffer; -use common_exception::Result; +use databend_common_arrow::arrow::bitmap::utils::BitChunkIterExact; +use databend_common_arrow::arrow::bitmap::utils::BitChunksExact; +use databend_common_arrow::arrow::bitmap::Bitmap; +use databend_common_arrow::arrow::buffer::Buffer; +use databend_common_exception::Result; use crate::kernels::take::BIT_MASK; use crate::kernels::utils::copy_advance_aligned; diff --git a/src/query/expression/src/kernels/group_by.rs b/src/query/expression/src/kernels/group_by.rs index 9db18751585d..a987ceb4b118 100644 --- a/src/query/expression/src/kernels/group_by.rs +++ b/src/query/expression/src/kernels/group_by.rs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_exception::Result; +use databend_common_exception::Result; use super::group_by_hash::HashMethodKeysU16; use super::group_by_hash::HashMethodKeysU32; diff --git a/src/query/expression/src/kernels/group_by_hash/method.rs b/src/query/expression/src/kernels/group_by_hash/method.rs index 25a98472982d..dbaf5fff7a14 100644 --- a/src/query/expression/src/kernels/group_by_hash/method.rs +++ b/src/query/expression/src/kernels/group_by_hash/method.rs @@ -16,10 +16,10 @@ use std::fmt::Debug; use std::iter::TrustedLen; use std::ptr::NonNull; -use common_arrow::arrow::buffer::Buffer; -use common_exception::Result; -use common_hashtable::DictionaryKeys; -use common_hashtable::FastHash; +use databend_common_arrow::arrow::buffer::Buffer; +use databend_common_exception::Result; +use databend_common_hashtable::DictionaryKeys; +use databend_common_hashtable::FastHash; use ethnum::i256; use ethnum::u256; diff --git a/src/query/expression/src/kernels/group_by_hash/method_dict_serializer.rs b/src/query/expression/src/kernels/group_by_hash/method_dict_serializer.rs index a014a6a38e8c..4986ae9c63c2 100644 --- a/src/query/expression/src/kernels/group_by_hash/method_dict_serializer.rs +++ b/src/query/expression/src/kernels/group_by_hash/method_dict_serializer.rs @@ -14,9 +14,9 @@ use std::ptr::NonNull; -use common_exception::Result; -use common_hashtable::DictionaryKeys; -use common_hashtable::FastHash; +use databend_common_exception::Result; +use databend_common_hashtable::DictionaryKeys; +use databend_common_hashtable::FastHash; use super::utils::serialize_group_columns; use crate::types::DataType; diff --git a/src/query/expression/src/kernels/group_by_hash/method_fixed_keys.rs b/src/query/expression/src/kernels/group_by_hash/method_fixed_keys.rs index 11076b257080..2c665dedb815 100644 --- a/src/query/expression/src/kernels/group_by_hash/method_fixed_keys.rs +++ b/src/query/expression/src/kernels/group_by_hash/method_fixed_keys.rs @@ -16,11 +16,11 @@ use std::fmt::Debug; use std::marker::PhantomData; use std::ops::Not; -use common_arrow::arrow::bitmap::Bitmap; -use common_arrow::arrow::buffer::Buffer; -use common_exception::ErrorCode; -use common_exception::Result; -use common_hashtable::FastHash; +use databend_common_arrow::arrow::bitmap::Bitmap; +use databend_common_arrow::arrow::buffer::Buffer; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_hashtable::FastHash; use ethnum::i256; use ethnum::u256; use ethnum::U256; diff --git a/src/query/expression/src/kernels/group_by_hash/method_serializer.rs b/src/query/expression/src/kernels/group_by_hash/method_serializer.rs index 49d6350b0f25..850c80e31dee 100644 --- a/src/query/expression/src/kernels/group_by_hash/method_serializer.rs +++ b/src/query/expression/src/kernels/group_by_hash/method_serializer.rs @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_exception::Result; -use common_hashtable::hash_join_fast_string_hash; +use databend_common_exception::Result; +use databend_common_hashtable::hash_join_fast_string_hash; use super::utils::serialize_group_columns; use crate::types::string::StringIterator; diff --git a/src/query/expression/src/kernels/group_by_hash/method_single_string.rs b/src/query/expression/src/kernels/group_by_hash/method_single_string.rs index ac64530dff43..9b1675994a06 100644 --- a/src/query/expression/src/kernels/group_by_hash/method_single_string.rs +++ b/src/query/expression/src/kernels/group_by_hash/method_single_string.rs @@ -12,9 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_arrow::arrow::buffer::Buffer; -use common_exception::Result; -use common_hashtable::hash_join_fast_string_hash; +use databend_common_arrow::arrow::buffer::Buffer; +use databend_common_exception::Result; +use databend_common_hashtable::hash_join_fast_string_hash; use crate::types::string::StringIterator; use crate::types::DataType; diff --git a/src/query/expression/src/kernels/scatter.rs b/src/query/expression/src/kernels/scatter.rs index 4e4f4ac0fc48..11d4ffbea53f 100644 --- a/src/query/expression/src/kernels/scatter.rs +++ b/src/query/expression/src/kernels/scatter.rs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_exception::Result; +use databend_common_exception::Result; use itertools::Itertools; use crate::kernels::utils::set_vec_len_by_ptr; @@ -21,7 +21,7 @@ use crate::DataBlock; impl DataBlock { pub fn scatter(&self, indices: &[I], scatter_size: usize) -> Result> - where I: common_arrow::arrow::types::Index { + where I: databend_common_arrow::arrow::types::Index { if indices.is_empty() { let mut result = Vec::with_capacity(scatter_size); result.push(self.clone()); @@ -58,7 +58,7 @@ impl DataBlock { } pub fn divide_indices_by_scatter_size(indices: &[I], scatter_size: usize) -> Vec> - where I: common_arrow::arrow::types::Index { + where I: databend_common_arrow::arrow::types::Index { let mut scatter_indices: Vec> = Vec::with_capacity(scatter_size); unsafe { let mut scatter_num_rows = vec![0usize; scatter_size]; diff --git a/src/query/expression/src/kernels/sort.rs b/src/query/expression/src/kernels/sort.rs index 3bf3181023cb..f163f41882fa 100644 --- a/src/query/expression/src/kernels/sort.rs +++ b/src/query/expression/src/kernels/sort.rs @@ -16,18 +16,18 @@ use std::cmp::Ordering; use std::iter::once; use std::sync::Arc; -use common_arrow::arrow::array::ord as arrow_ord; -use common_arrow::arrow::array::ord::DynComparator; -use common_arrow::arrow::array::Array; -use common_arrow::arrow::array::PrimitiveArray; -use common_arrow::arrow::compute::merge_sort as arrow_merge_sort; -use common_arrow::arrow::compute::merge_sort::build_comparator_impl; -use common_arrow::arrow::compute::sort as arrow_sort; -use common_arrow::arrow::datatypes::DataType as ArrowType; -use common_arrow::arrow::error::Error as ArrowError; -use common_arrow::arrow::error::Result as ArrowResult; -use common_exception::ErrorCode; -use common_exception::Result; +use databend_common_arrow::arrow::array::ord as arrow_ord; +use databend_common_arrow::arrow::array::ord::DynComparator; +use databend_common_arrow::arrow::array::Array; +use databend_common_arrow::arrow::array::PrimitiveArray; +use databend_common_arrow::arrow::compute::merge_sort as arrow_merge_sort; +use databend_common_arrow::arrow::compute::merge_sort::build_comparator_impl; +use databend_common_arrow::arrow::compute::sort as arrow_sort; +use databend_common_arrow::arrow::datatypes::DataType as ArrowType; +use databend_common_arrow::arrow::error::Error as ArrowError; +use databend_common_arrow::arrow::error::Result as ArrowResult; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; use crate::types::DataType; use crate::utils::arrow::column_to_arrow_array; @@ -230,12 +230,16 @@ fn compare_null() -> ArrowResult { fn compare_decimal256(left: &dyn Array, right: &dyn Array) -> ArrowResult { let left = left .as_any() - .downcast_ref::>() + .downcast_ref::>() .unwrap() .clone(); let right = right .as_any() - .downcast_ref::>() + .downcast_ref::>() .unwrap() .clone(); diff --git a/src/query/expression/src/kernels/take.rs b/src/query/expression/src/kernels/take.rs index 57445755f3a7..65a770766491 100644 --- a/src/query/expression/src/kernels/take.rs +++ b/src/query/expression/src/kernels/take.rs @@ -14,9 +14,9 @@ use std::sync::Arc; -use common_arrow::arrow::bitmap::Bitmap; -use common_arrow::arrow::buffer::Buffer; -use common_exception::Result; +use databend_common_arrow::arrow::bitmap::Bitmap; +use databend_common_arrow::arrow::buffer::Buffer; +use databend_common_exception::Result; use crate::kernels::utils::copy_advance_aligned; use crate::kernels::utils::set_vec_len_by_ptr; @@ -54,7 +54,7 @@ impl DataBlock { string_items_buf: &mut Option>, ) -> Result where - I: common_arrow::arrow::types::Index, + I: databend_common_arrow::arrow::types::Index, { if indices.is_empty() { return Ok(self.slice(0..0)); @@ -84,7 +84,7 @@ impl DataBlock { impl Column { pub fn take(&self, indices: &[I], string_items_buf: &mut Option>) -> Self - where I: common_arrow::arrow::types::Index { + where I: databend_common_arrow::arrow::types::Index { match self { Column::Null { .. } => Column::Null { len: indices.len() }, Column::EmptyArray { .. } => Column::EmptyArray { len: indices.len() }, @@ -190,7 +190,7 @@ impl Column { pub fn take_primitive_types(col: &Buffer, indices: &[I]) -> Vec where T: Copy, - I: common_arrow::arrow::types::Index, + I: databend_common_arrow::arrow::types::Index, { let num_rows = indices.len(); let mut builder: Vec = Vec::with_capacity(num_rows); @@ -209,7 +209,7 @@ impl Column { string_items_buf: Option<&mut Vec<(u64, usize)>>, ) -> StringColumn where - I: common_arrow::arrow::types::Index, + I: databend_common_arrow::arrow::types::Index, { let num_rows = indices.len(); @@ -260,7 +260,7 @@ impl Column { } pub fn take_boolean_types(col: &Bitmap, indices: &[I]) -> Bitmap - where I: common_arrow::arrow::types::Index { + where I: databend_common_arrow::arrow::types::Index { let num_rows = indices.len(); // Fast path: avoid iterating column to generate a new bitmap. // If this [`Bitmap`] is all true or all false and `num_rows <= bitmap.len()``, @@ -309,7 +309,7 @@ impl Column { indices: &[I], ) -> Column where - I: common_arrow::arrow::types::Index, + I: databend_common_arrow::arrow::types::Index, { for index in indices { T::push_item(&mut builder, unsafe { diff --git a/src/query/expression/src/kernels/take_chunks.rs b/src/query/expression/src/kernels/take_chunks.rs index 5cfa29c9f89c..6ff0d1ca9756 100644 --- a/src/query/expression/src/kernels/take_chunks.rs +++ b/src/query/expression/src/kernels/take_chunks.rs @@ -14,10 +14,10 @@ use std::sync::Arc; -use common_arrow::arrow::bitmap::Bitmap; -use common_arrow::arrow::buffer::Buffer; -use common_arrow::arrow::compute::merge_sort::MergeSlice; -use common_hashtable::RowPtr; +use databend_common_arrow::arrow::bitmap::Bitmap; +use databend_common_arrow::arrow::buffer::Buffer; +use databend_common_arrow::arrow::compute::merge_sort::MergeSlice; +use databend_common_hashtable::RowPtr; use itertools::Itertools; use crate::kernels::take::BIT_MASK; diff --git a/src/query/expression/src/kernels/take_compact.rs b/src/query/expression/src/kernels/take_compact.rs index 2643a06418d3..11ed8af80aca 100644 --- a/src/query/expression/src/kernels/take_compact.rs +++ b/src/query/expression/src/kernels/take_compact.rs @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_arrow::arrow::buffer::Buffer; -use common_exception::Result; +use databend_common_arrow::arrow::buffer::Buffer; +use databend_common_exception::Result; use crate::kernels::utils::copy_advance_aligned; use crate::kernels::utils::set_vec_len_by_ptr; diff --git a/src/query/expression/src/kernels/take_ranges.rs b/src/query/expression/src/kernels/take_ranges.rs index f6d920966a08..5f2bb3ae79d6 100644 --- a/src/query/expression/src/kernels/take_ranges.rs +++ b/src/query/expression/src/kernels/take_ranges.rs @@ -15,9 +15,9 @@ use core::ops::Range; use std::sync::Arc; -use common_arrow::arrow::bitmap::Bitmap; -use common_arrow::arrow::buffer::Buffer; -use common_exception::Result; +use databend_common_arrow::arrow::bitmap::Bitmap; +use databend_common_arrow::arrow::buffer::Buffer; +use databend_common_exception::Result; use crate::kernels::take::BIT_MASK; use crate::kernels::utils::copy_advance_aligned; diff --git a/src/query/expression/src/kernels/topk.rs b/src/query/expression/src/kernels/topk.rs index c48c5641345a..ac97383c6b1c 100644 --- a/src/query/expression/src/kernels/topk.rs +++ b/src/query/expression/src/kernels/topk.rs @@ -18,7 +18,7 @@ use std::intrinsics::assume; use std::mem; use std::ptr; -use common_arrow::arrow::bitmap::MutableBitmap; +use databend_common_arrow::arrow::bitmap::MutableBitmap; use crate::types::*; use crate::with_number_mapped_type; diff --git a/src/query/expression/src/register.rs b/src/query/expression/src/register.rs index f17c91e7e0b8..6f9f2519414e 100755 --- a/src/query/expression/src/register.rs +++ b/src/query/expression/src/register.rs @@ -3518,7 +3518,8 @@ pub fn passthrough_nullable_2_arg( Value::Column(NullableColumn { column, validity }) } (ValueRef::Column(arg1), ValueRef::Column(arg2)) => { - let and_validity = common_arrow::arrow::bitmap::and(&arg1.validity, &arg2.validity); + let and_validity = + databend_common_arrow::arrow::bitmap::and(&arg1.validity, &arg2.validity); let validity = ctx .validity .as_ref() @@ -3611,7 +3612,8 @@ pub fn passthrough_nullable_3_arg { - let and_validity = common_arrow::arrow::bitmap::and(&arg1.validity, &arg2.validity); + let and_validity = + databend_common_arrow::arrow::bitmap::and(&arg1.validity, &arg2.validity); let validity = ctx .validity .as_ref() @@ -3647,7 +3649,8 @@ pub fn passthrough_nullable_3_arg { - let and_validity = common_arrow::arrow::bitmap::and(&arg1.validity, &arg3.validity); + let and_validity = + databend_common_arrow::arrow::bitmap::and(&arg1.validity, &arg3.validity); let validity = ctx .validity .as_ref() @@ -3665,7 +3668,8 @@ pub fn passthrough_nullable_3_arg { - let and_validity = common_arrow::arrow::bitmap::and(&arg2.validity, &arg3.validity); + let and_validity = + databend_common_arrow::arrow::bitmap::and(&arg2.validity, &arg3.validity); let validity = ctx .validity .as_ref() @@ -3683,8 +3687,8 @@ pub fn passthrough_nullable_3_arg { - let and_validity = common_arrow::arrow::bitmap::and( - &common_arrow::arrow::bitmap::and(&arg1.validity, &arg2.validity), + let and_validity = databend_common_arrow::arrow::bitmap::and( + &databend_common_arrow::arrow::bitmap::and(&arg1.validity, &arg2.validity), &arg3.validity, ); let validity = ctx @@ -3808,7 +3812,8 @@ pub fn passthrough_nullable_4_arg< ValueRef::Scalar(Some(arg3)), ValueRef::Scalar(Some(arg4)), ) => { - let and_validity = common_arrow::arrow::bitmap::and(&arg1.validity, &arg2.validity); + let and_validity = + databend_common_arrow::arrow::bitmap::and(&arg1.validity, &arg2.validity); let validity = ctx .validity .as_ref() @@ -3856,7 +3861,8 @@ pub fn passthrough_nullable_4_arg< ValueRef::Column(arg3), ValueRef::Scalar(Some(arg4)), ) => { - let and_validity = common_arrow::arrow::bitmap::and(&arg1.validity, &arg3.validity); + let and_validity = + databend_common_arrow::arrow::bitmap::and(&arg1.validity, &arg3.validity); let validity = ctx .validity .as_ref() @@ -3880,7 +3886,8 @@ pub fn passthrough_nullable_4_arg< ValueRef::Column(arg3), ValueRef::Scalar(Some(arg4)), ) => { - let and_validity = common_arrow::arrow::bitmap::and(&arg2.validity, &arg3.validity); + let and_validity = + databend_common_arrow::arrow::bitmap::and(&arg2.validity, &arg3.validity); let validity = ctx .validity .as_ref() @@ -3904,8 +3911,8 @@ pub fn passthrough_nullable_4_arg< ValueRef::Column(arg3), ValueRef::Scalar(Some(arg4)), ) => { - let and_validity = common_arrow::arrow::bitmap::and( - &common_arrow::arrow::bitmap::and(&arg1.validity, &arg2.validity), + let and_validity = databend_common_arrow::arrow::bitmap::and( + &databend_common_arrow::arrow::bitmap::and(&arg1.validity, &arg2.validity), &arg3.validity, ); let validity = ctx @@ -3955,7 +3962,8 @@ pub fn passthrough_nullable_4_arg< ValueRef::Scalar(Some(arg3)), ValueRef::Column(arg4), ) => { - let and_validity = common_arrow::arrow::bitmap::and(&arg1.validity, &arg4.validity); + let and_validity = + databend_common_arrow::arrow::bitmap::and(&arg1.validity, &arg4.validity); let validity = ctx .validity .as_ref() @@ -3979,7 +3987,8 @@ pub fn passthrough_nullable_4_arg< ValueRef::Scalar(Some(arg3)), ValueRef::Column(arg4), ) => { - let and_validity = common_arrow::arrow::bitmap::and(&arg2.validity, &arg4.validity); + let and_validity = + databend_common_arrow::arrow::bitmap::and(&arg2.validity, &arg4.validity); let validity = ctx .validity .as_ref() @@ -4003,8 +4012,8 @@ pub fn passthrough_nullable_4_arg< ValueRef::Scalar(Some(arg3)), ValueRef::Column(arg4), ) => { - let and_validity = common_arrow::arrow::bitmap::and( - &common_arrow::arrow::bitmap::and(&arg1.validity, &arg2.validity), + let and_validity = databend_common_arrow::arrow::bitmap::and( + &databend_common_arrow::arrow::bitmap::and(&arg1.validity, &arg2.validity), &arg4.validity, ); let validity = ctx @@ -4030,7 +4039,8 @@ pub fn passthrough_nullable_4_arg< ValueRef::Column(arg3), ValueRef::Column(arg4), ) => { - let and_validity = common_arrow::arrow::bitmap::and(&arg3.validity, &arg4.validity); + let and_validity = + databend_common_arrow::arrow::bitmap::and(&arg3.validity, &arg4.validity); let validity = ctx .validity .as_ref() @@ -4054,8 +4064,8 @@ pub fn passthrough_nullable_4_arg< ValueRef::Column(arg3), ValueRef::Column(arg4), ) => { - let and_validity = common_arrow::arrow::bitmap::and( - &common_arrow::arrow::bitmap::and(&arg1.validity, &arg3.validity), + let and_validity = databend_common_arrow::arrow::bitmap::and( + &databend_common_arrow::arrow::bitmap::and(&arg1.validity, &arg3.validity), &arg4.validity, ); let validity = ctx @@ -4081,8 +4091,8 @@ pub fn passthrough_nullable_4_arg< ValueRef::Column(arg3), ValueRef::Column(arg4), ) => { - let and_validity = common_arrow::arrow::bitmap::and( - &common_arrow::arrow::bitmap::and(&arg2.validity, &arg3.validity), + let and_validity = databend_common_arrow::arrow::bitmap::and( + &databend_common_arrow::arrow::bitmap::and(&arg2.validity, &arg3.validity), &arg4.validity, ); let validity = ctx @@ -4108,9 +4118,9 @@ pub fn passthrough_nullable_4_arg< ValueRef::Column(arg3), ValueRef::Column(arg4), ) => { - let and_validity = common_arrow::arrow::bitmap::and( - &common_arrow::arrow::bitmap::and( - &common_arrow::arrow::bitmap::and(&arg1.validity, &arg2.validity), + let and_validity = databend_common_arrow::arrow::bitmap::and( + &databend_common_arrow::arrow::bitmap::and( + &databend_common_arrow::arrow::bitmap::and(&arg1.validity, &arg2.validity), &arg3.validity, ), &arg4.validity, @@ -4248,7 +4258,8 @@ pub fn passthrough_nullable_5_arg< ValueRef::Scalar(Some(arg4)), ValueRef::Scalar(Some(arg5)), ) => { - let and_validity = common_arrow::arrow::bitmap::and(&arg1.validity, &arg2.validity); + let and_validity = + databend_common_arrow::arrow::bitmap::and(&arg1.validity, &arg2.validity); let validity = ctx .validity .as_ref() @@ -4300,7 +4311,8 @@ pub fn passthrough_nullable_5_arg< ValueRef::Scalar(Some(arg4)), ValueRef::Scalar(Some(arg5)), ) => { - let and_validity = common_arrow::arrow::bitmap::and(&arg1.validity, &arg3.validity); + let and_validity = + databend_common_arrow::arrow::bitmap::and(&arg1.validity, &arg3.validity); let validity = ctx .validity .as_ref() @@ -4326,7 +4338,8 @@ pub fn passthrough_nullable_5_arg< ValueRef::Scalar(Some(arg4)), ValueRef::Scalar(Some(arg5)), ) => { - let and_validity = common_arrow::arrow::bitmap::and(&arg2.validity, &arg3.validity); + let and_validity = + databend_common_arrow::arrow::bitmap::and(&arg2.validity, &arg3.validity); let validity = ctx .validity .as_ref() @@ -4352,8 +4365,8 @@ pub fn passthrough_nullable_5_arg< ValueRef::Scalar(Some(arg4)), ValueRef::Scalar(Some(arg5)), ) => { - let and_validity = common_arrow::arrow::bitmap::and( - &common_arrow::arrow::bitmap::and(&arg1.validity, &arg2.validity), + let and_validity = databend_common_arrow::arrow::bitmap::and( + &databend_common_arrow::arrow::bitmap::and(&arg1.validity, &arg2.validity), &arg3.validity, ); let validity = ctx @@ -4407,7 +4420,8 @@ pub fn passthrough_nullable_5_arg< ValueRef::Column(arg4), ValueRef::Scalar(Some(arg5)), ) => { - let and_validity = common_arrow::arrow::bitmap::and(&arg1.validity, &arg4.validity); + let and_validity = + databend_common_arrow::arrow::bitmap::and(&arg1.validity, &arg4.validity); let validity = ctx .validity .as_ref() @@ -4433,7 +4447,8 @@ pub fn passthrough_nullable_5_arg< ValueRef::Column(arg4), ValueRef::Scalar(Some(arg5)), ) => { - let and_validity = common_arrow::arrow::bitmap::and(&arg2.validity, &arg4.validity); + let and_validity = + databend_common_arrow::arrow::bitmap::and(&arg2.validity, &arg4.validity); let validity = ctx .validity .as_ref() @@ -4459,8 +4474,8 @@ pub fn passthrough_nullable_5_arg< ValueRef::Column(arg4), ValueRef::Scalar(Some(arg5)), ) => { - let and_validity = common_arrow::arrow::bitmap::and( - &common_arrow::arrow::bitmap::and(&arg1.validity, &arg2.validity), + let and_validity = databend_common_arrow::arrow::bitmap::and( + &databend_common_arrow::arrow::bitmap::and(&arg1.validity, &arg2.validity), &arg4.validity, ); let validity = ctx @@ -4488,7 +4503,8 @@ pub fn passthrough_nullable_5_arg< ValueRef::Column(arg4), ValueRef::Scalar(Some(arg5)), ) => { - let and_validity = common_arrow::arrow::bitmap::and(&arg3.validity, &arg4.validity); + let and_validity = + databend_common_arrow::arrow::bitmap::and(&arg3.validity, &arg4.validity); let validity = ctx .validity .as_ref() @@ -4514,8 +4530,8 @@ pub fn passthrough_nullable_5_arg< ValueRef::Column(arg4), ValueRef::Scalar(Some(arg5)), ) => { - let and_validity = common_arrow::arrow::bitmap::and( - &common_arrow::arrow::bitmap::and(&arg1.validity, &arg3.validity), + let and_validity = databend_common_arrow::arrow::bitmap::and( + &databend_common_arrow::arrow::bitmap::and(&arg1.validity, &arg3.validity), &arg4.validity, ); let validity = ctx @@ -4543,8 +4559,8 @@ pub fn passthrough_nullable_5_arg< ValueRef::Column(arg4), ValueRef::Scalar(Some(arg5)), ) => { - let and_validity = common_arrow::arrow::bitmap::and( - &common_arrow::arrow::bitmap::and(&arg2.validity, &arg3.validity), + let and_validity = databend_common_arrow::arrow::bitmap::and( + &databend_common_arrow::arrow::bitmap::and(&arg2.validity, &arg3.validity), &arg4.validity, ); let validity = ctx @@ -4572,9 +4588,9 @@ pub fn passthrough_nullable_5_arg< ValueRef::Column(arg4), ValueRef::Scalar(Some(arg5)), ) => { - let and_validity = common_arrow::arrow::bitmap::and( - &common_arrow::arrow::bitmap::and( - &common_arrow::arrow::bitmap::and(&arg1.validity, &arg2.validity), + let and_validity = databend_common_arrow::arrow::bitmap::and( + &databend_common_arrow::arrow::bitmap::and( + &databend_common_arrow::arrow::bitmap::and(&arg1.validity, &arg2.validity), &arg3.validity, ), &arg4.validity, @@ -4630,7 +4646,8 @@ pub fn passthrough_nullable_5_arg< ValueRef::Scalar(Some(arg4)), ValueRef::Column(arg5), ) => { - let and_validity = common_arrow::arrow::bitmap::and(&arg1.validity, &arg5.validity); + let and_validity = + databend_common_arrow::arrow::bitmap::and(&arg1.validity, &arg5.validity); let validity = ctx .validity .as_ref() @@ -4656,7 +4673,8 @@ pub fn passthrough_nullable_5_arg< ValueRef::Scalar(Some(arg4)), ValueRef::Column(arg5), ) => { - let and_validity = common_arrow::arrow::bitmap::and(&arg2.validity, &arg5.validity); + let and_validity = + databend_common_arrow::arrow::bitmap::and(&arg2.validity, &arg5.validity); let validity = ctx .validity .as_ref() @@ -4682,8 +4700,8 @@ pub fn passthrough_nullable_5_arg< ValueRef::Scalar(Some(arg4)), ValueRef::Column(arg5), ) => { - let and_validity = common_arrow::arrow::bitmap::and( - &common_arrow::arrow::bitmap::and(&arg1.validity, &arg2.validity), + let and_validity = databend_common_arrow::arrow::bitmap::and( + &databend_common_arrow::arrow::bitmap::and(&arg1.validity, &arg2.validity), &arg5.validity, ); let validity = ctx @@ -4711,7 +4729,8 @@ pub fn passthrough_nullable_5_arg< ValueRef::Scalar(Some(arg4)), ValueRef::Column(arg5), ) => { - let and_validity = common_arrow::arrow::bitmap::and(&arg3.validity, &arg5.validity); + let and_validity = + databend_common_arrow::arrow::bitmap::and(&arg3.validity, &arg5.validity); let validity = ctx .validity .as_ref() @@ -4737,8 +4756,8 @@ pub fn passthrough_nullable_5_arg< ValueRef::Scalar(Some(arg4)), ValueRef::Column(arg5), ) => { - let and_validity = common_arrow::arrow::bitmap::and( - &common_arrow::arrow::bitmap::and(&arg1.validity, &arg3.validity), + let and_validity = databend_common_arrow::arrow::bitmap::and( + &databend_common_arrow::arrow::bitmap::and(&arg1.validity, &arg3.validity), &arg5.validity, ); let validity = ctx @@ -4766,8 +4785,8 @@ pub fn passthrough_nullable_5_arg< ValueRef::Scalar(Some(arg4)), ValueRef::Column(arg5), ) => { - let and_validity = common_arrow::arrow::bitmap::and( - &common_arrow::arrow::bitmap::and(&arg2.validity, &arg3.validity), + let and_validity = databend_common_arrow::arrow::bitmap::and( + &databend_common_arrow::arrow::bitmap::and(&arg2.validity, &arg3.validity), &arg5.validity, ); let validity = ctx @@ -4795,9 +4814,9 @@ pub fn passthrough_nullable_5_arg< ValueRef::Scalar(Some(arg4)), ValueRef::Column(arg5), ) => { - let and_validity = common_arrow::arrow::bitmap::and( - &common_arrow::arrow::bitmap::and( - &common_arrow::arrow::bitmap::and(&arg1.validity, &arg2.validity), + let and_validity = databend_common_arrow::arrow::bitmap::and( + &databend_common_arrow::arrow::bitmap::and( + &databend_common_arrow::arrow::bitmap::and(&arg1.validity, &arg2.validity), &arg3.validity, ), &arg5.validity, @@ -4827,7 +4846,8 @@ pub fn passthrough_nullable_5_arg< ValueRef::Column(arg4), ValueRef::Column(arg5), ) => { - let and_validity = common_arrow::arrow::bitmap::and(&arg4.validity, &arg5.validity); + let and_validity = + databend_common_arrow::arrow::bitmap::and(&arg4.validity, &arg5.validity); let validity = ctx .validity .as_ref() @@ -4853,8 +4873,8 @@ pub fn passthrough_nullable_5_arg< ValueRef::Column(arg4), ValueRef::Column(arg5), ) => { - let and_validity = common_arrow::arrow::bitmap::and( - &common_arrow::arrow::bitmap::and(&arg1.validity, &arg4.validity), + let and_validity = databend_common_arrow::arrow::bitmap::and( + &databend_common_arrow::arrow::bitmap::and(&arg1.validity, &arg4.validity), &arg5.validity, ); let validity = ctx @@ -4882,8 +4902,8 @@ pub fn passthrough_nullable_5_arg< ValueRef::Column(arg4), ValueRef::Column(arg5), ) => { - let and_validity = common_arrow::arrow::bitmap::and( - &common_arrow::arrow::bitmap::and(&arg2.validity, &arg4.validity), + let and_validity = databend_common_arrow::arrow::bitmap::and( + &databend_common_arrow::arrow::bitmap::and(&arg2.validity, &arg4.validity), &arg5.validity, ); let validity = ctx @@ -4911,9 +4931,9 @@ pub fn passthrough_nullable_5_arg< ValueRef::Column(arg4), ValueRef::Column(arg5), ) => { - let and_validity = common_arrow::arrow::bitmap::and( - &common_arrow::arrow::bitmap::and( - &common_arrow::arrow::bitmap::and(&arg1.validity, &arg2.validity), + let and_validity = databend_common_arrow::arrow::bitmap::and( + &databend_common_arrow::arrow::bitmap::and( + &databend_common_arrow::arrow::bitmap::and(&arg1.validity, &arg2.validity), &arg4.validity, ), &arg5.validity, @@ -4943,8 +4963,8 @@ pub fn passthrough_nullable_5_arg< ValueRef::Column(arg4), ValueRef::Column(arg5), ) => { - let and_validity = common_arrow::arrow::bitmap::and( - &common_arrow::arrow::bitmap::and(&arg3.validity, &arg4.validity), + let and_validity = databend_common_arrow::arrow::bitmap::and( + &databend_common_arrow::arrow::bitmap::and(&arg3.validity, &arg4.validity), &arg5.validity, ); let validity = ctx @@ -4972,9 +4992,9 @@ pub fn passthrough_nullable_5_arg< ValueRef::Column(arg4), ValueRef::Column(arg5), ) => { - let and_validity = common_arrow::arrow::bitmap::and( - &common_arrow::arrow::bitmap::and( - &common_arrow::arrow::bitmap::and(&arg1.validity, &arg3.validity), + let and_validity = databend_common_arrow::arrow::bitmap::and( + &databend_common_arrow::arrow::bitmap::and( + &databend_common_arrow::arrow::bitmap::and(&arg1.validity, &arg3.validity), &arg4.validity, ), &arg5.validity, @@ -5004,9 +5024,9 @@ pub fn passthrough_nullable_5_arg< ValueRef::Column(arg4), ValueRef::Column(arg5), ) => { - let and_validity = common_arrow::arrow::bitmap::and( - &common_arrow::arrow::bitmap::and( - &common_arrow::arrow::bitmap::and(&arg2.validity, &arg3.validity), + let and_validity = databend_common_arrow::arrow::bitmap::and( + &databend_common_arrow::arrow::bitmap::and( + &databend_common_arrow::arrow::bitmap::and(&arg2.validity, &arg3.validity), &arg4.validity, ), &arg5.validity, @@ -5036,10 +5056,10 @@ pub fn passthrough_nullable_5_arg< ValueRef::Column(arg4), ValueRef::Column(arg5), ) => { - let and_validity = common_arrow::arrow::bitmap::and( - &common_arrow::arrow::bitmap::and( - &common_arrow::arrow::bitmap::and( - &common_arrow::arrow::bitmap::and(&arg1.validity, &arg2.validity), + let and_validity = databend_common_arrow::arrow::bitmap::and( + &databend_common_arrow::arrow::bitmap::and( + &databend_common_arrow::arrow::bitmap::and( + &databend_common_arrow::arrow::bitmap::and(&arg1.validity, &arg2.validity), &arg3.validity, ), &arg4.validity, @@ -5093,7 +5113,7 @@ pub fn combine_nullable_1_arg( .into_column() .unwrap(); let combine_validity = - common_arrow::arrow::bitmap::and(&validity, &nullable_column.validity); + databend_common_arrow::arrow::bitmap::and(&validity, &nullable_column.validity); Value::Column(NullableColumn { column: nullable_column.column, validity: combine_validity, @@ -5138,7 +5158,7 @@ pub fn combine_nullable_2_arg( .into_column() .unwrap(); let combine_validity = - common_arrow::arrow::bitmap::and(&validity, &nullable_column.validity); + databend_common_arrow::arrow::bitmap::and(&validity, &nullable_column.validity); Value::Column(NullableColumn { column: nullable_column.column, validity: combine_validity, @@ -5156,14 +5176,15 @@ pub fn combine_nullable_2_arg( .into_column() .unwrap(); let combine_validity = - common_arrow::arrow::bitmap::and(&validity, &nullable_column.validity); + databend_common_arrow::arrow::bitmap::and(&validity, &nullable_column.validity); Value::Column(NullableColumn { column: nullable_column.column, validity: combine_validity, }) } (ValueRef::Column(arg1), ValueRef::Column(arg2)) => { - let and_validity = common_arrow::arrow::bitmap::and(&arg1.validity, &arg2.validity); + let and_validity = + databend_common_arrow::arrow::bitmap::and(&arg1.validity, &arg2.validity); let validity = ctx .validity .as_ref() @@ -5178,7 +5199,7 @@ pub fn combine_nullable_2_arg( .into_column() .unwrap(); let combine_validity = - common_arrow::arrow::bitmap::and(&validity, &nullable_column.validity); + databend_common_arrow::arrow::bitmap::and(&validity, &nullable_column.validity); Value::Column(NullableColumn { column: nullable_column.column, validity: combine_validity, @@ -5241,7 +5262,7 @@ pub fn combine_nullable_3_arg .into_column() .unwrap(); let combine_validity = - common_arrow::arrow::bitmap::and(&validity, &nullable_column.validity); + databend_common_arrow::arrow::bitmap::and(&validity, &nullable_column.validity); Value::Column(NullableColumn { column: nullable_column.column, validity: combine_validity, @@ -5264,14 +5285,15 @@ pub fn combine_nullable_3_arg .into_column() .unwrap(); let combine_validity = - common_arrow::arrow::bitmap::and(&validity, &nullable_column.validity); + databend_common_arrow::arrow::bitmap::and(&validity, &nullable_column.validity); Value::Column(NullableColumn { column: nullable_column.column, validity: combine_validity, }) } (ValueRef::Column(arg1), ValueRef::Column(arg2), ValueRef::Scalar(Some(arg3))) => { - let and_validity = common_arrow::arrow::bitmap::and(&arg1.validity, &arg2.validity); + let and_validity = + databend_common_arrow::arrow::bitmap::and(&arg1.validity, &arg2.validity); let validity = ctx .validity .as_ref() @@ -5287,7 +5309,7 @@ pub fn combine_nullable_3_arg .into_column() .unwrap(); let combine_validity = - common_arrow::arrow::bitmap::and(&validity, &nullable_column.validity); + databend_common_arrow::arrow::bitmap::and(&validity, &nullable_column.validity); Value::Column(NullableColumn { column: nullable_column.column, validity: combine_validity, @@ -5310,14 +5332,15 @@ pub fn combine_nullable_3_arg .into_column() .unwrap(); let combine_validity = - common_arrow::arrow::bitmap::and(&validity, &nullable_column.validity); + databend_common_arrow::arrow::bitmap::and(&validity, &nullable_column.validity); Value::Column(NullableColumn { column: nullable_column.column, validity: combine_validity, }) } (ValueRef::Column(arg1), ValueRef::Scalar(Some(arg2)), ValueRef::Column(arg3)) => { - let and_validity = common_arrow::arrow::bitmap::and(&arg1.validity, &arg3.validity); + let and_validity = + databend_common_arrow::arrow::bitmap::and(&arg1.validity, &arg3.validity); let validity = ctx .validity .as_ref() @@ -5333,14 +5356,15 @@ pub fn combine_nullable_3_arg .into_column() .unwrap(); let combine_validity = - common_arrow::arrow::bitmap::and(&validity, &nullable_column.validity); + databend_common_arrow::arrow::bitmap::and(&validity, &nullable_column.validity); Value::Column(NullableColumn { column: nullable_column.column, validity: combine_validity, }) } (ValueRef::Scalar(Some(arg1)), ValueRef::Column(arg2), ValueRef::Column(arg3)) => { - let and_validity = common_arrow::arrow::bitmap::and(&arg2.validity, &arg3.validity); + let and_validity = + databend_common_arrow::arrow::bitmap::and(&arg2.validity, &arg3.validity); let validity = ctx .validity .as_ref() @@ -5356,15 +5380,15 @@ pub fn combine_nullable_3_arg .into_column() .unwrap(); let combine_validity = - common_arrow::arrow::bitmap::and(&validity, &nullable_column.validity); + databend_common_arrow::arrow::bitmap::and(&validity, &nullable_column.validity); Value::Column(NullableColumn { column: nullable_column.column, validity: combine_validity, }) } (ValueRef::Column(arg1), ValueRef::Column(arg2), ValueRef::Column(arg3)) => { - let and_validity = common_arrow::arrow::bitmap::and( - &common_arrow::arrow::bitmap::and(&arg1.validity, &arg2.validity), + let and_validity = databend_common_arrow::arrow::bitmap::and( + &databend_common_arrow::arrow::bitmap::and(&arg1.validity, &arg2.validity), &arg3.validity, ); let validity = ctx @@ -5382,7 +5406,7 @@ pub fn combine_nullable_3_arg .into_column() .unwrap(); let combine_validity = - common_arrow::arrow::bitmap::and(&validity, &nullable_column.validity); + databend_common_arrow::arrow::bitmap::and(&validity, &nullable_column.validity); Value::Column(NullableColumn { column: nullable_column.column, validity: combine_validity, @@ -5456,7 +5480,7 @@ pub fn combine_nullable_4_arg { - let and_validity = common_arrow::arrow::bitmap::and(&arg1.validity, &arg2.validity); + let and_validity = + databend_common_arrow::arrow::bitmap::and(&arg1.validity, &arg2.validity); let validity = ctx .validity .as_ref() @@ -5514,7 +5539,7 @@ pub fn combine_nullable_4_arg { - let and_validity = common_arrow::arrow::bitmap::and(&arg1.validity, &arg3.validity); + let and_validity = + databend_common_arrow::arrow::bitmap::and(&arg1.validity, &arg3.validity); let validity = ctx .validity .as_ref() @@ -5572,7 +5598,7 @@ pub fn combine_nullable_4_arg { - let and_validity = common_arrow::arrow::bitmap::and(&arg2.validity, &arg3.validity); + let and_validity = + databend_common_arrow::arrow::bitmap::and(&arg2.validity, &arg3.validity); let validity = ctx .validity .as_ref() @@ -5601,7 +5628,7 @@ pub fn combine_nullable_4_arg { - let and_validity = common_arrow::arrow::bitmap::and( - &common_arrow::arrow::bitmap::and(&arg1.validity, &arg2.validity), + let and_validity = databend_common_arrow::arrow::bitmap::and( + &databend_common_arrow::arrow::bitmap::and(&arg1.validity, &arg2.validity), &arg3.validity, ); let validity = ctx @@ -5633,7 +5660,7 @@ pub fn combine_nullable_4_arg { - let and_validity = common_arrow::arrow::bitmap::and(&arg1.validity, &arg4.validity); + let and_validity = + databend_common_arrow::arrow::bitmap::and(&arg1.validity, &arg4.validity); let validity = ctx .validity .as_ref() @@ -5691,7 +5719,7 @@ pub fn combine_nullable_4_arg { - let and_validity = common_arrow::arrow::bitmap::and(&arg2.validity, &arg4.validity); + let and_validity = + databend_common_arrow::arrow::bitmap::and(&arg2.validity, &arg4.validity); let validity = ctx .validity .as_ref() @@ -5720,7 +5749,7 @@ pub fn combine_nullable_4_arg { - let and_validity = common_arrow::arrow::bitmap::and( - &common_arrow::arrow::bitmap::and(&arg1.validity, &arg2.validity), + let and_validity = databend_common_arrow::arrow::bitmap::and( + &databend_common_arrow::arrow::bitmap::and(&arg1.validity, &arg2.validity), &arg4.validity, ); let validity = ctx @@ -5752,7 +5781,7 @@ pub fn combine_nullable_4_arg { - let and_validity = common_arrow::arrow::bitmap::and(&arg3.validity, &arg4.validity); + let and_validity = + databend_common_arrow::arrow::bitmap::and(&arg3.validity, &arg4.validity); let validity = ctx .validity .as_ref() @@ -5781,7 +5811,7 @@ pub fn combine_nullable_4_arg { - let and_validity = common_arrow::arrow::bitmap::and( - &common_arrow::arrow::bitmap::and(&arg1.validity, &arg3.validity), + let and_validity = databend_common_arrow::arrow::bitmap::and( + &databend_common_arrow::arrow::bitmap::and(&arg1.validity, &arg3.validity), &arg4.validity, ); let validity = ctx @@ -5813,7 +5843,7 @@ pub fn combine_nullable_4_arg { - let and_validity = common_arrow::arrow::bitmap::and( - &common_arrow::arrow::bitmap::and(&arg2.validity, &arg3.validity), + let and_validity = databend_common_arrow::arrow::bitmap::and( + &databend_common_arrow::arrow::bitmap::and(&arg2.validity, &arg3.validity), &arg4.validity, ); let validity = ctx @@ -5845,7 +5875,7 @@ pub fn combine_nullable_4_arg { - let and_validity = common_arrow::arrow::bitmap::and( - &common_arrow::arrow::bitmap::and( - &common_arrow::arrow::bitmap::and(&arg1.validity, &arg2.validity), + let and_validity = databend_common_arrow::arrow::bitmap::and( + &databend_common_arrow::arrow::bitmap::and( + &databend_common_arrow::arrow::bitmap::and(&arg1.validity, &arg2.validity), &arg3.validity, ), &arg4.validity, @@ -5880,7 +5910,7 @@ pub fn combine_nullable_4_arg { - let and_validity = common_arrow::arrow::bitmap::and(&arg1.validity, &arg2.validity); + let and_validity = + databend_common_arrow::arrow::bitmap::and(&arg1.validity, &arg2.validity); let validity = ctx .validity .as_ref() @@ -6030,7 +6061,7 @@ pub fn combine_nullable_5_arg< .into_column() .unwrap(); let combine_validity = - common_arrow::arrow::bitmap::and(&validity, &nullable_column.validity); + databend_common_arrow::arrow::bitmap::and(&validity, &nullable_column.validity); Value::Column(NullableColumn { column: nullable_column.column, validity: combine_validity, @@ -6061,7 +6092,7 @@ pub fn combine_nullable_5_arg< .into_column() .unwrap(); let combine_validity = - common_arrow::arrow::bitmap::and(&validity, &nullable_column.validity); + databend_common_arrow::arrow::bitmap::and(&validity, &nullable_column.validity); Value::Column(NullableColumn { column: nullable_column.column, validity: combine_validity, @@ -6074,7 +6105,8 @@ pub fn combine_nullable_5_arg< ValueRef::Scalar(Some(arg4)), ValueRef::Scalar(Some(arg5)), ) => { - let and_validity = common_arrow::arrow::bitmap::and(&arg1.validity, &arg3.validity); + let and_validity = + databend_common_arrow::arrow::bitmap::and(&arg1.validity, &arg3.validity); let validity = ctx .validity .as_ref() @@ -6092,7 +6124,7 @@ pub fn combine_nullable_5_arg< .into_column() .unwrap(); let combine_validity = - common_arrow::arrow::bitmap::and(&validity, &nullable_column.validity); + databend_common_arrow::arrow::bitmap::and(&validity, &nullable_column.validity); Value::Column(NullableColumn { column: nullable_column.column, validity: combine_validity, @@ -6105,7 +6137,8 @@ pub fn combine_nullable_5_arg< ValueRef::Scalar(Some(arg4)), ValueRef::Scalar(Some(arg5)), ) => { - let and_validity = common_arrow::arrow::bitmap::and(&arg2.validity, &arg3.validity); + let and_validity = + databend_common_arrow::arrow::bitmap::and(&arg2.validity, &arg3.validity); let validity = ctx .validity .as_ref() @@ -6123,7 +6156,7 @@ pub fn combine_nullable_5_arg< .into_column() .unwrap(); let combine_validity = - common_arrow::arrow::bitmap::and(&validity, &nullable_column.validity); + databend_common_arrow::arrow::bitmap::and(&validity, &nullable_column.validity); Value::Column(NullableColumn { column: nullable_column.column, validity: combine_validity, @@ -6136,8 +6169,8 @@ pub fn combine_nullable_5_arg< ValueRef::Scalar(Some(arg4)), ValueRef::Scalar(Some(arg5)), ) => { - let and_validity = common_arrow::arrow::bitmap::and( - &common_arrow::arrow::bitmap::and(&arg1.validity, &arg2.validity), + let and_validity = databend_common_arrow::arrow::bitmap::and( + &databend_common_arrow::arrow::bitmap::and(&arg1.validity, &arg2.validity), &arg3.validity, ); let validity = ctx @@ -6157,7 +6190,7 @@ pub fn combine_nullable_5_arg< .into_column() .unwrap(); let combine_validity = - common_arrow::arrow::bitmap::and(&validity, &nullable_column.validity); + databend_common_arrow::arrow::bitmap::and(&validity, &nullable_column.validity); Value::Column(NullableColumn { column: nullable_column.column, validity: combine_validity, @@ -6188,7 +6221,7 @@ pub fn combine_nullable_5_arg< .into_column() .unwrap(); let combine_validity = - common_arrow::arrow::bitmap::and(&validity, &nullable_column.validity); + databend_common_arrow::arrow::bitmap::and(&validity, &nullable_column.validity); Value::Column(NullableColumn { column: nullable_column.column, validity: combine_validity, @@ -6201,7 +6234,8 @@ pub fn combine_nullable_5_arg< ValueRef::Column(arg4), ValueRef::Scalar(Some(arg5)), ) => { - let and_validity = common_arrow::arrow::bitmap::and(&arg1.validity, &arg4.validity); + let and_validity = + databend_common_arrow::arrow::bitmap::and(&arg1.validity, &arg4.validity); let validity = ctx .validity .as_ref() @@ -6219,7 +6253,7 @@ pub fn combine_nullable_5_arg< .into_column() .unwrap(); let combine_validity = - common_arrow::arrow::bitmap::and(&validity, &nullable_column.validity); + databend_common_arrow::arrow::bitmap::and(&validity, &nullable_column.validity); Value::Column(NullableColumn { column: nullable_column.column, validity: combine_validity, @@ -6232,7 +6266,8 @@ pub fn combine_nullable_5_arg< ValueRef::Column(arg4), ValueRef::Scalar(Some(arg5)), ) => { - let and_validity = common_arrow::arrow::bitmap::and(&arg2.validity, &arg4.validity); + let and_validity = + databend_common_arrow::arrow::bitmap::and(&arg2.validity, &arg4.validity); let validity = ctx .validity .as_ref() @@ -6250,7 +6285,7 @@ pub fn combine_nullable_5_arg< .into_column() .unwrap(); let combine_validity = - common_arrow::arrow::bitmap::and(&validity, &nullable_column.validity); + databend_common_arrow::arrow::bitmap::and(&validity, &nullable_column.validity); Value::Column(NullableColumn { column: nullable_column.column, validity: combine_validity, @@ -6263,8 +6298,8 @@ pub fn combine_nullable_5_arg< ValueRef::Column(arg4), ValueRef::Scalar(Some(arg5)), ) => { - let and_validity = common_arrow::arrow::bitmap::and( - &common_arrow::arrow::bitmap::and(&arg1.validity, &arg2.validity), + let and_validity = databend_common_arrow::arrow::bitmap::and( + &databend_common_arrow::arrow::bitmap::and(&arg1.validity, &arg2.validity), &arg4.validity, ); let validity = ctx @@ -6284,7 +6319,7 @@ pub fn combine_nullable_5_arg< .into_column() .unwrap(); let combine_validity = - common_arrow::arrow::bitmap::and(&validity, &nullable_column.validity); + databend_common_arrow::arrow::bitmap::and(&validity, &nullable_column.validity); Value::Column(NullableColumn { column: nullable_column.column, validity: combine_validity, @@ -6297,7 +6332,8 @@ pub fn combine_nullable_5_arg< ValueRef::Column(arg4), ValueRef::Scalar(Some(arg5)), ) => { - let and_validity = common_arrow::arrow::bitmap::and(&arg3.validity, &arg4.validity); + let and_validity = + databend_common_arrow::arrow::bitmap::and(&arg3.validity, &arg4.validity); let validity = ctx .validity .as_ref() @@ -6315,7 +6351,7 @@ pub fn combine_nullable_5_arg< .into_column() .unwrap(); let combine_validity = - common_arrow::arrow::bitmap::and(&validity, &nullable_column.validity); + databend_common_arrow::arrow::bitmap::and(&validity, &nullable_column.validity); Value::Column(NullableColumn { column: nullable_column.column, validity: combine_validity, @@ -6328,8 +6364,8 @@ pub fn combine_nullable_5_arg< ValueRef::Column(arg4), ValueRef::Scalar(Some(arg5)), ) => { - let and_validity = common_arrow::arrow::bitmap::and( - &common_arrow::arrow::bitmap::and(&arg1.validity, &arg3.validity), + let and_validity = databend_common_arrow::arrow::bitmap::and( + &databend_common_arrow::arrow::bitmap::and(&arg1.validity, &arg3.validity), &arg4.validity, ); let validity = ctx @@ -6349,7 +6385,7 @@ pub fn combine_nullable_5_arg< .into_column() .unwrap(); let combine_validity = - common_arrow::arrow::bitmap::and(&validity, &nullable_column.validity); + databend_common_arrow::arrow::bitmap::and(&validity, &nullable_column.validity); Value::Column(NullableColumn { column: nullable_column.column, validity: combine_validity, @@ -6362,8 +6398,8 @@ pub fn combine_nullable_5_arg< ValueRef::Column(arg4), ValueRef::Scalar(Some(arg5)), ) => { - let and_validity = common_arrow::arrow::bitmap::and( - &common_arrow::arrow::bitmap::and(&arg2.validity, &arg3.validity), + let and_validity = databend_common_arrow::arrow::bitmap::and( + &databend_common_arrow::arrow::bitmap::and(&arg2.validity, &arg3.validity), &arg4.validity, ); let validity = ctx @@ -6383,7 +6419,7 @@ pub fn combine_nullable_5_arg< .into_column() .unwrap(); let combine_validity = - common_arrow::arrow::bitmap::and(&validity, &nullable_column.validity); + databend_common_arrow::arrow::bitmap::and(&validity, &nullable_column.validity); Value::Column(NullableColumn { column: nullable_column.column, validity: combine_validity, @@ -6396,9 +6432,9 @@ pub fn combine_nullable_5_arg< ValueRef::Column(arg4), ValueRef::Scalar(Some(arg5)), ) => { - let and_validity = common_arrow::arrow::bitmap::and( - &common_arrow::arrow::bitmap::and( - &common_arrow::arrow::bitmap::and(&arg1.validity, &arg2.validity), + let and_validity = databend_common_arrow::arrow::bitmap::and( + &databend_common_arrow::arrow::bitmap::and( + &databend_common_arrow::arrow::bitmap::and(&arg1.validity, &arg2.validity), &arg3.validity, ), &arg4.validity, @@ -6420,7 +6456,7 @@ pub fn combine_nullable_5_arg< .into_column() .unwrap(); let combine_validity = - common_arrow::arrow::bitmap::and(&validity, &nullable_column.validity); + databend_common_arrow::arrow::bitmap::and(&validity, &nullable_column.validity); Value::Column(NullableColumn { column: nullable_column.column, validity: combine_validity, @@ -6451,7 +6487,7 @@ pub fn combine_nullable_5_arg< .into_column() .unwrap(); let combine_validity = - common_arrow::arrow::bitmap::and(&validity, &nullable_column.validity); + databend_common_arrow::arrow::bitmap::and(&validity, &nullable_column.validity); Value::Column(NullableColumn { column: nullable_column.column, validity: combine_validity, @@ -6464,7 +6500,8 @@ pub fn combine_nullable_5_arg< ValueRef::Scalar(Some(arg4)), ValueRef::Column(arg5), ) => { - let and_validity = common_arrow::arrow::bitmap::and(&arg1.validity, &arg5.validity); + let and_validity = + databend_common_arrow::arrow::bitmap::and(&arg1.validity, &arg5.validity); let validity = ctx .validity .as_ref() @@ -6482,7 +6519,7 @@ pub fn combine_nullable_5_arg< .into_column() .unwrap(); let combine_validity = - common_arrow::arrow::bitmap::and(&validity, &nullable_column.validity); + databend_common_arrow::arrow::bitmap::and(&validity, &nullable_column.validity); Value::Column(NullableColumn { column: nullable_column.column, validity: combine_validity, @@ -6495,7 +6532,8 @@ pub fn combine_nullable_5_arg< ValueRef::Scalar(Some(arg4)), ValueRef::Column(arg5), ) => { - let and_validity = common_arrow::arrow::bitmap::and(&arg2.validity, &arg5.validity); + let and_validity = + databend_common_arrow::arrow::bitmap::and(&arg2.validity, &arg5.validity); let validity = ctx .validity .as_ref() @@ -6513,7 +6551,7 @@ pub fn combine_nullable_5_arg< .into_column() .unwrap(); let combine_validity = - common_arrow::arrow::bitmap::and(&validity, &nullable_column.validity); + databend_common_arrow::arrow::bitmap::and(&validity, &nullable_column.validity); Value::Column(NullableColumn { column: nullable_column.column, validity: combine_validity, @@ -6526,8 +6564,8 @@ pub fn combine_nullable_5_arg< ValueRef::Scalar(Some(arg4)), ValueRef::Column(arg5), ) => { - let and_validity = common_arrow::arrow::bitmap::and( - &common_arrow::arrow::bitmap::and(&arg1.validity, &arg2.validity), + let and_validity = databend_common_arrow::arrow::bitmap::and( + &databend_common_arrow::arrow::bitmap::and(&arg1.validity, &arg2.validity), &arg5.validity, ); let validity = ctx @@ -6547,7 +6585,7 @@ pub fn combine_nullable_5_arg< .into_column() .unwrap(); let combine_validity = - common_arrow::arrow::bitmap::and(&validity, &nullable_column.validity); + databend_common_arrow::arrow::bitmap::and(&validity, &nullable_column.validity); Value::Column(NullableColumn { column: nullable_column.column, validity: combine_validity, @@ -6560,7 +6598,8 @@ pub fn combine_nullable_5_arg< ValueRef::Scalar(Some(arg4)), ValueRef::Column(arg5), ) => { - let and_validity = common_arrow::arrow::bitmap::and(&arg3.validity, &arg5.validity); + let and_validity = + databend_common_arrow::arrow::bitmap::and(&arg3.validity, &arg5.validity); let validity = ctx .validity .as_ref() @@ -6578,7 +6617,7 @@ pub fn combine_nullable_5_arg< .into_column() .unwrap(); let combine_validity = - common_arrow::arrow::bitmap::and(&validity, &nullable_column.validity); + databend_common_arrow::arrow::bitmap::and(&validity, &nullable_column.validity); Value::Column(NullableColumn { column: nullable_column.column, validity: combine_validity, @@ -6591,8 +6630,8 @@ pub fn combine_nullable_5_arg< ValueRef::Scalar(Some(arg4)), ValueRef::Column(arg5), ) => { - let and_validity = common_arrow::arrow::bitmap::and( - &common_arrow::arrow::bitmap::and(&arg1.validity, &arg3.validity), + let and_validity = databend_common_arrow::arrow::bitmap::and( + &databend_common_arrow::arrow::bitmap::and(&arg1.validity, &arg3.validity), &arg5.validity, ); let validity = ctx @@ -6612,7 +6651,7 @@ pub fn combine_nullable_5_arg< .into_column() .unwrap(); let combine_validity = - common_arrow::arrow::bitmap::and(&validity, &nullable_column.validity); + databend_common_arrow::arrow::bitmap::and(&validity, &nullable_column.validity); Value::Column(NullableColumn { column: nullable_column.column, validity: combine_validity, @@ -6625,8 +6664,8 @@ pub fn combine_nullable_5_arg< ValueRef::Scalar(Some(arg4)), ValueRef::Column(arg5), ) => { - let and_validity = common_arrow::arrow::bitmap::and( - &common_arrow::arrow::bitmap::and(&arg2.validity, &arg3.validity), + let and_validity = databend_common_arrow::arrow::bitmap::and( + &databend_common_arrow::arrow::bitmap::and(&arg2.validity, &arg3.validity), &arg5.validity, ); let validity = ctx @@ -6646,7 +6685,7 @@ pub fn combine_nullable_5_arg< .into_column() .unwrap(); let combine_validity = - common_arrow::arrow::bitmap::and(&validity, &nullable_column.validity); + databend_common_arrow::arrow::bitmap::and(&validity, &nullable_column.validity); Value::Column(NullableColumn { column: nullable_column.column, validity: combine_validity, @@ -6659,9 +6698,9 @@ pub fn combine_nullable_5_arg< ValueRef::Scalar(Some(arg4)), ValueRef::Column(arg5), ) => { - let and_validity = common_arrow::arrow::bitmap::and( - &common_arrow::arrow::bitmap::and( - &common_arrow::arrow::bitmap::and(&arg1.validity, &arg2.validity), + let and_validity = databend_common_arrow::arrow::bitmap::and( + &databend_common_arrow::arrow::bitmap::and( + &databend_common_arrow::arrow::bitmap::and(&arg1.validity, &arg2.validity), &arg3.validity, ), &arg5.validity, @@ -6683,7 +6722,7 @@ pub fn combine_nullable_5_arg< .into_column() .unwrap(); let combine_validity = - common_arrow::arrow::bitmap::and(&validity, &nullable_column.validity); + databend_common_arrow::arrow::bitmap::and(&validity, &nullable_column.validity); Value::Column(NullableColumn { column: nullable_column.column, validity: combine_validity, @@ -6696,7 +6735,8 @@ pub fn combine_nullable_5_arg< ValueRef::Column(arg4), ValueRef::Column(arg5), ) => { - let and_validity = common_arrow::arrow::bitmap::and(&arg4.validity, &arg5.validity); + let and_validity = + databend_common_arrow::arrow::bitmap::and(&arg4.validity, &arg5.validity); let validity = ctx .validity .as_ref() @@ -6714,7 +6754,7 @@ pub fn combine_nullable_5_arg< .into_column() .unwrap(); let combine_validity = - common_arrow::arrow::bitmap::and(&validity, &nullable_column.validity); + databend_common_arrow::arrow::bitmap::and(&validity, &nullable_column.validity); Value::Column(NullableColumn { column: nullable_column.column, validity: combine_validity, @@ -6727,8 +6767,8 @@ pub fn combine_nullable_5_arg< ValueRef::Column(arg4), ValueRef::Column(arg5), ) => { - let and_validity = common_arrow::arrow::bitmap::and( - &common_arrow::arrow::bitmap::and(&arg1.validity, &arg4.validity), + let and_validity = databend_common_arrow::arrow::bitmap::and( + &databend_common_arrow::arrow::bitmap::and(&arg1.validity, &arg4.validity), &arg5.validity, ); let validity = ctx @@ -6748,7 +6788,7 @@ pub fn combine_nullable_5_arg< .into_column() .unwrap(); let combine_validity = - common_arrow::arrow::bitmap::and(&validity, &nullable_column.validity); + databend_common_arrow::arrow::bitmap::and(&validity, &nullable_column.validity); Value::Column(NullableColumn { column: nullable_column.column, validity: combine_validity, @@ -6761,8 +6801,8 @@ pub fn combine_nullable_5_arg< ValueRef::Column(arg4), ValueRef::Column(arg5), ) => { - let and_validity = common_arrow::arrow::bitmap::and( - &common_arrow::arrow::bitmap::and(&arg2.validity, &arg4.validity), + let and_validity = databend_common_arrow::arrow::bitmap::and( + &databend_common_arrow::arrow::bitmap::and(&arg2.validity, &arg4.validity), &arg5.validity, ); let validity = ctx @@ -6782,7 +6822,7 @@ pub fn combine_nullable_5_arg< .into_column() .unwrap(); let combine_validity = - common_arrow::arrow::bitmap::and(&validity, &nullable_column.validity); + databend_common_arrow::arrow::bitmap::and(&validity, &nullable_column.validity); Value::Column(NullableColumn { column: nullable_column.column, validity: combine_validity, @@ -6795,9 +6835,9 @@ pub fn combine_nullable_5_arg< ValueRef::Column(arg4), ValueRef::Column(arg5), ) => { - let and_validity = common_arrow::arrow::bitmap::and( - &common_arrow::arrow::bitmap::and( - &common_arrow::arrow::bitmap::and(&arg1.validity, &arg2.validity), + let and_validity = databend_common_arrow::arrow::bitmap::and( + &databend_common_arrow::arrow::bitmap::and( + &databend_common_arrow::arrow::bitmap::and(&arg1.validity, &arg2.validity), &arg4.validity, ), &arg5.validity, @@ -6819,7 +6859,7 @@ pub fn combine_nullable_5_arg< .into_column() .unwrap(); let combine_validity = - common_arrow::arrow::bitmap::and(&validity, &nullable_column.validity); + databend_common_arrow::arrow::bitmap::and(&validity, &nullable_column.validity); Value::Column(NullableColumn { column: nullable_column.column, validity: combine_validity, @@ -6832,8 +6872,8 @@ pub fn combine_nullable_5_arg< ValueRef::Column(arg4), ValueRef::Column(arg5), ) => { - let and_validity = common_arrow::arrow::bitmap::and( - &common_arrow::arrow::bitmap::and(&arg3.validity, &arg4.validity), + let and_validity = databend_common_arrow::arrow::bitmap::and( + &databend_common_arrow::arrow::bitmap::and(&arg3.validity, &arg4.validity), &arg5.validity, ); let validity = ctx @@ -6853,7 +6893,7 @@ pub fn combine_nullable_5_arg< .into_column() .unwrap(); let combine_validity = - common_arrow::arrow::bitmap::and(&validity, &nullable_column.validity); + databend_common_arrow::arrow::bitmap::and(&validity, &nullable_column.validity); Value::Column(NullableColumn { column: nullable_column.column, validity: combine_validity, @@ -6866,9 +6906,9 @@ pub fn combine_nullable_5_arg< ValueRef::Column(arg4), ValueRef::Column(arg5), ) => { - let and_validity = common_arrow::arrow::bitmap::and( - &common_arrow::arrow::bitmap::and( - &common_arrow::arrow::bitmap::and(&arg1.validity, &arg3.validity), + let and_validity = databend_common_arrow::arrow::bitmap::and( + &databend_common_arrow::arrow::bitmap::and( + &databend_common_arrow::arrow::bitmap::and(&arg1.validity, &arg3.validity), &arg4.validity, ), &arg5.validity, @@ -6890,7 +6930,7 @@ pub fn combine_nullable_5_arg< .into_column() .unwrap(); let combine_validity = - common_arrow::arrow::bitmap::and(&validity, &nullable_column.validity); + databend_common_arrow::arrow::bitmap::and(&validity, &nullable_column.validity); Value::Column(NullableColumn { column: nullable_column.column, validity: combine_validity, @@ -6903,9 +6943,9 @@ pub fn combine_nullable_5_arg< ValueRef::Column(arg4), ValueRef::Column(arg5), ) => { - let and_validity = common_arrow::arrow::bitmap::and( - &common_arrow::arrow::bitmap::and( - &common_arrow::arrow::bitmap::and(&arg2.validity, &arg3.validity), + let and_validity = databend_common_arrow::arrow::bitmap::and( + &databend_common_arrow::arrow::bitmap::and( + &databend_common_arrow::arrow::bitmap::and(&arg2.validity, &arg3.validity), &arg4.validity, ), &arg5.validity, @@ -6927,7 +6967,7 @@ pub fn combine_nullable_5_arg< .into_column() .unwrap(); let combine_validity = - common_arrow::arrow::bitmap::and(&validity, &nullable_column.validity); + databend_common_arrow::arrow::bitmap::and(&validity, &nullable_column.validity); Value::Column(NullableColumn { column: nullable_column.column, validity: combine_validity, @@ -6940,10 +6980,10 @@ pub fn combine_nullable_5_arg< ValueRef::Column(arg4), ValueRef::Column(arg5), ) => { - let and_validity = common_arrow::arrow::bitmap::and( - &common_arrow::arrow::bitmap::and( - &common_arrow::arrow::bitmap::and( - &common_arrow::arrow::bitmap::and(&arg1.validity, &arg2.validity), + let and_validity = databend_common_arrow::arrow::bitmap::and( + &databend_common_arrow::arrow::bitmap::and( + &databend_common_arrow::arrow::bitmap::and( + &databend_common_arrow::arrow::bitmap::and(&arg1.validity, &arg2.validity), &arg3.validity, ), &arg4.validity, @@ -6967,7 +7007,7 @@ pub fn combine_nullable_5_arg< .into_column() .unwrap(); let combine_validity = - common_arrow::arrow::bitmap::and(&validity, &nullable_column.validity); + databend_common_arrow::arrow::bitmap::and(&validity, &nullable_column.validity); Value::Column(NullableColumn { column: nullable_column.column, validity: combine_validity, diff --git a/src/query/expression/src/row/fixed.rs b/src/query/expression/src/row/fixed.rs index a69e3fc627bd..ad2cb802028e 100644 --- a/src/query/expression/src/row/fixed.rs +++ b/src/query/expression/src/row/fixed.rs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_arrow::arrow::bitmap::Bitmap; +use databend_common_arrow::arrow::bitmap::Bitmap; use ethnum::i256; use super::row_converter::null_sentinel; diff --git a/src/query/expression/src/row/row_converter.rs b/src/query/expression/src/row/row_converter.rs index 0d6b5a3a5b15..e7dd3fb22ea3 100644 --- a/src/query/expression/src/row/row_converter.rs +++ b/src/query/expression/src/row/row_converter.rs @@ -14,8 +14,8 @@ use std::sync::Arc; -use common_exception::ErrorCode; -use common_exception::Result; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; use ethnum::i256; use super::fixed; diff --git a/src/query/expression/src/row/variable.rs b/src/query/expression/src/row/variable.rs index ad9e92e68cbb..a35b42ebd451 100644 --- a/src/query/expression/src/row/variable.rs +++ b/src/query/expression/src/row/variable.rs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_arrow::arrow::bitmap::Bitmap; +use databend_common_arrow::arrow::bitmap::Bitmap; use super::row_converter::null_sentinel; use crate::types::string::StringColumnBuilder; diff --git a/src/query/expression/src/schema.rs b/src/query/expression/src/schema.rs index f2ca3a8cb987..8372513718af 100644 --- a/src/query/expression/src/schema.rs +++ b/src/query/expression/src/schema.rs @@ -17,12 +17,12 @@ use std::collections::HashMap; use std::collections::HashSet; use std::sync::Arc; -use common_arrow::arrow::datatypes::DataType as ArrowDataType; -use common_arrow::arrow::datatypes::Field as ArrowField; -use common_arrow::arrow::datatypes::Schema as ArrowSchema; -use common_arrow::arrow::datatypes::TimeUnit; -use common_exception::ErrorCode; -use common_exception::Result; +use databend_common_arrow::arrow::datatypes::DataType as ArrowDataType; +use databend_common_arrow::arrow::datatypes::Field as ArrowField; +use databend_common_arrow::arrow::datatypes::Schema as ArrowSchema; +use databend_common_arrow::arrow::datatypes::TimeUnit; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; use itertools::Itertools; use serde::Deserialize; use serde::Serialize; diff --git a/src/query/expression/src/type_check.rs b/src/query/expression/src/type_check.rs index 1ad545dbddb7..a30888662ca0 100755 --- a/src/query/expression/src/type_check.rs +++ b/src/query/expression/src/type_check.rs @@ -15,9 +15,9 @@ use std::collections::HashMap; use std::fmt::Write; -use common_exception::ErrorCode; -use common_exception::Result; -use common_exception::Span; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_exception::Span; use itertools::Itertools; use crate::cast_scalar; diff --git a/src/query/expression/src/types.rs b/src/query/expression/src/types.rs index 850bca2ba316..e50a0a5b0e8c 100755 --- a/src/query/expression/src/types.rs +++ b/src/query/expression/src/types.rs @@ -33,7 +33,7 @@ pub mod variant; use std::fmt::Debug; use std::ops::Range; -use common_arrow::arrow::trusted_len::TrustedLen; +use databend_common_arrow::arrow::trusted_len::TrustedLen; use enum_as_inner::EnumAsInner; use serde::Deserialize; use serde::Serialize; diff --git a/src/query/expression/src/types/array.rs b/src/query/expression/src/types/array.rs index e2e66a2a45f6..67f0da9801d6 100755 --- a/src/query/expression/src/types/array.rs +++ b/src/query/expression/src/types/array.rs @@ -16,10 +16,10 @@ use std::iter::once; use std::marker::PhantomData; use std::ops::Range; -use common_arrow::arrow::buffer::Buffer; -use common_arrow::arrow::trusted_len::TrustedLen; -use common_exception::ErrorCode; -use common_exception::Result; +use databend_common_arrow::arrow::buffer::Buffer; +use databend_common_arrow::arrow::trusted_len::TrustedLen; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; use super::AnyType; use crate::property::Domain; diff --git a/src/query/expression/src/types/boolean.rs b/src/query/expression/src/types/boolean.rs index 097d73ac7310..7c341566ab00 100644 --- a/src/query/expression/src/types/boolean.rs +++ b/src/query/expression/src/types/boolean.rs @@ -14,8 +14,8 @@ use std::ops::Range; -use common_arrow::arrow::bitmap::Bitmap; -use common_arrow::arrow::bitmap::MutableBitmap; +use databend_common_arrow::arrow::bitmap::Bitmap; +use databend_common_arrow::arrow::bitmap::MutableBitmap; use crate::property::Domain; use crate::types::ArgType; @@ -36,7 +36,7 @@ impl ValueType for BooleanType { type ScalarRef<'a> = bool; type Column = Bitmap; type Domain = BooleanDomain; - type ColumnIterator<'a> = common_arrow::arrow::bitmap::utils::BitmapIter<'a>; + type ColumnIterator<'a> = databend_common_arrow::arrow::bitmap::utils::BitmapIter<'a>; type ColumnBuilder = MutableBitmap; #[inline] diff --git a/src/query/expression/src/types/date.rs b/src/query/expression/src/types/date.rs index 1657b06a4c4f..ec840f563e46 100644 --- a/src/query/expression/src/types/date.rs +++ b/src/query/expression/src/types/date.rs @@ -18,9 +18,9 @@ use std::ops::Range; use chrono::NaiveDate; use chrono_tz::Tz; -use common_arrow::arrow::buffer::Buffer; -use common_io::cursor_ext::BufferReadDateTimeExt; -use common_io::cursor_ext::ReadBytesExt; +use databend_common_arrow::arrow::buffer::Buffer; +use databend_common_io::cursor_ext::BufferReadDateTimeExt; +use databend_common_io::cursor_ext::ReadBytesExt; use num_traits::AsPrimitive; use super::number::SimpleDomain; diff --git a/src/query/expression/src/types/decimal.rs b/src/query/expression/src/types/decimal.rs index 325b763d5310..66ab424220ae 100644 --- a/src/query/expression/src/types/decimal.rs +++ b/src/query/expression/src/types/decimal.rs @@ -16,9 +16,9 @@ use std::fmt::Debug; use std::marker::PhantomData; use std::ops::Range; -use common_arrow::arrow::buffer::Buffer; -use common_exception::ErrorCode; -use common_exception::Result; +use databend_common_arrow::arrow::buffer::Buffer; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; use enum_as_inner::EnumAsInner; use ethnum::i256; use ethnum::AsI256; diff --git a/src/query/expression/src/types/map.rs b/src/query/expression/src/types/map.rs index ad924d1fc1d6..000192da7c9f 100755 --- a/src/query/expression/src/types/map.rs +++ b/src/query/expression/src/types/map.rs @@ -15,7 +15,7 @@ use std::marker::PhantomData; use std::ops::Range; -use common_arrow::arrow::trusted_len::TrustedLen; +use databend_common_arrow::arrow::trusted_len::TrustedLen; use super::ArrayType; use crate::property::Domain; diff --git a/src/query/expression/src/types/nullable.rs b/src/query/expression/src/types/nullable.rs index f4c0b544d860..a8957f2855c3 100755 --- a/src/query/expression/src/types/nullable.rs +++ b/src/query/expression/src/types/nullable.rs @@ -15,9 +15,9 @@ use std::marker::PhantomData; use std::ops::Range; -use common_arrow::arrow::bitmap::Bitmap; -use common_arrow::arrow::bitmap::MutableBitmap; -use common_arrow::arrow::trusted_len::TrustedLen; +use databend_common_arrow::arrow::bitmap::Bitmap; +use databend_common_arrow::arrow::bitmap::MutableBitmap; +use databend_common_arrow::arrow::trusted_len::TrustedLen; use super::AnyType; use crate::property::Domain; @@ -298,7 +298,7 @@ impl NullableColumn { pub struct NullableIterator<'a, T: ValueType> { iter: T::ColumnIterator<'a>, - validity: common_arrow::arrow::bitmap::utils::BitmapIter<'a>, + validity: databend_common_arrow::arrow::bitmap::utils::BitmapIter<'a>, } impl<'a, T: ValueType> Iterator for NullableIterator<'a, T> { diff --git a/src/query/expression/src/types/number.rs b/src/query/expression/src/types/number.rs index 728a9335f4f4..10c5acb172ca 100644 --- a/src/query/expression/src/types/number.rs +++ b/src/query/expression/src/types/number.rs @@ -16,7 +16,7 @@ use std::fmt::Debug; use std::marker::PhantomData; use std::ops::Range; -use common_arrow::arrow::buffer::Buffer; +use databend_common_arrow::arrow::buffer::Buffer; use enum_as_inner::EnumAsInner; use itertools::Itertools; use lexical_core::ToLexicalWithOptions; diff --git a/src/query/expression/src/types/string.rs b/src/query/expression/src/types/string.rs index 683c5a298de6..b911601d1287 100644 --- a/src/query/expression/src/types/string.rs +++ b/src/query/expression/src/types/string.rs @@ -15,10 +15,10 @@ use std::iter::once; use std::ops::Range; -use common_arrow::arrow::buffer::Buffer; -use common_arrow::arrow::trusted_len::TrustedLen; -use common_exception::ErrorCode; -use common_exception::Result; +use databend_common_arrow::arrow::buffer::Buffer; +use databend_common_arrow::arrow::trusted_len::TrustedLen; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; use serde::Deserialize; use serde::Serialize; diff --git a/src/query/expression/src/types/timestamp.rs b/src/query/expression/src/types/timestamp.rs index 4aecd2511f03..27fdda29ab6d 100644 --- a/src/query/expression/src/types/timestamp.rs +++ b/src/query/expression/src/types/timestamp.rs @@ -18,10 +18,10 @@ use std::ops::Range; use chrono::DateTime; use chrono_tz::Tz; -use common_arrow::arrow::buffer::Buffer; -use common_io::cursor_ext::BufferReadDateTimeExt; -use common_io::cursor_ext::DateTimeResType; -use common_io::cursor_ext::ReadBytesExt; +use databend_common_arrow::arrow::buffer::Buffer; +use databend_common_io::cursor_ext::BufferReadDateTimeExt; +use databend_common_io::cursor_ext::DateTimeResType; +use databend_common_io::cursor_ext::ReadBytesExt; use super::number::SimpleDomain; use crate::property::Domain; diff --git a/src/query/expression/src/utils/arrow.rs b/src/query/expression/src/utils/arrow.rs index 3187c7b92574..a526dba03d69 100644 --- a/src/query/expression/src/utils/arrow.rs +++ b/src/query/expression/src/utils/arrow.rs @@ -14,15 +14,15 @@ use std::io::Cursor; -use common_arrow::arrow::array::Array; -use common_arrow::arrow::bitmap::Bitmap; -use common_arrow::arrow::bitmap::MutableBitmap; -use common_arrow::arrow::buffer::Buffer; -use common_arrow::arrow::datatypes::Schema; -use common_arrow::arrow::io::ipc::read::read_file_metadata; -use common_arrow::arrow::io::ipc::read::FileReader; -use common_arrow::arrow::io::ipc::write::FileWriter; -use common_arrow::arrow::io::ipc::write::WriteOptions as IpcWriteOptions; +use databend_common_arrow::arrow::array::Array; +use databend_common_arrow::arrow::bitmap::Bitmap; +use databend_common_arrow::arrow::bitmap::MutableBitmap; +use databend_common_arrow::arrow::buffer::Buffer; +use databend_common_arrow::arrow::datatypes::Schema; +use databend_common_arrow::arrow::io::ipc::read::read_file_metadata; +use databend_common_arrow::arrow::io::ipc::read::FileReader; +use databend_common_arrow::arrow::io::ipc::write::FileWriter; +use databend_common_arrow::arrow::io::ipc::write::WriteOptions as IpcWriteOptions; use crate::BlockEntry; use crate::Column; @@ -70,7 +70,7 @@ pub fn serialize_column(col: &Column) -> Vec { writer.start().unwrap(); writer .write( - &common_arrow::arrow::chunk::Chunk::new(vec![col.as_arrow()]), + &databend_common_arrow::arrow::chunk::Chunk::new(vec![col.as_arrow()]), None, ) .unwrap(); diff --git a/src/query/expression/src/utils/block_debug.rs b/src/query/expression/src/utils/block_debug.rs index b9e74e2ee540..0f921757f7c8 100644 --- a/src/query/expression/src/utils/block_debug.rs +++ b/src/query/expression/src/utils/block_debug.rs @@ -17,7 +17,7 @@ use std::collections::HashSet; use comfy_table::Cell; use comfy_table::CellAlignment; use comfy_table::Table; -use common_exception::Result; +use databend_common_exception::Result; use terminal_size::terminal_size; use terminal_size::Width; use unicode_segmentation::UnicodeSegmentation; diff --git a/src/query/expression/src/utils/block_thresholds.rs b/src/query/expression/src/utils/block_thresholds.rs index a5a496a9e5d5..81efe9401ce1 100644 --- a/src/query/expression/src/utils/block_thresholds.rs +++ b/src/query/expression/src/utils/block_thresholds.rs @@ -12,9 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_io::constants::DEFAULT_BLOCK_BUFFER_SIZE; -use common_io::constants::DEFAULT_BLOCK_MAX_ROWS; -use common_io::constants::DEFAULT_BLOCK_MIN_ROWS; +use databend_common_io::constants::DEFAULT_BLOCK_BUFFER_SIZE; +use databend_common_io::constants::DEFAULT_BLOCK_MAX_ROWS; +use databend_common_io::constants::DEFAULT_BLOCK_MIN_ROWS; #[derive(Clone, Copy, Debug, serde::Serialize, serde::Deserialize)] pub struct BlockThresholds { diff --git a/src/query/expression/src/utils/column_from.rs b/src/query/expression/src/utils/column_from.rs index 6503257c429e..719214c14527 100755 --- a/src/query/expression/src/utils/column_from.rs +++ b/src/query/expression/src/utils/column_from.rs @@ -14,7 +14,7 @@ use std::iter::Iterator; -use common_arrow::arrow::bitmap::MutableBitmap; +use databend_common_arrow::arrow::bitmap::MutableBitmap; use itertools::Itertools; use crate::types::decimal::*; diff --git a/src/query/expression/src/utils/date_helper.rs b/src/query/expression/src/utils/date_helper.rs index 631c061fc345..197612e741b3 100644 --- a/src/query/expression/src/utils/date_helper.rs +++ b/src/query/expression/src/utils/date_helper.rs @@ -26,8 +26,8 @@ use chrono::TimeZone; use chrono::Timelike; use chrono::Utc; use chrono_tz::Tz; -use common_exception::ErrorCode; -use common_exception::Result; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; use num_traits::AsPrimitive; use crate::types::date::check_date; diff --git a/src/query/expression/src/utils/display.rs b/src/query/expression/src/utils/display.rs index d063c8decff2..587fa98f2e6b 100755 --- a/src/query/expression/src/utils/display.rs +++ b/src/query/expression/src/utils/display.rs @@ -19,8 +19,8 @@ use std::fmt::Formatter; use chrono_tz::Tz; use comfy_table::Cell; use comfy_table::Table; -use common_io::display_decimal_128; -use common_io::display_decimal_256; +use databend_common_io::display_decimal_128; +use databend_common_io::display_decimal_256; use itertools::Itertools; use num_traits::FromPrimitive; use roaring::RoaringTreemap; diff --git a/src/query/expression/src/utils/filter_helper.rs b/src/query/expression/src/utils/filter_helper.rs index 6997a8476dd4..b3f1e2db1ccd 100644 --- a/src/query/expression/src/utils/filter_helper.rs +++ b/src/query/expression/src/utils/filter_helper.rs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_arrow::arrow::bitmap::MutableBitmap; +use databend_common_arrow::arrow::bitmap::MutableBitmap; use crate::arrow::bitmap_into_mut; use crate::types::BooleanType; diff --git a/src/query/expression/src/utils/mod.rs b/src/query/expression/src/utils/mod.rs index 2bc5ffc6be12..7da770b977ae 100644 --- a/src/query/expression/src/utils/mod.rs +++ b/src/query/expression/src/utils/mod.rs @@ -25,9 +25,9 @@ pub mod serialize; pub mod udf_client; pub mod variant_transform; -use common_arrow::arrow::bitmap::Bitmap; -use common_exception::Result; -use common_exception::Span; +use databend_common_arrow::arrow::bitmap::Bitmap; +use databend_common_exception::Result; +use databend_common_exception::Span; use ethnum::i256; pub use self::column_from::*; diff --git a/src/query/expression/src/utils/serialize.rs b/src/query/expression/src/utils/serialize.rs index f079c6ed06d8..b95a70d53662 100644 --- a/src/query/expression/src/utils/serialize.rs +++ b/src/query/expression/src/utils/serialize.rs @@ -16,8 +16,8 @@ use std::cmp::Ordering; use chrono::Datelike; use chrono::NaiveDate; -use common_exception::ErrorCode; -use common_exception::Result; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; use crate::types::decimal::Decimal; use crate::types::decimal::DecimalSize; diff --git a/src/query/expression/src/utils/udf_client.rs b/src/query/expression/src/utils/udf_client.rs index 3bfb1c1292f8..78d511c4b26c 100644 --- a/src/query/expression/src/utils/udf_client.rs +++ b/src/query/expression/src/utils/udf_client.rs @@ -20,8 +20,8 @@ use arrow_flight::encode::FlightDataEncoderBuilder; use arrow_flight::flight_service_client::FlightServiceClient; use arrow_flight::FlightDescriptor; use arrow_select::concat::concat_batches; -use common_exception::ErrorCode; -use common_exception::Result; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; use futures::stream; use futures::StreamExt; use futures::TryStreamExt; diff --git a/src/query/expression/src/utils/variant_transform.rs b/src/query/expression/src/utils/variant_transform.rs index 9a4967abd5dd..3de215b17313 100644 --- a/src/query/expression/src/utils/variant_transform.rs +++ b/src/query/expression/src/utils/variant_transform.rs @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_exception::ErrorCode; -use common_exception::Result; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; use jsonb::parse_value; use jsonb::to_string; diff --git a/src/query/expression/src/values.rs b/src/query/expression/src/values.rs index 65e5b408b0a1..3deb35c1757f 100755 --- a/src/query/expression/src/values.rs +++ b/src/query/expression/src/values.rs @@ -19,19 +19,19 @@ use std::ops::Range; use base64::engine::general_purpose; use base64::prelude::*; -use common_arrow::arrow::bitmap::and; -use common_arrow::arrow::bitmap::Bitmap; -use common_arrow::arrow::bitmap::MutableBitmap; -use common_arrow::arrow::buffer::Buffer; -use common_arrow::arrow::compute::cast as arrow_cast; -use common_arrow::arrow::datatypes::DataType as ArrowDataType; -use common_arrow::arrow::datatypes::Field as ArrowField; -use common_arrow::arrow::datatypes::TimeUnit; -use common_arrow::arrow::offset::OffsetsBuffer; -use common_arrow::arrow::trusted_len::TrustedLen; -use common_exception::ErrorCode; -use common_exception::Result; -use common_io::prelude::BinaryRead; +use databend_common_arrow::arrow::bitmap::and; +use databend_common_arrow::arrow::bitmap::Bitmap; +use databend_common_arrow::arrow::bitmap::MutableBitmap; +use databend_common_arrow::arrow::buffer::Buffer; +use databend_common_arrow::arrow::compute::cast as arrow_cast; +use databend_common_arrow::arrow::datatypes::DataType as ArrowDataType; +use databend_common_arrow::arrow::datatypes::Field as ArrowField; +use databend_common_arrow::arrow::datatypes::TimeUnit; +use databend_common_arrow::arrow::offset::OffsetsBuffer; +use databend_common_arrow::arrow::trusted_len::TrustedLen; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_io::prelude::BinaryRead; use enum_as_inner::EnumAsInner; use ethnum::i256; use itertools::Itertools; @@ -951,20 +951,20 @@ impl Column { ArrowField::new(dummy, arrow_type, is_nullable) } - pub fn as_arrow(&self) -> Box { + pub fn as_arrow(&self) -> Box { let arrow_type = self.arrow_field().data_type().clone(); match self { - Column::Null { len } => Box::new(common_arrow::arrow::array::NullArray::new_null( - arrow_type, *len, - )), + Column::Null { len } => Box::new( + databend_common_arrow::arrow::array::NullArray::new_null(arrow_type, *len), + ), Column::EmptyArray { len } => Box::new( - common_arrow::arrow::array::NullArray::new_null(arrow_type, *len), + databend_common_arrow::arrow::array::NullArray::new_null(arrow_type, *len), + ), + Column::EmptyMap { len } => Box::new( + databend_common_arrow::arrow::array::NullArray::new_null(arrow_type, *len), ), - Column::EmptyMap { len } => Box::new(common_arrow::arrow::array::NullArray::new_null( - arrow_type, *len, - )), Column::Number(NumberColumn::UInt8(col)) => Box::new( - common_arrow::arrow::array::PrimitiveArray::::try_new( + databend_common_arrow::arrow::array::PrimitiveArray::::try_new( arrow_type, col.clone(), None, @@ -972,7 +972,7 @@ impl Column { .unwrap(), ), Column::Number(NumberColumn::UInt16(col)) => Box::new( - common_arrow::arrow::array::PrimitiveArray::::try_new( + databend_common_arrow::arrow::array::PrimitiveArray::::try_new( arrow_type, col.clone(), None, @@ -980,7 +980,7 @@ impl Column { .unwrap(), ), Column::Number(NumberColumn::UInt32(col)) => Box::new( - common_arrow::arrow::array::PrimitiveArray::::try_new( + databend_common_arrow::arrow::array::PrimitiveArray::::try_new( arrow_type, col.clone(), None, @@ -988,7 +988,7 @@ impl Column { .unwrap(), ), Column::Number(NumberColumn::UInt64(col)) => Box::new( - common_arrow::arrow::array::PrimitiveArray::::try_new( + databend_common_arrow::arrow::array::PrimitiveArray::::try_new( arrow_type, col.clone(), None, @@ -996,7 +996,7 @@ impl Column { .unwrap(), ), Column::Number(NumberColumn::Int8(col)) => Box::new( - common_arrow::arrow::array::PrimitiveArray::::try_new( + databend_common_arrow::arrow::array::PrimitiveArray::::try_new( arrow_type, col.clone(), None, @@ -1004,7 +1004,7 @@ impl Column { .unwrap(), ), Column::Number(NumberColumn::Int16(col)) => Box::new( - common_arrow::arrow::array::PrimitiveArray::::try_new( + databend_common_arrow::arrow::array::PrimitiveArray::::try_new( arrow_type, col.clone(), None, @@ -1012,7 +1012,7 @@ impl Column { .unwrap(), ), Column::Number(NumberColumn::Int32(col)) => Box::new( - common_arrow::arrow::array::PrimitiveArray::::try_new( + databend_common_arrow::arrow::array::PrimitiveArray::::try_new( arrow_type, col.clone(), None, @@ -1020,7 +1020,7 @@ impl Column { .unwrap(), ), Column::Number(NumberColumn::Int64(col)) => Box::new( - common_arrow::arrow::array::PrimitiveArray::::try_new( + databend_common_arrow::arrow::array::PrimitiveArray::::try_new( arrow_type, col.clone(), None, @@ -1031,7 +1031,7 @@ impl Column { let values = unsafe { std::mem::transmute::, Buffer>(col.clone()) }; Box::new( - common_arrow::arrow::array::PrimitiveArray::::try_new( + databend_common_arrow::arrow::array::PrimitiveArray::::try_new( arrow_type, values, None, ) .unwrap(), @@ -1041,14 +1041,14 @@ impl Column { let values = unsafe { std::mem::transmute::, Buffer>(col.clone()) }; Box::new( - common_arrow::arrow::array::PrimitiveArray::::try_new( + databend_common_arrow::arrow::array::PrimitiveArray::::try_new( arrow_type, values, None, ) .unwrap(), ) } Column::Decimal(DecimalColumn::Decimal128(col, _)) => Box::new( - common_arrow::arrow::array::PrimitiveArray::::try_new( + databend_common_arrow::arrow::array::PrimitiveArray::::try_new( arrow_type, col.clone(), None, @@ -1058,23 +1058,25 @@ impl Column { Column::Decimal(DecimalColumn::Decimal256(col, _)) => { let values = unsafe { std::mem::transmute(col.clone()) }; Box::new( - common_arrow::arrow::array::PrimitiveArray::::try_new( - arrow_type, - values, - None, - ) - .unwrap() + databend_common_arrow::arrow::array::PrimitiveArray::< + databend_common_arrow::arrow::types::i256, + >::try_new(arrow_type, values, None) + .unwrap(), ) } Column::Boolean(col) => Box::new( - common_arrow::arrow::array::BooleanArray::try_new(arrow_type, col.clone(), None) - .unwrap(), + databend_common_arrow::arrow::array::BooleanArray::try_new( + arrow_type, + col.clone(), + None, + ) + .unwrap(), ), Column::String(col) => { let offsets: Buffer = col.offsets().iter().map(|offset| *offset as i64).collect(); Box::new( - common_arrow::arrow::array::BinaryArray::::try_new( + databend_common_arrow::arrow::array::BinaryArray::::try_new( arrow_type, unsafe { OffsetsBuffer::new_unchecked(offsets) }, col.data().clone(), @@ -1085,7 +1087,7 @@ impl Column { } Column::Timestamp(col) => Box::new( - common_arrow::arrow::array::PrimitiveArray::::try_new( + databend_common_arrow::arrow::array::PrimitiveArray::::try_new( arrow_type, col.clone(), None, @@ -1093,7 +1095,7 @@ impl Column { .unwrap(), ), Column::Date(col) => Box::new( - common_arrow::arrow::array::PrimitiveArray::::try_new( + databend_common_arrow::arrow::array::PrimitiveArray::::try_new( arrow_type, col.clone(), None, @@ -1104,7 +1106,7 @@ impl Column { let offsets: Buffer = col.offsets.iter().map(|offset| *offset as i64).collect(); Box::new( - common_arrow::arrow::array::ListArray::::try_new( + databend_common_arrow::arrow::array::ListArray::::try_new( arrow_type, unsafe { OffsetsBuffer::new_unchecked(offsets) }, col.values.as_arrow(), @@ -1120,7 +1122,7 @@ impl Column { (ArrowDataType::Map(inner_field, _), Column::Tuple(fields)) => { let inner_type = inner_field.data_type.clone(); Box::new( - common_arrow::arrow::array::StructArray::try_new( + databend_common_arrow::arrow::array::StructArray::try_new( inner_type, fields.iter().map(|field| field.as_arrow()).collect(), None, @@ -1131,7 +1133,7 @@ impl Column { (_, _) => unreachable!(), }; Box::new( - common_arrow::arrow::array::MapArray::try_new( + databend_common_arrow::arrow::array::MapArray::try_new( arrow_type, unsafe { OffsetsBuffer::new_unchecked(offsets) }, values, @@ -1144,7 +1146,7 @@ impl Column { let offsets: Buffer = col.offsets().iter().map(|offset| *offset as i64).collect(); Box::new( - common_arrow::arrow::array::BinaryArray::::try_new( + databend_common_arrow::arrow::array::BinaryArray::::try_new( arrow_type, unsafe { OffsetsBuffer::new_unchecked(offsets) }, col.data().clone(), @@ -1158,7 +1160,7 @@ impl Column { Self::set_validity(arrow_array.clone(), &col.validity) } Column::Tuple(fields) => Box::new( - common_arrow::arrow::array::StructArray::try_new( + databend_common_arrow::arrow::array::StructArray::try_new( arrow_type, fields.iter().map(|field| field.as_arrow()).collect(), None, @@ -1169,7 +1171,7 @@ impl Column { let offsets: Buffer = col.offsets().iter().map(|offset| *offset as i64).collect(); Box::new( - common_arrow::arrow::array::BinaryArray::::try_new( + databend_common_arrow::arrow::array::BinaryArray::::try_new( arrow_type, unsafe { OffsetsBuffer::new_unchecked(offsets) }, col.data().clone(), @@ -1182,9 +1184,9 @@ impl Column { } pub fn set_validity( - arrow_array: Box, + arrow_array: Box, validity: &Bitmap, - ) -> Box { + ) -> Box { // merge Struct validity with the inner fields validity let validity = match arrow_array.validity() { Some(inner_validity) => and(inner_validity, validity), @@ -1197,7 +1199,7 @@ impl Column { ArrowDataType::Struct(_) => { let struct_array = arrow_array .as_any() - .downcast_ref::() + .downcast_ref::() .expect("fail to read from arrow: array should be `StructArray`"); let fields = struct_array .values() @@ -1208,7 +1210,7 @@ impl Column { }) .collect::>(); Box::new( - common_arrow::arrow::array::StructArray::try_new( + databend_common_arrow::arrow::array::StructArray::try_new( arrow_array.data_type().clone(), fields, Some(validity), @@ -1251,11 +1253,11 @@ impl Column { } pub fn from_arrow( - arrow_col: &dyn common_arrow::arrow::array::Array, + arrow_col: &dyn databend_common_arrow::arrow::array::Array, data_type: &DataType, ) -> Column { fn from_arrow_by_array_type( - arrow_col: &dyn common_arrow::arrow::array::Array, + arrow_col: &dyn databend_common_arrow::arrow::array::Array, array_type: &ArrowDataType, data_type: &DataType, ) -> Column { @@ -1286,7 +1288,7 @@ impl Column { ArrowDataType::UInt8 => Column::Number(NumberColumn::UInt8( arrow_col .as_any() - .downcast_ref::() + .downcast_ref::() .expect("fail to read from arrow: array should be `UInt8Array`") .values() .clone(), @@ -1294,7 +1296,7 @@ impl Column { ArrowDataType::UInt16 => Column::Number(NumberColumn::UInt16( arrow_col .as_any() - .downcast_ref::() + .downcast_ref::() .expect("fail to read from arrow: array should be `UInt16Array`") .values() .clone(), @@ -1302,7 +1304,7 @@ impl Column { ArrowDataType::UInt32 => Column::Number(NumberColumn::UInt32( arrow_col .as_any() - .downcast_ref::() + .downcast_ref::() .expect("fail to read from arrow: array should be `UInt32Array`") .values() .clone(), @@ -1310,7 +1312,7 @@ impl Column { ArrowDataType::UInt64 => Column::Number(NumberColumn::UInt64( arrow_col .as_any() - .downcast_ref::() + .downcast_ref::() .expect("fail to read from arrow: array should be `UInt64Array`") .values() .clone(), @@ -1318,7 +1320,7 @@ impl Column { ArrowDataType::Int8 => Column::Number(NumberColumn::Int8( arrow_col .as_any() - .downcast_ref::() + .downcast_ref::() .expect("fail to read from arrow: array should be `Int8Array`") .values() .clone(), @@ -1326,7 +1328,7 @@ impl Column { ArrowDataType::Int16 => Column::Number(NumberColumn::Int16( arrow_col .as_any() - .downcast_ref::() + .downcast_ref::() .expect("fail to read from arrow: array should be `Int16Array`") .values() .clone(), @@ -1334,7 +1336,7 @@ impl Column { ArrowDataType::Int32 => Column::Number(NumberColumn::Int32( arrow_col .as_any() - .downcast_ref::() + .downcast_ref::() .expect("fail to read from arrow: array should be `Int32Array`") .values() .clone(), @@ -1342,7 +1344,7 @@ impl Column { ArrowDataType::Int64 => Column::Number(NumberColumn::Int64( arrow_col .as_any() - .downcast_ref::() + .downcast_ref::() .expect("fail to read from arrow: array should be `Int64Array`") .values() .clone(), @@ -1350,7 +1352,7 @@ impl Column { ArrowDataType::Float32 => { let col = arrow_col .as_any() - .downcast_ref::() + .downcast_ref::() .expect("fail to read from arrow: array should be `Float32Array`") .values() .clone(); @@ -1360,7 +1362,7 @@ impl Column { ArrowDataType::Float64 => { let col = arrow_col .as_any() - .downcast_ref::() + .downcast_ref::() .expect("fail to read from arrow: array should be `Float64Array`") .values() .clone(); @@ -1370,7 +1372,7 @@ impl Column { ArrowDataType::Boolean => Column::Boolean( arrow_col .as_any() - .downcast_ref::() + .downcast_ref::() .expect("fail to read from arrow: array should be `BooleanArray`") .values() .clone(), @@ -1378,7 +1380,7 @@ impl Column { ArrowDataType::LargeBinary => { let arrow_col = arrow_col .as_any() - .downcast_ref::>() + .downcast_ref::>() .expect("fail to read from arrow: array should be `BinaryArray`"); let offsets = arrow_col.offsets().clone().into_inner(); @@ -1399,7 +1401,7 @@ impl Column { ArrowDataType::Binary => { let arrow_col = arrow_col .as_any() - .downcast_ref::>() + .downcast_ref::>() .expect("fail to read from arrow: array should be `BinaryArray`"); let offsets = arrow_col .offsets() @@ -1427,7 +1429,7 @@ impl Column { ArrowDataType::FixedSizeBinary(size) => { let arrow_col = arrow_col .as_any() - .downcast_ref::() + .downcast_ref::() .expect("fail to read from arrow: array should be `FixedSizeBinaryArray`"); let offsets = (0..arrow_col.len() as u64 + 1) @@ -1444,7 +1446,7 @@ impl Column { ArrowDataType::Utf8 => { let arrow_col = arrow_col .as_any() - .downcast_ref::>() + .downcast_ref::>() .expect("fail to read from arrow: array should be `Utf8Array`"); let offsets = arrow_col .offsets() @@ -1462,7 +1464,7 @@ impl Column { ArrowDataType::LargeUtf8 => { let arrow_col = arrow_col .as_any() - .downcast_ref::>() + .downcast_ref::>() .expect("fail to read from arrow: array should be `Utf8Array`"); let offsets = arrow_col .offsets() @@ -1479,7 +1481,7 @@ impl Column { ArrowDataType::Timestamp(uint, _) => { let values = arrow_col .as_any() - .downcast_ref::() + .downcast_ref::() .expect("fail to read from arrow: array should be `Int64Array`") .values(); let convert = match uint { @@ -1503,7 +1505,7 @@ impl Column { ArrowDataType::Date32 => Column::Date( arrow_col .as_any() - .downcast_ref::() + .downcast_ref::() .expect("fail to read from arrow: array should be `Int32Array`") .values() .clone(), @@ -1513,7 +1515,7 @@ impl Column { ArrowDataType::LargeBinary => { let arrow_col = arrow_col .as_any() - .downcast_ref::>() + .downcast_ref::>() .expect( "fail to read from arrow: array should be `BinaryArray`", ); @@ -1527,7 +1529,7 @@ impl Column { ArrowDataType::Binary => { let arrow_col = arrow_col .as_any() - .downcast_ref::>() + .downcast_ref::>() .expect( "fail to read from arrow: array should be `BinaryArray`", ); @@ -1560,7 +1562,7 @@ impl Column { let values_col = array_list .as_any() - .downcast_ref::>() + .downcast_ref::>() .expect("fail to read from arrow: array should be `ListArray`"); let array_type = data_type.as_array().unwrap(); @@ -1579,7 +1581,7 @@ impl Column { ArrowDataType::LargeList(_) => { let values_col = arrow_col .as_any() - .downcast_ref::>() + .downcast_ref::>() .expect("fail to read from arrow: array should be `ListArray`"); let array_type = data_type.as_array().unwrap(); @@ -1599,7 +1601,7 @@ impl Column { let map_type = data_type.as_map().unwrap(); let map_col = arrow_col .as_any() - .downcast_ref::() + .downcast_ref::() .expect("fail to read from arrow: array should be `MapArray`"); let values = Column::from_arrow(&**map_col.field(), map_type.as_ref()); @@ -1618,7 +1620,7 @@ impl Column { let struct_type = data_type.as_tuple().unwrap(); let arrow_col = arrow_col .as_any() - .downcast_ref::() + .downcast_ref::() .expect("fail to read from arrow: array should be `StructArray`"); let fields = arrow_col .values() @@ -1631,7 +1633,7 @@ impl Column { ArrowDataType::Decimal(precision, scale) => { let arrow_col = arrow_col .as_any() - .downcast_ref::>() + .downcast_ref::>() .expect("fail to read from arrow: array should be `DecimalArray`"); Column::Decimal(DecimalColumn::Decimal128( arrow_col.values().clone(), @@ -1642,13 +1644,12 @@ impl Column { )) } ArrowDataType::Decimal256(precision, scale) => { - let arrow_col = - arrow_col - .as_any() - .downcast_ref::>() - .expect("fail to read from arrow: array should be `DecimalArray`"); + let arrow_col = arrow_col + .as_any() + .downcast_ref::>() + .expect("fail to read from arrow: array should be `DecimalArray`"); let values = unsafe { std::mem::transmute(arrow_col.values().clone()) }; Column::Decimal(DecimalColumn::Decimal256(values, DecimalSize { @@ -1661,7 +1662,7 @@ impl Column { ArrowDataType::LargeBinary => { let arrow_col = arrow_col .as_any() - .downcast_ref::>() + .downcast_ref::>() .expect( "fail to read from arrow: array should be `BinaryArray`", ); @@ -1674,7 +1675,7 @@ impl Column { ArrowDataType::Binary => { let arrow_col = arrow_col .as_any() - .downcast_ref::>() + .downcast_ref::>() .expect( "fail to read from arrow: array should be `BinaryArray`", ); diff --git a/src/query/expression/tests/it/block.rs b/src/query/expression/tests/it/block.rs index 397c769028bb..561d9faae023 100644 --- a/src/query/expression/tests/it/block.rs +++ b/src/query/expression/tests/it/block.rs @@ -1,12 +1,12 @@ -use common_expression::block_debug::box_render; -use common_expression::types::string::StringColumnBuilder; -use common_expression::types::DataType; -use common_expression::types::Int32Type; -use common_expression::types::NumberDataType; -use common_expression::Column; -use common_expression::DataField; -use common_expression::DataSchemaRefExt; -use common_expression::FromData; +use databend_common_expression::block_debug::box_render; +use databend_common_expression::types::string::StringColumnBuilder; +use databend_common_expression::types::DataType; +use databend_common_expression::types::Int32Type; +use databend_common_expression::types::NumberDataType; +use databend_common_expression::Column; +use databend_common_expression::DataField; +use databend_common_expression::DataSchemaRefExt; +use databend_common_expression::FromData; use crate::common::new_block; diff --git a/src/query/expression/tests/it/column.rs b/src/query/expression/tests/it/column.rs index ba6858b6dd2d..9ca865ed9b3b 100644 --- a/src/query/expression/tests/it/column.rs +++ b/src/query/expression/tests/it/column.rs @@ -12,12 +12,12 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_arrow::arrow::array::new_empty_array; -use common_arrow::arrow::datatypes::DataType as ArrowDataType; -use common_exception::Result; -use common_expression::types::DataType; -use common_expression::types::NumberDataType; -use common_expression::Column; +use databend_common_arrow::arrow::array::new_empty_array; +use databend_common_arrow::arrow::datatypes::DataType as ArrowDataType; +use databend_common_exception::Result; +use databend_common_expression::types::DataType; +use databend_common_expression::types::NumberDataType; +use databend_common_expression::Column; #[test] fn test_from_arrow_extension_to_column() -> Result<()> { diff --git a/src/query/expression/tests/it/common.rs b/src/query/expression/tests/it/common.rs index e4933ec5f111..c2dd01b0f952 100644 --- a/src/query/expression/tests/it/common.rs +++ b/src/query/expression/tests/it/common.rs @@ -14,12 +14,12 @@ use std::io::Write; -use common_arrow::arrow::compute::merge_sort::MergeSlice; -use common_expression::BlockEntry; -use common_expression::BlockRowIndex; -use common_expression::Column; -use common_expression::DataBlock; -use common_expression::Value; +use databend_common_arrow::arrow::compute::merge_sort::MergeSlice; +use databend_common_expression::BlockEntry; +use databend_common_expression::BlockRowIndex; +use databend_common_expression::Column; +use databend_common_expression::DataBlock; +use databend_common_expression::Value; pub fn new_block(columns: &[Column]) -> DataBlock { let len = columns.first().map_or(1, |c| c.len()); diff --git a/src/query/expression/tests/it/decimal.rs b/src/query/expression/tests/it/decimal.rs index f949531b60e5..586a3852cbbc 100644 --- a/src/query/expression/tests/it/decimal.rs +++ b/src/query/expression/tests/it/decimal.rs @@ -12,15 +12,15 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_exception::Result; -use common_expression::serialize::read_decimal; -use common_expression::serialize::read_decimal_with_size; -use common_expression::type_check::common_super_type; -use common_expression::types::decimal::Decimal; -use common_expression::types::decimal::DecimalSize; -use common_expression::types::DataType; -use common_expression::types::DecimalDataType; -use common_expression::types::NumberDataType; +use databend_common_exception::Result; +use databend_common_expression::serialize::read_decimal; +use databend_common_expression::serialize::read_decimal_with_size; +use databend_common_expression::type_check::common_super_type; +use databend_common_expression::types::decimal::Decimal; +use databend_common_expression::types::decimal::DecimalSize; +use databend_common_expression::types::DataType; +use databend_common_expression::types::DecimalDataType; +use databend_common_expression::types::NumberDataType; use pretty_assertions::assert_eq; #[test] diff --git a/src/query/expression/tests/it/fill_field_default_value.rs b/src/query/expression/tests/it/fill_field_default_value.rs index 2642045dc7df..55c750c8d806 100644 --- a/src/query/expression/tests/it/fill_field_default_value.rs +++ b/src/query/expression/tests/it/fill_field_default_value.rs @@ -14,14 +14,14 @@ use std::collections::HashSet; -use common_arrow::arrow::chunk::Chunk; -use common_arrow::ArrayRef; -use common_exception::Result; -use common_expression::types::number::*; -use common_expression::types::DataType; -use common_expression::types::NumberDataType; -use common_expression::types::StringType; -use common_expression::*; +use databend_common_arrow::arrow::chunk::Chunk; +use databend_common_arrow::ArrayRef; +use databend_common_exception::Result; +use databend_common_expression::types::number::*; +use databend_common_expression::types::DataType; +use databend_common_expression::types::NumberDataType; +use databend_common_expression::types::StringType; +use databend_common_expression::*; use goldenfile::Mint; use crate::common::*; diff --git a/src/query/expression/tests/it/group_by.rs b/src/query/expression/tests/it/group_by.rs index ecf38230822d..26fea7d035c5 100644 --- a/src/query/expression/tests/it/group_by.rs +++ b/src/query/expression/tests/it/group_by.rs @@ -12,11 +12,11 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_exception::Result; -use common_expression::types::number::*; -use common_expression::types::NumberDataType; -use common_expression::types::StringType; -use common_expression::*; +use databend_common_exception::Result; +use databend_common_expression::types::number::*; +use databend_common_expression::types::NumberDataType; +use databend_common_expression::types::StringType; +use databend_common_expression::*; use crate::common::new_block; diff --git a/src/query/expression/tests/it/kernel.rs b/src/query/expression/tests/it/kernel.rs index b1bc5a25ab8c..d40fb88f874c 100644 --- a/src/query/expression/tests/it/kernel.rs +++ b/src/query/expression/tests/it/kernel.rs @@ -14,16 +14,16 @@ use core::ops::Range; -use common_expression::block_debug::assert_block_value_eq; -use common_expression::types::number::*; -use common_expression::types::DataType; -use common_expression::types::NumberDataType; -use common_expression::types::StringType; -use common_expression::BlockEntry; -use common_expression::Column; -use common_expression::DataBlock; -use common_expression::FromData; -use common_expression::Value; +use databend_common_expression::block_debug::assert_block_value_eq; +use databend_common_expression::types::number::*; +use databend_common_expression::types::DataType; +use databend_common_expression::types::NumberDataType; +use databend_common_expression::types::StringType; +use databend_common_expression::BlockEntry; +use databend_common_expression::Column; +use databend_common_expression::DataBlock; +use databend_common_expression::FromData; +use databend_common_expression::Value; use goldenfile::Mint; use crate::common::*; @@ -222,11 +222,11 @@ pub fn build_range_selection(selection: &[u32], count: usize) -> Vec> /// This test covers take.rs, take_chunks.rs, take_compact.rs, take_ranges.rs, filter.rs, concat.rs. #[test] -pub fn test_take_and_filter_and_concat() -> common_exception::Result<()> { - use common_expression::types::DataType; - use common_expression::Column; - use common_expression::DataBlock; - use common_hashtable::RowPtr; +pub fn test_take_and_filter_and_concat() -> databend_common_exception::Result<()> { + use databend_common_expression::types::DataType; + use databend_common_expression::Column; + use databend_common_expression::DataBlock; + use databend_common_hashtable::RowPtr; use itertools::Itertools; use rand::Rng; @@ -339,7 +339,7 @@ pub fn test_take_and_filter_and_concat() -> common_exception::Result<()> { /// Add more tests for take_compact.rs. #[test] -pub fn test_take_compact() -> common_exception::Result<()> { +pub fn test_take_compact() -> databend_common_exception::Result<()> { use rand::Rng; let mut rng = rand::thread_rng(); @@ -380,10 +380,10 @@ pub fn test_take_compact() -> common_exception::Result<()> { /// B = A + A + A, l = A.len() /// B.slice(0, l) == B.slice(l, l) == A #[test] -pub fn test_filters() -> common_exception::Result<()> { - use common_expression::types::DataType; - use common_expression::Column; - use common_expression::DataBlock; +pub fn test_filters() -> databend_common_exception::Result<()> { + use databend_common_expression::types::DataType; + use databend_common_expression::Column; + use databend_common_expression::DataBlock; use rand::Rng; let mut rng = rand::thread_rng(); @@ -443,8 +443,8 @@ pub fn test_filters() -> common_exception::Result<()> { } #[test] -pub fn test_divide_indices_by_scatter_size() -> common_exception::Result<()> { - use common_expression::DataBlock; +pub fn test_divide_indices_by_scatter_size() -> databend_common_exception::Result<()> { + use databend_common_expression::DataBlock; use itertools::Itertools; use rand::Rng; @@ -483,8 +483,8 @@ pub fn test_divide_indices_by_scatter_size() -> common_exception::Result<()> { /// This test covers scatter.rs. #[test] -pub fn test_scatter() -> common_exception::Result<()> { - use common_expression::DataBlock; +pub fn test_scatter() -> databend_common_exception::Result<()> { + use databend_common_expression::DataBlock; use itertools::Itertools; use rand::Rng; diff --git a/src/query/expression/tests/it/main.rs b/src/query/expression/tests/it/main.rs index 0a55c4793b8e..08bc12c8dff5 100644 --- a/src/query/expression/tests/it/main.rs +++ b/src/query/expression/tests/it/main.rs @@ -15,12 +15,12 @@ #![feature(box_patterns)] #![feature(try_blocks)] -use common_expression::types::DataType; -use common_expression::types::DecimalDataType; -use common_expression::types::DecimalSize; -use common_expression::types::NumberDataType; -use common_expression::Column; -use common_expression::DataBlock; +use databend_common_expression::types::DataType; +use databend_common_expression::types::DecimalDataType; +use databend_common_expression::types::DecimalSize; +use databend_common_expression::types::NumberDataType; +use databend_common_expression::Column; +use databend_common_expression::DataBlock; extern crate core; diff --git a/src/query/expression/tests/it/row.rs b/src/query/expression/tests/it/row.rs index a5b9ed0e072a..6cca2a3e4537 100644 --- a/src/query/expression/tests/it/row.rs +++ b/src/query/expression/tests/it/row.rs @@ -17,16 +17,16 @@ use std::sync::Arc; use arrow_ord::sort::LexicographicalComparator; use arrow_ord::sort::SortColumn; use arrow_schema::SortOptions; -use common_arrow::arrow::bitmap::MutableBitmap; -use common_arrow::arrow::offset::OffsetsBuffer; -use common_expression::types::decimal::*; -use common_expression::types::nullable::NullableColumn; -use common_expression::types::string::StringColumnBuilder; -use common_expression::types::*; -use common_expression::Column; -use common_expression::FromData; -use common_expression::RowConverter; -use common_expression::SortField; +use databend_common_arrow::arrow::bitmap::MutableBitmap; +use databend_common_arrow::arrow::offset::OffsetsBuffer; +use databend_common_expression::types::decimal::*; +use databend_common_expression::types::nullable::NullableColumn; +use databend_common_expression::types::string::StringColumnBuilder; +use databend_common_expression::types::*; +use databend_common_expression::Column; +use databend_common_expression::FromData; +use databend_common_expression::RowConverter; +use databend_common_expression::SortField; use ethnum::i256; use itertools::Itertools; use jsonb::convert_to_comparable; @@ -474,8 +474,8 @@ fn fuzz_test() { let offsets = sc.offsets().iter().map(|offset| *offset as i32).collect(); let array = Box::new( - common_arrow::arrow::array::Utf8Array::::try_new( - common_arrow::arrow::datatypes::DataType::Utf8, + databend_common_arrow::arrow::array::Utf8Array::::try_new( + databend_common_arrow::arrow::datatypes::DataType::Utf8, unsafe { OffsetsBuffer::new_unchecked(offsets) }, sc.data().clone(), None, diff --git a/src/query/expression/tests/it/schema.rs b/src/query/expression/tests/it/schema.rs index 06fbd9a4d38b..ac2bdede8824 100644 --- a/src/query/expression/tests/it/schema.rs +++ b/src/query/expression/tests/it/schema.rs @@ -14,16 +14,16 @@ use std::collections::BTreeMap; -use common_arrow::arrow::datatypes::DataType as ArrowDataType; -use common_arrow::arrow::datatypes::Field as ArrowField; -use common_exception::Result; -use common_expression::create_test_complex_schema; -use common_expression::types::NumberDataType; -use common_expression::ColumnId; -use common_expression::Scalar; -use common_expression::TableDataType; -use common_expression::TableField; -use common_expression::TableSchema; +use databend_common_arrow::arrow::datatypes::DataType as ArrowDataType; +use databend_common_arrow::arrow::datatypes::Field as ArrowField; +use databend_common_exception::Result; +use databend_common_expression::create_test_complex_schema; +use databend_common_expression::types::NumberDataType; +use databend_common_expression::ColumnId; +use databend_common_expression::Scalar; +use databend_common_expression::TableDataType; +use databend_common_expression::TableField; +use databend_common_expression::TableSchema; use pretty_assertions::assert_eq; #[test] @@ -211,22 +211,22 @@ fn test_field_leaf_default_values() -> Result<()> { let schema = TableSchema::new(fields); let default_values = vec![ - Scalar::Number(common_expression::types::number::NumberScalar::UInt64(1)), + Scalar::Number(databend_common_expression::types::number::NumberScalar::UInt64(1)), Scalar::Tuple(vec![ Scalar::Tuple(vec![ Scalar::Boolean(true), Scalar::String(['a', 'b'].iter().map(|c| *c as u8).collect::>()), ]), - Scalar::Number(common_expression::types::number::NumberScalar::Int64(2)), + Scalar::Number(databend_common_expression::types::number::NumberScalar::Int64(2)), ]), - Scalar::Number(common_expression::types::number::NumberScalar::UInt64(10)), + Scalar::Number(databend_common_expression::types::number::NumberScalar::UInt64(10)), ]; let leaf_default_values = schema.field_leaf_default_values(&default_values); let expected_leaf_default_values: Vec<(ColumnId, Scalar)> = vec![ ( 0, - Scalar::Number(common_expression::types::number::NumberScalar::UInt64(1)), + Scalar::Number(databend_common_expression::types::number::NumberScalar::UInt64(1)), ), (1, Scalar::Boolean(true)), ( @@ -235,11 +235,11 @@ fn test_field_leaf_default_values() -> Result<()> { ), ( 3, - Scalar::Number(common_expression::types::number::NumberScalar::Int64(2)), + Scalar::Number(databend_common_expression::types::number::NumberScalar::Int64(2)), ), ( 4, - Scalar::Number(common_expression::types::number::NumberScalar::UInt64(10)), + Scalar::Number(databend_common_expression::types::number::NumberScalar::UInt64(10)), ), ]; expected_leaf_default_values diff --git a/src/query/expression/tests/it/serde.rs b/src/query/expression/tests/it/serde.rs index 0f4db1614add..b2df32b3c739 100644 --- a/src/query/expression/tests/it/serde.rs +++ b/src/query/expression/tests/it/serde.rs @@ -14,17 +14,17 @@ use std::vec; -use common_exception::Result; -use common_expression::arrow::deserialize_column; -use common_expression::arrow::serialize_column; -use common_expression::types::DataType; -use common_expression::types::StringType; -use common_expression::Column; -use common_expression::FromData; -use common_expression::RemoteExpr; -use common_expression::Scalar; -use common_io::prelude::bincode_deserialize_from_slice; -use common_io::prelude::bincode_serialize_into_buf; +use databend_common_exception::Result; +use databend_common_expression::arrow::deserialize_column; +use databend_common_expression::arrow::serialize_column; +use databend_common_expression::types::DataType; +use databend_common_expression::types::StringType; +use databend_common_expression::Column; +use databend_common_expression::FromData; +use databend_common_expression::RemoteExpr; +use databend_common_expression::Scalar; +use databend_common_io::prelude::bincode_deserialize_from_slice; +use databend_common_io::prelude::bincode_serialize_into_buf; #[test] fn test_serde_column() -> Result<()> { diff --git a/src/query/expression/tests/it/sort.rs b/src/query/expression/tests/it/sort.rs index 7ab0b1da047d..12678d21d6d4 100644 --- a/src/query/expression/tests/it/sort.rs +++ b/src/query/expression/tests/it/sort.rs @@ -15,14 +15,14 @@ use std::sync::Arc; use std::vec; -use common_exception::Result; -use common_expression::types::decimal::*; -use common_expression::types::number::*; -use common_expression::types::StringType; -use common_expression::Column; -use common_expression::DataBlock; -use common_expression::FromData; -use common_expression::SortColumnDescription; +use databend_common_exception::Result; +use databend_common_expression::types::decimal::*; +use databend_common_expression::types::number::*; +use databend_common_expression::types::StringType; +use databend_common_expression::Column; +use databend_common_expression::DataBlock; +use databend_common_expression::FromData; +use databend_common_expression::SortColumnDescription; use crate::common::new_block; diff --git a/src/query/formats/Cargo.toml b/src/query/formats/Cargo.toml index e09f04ed7f36..1d8870784aab 100644 --- a/src/query/formats/Cargo.toml +++ b/src/query/formats/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "common-formats" +name = "databend-common-formats" version = { workspace = true } authors = { workspace = true } license = { workspace = true } @@ -24,19 +24,18 @@ roaring = { version = "0.10.1", features = ["serde"] } serde_json = { workspace = true } # Workspace dependencies -common-arrow = { path = "../../common/arrow" } -common-exception = { path = "../../common/exception" } -common-expression = { path = "../expression" } -common-io = { path = "../../common/io" } -common-meta-app = { path = "../../meta/app" } -common-settings = { path = "../settings" } +databend-common-arrow = { path = "../../common/arrow" } +databend-common-exception = { path = "../../common/exception" } +databend-common-expression = { path = "../expression" } +databend-common-io = { path = "../../common/io" } +databend-common-meta-app = { path = "../../meta/app" } +databend-common-settings = { path = "../settings" } +databend-storages-common-blocks = { path = "../storages/common/blocks" } +databend-storages-common-table-meta = { path = "../storages/common/table_meta" } jsonb = { workspace = true } -storages-common-blocks = { path = "../storages/common/blocks" } -storages-common-table-meta = { path = "../storages/common/table_meta" } - [dev-dependencies] -common-arrow = { path = "../../common/arrow" } +databend-common-arrow = { path = "../../common/arrow" } tokio = { workspace = true } pretty_assertions = "1.3.0" diff --git a/src/query/formats/src/clickhouse.rs b/src/query/formats/src/clickhouse.rs index aa849d744a0c..3b2280a95a47 100644 --- a/src/query/formats/src/clickhouse.rs +++ b/src/query/formats/src/clickhouse.rs @@ -14,9 +14,9 @@ use std::str::FromStr; -use common_exception::ErrorCode; -use common_exception::Result; -use common_meta_app::principal::StageFileFormatType; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_meta_app::principal::StageFileFormatType; const SUFFIX_WITH_NAMES_AND_TYPES: &str = "withnamesandtypes"; const SUFFIX_WITH_NAMES: &str = "withnames"; diff --git a/src/query/formats/src/delimiter.rs b/src/query/formats/src/delimiter.rs index 43d29f228c42..97b4e0425ec6 100644 --- a/src/query/formats/src/delimiter.rs +++ b/src/query/formats/src/delimiter.rs @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_exception::ErrorCode; -use common_exception::Result; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; #[derive(Debug, Default)] pub enum RecordDelimiter { diff --git a/src/query/formats/src/field_decoder/fast_values.rs b/src/query/formats/src/field_decoder/fast_values.rs index dd94c475d3af..a5fa9664f217 100644 --- a/src/query/formats/src/field_decoder/fast_values.rs +++ b/src/query/formats/src/field_decoder/fast_values.rs @@ -22,39 +22,39 @@ use std::sync::LazyLock; use aho_corasick::AhoCorasick; use bstr::ByteSlice; -use common_arrow::arrow::bitmap::MutableBitmap; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::serialize::read_decimal_with_size; -use common_expression::serialize::uniform_date; -use common_expression::types::array::ArrayColumnBuilder; -use common_expression::types::date::check_date; -use common_expression::types::decimal::Decimal; -use common_expression::types::decimal::DecimalColumnBuilder; -use common_expression::types::decimal::DecimalSize; -use common_expression::types::nullable::NullableColumnBuilder; -use common_expression::types::number::Number; -use common_expression::types::string::StringColumnBuilder; -use common_expression::types::timestamp::check_timestamp; -use common_expression::types::AnyType; -use common_expression::types::NumberColumnBuilder; -use common_expression::with_decimal_type; -use common_expression::with_number_mapped_type; -use common_expression::ColumnBuilder; -use common_expression::Scalar; -use common_io::constants::FALSE_BYTES_LOWER; -use common_io::constants::INF_BYTES_LOWER; -use common_io::constants::NAN_BYTES_LOWER; -use common_io::constants::NULL_BYTES_UPPER; -use common_io::constants::TRUE_BYTES_LOWER; -use common_io::cursor_ext::BufferReadDateTimeExt; -use common_io::cursor_ext::BufferReadStringExt; -use common_io::cursor_ext::DateTimeResType; -use common_io::cursor_ext::ReadBytesExt; -use common_io::cursor_ext::ReadCheckPointExt; -use common_io::cursor_ext::ReadNumberExt; -use common_io::parse_bitmap; -use common_io::prelude::FormatSettings; +use databend_common_arrow::arrow::bitmap::MutableBitmap; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::serialize::read_decimal_with_size; +use databend_common_expression::serialize::uniform_date; +use databend_common_expression::types::array::ArrayColumnBuilder; +use databend_common_expression::types::date::check_date; +use databend_common_expression::types::decimal::Decimal; +use databend_common_expression::types::decimal::DecimalColumnBuilder; +use databend_common_expression::types::decimal::DecimalSize; +use databend_common_expression::types::nullable::NullableColumnBuilder; +use databend_common_expression::types::number::Number; +use databend_common_expression::types::string::StringColumnBuilder; +use databend_common_expression::types::timestamp::check_timestamp; +use databend_common_expression::types::AnyType; +use databend_common_expression::types::NumberColumnBuilder; +use databend_common_expression::with_decimal_type; +use databend_common_expression::with_number_mapped_type; +use databend_common_expression::ColumnBuilder; +use databend_common_expression::Scalar; +use databend_common_io::constants::FALSE_BYTES_LOWER; +use databend_common_io::constants::INF_BYTES_LOWER; +use databend_common_io::constants::NAN_BYTES_LOWER; +use databend_common_io::constants::NULL_BYTES_UPPER; +use databend_common_io::constants::TRUE_BYTES_LOWER; +use databend_common_io::cursor_ext::BufferReadDateTimeExt; +use databend_common_io::cursor_ext::BufferReadStringExt; +use databend_common_io::cursor_ext::DateTimeResType; +use databend_common_io::cursor_ext::ReadBytesExt; +use databend_common_io::cursor_ext::ReadCheckPointExt; +use databend_common_io::cursor_ext::ReadNumberExt; +use databend_common_io::parse_bitmap; +use databend_common_io::prelude::FormatSettings; use jsonb::parse_value; use lexical_core::FromLexical; use num::cast::AsPrimitive; diff --git a/src/query/formats/src/field_decoder/json_ast.rs b/src/query/formats/src/field_decoder/json_ast.rs index a831595e3973..423f9caeb6a0 100644 --- a/src/query/formats/src/field_decoder/json_ast.rs +++ b/src/query/formats/src/field_decoder/json_ast.rs @@ -16,29 +16,29 @@ use std::any::Any; use std::io::Cursor; use chrono_tz::Tz; -use common_arrow::arrow::bitmap::MutableBitmap; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::serialize::read_decimal_from_json; -use common_expression::serialize::uniform_date; -use common_expression::types::array::ArrayColumnBuilder; -use common_expression::types::date::check_date; -use common_expression::types::decimal::Decimal; -use common_expression::types::decimal::DecimalColumnBuilder; -use common_expression::types::decimal::DecimalSize; -use common_expression::types::nullable::NullableColumnBuilder; -use common_expression::types::number::Number; -use common_expression::types::string::StringColumnBuilder; -use common_expression::types::timestamp::check_timestamp; -use common_expression::types::AnyType; -use common_expression::types::NumberColumnBuilder; -use common_expression::with_decimal_type; -use common_expression::with_number_mapped_type; -use common_expression::ColumnBuilder; -use common_io::cursor_ext::BufferReadDateTimeExt; -use common_io::cursor_ext::DateTimeResType; -use common_io::cursor_ext::ReadNumberExt; -use common_io::parse_bitmap; +use databend_common_arrow::arrow::bitmap::MutableBitmap; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::serialize::read_decimal_from_json; +use databend_common_expression::serialize::uniform_date; +use databend_common_expression::types::array::ArrayColumnBuilder; +use databend_common_expression::types::date::check_date; +use databend_common_expression::types::decimal::Decimal; +use databend_common_expression::types::decimal::DecimalColumnBuilder; +use databend_common_expression::types::decimal::DecimalSize; +use databend_common_expression::types::nullable::NullableColumnBuilder; +use databend_common_expression::types::number::Number; +use databend_common_expression::types::string::StringColumnBuilder; +use databend_common_expression::types::timestamp::check_timestamp; +use databend_common_expression::types::AnyType; +use databend_common_expression::types::NumberColumnBuilder; +use databend_common_expression::with_decimal_type; +use databend_common_expression::with_number_mapped_type; +use databend_common_expression::ColumnBuilder; +use databend_common_io::cursor_ext::BufferReadDateTimeExt; +use databend_common_io::cursor_ext::DateTimeResType; +use databend_common_io::cursor_ext::ReadNumberExt; +use databend_common_io::parse_bitmap; use lexical_core::FromLexical; use num::cast::AsPrimitive; use roaring::RoaringTreemap; diff --git a/src/query/formats/src/field_decoder/nested.rs b/src/query/formats/src/field_decoder/nested.rs index 74dc3e7d3683..b9a51b8ffd4a 100644 --- a/src/query/formats/src/field_decoder/nested.rs +++ b/src/query/formats/src/field_decoder/nested.rs @@ -17,38 +17,38 @@ use std::io::BufRead; use std::io::Cursor; use bstr::ByteSlice; -use common_arrow::arrow::bitmap::MutableBitmap; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::serialize::read_decimal_with_size; -use common_expression::serialize::uniform_date; -use common_expression::types::array::ArrayColumnBuilder; -use common_expression::types::date::check_date; -use common_expression::types::decimal::Decimal; -use common_expression::types::decimal::DecimalColumnBuilder; -use common_expression::types::decimal::DecimalSize; -use common_expression::types::nullable::NullableColumnBuilder; -use common_expression::types::number::Number; -use common_expression::types::string::StringColumnBuilder; -use common_expression::types::timestamp::check_timestamp; -use common_expression::types::AnyType; -use common_expression::types::NumberColumnBuilder; -use common_expression::with_decimal_type; -use common_expression::with_number_mapped_type; -use common_expression::ColumnBuilder; -use common_io::constants::FALSE_BYTES_LOWER; -use common_io::constants::INF_BYTES_LOWER; -use common_io::constants::NAN_BYTES_LOWER; -use common_io::constants::NULL_BYTES_LOWER; -use common_io::constants::NULL_BYTES_UPPER; -use common_io::constants::TRUE_BYTES_LOWER; -use common_io::cursor_ext::BufferReadDateTimeExt; -use common_io::cursor_ext::BufferReadStringExt; -use common_io::cursor_ext::DateTimeResType; -use common_io::cursor_ext::ReadBytesExt; -use common_io::cursor_ext::ReadCheckPointExt; -use common_io::cursor_ext::ReadNumberExt; -use common_io::parse_bitmap; +use databend_common_arrow::arrow::bitmap::MutableBitmap; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::serialize::read_decimal_with_size; +use databend_common_expression::serialize::uniform_date; +use databend_common_expression::types::array::ArrayColumnBuilder; +use databend_common_expression::types::date::check_date; +use databend_common_expression::types::decimal::Decimal; +use databend_common_expression::types::decimal::DecimalColumnBuilder; +use databend_common_expression::types::decimal::DecimalSize; +use databend_common_expression::types::nullable::NullableColumnBuilder; +use databend_common_expression::types::number::Number; +use databend_common_expression::types::string::StringColumnBuilder; +use databend_common_expression::types::timestamp::check_timestamp; +use databend_common_expression::types::AnyType; +use databend_common_expression::types::NumberColumnBuilder; +use databend_common_expression::with_decimal_type; +use databend_common_expression::with_number_mapped_type; +use databend_common_expression::ColumnBuilder; +use databend_common_io::constants::FALSE_BYTES_LOWER; +use databend_common_io::constants::INF_BYTES_LOWER; +use databend_common_io::constants::NAN_BYTES_LOWER; +use databend_common_io::constants::NULL_BYTES_LOWER; +use databend_common_io::constants::NULL_BYTES_UPPER; +use databend_common_io::constants::TRUE_BYTES_LOWER; +use databend_common_io::cursor_ext::BufferReadDateTimeExt; +use databend_common_io::cursor_ext::BufferReadStringExt; +use databend_common_io::cursor_ext::DateTimeResType; +use databend_common_io::cursor_ext::ReadBytesExt; +use databend_common_io::cursor_ext::ReadCheckPointExt; +use databend_common_io::cursor_ext::ReadNumberExt; +use databend_common_io::parse_bitmap; use jsonb::parse_value; use lexical_core::FromLexical; diff --git a/src/query/formats/src/field_decoder/separated_text.rs b/src/query/formats/src/field_decoder/separated_text.rs index d398241ed25d..abed3c01e398 100644 --- a/src/query/formats/src/field_decoder/separated_text.rs +++ b/src/query/formats/src/field_decoder/separated_text.rs @@ -16,42 +16,42 @@ use std::any::Any; use std::io::Cursor; use bstr::ByteSlice; -use common_arrow::arrow::bitmap::MutableBitmap; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::serialize::read_decimal_with_size; -use common_expression::serialize::uniform_date; -use common_expression::types::array::ArrayColumnBuilder; -use common_expression::types::date::check_date; -use common_expression::types::decimal::Decimal; -use common_expression::types::decimal::DecimalColumnBuilder; -use common_expression::types::decimal::DecimalSize; -use common_expression::types::nullable::NullableColumnBuilder; -use common_expression::types::string::StringColumnBuilder; -use common_expression::types::timestamp::check_timestamp; -use common_expression::types::AnyType; -use common_expression::types::Number; -use common_expression::types::NumberColumnBuilder; -use common_expression::with_decimal_type; -use common_expression::with_number_mapped_type; -use common_expression::ColumnBuilder; -use common_io::constants::FALSE_BYTES_LOWER; -use common_io::constants::FALSE_BYTES_NUM; -use common_io::constants::INF_BYTES_LOWER; -use common_io::constants::NAN_BYTES_LOWER; -use common_io::constants::NULL_BYTES_ESCAPE; -use common_io::constants::NULL_BYTES_LOWER; -use common_io::constants::TRUE_BYTES_LOWER; -use common_io::constants::TRUE_BYTES_NUM; -use common_io::cursor_ext::collect_number; -use common_io::cursor_ext::read_num_text_exact; -use common_io::cursor_ext::BufferReadDateTimeExt; -use common_io::cursor_ext::DateTimeResType; -use common_io::cursor_ext::ReadBytesExt; -use common_io::parse_bitmap; -use common_meta_app::principal::CsvFileFormatParams; -use common_meta_app::principal::TsvFileFormatParams; -use common_meta_app::principal::XmlFileFormatParams; +use databend_common_arrow::arrow::bitmap::MutableBitmap; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::serialize::read_decimal_with_size; +use databend_common_expression::serialize::uniform_date; +use databend_common_expression::types::array::ArrayColumnBuilder; +use databend_common_expression::types::date::check_date; +use databend_common_expression::types::decimal::Decimal; +use databend_common_expression::types::decimal::DecimalColumnBuilder; +use databend_common_expression::types::decimal::DecimalSize; +use databend_common_expression::types::nullable::NullableColumnBuilder; +use databend_common_expression::types::string::StringColumnBuilder; +use databend_common_expression::types::timestamp::check_timestamp; +use databend_common_expression::types::AnyType; +use databend_common_expression::types::Number; +use databend_common_expression::types::NumberColumnBuilder; +use databend_common_expression::with_decimal_type; +use databend_common_expression::with_number_mapped_type; +use databend_common_expression::ColumnBuilder; +use databend_common_io::constants::FALSE_BYTES_LOWER; +use databend_common_io::constants::FALSE_BYTES_NUM; +use databend_common_io::constants::INF_BYTES_LOWER; +use databend_common_io::constants::NAN_BYTES_LOWER; +use databend_common_io::constants::NULL_BYTES_ESCAPE; +use databend_common_io::constants::NULL_BYTES_LOWER; +use databend_common_io::constants::TRUE_BYTES_LOWER; +use databend_common_io::constants::TRUE_BYTES_NUM; +use databend_common_io::cursor_ext::collect_number; +use databend_common_io::cursor_ext::read_num_text_exact; +use databend_common_io::cursor_ext::BufferReadDateTimeExt; +use databend_common_io::cursor_ext::DateTimeResType; +use databend_common_io::cursor_ext::ReadBytesExt; +use databend_common_io::parse_bitmap; +use databend_common_meta_app::principal::CsvFileFormatParams; +use databend_common_meta_app::principal::TsvFileFormatParams; +use databend_common_meta_app::principal::XmlFileFormatParams; use jsonb::parse_value; use lexical_core::FromLexical; diff --git a/src/query/formats/src/field_encoder/csv.rs b/src/query/formats/src/field_encoder/csv.rs index 45b40754384a..6f13d6531732 100644 --- a/src/query/formats/src/field_encoder/csv.rs +++ b/src/query/formats/src/field_encoder/csv.rs @@ -12,17 +12,17 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_expression::types::nullable::NullableColumn; -use common_expression::types::ValueType; -use common_expression::Column; -use common_io::constants::FALSE_BYTES_LOWER; -use common_io::constants::FALSE_BYTES_NUM; -use common_io::constants::INF_BYTES_LOWER; -use common_io::constants::NULL_BYTES_ESCAPE; -use common_io::constants::TRUE_BYTES_LOWER; -use common_io::constants::TRUE_BYTES_NUM; -use common_meta_app::principal::CsvFileFormatParams; -use common_meta_app::principal::TsvFileFormatParams; +use databend_common_expression::types::nullable::NullableColumn; +use databend_common_expression::types::ValueType; +use databend_common_expression::Column; +use databend_common_io::constants::FALSE_BYTES_LOWER; +use databend_common_io::constants::FALSE_BYTES_NUM; +use databend_common_io::constants::INF_BYTES_LOWER; +use databend_common_io::constants::NULL_BYTES_ESCAPE; +use databend_common_io::constants::TRUE_BYTES_LOWER; +use databend_common_io::constants::TRUE_BYTES_NUM; +use databend_common_meta_app::principal::CsvFileFormatParams; +use databend_common_meta_app::principal::TsvFileFormatParams; use crate::field_encoder::write_tsv_escaped_string; use crate::field_encoder::FieldEncoderValues; diff --git a/src/query/formats/src/field_encoder/json.rs b/src/query/formats/src/field_encoder/json.rs index 6a1ae5c287e2..a0b24313e496 100644 --- a/src/query/formats/src/field_encoder/json.rs +++ b/src/query/formats/src/field_encoder/json.rs @@ -12,13 +12,13 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_expression::types::array::ArrayColumn; -use common_expression::types::nullable::NullableColumn; -use common_expression::types::ValueType; -use common_expression::Column; -use common_io::constants::FALSE_BYTES_LOWER; -use common_io::constants::NULL_BYTES_LOWER; -use common_io::constants::TRUE_BYTES_LOWER; +use databend_common_expression::types::array::ArrayColumn; +use databend_common_expression::types::nullable::NullableColumn; +use databend_common_expression::types::ValueType; +use databend_common_expression::Column; +use databend_common_io::constants::FALSE_BYTES_LOWER; +use databend_common_io::constants::NULL_BYTES_LOWER; +use databend_common_io::constants::TRUE_BYTES_LOWER; use crate::field_encoder::helpers::write_json_string; use crate::field_encoder::FieldEncoderValues; diff --git a/src/query/formats/src/field_encoder/values.rs b/src/query/formats/src/field_encoder/values.rs index fcd0439f26de..289e66fb1925 100644 --- a/src/query/formats/src/field_encoder/values.rs +++ b/src/query/formats/src/field_encoder/values.rs @@ -13,24 +13,24 @@ // limitations under the License. use chrono_tz::Tz; -use common_arrow::arrow::bitmap::Bitmap; -use common_arrow::arrow::buffer::Buffer; -use common_expression::types::array::ArrayColumn; -use common_expression::types::date::date_to_string; -use common_expression::types::decimal::DecimalColumn; -use common_expression::types::nullable::NullableColumn; -use common_expression::types::string::StringColumn; -use common_expression::types::timestamp::timestamp_to_string; -use common_expression::types::NumberColumn; -use common_expression::types::ValueType; -use common_expression::Column; -use common_io::constants::FALSE_BYTES_NUM; -use common_io::constants::INF_BYTES_LONG; -use common_io::constants::INF_BYTES_LOWER; -use common_io::constants::NAN_BYTES_LOWER; -use common_io::constants::NAN_BYTES_SNAKE; -use common_io::constants::NULL_BYTES_UPPER; -use common_io::constants::TRUE_BYTES_NUM; +use databend_common_arrow::arrow::bitmap::Bitmap; +use databend_common_arrow::arrow::buffer::Buffer; +use databend_common_expression::types::array::ArrayColumn; +use databend_common_expression::types::date::date_to_string; +use databend_common_expression::types::decimal::DecimalColumn; +use databend_common_expression::types::nullable::NullableColumn; +use databend_common_expression::types::string::StringColumn; +use databend_common_expression::types::timestamp::timestamp_to_string; +use databend_common_expression::types::NumberColumn; +use databend_common_expression::types::ValueType; +use databend_common_expression::Column; +use databend_common_io::constants::FALSE_BYTES_NUM; +use databend_common_io::constants::INF_BYTES_LONG; +use databend_common_io::constants::INF_BYTES_LOWER; +use databend_common_io::constants::NAN_BYTES_LOWER; +use databend_common_io::constants::NAN_BYTES_SNAKE; +use databend_common_io::constants::NULL_BYTES_UPPER; +use databend_common_io::constants::TRUE_BYTES_NUM; use lexical_core::ToLexical; use micromarshal::Marshal; use micromarshal::Unmarshal; diff --git a/src/query/formats/src/file_format_type.rs b/src/query/formats/src/file_format_type.rs index fdb95ba2bdcf..32387844245b 100644 --- a/src/query/formats/src/file_format_type.rs +++ b/src/query/formats/src/file_format_type.rs @@ -13,12 +13,12 @@ // limitations under the License. use chrono_tz::Tz; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::TableSchemaRef; -use common_meta_app::principal::FileFormatParams; -use common_meta_app::principal::StageFileFormatType; -use common_settings::Settings; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::TableSchemaRef; +use databend_common_meta_app::principal::FileFormatParams; +use databend_common_meta_app::principal::StageFileFormatType; +use databend_common_settings::Settings; use crate::output_format::CSVOutputFormat; use crate::output_format::CSVWithNamesAndTypesOutputFormat; diff --git a/src/query/formats/src/output_format/csv.rs b/src/query/formats/src/output_format/csv.rs index d5fe0d9e16aa..b82232315d91 100644 --- a/src/query/formats/src/output_format/csv.rs +++ b/src/query/formats/src/output_format/csv.rs @@ -12,11 +12,11 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_exception::Result; -use common_expression::Column; -use common_expression::DataBlock; -use common_expression::TableSchemaRef; -use common_meta_app::principal::CsvFileFormatParams; +use databend_common_exception::Result; +use databend_common_expression::Column; +use databend_common_expression::DataBlock; +use databend_common_expression::TableSchemaRef; +use databend_common_meta_app::principal::CsvFileFormatParams; use crate::field_encoder::write_csv_string; use crate::field_encoder::FieldEncoderCSV; diff --git a/src/query/formats/src/output_format/json.rs b/src/query/formats/src/output_format/json.rs index 99f30fdc9c6d..9fd89b845349 100644 --- a/src/query/formats/src/output_format/json.rs +++ b/src/query/formats/src/output_format/json.rs @@ -12,12 +12,12 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_expression::date_helper::DateConverter; -use common_expression::types::number::NumberScalar; -use common_expression::DataBlock; -use common_expression::ScalarRef; -use common_expression::TableSchemaRef; -use common_io::prelude::FormatSettings; +use databend_common_expression::date_helper::DateConverter; +use databend_common_expression::types::number::NumberScalar; +use databend_common_expression::DataBlock; +use databend_common_expression::ScalarRef; +use databend_common_expression::TableSchemaRef; +use databend_common_io::prelude::FormatSettings; use roaring::RoaringTreemap; use serde_json::Map as JsonMap; use serde_json::Value as JsonValue; @@ -46,7 +46,7 @@ impl JSONOutputFormat { } } - fn format_schema(&self) -> common_exception::Result> { + fn format_schema(&self) -> databend_common_exception::Result> { let fields = self.schema.fields(); if fields.is_empty() { return Ok(b"\"meta\":[]".to_vec()); @@ -144,7 +144,10 @@ fn scalar_to_json(s: ScalarRef<'_>, format: &FormatSettings) -> JsonValue { } impl OutputFormat for JSONOutputFormat { - fn serialize_block(&mut self, data_block: &DataBlock) -> common_exception::Result> { + fn serialize_block( + &mut self, + data_block: &DataBlock, + ) -> databend_common_exception::Result> { let mut res = if self.first_block { self.first_block = false; let mut buf = b"{".to_vec(); @@ -193,7 +196,7 @@ impl OutputFormat for JSONOutputFormat { Ok(res) } - fn finalize(&mut self) -> common_exception::Result> { + fn finalize(&mut self) -> databend_common_exception::Result> { let mut buf = b"".to_vec(); if self.first_row { buf.push(b'{'); diff --git a/src/query/formats/src/output_format/mod.rs b/src/query/formats/src/output_format/mod.rs index 04a830ca457c..6e93714235f9 100644 --- a/src/query/formats/src/output_format/mod.rs +++ b/src/query/formats/src/output_format/mod.rs @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_exception::Result; -use common_expression::DataBlock; +use databend_common_exception::Result; +use databend_common_expression::DataBlock; pub mod csv; pub mod json; pub mod ndjson; diff --git a/src/query/formats/src/output_format/ndjson.rs b/src/query/formats/src/output_format/ndjson.rs index a68c4b490b34..50439efa1567 100644 --- a/src/query/formats/src/output_format/ndjson.rs +++ b/src/query/formats/src/output_format/ndjson.rs @@ -12,10 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_exception::Result; -use common_expression::Column; -use common_expression::DataBlock; -use common_expression::TableSchemaRef; +use databend_common_exception::Result; +use databend_common_expression::Column; +use databend_common_expression::DataBlock; +use databend_common_expression::TableSchemaRef; use crate::field_encoder::FieldEncoderJSON; use crate::output_format::OutputFormat; diff --git a/src/query/formats/src/output_format/parquet.rs b/src/query/formats/src/output_format/parquet.rs index 6d2ec4e937ca..589a76250edb 100644 --- a/src/query/formats/src/output_format/parquet.rs +++ b/src/query/formats/src/output_format/parquet.rs @@ -12,12 +12,12 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_exception::Result; -use common_expression::DataBlock; -use common_expression::TableSchemaRef; -use common_io::constants::DEFAULT_BLOCK_BUFFER_SIZE; -use storages_common_blocks::blocks_to_parquet; -use storages_common_table_meta::table::TableCompression; +use databend_common_exception::Result; +use databend_common_expression::DataBlock; +use databend_common_expression::TableSchemaRef; +use databend_common_io::constants::DEFAULT_BLOCK_BUFFER_SIZE; +use databend_storages_common_blocks::blocks_to_parquet; +use databend_storages_common_table_meta::table::TableCompression; use crate::output_format::OutputFormat; use crate::FileFormatOptionsExt; diff --git a/src/query/formats/src/output_format/tsv.rs b/src/query/formats/src/output_format/tsv.rs index 279a9ebae649..dadc75041520 100644 --- a/src/query/formats/src/output_format/tsv.rs +++ b/src/query/formats/src/output_format/tsv.rs @@ -12,11 +12,11 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_exception::Result; -use common_expression::Column; -use common_expression::DataBlock; -use common_expression::TableSchemaRef; -use common_meta_app::principal::TsvFileFormatParams; +use databend_common_exception::Result; +use databend_common_expression::Column; +use databend_common_expression::DataBlock; +use databend_common_expression::TableSchemaRef; +use databend_common_meta_app::principal::TsvFileFormatParams; use crate::field_encoder::helpers::write_tsv_escaped_string; use crate::field_encoder::FieldEncoderCSV; diff --git a/src/query/formats/tests/it/field_decoder/fast_values.rs b/src/query/formats/tests/it/field_decoder/fast_values.rs index af8c5951f7cf..c23e3059ae74 100644 --- a/src/query/formats/tests/it/field_decoder/fast_values.rs +++ b/src/query/formats/tests/it/field_decoder/fast_values.rs @@ -12,17 +12,17 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::types::DataType; -use common_expression::types::NumberDataType; -use common_expression::ColumnBuilder; -use common_expression::DataBlock; -use common_expression::Scalar; -use common_formats::FastFieldDecoderValues; -use common_formats::FastValuesDecodeFallback; -use common_formats::FastValuesDecoder; -use common_io::prelude::FormatSettings; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::types::DataType; +use databend_common_expression::types::NumberDataType; +use databend_common_expression::ColumnBuilder; +use databend_common_expression::DataBlock; +use databend_common_expression::Scalar; +use databend_common_formats::FastFieldDecoderValues; +use databend_common_formats::FastValuesDecodeFallback; +use databend_common_formats::FastValuesDecoder; +use databend_common_io::prelude::FormatSettings; struct DummyFastValuesDecodeFallback {} diff --git a/src/query/formats/tests/it/field_encoder/helpers.rs b/src/query/formats/tests/it/field_encoder/helpers.rs index 3a95eb844da9..4c86e8fe7048 100644 --- a/src/query/formats/tests/it/field_encoder/helpers.rs +++ b/src/query/formats/tests/it/field_encoder/helpers.rs @@ -12,9 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_formats::field_encoder::helpers::write_json_string; -use common_formats::field_encoder::helpers::write_tsv_escaped_string; -use common_formats::field_encoder::write_csv_string; +use databend_common_formats::field_encoder::helpers::write_json_string; +use databend_common_formats::field_encoder::helpers::write_tsv_escaped_string; +use databend_common_formats::field_encoder::write_csv_string; #[test] fn test_escape() { diff --git a/src/query/formats/tests/it/main.rs b/src/query/formats/tests/it/main.rs index e59cc9149a11..9aadfb8e3ede 100644 --- a/src/query/formats/tests/it/main.rs +++ b/src/query/formats/tests/it/main.rs @@ -12,12 +12,12 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_exception::Result; -use common_expression::TableSchemaRef; -use common_formats::output_format::OutputFormat; -use common_formats::ClickhouseFormatType; -use common_formats::FileFormatOptionsExt; -use common_settings::Settings; +use databend_common_exception::Result; +use databend_common_expression::TableSchemaRef; +use databend_common_formats::output_format::OutputFormat; +use databend_common_formats::ClickhouseFormatType; +use databend_common_formats::FileFormatOptionsExt; +use databend_common_settings::Settings; mod field_decoder; mod field_encoder; diff --git a/src/query/formats/tests/it/output_format_json_each_row.rs b/src/query/formats/tests/it/output_format_json_each_row.rs index 5adc43fd8522..23c2019ac0fb 100644 --- a/src/query/formats/tests/it/output_format_json_each_row.rs +++ b/src/query/formats/tests/it/output_format_json_each_row.rs @@ -12,14 +12,14 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_exception::Result; -use common_expression::types::number::Float32Type; -use common_expression::types::number::Int32Type; -use common_expression::types::NumberDataType; -use common_expression::types::StringType; -use common_expression::FromData; -use common_expression::TableDataType; -use common_expression::TableField; +use databend_common_exception::Result; +use databend_common_expression::types::number::Float32Type; +use databend_common_expression::types::number::Int32Type; +use databend_common_expression::types::NumberDataType; +use databend_common_expression::types::StringType; +use databend_common_expression::FromData; +use databend_common_expression::TableDataType; +use databend_common_expression::TableField; use pretty_assertions::assert_eq; use crate::get_output_format_clickhouse; diff --git a/src/query/formats/tests/it/output_format_tcsv.rs b/src/query/formats/tests/it/output_format_tcsv.rs index 5c8079f089a8..a49936898af8 100644 --- a/src/query/formats/tests/it/output_format_tcsv.rs +++ b/src/query/formats/tests/it/output_format_tcsv.rs @@ -14,16 +14,16 @@ use std::collections::BTreeMap; -use common_exception::Result; -use common_expression::types::number::Int32Type; -use common_expression::types::NumberDataType; -use common_expression::FromData; -use common_expression::TableDataType; -use common_expression::TableField; -use common_formats::FileFormatOptionsExt; -use common_meta_app::principal::FileFormatOptionsAst; -use common_meta_app::principal::FileFormatParams; -use common_settings::Settings; +use databend_common_exception::Result; +use databend_common_expression::types::number::Int32Type; +use databend_common_expression::types::NumberDataType; +use databend_common_expression::FromData; +use databend_common_expression::TableDataType; +use databend_common_expression::TableField; +use databend_common_formats::FileFormatOptionsExt; +use databend_common_meta_app::principal::FileFormatOptionsAst; +use databend_common_meta_app::principal::FileFormatParams; +use databend_common_settings::Settings; use pretty_assertions::assert_eq; use crate::get_output_format_clickhouse; diff --git a/src/query/formats/tests/it/output_format_utils.rs b/src/query/formats/tests/it/output_format_utils.rs index be0d6b773a3d..a735aa7d6063 100644 --- a/src/query/formats/tests/it/output_format_utils.rs +++ b/src/query/formats/tests/it/output_format_utils.rs @@ -12,21 +12,21 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_arrow::arrow::bitmap::Bitmap; -use common_expression::types::nullable::NullableColumn; -use common_expression::types::number::Float64Type; -use common_expression::types::number::Int32Type; -use common_expression::types::BooleanType; -use common_expression::types::DateType; -use common_expression::types::NumberDataType; -use common_expression::types::StringType; -use common_expression::Column; -use common_expression::DataBlock; -use common_expression::FromData; -use common_expression::TableDataType; -use common_expression::TableField; -use common_expression::TableSchemaRef; -use common_expression::TableSchemaRefExt; +use databend_common_arrow::arrow::bitmap::Bitmap; +use databend_common_expression::types::nullable::NullableColumn; +use databend_common_expression::types::number::Float64Type; +use databend_common_expression::types::number::Int32Type; +use databend_common_expression::types::BooleanType; +use databend_common_expression::types::DateType; +use databend_common_expression::types::NumberDataType; +use databend_common_expression::types::StringType; +use databend_common_expression::Column; +use databend_common_expression::DataBlock; +use databend_common_expression::FromData; +use databend_common_expression::TableDataType; +use databend_common_expression::TableField; +use databend_common_expression::TableSchemaRef; +use databend_common_expression::TableSchemaRefExt; pub fn gen_schema_and_block( fields: Vec, diff --git a/src/query/functions/Cargo.toml b/src/query/functions/Cargo.toml index ad3ef299229b..55bfceab67cc 100644 --- a/src/query/functions/Cargo.toml +++ b/src/query/functions/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "common-functions" +name = "databend-common-functions" version = { workspace = true } authors = { workspace = true } license = { workspace = true } @@ -11,14 +11,14 @@ doctest = false [dependencies] # In alphabetical order # Workspace dependencies -common-arrow = { path = "../../common/arrow" } -common-base = { path = "../../common/base" } -common-exception = { path = "../../common/exception" } -common-expression = { path = "../expression" } -common-hashtable = { path = "../../common/hashtable" } -common-io = { path = "../../common/io" } -common-openai = { path = "../../common/openai" } -common-vector = { path = "../../common/vector" } +databend-common-arrow = { path = "../../common/arrow" } +databend-common-base = { path = "../../common/base" } +databend-common-exception = { path = "../../common/exception" } +databend-common-expression = { path = "../expression" } +databend-common-hashtable = { path = "../../common/hashtable" } +databend-common-io = { path = "../../common/io" } +databend-common-openai = { path = "../../common/openai" } +databend-common-vector = { path = "../../common/vector" } jsonb = { workspace = true } # Crates.io dependencies @@ -64,7 +64,7 @@ twox-hash = "1.6.3" [dev-dependencies] comfy-table = "6" -common-ast = { path = "../ast" } +databend-common-ast = { path = "../ast" } goldenfile = "1.4" [[bench]] diff --git a/src/query/functions/benches/bench.rs b/src/query/functions/benches/bench.rs index faedb9befa9d..aaf36b18b83a 100644 --- a/src/query/functions/benches/bench.rs +++ b/src/query/functions/benches/bench.rs @@ -18,12 +18,12 @@ extern crate criterion; #[path = "../tests/it/scalars/parser.rs"] mod parser; -use common_expression::type_check; -use common_expression::DataBlock; -use common_expression::Evaluator; -use common_expression::FunctionContext; -use common_functions::BUILTIN_FUNCTIONS; use criterion::Criterion; +use databend_common_expression::type_check; +use databend_common_expression::DataBlock; +use databend_common_expression::Evaluator; +use databend_common_expression::FunctionContext; +use databend_common_functions::BUILTIN_FUNCTIONS; fn bench(c: &mut Criterion) { let mut group = c.benchmark_group("bench_array"); diff --git a/src/query/functions/src/aggregates/adaptors/aggregate_null_adaptor.rs b/src/query/functions/src/aggregates/adaptors/aggregate_null_adaptor.rs index b4ac4d2eaacc..c065904c94e1 100644 --- a/src/query/functions/src/aggregates/adaptors/aggregate_null_adaptor.rs +++ b/src/query/functions/src/aggregates/adaptors/aggregate_null_adaptor.rs @@ -12,10 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_exception::Result; -use common_expression::types::DataType; -use common_expression::types::NumberDataType; -use common_expression::Scalar; +use databend_common_exception::Result; +use databend_common_expression::types::DataType; +use databend_common_expression::types::NumberDataType; +use databend_common_expression::Scalar; use super::aggregate_null_variadic_adaptor::AggregateNullVariadicAdaptor; use super::AggregateNullUnaryAdaptor; diff --git a/src/query/functions/src/aggregates/adaptors/aggregate_null_unary_adaptor.rs b/src/query/functions/src/aggregates/adaptors/aggregate_null_unary_adaptor.rs index 68a51182afd3..a36e27a6caba 100644 --- a/src/query/functions/src/aggregates/adaptors/aggregate_null_unary_adaptor.rs +++ b/src/query/functions/src/aggregates/adaptors/aggregate_null_unary_adaptor.rs @@ -16,13 +16,13 @@ use std::alloc::Layout; use std::fmt; use std::sync::Arc; -use common_arrow::arrow::bitmap::Bitmap; -use common_exception::Result; -use common_expression::types::DataType; -use common_expression::utils::column_merge_validity; -use common_expression::Column; -use common_expression::ColumnBuilder; -use common_io::prelude::BinaryWrite; +use databend_common_arrow::arrow::bitmap::Bitmap; +use databend_common_exception::Result; +use databend_common_expression::types::DataType; +use databend_common_expression::utils::column_merge_validity; +use databend_common_expression::Column; +use databend_common_expression::ColumnBuilder; +use databend_common_io::prelude::BinaryWrite; use crate::aggregates::AggregateFunction; use crate::aggregates::AggregateFunctionRef; diff --git a/src/query/functions/src/aggregates/adaptors/aggregate_null_variadic_adaptor.rs b/src/query/functions/src/aggregates/adaptors/aggregate_null_variadic_adaptor.rs index b2a611d99e8d..3ff84082a9a6 100644 --- a/src/query/functions/src/aggregates/adaptors/aggregate_null_variadic_adaptor.rs +++ b/src/query/functions/src/aggregates/adaptors/aggregate_null_variadic_adaptor.rs @@ -16,13 +16,13 @@ use std::alloc::Layout; use std::fmt; use std::sync::Arc; -use common_arrow::arrow::bitmap::Bitmap; -use common_exception::Result; -use common_expression::types::DataType; -use common_expression::utils::column_merge_validity; -use common_expression::Column; -use common_expression::ColumnBuilder; -use common_io::prelude::BinaryWrite; +use databend_common_arrow::arrow::bitmap::Bitmap; +use databend_common_exception::Result; +use databend_common_expression::types::DataType; +use databend_common_expression::utils::column_merge_validity; +use databend_common_expression::Column; +use databend_common_expression::ColumnBuilder; +use databend_common_io::prelude::BinaryWrite; use crate::aggregates::AggregateFunction; use crate::aggregates::AggregateFunctionRef; diff --git a/src/query/functions/src/aggregates/adaptors/aggregate_ornull_adaptor.rs b/src/query/functions/src/aggregates/adaptors/aggregate_ornull_adaptor.rs index 90af095cd5f7..8333689fb8d3 100644 --- a/src/query/functions/src/aggregates/adaptors/aggregate_ornull_adaptor.rs +++ b/src/query/functions/src/aggregates/adaptors/aggregate_ornull_adaptor.rs @@ -16,13 +16,13 @@ use std::alloc::Layout; use std::fmt; use std::sync::Arc; -use common_arrow::arrow::bitmap::Bitmap; -use common_exception::Result; -use common_expression::types::DataType; -use common_expression::Column; -use common_expression::ColumnBuilder; -use common_expression::Scalar; -use common_io::prelude::BinaryWrite; +use databend_common_arrow::arrow::bitmap::Bitmap; +use databend_common_exception::Result; +use databend_common_expression::types::DataType; +use databend_common_expression::Column; +use databend_common_expression::ColumnBuilder; +use databend_common_expression::Scalar; +use databend_common_io::prelude::BinaryWrite; use crate::aggregates::aggregate_function_factory::AggregateFunctionFeatures; use crate::aggregates::AggregateFunction; diff --git a/src/query/functions/src/aggregates/aggregate_approx_count_distinct.rs b/src/query/functions/src/aggregates/aggregate_approx_count_distinct.rs index 6269602a4bbb..de8a686742db 100644 --- a/src/query/functions/src/aggregates/aggregate_approx_count_distinct.rs +++ b/src/query/functions/src/aggregates/aggregate_approx_count_distinct.rs @@ -15,18 +15,18 @@ use std::hash::Hash; use std::sync::Arc; -use common_exception::Result; -use common_expression::types::AnyType; -use common_expression::types::DataType; -use common_expression::types::DateType; -use common_expression::types::NumberDataType; -use common_expression::types::NumberType; -use common_expression::types::StringType; -use common_expression::types::TimestampType; -use common_expression::types::UInt64Type; -use common_expression::types::ValueType; -use common_expression::with_number_mapped_type; -use common_expression::Scalar; +use databend_common_exception::Result; +use databend_common_expression::types::AnyType; +use databend_common_expression::types::DataType; +use databend_common_expression::types::DateType; +use databend_common_expression::types::NumberDataType; +use databend_common_expression::types::NumberType; +use databend_common_expression::types::StringType; +use databend_common_expression::types::TimestampType; +use databend_common_expression::types::UInt64Type; +use databend_common_expression::types::ValueType; +use databend_common_expression::with_number_mapped_type; +use databend_common_expression::Scalar; use streaming_algorithms::HyperLogLog; use super::aggregate_function::AggregateFunction; diff --git a/src/query/functions/src/aggregates/aggregate_arg_min_max.rs b/src/query/functions/src/aggregates/aggregate_arg_min_max.rs index 06a0c1f7bb64..01348bc36ff5 100644 --- a/src/query/functions/src/aggregates/aggregate_arg_min_max.rs +++ b/src/query/functions/src/aggregates/aggregate_arg_min_max.rs @@ -17,15 +17,15 @@ use std::fmt; use std::marker::PhantomData; use std::sync::Arc; -use common_arrow::arrow::bitmap::Bitmap; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::types::number::*; -use common_expression::types::*; -use common_expression::with_number_mapped_type; -use common_expression::Column; -use common_expression::ColumnBuilder; -use common_expression::Scalar; +use databend_common_arrow::arrow::bitmap::Bitmap; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::types::number::*; +use databend_common_expression::types::*; +use databend_common_expression::with_number_mapped_type; +use databend_common_expression::Column; +use databend_common_expression::ColumnBuilder; +use databend_common_expression::Scalar; use serde::de::DeserializeOwned; use serde::Deserialize; use serde::Serialize; diff --git a/src/query/functions/src/aggregates/aggregate_array_agg.rs b/src/query/functions/src/aggregates/aggregate_array_agg.rs index bdd55d9a3203..fedee39ba649 100644 --- a/src/query/functions/src/aggregates/aggregate_array_agg.rs +++ b/src/query/functions/src/aggregates/aggregate_array_agg.rs @@ -17,18 +17,18 @@ use std::fmt; use std::marker::PhantomData; use std::sync::Arc; -use common_arrow::arrow::bitmap::Bitmap; -use common_exception::Result; -use common_expression::types::decimal::*; -use common_expression::types::number::*; -use common_expression::types::DataType; -use common_expression::types::ValueType; -use common_expression::types::*; -use common_expression::with_number_mapped_type; -use common_expression::Column; -use common_expression::ColumnBuilder; -use common_expression::Scalar; -use common_expression::ScalarRef; +use databend_common_arrow::arrow::bitmap::Bitmap; +use databend_common_exception::Result; +use databend_common_expression::types::decimal::*; +use databend_common_expression::types::number::*; +use databend_common_expression::types::DataType; +use databend_common_expression::types::ValueType; +use databend_common_expression::types::*; +use databend_common_expression::with_number_mapped_type; +use databend_common_expression::Column; +use databend_common_expression::ColumnBuilder; +use databend_common_expression::Scalar; +use databend_common_expression::ScalarRef; use ethnum::i256; use serde::de::DeserializeOwned; use serde::Deserialize; diff --git a/src/query/functions/src/aggregates/aggregate_array_moving.rs b/src/query/functions/src/aggregates/aggregate_array_moving.rs index 080d2f287743..2d4dd89ff090 100644 --- a/src/query/functions/src/aggregates/aggregate_array_moving.rs +++ b/src/query/functions/src/aggregates/aggregate_array_moving.rs @@ -17,30 +17,30 @@ use std::fmt; use std::marker::PhantomData; use std::sync::Arc; -use common_arrow::arrow::bitmap::Bitmap; -use common_arrow::arrow::buffer::Buffer; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::type_check::check_number; -use common_expression::types::decimal::*; -use common_expression::types::number::Number; -use common_expression::types::ArgType; -use common_expression::types::DataType; -use common_expression::types::DecimalDataType; -use common_expression::types::Float64Type; -use common_expression::types::Int8Type; -use common_expression::types::NumberDataType; -use common_expression::types::NumberType; -use common_expression::types::ValueType; -use common_expression::types::F64; -use common_expression::utils::arithmetics_type::ResultTypeOfUnary; -use common_expression::with_number_mapped_type; -use common_expression::Column; -use common_expression::ColumnBuilder; -use common_expression::Expr; -use common_expression::FunctionContext; -use common_expression::Scalar; -use common_expression::ScalarRef; +use databend_common_arrow::arrow::bitmap::Bitmap; +use databend_common_arrow::arrow::buffer::Buffer; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::type_check::check_number; +use databend_common_expression::types::decimal::*; +use databend_common_expression::types::number::Number; +use databend_common_expression::types::ArgType; +use databend_common_expression::types::DataType; +use databend_common_expression::types::DecimalDataType; +use databend_common_expression::types::Float64Type; +use databend_common_expression::types::Int8Type; +use databend_common_expression::types::NumberDataType; +use databend_common_expression::types::NumberType; +use databend_common_expression::types::ValueType; +use databend_common_expression::types::F64; +use databend_common_expression::utils::arithmetics_type::ResultTypeOfUnary; +use databend_common_expression::with_number_mapped_type; +use databend_common_expression::Column; +use databend_common_expression::ColumnBuilder; +use databend_common_expression::Expr; +use databend_common_expression::FunctionContext; +use databend_common_expression::Scalar; +use databend_common_expression::ScalarRef; use ethnum::i256; use num_traits::AsPrimitive; use serde::de::DeserializeOwned; diff --git a/src/query/functions/src/aggregates/aggregate_avg.rs b/src/query/functions/src/aggregates/aggregate_avg.rs index db88c3b66bce..8988c38eda41 100644 --- a/src/query/functions/src/aggregates/aggregate_avg.rs +++ b/src/query/functions/src/aggregates/aggregate_avg.rs @@ -16,13 +16,13 @@ use std::any::Any; use std::marker::PhantomData; use std::sync::Arc; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::types::decimal::*; -use common_expression::types::*; -use common_expression::utils::arithmetics_type::ResultTypeOfUnary; -use common_expression::with_number_mapped_type; -use common_expression::Scalar; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::types::decimal::*; +use databend_common_expression::types::*; +use databend_common_expression::utils::arithmetics_type::ResultTypeOfUnary; +use databend_common_expression::with_number_mapped_type; +use databend_common_expression::Scalar; use num_traits::AsPrimitive; use serde::de::DeserializeOwned; use serde::Deserialize; diff --git a/src/query/functions/src/aggregates/aggregate_bitmap.rs b/src/query/functions/src/aggregates/aggregate_bitmap.rs index efc289ee44d2..17bf7b9e4a95 100644 --- a/src/query/functions/src/aggregates/aggregate_bitmap.rs +++ b/src/query/functions/src/aggregates/aggregate_bitmap.rs @@ -22,20 +22,20 @@ use std::ops::BitXorAssign; use std::ops::SubAssign; use std::sync::Arc; -use common_arrow::arrow::bitmap::Bitmap; -use common_arrow::arrow::bitmap::MutableBitmap; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::type_check::check_number; -use common_expression::types::decimal::DecimalType; -use common_expression::types::*; -use common_expression::with_number_mapped_type; -use common_expression::Column; -use common_expression::ColumnBuilder; -use common_expression::Expr; -use common_expression::FunctionContext; -use common_expression::Scalar; -use common_io::prelude::BinaryWrite; +use databend_common_arrow::arrow::bitmap::Bitmap; +use databend_common_arrow::arrow::bitmap::MutableBitmap; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::type_check::check_number; +use databend_common_expression::types::decimal::DecimalType; +use databend_common_expression::types::*; +use databend_common_expression::with_number_mapped_type; +use databend_common_expression::Column; +use databend_common_expression::ColumnBuilder; +use databend_common_expression::Expr; +use databend_common_expression::FunctionContext; +use databend_common_expression::Scalar; +use databend_common_io::prelude::BinaryWrite; use ethnum::i256; use roaring::RoaringTreemap; diff --git a/src/query/functions/src/aggregates/aggregate_combinator_distinct.rs b/src/query/functions/src/aggregates/aggregate_combinator_distinct.rs index 1e392d00a737..edc0c1f6eb0b 100644 --- a/src/query/functions/src/aggregates/aggregate_combinator_distinct.rs +++ b/src/query/functions/src/aggregates/aggregate_combinator_distinct.rs @@ -17,15 +17,15 @@ use std::fmt; use std::marker::PhantomData; use std::sync::Arc; -use common_arrow::arrow::bitmap::Bitmap; -use common_exception::Result; -use common_expression::types::number::NumberColumnBuilder; -use common_expression::types::DataType; -use common_expression::types::NumberDataType; -use common_expression::with_number_mapped_type; -use common_expression::Column; -use common_expression::ColumnBuilder; -use common_expression::Scalar; +use databend_common_arrow::arrow::bitmap::Bitmap; +use databend_common_exception::Result; +use databend_common_expression::types::number::NumberColumnBuilder; +use databend_common_expression::types::DataType; +use databend_common_expression::types::NumberDataType; +use databend_common_expression::with_number_mapped_type; +use databend_common_expression::Column; +use databend_common_expression::ColumnBuilder; +use databend_common_expression::Scalar; use super::aggregate_distinct_state::AggregateDistinctNumberState; use super::aggregate_distinct_state::AggregateDistinctState; diff --git a/src/query/functions/src/aggregates/aggregate_combinator_if.rs b/src/query/functions/src/aggregates/aggregate_combinator_if.rs index fe82c14dad37..2b8e438cc407 100644 --- a/src/query/functions/src/aggregates/aggregate_combinator_if.rs +++ b/src/query/functions/src/aggregates/aggregate_combinator_if.rs @@ -16,15 +16,15 @@ use std::alloc::Layout; use std::fmt; use std::sync::Arc; -use common_arrow::arrow::bitmap::Bitmap; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::types::BooleanType; -use common_expression::types::DataType; -use common_expression::types::ValueType; -use common_expression::Column; -use common_expression::ColumnBuilder; -use common_expression::Scalar; +use databend_common_arrow::arrow::bitmap::Bitmap; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::types::BooleanType; +use databend_common_expression::types::DataType; +use databend_common_expression::types::ValueType; +use databend_common_expression::Column; +use databend_common_expression::ColumnBuilder; +use databend_common_expression::Scalar; use super::StateAddr; use crate::aggregates::aggregate_function_factory::AggregateFunctionCreator; diff --git a/src/query/functions/src/aggregates/aggregate_combinator_state.rs b/src/query/functions/src/aggregates/aggregate_combinator_state.rs index 59ada5c9a016..3cc8a877edb1 100644 --- a/src/query/functions/src/aggregates/aggregate_combinator_state.rs +++ b/src/query/functions/src/aggregates/aggregate_combinator_state.rs @@ -16,12 +16,12 @@ use std::alloc::Layout; use std::fmt; use std::sync::Arc; -use common_arrow::arrow::bitmap::Bitmap; -use common_exception::Result; -use common_expression::types::DataType; -use common_expression::Column; -use common_expression::ColumnBuilder; -use common_expression::Scalar; +use databend_common_arrow::arrow::bitmap::Bitmap; +use databend_common_exception::Result; +use databend_common_expression::types::DataType; +use databend_common_expression::Column; +use databend_common_expression::ColumnBuilder; +use databend_common_expression::Scalar; use super::AggregateFunctionFactory; use super::StateAddr; diff --git a/src/query/functions/src/aggregates/aggregate_count.rs b/src/query/functions/src/aggregates/aggregate_count.rs index 4ce3760baaaf..470320407bf3 100644 --- a/src/query/functions/src/aggregates/aggregate_count.rs +++ b/src/query/functions/src/aggregates/aggregate_count.rs @@ -16,15 +16,15 @@ use std::alloc::Layout; use std::fmt; use std::sync::Arc; -use common_arrow::arrow::bitmap::Bitmap; -use common_exception::Result; -use common_expression::types::number::NumberColumnBuilder; -use common_expression::types::DataType; -use common_expression::types::NumberDataType; -use common_expression::utils::column_merge_validity; -use common_expression::Column; -use common_expression::ColumnBuilder; -use common_expression::Scalar; +use databend_common_arrow::arrow::bitmap::Bitmap; +use databend_common_exception::Result; +use databend_common_expression::types::number::NumberColumnBuilder; +use databend_common_expression::types::DataType; +use databend_common_expression::types::NumberDataType; +use databend_common_expression::utils::column_merge_validity; +use databend_common_expression::Column; +use databend_common_expression::ColumnBuilder; +use databend_common_expression::Scalar; use super::aggregate_function::AggregateFunction; use super::aggregate_function_factory::AggregateFunctionDescription; diff --git a/src/query/functions/src/aggregates/aggregate_covariance.rs b/src/query/functions/src/aggregates/aggregate_covariance.rs index 8b7795b81b47..a53480fcedcb 100644 --- a/src/query/functions/src/aggregates/aggregate_covariance.rs +++ b/src/query/functions/src/aggregates/aggregate_covariance.rs @@ -17,19 +17,19 @@ use std::fmt; use std::marker::PhantomData; use std::sync::Arc; -use common_arrow::arrow::bitmap::Bitmap; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::types::number::Number; -use common_expression::types::number::F64; -use common_expression::types::DataType; -use common_expression::types::NumberDataType; -use common_expression::types::NumberType; -use common_expression::types::ValueType; -use common_expression::with_number_mapped_type; -use common_expression::Column; -use common_expression::ColumnBuilder; -use common_expression::Scalar; +use databend_common_arrow::arrow::bitmap::Bitmap; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::types::number::Number; +use databend_common_expression::types::number::F64; +use databend_common_expression::types::DataType; +use databend_common_expression::types::NumberDataType; +use databend_common_expression::types::NumberType; +use databend_common_expression::types::ValueType; +use databend_common_expression::with_number_mapped_type; +use databend_common_expression::Column; +use databend_common_expression::ColumnBuilder; +use databend_common_expression::Scalar; use num_traits::AsPrimitive; use serde::Deserialize; use serde::Serialize; diff --git a/src/query/functions/src/aggregates/aggregate_distinct_state.rs b/src/query/functions/src/aggregates/aggregate_distinct_state.rs index ff056719b69e..f99345e86957 100644 --- a/src/query/functions/src/aggregates/aggregate_distinct_state.rs +++ b/src/query/functions/src/aggregates/aggregate_distinct_state.rs @@ -21,25 +21,25 @@ use std::marker::Sync; use std::sync::Arc; use bumpalo::Bump; -use common_arrow::arrow::bitmap::Bitmap; -use common_arrow::arrow::buffer::Buffer; -use common_exception::Result; -use common_expression::types::number::Number; -use common_expression::types::string::StringColumnBuilder; -use common_expression::types::AnyType; -use common_expression::types::DataType; -use common_expression::types::NumberType; -use common_expression::types::StringType; -use common_expression::types::ValueType; -use common_expression::Column; -use common_expression::ColumnBuilder; -use common_expression::Scalar; -use common_hashtable::HashSet as CommonHashSet; -use common_hashtable::HashtableKeyable; -use common_hashtable::HashtableLike; -use common_hashtable::ShortStringHashSet; -use common_hashtable::StackHashSet; -use common_io::prelude::*; +use databend_common_arrow::arrow::bitmap::Bitmap; +use databend_common_arrow::arrow::buffer::Buffer; +use databend_common_exception::Result; +use databend_common_expression::types::number::Number; +use databend_common_expression::types::string::StringColumnBuilder; +use databend_common_expression::types::AnyType; +use databend_common_expression::types::DataType; +use databend_common_expression::types::NumberType; +use databend_common_expression::types::StringType; +use databend_common_expression::types::ValueType; +use databend_common_expression::Column; +use databend_common_expression::ColumnBuilder; +use databend_common_expression::Scalar; +use databend_common_hashtable::HashSet as CommonHashSet; +use databend_common_hashtable::HashtableKeyable; +use databend_common_hashtable::HashtableLike; +use databend_common_hashtable::ShortStringHashSet; +use databend_common_hashtable::StackHashSet; +use databend_common_io::prelude::*; use serde::de::DeserializeOwned; use serde::Serialize; use siphasher::sip128::Hasher128; diff --git a/src/query/functions/src/aggregates/aggregate_function_factory.rs b/src/query/functions/src/aggregates/aggregate_function_factory.rs index 500e5968a55d..e3af96bb730a 100644 --- a/src/query/functions/src/aggregates/aggregate_function_factory.rs +++ b/src/query/functions/src/aggregates/aggregate_function_factory.rs @@ -16,10 +16,10 @@ use std::collections::HashMap; use std::sync::Arc; use std::sync::LazyLock; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::types::DataType; -use common_expression::Scalar; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::types::DataType; +use databend_common_expression::Scalar; use super::AggregateFunctionCombinatorNull; use super::AggregateFunctionOrNullAdaptor; diff --git a/src/query/functions/src/aggregates/aggregate_kurtosis.rs b/src/query/functions/src/aggregates/aggregate_kurtosis.rs index 7e72b2ff78ab..563076f3219e 100644 --- a/src/query/functions/src/aggregates/aggregate_kurtosis.rs +++ b/src/query/functions/src/aggregates/aggregate_kurtosis.rs @@ -1,139 +1,139 @@ -// Copyright 2021 Datafuse Labs -// -// Licensed 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. - -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::types::number::*; -use common_expression::types::*; -use common_expression::with_number_mapped_type; -use common_expression::Scalar; -use num_traits::AsPrimitive; -use serde::Deserialize; -use serde::Serialize; - -use super::deserialize_state; -use super::serialize_state; -use super::AggregateUnaryFunction; -use super::FunctionData; -use super::UnaryState; -use crate::aggregates::aggregate_function_factory::AggregateFunctionDescription; -use crate::aggregates::assert_unary_arguments; -use crate::aggregates::AggregateFunctionRef; - -#[derive(Default, Serialize, Deserialize)] -struct KurtosisState { - pub n: u64, - pub sum: f64, - pub sum_sqr: f64, - pub sum_cub: f64, - pub sum_four: f64, -} - -impl UnaryState for KurtosisState -where - T: ValueType + Sync + Send, - T::Scalar: AsPrimitive, -{ - fn add(&mut self, other: T::ScalarRef<'_>) -> Result<()> { - let other = T::to_owned_scalar(other).as_(); - self.n += 1; - self.sum += other; - self.sum_sqr += other.powi(2); - self.sum_cub += other.powi(3); - self.sum_four += other.powi(4); - Ok(()) - } - - fn merge(&mut self, rhs: &Self) -> Result<()> { - if rhs.n == 0 { - return Ok(()); - } - self.n += rhs.n; - self.sum += rhs.sum; - self.sum_sqr += rhs.sum_sqr; - self.sum_cub += rhs.sum_cub; - self.sum_four += rhs.sum_four; - Ok(()) - } - - fn merge_result( - &mut self, - builder: &mut Vec, - _function_data: Option<&dyn FunctionData>, - ) -> Result<()> { - if self.n <= 3 { - builder.push(F64::from(0_f64)); - return Ok(()); - } - let n = self.n as f64; - let temp = 1.0 / n; - if self.sum_sqr - self.sum * self.sum * temp == 0.0 { - builder.push(F64::from(0_f64)); - return Ok(()); - } - let m4 = temp - * (self.sum_four - 4.0 * self.sum_cub * self.sum * temp - + 6.0 * self.sum_sqr * self.sum * self.sum * temp * temp - - 3.0 * self.sum.powi(4) * temp.powi(3)); - let m2 = temp * (self.sum_sqr - self.sum * self.sum * temp); - if m2 <= 0.0 || (n - 2.0) * (n - 3.0) == 0.0 { - builder.push(F64::from(0_f64)); - return Ok(()); - } - let value = - (n - 1.0) * ((n + 1.0) * m4 / (m2 * m2) - 3.0 * (n - 1.0)) / ((n - 2.0) * (n - 3.0)); - if value.is_infinite() || value.is_nan() { - return Err(ErrorCode::SemanticError("Kurtosis is out of range!")); - } else { - builder.push(F64::from(value)); - } - Ok(()) - } - - fn serialize(&self, writer: &mut Vec) -> Result<()> { - serialize_state(writer, self) - } - - fn deserialize(reader: &mut &[u8]) -> Result { - deserialize_state::(reader) - } -} - -pub fn try_create_aggregate_kurtosis_function( - display_name: &str, - params: Vec, - arguments: Vec, -) -> Result { - assert_unary_arguments(display_name, arguments.len())?; - - with_number_mapped_type!(|NUM_TYPE| match &arguments[0] { - DataType::Number(NumberDataType::NUM_TYPE) => { - let return_type = DataType::Number(NumberDataType::Float64); - AggregateUnaryFunction::< - KurtosisState, - NumberType, - Float64Type, - >::try_create_unary(display_name, return_type, params, arguments[0].clone()) - } - - _ => Err(ErrorCode::BadDataValueType(format!( - "{} does not support type '{:?}'", - display_name, arguments[0] - ))), - }) -} - -pub fn aggregate_kurtosis_function_desc() -> AggregateFunctionDescription { - AggregateFunctionDescription::creator(Box::new(try_create_aggregate_kurtosis_function)) -} +// Copyright 2021 Datafuse Labs +// +// Licensed 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. + +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::types::number::*; +use databend_common_expression::types::*; +use databend_common_expression::with_number_mapped_type; +use databend_common_expression::Scalar; +use num_traits::AsPrimitive; +use serde::Deserialize; +use serde::Serialize; + +use super::deserialize_state; +use super::serialize_state; +use super::AggregateUnaryFunction; +use super::FunctionData; +use super::UnaryState; +use crate::aggregates::aggregate_function_factory::AggregateFunctionDescription; +use crate::aggregates::assert_unary_arguments; +use crate::aggregates::AggregateFunctionRef; + +#[derive(Default, Serialize, Deserialize)] +struct KurtosisState { + pub n: u64, + pub sum: f64, + pub sum_sqr: f64, + pub sum_cub: f64, + pub sum_four: f64, +} + +impl UnaryState for KurtosisState +where + T: ValueType + Sync + Send, + T::Scalar: AsPrimitive, +{ + fn add(&mut self, other: T::ScalarRef<'_>) -> Result<()> { + let other = T::to_owned_scalar(other).as_(); + self.n += 1; + self.sum += other; + self.sum_sqr += other.powi(2); + self.sum_cub += other.powi(3); + self.sum_four += other.powi(4); + Ok(()) + } + + fn merge(&mut self, rhs: &Self) -> Result<()> { + if rhs.n == 0 { + return Ok(()); + } + self.n += rhs.n; + self.sum += rhs.sum; + self.sum_sqr += rhs.sum_sqr; + self.sum_cub += rhs.sum_cub; + self.sum_four += rhs.sum_four; + Ok(()) + } + + fn merge_result( + &mut self, + builder: &mut Vec, + _function_data: Option<&dyn FunctionData>, + ) -> Result<()> { + if self.n <= 3 { + builder.push(F64::from(0_f64)); + return Ok(()); + } + let n = self.n as f64; + let temp = 1.0 / n; + if self.sum_sqr - self.sum * self.sum * temp == 0.0 { + builder.push(F64::from(0_f64)); + return Ok(()); + } + let m4 = temp + * (self.sum_four - 4.0 * self.sum_cub * self.sum * temp + + 6.0 * self.sum_sqr * self.sum * self.sum * temp * temp + - 3.0 * self.sum.powi(4) * temp.powi(3)); + let m2 = temp * (self.sum_sqr - self.sum * self.sum * temp); + if m2 <= 0.0 || (n - 2.0) * (n - 3.0) == 0.0 { + builder.push(F64::from(0_f64)); + return Ok(()); + } + let value = + (n - 1.0) * ((n + 1.0) * m4 / (m2 * m2) - 3.0 * (n - 1.0)) / ((n - 2.0) * (n - 3.0)); + if value.is_infinite() || value.is_nan() { + return Err(ErrorCode::SemanticError("Kurtosis is out of range!")); + } else { + builder.push(F64::from(value)); + } + Ok(()) + } + + fn serialize(&self, writer: &mut Vec) -> Result<()> { + serialize_state(writer, self) + } + + fn deserialize(reader: &mut &[u8]) -> Result { + deserialize_state::(reader) + } +} + +pub fn try_create_aggregate_kurtosis_function( + display_name: &str, + params: Vec, + arguments: Vec, +) -> Result { + assert_unary_arguments(display_name, arguments.len())?; + + with_number_mapped_type!(|NUM_TYPE| match &arguments[0] { + DataType::Number(NumberDataType::NUM_TYPE) => { + let return_type = DataType::Number(NumberDataType::Float64); + AggregateUnaryFunction::< + KurtosisState, + NumberType, + Float64Type, + >::try_create_unary(display_name, return_type, params, arguments[0].clone()) + } + + _ => Err(ErrorCode::BadDataValueType(format!( + "{} does not support type '{:?}'", + display_name, arguments[0] + ))), + }) +} + +pub fn aggregate_kurtosis_function_desc() -> AggregateFunctionDescription { + AggregateFunctionDescription::creator(Box::new(try_create_aggregate_kurtosis_function)) +} diff --git a/src/query/functions/src/aggregates/aggregate_min_max_any.rs b/src/query/functions/src/aggregates/aggregate_min_max_any.rs index 41d1c1761829..6fc5e52d43df 100644 --- a/src/query/functions/src/aggregates/aggregate_min_max_any.rs +++ b/src/query/functions/src/aggregates/aggregate_min_max_any.rs @@ -15,13 +15,13 @@ use std::marker::PhantomData; use std::sync::Arc; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::types::decimal::*; -use common_expression::types::number::*; -use common_expression::types::*; -use common_expression::with_number_mapped_type; -use common_expression::Scalar; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::types::decimal::*; +use databend_common_expression::types::number::*; +use databend_common_expression::types::*; +use databend_common_expression::with_number_mapped_type; +use databend_common_expression::Scalar; use ethnum::i256; use serde::de::DeserializeOwned; use serde::Deserialize; diff --git a/src/query/functions/src/aggregates/aggregate_null_result.rs b/src/query/functions/src/aggregates/aggregate_null_result.rs index 01e4dcbf71cf..4cdb2dd3a09d 100644 --- a/src/query/functions/src/aggregates/aggregate_null_result.rs +++ b/src/query/functions/src/aggregates/aggregate_null_result.rs @@ -16,13 +16,13 @@ use std::alloc::Layout; use std::fmt; use std::sync::Arc; -use common_arrow::arrow::bitmap::Bitmap; -use common_exception::Result; -use common_expression::types::AnyType; -use common_expression::types::DataType; -use common_expression::types::ValueType; -use common_expression::Column; -use common_expression::ColumnBuilder; +use databend_common_arrow::arrow::bitmap::Bitmap; +use databend_common_exception::Result; +use databend_common_expression::types::AnyType; +use databend_common_expression::types::DataType; +use databend_common_expression::types::ValueType; +use databend_common_expression::Column; +use databend_common_expression::ColumnBuilder; use super::aggregate_function::AggregateFunction; use super::StateAddr; diff --git a/src/query/functions/src/aggregates/aggregate_quantile_cont.rs b/src/query/functions/src/aggregates/aggregate_quantile_cont.rs index 8108f458d62b..26771eac33a2 100644 --- a/src/query/functions/src/aggregates/aggregate_quantile_cont.rs +++ b/src/query/functions/src/aggregates/aggregate_quantile_cont.rs @@ -15,17 +15,17 @@ use std::any::Any; use std::sync::Arc; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::type_check::check_number; -use common_expression::types::number::*; -use common_expression::types::*; -use common_expression::with_number_mapped_type; -use common_expression::Column; -use common_expression::Expr; -use common_expression::FunctionContext; -use common_expression::Scalar; -use common_expression::ScalarRef; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::type_check::check_number; +use databend_common_expression::types::number::*; +use databend_common_expression::types::*; +use databend_common_expression::with_number_mapped_type; +use databend_common_expression::Column; +use databend_common_expression::Expr; +use databend_common_expression::FunctionContext; +use databend_common_expression::Scalar; +use databend_common_expression::ScalarRef; use num_traits::AsPrimitive; use ordered_float::OrderedFloat; use serde::Deserialize; diff --git a/src/query/functions/src/aggregates/aggregate_quantile_disc.rs b/src/query/functions/src/aggregates/aggregate_quantile_disc.rs index 2a0bf4938b7b..32e7dfee2849 100644 --- a/src/query/functions/src/aggregates/aggregate_quantile_disc.rs +++ b/src/query/functions/src/aggregates/aggregate_quantile_disc.rs @@ -1,292 +1,292 @@ -// Copyright 2021 Datafuse Labs -// -// Licensed 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. - -use std::sync::Arc; - -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::types::array::ArrayColumnBuilder; -use common_expression::types::decimal::*; -use common_expression::types::number::*; -use common_expression::types::*; -use common_expression::with_number_mapped_type; -use common_expression::Scalar; -use ethnum::i256; -use serde::de::DeserializeOwned; -use serde::Deserialize; -use serde::Serialize; - -use super::deserialize_state; -use super::get_levels; -use super::serialize_state; -use super::AggregateUnaryFunction; -use super::FunctionData; -use super::QuantileData; -use super::UnaryState; -use crate::aggregates::aggregate_function_factory::AggregateFunctionDescription; -use crate::aggregates::assert_unary_arguments; -use crate::aggregates::AggregateFunctionRef; -use crate::with_simple_no_number_mapped_type; - -#[derive(Serialize, Deserialize)] -struct QuantileState -where - T: ValueType, - T::Scalar: Serialize + DeserializeOwned, -{ - #[serde(bound(deserialize = "T::Scalar: DeserializeOwned"))] - pub value: Vec, -} - -impl Default for QuantileState -where - T: ValueType, - T::Scalar: Serialize + DeserializeOwned, -{ - fn default() -> Self { - Self { value: vec![] } - } -} - -impl UnaryState> for QuantileState -where - T: ValueType + Sync + Send, - T::Scalar: Serialize + DeserializeOwned + Sync + Send + Ord, -{ - fn add(&mut self, other: T::ScalarRef<'_>) -> Result<()> { - self.value.push(T::to_owned_scalar(other)); - Ok(()) - } - - fn merge(&mut self, rhs: &Self) -> Result<()> { - self.value.extend( - rhs.value - .iter() - .map(|v| T::to_owned_scalar(T::to_scalar_ref(v))), - ); - Ok(()) - } - - fn merge_result( - &mut self, - builder: &mut ArrayColumnBuilder, - function_data: Option<&dyn FunctionData>, - ) -> Result<()> { - let value_len = self.value.len(); - let quantile_disc_data = unsafe { - function_data - .unwrap() - .as_any() - .downcast_ref_unchecked::() - }; - if quantile_disc_data.levels.len() > 1 { - let indices = quantile_disc_data - .levels - .iter() - .map(|level| ((value_len - 1) as f64 * (*level)).floor() as usize) - .collect::>(); - for idx in indices { - if idx < value_len { - self.value.as_mut_slice().select_nth_unstable(idx); - let value = self.value.get(idx).unwrap(); - builder.put_item(T::to_scalar_ref(value)); - } else { - builder.push_default(); - } - } - builder.commit_row(); - } - Ok(()) - } - - fn serialize(&self, writer: &mut Vec) -> Result<()> { - serialize_state(writer, self) - } - - fn deserialize(reader: &mut &[u8]) -> Result - where Self: Sized { - deserialize_state(reader) - } -} - -impl UnaryState for QuantileState -where - T: ArgType + Sync + Send, - T::Scalar: Serialize + DeserializeOwned + Sync + Send + Ord, -{ - fn add(&mut self, other: T::ScalarRef<'_>) -> Result<()> { - self.value.push(T::to_owned_scalar(other)); - Ok(()) - } - - fn merge(&mut self, rhs: &Self) -> Result<()> { - self.value.extend( - rhs.value - .iter() - .map(|v| T::to_owned_scalar(T::to_scalar_ref(v))), - ); - Ok(()) - } - - fn merge_result( - &mut self, - builder: &mut T::ColumnBuilder, - function_data: Option<&dyn FunctionData>, - ) -> Result<()> { - let value_len = self.value.len(); - let quantile_disc_data = unsafe { - function_data - .unwrap() - .as_any() - .downcast_ref_unchecked::() - }; - - let idx = ((value_len - 1) as f64 * quantile_disc_data.levels[0]).floor() as usize; - if idx >= value_len { - T::push_default(builder); - } else { - self.value.as_mut_slice().select_nth_unstable(idx); - let value = self.value.get(idx).unwrap(); - T::push_item(builder, T::to_scalar_ref(value)); - } - - Ok(()) - } - - fn serialize(&self, writer: &mut Vec) -> Result<()> { - serialize_state(writer, self) - } - - fn deserialize(reader: &mut &[u8]) -> Result - where Self: Sized { - deserialize_state(reader) - } -} - -pub fn try_create_aggregate_quantile_disc_function( - display_name: &str, - params: Vec, - arguments: Vec, -) -> Result { - assert_unary_arguments(display_name, arguments.len())?; - let data_type = arguments[0].clone(); - let levels = get_levels(¶ms)?; - with_simple_no_number_mapped_type!(|T| match data_type { - DataType::Number(num_type) => { - with_number_mapped_type!(|NUM_TYPE| match num_type { - NumberDataType::NUM_TYPE => { - if params.len() > 1 { - let func = AggregateUnaryFunction::< - QuantileState>, - NumberType, - ArrayType>, - >::try_create( - display_name, - DataType::Array(Box::new(data_type)), - params, - arguments[0].clone(), - ) - .with_function_data(Box::new(QuantileData { levels })) - .with_need_drop(true); - Ok(Arc::new(func)) - } else { - let func = AggregateUnaryFunction::< - QuantileState>, - NumberType, - NumberType, - >::try_create( - display_name, data_type, params, arguments[0].clone() - ) - .with_function_data(Box::new(QuantileData { levels })) - .with_need_drop(true); - Ok(Arc::new(func)) - } - } - }) - } - DataType::Decimal(DecimalDataType::Decimal128(s)) => { - let decimal_size = DecimalSize { - precision: s.precision, - scale: s.scale, - }; - let data_type = DataType::Decimal(DecimalDataType::from_size(decimal_size)?); - if params.len() > 1 { - let func = AggregateUnaryFunction::< - QuantileState>, - DecimalType, - ArrayType>, - >::try_create( - display_name, - DataType::Array(Box::new(data_type)), - params, - arguments[0].clone(), - ) - .with_function_data(Box::new(QuantileData { levels })) - .with_need_drop(true); - Ok(Arc::new(func)) - } else { - let func = AggregateUnaryFunction::< - QuantileState>, - DecimalType, - DecimalType, - >::try_create( - display_name, data_type, params, arguments[0].clone() - ) - .with_function_data(Box::new(QuantileData { levels })) - .with_need_drop(true); - Ok(Arc::new(func)) - } - } - DataType::Decimal(DecimalDataType::Decimal256(s)) => { - let decimal_size = DecimalSize { - precision: s.precision, - scale: s.scale, - }; - let data_type = DataType::Decimal(DecimalDataType::from_size(decimal_size)?); - if params.len() > 1 { - let func = AggregateUnaryFunction::< - QuantileState>, - DecimalType, - ArrayType>, - >::try_create( - display_name, - DataType::Array(Box::new(data_type)), - params, - arguments[0].clone(), - ) - .with_function_data(Box::new(QuantileData { levels })) - .with_need_drop(true); - Ok(Arc::new(func)) - } else { - let func = AggregateUnaryFunction::< - QuantileState>, - DecimalType, - DecimalType, - >::try_create( - display_name, data_type, params, arguments[0].clone() - ) - .with_function_data(Box::new(QuantileData { levels })) - .with_need_drop(true); - Ok(Arc::new(func)) - } - } - _ => Err(ErrorCode::BadDataValueType(format!( - "{} does not support type '{:?}'", - display_name, data_type - ))), - }) -} -pub fn aggregate_quantile_disc_function_desc() -> AggregateFunctionDescription { - AggregateFunctionDescription::creator(Box::new(try_create_aggregate_quantile_disc_function)) -} +// Copyright 2021 Datafuse Labs +// +// Licensed 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. + +use std::sync::Arc; + +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::types::array::ArrayColumnBuilder; +use databend_common_expression::types::decimal::*; +use databend_common_expression::types::number::*; +use databend_common_expression::types::*; +use databend_common_expression::with_number_mapped_type; +use databend_common_expression::Scalar; +use ethnum::i256; +use serde::de::DeserializeOwned; +use serde::Deserialize; +use serde::Serialize; + +use super::deserialize_state; +use super::get_levels; +use super::serialize_state; +use super::AggregateUnaryFunction; +use super::FunctionData; +use super::QuantileData; +use super::UnaryState; +use crate::aggregates::aggregate_function_factory::AggregateFunctionDescription; +use crate::aggregates::assert_unary_arguments; +use crate::aggregates::AggregateFunctionRef; +use crate::with_simple_no_number_mapped_type; + +#[derive(Serialize, Deserialize)] +struct QuantileState +where + T: ValueType, + T::Scalar: Serialize + DeserializeOwned, +{ + #[serde(bound(deserialize = "T::Scalar: DeserializeOwned"))] + pub value: Vec, +} + +impl Default for QuantileState +where + T: ValueType, + T::Scalar: Serialize + DeserializeOwned, +{ + fn default() -> Self { + Self { value: vec![] } + } +} + +impl UnaryState> for QuantileState +where + T: ValueType + Sync + Send, + T::Scalar: Serialize + DeserializeOwned + Sync + Send + Ord, +{ + fn add(&mut self, other: T::ScalarRef<'_>) -> Result<()> { + self.value.push(T::to_owned_scalar(other)); + Ok(()) + } + + fn merge(&mut self, rhs: &Self) -> Result<()> { + self.value.extend( + rhs.value + .iter() + .map(|v| T::to_owned_scalar(T::to_scalar_ref(v))), + ); + Ok(()) + } + + fn merge_result( + &mut self, + builder: &mut ArrayColumnBuilder, + function_data: Option<&dyn FunctionData>, + ) -> Result<()> { + let value_len = self.value.len(); + let quantile_disc_data = unsafe { + function_data + .unwrap() + .as_any() + .downcast_ref_unchecked::() + }; + if quantile_disc_data.levels.len() > 1 { + let indices = quantile_disc_data + .levels + .iter() + .map(|level| ((value_len - 1) as f64 * (*level)).floor() as usize) + .collect::>(); + for idx in indices { + if idx < value_len { + self.value.as_mut_slice().select_nth_unstable(idx); + let value = self.value.get(idx).unwrap(); + builder.put_item(T::to_scalar_ref(value)); + } else { + builder.push_default(); + } + } + builder.commit_row(); + } + Ok(()) + } + + fn serialize(&self, writer: &mut Vec) -> Result<()> { + serialize_state(writer, self) + } + + fn deserialize(reader: &mut &[u8]) -> Result + where Self: Sized { + deserialize_state(reader) + } +} + +impl UnaryState for QuantileState +where + T: ArgType + Sync + Send, + T::Scalar: Serialize + DeserializeOwned + Sync + Send + Ord, +{ + fn add(&mut self, other: T::ScalarRef<'_>) -> Result<()> { + self.value.push(T::to_owned_scalar(other)); + Ok(()) + } + + fn merge(&mut self, rhs: &Self) -> Result<()> { + self.value.extend( + rhs.value + .iter() + .map(|v| T::to_owned_scalar(T::to_scalar_ref(v))), + ); + Ok(()) + } + + fn merge_result( + &mut self, + builder: &mut T::ColumnBuilder, + function_data: Option<&dyn FunctionData>, + ) -> Result<()> { + let value_len = self.value.len(); + let quantile_disc_data = unsafe { + function_data + .unwrap() + .as_any() + .downcast_ref_unchecked::() + }; + + let idx = ((value_len - 1) as f64 * quantile_disc_data.levels[0]).floor() as usize; + if idx >= value_len { + T::push_default(builder); + } else { + self.value.as_mut_slice().select_nth_unstable(idx); + let value = self.value.get(idx).unwrap(); + T::push_item(builder, T::to_scalar_ref(value)); + } + + Ok(()) + } + + fn serialize(&self, writer: &mut Vec) -> Result<()> { + serialize_state(writer, self) + } + + fn deserialize(reader: &mut &[u8]) -> Result + where Self: Sized { + deserialize_state(reader) + } +} + +pub fn try_create_aggregate_quantile_disc_function( + display_name: &str, + params: Vec, + arguments: Vec, +) -> Result { + assert_unary_arguments(display_name, arguments.len())?; + let data_type = arguments[0].clone(); + let levels = get_levels(¶ms)?; + with_simple_no_number_mapped_type!(|T| match data_type { + DataType::Number(num_type) => { + with_number_mapped_type!(|NUM_TYPE| match num_type { + NumberDataType::NUM_TYPE => { + if params.len() > 1 { + let func = AggregateUnaryFunction::< + QuantileState>, + NumberType, + ArrayType>, + >::try_create( + display_name, + DataType::Array(Box::new(data_type)), + params, + arguments[0].clone(), + ) + .with_function_data(Box::new(QuantileData { levels })) + .with_need_drop(true); + Ok(Arc::new(func)) + } else { + let func = AggregateUnaryFunction::< + QuantileState>, + NumberType, + NumberType, + >::try_create( + display_name, data_type, params, arguments[0].clone() + ) + .with_function_data(Box::new(QuantileData { levels })) + .with_need_drop(true); + Ok(Arc::new(func)) + } + } + }) + } + DataType::Decimal(DecimalDataType::Decimal128(s)) => { + let decimal_size = DecimalSize { + precision: s.precision, + scale: s.scale, + }; + let data_type = DataType::Decimal(DecimalDataType::from_size(decimal_size)?); + if params.len() > 1 { + let func = AggregateUnaryFunction::< + QuantileState>, + DecimalType, + ArrayType>, + >::try_create( + display_name, + DataType::Array(Box::new(data_type)), + params, + arguments[0].clone(), + ) + .with_function_data(Box::new(QuantileData { levels })) + .with_need_drop(true); + Ok(Arc::new(func)) + } else { + let func = AggregateUnaryFunction::< + QuantileState>, + DecimalType, + DecimalType, + >::try_create( + display_name, data_type, params, arguments[0].clone() + ) + .with_function_data(Box::new(QuantileData { levels })) + .with_need_drop(true); + Ok(Arc::new(func)) + } + } + DataType::Decimal(DecimalDataType::Decimal256(s)) => { + let decimal_size = DecimalSize { + precision: s.precision, + scale: s.scale, + }; + let data_type = DataType::Decimal(DecimalDataType::from_size(decimal_size)?); + if params.len() > 1 { + let func = AggregateUnaryFunction::< + QuantileState>, + DecimalType, + ArrayType>, + >::try_create( + display_name, + DataType::Array(Box::new(data_type)), + params, + arguments[0].clone(), + ) + .with_function_data(Box::new(QuantileData { levels })) + .with_need_drop(true); + Ok(Arc::new(func)) + } else { + let func = AggregateUnaryFunction::< + QuantileState>, + DecimalType, + DecimalType, + >::try_create( + display_name, data_type, params, arguments[0].clone() + ) + .with_function_data(Box::new(QuantileData { levels })) + .with_need_drop(true); + Ok(Arc::new(func)) + } + } + _ => Err(ErrorCode::BadDataValueType(format!( + "{} does not support type '{:?}'", + display_name, data_type + ))), + }) +} +pub fn aggregate_quantile_disc_function_desc() -> AggregateFunctionDescription { + AggregateFunctionDescription::creator(Box::new(try_create_aggregate_quantile_disc_function)) +} diff --git a/src/query/functions/src/aggregates/aggregate_quantile_tdigest.rs b/src/query/functions/src/aggregates/aggregate_quantile_tdigest.rs index 2e531d3f25f7..5736332e8745 100644 --- a/src/query/functions/src/aggregates/aggregate_quantile_tdigest.rs +++ b/src/query/functions/src/aggregates/aggregate_quantile_tdigest.rs @@ -19,19 +19,19 @@ use std::fmt::Formatter; use std::marker::PhantomData; use std::sync::Arc; -use common_arrow::arrow::bitmap::Bitmap; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::type_check::check_number; -use common_expression::types::number::*; -use common_expression::types::*; -use common_expression::with_number_mapped_type; -use common_expression::Column; -use common_expression::ColumnBuilder; -use common_expression::Expr; -use common_expression::FunctionContext; -use common_expression::Scalar; -use common_expression::ScalarRef; +use databend_common_arrow::arrow::bitmap::Bitmap; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::type_check::check_number; +use databend_common_expression::types::number::*; +use databend_common_expression::types::*; +use databend_common_expression::with_number_mapped_type; +use databend_common_expression::Column; +use databend_common_expression::ColumnBuilder; +use databend_common_expression::Expr; +use databend_common_expression::FunctionContext; +use databend_common_expression::Scalar; +use databend_common_expression::ScalarRef; use itertools::Itertools; use num_traits::AsPrimitive; use serde::Deserialize; diff --git a/src/query/functions/src/aggregates/aggregate_quantile_tdigest_weighted.rs b/src/query/functions/src/aggregates/aggregate_quantile_tdigest_weighted.rs index ae16feb2aa24..a1dd5fa4b880 100644 --- a/src/query/functions/src/aggregates/aggregate_quantile_tdigest_weighted.rs +++ b/src/query/functions/src/aggregates/aggregate_quantile_tdigest_weighted.rs @@ -18,19 +18,19 @@ use std::fmt::Formatter; use std::marker::PhantomData; use std::sync::Arc; -use common_arrow::arrow::bitmap::Bitmap; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::type_check::check_number; -use common_expression::types::number::*; -use common_expression::types::*; -use common_expression::with_number_mapped_type; -use common_expression::with_unsigned_integer_mapped_type; -use common_expression::Column; -use common_expression::ColumnBuilder; -use common_expression::Expr; -use common_expression::FunctionContext; -use common_expression::Scalar; +use databend_common_arrow::arrow::bitmap::Bitmap; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::type_check::check_number; +use databend_common_expression::types::number::*; +use databend_common_expression::types::*; +use databend_common_expression::with_number_mapped_type; +use databend_common_expression::with_unsigned_integer_mapped_type; +use databend_common_expression::Column; +use databend_common_expression::ColumnBuilder; +use databend_common_expression::Expr; +use databend_common_expression::FunctionContext; +use databend_common_expression::Scalar; use num_traits::AsPrimitive; use super::deserialize_state; diff --git a/src/query/functions/src/aggregates/aggregate_retention.rs b/src/query/functions/src/aggregates/aggregate_retention.rs index 3b2a8f662868..c1cf9be50c56 100644 --- a/src/query/functions/src/aggregates/aggregate_retention.rs +++ b/src/query/functions/src/aggregates/aggregate_retention.rs @@ -16,16 +16,16 @@ use std::alloc::Layout; use std::fmt; use std::sync::Arc; -use common_arrow::arrow::bitmap::Bitmap; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::types::BooleanType; -use common_expression::types::DataType; -use common_expression::types::NumberDataType; -use common_expression::types::ValueType; -use common_expression::Column; -use common_expression::ColumnBuilder; -use common_expression::Scalar; +use databend_common_arrow::arrow::bitmap::Bitmap; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::types::BooleanType; +use databend_common_expression::types::DataType; +use databend_common_expression::types::NumberDataType; +use databend_common_expression::types::ValueType; +use databend_common_expression::Column; +use databend_common_expression::ColumnBuilder; +use databend_common_expression::Scalar; use serde::Deserialize; use serde::Serialize; diff --git a/src/query/functions/src/aggregates/aggregate_scalar_state.rs b/src/query/functions/src/aggregates/aggregate_scalar_state.rs index 386d247035fb..35fadbd8c572 100644 --- a/src/query/functions/src/aggregates/aggregate_scalar_state.rs +++ b/src/query/functions/src/aggregates/aggregate_scalar_state.rs @@ -15,11 +15,11 @@ use std::cmp::Ordering; use std::marker::PhantomData; -use common_arrow::arrow::bitmap::Bitmap; -use common_exception::Result; -use common_expression::types::DataType; -use common_expression::types::ValueType; -use common_expression::ColumnBuilder; +use databend_common_arrow::arrow::bitmap::Bitmap; +use databend_common_exception::Result; +use databend_common_expression::types::DataType; +use databend_common_expression::types::ValueType; +use databend_common_expression::ColumnBuilder; use serde::de::DeserializeOwned; use serde::Deserialize; use serde::Serialize; diff --git a/src/query/functions/src/aggregates/aggregate_skewness.rs b/src/query/functions/src/aggregates/aggregate_skewness.rs index c92fc6fbf95d..25febf62e50e 100644 --- a/src/query/functions/src/aggregates/aggregate_skewness.rs +++ b/src/query/functions/src/aggregates/aggregate_skewness.rs @@ -12,13 +12,13 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::types::number::*; -use common_expression::types::*; -use common_expression::with_number_mapped_type; -use common_expression::AggregateFunctionRef; -use common_expression::Scalar; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::types::number::*; +use databend_common_expression::types::*; +use databend_common_expression::with_number_mapped_type; +use databend_common_expression::AggregateFunctionRef; +use databend_common_expression::Scalar; use num_traits::AsPrimitive; use serde::Deserialize; use serde::Serialize; diff --git a/src/query/functions/src/aggregates/aggregate_stddev.rs b/src/query/functions/src/aggregates/aggregate_stddev.rs index 7bf428c8e0a2..6e0e7b68b1e8 100644 --- a/src/query/functions/src/aggregates/aggregate_stddev.rs +++ b/src/query/functions/src/aggregates/aggregate_stddev.rs @@ -15,24 +15,24 @@ use std::any::Any; use std::sync::Arc; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::types::decimal::Decimal; -use common_expression::types::decimal::Decimal128Type; -use common_expression::types::decimal::Decimal256Type; -use common_expression::types::decimal::MAX_DECIMAL128_PRECISION; -use common_expression::types::decimal::MAX_DECIMAL256_PRECISION; -use common_expression::types::number::Number; -use common_expression::types::number::F64; -use common_expression::types::DataType; -use common_expression::types::DecimalDataType; -use common_expression::types::DecimalSize; -use common_expression::types::Float64Type; -use common_expression::types::NumberDataType; -use common_expression::types::NumberType; -use common_expression::types::ValueType; -use common_expression::with_number_mapped_type; -use common_expression::Scalar; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::types::decimal::Decimal; +use databend_common_expression::types::decimal::Decimal128Type; +use databend_common_expression::types::decimal::Decimal256Type; +use databend_common_expression::types::decimal::MAX_DECIMAL128_PRECISION; +use databend_common_expression::types::decimal::MAX_DECIMAL256_PRECISION; +use databend_common_expression::types::number::Number; +use databend_common_expression::types::number::F64; +use databend_common_expression::types::DataType; +use databend_common_expression::types::DecimalDataType; +use databend_common_expression::types::DecimalSize; +use databend_common_expression::types::Float64Type; +use databend_common_expression::types::NumberDataType; +use databend_common_expression::types::NumberType; +use databend_common_expression::types::ValueType; +use databend_common_expression::with_number_mapped_type; +use databend_common_expression::Scalar; use num_traits::AsPrimitive; use serde::de::DeserializeOwned; use serde::Deserialize; diff --git a/src/query/functions/src/aggregates/aggregate_string_agg.rs b/src/query/functions/src/aggregates/aggregate_string_agg.rs index 9247e6fc39e1..4a912a7c690a 100644 --- a/src/query/functions/src/aggregates/aggregate_string_agg.rs +++ b/src/query/functions/src/aggregates/aggregate_string_agg.rs @@ -16,15 +16,15 @@ use std::alloc::Layout; use std::fmt; use std::sync::Arc; -use common_arrow::arrow::bitmap::Bitmap; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::types::DataType; -use common_expression::types::StringType; -use common_expression::types::ValueType; -use common_expression::Column; -use common_expression::ColumnBuilder; -use common_expression::Scalar; +use databend_common_arrow::arrow::bitmap::Bitmap; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::types::DataType; +use databend_common_expression::types::StringType; +use databend_common_expression::types::ValueType; +use databend_common_expression::Column; +use databend_common_expression::ColumnBuilder; +use databend_common_expression::Scalar; use serde::Deserialize; use serde::Serialize; diff --git a/src/query/functions/src/aggregates/aggregate_sum.rs b/src/query/functions/src/aggregates/aggregate_sum.rs index d814feff025a..a829f9e9bd8e 100644 --- a/src/query/functions/src/aggregates/aggregate_sum.rs +++ b/src/query/functions/src/aggregates/aggregate_sum.rs @@ -12,19 +12,19 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_arrow::arrow::bitmap::Bitmap; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::types::decimal::*; -use common_expression::types::number::*; -use common_expression::types::*; -use common_expression::utils::arithmetics_type::ResultTypeOfUnary; -use common_expression::with_number_mapped_type; -use common_expression::AggregateFunctionRef; -use common_expression::Column; -use common_expression::ColumnBuilder; -use common_expression::Scalar; -use common_expression::StateAddr; +use databend_common_arrow::arrow::bitmap::Bitmap; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::types::decimal::*; +use databend_common_expression::types::number::*; +use databend_common_expression::types::*; +use databend_common_expression::utils::arithmetics_type::ResultTypeOfUnary; +use databend_common_expression::with_number_mapped_type; +use databend_common_expression::AggregateFunctionRef; +use databend_common_expression::Column; +use databend_common_expression::ColumnBuilder; +use databend_common_expression::Scalar; +use databend_common_expression::StateAddr; use num_traits::AsPrimitive; use serde::de::DeserializeOwned; use serde::Deserialize; diff --git a/src/query/functions/src/aggregates/aggregate_unary.rs b/src/query/functions/src/aggregates/aggregate_unary.rs index 36da5818b486..8455e43749e7 100644 --- a/src/query/functions/src/aggregates/aggregate_unary.rs +++ b/src/query/functions/src/aggregates/aggregate_unary.rs @@ -20,20 +20,20 @@ use std::fmt::Formatter; use std::marker::PhantomData; use std::sync::Arc; -use common_arrow::arrow::bitmap::Bitmap; -use common_base::base::take_mut; -use common_exception::Result; -use common_expression::types::decimal::Decimal128Type; -use common_expression::types::decimal::Decimal256Type; -use common_expression::types::decimal::DecimalColumnBuilder; -use common_expression::types::DataType; -use common_expression::types::ValueType; -use common_expression::AggregateFunction; -use common_expression::AggregateFunctionRef; -use common_expression::Column; -use common_expression::ColumnBuilder; -use common_expression::Scalar; -use common_expression::StateAddr; +use databend_common_arrow::arrow::bitmap::Bitmap; +use databend_common_base::base::take_mut; +use databend_common_exception::Result; +use databend_common_expression::types::decimal::Decimal128Type; +use databend_common_expression::types::decimal::Decimal256Type; +use databend_common_expression::types::decimal::DecimalColumnBuilder; +use databend_common_expression::types::DataType; +use databend_common_expression::types::ValueType; +use databend_common_expression::AggregateFunction; +use databend_common_expression::AggregateFunctionRef; +use databend_common_expression::Column; +use databend_common_expression::ColumnBuilder; +use databend_common_expression::Scalar; +use databend_common_expression::StateAddr; pub trait UnaryState: Send + Sync + Default where diff --git a/src/query/functions/src/aggregates/aggregate_window_funnel.rs b/src/query/functions/src/aggregates/aggregate_window_funnel.rs index 98d0a226d819..7da08bdd6ecf 100644 --- a/src/query/functions/src/aggregates/aggregate_window_funnel.rs +++ b/src/query/functions/src/aggregates/aggregate_window_funnel.rs @@ -19,26 +19,26 @@ use std::marker::PhantomData; use std::ops::Sub; use std::sync::Arc; -use common_arrow::arrow::bitmap::Bitmap; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::type_check::check_number; -use common_expression::types::number::Number; -use common_expression::types::number::UInt8Type; -use common_expression::types::ArgType; -use common_expression::types::BooleanType; -use common_expression::types::DataType; -use common_expression::types::DateType; -use common_expression::types::NumberDataType; -use common_expression::types::NumberType; -use common_expression::types::TimestampType; -use common_expression::types::ValueType; -use common_expression::with_integer_mapped_type; -use common_expression::Column; -use common_expression::ColumnBuilder; -use common_expression::Expr; -use common_expression::FunctionContext; -use common_expression::Scalar; +use databend_common_arrow::arrow::bitmap::Bitmap; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::type_check::check_number; +use databend_common_expression::types::number::Number; +use databend_common_expression::types::number::UInt8Type; +use databend_common_expression::types::ArgType; +use databend_common_expression::types::BooleanType; +use databend_common_expression::types::DataType; +use databend_common_expression::types::DateType; +use databend_common_expression::types::NumberDataType; +use databend_common_expression::types::NumberType; +use databend_common_expression::types::TimestampType; +use databend_common_expression::types::ValueType; +use databend_common_expression::with_integer_mapped_type; +use databend_common_expression::Column; +use databend_common_expression::ColumnBuilder; +use databend_common_expression::Expr; +use databend_common_expression::FunctionContext; +use databend_common_expression::Scalar; use num_traits::AsPrimitive; use serde::de::DeserializeOwned; use serde::Deserialize; diff --git a/src/query/functions/src/aggregates/aggregator_common.rs b/src/query/functions/src/aggregates/aggregator_common.rs index 5d68a1827e53..dab3d7837755 100644 --- a/src/query/functions/src/aggregates/aggregator_common.rs +++ b/src/query/functions/src/aggregates/aggregator_common.rs @@ -15,14 +15,14 @@ use std::fmt::Display; use bumpalo::Bump; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::types::DataType; -use common_expression::Column; -use common_expression::ColumnBuilder; -use common_expression::Scalar; -use common_io::prelude::bincode_deserialize_from_stream; -use common_io::prelude::bincode_serialize_into_buf; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::types::DataType; +use databend_common_expression::Column; +use databend_common_expression::ColumnBuilder; +use databend_common_expression::Scalar; +use databend_common_io::prelude::bincode_deserialize_from_stream; +use databend_common_io::prelude::bincode_serialize_into_buf; use super::AggregateFunctionFactory; use super::AggregateFunctionRef; diff --git a/src/query/functions/src/aggregates/mod.rs b/src/query/functions/src/aggregates/mod.rs index 21e8f9b0c7ce..299607078d0f 100644 --- a/src/query/functions/src/aggregates/mod.rs +++ b/src/query/functions/src/aggregates/mod.rs @@ -70,4 +70,4 @@ pub use aggregate_sum::*; pub use aggregate_unary::*; pub use aggregator::Aggregators; pub use aggregator_common::*; -pub use common_expression::aggregate as aggregate_function; +pub use databend_common_expression::aggregate as aggregate_function; diff --git a/src/query/functions/src/cast_rules.rs b/src/query/functions/src/cast_rules.rs index f6e427beb84c..781e91d70cf6 100644 --- a/src/query/functions/src/cast_rules.rs +++ b/src/query/functions/src/cast_rules.rs @@ -12,13 +12,13 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_expression::type_check::ALL_SIMPLE_CAST_FUNCTIONS; -use common_expression::types::DataType; -use common_expression::types::NumberDataType; -use common_expression::types::ALL_INTEGER_TYPES; -use common_expression::types::ALL_NUMERICS_TYPES; -use common_expression::AutoCastRules; -use common_expression::FunctionRegistry; +use databend_common_expression::type_check::ALL_SIMPLE_CAST_FUNCTIONS; +use databend_common_expression::types::DataType; +use databend_common_expression::types::NumberDataType; +use databend_common_expression::types::ALL_INTEGER_TYPES; +use databend_common_expression::types::ALL_NUMERICS_TYPES; +use databend_common_expression::AutoCastRules; +use databend_common_expression::FunctionRegistry; use crate::scalars::ALL_COMP_FUNC_NAMES; diff --git a/src/query/functions/src/lib.rs b/src/query/functions/src/lib.rs index ef2f6dffcd11..6849e40e4097 100644 --- a/src/query/functions/src/lib.rs +++ b/src/query/functions/src/lib.rs @@ -22,8 +22,8 @@ #![feature(lazy_cell)] use aggregates::AggregateFunctionFactory; -use common_expression::FunctionRegistry; use ctor::ctor; +use databend_common_expression::FunctionRegistry; pub mod aggregates; mod cast_rules; diff --git a/src/query/functions/src/scalars/arithmetic.rs b/src/query/functions/src/scalars/arithmetic.rs index 4811d605f1de..4d75ecb3e189 100644 --- a/src/query/functions/src/scalars/arithmetic.rs +++ b/src/query/functions/src/scalars/arithmetic.rs @@ -19,54 +19,54 @@ use std::ops::BitOr; use std::ops::BitXor; use std::sync::Arc; -use common_arrow::arrow::bitmap::Bitmap; -use common_expression::types::decimal::Decimal; -use common_expression::types::decimal::DecimalColumn; -use common_expression::types::decimal::DecimalDomain; -use common_expression::types::nullable::NullableColumn; -use common_expression::types::nullable::NullableDomain; -use common_expression::types::number::Number; -use common_expression::types::number::NumberType; -use common_expression::types::number::F64; -use common_expression::types::string::StringColumnBuilder; -use common_expression::types::AnyType; -use common_expression::types::ArgType; -use common_expression::types::DataType; -use common_expression::types::DecimalDataType; -use common_expression::types::NullableType; -use common_expression::types::NumberClass; -use common_expression::types::NumberDataType; -use common_expression::types::SimpleDomain; -use common_expression::types::StringType; -use common_expression::types::ALL_FLOAT_TYPES; -use common_expression::types::ALL_INTEGER_TYPES; -use common_expression::types::ALL_NUMBER_CLASSES; -use common_expression::types::ALL_NUMERICS_TYPES; -use common_expression::types::ALL_UNSIGNED_INTEGER_TYPES; -use common_expression::utils::arithmetics_type::ResultTypeOfBinary; -use common_expression::utils::arithmetics_type::ResultTypeOfUnary; -use common_expression::values::Value; -use common_expression::values::ValueRef; -use common_expression::vectorize_1_arg; -use common_expression::vectorize_with_builder_1_arg; -use common_expression::vectorize_with_builder_2_arg; -use common_expression::with_float_mapped_type; -use common_expression::with_integer_mapped_type; -use common_expression::with_number_mapped_type; -use common_expression::with_number_mapped_type_without_64; -use common_expression::with_unsigned_integer_mapped_type; -use common_expression::Column; -use common_expression::ColumnBuilder; -use common_expression::Domain; -use common_expression::EvalContext; -use common_expression::Function; -use common_expression::FunctionDomain; -use common_expression::FunctionEval; -use common_expression::FunctionRegistry; -use common_expression::FunctionSignature; -use common_expression::Scalar; -use common_io::display_decimal_128; -use common_io::display_decimal_256; +use databend_common_arrow::arrow::bitmap::Bitmap; +use databend_common_expression::types::decimal::Decimal; +use databend_common_expression::types::decimal::DecimalColumn; +use databend_common_expression::types::decimal::DecimalDomain; +use databend_common_expression::types::nullable::NullableColumn; +use databend_common_expression::types::nullable::NullableDomain; +use databend_common_expression::types::number::Number; +use databend_common_expression::types::number::NumberType; +use databend_common_expression::types::number::F64; +use databend_common_expression::types::string::StringColumnBuilder; +use databend_common_expression::types::AnyType; +use databend_common_expression::types::ArgType; +use databend_common_expression::types::DataType; +use databend_common_expression::types::DecimalDataType; +use databend_common_expression::types::NullableType; +use databend_common_expression::types::NumberClass; +use databend_common_expression::types::NumberDataType; +use databend_common_expression::types::SimpleDomain; +use databend_common_expression::types::StringType; +use databend_common_expression::types::ALL_FLOAT_TYPES; +use databend_common_expression::types::ALL_INTEGER_TYPES; +use databend_common_expression::types::ALL_NUMBER_CLASSES; +use databend_common_expression::types::ALL_NUMERICS_TYPES; +use databend_common_expression::types::ALL_UNSIGNED_INTEGER_TYPES; +use databend_common_expression::utils::arithmetics_type::ResultTypeOfBinary; +use databend_common_expression::utils::arithmetics_type::ResultTypeOfUnary; +use databend_common_expression::values::Value; +use databend_common_expression::values::ValueRef; +use databend_common_expression::vectorize_1_arg; +use databend_common_expression::vectorize_with_builder_1_arg; +use databend_common_expression::vectorize_with_builder_2_arg; +use databend_common_expression::with_float_mapped_type; +use databend_common_expression::with_integer_mapped_type; +use databend_common_expression::with_number_mapped_type; +use databend_common_expression::with_number_mapped_type_without_64; +use databend_common_expression::with_unsigned_integer_mapped_type; +use databend_common_expression::Column; +use databend_common_expression::ColumnBuilder; +use databend_common_expression::Domain; +use databend_common_expression::EvalContext; +use databend_common_expression::Function; +use databend_common_expression::FunctionDomain; +use databend_common_expression::FunctionEval; +use databend_common_expression::FunctionRegistry; +use databend_common_expression::FunctionSignature; +use databend_common_expression::Scalar; +use databend_common_io::display_decimal_128; +use databend_common_io::display_decimal_256; use ethnum::i256; use lexical_core::FormattedSize; use num_traits::AsPrimitive; diff --git a/src/query/functions/src/scalars/arithmetic_modulo.rs b/src/query/functions/src/scalars/arithmetic_modulo.rs index ee94d6a920c8..741d8a5beb64 100644 --- a/src/query/functions/src/scalars/arithmetic_modulo.rs +++ b/src/query/functions/src/scalars/arithmetic_modulo.rs @@ -14,12 +14,12 @@ use std::ops::Rem; -use common_expression::types::number::*; -use common_expression::types::ArgType; -use common_expression::types::ValueType; -use common_expression::EvalContext; -use common_expression::Value; -use common_expression::ValueRef; +use databend_common_expression::types::number::*; +use databend_common_expression::types::ArgType; +use databend_common_expression::types::ValueType; +use databend_common_expression::EvalContext; +use databend_common_expression::Value; +use databend_common_expression::ValueRef; use num_traits::AsPrimitive; use strength_reduce::StrengthReducedU16; use strength_reduce::StrengthReducedU32; diff --git a/src/query/functions/src/scalars/array.rs b/src/query/functions/src/scalars/array.rs index 79bee6d81399..4d29a9c1972e 100644 --- a/src/query/functions/src/scalars/array.rs +++ b/src/query/functions/src/scalars/array.rs @@ -16,53 +16,53 @@ use std::hash::Hash; use std::ops::Range; use std::sync::Arc; -use common_expression::types::array::ArrayColumnBuilder; -use common_expression::types::boolean::BooleanDomain; -use common_expression::types::nullable::NullableDomain; -use common_expression::types::number::NumberScalar; -use common_expression::types::number::SimpleDomain; -use common_expression::types::number::UInt64Type; -use common_expression::types::AnyType; -use common_expression::types::ArgType; -use common_expression::types::ArrayType; -use common_expression::types::BooleanType; -use common_expression::types::DataType; -use common_expression::types::DateType; -use common_expression::types::EmptyArrayType; -use common_expression::types::GenericType; -use common_expression::types::NullType; -use common_expression::types::NullableType; -use common_expression::types::NumberDataType; -use common_expression::types::NumberType; -use common_expression::types::StringType; -use common_expression::types::TimestampType; -use common_expression::types::ValueType; -use common_expression::types::ALL_NUMERICS_TYPES; -use common_expression::vectorize_1_arg; -use common_expression::vectorize_2_arg; -use common_expression::vectorize_with_builder_1_arg; -use common_expression::vectorize_with_builder_2_arg; -use common_expression::vectorize_with_builder_3_arg; -use common_expression::with_number_mapped_type; -use common_expression::BlockEntry; -use common_expression::Column; -use common_expression::ColumnBuilder; -use common_expression::DataBlock; -use common_expression::Domain; -use common_expression::EvalContext; -use common_expression::Function; -use common_expression::FunctionDomain; -use common_expression::FunctionEval; -use common_expression::FunctionRegistry; -use common_expression::FunctionSignature; -use common_expression::Scalar; -use common_expression::ScalarRef; -use common_expression::SortColumnDescription; -use common_expression::Value; -use common_expression::ValueRef; -use common_hashtable::HashtableKeyable; -use common_hashtable::KeysRef; -use common_hashtable::StackHashSet; +use databend_common_expression::types::array::ArrayColumnBuilder; +use databend_common_expression::types::boolean::BooleanDomain; +use databend_common_expression::types::nullable::NullableDomain; +use databend_common_expression::types::number::NumberScalar; +use databend_common_expression::types::number::SimpleDomain; +use databend_common_expression::types::number::UInt64Type; +use databend_common_expression::types::AnyType; +use databend_common_expression::types::ArgType; +use databend_common_expression::types::ArrayType; +use databend_common_expression::types::BooleanType; +use databend_common_expression::types::DataType; +use databend_common_expression::types::DateType; +use databend_common_expression::types::EmptyArrayType; +use databend_common_expression::types::GenericType; +use databend_common_expression::types::NullType; +use databend_common_expression::types::NullableType; +use databend_common_expression::types::NumberDataType; +use databend_common_expression::types::NumberType; +use databend_common_expression::types::StringType; +use databend_common_expression::types::TimestampType; +use databend_common_expression::types::ValueType; +use databend_common_expression::types::ALL_NUMERICS_TYPES; +use databend_common_expression::vectorize_1_arg; +use databend_common_expression::vectorize_2_arg; +use databend_common_expression::vectorize_with_builder_1_arg; +use databend_common_expression::vectorize_with_builder_2_arg; +use databend_common_expression::vectorize_with_builder_3_arg; +use databend_common_expression::with_number_mapped_type; +use databend_common_expression::BlockEntry; +use databend_common_expression::Column; +use databend_common_expression::ColumnBuilder; +use databend_common_expression::DataBlock; +use databend_common_expression::Domain; +use databend_common_expression::EvalContext; +use databend_common_expression::Function; +use databend_common_expression::FunctionDomain; +use databend_common_expression::FunctionEval; +use databend_common_expression::FunctionRegistry; +use databend_common_expression::FunctionSignature; +use databend_common_expression::Scalar; +use databend_common_expression::ScalarRef; +use databend_common_expression::SortColumnDescription; +use databend_common_expression::Value; +use databend_common_expression::ValueRef; +use databend_common_hashtable::HashtableKeyable; +use databend_common_hashtable::KeysRef; +use databend_common_hashtable::StackHashSet; use itertools::Itertools; use siphasher::sip128::Hasher128; use siphasher::sip128::SipHasher24; diff --git a/src/query/functions/src/scalars/bitmap.rs b/src/query/functions/src/scalars/bitmap.rs index c13f7ff37a55..39c167d08bc7 100644 --- a/src/query/functions/src/scalars/bitmap.rs +++ b/src/query/functions/src/scalars/bitmap.rs @@ -17,26 +17,26 @@ use std::ops::BitOr; use std::ops::BitXor; use std::ops::Sub; -use common_expression::types::bitmap::BitmapType; -use common_expression::types::string::StringColumnBuilder; -use common_expression::types::ArrayType; -use common_expression::types::BooleanType; -use common_expression::types::NullableType; -use common_expression::types::NumberDataType; -use common_expression::types::NumberType; -use common_expression::types::StringType; -use common_expression::types::UInt64Type; -use common_expression::types::ALL_SIGNED_INTEGER_TYPES; -use common_expression::types::ALL_UNSIGNED_INTEGER_TYPES; -use common_expression::vectorize_with_builder_1_arg; -use common_expression::vectorize_with_builder_2_arg; -use common_expression::vectorize_with_builder_3_arg; -use common_expression::with_signed_integer_mapped_type; -use common_expression::with_unsigned_integer_mapped_type; -use common_expression::EvalContext; -use common_expression::FunctionDomain; -use common_expression::FunctionRegistry; -use common_io::parse_bitmap; +use databend_common_expression::types::bitmap::BitmapType; +use databend_common_expression::types::string::StringColumnBuilder; +use databend_common_expression::types::ArrayType; +use databend_common_expression::types::BooleanType; +use databend_common_expression::types::NullableType; +use databend_common_expression::types::NumberDataType; +use databend_common_expression::types::NumberType; +use databend_common_expression::types::StringType; +use databend_common_expression::types::UInt64Type; +use databend_common_expression::types::ALL_SIGNED_INTEGER_TYPES; +use databend_common_expression::types::ALL_UNSIGNED_INTEGER_TYPES; +use databend_common_expression::vectorize_with_builder_1_arg; +use databend_common_expression::vectorize_with_builder_2_arg; +use databend_common_expression::vectorize_with_builder_3_arg; +use databend_common_expression::with_signed_integer_mapped_type; +use databend_common_expression::with_unsigned_integer_mapped_type; +use databend_common_expression::EvalContext; +use databend_common_expression::FunctionDomain; +use databend_common_expression::FunctionRegistry; +use databend_common_io::parse_bitmap; use itertools::join; use roaring::RoaringTreemap; diff --git a/src/query/functions/src/scalars/boolean.rs b/src/query/functions/src/scalars/boolean.rs index e8df59c5fc6a..e364bdddd2ab 100644 --- a/src/query/functions/src/scalars/boolean.rs +++ b/src/query/functions/src/scalars/boolean.rs @@ -17,31 +17,31 @@ use std::sync::Arc; -use common_expression::error_to_null; -use common_expression::types::boolean::BooleanDomain; -use common_expression::types::nullable::NullableColumn; -use common_expression::types::nullable::NullableDomain; -use common_expression::types::BooleanType; -use common_expression::types::DataType; -use common_expression::types::NullableType; -use common_expression::types::NumberDataType; -use common_expression::types::NumberType; -use common_expression::types::SimpleDomain; -use common_expression::types::StringType; -use common_expression::types::ALL_FLOAT_TYPES; -use common_expression::types::ALL_INTEGER_TYPES; -use common_expression::vectorize_2_arg; -use common_expression::vectorize_with_builder_1_arg; -use common_expression::with_float_mapped_type; -use common_expression::with_integer_mapped_type; -use common_expression::EvalContext; -use common_expression::Function; -use common_expression::FunctionDomain; -use common_expression::FunctionEval; -use common_expression::FunctionRegistry; -use common_expression::FunctionSignature; -use common_expression::Value; -use common_expression::ValueRef; +use databend_common_expression::error_to_null; +use databend_common_expression::types::boolean::BooleanDomain; +use databend_common_expression::types::nullable::NullableColumn; +use databend_common_expression::types::nullable::NullableDomain; +use databend_common_expression::types::BooleanType; +use databend_common_expression::types::DataType; +use databend_common_expression::types::NullableType; +use databend_common_expression::types::NumberDataType; +use databend_common_expression::types::NumberType; +use databend_common_expression::types::SimpleDomain; +use databend_common_expression::types::StringType; +use databend_common_expression::types::ALL_FLOAT_TYPES; +use databend_common_expression::types::ALL_INTEGER_TYPES; +use databend_common_expression::vectorize_2_arg; +use databend_common_expression::vectorize_with_builder_1_arg; +use databend_common_expression::with_float_mapped_type; +use databend_common_expression::with_integer_mapped_type; +use databend_common_expression::EvalContext; +use databend_common_expression::Function; +use databend_common_expression::FunctionDomain; +use databend_common_expression::FunctionEval; +use databend_common_expression::FunctionRegistry; +use databend_common_expression::FunctionSignature; +use databend_common_expression::Value; +use databend_common_expression::ValueRef; use ordered_float::OrderedFloat; pub fn register(registry: &mut FunctionRegistry) { @@ -194,7 +194,7 @@ pub fn register(registry: &mut FunctionRegistry) { None }; - FunctionDomain::Domain(NullableDomain:: { + FunctionDomain::Domain(NullableDomain:: { has_null, value, }) @@ -206,7 +206,7 @@ pub fn register(registry: &mut FunctionRegistry) { (_, Some(true)) => Some(true), (Some(false), Some(false)) => Some(false), _ => None - } + } }), ); @@ -225,7 +225,7 @@ pub fn register(registry: &mut FunctionRegistry) { | (ValueRef::Column(other), ValueRef::Scalar(true)) => Value::Column(!&other), (ValueRef::Scalar(false), other) | (other, ValueRef::Scalar(false)) => other.to_owned(), (ValueRef::Column(a), ValueRef::Column(b)) => { - Value::Column(common_arrow::arrow::bitmap::xor(&a, &b)) + Value::Column(databend_common_arrow::arrow::bitmap::xor(&a, &b)) } }, ); diff --git a/src/query/functions/src/scalars/comparison.rs b/src/query/functions/src/scalars/comparison.rs index 20ba75ce57a4..13bc4cbf70c7 100644 --- a/src/query/functions/src/scalars/comparison.rs +++ b/src/query/functions/src/scalars/comparison.rs @@ -16,36 +16,36 @@ use std::cmp::Ordering; use std::collections::HashMap; use std::sync::Arc; -use common_arrow::arrow::bitmap::MutableBitmap; -use common_expression::types::boolean::BooleanDomain; -use common_expression::types::string::StringDomain; -use common_expression::types::AnyType; -use common_expression::types::ArgType; -use common_expression::types::ArrayType; -use common_expression::types::BooleanType; -use common_expression::types::DataType; -use common_expression::types::DateType; -use common_expression::types::EmptyArrayType; -use common_expression::types::GenericType; -use common_expression::types::NumberClass; -use common_expression::types::NumberType; -use common_expression::types::StringType; -use common_expression::types::TimestampType; -use common_expression::types::ValueType; -use common_expression::types::VariantType; -use common_expression::types::ALL_NUMBER_CLASSES; -use common_expression::values::Value; -use common_expression::with_number_mapped_type; -use common_expression::Column; -use common_expression::EvalContext; -use common_expression::Function; -use common_expression::FunctionDomain; -use common_expression::FunctionEval; -use common_expression::FunctionRegistry; -use common_expression::FunctionSignature; -use common_expression::ScalarRef; -use common_expression::SimpleDomainCmp; -use common_expression::ValueRef; +use databend_common_arrow::arrow::bitmap::MutableBitmap; +use databend_common_expression::types::boolean::BooleanDomain; +use databend_common_expression::types::string::StringDomain; +use databend_common_expression::types::AnyType; +use databend_common_expression::types::ArgType; +use databend_common_expression::types::ArrayType; +use databend_common_expression::types::BooleanType; +use databend_common_expression::types::DataType; +use databend_common_expression::types::DateType; +use databend_common_expression::types::EmptyArrayType; +use databend_common_expression::types::GenericType; +use databend_common_expression::types::NumberClass; +use databend_common_expression::types::NumberType; +use databend_common_expression::types::StringType; +use databend_common_expression::types::TimestampType; +use databend_common_expression::types::ValueType; +use databend_common_expression::types::VariantType; +use databend_common_expression::types::ALL_NUMBER_CLASSES; +use databend_common_expression::values::Value; +use databend_common_expression::with_number_mapped_type; +use databend_common_expression::Column; +use databend_common_expression::EvalContext; +use databend_common_expression::Function; +use databend_common_expression::FunctionDomain; +use databend_common_expression::FunctionEval; +use databend_common_expression::FunctionRegistry; +use databend_common_expression::FunctionSignature; +use databend_common_expression::ScalarRef; +use databend_common_expression::SimpleDomainCmp; +use databend_common_expression::ValueRef; use memchr::memchr; use memchr::memmem; use regex::bytes::Regex; diff --git a/src/query/functions/src/scalars/control.rs b/src/query/functions/src/scalars/control.rs index b3ca69c9bfaa..457cb15729e8 100644 --- a/src/query/functions/src/scalars/control.rs +++ b/src/query/functions/src/scalars/control.rs @@ -14,22 +14,22 @@ use std::sync::Arc; -use common_expression::types::boolean::BooleanDomain; -use common_expression::types::nullable::NullableColumn; -use common_expression::types::nullable::NullableDomain; -use common_expression::types::BooleanType; -use common_expression::types::DataType; -use common_expression::types::GenericType; -use common_expression::types::NullType; -use common_expression::types::NullableType; -use common_expression::Domain; -use common_expression::Function; -use common_expression::FunctionDomain; -use common_expression::FunctionEval; -use common_expression::FunctionRegistry; -use common_expression::FunctionSignature; -use common_expression::Value; -use common_expression::ValueRef; +use databend_common_expression::types::boolean::BooleanDomain; +use databend_common_expression::types::nullable::NullableColumn; +use databend_common_expression::types::nullable::NullableDomain; +use databend_common_expression::types::BooleanType; +use databend_common_expression::types::DataType; +use databend_common_expression::types::GenericType; +use databend_common_expression::types::NullType; +use databend_common_expression::types::NullableType; +use databend_common_expression::Domain; +use databend_common_expression::Function; +use databend_common_expression::FunctionDomain; +use databend_common_expression::FunctionEval; +use databend_common_expression::FunctionRegistry; +use databend_common_expression::FunctionSignature; +use databend_common_expression::Value; +use databend_common_expression::ValueRef; pub fn register(registry: &mut FunctionRegistry) { registry.register_function_factory("if", |_, args_type| { diff --git a/src/query/functions/src/scalars/datetime.rs b/src/query/functions/src/scalars/datetime.rs index 0d08b0763346..2969d1b90a24 100644 --- a/src/query/functions/src/scalars/datetime.rs +++ b/src/query/functions/src/scalars/datetime.rs @@ -18,45 +18,45 @@ use chrono::prelude::*; use chrono::Datelike; use chrono::Utc; use chrono_tz::Tz; -use common_arrow::arrow::bitmap::Bitmap; -use common_arrow::arrow::temporal_conversions::EPOCH_DAYS_FROM_CE; -use common_expression::error_to_null; -use common_expression::types::date::check_date; -use common_expression::types::date::date_to_string; -use common_expression::types::date::string_to_date; -use common_expression::types::date::DATE_MAX; -use common_expression::types::date::DATE_MIN; -use common_expression::types::nullable::NullableColumn; -use common_expression::types::nullable::NullableDomain; -use common_expression::types::number::Int64Type; -use common_expression::types::number::SimpleDomain; -use common_expression::types::number::UInt16Type; -use common_expression::types::number::UInt32Type; -use common_expression::types::number::UInt64Type; -use common_expression::types::number::UInt8Type; -use common_expression::types::string::StringDomain; -use common_expression::types::timestamp::check_timestamp; -use common_expression::types::timestamp::string_to_timestamp; -use common_expression::types::timestamp::timestamp_to_string; -use common_expression::types::timestamp::MICROS_IN_A_MILLI; -use common_expression::types::timestamp::MICROS_IN_A_SEC; -use common_expression::types::DateType; -use common_expression::types::Int32Type; -use common_expression::types::NullableType; -use common_expression::types::NumberType; -use common_expression::types::StringType; -use common_expression::types::TimestampType; -use common_expression::utils::date_helper::*; -use common_expression::vectorize_1_arg; -use common_expression::vectorize_2_arg; -use common_expression::vectorize_with_builder_1_arg; -use common_expression::vectorize_with_builder_2_arg; -use common_expression::EvalContext; -use common_expression::FunctionDomain; -use common_expression::FunctionProperty; -use common_expression::FunctionRegistry; -use common_expression::Value; -use common_expression::ValueRef; +use databend_common_arrow::arrow::bitmap::Bitmap; +use databend_common_arrow::arrow::temporal_conversions::EPOCH_DAYS_FROM_CE; +use databend_common_expression::error_to_null; +use databend_common_expression::types::date::check_date; +use databend_common_expression::types::date::date_to_string; +use databend_common_expression::types::date::string_to_date; +use databend_common_expression::types::date::DATE_MAX; +use databend_common_expression::types::date::DATE_MIN; +use databend_common_expression::types::nullable::NullableColumn; +use databend_common_expression::types::nullable::NullableDomain; +use databend_common_expression::types::number::Int64Type; +use databend_common_expression::types::number::SimpleDomain; +use databend_common_expression::types::number::UInt16Type; +use databend_common_expression::types::number::UInt32Type; +use databend_common_expression::types::number::UInt64Type; +use databend_common_expression::types::number::UInt8Type; +use databend_common_expression::types::string::StringDomain; +use databend_common_expression::types::timestamp::check_timestamp; +use databend_common_expression::types::timestamp::string_to_timestamp; +use databend_common_expression::types::timestamp::timestamp_to_string; +use databend_common_expression::types::timestamp::MICROS_IN_A_MILLI; +use databend_common_expression::types::timestamp::MICROS_IN_A_SEC; +use databend_common_expression::types::DateType; +use databend_common_expression::types::Int32Type; +use databend_common_expression::types::NullableType; +use databend_common_expression::types::NumberType; +use databend_common_expression::types::StringType; +use databend_common_expression::types::TimestampType; +use databend_common_expression::utils::date_helper::*; +use databend_common_expression::vectorize_1_arg; +use databend_common_expression::vectorize_2_arg; +use databend_common_expression::vectorize_with_builder_1_arg; +use databend_common_expression::vectorize_with_builder_2_arg; +use databend_common_expression::EvalContext; +use databend_common_expression::FunctionDomain; +use databend_common_expression::FunctionProperty; +use databend_common_expression::FunctionRegistry; +use databend_common_expression::Value; +use databend_common_expression::ValueRef; use num_traits::AsPrimitive; pub fn register(registry: &mut FunctionRegistry) { diff --git a/src/query/functions/src/scalars/decimal.rs b/src/query/functions/src/scalars/decimal.rs index 838038cec67a..720fc7eced16 100644 --- a/src/query/functions/src/scalars/decimal.rs +++ b/src/query/functions/src/scalars/decimal.rs @@ -16,32 +16,32 @@ use std::cmp::Ord; use std::ops::*; use std::sync::Arc; -use common_arrow::arrow::bitmap::Bitmap; -use common_arrow::arrow::buffer::Buffer; -use common_expression::serialize::read_decimal_with_size; -use common_expression::type_check::common_super_type; -use common_expression::types::decimal::*; -use common_expression::types::string::StringColumn; -use common_expression::types::*; -use common_expression::with_decimal_mapped_type; -use common_expression::with_integer_mapped_type; -use common_expression::with_number_mapped_type; -use common_expression::Column; -use common_expression::ColumnBuilder; -use common_expression::Domain; -use common_expression::EvalContext; -use common_expression::FromData; -use common_expression::Function; -use common_expression::FunctionContext; -use common_expression::FunctionDomain; -use common_expression::FunctionEval; -use common_expression::FunctionRegistry; -use common_expression::FunctionSignature; -use common_expression::Scalar; -use common_expression::ScalarRef; -use common_expression::SimpleDomainCmp; -use common_expression::Value; -use common_expression::ValueRef; +use databend_common_arrow::arrow::bitmap::Bitmap; +use databend_common_arrow::arrow::buffer::Buffer; +use databend_common_expression::serialize::read_decimal_with_size; +use databend_common_expression::type_check::common_super_type; +use databend_common_expression::types::decimal::*; +use databend_common_expression::types::string::StringColumn; +use databend_common_expression::types::*; +use databend_common_expression::with_decimal_mapped_type; +use databend_common_expression::with_integer_mapped_type; +use databend_common_expression::with_number_mapped_type; +use databend_common_expression::Column; +use databend_common_expression::ColumnBuilder; +use databend_common_expression::Domain; +use databend_common_expression::EvalContext; +use databend_common_expression::FromData; +use databend_common_expression::Function; +use databend_common_expression::FunctionContext; +use databend_common_expression::FunctionDomain; +use databend_common_expression::FunctionEval; +use databend_common_expression::FunctionRegistry; +use databend_common_expression::FunctionSignature; +use databend_common_expression::Scalar; +use databend_common_expression::ScalarRef; +use databend_common_expression::SimpleDomainCmp; +use databend_common_expression::Value; +use databend_common_expression::ValueRef; use ethnum::i256; use num_traits::AsPrimitive; use ordered_float::OrderedFloat; diff --git a/src/query/functions/src/scalars/geo.rs b/src/query/functions/src/scalars/geo.rs index ea984522651d..3a2b5c084610 100644 --- a/src/query/functions/src/scalars/geo.rs +++ b/src/query/functions/src/scalars/geo.rs @@ -17,33 +17,33 @@ use std::num::Wrapping; use std::sync::Arc; use std::sync::Once; -use common_expression::types::map::KvPair; -use common_expression::types::number::Float64Type; -use common_expression::types::number::NumberColumnBuilder; -use common_expression::types::number::NumberScalar; -use common_expression::types::number::F32; -use common_expression::types::number::F64; -use common_expression::types::AnyType; -use common_expression::types::DataType; -use common_expression::types::NumberDataType; -use common_expression::types::NumberType; -use common_expression::types::StringType; -use common_expression::types::UInt8Type; -use common_expression::types::ValueType; -use common_expression::vectorize_with_builder_1_arg; -use common_expression::vectorize_with_builder_2_arg; -use common_expression::vectorize_with_builder_3_arg; -use common_expression::Column; -use common_expression::EvalContext; -use common_expression::Function; -use common_expression::FunctionDomain; -use common_expression::FunctionEval; -use common_expression::FunctionRegistry; -use common_expression::FunctionSignature; -use common_expression::Scalar; -use common_expression::ScalarRef; -use common_expression::Value; -use common_expression::ValueRef; +use databend_common_expression::types::map::KvPair; +use databend_common_expression::types::number::Float64Type; +use databend_common_expression::types::number::NumberColumnBuilder; +use databend_common_expression::types::number::NumberScalar; +use databend_common_expression::types::number::F32; +use databend_common_expression::types::number::F64; +use databend_common_expression::types::AnyType; +use databend_common_expression::types::DataType; +use databend_common_expression::types::NumberDataType; +use databend_common_expression::types::NumberType; +use databend_common_expression::types::StringType; +use databend_common_expression::types::UInt8Type; +use databend_common_expression::types::ValueType; +use databend_common_expression::vectorize_with_builder_1_arg; +use databend_common_expression::vectorize_with_builder_2_arg; +use databend_common_expression::vectorize_with_builder_3_arg; +use databend_common_expression::Column; +use databend_common_expression::EvalContext; +use databend_common_expression::Function; +use databend_common_expression::FunctionDomain; +use databend_common_expression::FunctionEval; +use databend_common_expression::FunctionRegistry; +use databend_common_expression::FunctionSignature; +use databend_common_expression::Scalar; +use databend_common_expression::ScalarRef; +use databend_common_expression::Value; +use databend_common_expression::ValueRef; use geo::coord; use geo::Contains; use geo::Coord; diff --git a/src/query/functions/src/scalars/geo_h3.rs b/src/query/functions/src/scalars/geo_h3.rs index 68d4fcaf989b..b99d7b258b35 100644 --- a/src/query/functions/src/scalars/geo_h3.rs +++ b/src/query/functions/src/scalars/geo_h3.rs @@ -14,20 +14,20 @@ use std::str; -use common_expression::types::map::KvPair; -use common_expression::types::ArrayType; -use common_expression::types::BooleanType; -use common_expression::types::Float64Type; -use common_expression::types::Int32Type; -use common_expression::types::StringType; -use common_expression::types::UInt32Type; -use common_expression::types::UInt64Type; -use common_expression::types::UInt8Type; -use common_expression::types::F64; -use common_expression::vectorize_with_builder_1_arg; -use common_expression::vectorize_with_builder_2_arg; -use common_expression::FunctionDomain; -use common_expression::FunctionRegistry; +use databend_common_expression::types::map::KvPair; +use databend_common_expression::types::ArrayType; +use databend_common_expression::types::BooleanType; +use databend_common_expression::types::Float64Type; +use databend_common_expression::types::Int32Type; +use databend_common_expression::types::StringType; +use databend_common_expression::types::UInt32Type; +use databend_common_expression::types::UInt64Type; +use databend_common_expression::types::UInt8Type; +use databend_common_expression::types::F64; +use databend_common_expression::vectorize_with_builder_1_arg; +use databend_common_expression::vectorize_with_builder_2_arg; +use databend_common_expression::FunctionDomain; +use databend_common_expression::FunctionRegistry; use h3o::CellIndex; use h3o::DirectedEdgeIndex; use h3o::LatLng; diff --git a/src/query/functions/src/scalars/hash.rs b/src/query/functions/src/scalars/hash.rs index 5afb95938114..66e7b69e9caf 100644 --- a/src/query/functions/src/scalars/hash.rs +++ b/src/query/functions/src/scalars/hash.rs @@ -18,28 +18,28 @@ use std::collections::hash_map::DefaultHasher; use std::hash::Hash; use std::hash::Hasher; -use common_expression::types::decimal::DecimalType; -use common_expression::types::number::NumberScalar; -use common_expression::types::number::F32; -use common_expression::types::number::F64; -use common_expression::types::ArgType; -use common_expression::types::BooleanType; -use common_expression::types::DateType; -use common_expression::types::NumberClass; -use common_expression::types::NumberDataType; -use common_expression::types::NumberType; -use common_expression::types::StringType; -use common_expression::types::TimestampType; -use common_expression::types::VariantType; -use common_expression::types::ALL_INTEGER_TYPES; -use common_expression::types::ALL_NUMBER_CLASSES; -use common_expression::vectorize_with_builder_1_arg; -use common_expression::vectorize_with_builder_2_arg; -use common_expression::with_integer_mapped_type; -use common_expression::with_number_mapped_type; -use common_expression::FunctionDomain; -use common_expression::FunctionRegistry; -use common_expression::Scalar; +use databend_common_expression::types::decimal::DecimalType; +use databend_common_expression::types::number::NumberScalar; +use databend_common_expression::types::number::F32; +use databend_common_expression::types::number::F64; +use databend_common_expression::types::ArgType; +use databend_common_expression::types::BooleanType; +use databend_common_expression::types::DateType; +use databend_common_expression::types::NumberClass; +use databend_common_expression::types::NumberDataType; +use databend_common_expression::types::NumberType; +use databend_common_expression::types::StringType; +use databend_common_expression::types::TimestampType; +use databend_common_expression::types::VariantType; +use databend_common_expression::types::ALL_INTEGER_TYPES; +use databend_common_expression::types::ALL_NUMBER_CLASSES; +use databend_common_expression::vectorize_with_builder_1_arg; +use databend_common_expression::vectorize_with_builder_2_arg; +use databend_common_expression::with_integer_mapped_type; +use databend_common_expression::with_number_mapped_type; +use databend_common_expression::FunctionDomain; +use databend_common_expression::FunctionRegistry; +use databend_common_expression::Scalar; use ethnum::i256; use md5::Digest; use md5::Md5 as Md5Hasher; diff --git a/src/query/functions/src/scalars/map.rs b/src/query/functions/src/scalars/map.rs index b0db404c6d9f..19c7665db7d8 100644 --- a/src/query/functions/src/scalars/map.rs +++ b/src/query/functions/src/scalars/map.rs @@ -14,19 +14,19 @@ use std::hash::Hash; -use common_expression::types::nullable::NullableDomain; -use common_expression::types::ArrayType; -use common_expression::types::EmptyArrayType; -use common_expression::types::EmptyMapType; -use common_expression::types::GenericType; -use common_expression::types::MapType; -use common_expression::types::NullType; -use common_expression::types::NullableType; -use common_expression::vectorize_with_builder_2_arg; -use common_expression::FunctionDomain; -use common_expression::FunctionRegistry; -use common_expression::Value; -use common_hashtable::StackHashSet; +use databend_common_expression::types::nullable::NullableDomain; +use databend_common_expression::types::ArrayType; +use databend_common_expression::types::EmptyArrayType; +use databend_common_expression::types::EmptyMapType; +use databend_common_expression::types::GenericType; +use databend_common_expression::types::MapType; +use databend_common_expression::types::NullType; +use databend_common_expression::types::NullableType; +use databend_common_expression::vectorize_with_builder_2_arg; +use databend_common_expression::FunctionDomain; +use databend_common_expression::FunctionRegistry; +use databend_common_expression::Value; +use databend_common_hashtable::StackHashSet; use siphasher::sip128::Hasher128; use siphasher::sip128::SipHasher24; diff --git a/src/query/functions/src/scalars/math.rs b/src/query/functions/src/scalars/math.rs index 052506d9f488..8197bee1cebc 100644 --- a/src/query/functions/src/scalars/math.rs +++ b/src/query/functions/src/scalars/math.rs @@ -17,19 +17,19 @@ use std::f64::consts::E; use std::f64::consts::PI; use std::marker::PhantomData; -use common_expression::types::number::SimpleDomain; -use common_expression::types::number::F64; -use common_expression::types::NumberDataType; -use common_expression::types::NumberType; -use common_expression::types::StringType; -use common_expression::types::ALL_FLOAT_TYPES; -use common_expression::types::ALL_INTEGER_TYPES; -use common_expression::types::ALL_NUMERICS_TYPES; -use common_expression::vectorize_with_builder_1_arg; -use common_expression::with_number_mapped_type; -use common_expression::FunctionDomain; -use common_expression::FunctionRegistry; -use common_expression::Value; +use databend_common_expression::types::number::SimpleDomain; +use databend_common_expression::types::number::F64; +use databend_common_expression::types::NumberDataType; +use databend_common_expression::types::NumberType; +use databend_common_expression::types::StringType; +use databend_common_expression::types::ALL_FLOAT_TYPES; +use databend_common_expression::types::ALL_INTEGER_TYPES; +use databend_common_expression::types::ALL_NUMERICS_TYPES; +use databend_common_expression::vectorize_with_builder_1_arg; +use databend_common_expression::with_number_mapped_type; +use databend_common_expression::FunctionDomain; +use databend_common_expression::FunctionRegistry; +use databend_common_expression::Value; use num_traits::AsPrimitive; use num_traits::Float; use num_traits::Pow; diff --git a/src/query/functions/src/scalars/mod.rs b/src/query/functions/src/scalars/mod.rs index 479780940e15..0e482e58f513 100644 --- a/src/query/functions/src/scalars/mod.rs +++ b/src/query/functions/src/scalars/mod.rs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_expression::FunctionRegistry; +use databend_common_expression::FunctionRegistry; mod arithmetic; mod arithmetic_modulo; diff --git a/src/query/functions/src/scalars/other.rs b/src/query/functions/src/scalars/other.rs index 153123296aca..85287d5070a8 100644 --- a/src/query/functions/src/scalars/other.rs +++ b/src/query/functions/src/scalars/other.rs @@ -17,46 +17,46 @@ use std::net::Ipv4Addr; use std::sync::Arc; use std::time::Duration; -use common_base::base::convert_byte_size; -use common_base::base::convert_number_size; -use common_base::base::uuid::Uuid; -use common_expression::error_to_null; -use common_expression::types::boolean::BooleanDomain; -use common_expression::types::nullable::NullableColumn; -use common_expression::types::number::Float64Type; -use common_expression::types::number::Int64Type; -use common_expression::types::number::UInt32Type; -use common_expression::types::number::UInt8Type; -use common_expression::types::number::F64; -use common_expression::types::string::StringColumn; -use common_expression::types::ArgType; -use common_expression::types::DataType; -use common_expression::types::DateType; -use common_expression::types::GenericType; -use common_expression::types::NullType; -use common_expression::types::NullableType; -use common_expression::types::NumberColumn; -use common_expression::types::NumberDataType; -use common_expression::types::NumberScalar; -use common_expression::types::NumberType; -use common_expression::types::SimpleDomain; -use common_expression::types::StringType; -use common_expression::types::TimestampType; -use common_expression::types::ValueType; -use common_expression::vectorize_with_builder_1_arg; -use common_expression::Column; -use common_expression::Domain; -use common_expression::EvalContext; -use common_expression::Function; -use common_expression::FunctionDomain; -use common_expression::FunctionEval; -use common_expression::FunctionProperty; -use common_expression::FunctionRegistry; -use common_expression::FunctionSignature; -use common_expression::Scalar; -use common_expression::ScalarRef; -use common_expression::Value; -use common_expression::ValueRef; +use databend_common_base::base::convert_byte_size; +use databend_common_base::base::convert_number_size; +use databend_common_base::base::uuid::Uuid; +use databend_common_expression::error_to_null; +use databend_common_expression::types::boolean::BooleanDomain; +use databend_common_expression::types::nullable::NullableColumn; +use databend_common_expression::types::number::Float64Type; +use databend_common_expression::types::number::Int64Type; +use databend_common_expression::types::number::UInt32Type; +use databend_common_expression::types::number::UInt8Type; +use databend_common_expression::types::number::F64; +use databend_common_expression::types::string::StringColumn; +use databend_common_expression::types::ArgType; +use databend_common_expression::types::DataType; +use databend_common_expression::types::DateType; +use databend_common_expression::types::GenericType; +use databend_common_expression::types::NullType; +use databend_common_expression::types::NullableType; +use databend_common_expression::types::NumberColumn; +use databend_common_expression::types::NumberDataType; +use databend_common_expression::types::NumberScalar; +use databend_common_expression::types::NumberType; +use databend_common_expression::types::SimpleDomain; +use databend_common_expression::types::StringType; +use databend_common_expression::types::TimestampType; +use databend_common_expression::types::ValueType; +use databend_common_expression::vectorize_with_builder_1_arg; +use databend_common_expression::Column; +use databend_common_expression::Domain; +use databend_common_expression::EvalContext; +use databend_common_expression::Function; +use databend_common_expression::FunctionDomain; +use databend_common_expression::FunctionEval; +use databend_common_expression::FunctionProperty; +use databend_common_expression::FunctionRegistry; +use databend_common_expression::FunctionSignature; +use databend_common_expression::Scalar; +use databend_common_expression::ScalarRef; +use databend_common_expression::Value; +use databend_common_expression::ValueRef; use ordered_float::OrderedFloat; use rand::Rng; use rand::SeedableRng; diff --git a/src/query/functions/src/scalars/string.rs b/src/query/functions/src/scalars/string.rs index da6f3bb5627e..210b43ae475e 100644 --- a/src/query/functions/src/scalars/string.rs +++ b/src/query/functions/src/scalars/string.rs @@ -18,24 +18,24 @@ use std::io::Write; use base64::engine::general_purpose; use base64::prelude::*; use bstr::ByteSlice; -use common_base::base::uuid::Uuid; -use common_expression::types::decimal::Decimal128Type; -use common_expression::types::number::SimpleDomain; -use common_expression::types::number::UInt64Type; -use common_expression::types::string::StringColumn; -use common_expression::types::string::StringColumnBuilder; -use common_expression::types::ArrayType; -use common_expression::types::NumberType; -use common_expression::types::StringType; -use common_expression::vectorize_with_builder_1_arg; -use common_expression::vectorize_with_builder_2_arg; -use common_expression::vectorize_with_builder_3_arg; -use common_expression::vectorize_with_builder_4_arg; -use common_expression::EvalContext; -use common_expression::FunctionDomain; -use common_expression::FunctionRegistry; -use common_expression::Value; -use common_expression::ValueRef; +use databend_common_base::base::uuid::Uuid; +use databend_common_expression::types::decimal::Decimal128Type; +use databend_common_expression::types::number::SimpleDomain; +use databend_common_expression::types::number::UInt64Type; +use databend_common_expression::types::string::StringColumn; +use databend_common_expression::types::string::StringColumnBuilder; +use databend_common_expression::types::ArrayType; +use databend_common_expression::types::NumberType; +use databend_common_expression::types::StringType; +use databend_common_expression::vectorize_with_builder_1_arg; +use databend_common_expression::vectorize_with_builder_2_arg; +use databend_common_expression::vectorize_with_builder_3_arg; +use databend_common_expression::vectorize_with_builder_4_arg; +use databend_common_expression::EvalContext; +use databend_common_expression::FunctionDomain; +use databend_common_expression::FunctionRegistry; +use databend_common_expression::Value; +use databend_common_expression::ValueRef; use itertools::izip; pub fn register(registry: &mut FunctionRegistry) { @@ -888,8 +888,8 @@ pub fn register(registry: &mut FunctionRegistry) { } pub(crate) mod soundex { - use common_expression::types::string::StringColumnBuilder; - use common_expression::EvalContext; + use databend_common_expression::types::string::StringColumnBuilder; + use databend_common_expression::EvalContext; pub fn soundex(val: &[u8], output: &mut StringColumnBuilder, _eval_context: &mut EvalContext) { let mut last = None; diff --git a/src/query/functions/src/scalars/string_multi_args.rs b/src/query/functions/src/scalars/string_multi_args.rs index b0770e2e8e88..e78020417a92 100644 --- a/src/query/functions/src/scalars/string_multi_args.rs +++ b/src/query/functions/src/scalars/string_multi_args.rs @@ -14,28 +14,28 @@ use std::sync::Arc; -use common_arrow::arrow::bitmap::MutableBitmap; -use common_expression::passthrough_nullable; -use common_expression::types::nullable::NullableColumn; -use common_expression::types::number::Int64Type; -use common_expression::types::number::NumberScalar; -use common_expression::types::number::UInt8Type; -use common_expression::types::string::StringColumn; -use common_expression::types::string::StringColumnBuilder; -use common_expression::types::string::StringDomain; -use common_expression::types::NumberColumn; -use common_expression::types::*; -use common_expression::Column; -use common_expression::Domain; -use common_expression::EvalContext; -use common_expression::Function; -use common_expression::FunctionDomain; -use common_expression::FunctionEval; -use common_expression::FunctionRegistry; -use common_expression::FunctionSignature; -use common_expression::Scalar; -use common_expression::Value; -use common_expression::ValueRef; +use databend_common_arrow::arrow::bitmap::MutableBitmap; +use databend_common_expression::passthrough_nullable; +use databend_common_expression::types::nullable::NullableColumn; +use databend_common_expression::types::number::Int64Type; +use databend_common_expression::types::number::NumberScalar; +use databend_common_expression::types::number::UInt8Type; +use databend_common_expression::types::string::StringColumn; +use databend_common_expression::types::string::StringColumnBuilder; +use databend_common_expression::types::string::StringDomain; +use databend_common_expression::types::NumberColumn; +use databend_common_expression::types::*; +use databend_common_expression::Column; +use databend_common_expression::Domain; +use databend_common_expression::EvalContext; +use databend_common_expression::Function; +use databend_common_expression::FunctionDomain; +use databend_common_expression::FunctionEval; +use databend_common_expression::FunctionRegistry; +use databend_common_expression::FunctionSignature; +use databend_common_expression::Scalar; +use databend_common_expression::Value; +use databend_common_expression::ValueRef; pub fn register(registry: &mut FunctionRegistry) { registry.register_function_factory("concat", |_, args_type| { diff --git a/src/query/functions/src/scalars/tuple.rs b/src/query/functions/src/scalars/tuple.rs index f7882459b96a..c3ae24e0eb55 100644 --- a/src/query/functions/src/scalars/tuple.rs +++ b/src/query/functions/src/scalars/tuple.rs @@ -14,21 +14,21 @@ use std::sync::Arc; -use common_expression::types::nullable::NullableColumn; -use common_expression::types::nullable::NullableDomain; -use common_expression::types::DataType; -use common_expression::Column; -use common_expression::ColumnBuilder; -use common_expression::Domain; -use common_expression::Function; -use common_expression::FunctionDomain; -use common_expression::FunctionEval; -use common_expression::FunctionRegistry; -use common_expression::FunctionSignature; -use common_expression::Scalar; -use common_expression::ScalarRef; -use common_expression::Value; -use common_expression::ValueRef; +use databend_common_expression::types::nullable::NullableColumn; +use databend_common_expression::types::nullable::NullableDomain; +use databend_common_expression::types::DataType; +use databend_common_expression::Column; +use databend_common_expression::ColumnBuilder; +use databend_common_expression::Domain; +use databend_common_expression::Function; +use databend_common_expression::FunctionDomain; +use databend_common_expression::FunctionEval; +use databend_common_expression::FunctionRegistry; +use databend_common_expression::FunctionSignature; +use databend_common_expression::Scalar; +use databend_common_expression::ScalarRef; +use databend_common_expression::Value; +use databend_common_expression::ValueRef; pub fn register(registry: &mut FunctionRegistry) { registry.register_function_factory("tuple", |_, args_type| { diff --git a/src/query/functions/src/scalars/variant.rs b/src/query/functions/src/scalars/variant.rs index 9bd38003448e..ae3e538cf340 100644 --- a/src/query/functions/src/scalars/variant.rs +++ b/src/query/functions/src/scalars/variant.rs @@ -19,46 +19,46 @@ use std::sync::Arc; use bstr::ByteSlice; use chrono::Datelike; -use common_arrow::arrow::bitmap::Bitmap; -use common_arrow::arrow::bitmap::MutableBitmap; -use common_arrow::arrow::temporal_conversions::EPOCH_DAYS_FROM_CE; -use common_expression::types::date::string_to_date; -use common_expression::types::nullable::NullableColumn; -use common_expression::types::nullable::NullableDomain; -use common_expression::types::number::*; -use common_expression::types::string::StringColumnBuilder; -use common_expression::types::timestamp::string_to_timestamp; -use common_expression::types::variant::cast_scalar_to_variant; -use common_expression::types::variant::cast_scalars_to_variants; -use common_expression::types::AnyType; -use common_expression::types::ArrayType; -use common_expression::types::BooleanType; -use common_expression::types::DataType; -use common_expression::types::DateType; -use common_expression::types::GenericType; -use common_expression::types::NullableType; -use common_expression::types::NumberDataType; -use common_expression::types::NumberType; -use common_expression::types::StringType; -use common_expression::types::TimestampType; -use common_expression::types::VariantType; -use common_expression::types::ALL_NUMERICS_TYPES; -use common_expression::vectorize_1_arg; -use common_expression::vectorize_with_builder_1_arg; -use common_expression::vectorize_with_builder_2_arg; -use common_expression::with_number_mapped_type; -use common_expression::Column; -use common_expression::ColumnBuilder; -use common_expression::EvalContext; -use common_expression::Function; -use common_expression::FunctionDomain; -use common_expression::FunctionEval; -use common_expression::FunctionRegistry; -use common_expression::FunctionSignature; -use common_expression::Scalar; -use common_expression::ScalarRef; -use common_expression::Value; -use common_expression::ValueRef; +use databend_common_arrow::arrow::bitmap::Bitmap; +use databend_common_arrow::arrow::bitmap::MutableBitmap; +use databend_common_arrow::arrow::temporal_conversions::EPOCH_DAYS_FROM_CE; +use databend_common_expression::types::date::string_to_date; +use databend_common_expression::types::nullable::NullableColumn; +use databend_common_expression::types::nullable::NullableDomain; +use databend_common_expression::types::number::*; +use databend_common_expression::types::string::StringColumnBuilder; +use databend_common_expression::types::timestamp::string_to_timestamp; +use databend_common_expression::types::variant::cast_scalar_to_variant; +use databend_common_expression::types::variant::cast_scalars_to_variants; +use databend_common_expression::types::AnyType; +use databend_common_expression::types::ArrayType; +use databend_common_expression::types::BooleanType; +use databend_common_expression::types::DataType; +use databend_common_expression::types::DateType; +use databend_common_expression::types::GenericType; +use databend_common_expression::types::NullableType; +use databend_common_expression::types::NumberDataType; +use databend_common_expression::types::NumberType; +use databend_common_expression::types::StringType; +use databend_common_expression::types::TimestampType; +use databend_common_expression::types::VariantType; +use databend_common_expression::types::ALL_NUMERICS_TYPES; +use databend_common_expression::vectorize_1_arg; +use databend_common_expression::vectorize_with_builder_1_arg; +use databend_common_expression::vectorize_with_builder_2_arg; +use databend_common_expression::with_number_mapped_type; +use databend_common_expression::Column; +use databend_common_expression::ColumnBuilder; +use databend_common_expression::EvalContext; +use databend_common_expression::Function; +use databend_common_expression::FunctionDomain; +use databend_common_expression::FunctionEval; +use databend_common_expression::FunctionRegistry; +use databend_common_expression::FunctionSignature; +use databend_common_expression::Scalar; +use databend_common_expression::ScalarRef; +use databend_common_expression::Value; +use databend_common_expression::ValueRef; use jsonb::array_length; use jsonb::as_bool; use jsonb::as_f64; diff --git a/src/query/functions/src/scalars/vector.rs b/src/query/functions/src/scalars/vector.rs index be4efbcecdaf..a7ea8a1ec4e3 100644 --- a/src/query/functions/src/scalars/vector.rs +++ b/src/query/functions/src/scalars/vector.rs @@ -12,18 +12,18 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_arrow::arrow::buffer::Buffer; -use common_expression::types::ArrayType; -use common_expression::types::Float32Type; -use common_expression::types::StringType; -use common_expression::types::F32; -use common_expression::vectorize_with_builder_1_arg; -use common_expression::vectorize_with_builder_2_arg; -use common_expression::FunctionDomain; -use common_expression::FunctionRegistry; -use common_openai::OpenAI; -use common_vector::cosine_distance; -use common_vector::l2_distance; +use databend_common_arrow::arrow::buffer::Buffer; +use databend_common_expression::types::ArrayType; +use databend_common_expression::types::Float32Type; +use databend_common_expression::types::StringType; +use databend_common_expression::types::F32; +use databend_common_expression::vectorize_with_builder_1_arg; +use databend_common_expression::vectorize_with_builder_2_arg; +use databend_common_expression::FunctionDomain; +use databend_common_expression::FunctionRegistry; +use databend_common_openai::OpenAI; +use databend_common_vector::cosine_distance; +use databend_common_vector::l2_distance; pub fn register(registry: &mut FunctionRegistry) { // cosine_distance diff --git a/src/query/functions/src/srfs/array.rs b/src/query/functions/src/srfs/array.rs index da22beba95bd..1cd5009cdff0 100644 --- a/src/query/functions/src/srfs/array.rs +++ b/src/query/functions/src/srfs/array.rs @@ -14,18 +14,18 @@ use std::sync::Arc; -use common_expression::types::nullable::NullableColumn; -use common_expression::types::DataType; -use common_expression::Column; -use common_expression::Function; -use common_expression::FunctionEval; -use common_expression::FunctionKind; -use common_expression::FunctionProperty; -use common_expression::FunctionRegistry; -use common_expression::FunctionSignature; -use common_expression::Scalar; -use common_expression::ScalarRef; -use common_expression::Value; +use databend_common_expression::types::nullable::NullableColumn; +use databend_common_expression::types::DataType; +use databend_common_expression::Column; +use databend_common_expression::Function; +use databend_common_expression::FunctionEval; +use databend_common_expression::FunctionKind; +use databend_common_expression::FunctionProperty; +use databend_common_expression::FunctionRegistry; +use databend_common_expression::FunctionSignature; +use databend_common_expression::Scalar; +use databend_common_expression::ScalarRef; +use databend_common_expression::Value; use crate::srfs::variant::unnest_variant_array; diff --git a/src/query/functions/src/srfs/mod.rs b/src/query/functions/src/srfs/mod.rs index 41e14ad55907..b149a6880cc3 100644 --- a/src/query/functions/src/srfs/mod.rs +++ b/src/query/functions/src/srfs/mod.rs @@ -15,7 +15,7 @@ mod array; mod variant; -use common_expression::FunctionRegistry; +use databend_common_expression::FunctionRegistry; pub fn register(registry: &mut FunctionRegistry) { array::register(registry); diff --git a/src/query/functions/src/srfs/variant.rs b/src/query/functions/src/srfs/variant.rs index 3720f70eebf2..606616f91761 100644 --- a/src/query/functions/src/srfs/variant.rs +++ b/src/query/functions/src/srfs/variant.rs @@ -14,28 +14,28 @@ use std::sync::Arc; -use common_expression::types::nullable::NullableColumnBuilder; -use common_expression::types::string::StringColumnBuilder; -use common_expression::types::AnyType; -use common_expression::types::DataType; -use common_expression::types::NullableType; -use common_expression::types::NumberDataType; -use common_expression::types::StringType; -use common_expression::types::UInt64Type; -use common_expression::types::ValueType; -use common_expression::types::VariantType; -use common_expression::Column; -use common_expression::FromData; -use common_expression::Function; -use common_expression::FunctionEval; -use common_expression::FunctionKind; -use common_expression::FunctionProperty; -use common_expression::FunctionRegistry; -use common_expression::FunctionSignature; -use common_expression::Scalar; -use common_expression::ScalarRef; -use common_expression::Value; -use common_expression::ValueRef; +use databend_common_expression::types::nullable::NullableColumnBuilder; +use databend_common_expression::types::string::StringColumnBuilder; +use databend_common_expression::types::AnyType; +use databend_common_expression::types::DataType; +use databend_common_expression::types::NullableType; +use databend_common_expression::types::NumberDataType; +use databend_common_expression::types::StringType; +use databend_common_expression::types::UInt64Type; +use databend_common_expression::types::ValueType; +use databend_common_expression::types::VariantType; +use databend_common_expression::Column; +use databend_common_expression::FromData; +use databend_common_expression::Function; +use databend_common_expression::FunctionEval; +use databend_common_expression::FunctionKind; +use databend_common_expression::FunctionProperty; +use databend_common_expression::FunctionRegistry; +use databend_common_expression::FunctionSignature; +use databend_common_expression::Scalar; +use databend_common_expression::ScalarRef; +use databend_common_expression::Value; +use databend_common_expression::ValueRef; use jsonb::array_length; use jsonb::array_values; use jsonb::as_str; diff --git a/src/query/functions/tests/it/aggregates/agg.rs b/src/query/functions/tests/it/aggregates/agg.rs index 95736e1c567c..3ed7722d3945 100644 --- a/src/query/functions/tests/it/aggregates/agg.rs +++ b/src/query/functions/tests/it/aggregates/agg.rs @@ -14,17 +14,17 @@ use std::io::Write; -use common_expression::types::decimal::Decimal128Type; -use common_expression::types::number::Int64Type; -use common_expression::types::number::UInt64Type; -use common_expression::types::BitmapType; -use common_expression::types::BooleanType; -use common_expression::types::DecimalSize; -use common_expression::types::StringType; -use common_expression::types::TimestampType; -use common_expression::Column; -use common_expression::FromData; -use common_functions::aggregates::eval_aggr; +use databend_common_expression::types::decimal::Decimal128Type; +use databend_common_expression::types::number::Int64Type; +use databend_common_expression::types::number::UInt64Type; +use databend_common_expression::types::BitmapType; +use databend_common_expression::types::BooleanType; +use databend_common_expression::types::DecimalSize; +use databend_common_expression::types::StringType; +use databend_common_expression::types::TimestampType; +use databend_common_expression::Column; +use databend_common_expression::FromData; +use databend_common_functions::aggregates::eval_aggr; use goldenfile::Mint; use itertools::Itertools; use roaring::RoaringTreemap; diff --git a/src/query/functions/tests/it/aggregates/agg_hashtable.rs b/src/query/functions/tests/it/aggregates/agg_hashtable.rs index 9f49a323f513..3c1d98807e9d 100644 --- a/src/query/functions/tests/it/aggregates/agg_hashtable.rs +++ b/src/query/functions/tests/it/aggregates/agg_hashtable.rs @@ -29,25 +29,25 @@ use std::sync::Arc; use bumpalo::Bump; -use common_expression::types::ArgType; -use common_expression::types::BooleanType; -use common_expression::types::Float32Type; -use common_expression::types::Float64Type; -use common_expression::types::Int16Type; -use common_expression::types::Int32Type; -use common_expression::types::Int64Type; -use common_expression::types::Int8Type; -use common_expression::types::StringType; -use common_expression::types::UInt64Type; -use common_expression::types::F32; -use common_expression::types::F64; -use common_expression::AggregateHashTable; -use common_expression::Column; -use common_expression::DataBlock; -use common_expression::FromData; -use common_expression::PayloadFlushState; -use common_expression::ProbeState; -use common_functions::aggregates::AggregateFunctionFactory; +use databend_common_expression::types::ArgType; +use databend_common_expression::types::BooleanType; +use databend_common_expression::types::Float32Type; +use databend_common_expression::types::Float64Type; +use databend_common_expression::types::Int16Type; +use databend_common_expression::types::Int32Type; +use databend_common_expression::types::Int64Type; +use databend_common_expression::types::Int8Type; +use databend_common_expression::types::StringType; +use databend_common_expression::types::UInt64Type; +use databend_common_expression::types::F32; +use databend_common_expression::types::F64; +use databend_common_expression::AggregateHashTable; +use databend_common_expression::Column; +use databend_common_expression::DataBlock; +use databend_common_expression::FromData; +use databend_common_expression::PayloadFlushState; +use databend_common_expression::ProbeState; +use databend_common_functions::aggregates::AggregateFunctionFactory; use itertools::Itertools; // cargo test --package common-functions --test it -- aggregates::agg_hashtable::test_agg_hashtable --exact --nocapture diff --git a/src/query/functions/tests/it/aggregates/mod.rs b/src/query/functions/tests/it/aggregates/mod.rs index b7df5ac061df..37f80a146def 100644 --- a/src/query/functions/tests/it/aggregates/mod.rs +++ b/src/query/functions/tests/it/aggregates/mod.rs @@ -19,28 +19,28 @@ use std::io::Write; use bumpalo::Bump; use comfy_table::Table; -use common_exception::Result; -use common_expression::type_check; -use common_expression::types::number::NumberScalar; -use common_expression::types::AnyType; -use common_expression::types::DataType; -use common_expression::BlockEntry; -use common_expression::Column; -use common_expression::ColumnBuilder; -use common_expression::DataBlock; -use common_expression::Evaluator; -use common_expression::FunctionContext; -use common_expression::RawExpr; -use common_expression::Scalar; -use common_expression::Value; -use common_functions::aggregates::AggregateFunctionFactory; -use common_functions::BUILTIN_FUNCTIONS; +use databend_common_exception::Result; +use databend_common_expression::type_check; +use databend_common_expression::types::number::NumberScalar; +use databend_common_expression::types::AnyType; +use databend_common_expression::types::DataType; +use databend_common_expression::BlockEntry; +use databend_common_expression::Column; +use databend_common_expression::ColumnBuilder; +use databend_common_expression::DataBlock; +use databend_common_expression::Evaluator; +use databend_common_expression::FunctionContext; +use databend_common_expression::RawExpr; +use databend_common_expression::Scalar; +use databend_common_expression::Value; +use databend_common_functions::aggregates::AggregateFunctionFactory; +use databend_common_functions::BUILTIN_FUNCTIONS; use itertools::Itertools; use super::scalars::parser; -pub trait AggregationSimulator = - Fn(&str, Vec, &[Column], usize) -> common_exception::Result<(Column, DataType)> + Copy; +pub trait AggregationSimulator = Fn(&str, Vec, &[Column], usize) -> databend_common_exception::Result<(Column, DataType)> + + Copy; /// run ast which is agg expr pub fn run_agg_ast( @@ -74,9 +74,9 @@ pub fn run_agg_ast( .collect::>(); // For test only, we just support agg function call here - let result: common_exception::Result<(Column, DataType)> = try { + let result: databend_common_exception::Result<(Column, DataType)> = try { match raw_expr { - common_expression::RawExpr::FunctionCall { + databend_common_expression::RawExpr::FunctionCall { name, params, args, .. } => { let args: Vec<(Value, DataType)> = args @@ -182,7 +182,7 @@ pub fn simulate_two_groups_group_by( params: Vec, columns: &[Column], rows: usize, -) -> common_exception::Result<(Column, DataType)> { +) -> databend_common_exception::Result<(Column, DataType)> { let factory = AggregateFunctionFactory::instance(); let arguments: Vec = columns.iter().map(|c| c.data_type()).collect(); let cols: Vec = columns.to_owned(); diff --git a/src/query/functions/tests/it/scalars/arithmetic.rs b/src/query/functions/tests/it/scalars/arithmetic.rs index 9ce6f4f9cb63..ae2b069885f2 100644 --- a/src/query/functions/tests/it/scalars/arithmetic.rs +++ b/src/query/functions/tests/it/scalars/arithmetic.rs @@ -14,11 +14,11 @@ use std::io::Write; -use common_expression::types::decimal::DecimalColumn; -use common_expression::types::decimal::DecimalSize; -use common_expression::types::number::*; -use common_expression::Column; -use common_expression::FromData; +use databend_common_expression::types::decimal::DecimalColumn; +use databend_common_expression::types::decimal::DecimalSize; +use databend_common_expression::types::number::*; +use databend_common_expression::Column; +use databend_common_expression::FromData; use ethnum::i256; use goldenfile::Mint; diff --git a/src/query/functions/tests/it/scalars/array.rs b/src/query/functions/tests/it/scalars/array.rs index 5fff4e6296c2..e83608c4511b 100644 --- a/src/query/functions/tests/it/scalars/array.rs +++ b/src/query/functions/tests/it/scalars/array.rs @@ -14,8 +14,8 @@ use std::io::Write; -use common_expression::types::*; -use common_expression::FromData; +use databend_common_expression::types::*; +use databend_common_expression::FromData; use goldenfile::Mint; use super::run_ast; diff --git a/src/query/functions/tests/it/scalars/bitmap.rs b/src/query/functions/tests/it/scalars/bitmap.rs index e77344f651a1..05f06b229df7 100644 --- a/src/query/functions/tests/it/scalars/bitmap.rs +++ b/src/query/functions/tests/it/scalars/bitmap.rs @@ -1,7 +1,7 @@ use std::io::Write; -use common_expression::types::*; -use common_expression::FromData; +use databend_common_expression::types::*; +use databend_common_expression::FromData; use goldenfile::Mint; use super::run_ast; diff --git a/src/query/functions/tests/it/scalars/boolean.rs b/src/query/functions/tests/it/scalars/boolean.rs index 68e979ff7959..0addb7099273 100644 --- a/src/query/functions/tests/it/scalars/boolean.rs +++ b/src/query/functions/tests/it/scalars/boolean.rs @@ -14,10 +14,10 @@ use std::io::Write; -use common_expression::types::nullable::NullableColumn; -use common_expression::types::*; -use common_expression::Column; -use common_expression::FromData; +use databend_common_expression::types::nullable::NullableColumn; +use databend_common_expression::types::*; +use databend_common_expression::Column; +use databend_common_expression::FromData; use goldenfile::Mint; use super::run_ast; diff --git a/src/query/functions/tests/it/scalars/cast.rs b/src/query/functions/tests/it/scalars/cast.rs index 7bc017fa0a89..ec360d1cf77e 100644 --- a/src/query/functions/tests/it/scalars/cast.rs +++ b/src/query/functions/tests/it/scalars/cast.rs @@ -14,9 +14,9 @@ use std::io::Write; -use common_expression::types::*; -use common_expression::Column; -use common_expression::FromData; +use databend_common_expression::types::*; +use databend_common_expression::Column; +use databend_common_expression::FromData; use goldenfile::Mint; use itertools::Itertools; use roaring::RoaringTreemap; diff --git a/src/query/functions/tests/it/scalars/comparison.rs b/src/query/functions/tests/it/scalars/comparison.rs index 46b595aad887..730c968c6b72 100644 --- a/src/query/functions/tests/it/scalars/comparison.rs +++ b/src/query/functions/tests/it/scalars/comparison.rs @@ -14,8 +14,8 @@ use std::io::Write; -use common_expression::types::*; -use common_expression::FromData; +use databend_common_expression::types::*; +use databend_common_expression::FromData; use goldenfile::Mint; use super::run_ast; diff --git a/src/query/functions/tests/it/scalars/control.rs b/src/query/functions/tests/it/scalars/control.rs index b17d3ac3540a..dbfd93cb1075 100644 --- a/src/query/functions/tests/it/scalars/control.rs +++ b/src/query/functions/tests/it/scalars/control.rs @@ -14,9 +14,9 @@ use std::io::Write; -use common_expression::types::*; -use common_expression::Column; -use common_expression::FromData; +use databend_common_expression::types::*; +use databend_common_expression::Column; +use databend_common_expression::FromData; use goldenfile::Mint; use super::run_ast; diff --git a/src/query/functions/tests/it/scalars/datetime.rs b/src/query/functions/tests/it/scalars/datetime.rs index a3c0d82b9cae..fa6fc8700835 100644 --- a/src/query/functions/tests/it/scalars/datetime.rs +++ b/src/query/functions/tests/it/scalars/datetime.rs @@ -14,8 +14,8 @@ use std::io::Write; -use common_expression::types::*; -use common_expression::FromData; +use databend_common_expression::types::*; +use databend_common_expression::FromData; use goldenfile::Mint; use super::run_ast; diff --git a/src/query/functions/tests/it/scalars/geo.rs b/src/query/functions/tests/it/scalars/geo.rs index a8e14c68eb74..4557602634b8 100644 --- a/src/query/functions/tests/it/scalars/geo.rs +++ b/src/query/functions/tests/it/scalars/geo.rs @@ -14,8 +14,8 @@ use std::io::Write; -use common_expression::types::*; -use common_expression::FromData; +use databend_common_expression::types::*; +use databend_common_expression::FromData; use goldenfile::Mint; use super::run_ast; diff --git a/src/query/functions/tests/it/scalars/geo_h3.rs b/src/query/functions/tests/it/scalars/geo_h3.rs index e5d9552ac522..b691162368f9 100644 --- a/src/query/functions/tests/it/scalars/geo_h3.rs +++ b/src/query/functions/tests/it/scalars/geo_h3.rs @@ -14,8 +14,8 @@ use std::io::Write; -use common_expression::types::*; -use common_expression::FromData; +use databend_common_expression::types::*; +use databend_common_expression::FromData; use goldenfile::Mint; use super::run_ast; diff --git a/src/query/functions/tests/it/scalars/hash.rs b/src/query/functions/tests/it/scalars/hash.rs index 182e82af3b1f..de20d9c6672e 100644 --- a/src/query/functions/tests/it/scalars/hash.rs +++ b/src/query/functions/tests/it/scalars/hash.rs @@ -14,8 +14,8 @@ use std::io::Write; -use common_expression::types::*; -use common_expression::FromData; +use databend_common_expression::types::*; +use databend_common_expression::FromData; use goldenfile::Mint; use super::run_ast; diff --git a/src/query/functions/tests/it/scalars/map.rs b/src/query/functions/tests/it/scalars/map.rs index 7426085d130a..f65091000a2d 100644 --- a/src/query/functions/tests/it/scalars/map.rs +++ b/src/query/functions/tests/it/scalars/map.rs @@ -14,8 +14,8 @@ use std::io::Write; -use common_expression::types::*; -use common_expression::FromData; +use databend_common_expression::types::*; +use databend_common_expression::FromData; use goldenfile::Mint; use super::run_ast; diff --git a/src/query/functions/tests/it/scalars/math.rs b/src/query/functions/tests/it/scalars/math.rs index 1534c37cd5ef..3aab0d9c5dbf 100644 --- a/src/query/functions/tests/it/scalars/math.rs +++ b/src/query/functions/tests/it/scalars/math.rs @@ -14,8 +14,8 @@ use std::io::Write; -use common_expression::types::*; -use common_expression::FromData; +use databend_common_expression::types::*; +use databend_common_expression::FromData; use goldenfile::Mint; use super::run_ast; diff --git a/src/query/functions/tests/it/scalars/misc.rs b/src/query/functions/tests/it/scalars/misc.rs index 98d7ead7c3f0..a4cd4d9c514f 100644 --- a/src/query/functions/tests/it/scalars/misc.rs +++ b/src/query/functions/tests/it/scalars/misc.rs @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_expression::types::*; -use common_expression::FromData; +use databend_common_expression::types::*; +use databend_common_expression::FromData; use goldenfile::Mint; use super::run_ast; diff --git a/src/query/functions/tests/it/scalars/mod.rs b/src/query/functions/tests/it/scalars/mod.rs index 760ee945bec2..cf3cc852a4bb 100644 --- a/src/query/functions/tests/it/scalars/mod.rs +++ b/src/query/functions/tests/it/scalars/mod.rs @@ -16,16 +16,16 @@ use std::collections::HashMap; use std::io::Write; use comfy_table::Table; -use common_exception::Result; -use common_expression::type_check; -use common_expression::BlockEntry; -use common_expression::Column; -use common_expression::ConstantFolder; -use common_expression::DataBlock; -use common_expression::Evaluator; -use common_expression::FunctionContext; -use common_expression::Value; -use common_functions::BUILTIN_FUNCTIONS; +use databend_common_exception::Result; +use databend_common_expression::type_check; +use databend_common_expression::BlockEntry; +use databend_common_expression::Column; +use databend_common_expression::ConstantFolder; +use databend_common_expression::DataBlock; +use databend_common_expression::Evaluator; +use databend_common_expression::FunctionContext; +use databend_common_expression::Value; +use databend_common_functions::BUILTIN_FUNCTIONS; use goldenfile::Mint; use itertools::Itertools; diff --git a/src/query/functions/tests/it/scalars/other.rs b/src/query/functions/tests/it/scalars/other.rs index 8292bd2c7cdf..c74d27209486 100644 --- a/src/query/functions/tests/it/scalars/other.rs +++ b/src/query/functions/tests/it/scalars/other.rs @@ -14,10 +14,10 @@ use std::io::Write; -use common_expression::types::Float64Type; -use common_expression::types::UInt16Type; -use common_expression::types::UInt8Type; -use common_expression::FromData; +use databend_common_expression::types::Float64Type; +use databend_common_expression::types::UInt16Type; +use databend_common_expression::types::UInt8Type; +use databend_common_expression::FromData; use goldenfile::Mint; use super::run_ast; diff --git a/src/query/functions/tests/it/scalars/parser.rs b/src/query/functions/tests/it/scalars/parser.rs index 3d1f83d5fb22..68fdf0dab373 100644 --- a/src/query/functions/tests/it/scalars/parser.rs +++ b/src/query/functions/tests/it/scalars/parser.rs @@ -12,24 +12,24 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_ast::ast::BinaryOperator; -use common_ast::ast::Expr as AExpr; -use common_ast::ast::IntervalKind; -use common_ast::ast::Literal as ASTLiteral; -use common_ast::ast::MapAccessor; -use common_ast::ast::UnaryOperator; -use common_ast::parser::parse_expr; -use common_ast::parser::tokenize_sql; -use common_ast::Dialect; -use common_expression::shrink_scalar; -use common_expression::types::decimal::DecimalDataType; -use common_expression::types::decimal::DecimalScalar; -use common_expression::types::decimal::DecimalSize; -use common_expression::types::DataType; -use common_expression::types::NumberDataType; -use common_expression::types::NumberScalar; -use common_expression::RawExpr; -use common_expression::Scalar; +use databend_common_ast::ast::BinaryOperator; +use databend_common_ast::ast::Expr as AExpr; +use databend_common_ast::ast::IntervalKind; +use databend_common_ast::ast::Literal as ASTLiteral; +use databend_common_ast::ast::MapAccessor; +use databend_common_ast::ast::UnaryOperator; +use databend_common_ast::parser::parse_expr; +use databend_common_ast::parser::tokenize_sql; +use databend_common_ast::Dialect; +use databend_common_expression::shrink_scalar; +use databend_common_expression::types::decimal::DecimalDataType; +use databend_common_expression::types::decimal::DecimalScalar; +use databend_common_expression::types::decimal::DecimalSize; +use databend_common_expression::types::DataType; +use databend_common_expression::types::NumberDataType; +use databend_common_expression::types::NumberScalar; +use databend_common_expression::RawExpr; +use databend_common_expression::Scalar; use ordered_float::OrderedFloat; pub fn parse_raw_expr(text: &str, columns: &[(&str, DataType)]) -> RawExpr { @@ -229,7 +229,7 @@ pub fn transform_expr(ast: AExpr, columns: &[(&str, DataType)]) -> RawExpr { } => { if let Some(inner) = trim_where { match inner.0 { - common_ast::ast::TrimWhere::Both => RawExpr::FunctionCall { + databend_common_ast::ast::TrimWhere::Both => RawExpr::FunctionCall { span, name: "trim_both".to_string(), params: vec![], @@ -238,7 +238,7 @@ pub fn transform_expr(ast: AExpr, columns: &[(&str, DataType)]) -> RawExpr { transform_expr(*inner.1, columns), ], }, - common_ast::ast::TrimWhere::Leading => RawExpr::FunctionCall { + databend_common_ast::ast::TrimWhere::Leading => RawExpr::FunctionCall { span, name: "trim_leading".to_string(), params: vec![], @@ -247,7 +247,7 @@ pub fn transform_expr(ast: AExpr, columns: &[(&str, DataType)]) -> RawExpr { transform_expr(*inner.1, columns), ], }, - common_ast::ast::TrimWhere::Trailing => RawExpr::FunctionCall { + databend_common_ast::ast::TrimWhere::Trailing => RawExpr::FunctionCall { span, name: "trim_trailing".to_string(), params: vec![], @@ -503,41 +503,41 @@ pub fn transform_expr(ast: AExpr, columns: &[(&str, DataType)]) -> RawExpr { } } -fn transform_data_type(target_type: common_ast::ast::TypeName) -> DataType { +fn transform_data_type(target_type: databend_common_ast::ast::TypeName) -> DataType { match target_type { - common_ast::ast::TypeName::Boolean => DataType::Boolean, - common_ast::ast::TypeName::UInt8 => DataType::Number(NumberDataType::UInt8), - common_ast::ast::TypeName::UInt16 => DataType::Number(NumberDataType::UInt16), - common_ast::ast::TypeName::UInt32 => DataType::Number(NumberDataType::UInt32), - common_ast::ast::TypeName::UInt64 => DataType::Number(NumberDataType::UInt64), - common_ast::ast::TypeName::Int8 => DataType::Number(NumberDataType::Int8), - common_ast::ast::TypeName::Int16 => DataType::Number(NumberDataType::Int16), - common_ast::ast::TypeName::Int32 => DataType::Number(NumberDataType::Int32), - common_ast::ast::TypeName::Int64 => DataType::Number(NumberDataType::Int64), - common_ast::ast::TypeName::Float32 => DataType::Number(NumberDataType::Float32), - common_ast::ast::TypeName::Float64 => DataType::Number(NumberDataType::Float64), - common_ast::ast::TypeName::Decimal { precision, scale } => { + databend_common_ast::ast::TypeName::Boolean => DataType::Boolean, + databend_common_ast::ast::TypeName::UInt8 => DataType::Number(NumberDataType::UInt8), + databend_common_ast::ast::TypeName::UInt16 => DataType::Number(NumberDataType::UInt16), + databend_common_ast::ast::TypeName::UInt32 => DataType::Number(NumberDataType::UInt32), + databend_common_ast::ast::TypeName::UInt64 => DataType::Number(NumberDataType::UInt64), + databend_common_ast::ast::TypeName::Int8 => DataType::Number(NumberDataType::Int8), + databend_common_ast::ast::TypeName::Int16 => DataType::Number(NumberDataType::Int16), + databend_common_ast::ast::TypeName::Int32 => DataType::Number(NumberDataType::Int32), + databend_common_ast::ast::TypeName::Int64 => DataType::Number(NumberDataType::Int64), + databend_common_ast::ast::TypeName::Float32 => DataType::Number(NumberDataType::Float32), + databend_common_ast::ast::TypeName::Float64 => DataType::Number(NumberDataType::Float64), + databend_common_ast::ast::TypeName::Decimal { precision, scale } => { DataType::Decimal(DecimalDataType::from_size(DecimalSize { precision, scale }).unwrap()) } - common_ast::ast::TypeName::String => DataType::String, - common_ast::ast::TypeName::Timestamp => DataType::Timestamp, - common_ast::ast::TypeName::Date => DataType::Date, - common_ast::ast::TypeName::Array(item_type) => { + databend_common_ast::ast::TypeName::String => DataType::String, + databend_common_ast::ast::TypeName::Timestamp => DataType::Timestamp, + databend_common_ast::ast::TypeName::Date => DataType::Date, + databend_common_ast::ast::TypeName::Array(item_type) => { DataType::Array(Box::new(transform_data_type(*item_type))) } - common_ast::ast::TypeName::Map { key_type, val_type } => { + databend_common_ast::ast::TypeName::Map { key_type, val_type } => { let key_type = transform_data_type(*key_type); let val_type = transform_data_type(*val_type); DataType::Map(Box::new(DataType::Tuple(vec![key_type, val_type]))) } - common_ast::ast::TypeName::Bitmap => DataType::Bitmap, - common_ast::ast::TypeName::Tuple { fields_type, .. } => { + databend_common_ast::ast::TypeName::Bitmap => DataType::Bitmap, + databend_common_ast::ast::TypeName::Tuple { fields_type, .. } => { DataType::Tuple(fields_type.into_iter().map(transform_data_type).collect()) } - common_ast::ast::TypeName::Nullable(inner_type) => { + databend_common_ast::ast::TypeName::Nullable(inner_type) => { DataType::Nullable(Box::new(transform_data_type(*inner_type))) } - common_ast::ast::TypeName::Variant => DataType::Variant, + databend_common_ast::ast::TypeName::Variant => DataType::Variant, } } diff --git a/src/query/functions/tests/it/scalars/regexp.rs b/src/query/functions/tests/it/scalars/regexp.rs index b28f1ece7aa5..f5fdfacc808c 100644 --- a/src/query/functions/tests/it/scalars/regexp.rs +++ b/src/query/functions/tests/it/scalars/regexp.rs @@ -14,9 +14,9 @@ use std::io::Write; -use common_expression::types::number::Int64Type; -use common_expression::types::StringType; -use common_expression::FromData; +use databend_common_expression::types::number::Int64Type; +use databend_common_expression::types::StringType; +use databend_common_expression::FromData; use goldenfile::Mint; use super::run_ast; diff --git a/src/query/functions/tests/it/scalars/string.rs b/src/query/functions/tests/it/scalars/string.rs index 1d3fd13a8884..469374c61bc9 100644 --- a/src/query/functions/tests/it/scalars/string.rs +++ b/src/query/functions/tests/it/scalars/string.rs @@ -14,10 +14,10 @@ use std::io::Write; -use common_expression::types::number::*; -use common_expression::types::BooleanType; -use common_expression::types::StringType; -use common_expression::FromData; +use databend_common_expression::types::number::*; +use databend_common_expression::types::BooleanType; +use databend_common_expression::types::StringType; +use databend_common_expression::FromData; use goldenfile::Mint; use super::run_ast; diff --git a/src/query/functions/tests/it/scalars/tuple.rs b/src/query/functions/tests/it/scalars/tuple.rs index 40069c65f79a..d23f4fb9709a 100644 --- a/src/query/functions/tests/it/scalars/tuple.rs +++ b/src/query/functions/tests/it/scalars/tuple.rs @@ -14,10 +14,10 @@ use std::io::Write; -use common_expression::types::nullable::NullableColumn; -use common_expression::types::StringType; -use common_expression::Column; -use common_expression::FromData; +use databend_common_expression::types::nullable::NullableColumn; +use databend_common_expression::types::StringType; +use databend_common_expression::Column; +use databend_common_expression::FromData; use goldenfile::Mint; use super::run_ast; diff --git a/src/query/functions/tests/it/scalars/variant.rs b/src/query/functions/tests/it/scalars/variant.rs index bec2b39ea073..8900eba6396d 100644 --- a/src/query/functions/tests/it/scalars/variant.rs +++ b/src/query/functions/tests/it/scalars/variant.rs @@ -14,8 +14,8 @@ use std::io::Write; -use common_expression::types::*; -use common_expression::FromData; +use databend_common_expression::types::*; +use databend_common_expression::FromData; use goldenfile::Mint; use super::run_ast; diff --git a/src/query/functions/tests/it/scalars/vector.rs b/src/query/functions/tests/it/scalars/vector.rs index 688c30f6ec2b..8421e5e61d59 100644 --- a/src/query/functions/tests/it/scalars/vector.rs +++ b/src/query/functions/tests/it/scalars/vector.rs @@ -14,8 +14,8 @@ use std::io::Write; -use common_expression::types::*; -use common_expression::FromData; +use databend_common_expression::types::*; +use databend_common_expression::FromData; use goldenfile::Mint; use super::run_ast; diff --git a/src/query/management/Cargo.toml b/src/query/management/Cargo.toml index c828465f0280..76b833820b26 100644 --- a/src/query/management/Cargo.toml +++ b/src/query/management/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "common-management" +name = "databend-common-management" version = { workspace = true } authors = { workspace = true } license = { workspace = true } @@ -13,16 +13,16 @@ doctest = false test = false [dependencies] -common-base = { path = "../../common/base" } -common-exception = { path = "../../common/exception" } -common-functions = { path = "../functions" } -common-meta-api = { path = "../../meta/api" } -common-meta-app = { path = "../../meta/app" } -common-meta-kvapi = { path = "../../meta/kvapi" } -common-meta-store = { path = "../../meta/store" } -common-meta-types = { path = "../../meta/types" } -common-proto-conv = { path = "../../meta/proto-conv" } -common-protos = { path = "../../meta/protos" } +databend-common-base = { path = "../../common/base" } +databend-common-exception = { path = "../../common/exception" } +databend-common-functions = { path = "../functions" } +databend-common-meta-api = { path = "../../meta/api" } +databend-common-meta-app = { path = "../../meta/app" } +databend-common-meta-kvapi = { path = "../../meta/kvapi" } +databend-common-meta-store = { path = "../../meta/store" } +databend-common-meta-types = { path = "../../meta/types" } +databend-common-proto-conv = { path = "../../meta/proto-conv" } +databend-common-protos = { path = "../../meta/protos" } async-backtrace = { workspace = true } async-trait = { workspace = true } @@ -30,7 +30,7 @@ minitrace = { workspace = true } serde_json = { workspace = true } [dev-dependencies] -common-expression = { path = "../../query/expression" } -common-meta-embedded = { path = "../../meta/embedded" } -common-storage = { path = "../../common/storage" } +databend-common-expression = { path = "../../query/expression" } +databend-common-meta-embedded = { path = "../../meta/embedded" } +databend-common-storage = { path = "../../common/storage" } mockall = "0.11.2" diff --git a/src/query/management/src/cluster/cluster_api.rs b/src/query/management/src/cluster/cluster_api.rs index 276ea5c3cea4..cb3609539c9c 100644 --- a/src/query/management/src/cluster/cluster_api.rs +++ b/src/query/management/src/cluster/cluster_api.rs @@ -12,9 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_exception::Result; -use common_meta_types::MatchSeq; -use common_meta_types::NodeInfo; +use databend_common_exception::Result; +use databend_common_meta_types::MatchSeq; +use databend_common_meta_types::NodeInfo; #[async_trait::async_trait] pub trait ClusterApi: Sync + Send { diff --git a/src/query/management/src/cluster/cluster_mgr.rs b/src/query/management/src/cluster/cluster_mgr.rs index 6f6598e680ba..0dd1d1c2303b 100644 --- a/src/query/management/src/cluster/cluster_mgr.rs +++ b/src/query/management/src/cluster/cluster_mgr.rs @@ -16,19 +16,19 @@ use std::ops::Add; use std::time::Duration; use std::time::UNIX_EPOCH; -use common_base::base::escape_for_key; -use common_base::base::unescape_for_key; -use common_exception::ErrorCode; -use common_exception::Result; -use common_meta_kvapi::kvapi::KVApi; -use common_meta_kvapi::kvapi::UpsertKVReply; -use common_meta_kvapi::kvapi::UpsertKVReq; -use common_meta_store::MetaStore; -use common_meta_types::KVMeta; -use common_meta_types::MatchSeq; -use common_meta_types::NodeInfo; -use common_meta_types::Operation; -use common_meta_types::SeqV; +use databend_common_base::base::escape_for_key; +use databend_common_base::base::unescape_for_key; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_meta_kvapi::kvapi::KVApi; +use databend_common_meta_kvapi::kvapi::UpsertKVReply; +use databend_common_meta_kvapi::kvapi::UpsertKVReq; +use databend_common_meta_store::MetaStore; +use databend_common_meta_types::KVMeta; +use databend_common_meta_types::MatchSeq; +use databend_common_meta_types::NodeInfo; +use databend_common_meta_types::Operation; +use databend_common_meta_types::SeqV; use crate::cluster::ClusterApi; diff --git a/src/query/management/src/connection/connection_api.rs b/src/query/management/src/connection/connection_api.rs index d6186f41bd4e..53961925c55d 100644 --- a/src/query/management/src/connection/connection_api.rs +++ b/src/query/management/src/connection/connection_api.rs @@ -12,10 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_exception::Result; -use common_meta_app::principal::UserDefinedConnection; -use common_meta_types::MatchSeq; -use common_meta_types::SeqV; +use databend_common_exception::Result; +use databend_common_meta_app::principal::UserDefinedConnection; +use databend_common_meta_types::MatchSeq; +use databend_common_meta_types::SeqV; #[async_trait::async_trait] pub trait ConnectionApi: Sync + Send { diff --git a/src/query/management/src/connection/connection_mgr.rs b/src/query/management/src/connection/connection_mgr.rs index 58679d8ba2fe..85e05bfc5553 100644 --- a/src/query/management/src/connection/connection_mgr.rs +++ b/src/query/management/src/connection/connection_mgr.rs @@ -14,17 +14,17 @@ use std::sync::Arc; -use common_base::base::escape_for_key; -use common_exception::ErrorCode; -use common_exception::Result; -use common_meta_app::principal::UserDefinedConnection; -use common_meta_kvapi::kvapi; -use common_meta_kvapi::kvapi::UpsertKVReq; -use common_meta_types::MatchSeq; -use common_meta_types::MatchSeqExt; -use common_meta_types::MetaError; -use common_meta_types::Operation; -use common_meta_types::SeqV; +use databend_common_base::base::escape_for_key; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_meta_app::principal::UserDefinedConnection; +use databend_common_meta_kvapi::kvapi; +use databend_common_meta_kvapi::kvapi::UpsertKVReq; +use databend_common_meta_types::MatchSeq; +use databend_common_meta_types::MatchSeqExt; +use databend_common_meta_types::MetaError; +use databend_common_meta_types::Operation; +use databend_common_meta_types::SeqV; use crate::serde::deserialize_struct; use crate::serde::serialize_struct; diff --git a/src/query/management/src/file_format/file_format_api.rs b/src/query/management/src/file_format/file_format_api.rs index 0db482d683fb..7954d7d10a39 100644 --- a/src/query/management/src/file_format/file_format_api.rs +++ b/src/query/management/src/file_format/file_format_api.rs @@ -12,10 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_exception::Result; -use common_meta_app::principal::UserDefinedFileFormat; -use common_meta_types::MatchSeq; -use common_meta_types::SeqV; +use databend_common_exception::Result; +use databend_common_meta_app::principal::UserDefinedFileFormat; +use databend_common_meta_types::MatchSeq; +use databend_common_meta_types::SeqV; #[async_trait::async_trait] pub trait FileFormatApi: Sync + Send { diff --git a/src/query/management/src/file_format/file_format_mgr.rs b/src/query/management/src/file_format/file_format_mgr.rs index 7e8ba6249969..1ed039747f6c 100644 --- a/src/query/management/src/file_format/file_format_mgr.rs +++ b/src/query/management/src/file_format/file_format_mgr.rs @@ -14,17 +14,17 @@ use std::sync::Arc; -use common_base::base::escape_for_key; -use common_exception::ErrorCode; -use common_exception::Result; -use common_meta_app::principal::UserDefinedFileFormat; -use common_meta_kvapi::kvapi; -use common_meta_kvapi::kvapi::UpsertKVReq; -use common_meta_types::MatchSeq; -use common_meta_types::MatchSeqExt; -use common_meta_types::MetaError; -use common_meta_types::Operation; -use common_meta_types::SeqV; +use databend_common_base::base::escape_for_key; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_meta_app::principal::UserDefinedFileFormat; +use databend_common_meta_kvapi::kvapi; +use databend_common_meta_kvapi::kvapi::UpsertKVReq; +use databend_common_meta_types::MatchSeq; +use databend_common_meta_types::MatchSeqExt; +use databend_common_meta_types::MetaError; +use databend_common_meta_types::Operation; +use databend_common_meta_types::SeqV; use crate::serde::deserialize_struct; use crate::serde::serialize_struct; diff --git a/src/query/management/src/network_policy/network_policy_api.rs b/src/query/management/src/network_policy/network_policy_api.rs index 92518b2c2fd7..ed51bf17c982 100644 --- a/src/query/management/src/network_policy/network_policy_api.rs +++ b/src/query/management/src/network_policy/network_policy_api.rs @@ -12,10 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_exception::Result; -use common_meta_app::principal::NetworkPolicy; -use common_meta_types::MatchSeq; -use common_meta_types::SeqV; +use databend_common_exception::Result; +use databend_common_meta_app::principal::NetworkPolicy; +use databend_common_meta_types::MatchSeq; +use databend_common_meta_types::SeqV; #[async_trait::async_trait] pub trait NetworkPolicyApi: Sync + Send { diff --git a/src/query/management/src/network_policy/network_policy_mgr.rs b/src/query/management/src/network_policy/network_policy_mgr.rs index 484b8b7508f9..f20fc704fd6a 100644 --- a/src/query/management/src/network_policy/network_policy_mgr.rs +++ b/src/query/management/src/network_policy/network_policy_mgr.rs @@ -14,17 +14,17 @@ use std::sync::Arc; -use common_base::base::escape_for_key; -use common_exception::ErrorCode; -use common_exception::Result; -use common_meta_app::principal::NetworkPolicy; -use common_meta_kvapi::kvapi; -use common_meta_kvapi::kvapi::UpsertKVReq; -use common_meta_types::MatchSeq; -use common_meta_types::MatchSeqExt; -use common_meta_types::MetaError; -use common_meta_types::Operation; -use common_meta_types::SeqV; +use databend_common_base::base::escape_for_key; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_meta_app::principal::NetworkPolicy; +use databend_common_meta_kvapi::kvapi; +use databend_common_meta_kvapi::kvapi::UpsertKVReq; +use databend_common_meta_types::MatchSeq; +use databend_common_meta_types::MatchSeqExt; +use databend_common_meta_types::MetaError; +use databend_common_meta_types::Operation; +use databend_common_meta_types::SeqV; use crate::network_policy::network_policy_api::NetworkPolicyApi; use crate::serde::deserialize_struct; diff --git a/src/query/management/src/quota/quota_api.rs b/src/query/management/src/quota/quota_api.rs index 4ded0cb9ac23..8d7a8330c5c2 100644 --- a/src/query/management/src/quota/quota_api.rs +++ b/src/query/management/src/quota/quota_api.rs @@ -12,10 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_exception::Result; -use common_meta_app::tenant::TenantQuota; -use common_meta_types::MatchSeq; -use common_meta_types::SeqV; +use databend_common_exception::Result; +use databend_common_meta_app::tenant::TenantQuota; +use databend_common_meta_types::MatchSeq; +use databend_common_meta_types::SeqV; #[async_trait::async_trait] pub trait QuotaApi: Sync + Send { diff --git a/src/query/management/src/quota/quota_mgr.rs b/src/query/management/src/quota/quota_mgr.rs index 24f0fd9f9cf3..b7971144856c 100644 --- a/src/query/management/src/quota/quota_mgr.rs +++ b/src/query/management/src/quota/quota_mgr.rs @@ -14,18 +14,18 @@ use std::sync::Arc; -use common_base::base::escape_for_key; -use common_exception::ErrorCode; -use common_exception::Result; -use common_meta_app::tenant::TenantQuota; -use common_meta_kvapi::kvapi; -use common_meta_kvapi::kvapi::UpsertKVReq; -use common_meta_types::IntoSeqV; -use common_meta_types::MatchSeq; -use common_meta_types::MatchSeqExt; -use common_meta_types::MetaError; -use common_meta_types::Operation; -use common_meta_types::SeqV; +use databend_common_base::base::escape_for_key; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_meta_app::tenant::TenantQuota; +use databend_common_meta_kvapi::kvapi; +use databend_common_meta_kvapi::kvapi::UpsertKVReq; +use databend_common_meta_types::IntoSeqV; +use databend_common_meta_types::MatchSeq; +use databend_common_meta_types::MatchSeqExt; +use databend_common_meta_types::MetaError; +use databend_common_meta_types::Operation; +use databend_common_meta_types::SeqV; use super::quota_api::QuotaApi; diff --git a/src/query/management/src/role/role_api.rs b/src/query/management/src/role/role_api.rs index b9f15e2ebafe..9bf360fa4e83 100644 --- a/src/query/management/src/role/role_api.rs +++ b/src/query/management/src/role/role_api.rs @@ -12,12 +12,12 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_exception::Result; -use common_meta_app::principal::GrantObjectByID; -use common_meta_app::principal::OwnershipInfo; -use common_meta_app::principal::RoleInfo; -use common_meta_types::MatchSeq; -use common_meta_types::SeqV; +use databend_common_exception::Result; +use databend_common_meta_app::principal::GrantObjectByID; +use databend_common_meta_app::principal::OwnershipInfo; +use databend_common_meta_app::principal::RoleInfo; +use databend_common_meta_types::MatchSeq; +use databend_common_meta_types::SeqV; #[async_trait::async_trait] pub trait RoleApi: Sync + Send { diff --git a/src/query/management/src/role/role_mgr.rs b/src/query/management/src/role/role_mgr.rs index 8855c28a3a1e..01bd8d7d702c 100644 --- a/src/query/management/src/role/role_mgr.rs +++ b/src/query/management/src/role/role_mgr.rs @@ -14,19 +14,19 @@ use std::sync::Arc; -use common_exception::ErrorCode; -use common_exception::ToErrorCode; -use common_meta_app::principal::GrantObjectByID; -use common_meta_app::principal::OwnershipInfo; -use common_meta_app::principal::RoleInfo; -use common_meta_kvapi::kvapi; -use common_meta_kvapi::kvapi::UpsertKVReq; -use common_meta_types::IntoSeqV; -use common_meta_types::MatchSeq; -use common_meta_types::MatchSeqExt; -use common_meta_types::MetaError; -use common_meta_types::Operation; -use common_meta_types::SeqV; +use databend_common_exception::ErrorCode; +use databend_common_exception::ToErrorCode; +use databend_common_meta_app::principal::GrantObjectByID; +use databend_common_meta_app::principal::OwnershipInfo; +use databend_common_meta_app::principal::RoleInfo; +use databend_common_meta_kvapi::kvapi; +use databend_common_meta_kvapi::kvapi::UpsertKVReq; +use databend_common_meta_types::IntoSeqV; +use databend_common_meta_types::MatchSeq; +use databend_common_meta_types::MatchSeqExt; +use databend_common_meta_types::MetaError; +use databend_common_meta_types::Operation; +use databend_common_meta_types::SeqV; use crate::role::role_api::RoleApi; @@ -109,7 +109,7 @@ impl RoleMgr { impl RoleApi for RoleMgr { #[async_backtrace::framed] #[minitrace::trace] - async fn add_role(&self, role_info: RoleInfo) -> common_exception::Result { + async fn add_role(&self, role_info: RoleInfo) -> databend_common_exception::Result { let match_seq = MatchSeq::Exact(0); let key = self.make_role_key(role_info.identity()); let value = serde_json::to_vec(&role_info)?; @@ -197,7 +197,7 @@ impl RoleApi for RoleMgr { &self, object: &GrantObjectByID, role: &str, - ) -> common_exception::Result<()> { + ) -> databend_common_exception::Result<()> { let match_seq = MatchSeq::GE(0); let key = self.make_object_owner_key(object); @@ -224,7 +224,7 @@ impl RoleApi for RoleMgr { async fn get_ownership( &self, object: &GrantObjectByID, - ) -> common_exception::Result> { + ) -> databend_common_exception::Result> { let key = self.make_object_owner_key(object); let res = self.kv_api.get_kv(&key).await?; let res_value = match res { @@ -237,7 +237,10 @@ impl RoleApi for RoleMgr { #[async_backtrace::framed] #[minitrace::trace] - async fn drop_ownership(&self, object: &GrantObjectByID) -> common_exception::Result<()> { + async fn drop_ownership( + &self, + object: &GrantObjectByID, + ) -> databend_common_exception::Result<()> { let seq = MatchSeq::Exact(0); let key = self.make_object_owner_key(object); let kv_api = self.kv_api.clone(); diff --git a/src/query/management/src/serde/pb_serde.rs b/src/query/management/src/serde/pb_serde.rs index 681d7bc8bbee..23f9b8d9311f 100644 --- a/src/query/management/src/serde/pb_serde.rs +++ b/src/query/management/src/serde/pb_serde.rs @@ -14,10 +14,10 @@ use std::fmt::Display; -use common_exception::ErrorCode; -use common_exception::Result; -use common_exception::ToErrorCode; -use common_proto_conv::FromToProto; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_exception::ToErrorCode; +use databend_common_proto_conv::FromToProto; pub fn serialize_struct( value: &T, @@ -26,14 +26,15 @@ pub fn serialize_struct( ) -> Result> where T: FromToProto + 'static, - T::PB: common_protos::prost::Message + Default, + T::PB: databend_common_protos::prost::Message + Default, ErrFn: FnOnce(String) -> ErrorCode + std::marker::Copy, D: Display, CtxFn: FnOnce() -> D + std::marker::Copy, { let p = value.to_pb().map_err_to_code(err_code_fn, context_fn)?; let mut buf = vec![]; - common_protos::prost::Message::encode(&p, &mut buf).map_err_to_code(err_code_fn, context_fn)?; + databend_common_protos::prost::Message::encode(&p, &mut buf) + .map_err_to_code(err_code_fn, context_fn)?; Ok(buf) } @@ -44,13 +45,13 @@ pub fn deserialize_struct( ) -> Result where T: FromToProto, - T::PB: common_protos::prost::Message + Default, + T::PB: databend_common_protos::prost::Message + Default, ErrFn: FnOnce(String) -> ErrorCode + std::marker::Copy, D: Display, CtxFn: FnOnce() -> D + std::marker::Copy, { - let p: T::PB = - common_protos::prost::Message::decode(buf).map_err_to_code(err_code_fn, context_fn)?; + let p: T::PB = databend_common_protos::prost::Message::decode(buf) + .map_err_to_code(err_code_fn, context_fn)?; let v: T = FromToProto::from_pb(p).map_err_to_code(err_code_fn, context_fn)?; Ok(v) diff --git a/src/query/management/src/setting/setting_api.rs b/src/query/management/src/setting/setting_api.rs index 75932ef220cf..a7f8d6e51be4 100644 --- a/src/query/management/src/setting/setting_api.rs +++ b/src/query/management/src/setting/setting_api.rs @@ -12,10 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_exception::Result; -use common_meta_app::principal::UserSetting; -use common_meta_types::MatchSeq; -use common_meta_types::SeqV; +use databend_common_exception::Result; +use databend_common_meta_app::principal::UserSetting; +use databend_common_meta_types::MatchSeq; +use databend_common_meta_types::SeqV; #[async_trait::async_trait] pub trait SettingApi: Sync + Send { diff --git a/src/query/management/src/setting/setting_mgr.rs b/src/query/management/src/setting/setting_mgr.rs index 0530c2331dd3..f577b7357bfe 100644 --- a/src/query/management/src/setting/setting_mgr.rs +++ b/src/query/management/src/setting/setting_mgr.rs @@ -14,18 +14,18 @@ use std::sync::Arc; -use common_exception::ErrorCode; -use common_exception::Result; -use common_meta_app::principal::UserSetting; -use common_meta_kvapi::kvapi; -use common_meta_kvapi::kvapi::UpsertKVReq; -use common_meta_types::IntoSeqV; -use common_meta_types::MatchSeq; -use common_meta_types::MatchSeqExt; -use common_meta_types::MetaError; -use common_meta_types::Operation; -use common_meta_types::SeqV; -use common_meta_types::SeqValue; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_meta_app::principal::UserSetting; +use databend_common_meta_kvapi::kvapi; +use databend_common_meta_kvapi::kvapi::UpsertKVReq; +use databend_common_meta_types::IntoSeqV; +use databend_common_meta_types::MatchSeq; +use databend_common_meta_types::MatchSeqExt; +use databend_common_meta_types::MetaError; +use databend_common_meta_types::Operation; +use databend_common_meta_types::SeqV; +use databend_common_meta_types::SeqValue; use crate::setting::SettingApi; diff --git a/src/query/management/src/stage/stage_api.rs b/src/query/management/src/stage/stage_api.rs index 74532229d191..202d9069e115 100644 --- a/src/query/management/src/stage/stage_api.rs +++ b/src/query/management/src/stage/stage_api.rs @@ -12,11 +12,11 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_exception::Result; -use common_meta_app::principal::StageFile; -use common_meta_app::principal::StageInfo; -use common_meta_types::MatchSeq; -use common_meta_types::SeqV; +use databend_common_exception::Result; +use databend_common_meta_app::principal::StageFile; +use databend_common_meta_app::principal::StageInfo; +use databend_common_meta_types::MatchSeq; +use databend_common_meta_types::SeqV; #[async_trait::async_trait] pub trait StageApi: Sync + Send { diff --git a/src/query/management/src/stage/stage_mgr.rs b/src/query/management/src/stage/stage_mgr.rs index a7df169e2c76..d1d3f47accfa 100644 --- a/src/query/management/src/stage/stage_mgr.rs +++ b/src/query/management/src/stage/stage_mgr.rs @@ -14,26 +14,26 @@ use std::sync::Arc; -use common_base::base::escape_for_key; -use common_exception::ErrorCode; -use common_exception::Result; -use common_meta_api::reply::txn_reply_to_api_result; -use common_meta_api::txn_cond_seq; -use common_meta_api::txn_op_del; -use common_meta_api::txn_op_put; -use common_meta_app::app_error::TxnRetryMaxTimes; -use common_meta_app::principal::StageFile; -use common_meta_app::principal::StageInfo; -use common_meta_kvapi::kvapi; -use common_meta_kvapi::kvapi::UpsertKVReq; -use common_meta_types::ConditionResult::Eq; -use common_meta_types::MatchSeq; -use common_meta_types::MatchSeqExt; -use common_meta_types::MetaError; -use common_meta_types::Operation; -use common_meta_types::SeqV; -use common_meta_types::TxnOp; -use common_meta_types::TxnRequest; +use databend_common_base::base::escape_for_key; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_meta_api::reply::txn_reply_to_api_result; +use databend_common_meta_api::txn_cond_seq; +use databend_common_meta_api::txn_op_del; +use databend_common_meta_api::txn_op_put; +use databend_common_meta_app::app_error::TxnRetryMaxTimes; +use databend_common_meta_app::principal::StageFile; +use databend_common_meta_app::principal::StageInfo; +use databend_common_meta_kvapi::kvapi; +use databend_common_meta_kvapi::kvapi::UpsertKVReq; +use databend_common_meta_types::ConditionResult::Eq; +use databend_common_meta_types::MatchSeq; +use databend_common_meta_types::MatchSeqExt; +use databend_common_meta_types::MetaError; +use databend_common_meta_types::Operation; +use databend_common_meta_types::SeqV; +use databend_common_meta_types::TxnOp; +use databend_common_meta_types::TxnRequest; use crate::serde::deserialize_struct; use crate::serde::serialize_struct; diff --git a/src/query/management/src/udf/udf_api.rs b/src/query/management/src/udf/udf_api.rs index 749d620071bc..5e5fa4ff44df 100644 --- a/src/query/management/src/udf/udf_api.rs +++ b/src/query/management/src/udf/udf_api.rs @@ -12,10 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_exception::Result; -use common_meta_app::principal::UserDefinedFunction; -use common_meta_types::MatchSeq; -use common_meta_types::SeqV; +use databend_common_exception::Result; +use databend_common_meta_app::principal::UserDefinedFunction; +use databend_common_meta_types::MatchSeq; +use databend_common_meta_types::SeqV; #[async_trait::async_trait] pub trait UdfApi: Sync + Send { diff --git a/src/query/management/src/udf/udf_mgr.rs b/src/query/management/src/udf/udf_mgr.rs index e7fce410cee5..51fffca05e3f 100644 --- a/src/query/management/src/udf/udf_mgr.rs +++ b/src/query/management/src/udf/udf_mgr.rs @@ -14,18 +14,18 @@ use std::sync::Arc; -use common_base::base::escape_for_key; -use common_exception::ErrorCode; -use common_exception::Result; -use common_functions::is_builtin_function; -use common_meta_app::principal::UserDefinedFunction; -use common_meta_kvapi::kvapi; -use common_meta_kvapi::kvapi::UpsertKVReq; -use common_meta_types::MatchSeq; -use common_meta_types::MatchSeqExt; -use common_meta_types::MetaError; -use common_meta_types::Operation; -use common_meta_types::SeqV; +use databend_common_base::base::escape_for_key; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_functions::is_builtin_function; +use databend_common_meta_app::principal::UserDefinedFunction; +use databend_common_meta_kvapi::kvapi; +use databend_common_meta_kvapi::kvapi::UpsertKVReq; +use databend_common_meta_types::MatchSeq; +use databend_common_meta_types::MatchSeqExt; +use databend_common_meta_types::MetaError; +use databend_common_meta_types::Operation; +use databend_common_meta_types::SeqV; use crate::serde::deserialize_struct; use crate::serde::serialize_struct; diff --git a/src/query/management/src/user/user_api.rs b/src/query/management/src/user/user_api.rs index 21dc5383c5d3..beb638be457e 100644 --- a/src/query/management/src/user/user_api.rs +++ b/src/query/management/src/user/user_api.rs @@ -12,11 +12,11 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_exception::Result; -use common_meta_app::principal::UserIdentity; -use common_meta_app::principal::UserInfo; -use common_meta_types::MatchSeq; -use common_meta_types::SeqV; +use databend_common_exception::Result; +use databend_common_meta_app::principal::UserIdentity; +use databend_common_meta_app::principal::UserInfo; +use databend_common_meta_types::MatchSeq; +use databend_common_meta_types::SeqV; #[async_trait::async_trait] pub trait UserApi: Sync + Send { diff --git a/src/query/management/src/user/user_mgr.rs b/src/query/management/src/user/user_mgr.rs index da238c1e1276..3b3f0ffd3451 100644 --- a/src/query/management/src/user/user_mgr.rs +++ b/src/query/management/src/user/user_mgr.rs @@ -14,18 +14,18 @@ use std::sync::Arc; -use common_base::base::escape_for_key; -use common_exception::ErrorCode; -use common_exception::Result; -use common_meta_app::principal::UserIdentity; -use common_meta_app::principal::UserInfo; -use common_meta_kvapi::kvapi; -use common_meta_kvapi::kvapi::UpsertKVReq; -use common_meta_types::MatchSeq; -use common_meta_types::MatchSeqExt; -use common_meta_types::MetaError; -use common_meta_types::Operation; -use common_meta_types::SeqV; +use databend_common_base::base::escape_for_key; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_meta_app::principal::UserIdentity; +use databend_common_meta_app::principal::UserInfo; +use databend_common_meta_kvapi::kvapi; +use databend_common_meta_kvapi::kvapi::UpsertKVReq; +use databend_common_meta_types::MatchSeq; +use databend_common_meta_types::MatchSeqExt; +use databend_common_meta_types::MetaError; +use databend_common_meta_types::Operation; +use databend_common_meta_types::SeqV; use crate::serde::deserialize_struct; use crate::serde::serialize_struct; @@ -57,7 +57,7 @@ impl UserMgr { &self, user_info: &UserInfo, seq: MatchSeq, - ) -> common_exception::Result { + ) -> databend_common_exception::Result { let user_key = format_user_key(&user_info.name, &user_info.hostname); let key = format!("{}/{}", self.user_prefix, escape_for_key(&user_key)?); let value = serialize_struct(user_info, ErrorCode::IllegalUserInfoFormat, || "")?; @@ -81,7 +81,7 @@ impl UserMgr { impl UserApi for UserMgr { #[async_backtrace::framed] #[minitrace::trace] - async fn add_user(&self, user_info: UserInfo) -> common_exception::Result { + async fn add_user(&self, user_info: UserInfo) -> databend_common_exception::Result { let match_seq = MatchSeq::Exact(0); let user_key = format_user_key(&user_info.name, &user_info.hostname); let key = format!("{}/{}", self.user_prefix, escape_for_key(&user_key)?); diff --git a/src/query/management/tests/it/cluster.rs b/src/query/management/tests/it/cluster.rs index 266fa565911f..45d784267fd8 100644 --- a/src/query/management/tests/it/cluster.rs +++ b/src/query/management/tests/it/cluster.rs @@ -16,15 +16,15 @@ use std::sync::Arc; use std::time::Duration; use std::time::UNIX_EPOCH; -use common_base::base::tokio; -use common_exception::Result; -use common_management::*; -use common_meta_embedded::MetaEmbedded; -use common_meta_kvapi::kvapi::KVApi; -use common_meta_store::MetaStore; -use common_meta_types::MatchSeq; -use common_meta_types::NodeInfo; -use common_meta_types::SeqV; +use databend_common_base::base::tokio; +use databend_common_exception::Result; +use databend_common_management::*; +use databend_common_meta_embedded::MetaEmbedded; +use databend_common_meta_kvapi::kvapi::KVApi; +use databend_common_meta_store::MetaStore; +use databend_common_meta_types::MatchSeq; +use databend_common_meta_types::NodeInfo; +use databend_common_meta_types::SeqV; #[tokio::test(flavor = "multi_thread", worker_threads = 1)] async fn test_successfully_add_node() -> Result<()> { diff --git a/src/query/management/tests/it/setting.rs b/src/query/management/tests/it/setting.rs index 0013b508348c..3a45ed94da17 100644 --- a/src/query/management/tests/it/setting.rs +++ b/src/query/management/tests/it/setting.rs @@ -14,15 +14,15 @@ use std::sync::Arc; -use common_base::base::tokio; -use common_exception::Result; -use common_management::*; -use common_meta_app::principal::UserSetting; -use common_meta_app::principal::UserSettingValue; -use common_meta_embedded::MetaEmbedded; -use common_meta_kvapi::kvapi::KVApi; -use common_meta_types::MatchSeq; -use common_meta_types::SeqV; +use databend_common_base::base::tokio; +use databend_common_exception::Result; +use databend_common_management::*; +use databend_common_meta_app::principal::UserSetting; +use databend_common_meta_app::principal::UserSettingValue; +use databend_common_meta_embedded::MetaEmbedded; +use databend_common_meta_kvapi::kvapi::KVApi; +use databend_common_meta_types::MatchSeq; +use databend_common_meta_types::SeqV; #[tokio::test(flavor = "multi_thread", worker_threads = 1)] async fn test_set_setting() -> Result<()> { diff --git a/src/query/management/tests/it/stage.rs b/src/query/management/tests/it/stage.rs index 199ae490a179..44ba0e1437ee 100644 --- a/src/query/management/tests/it/stage.rs +++ b/src/query/management/tests/it/stage.rs @@ -14,19 +14,19 @@ use std::sync::Arc; -use common_base::base::tokio; -use common_exception::ErrorCode; -use common_exception::Result; -use common_management::*; -use common_meta_app::principal::StageFile; -use common_meta_app::principal::StageInfo; -use common_meta_app::principal::StageParams; -use common_meta_app::storage::StorageParams; -use common_meta_app::storage::StorageS3Config; -use common_meta_embedded::MetaEmbedded; -use common_meta_kvapi::kvapi::KVApi; -use common_meta_types::MatchSeq; -use common_meta_types::SeqV; +use databend_common_base::base::tokio; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_management::*; +use databend_common_meta_app::principal::StageFile; +use databend_common_meta_app::principal::StageInfo; +use databend_common_meta_app::principal::StageParams; +use databend_common_meta_app::storage::StorageParams; +use databend_common_meta_app::storage::StorageS3Config; +use databend_common_meta_embedded::MetaEmbedded; +use databend_common_meta_kvapi::kvapi::KVApi; +use databend_common_meta_types::MatchSeq; +use databend_common_meta_types::SeqV; #[tokio::test(flavor = "multi_thread", worker_threads = 1)] async fn test_add_stage() -> Result<()> { diff --git a/src/query/management/tests/it/udf.rs b/src/query/management/tests/it/udf.rs index e90c32d42727..d685aecbe011 100644 --- a/src/query/management/tests/it/udf.rs +++ b/src/query/management/tests/it/udf.rs @@ -14,17 +14,17 @@ use std::sync::Arc; -use common_base::base::tokio; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::types::DataType; -use common_expression::types::NumberDataType; -use common_management::*; -use common_meta_app::principal::UserDefinedFunction; -use common_meta_embedded::MetaEmbedded; -use common_meta_kvapi::kvapi::KVApi; -use common_meta_types::MatchSeq; -use common_meta_types::SeqV; +use databend_common_base::base::tokio; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::types::DataType; +use databend_common_expression::types::NumberDataType; +use databend_common_management::*; +use databend_common_meta_app::principal::UserDefinedFunction; +use databend_common_meta_embedded::MetaEmbedded; +use databend_common_meta_kvapi::kvapi::KVApi; +use databend_common_meta_types::MatchSeq; +use databend_common_meta_types::SeqV; #[tokio::test(flavor = "multi_thread", worker_threads = 1)] async fn test_add_udf() -> Result<()> { diff --git a/src/query/management/tests/it/user.rs b/src/query/management/tests/it/user.rs index 11f8ed1c43a2..9d448800a276 100644 --- a/src/query/management/tests/it/user.rs +++ b/src/query/management/tests/it/user.rs @@ -15,26 +15,26 @@ use std::sync::Arc; use async_trait::async_trait; -use common_base::base::escape_for_key; -use common_base::base::tokio; -use common_exception::ErrorCode; -use common_management::*; -use common_meta_app::principal::AuthInfo; -use common_meta_app::principal::PasswordHashMethod; -use common_meta_app::principal::UserIdentity; -use common_meta_kvapi::kvapi; -use common_meta_kvapi::kvapi::GetKVReply; -use common_meta_kvapi::kvapi::KVStream; -use common_meta_kvapi::kvapi::ListKVReply; -use common_meta_kvapi::kvapi::MGetKVReply; -use common_meta_kvapi::kvapi::UpsertKVReply; -use common_meta_kvapi::kvapi::UpsertKVReq; -use common_meta_types::MatchSeq; -use common_meta_types::MetaError; -use common_meta_types::Operation; -use common_meta_types::SeqV; -use common_meta_types::TxnReply; -use common_meta_types::TxnRequest; +use databend_common_base::base::escape_for_key; +use databend_common_base::base::tokio; +use databend_common_exception::ErrorCode; +use databend_common_management::*; +use databend_common_meta_app::principal::AuthInfo; +use databend_common_meta_app::principal::PasswordHashMethod; +use databend_common_meta_app::principal::UserIdentity; +use databend_common_meta_kvapi::kvapi; +use databend_common_meta_kvapi::kvapi::GetKVReply; +use databend_common_meta_kvapi::kvapi::KVStream; +use databend_common_meta_kvapi::kvapi::ListKVReply; +use databend_common_meta_kvapi::kvapi::MGetKVReply; +use databend_common_meta_kvapi::kvapi::UpsertKVReply; +use databend_common_meta_kvapi::kvapi::UpsertKVReq; +use databend_common_meta_types::MatchSeq; +use databend_common_meta_types::MetaError; +use databend_common_meta_types::Operation; +use databend_common_meta_types::SeqV; +use databend_common_meta_types::TxnReply; +use databend_common_meta_types::TxnRequest; use mockall::predicate::*; use mockall::*; @@ -78,13 +78,13 @@ fn default_test_auth_info() -> AuthInfo { } mod add { - use common_meta_app::principal::UserInfo; - use common_meta_types::Operation; + use databend_common_meta_app::principal::UserInfo; + use databend_common_meta_types::Operation; use super::*; #[tokio::test(flavor = "multi_thread", worker_threads = 1)] - async fn test_add_user() -> common_exception::Result<()> { + async fn test_add_user() -> databend_common_exception::Result<()> { let test_user_name = "test_user"; let test_hostname = "localhost"; let user_info = UserInfo::new(test_user_name, test_hostname, default_test_auth_info()); @@ -159,12 +159,12 @@ mod add { } mod get { - use common_meta_app::principal::UserInfo; + use databend_common_meta_app::principal::UserInfo; use super::*; #[tokio::test(flavor = "multi_thread", worker_threads = 1)] - async fn test_get_user_seq_match() -> common_exception::Result<()> { + async fn test_get_user_seq_match() -> databend_common_exception::Result<()> { let test_user_name = "test"; let test_hostname = "localhost"; let test_key = format!( @@ -190,7 +190,7 @@ mod get { } #[tokio::test(flavor = "multi_thread", worker_threads = 1)] - async fn test_get_user_do_not_care_seq() -> common_exception::Result<()> { + async fn test_get_user_do_not_care_seq() -> databend_common_exception::Result<()> { let test_user_name = "test"; let test_hostname = "localhost"; let test_key = format!( @@ -215,7 +215,7 @@ mod get { } #[tokio::test(flavor = "multi_thread", worker_threads = 1)] - async fn test_get_user_not_exist() -> common_exception::Result<()> { + async fn test_get_user_not_exist() -> databend_common_exception::Result<()> { let test_user_name = "test"; let test_hostname = "localhost"; let test_key = format!( @@ -243,7 +243,7 @@ mod get { } #[tokio::test(flavor = "multi_thread", worker_threads = 1)] - async fn test_get_user_not_exist_seq_mismatch() -> common_exception::Result<()> { + async fn test_get_user_not_exist_seq_mismatch() -> databend_common_exception::Result<()> { let test_user_name = "test"; let test_hostname = "localhost"; let test_key = format!( @@ -271,7 +271,7 @@ mod get { } #[tokio::test(flavor = "multi_thread", worker_threads = 1)] - async fn test_get_user_invalid_user_info_encoding() -> common_exception::Result<()> { + async fn test_get_user_invalid_user_info_encoding() -> databend_common_exception::Result<()> { let test_user_name = "test"; let test_hostname = "localhost"; let test_key = format!( @@ -301,14 +301,14 @@ mod get { } mod get_users { - use common_meta_app::principal::UserInfo; + use databend_common_meta_app::principal::UserInfo; use super::*; type FakeKeys = Vec<(String, SeqV>)>; type UserInfos = Vec>; - fn prepare() -> common_exception::Result<(FakeKeys, UserInfos)> { + fn prepare() -> databend_common_exception::Result<(FakeKeys, UserInfos)> { let mut names = vec![]; let mut hostnames = vec![]; let mut keys = vec![]; @@ -338,7 +338,7 @@ mod get_users { } #[tokio::test(flavor = "multi_thread", worker_threads = 1)] - async fn test_get_users_normal() -> common_exception::Result<()> { + async fn test_get_users_normal() -> databend_common_exception::Result<()> { let (res, user_infos) = prepare()?; let mut kv = MockKV::new(); { @@ -358,7 +358,8 @@ mod get_users { } #[tokio::test(flavor = "multi_thread", worker_threads = 1)] - async fn test_get_all_users_invalid_user_info_encoding() -> common_exception::Result<()> { + async fn test_get_all_users_invalid_user_info_encoding() -> databend_common_exception::Result<()> + { let (mut res, _user_infos) = prepare()?; res.insert( 8, @@ -394,7 +395,7 @@ mod drop { use super::*; #[tokio::test(flavor = "multi_thread", worker_threads = 1)] - async fn test_drop_user_normal_case() -> common_exception::Result<()> { + async fn test_drop_user_normal_case() -> databend_common_exception::Result<()> { let mut kv = MockKV::new(); let test_user = "test"; let test_hostname = "localhost"; @@ -420,7 +421,7 @@ mod drop { } #[tokio::test(flavor = "multi_thread", worker_threads = 1)] - async fn test_drop_user_unknown() -> common_exception::Result<()> { + async fn test_drop_user_unknown() -> databend_common_exception::Result<()> { let mut kv = MockKV::new(); let test_user = "test"; let test_hostname = "localhost"; @@ -449,8 +450,8 @@ mod drop { } mod update { - use common_meta_app::principal::AuthInfo; - use common_meta_app::principal::UserInfo; + use databend_common_meta_app::principal::AuthInfo; + use databend_common_meta_app::principal::UserInfo; use super::*; @@ -466,16 +467,16 @@ mod update { } #[tokio::test(flavor = "multi_thread", worker_threads = 1)] - async fn test_update_user_normal_update_full() -> common_exception::Result<()> { + async fn test_update_user_normal_update_full() -> databend_common_exception::Result<()> { test_update_user_normal(true).await } #[tokio::test(flavor = "multi_thread", worker_threads = 1)] - async fn test_update_user_normal_update_partial() -> common_exception::Result<()> { + async fn test_update_user_normal_update_partial() -> databend_common_exception::Result<()> { test_update_user_normal(false).await } - async fn test_update_user_normal(full: bool) -> common_exception::Result<()> { + async fn test_update_user_normal(full: bool) -> databend_common_exception::Result<()> { let test_user_name = "name"; let test_hostname = "localhost"; @@ -525,7 +526,8 @@ mod update { } #[tokio::test(flavor = "multi_thread", worker_threads = 1)] - async fn test_update_user_with_conflict_when_writing_back() -> common_exception::Result<()> { + async fn test_update_user_with_conflict_when_writing_back() + -> databend_common_exception::Result<()> { let test_user_name = "name"; let test_hostname = "localhost"; let test_key = format!( @@ -557,7 +559,7 @@ mod update { } #[tokio::test(flavor = "multi_thread", worker_threads = 1)] - async fn test_update_user_with_complete() -> common_exception::Result<()> { + async fn test_update_user_with_complete() -> databend_common_exception::Result<()> { let test_user_name = "name"; let test_hostname = "localhost"; let test_key = format!( @@ -597,15 +599,15 @@ mod update { } mod set_user_privileges { - use common_meta_app::principal::GrantObject; - use common_meta_app::principal::UserInfo; - use common_meta_app::principal::UserPrivilegeSet; - use common_meta_app::principal::UserPrivilegeType; + use databend_common_meta_app::principal::GrantObject; + use databend_common_meta_app::principal::UserInfo; + use databend_common_meta_app::principal::UserPrivilegeSet; + use databend_common_meta_app::principal::UserPrivilegeType; use super::*; #[tokio::test(flavor = "multi_thread", worker_threads = 1)] - async fn test_grant_user_privileges() -> common_exception::Result<()> { + async fn test_grant_user_privileges() -> databend_common_exception::Result<()> { let test_user_name = "name"; let test_hostname = "localhost"; let test_key = format!( diff --git a/src/query/pipeline/core/Cargo.toml b/src/query/pipeline/core/Cargo.toml index 68bbbaea5318..7e7c96c9a2f3 100644 --- a/src/query/pipeline/core/Cargo.toml +++ b/src/query/pipeline/core/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "common-pipeline-core" +name = "databend-common-pipeline-core" version = { workspace = true } authors = { workspace = true } license = { workspace = true } @@ -12,8 +12,8 @@ doctest = false test = false [dependencies] -common-exception = { path = "../../../common/exception" } -common-expression = { path = "../../expression" } +databend-common-exception = { path = "../../../common/exception" } +databend-common-expression = { path = "../../expression" } async-backtrace = { workspace = true } async-trait = { workspace = true } diff --git a/src/query/pipeline/core/src/input_error.rs b/src/query/pipeline/core/src/input_error.rs index c57a5a556d7a..ba09bc1849f5 100644 --- a/src/query/pipeline/core/src/input_error.rs +++ b/src/query/pipeline/core/src/input_error.rs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_exception::ErrorCode; +use databend_common_exception::ErrorCode; #[derive(Debug, Clone)] pub struct InputError { diff --git a/src/query/pipeline/core/src/pipeline.rs b/src/query/pipeline/core/src/pipeline.rs index 47f8c31817d0..cd365b3a7eaa 100644 --- a/src/query/pipeline/core/src/pipeline.rs +++ b/src/query/pipeline/core/src/pipeline.rs @@ -18,8 +18,8 @@ use std::sync::atomic::AtomicUsize; use std::sync::atomic::Ordering; use std::sync::Arc; -use common_exception::ErrorCode; -use common_exception::Result; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; use crate::pipe::Pipe; use crate::pipe::PipeItem; diff --git a/src/query/pipeline/core/src/processors/duplicate_processor.rs b/src/query/pipeline/core/src/processors/duplicate_processor.rs index ddf17b79255d..cfff2099222e 100644 --- a/src/query/pipeline/core/src/processors/duplicate_processor.rs +++ b/src/query/pipeline/core/src/processors/duplicate_processor.rs @@ -15,7 +15,7 @@ use std::any::Any; use std::sync::Arc; -use common_exception::Result; +use databend_common_exception::Result; use crate::processors::Event; use crate::processors::InputPort; diff --git a/src/query/pipeline/core/src/processors/port.rs b/src/query/pipeline/core/src/processors/port.rs index 296d2f5e2f34..d39e519775fb 100644 --- a/src/query/pipeline/core/src/processors/port.rs +++ b/src/query/pipeline/core/src/processors/port.rs @@ -16,8 +16,8 @@ use std::sync::atomic::AtomicPtr; use std::sync::atomic::Ordering; use std::sync::Arc; -use common_exception::Result; -use common_expression::DataBlock; +use databend_common_exception::Result; +use databend_common_expression::DataBlock; use crate::processors::UpdateTrigger; use crate::unsafe_cell_wrap::UnSafeCellWrap; diff --git a/src/query/pipeline/core/src/processors/port_trigger.rs b/src/query/pipeline/core/src/processors/port_trigger.rs index 476ec3a77074..7a02cfae185c 100644 --- a/src/query/pipeline/core/src/processors/port_trigger.rs +++ b/src/query/pipeline/core/src/processors/port_trigger.rs @@ -17,8 +17,8 @@ use std::collections::VecDeque; use std::fmt::Debug; use std::sync::Arc; -use common_exception::ErrorCode; -use common_exception::Result; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; use petgraph::dot::Config; use petgraph::dot::Dot; use petgraph::prelude::EdgeIndex; diff --git a/src/query/pipeline/core/src/processors/processor.rs b/src/query/pipeline/core/src/processors/processor.rs index 102df45bd12c..13248fb4efa0 100644 --- a/src/query/pipeline/core/src/processors/processor.rs +++ b/src/query/pipeline/core/src/processors/processor.rs @@ -17,8 +17,8 @@ use std::cell::UnsafeCell; use std::ops::Deref; use std::sync::Arc; -use common_exception::ErrorCode; -use common_exception::Result; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; use futures::future::BoxFuture; use futures::FutureExt; use minitrace::prelude::*; diff --git a/src/query/pipeline/core/src/processors/resize_processor.rs b/src/query/pipeline/core/src/processors/resize_processor.rs index a09b1bf22e3a..9bfff2f58183 100644 --- a/src/query/pipeline/core/src/processors/resize_processor.rs +++ b/src/query/pipeline/core/src/processors/resize_processor.rs @@ -16,7 +16,7 @@ use std::any::Any; use std::collections::VecDeque; use std::sync::Arc; -use common_exception::Result; +use databend_common_exception::Result; use crate::pipe::PipeItem; use crate::processors::Event; diff --git a/src/query/pipeline/core/src/processors/shuffle_processor.rs b/src/query/pipeline/core/src/processors/shuffle_processor.rs index cc54b2d14a73..ed545680ff65 100644 --- a/src/query/pipeline/core/src/processors/shuffle_processor.rs +++ b/src/query/pipeline/core/src/processors/shuffle_processor.rs @@ -15,7 +15,7 @@ use std::any::Any; use std::sync::Arc; -use common_exception::Result; +use databend_common_exception::Result; use crate::processors::Event; use crate::processors::InputPort; diff --git a/src/query/pipeline/core/tests/it/pipelines/processors/duplicate.rs b/src/query/pipeline/core/tests/it/pipelines/processors/duplicate.rs index 61fe25658b6a..0636a254c07b 100644 --- a/src/query/pipeline/core/tests/it/pipelines/processors/duplicate.rs +++ b/src/query/pipeline/core/tests/it/pipelines/processors/duplicate.rs @@ -12,16 +12,16 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_exception::Result; -use common_expression::types::Int32Type; -use common_expression::DataBlock; -use common_expression::FromData; -use common_pipeline_core::processors::connect; -use common_pipeline_core::processors::DuplicateProcessor; -use common_pipeline_core::processors::Event; -use common_pipeline_core::processors::InputPort; -use common_pipeline_core::processors::OutputPort; -use common_pipeline_core::processors::Processor; +use databend_common_exception::Result; +use databend_common_expression::types::Int32Type; +use databend_common_expression::DataBlock; +use databend_common_expression::FromData; +use databend_common_pipeline_core::processors::connect; +use databend_common_pipeline_core::processors::DuplicateProcessor; +use databend_common_pipeline_core::processors::Event; +use databend_common_pipeline_core::processors::InputPort; +use databend_common_pipeline_core::processors::OutputPort; +use databend_common_pipeline_core::processors::Processor; #[tokio::test(flavor = "multi_thread", worker_threads = 1)] async fn test_duplicate_output_finish() -> Result<()> { diff --git a/src/query/pipeline/core/tests/it/pipelines/processors/port_test.rs b/src/query/pipeline/core/tests/it/pipelines/processors/port_test.rs index 831bf67ac70a..7c4d0e0c3831 100644 --- a/src/query/pipeline/core/tests/it/pipelines/processors/port_test.rs +++ b/src/query/pipeline/core/tests/it/pipelines/processors/port_test.rs @@ -15,13 +15,13 @@ use std::sync::Arc; use std::sync::Barrier; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::BlockMetaInfo; -use common_expression::DataBlock; -use common_pipeline_core::processors::connect; -use common_pipeline_core::processors::InputPort; -use common_pipeline_core::processors::OutputPort; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::BlockMetaInfo; +use databend_common_expression::DataBlock; +use databend_common_pipeline_core::processors::connect; +use databend_common_pipeline_core::processors::InputPort; +use databend_common_pipeline_core::processors::OutputPort; use serde::Deserializer; use serde::Serializer; diff --git a/src/query/pipeline/core/tests/it/pipelines/processors/resize.rs b/src/query/pipeline/core/tests/it/pipelines/processors/resize.rs index dd4853210ab8..0d2dea56e168 100644 --- a/src/query/pipeline/core/tests/it/pipelines/processors/resize.rs +++ b/src/query/pipeline/core/tests/it/pipelines/processors/resize.rs @@ -14,14 +14,14 @@ use std::sync::Arc; -use common_exception::Result; -use common_expression::DataBlock; -use common_pipeline_core::processors::connect; -use common_pipeline_core::processors::EventCause; -use common_pipeline_core::processors::InputPort; -use common_pipeline_core::processors::OutputPort; -use common_pipeline_core::processors::Processor; -use common_pipeline_core::processors::ResizeProcessor; +use databend_common_exception::Result; +use databend_common_expression::DataBlock; +use databend_common_pipeline_core::processors::connect; +use databend_common_pipeline_core::processors::EventCause; +use databend_common_pipeline_core::processors::InputPort; +use databend_common_pipeline_core::processors::OutputPort; +use databend_common_pipeline_core::processors::Processor; +use databend_common_pipeline_core::processors::ResizeProcessor; #[tokio::test(flavor = "multi_thread", worker_threads = 1)] async fn test_resize_output_finish() -> Result<()> { diff --git a/src/query/pipeline/core/tests/it/pipelines/processors/shuffle.rs b/src/query/pipeline/core/tests/it/pipelines/processors/shuffle.rs index 515b8a45bad4..980d775231e9 100644 --- a/src/query/pipeline/core/tests/it/pipelines/processors/shuffle.rs +++ b/src/query/pipeline/core/tests/it/pipelines/processors/shuffle.rs @@ -12,16 +12,16 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_exception::Result; -use common_expression::types::Int32Type; -use common_expression::DataBlock; -use common_expression::FromData; -use common_pipeline_core::processors::connect; -use common_pipeline_core::processors::Event; -use common_pipeline_core::processors::InputPort; -use common_pipeline_core::processors::OutputPort; -use common_pipeline_core::processors::Processor; -use common_pipeline_core::processors::ShuffleProcessor; +use databend_common_exception::Result; +use databend_common_expression::types::Int32Type; +use databend_common_expression::DataBlock; +use databend_common_expression::FromData; +use databend_common_pipeline_core::processors::connect; +use databend_common_pipeline_core::processors::Event; +use databend_common_pipeline_core::processors::InputPort; +use databend_common_pipeline_core::processors::OutputPort; +use databend_common_pipeline_core::processors::Processor; +use databend_common_pipeline_core::processors::ShuffleProcessor; #[tokio::test(flavor = "multi_thread", worker_threads = 1)] async fn test_shuffle_output_finish() -> Result<()> { diff --git a/src/query/pipeline/sinks/Cargo.toml b/src/query/pipeline/sinks/Cargo.toml index f577706836e6..5ff93fbdfda5 100644 --- a/src/query/pipeline/sinks/Cargo.toml +++ b/src/query/pipeline/sinks/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "common-pipeline-sinks" +name = "databend-common-pipeline-sinks" version = { workspace = true } authors = { workspace = true } license = { workspace = true } @@ -12,11 +12,11 @@ doctest = false test = false [dependencies] -common-base = { path = "../../../common/base" } -common-catalog = { path = "../../catalog" } -common-exception = { path = "../../../common/exception" } -common-expression = { path = "../../expression" } -common-pipeline-core = { path = "../core" } +databend-common-base = { path = "../../../common/base" } +databend-common-catalog = { path = "../../catalog" } +databend-common-exception = { path = "../../../common/exception" } +databend-common-expression = { path = "../../expression" } +databend-common-pipeline-core = { path = "../core" } async-backtrace = { workspace = true } async-channel = "1.7.1" diff --git a/src/query/pipeline/sinks/src/async_mpsc_sink.rs b/src/query/pipeline/sinks/src/async_mpsc_sink.rs index c3e80efdbefe..09f857eef1ec 100644 --- a/src/query/pipeline/sinks/src/async_mpsc_sink.rs +++ b/src/query/pipeline/sinks/src/async_mpsc_sink.rs @@ -17,11 +17,11 @@ use std::sync::Arc; use async_trait::async_trait; use async_trait::unboxed_simple; -use common_exception::Result; -use common_expression::DataBlock; -use common_pipeline_core::processors::Event; -use common_pipeline_core::processors::InputPort; -use common_pipeline_core::processors::Processor; +use databend_common_exception::Result; +use databend_common_expression::DataBlock; +use databend_common_pipeline_core::processors::Event; +use databend_common_pipeline_core::processors::InputPort; +use databend_common_pipeline_core::processors::Processor; /// Sink with multiple inputs. #[async_trait] diff --git a/src/query/pipeline/sinks/src/async_sink.rs b/src/query/pipeline/sinks/src/async_sink.rs index 49810f91a7c7..47c170cb9ffb 100644 --- a/src/query/pipeline/sinks/src/async_sink.rs +++ b/src/query/pipeline/sinks/src/async_sink.rs @@ -17,14 +17,14 @@ use std::sync::Arc; use async_trait::async_trait; use async_trait::unboxed_simple; -use common_base::runtime::GlobalIORuntime; -use common_base::runtime::TrySpawn; -use common_catalog::table_context::TableContext; -use common_exception::Result; -use common_expression::DataBlock; -use common_pipeline_core::processors::Event; -use common_pipeline_core::processors::InputPort; -use common_pipeline_core::processors::Processor; +use databend_common_base::runtime::GlobalIORuntime; +use databend_common_base::runtime::TrySpawn; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::Result; +use databend_common_expression::DataBlock; +use databend_common_pipeline_core::processors::Event; +use databend_common_pipeline_core::processors::InputPort; +use databend_common_pipeline_core::processors::Processor; #[async_trait] pub trait AsyncSink: Send { diff --git a/src/query/pipeline/sinks/src/empty_sink.rs b/src/query/pipeline/sinks/src/empty_sink.rs index 38fb64d1b337..c9f98743d9ec 100644 --- a/src/query/pipeline/sinks/src/empty_sink.rs +++ b/src/query/pipeline/sinks/src/empty_sink.rs @@ -14,10 +14,10 @@ use std::sync::Arc; -use common_exception::Result; -use common_expression::DataBlock; -use common_pipeline_core::processors::InputPort; -use common_pipeline_core::processors::Processor; +use databend_common_exception::Result; +use databend_common_expression::DataBlock; +use databend_common_pipeline_core::processors::InputPort; +use databend_common_pipeline_core::processors::Processor; use super::Sink; use super::Sinker; diff --git a/src/query/pipeline/sinks/src/sync_mpsc_sink.rs b/src/query/pipeline/sinks/src/sync_mpsc_sink.rs index facc91d291bf..a79a6c6f9e7f 100644 --- a/src/query/pipeline/sinks/src/sync_mpsc_sink.rs +++ b/src/query/pipeline/sinks/src/sync_mpsc_sink.rs @@ -15,11 +15,11 @@ use std::any::Any; use std::sync::Arc; -use common_exception::Result; -use common_expression::DataBlock; -use common_pipeline_core::processors::Event; -use common_pipeline_core::processors::InputPort; -use common_pipeline_core::processors::Processor; +use databend_common_exception::Result; +use databend_common_expression::DataBlock; +use databend_common_pipeline_core::processors::Event; +use databend_common_pipeline_core::processors::InputPort; +use databend_common_pipeline_core::processors::Processor; /// Sink with multiple inputs. pub trait SyncMpscSink: Send { diff --git a/src/query/pipeline/sinks/src/sync_sink.rs b/src/query/pipeline/sinks/src/sync_sink.rs index d813765269b5..a6e0c07a7276 100644 --- a/src/query/pipeline/sinks/src/sync_sink.rs +++ b/src/query/pipeline/sinks/src/sync_sink.rs @@ -15,11 +15,11 @@ use std::any::Any; use std::sync::Arc; -use common_exception::Result; -use common_expression::DataBlock; -use common_pipeline_core::processors::Event; -use common_pipeline_core::processors::InputPort; -use common_pipeline_core::processors::Processor; +use databend_common_exception::Result; +use databend_common_expression::DataBlock; +use databend_common_pipeline_core::processors::Event; +use databend_common_pipeline_core::processors::InputPort; +use databend_common_pipeline_core::processors::Processor; pub trait Sink: Send { const NAME: &'static str; diff --git a/src/query/pipeline/sinks/src/sync_sink_sender.rs b/src/query/pipeline/sinks/src/sync_sink_sender.rs index 3a291f1ce03e..885c0e43e574 100644 --- a/src/query/pipeline/sinks/src/sync_sink_sender.rs +++ b/src/query/pipeline/sinks/src/sync_sink_sender.rs @@ -14,11 +14,11 @@ use std::sync::Arc; -use common_base::base::tokio::sync::mpsc::Sender; -use common_exception::Result; -use common_expression::DataBlock; -use common_pipeline_core::processors::InputPort; -use common_pipeline_core::processors::Processor; +use databend_common_base::base::tokio::sync::mpsc::Sender; +use databend_common_exception::Result; +use databend_common_expression::DataBlock; +use databend_common_pipeline_core::processors::InputPort; +use databend_common_pipeline_core::processors::Processor; use crate::Sink; use crate::Sinker; diff --git a/src/query/pipeline/sinks/src/union_receive_sink.rs b/src/query/pipeline/sinks/src/union_receive_sink.rs index 39fb5949b2b7..482bb98cfa84 100644 --- a/src/query/pipeline/sinks/src/union_receive_sink.rs +++ b/src/query/pipeline/sinks/src/union_receive_sink.rs @@ -17,12 +17,12 @@ use std::sync::Arc; use async_channel::Sender; use async_trait::async_trait; use async_trait::unboxed_simple; -use common_catalog::table_context::TableContext; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::DataBlock; -use common_pipeline_core::processors::InputPort; -use common_pipeline_core::processors::Processor; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::DataBlock; +use databend_common_pipeline_core::processors::InputPort; +use databend_common_pipeline_core::processors::Processor; use crate::AsyncSink; use crate::AsyncSinker; diff --git a/src/query/pipeline/sinks/tests/it/async_mpsc_sink.rs b/src/query/pipeline/sinks/tests/it/async_mpsc_sink.rs index 119805ca01e0..26f12d527e33 100644 --- a/src/query/pipeline/sinks/tests/it/async_mpsc_sink.rs +++ b/src/query/pipeline/sinks/tests/it/async_mpsc_sink.rs @@ -18,15 +18,15 @@ use std::sync::Arc; use async_trait::async_trait; use async_trait::unboxed_simple; -use common_exception::Result; -use common_expression::DataBlock; -use common_pipeline_core::processors::connect; -use common_pipeline_core::processors::Event; -use common_pipeline_core::processors::InputPort; -use common_pipeline_core::processors::OutputPort; -use common_pipeline_core::processors::Processor; -use common_pipeline_sinks::AsyncMpscSink; -use common_pipeline_sinks::AsyncMpscSinker; +use databend_common_exception::Result; +use databend_common_expression::DataBlock; +use databend_common_pipeline_core::processors::connect; +use databend_common_pipeline_core::processors::Event; +use databend_common_pipeline_core::processors::InputPort; +use databend_common_pipeline_core::processors::OutputPort; +use databend_common_pipeline_core::processors::Processor; +use databend_common_pipeline_sinks::AsyncMpscSink; +use databend_common_pipeline_sinks::AsyncMpscSinker; struct TestSink { count: Arc, diff --git a/src/query/pipeline/sinks/tests/it/sync_mpsc_sink.rs b/src/query/pipeline/sinks/tests/it/sync_mpsc_sink.rs index 5e6cf814b610..a4fedfabd815 100644 --- a/src/query/pipeline/sinks/tests/it/sync_mpsc_sink.rs +++ b/src/query/pipeline/sinks/tests/it/sync_mpsc_sink.rs @@ -16,15 +16,15 @@ use std::sync::atomic::AtomicUsize; use std::sync::atomic::Ordering; use std::sync::Arc; -use common_exception::Result; -use common_expression::DataBlock; -use common_pipeline_core::processors::connect; -use common_pipeline_core::processors::Event; -use common_pipeline_core::processors::InputPort; -use common_pipeline_core::processors::OutputPort; -use common_pipeline_core::processors::Processor; -use common_pipeline_sinks::SyncMpscSink; -use common_pipeline_sinks::SyncMpscSinker; +use databend_common_exception::Result; +use databend_common_expression::DataBlock; +use databend_common_pipeline_core::processors::connect; +use databend_common_pipeline_core::processors::Event; +use databend_common_pipeline_core::processors::InputPort; +use databend_common_pipeline_core::processors::OutputPort; +use databend_common_pipeline_core::processors::Processor; +use databend_common_pipeline_sinks::SyncMpscSink; +use databend_common_pipeline_sinks::SyncMpscSinker; struct TestSink { count: Arc, diff --git a/src/query/pipeline/sources/Cargo.toml b/src/query/pipeline/sources/Cargo.toml index 77c8445fc3a8..74f8be6ffe63 100644 --- a/src/query/pipeline/sources/Cargo.toml +++ b/src/query/pipeline/sources/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "common-pipeline-sources" +name = "databend-common-pipeline-sources" version = "0.1.0" edition = "2021" @@ -14,18 +14,18 @@ ignored = ["xml-rs"] [dependencies] async-backtrace = { workspace = true } async-channel = "1.7.1" -common-arrow = { path = "../../../common/arrow" } -common-base = { path = "../../../common/base" } -common-catalog = { path = "../../catalog" } -common-compress = { path = "../../../common/compress" } -common-exception = { path = "../../../common/exception" } -common-expression = { path = "../../expression" } -common-formats = { path = "../../formats" } -common-io = { path = "../../../common/io" } -common-meta-app = { path = "../../../meta/app" } -common-pipeline-core = { path = "../core" } -common-settings = { path = "../../settings" } -common-storage = { path = "../../../common/storage" } +databend-common-arrow = { path = "../../../common/arrow" } +databend-common-base = { path = "../../../common/base" } +databend-common-catalog = { path = "../../catalog" } +databend-common-compress = { path = "../../../common/compress" } +databend-common-exception = { path = "../../../common/exception" } +databend-common-expression = { path = "../../expression" } +databend-common-formats = { path = "../../formats" } +databend-common-io = { path = "../../../common/io" } +databend-common-meta-app = { path = "../../../meta/app" } +databend-common-pipeline-core = { path = "../core" } +databend-common-settings = { path = "../../settings" } +databend-common-storage = { path = "../../../common/storage" } async-trait = { workspace = true } bstr = "1.0.1" diff --git a/src/query/pipeline/sources/src/async_source.rs b/src/query/pipeline/sources/src/async_source.rs index 62dd94aeb6e8..ca1b651a0c2e 100644 --- a/src/query/pipeline/sources/src/async_source.rs +++ b/src/query/pipeline/sources/src/async_source.rs @@ -15,16 +15,16 @@ use std::any::Any; use std::sync::Arc; -use common_base::base::Progress; -use common_base::base::ProgressValues; -use common_catalog::table_context::TableContext; -use common_exception::Result; -use common_expression::DataBlock; -use common_pipeline_core::processors::Event; -use common_pipeline_core::processors::EventCause; -use common_pipeline_core::processors::OutputPort; -use common_pipeline_core::processors::Processor; -use common_pipeline_core::processors::ProcessorPtr; +use databend_common_base::base::Progress; +use databend_common_base::base::ProgressValues; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::Result; +use databend_common_expression::DataBlock; +use databend_common_pipeline_core::processors::Event; +use databend_common_pipeline_core::processors::EventCause; +use databend_common_pipeline_core::processors::OutputPort; +use databend_common_pipeline_core::processors::Processor; +use databend_common_pipeline_core::processors::ProcessorPtr; #[async_trait::async_trait] pub trait AsyncSource: Send { diff --git a/src/query/pipeline/sources/src/blocks_source.rs b/src/query/pipeline/sources/src/blocks_source.rs index 28727ae4394d..3ddc8b676ccc 100644 --- a/src/query/pipeline/sources/src/blocks_source.rs +++ b/src/query/pipeline/sources/src/blocks_source.rs @@ -15,11 +15,11 @@ use std::collections::VecDeque; use std::sync::Arc; -use common_catalog::table_context::TableContext; -use common_exception::Result; -use common_expression::DataBlock; -use common_pipeline_core::processors::OutputPort; -use common_pipeline_core::processors::ProcessorPtr; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::Result; +use databend_common_expression::DataBlock; +use databend_common_pipeline_core::processors::OutputPort; +use databend_common_pipeline_core::processors::ProcessorPtr; use parking_lot::Mutex; use crate::SyncSource; diff --git a/src/query/pipeline/sources/src/empty_source.rs b/src/query/pipeline/sources/src/empty_source.rs index 4e2aab275e91..c618c4063091 100644 --- a/src/query/pipeline/sources/src/empty_source.rs +++ b/src/query/pipeline/sources/src/empty_source.rs @@ -15,11 +15,11 @@ use std::any::Any; use std::sync::Arc; -use common_exception::Result; -use common_pipeline_core::processors::Event; -use common_pipeline_core::processors::OutputPort; -use common_pipeline_core::processors::Processor; -use common_pipeline_core::processors::ProcessorPtr; +use databend_common_exception::Result; +use databend_common_pipeline_core::processors::Event; +use databend_common_pipeline_core::processors::OutputPort; +use databend_common_pipeline_core::processors::Processor; +use databend_common_pipeline_core::processors::ProcessorPtr; pub struct EmptySource { output: Arc, diff --git a/src/query/pipeline/sources/src/input_formats/beyond_end_reader.rs b/src/query/pipeline/sources/src/input_formats/beyond_end_reader.rs index 17409bd01998..05e5913ee886 100644 --- a/src/query/pipeline/sources/src/input_formats/beyond_end_reader.rs +++ b/src/query/pipeline/sources/src/input_formats/beyond_end_reader.rs @@ -15,8 +15,8 @@ use std::sync::Arc; use bstr::ByteSlice; -use common_exception::ErrorCode; -use common_exception::Result; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; use futures_util::AsyncReadExt; use log::debug; diff --git a/src/query/pipeline/sources/src/input_formats/error_utils.rs b/src/query/pipeline/sources/src/input_formats/error_utils.rs index 355d615e44a0..4164fef77e8c 100644 --- a/src/query/pipeline/sources/src/input_formats/error_utils.rs +++ b/src/query/pipeline/sources/src/input_formats/error_utils.rs @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_expression::TableSchemaRef; -use common_storage::FileParseError; +use databend_common_expression::TableSchemaRef; +use databend_common_storage::FileParseError; pub fn truncate_column_data(s: String) -> String { if s.len() > 100 { diff --git a/src/query/pipeline/sources/src/input_formats/impls/input_format_csv.rs b/src/query/pipeline/sources/src/input_formats/impls/input_format_csv.rs index 295704706b22..b99ada608202 100644 --- a/src/query/pipeline/sources/src/input_formats/impls/input_format_csv.rs +++ b/src/query/pipeline/sources/src/input_formats/impls/input_format_csv.rs @@ -15,21 +15,21 @@ use std::mem; use std::sync::Arc; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::ColumnBuilder; -use common_expression::Scalar; -use common_expression::TableSchemaRef; -use common_formats::FieldDecoder; -use common_formats::FileFormatOptionsExt; -use common_formats::RecordDelimiter; -use common_formats::SeparatedTextDecoder; -use common_meta_app::principal::CsvFileFormatParams; -use common_meta_app::principal::FileFormatParams; -use common_meta_app::principal::StageFileFormatType; -use common_storage::FileParseError; -use common_storage::FileStatus; use csv_core::ReadRecordResult; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::ColumnBuilder; +use databend_common_expression::Scalar; +use databend_common_expression::TableSchemaRef; +use databend_common_formats::FieldDecoder; +use databend_common_formats::FileFormatOptionsExt; +use databend_common_formats::RecordDelimiter; +use databend_common_formats::SeparatedTextDecoder; +use databend_common_meta_app::principal::CsvFileFormatParams; +use databend_common_meta_app::principal::FileFormatParams; +use databend_common_meta_app::principal::StageFileFormatType; +use databend_common_storage::FileParseError; +use databend_common_storage::FileStatus; use log::debug; use crate::input_formats::error_utils::get_decode_error_by_pos; diff --git a/src/query/pipeline/sources/src/input_formats/impls/input_format_ndjson.rs b/src/query/pipeline/sources/src/input_formats/impls/input_format_ndjson.rs index 447f59dc9785..7e6be365044f 100644 --- a/src/query/pipeline/sources/src/input_formats/impls/input_format_ndjson.rs +++ b/src/query/pipeline/sources/src/input_formats/impls/input_format_ndjson.rs @@ -15,17 +15,17 @@ use std::sync::Arc; use bstr::ByteSlice; -use common_exception::Result; -use common_expression::ColumnBuilder; -use common_expression::Scalar; -use common_expression::TableSchemaRef; -use common_formats::FieldDecoder; -use common_formats::FieldJsonAstDecoder; -use common_formats::FileFormatOptionsExt; -use common_meta_app::principal::FileFormatParams; -use common_meta_app::principal::JsonNullAs; -use common_meta_app::principal::StageFileFormatType; -use common_storage::FileParseError; +use databend_common_exception::Result; +use databend_common_expression::ColumnBuilder; +use databend_common_expression::Scalar; +use databend_common_expression::TableSchemaRef; +use databend_common_formats::FieldDecoder; +use databend_common_formats::FieldJsonAstDecoder; +use databend_common_formats::FileFormatOptionsExt; +use databend_common_meta_app::principal::FileFormatParams; +use databend_common_meta_app::principal::JsonNullAs; +use databend_common_meta_app::principal::StageFileFormatType; +use databend_common_storage::FileParseError; use crate::input_formats::error_utils::truncate_column_data; use crate::input_formats::AligningStateRowDelimiter; diff --git a/src/query/pipeline/sources/src/input_formats/impls/input_format_parquet.rs b/src/query/pipeline/sources/src/input_formats/impls/input_format_parquet.rs index 833df9f8f1f1..9d6259f15a09 100644 --- a/src/query/pipeline/sources/src/input_formats/impls/input_format_parquet.rs +++ b/src/query/pipeline/sources/src/input_formats/impls/input_format_parquet.rs @@ -22,27 +22,27 @@ use std::io::Seek; use std::mem; use std::sync::Arc; -use common_arrow::arrow::array::Array; -use common_arrow::arrow::chunk::Chunk as ArrowChunk; -use common_arrow::arrow::datatypes::Field; -use common_arrow::arrow::io::parquet::read::read_columns; -use common_arrow::arrow::io::parquet::read::to_deserializer; -use common_arrow::arrow::io::parquet::read::RowGroupDeserializer; -use common_arrow::parquet::metadata::ColumnChunkMetaData; -use common_arrow::parquet::metadata::RowGroupMetaData; -use common_arrow::parquet::read::read_metadata; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::BlockMetaInfo; -use common_expression::DataBlock; -use common_expression::DataField; -use common_expression::DataSchema; -use common_expression::TableSchemaRef; -use common_meta_app::principal::StageInfo; -use common_pipeline_core::Pipeline; -use common_settings::Settings; -use common_storage::infer_schema_with_extension; -use common_storage::StageFileInfo; +use databend_common_arrow::arrow::array::Array; +use databend_common_arrow::arrow::chunk::Chunk as ArrowChunk; +use databend_common_arrow::arrow::datatypes::Field; +use databend_common_arrow::arrow::io::parquet::read::read_columns; +use databend_common_arrow::arrow::io::parquet::read::to_deserializer; +use databend_common_arrow::arrow::io::parquet::read::RowGroupDeserializer; +use databend_common_arrow::parquet::metadata::ColumnChunkMetaData; +use databend_common_arrow::parquet::metadata::RowGroupMetaData; +use databend_common_arrow::parquet::read::read_metadata; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::BlockMetaInfo; +use databend_common_expression::DataBlock; +use databend_common_expression::DataField; +use databend_common_expression::DataSchema; +use databend_common_expression::TableSchemaRef; +use databend_common_meta_app::principal::StageInfo; +use databend_common_pipeline_core::Pipeline; +use databend_common_settings::Settings; +use databend_common_storage::infer_schema_with_extension; +use databend_common_storage::StageFileInfo; use futures::AsyncRead; use futures::AsyncReadExt; use futures::AsyncSeek; diff --git a/src/query/pipeline/sources/src/input_formats/impls/input_format_tsv.rs b/src/query/pipeline/sources/src/input_formats/impls/input_format_tsv.rs index 9650e07360bd..8347953b1141 100644 --- a/src/query/pipeline/sources/src/input_formats/impls/input_format_tsv.rs +++ b/src/query/pipeline/sources/src/input_formats/impls/input_format_tsv.rs @@ -15,18 +15,18 @@ use std::io::Cursor; use std::sync::Arc; -use common_exception::Result; -use common_expression::ColumnBuilder; -use common_expression::Scalar; -use common_expression::TableSchemaRef; -use common_formats::FieldDecoder; -use common_formats::FileFormatOptionsExt; -use common_formats::SeparatedTextDecoder; -use common_io::cursor_ext::BufferReadStringExt; -use common_meta_app::principal::FileFormatParams; -use common_meta_app::principal::StageFileFormatType; -use common_meta_app::principal::TsvFileFormatParams; -use common_storage::FileParseError; +use databend_common_exception::Result; +use databend_common_expression::ColumnBuilder; +use databend_common_expression::Scalar; +use databend_common_expression::TableSchemaRef; +use databend_common_formats::FieldDecoder; +use databend_common_formats::FileFormatOptionsExt; +use databend_common_formats::SeparatedTextDecoder; +use databend_common_io::cursor_ext::BufferReadStringExt; +use databend_common_meta_app::principal::FileFormatParams; +use databend_common_meta_app::principal::StageFileFormatType; +use databend_common_meta_app::principal::TsvFileFormatParams; +use databend_common_storage::FileParseError; use log::debug; use crate::input_formats::error_utils::get_decode_error_by_pos; diff --git a/src/query/pipeline/sources/src/input_formats/impls/input_format_xml.rs b/src/query/pipeline/sources/src/input_formats/impls/input_format_xml.rs index 71edc5333c73..554b212d8480 100644 --- a/src/query/pipeline/sources/src/input_formats/impls/input_format_xml.rs +++ b/src/query/pipeline/sources/src/input_formats/impls/input_format_xml.rs @@ -16,17 +16,17 @@ use std::collections::HashMap; use std::io::Cursor; use std::sync::Arc; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::ColumnBuilder; -use common_expression::TableSchemaRef; -use common_formats::FieldDecoder; -use common_formats::FileFormatOptionsExt; -use common_formats::SeparatedTextDecoder; -use common_meta_app::principal::FileFormatParams; -use common_meta_app::principal::StageFileFormatType; -use common_meta_app::principal::XmlFileFormatParams; -use common_storage::FileParseError; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::ColumnBuilder; +use databend_common_expression::TableSchemaRef; +use databend_common_formats::FieldDecoder; +use databend_common_formats::FileFormatOptionsExt; +use databend_common_formats::SeparatedTextDecoder; +use databend_common_meta_app::principal::FileFormatParams; +use databend_common_meta_app::principal::StageFileFormatType; +use databend_common_meta_app::principal::XmlFileFormatParams; +use databend_common_storage::FileParseError; use xml::reader::XmlEvent; use xml::ParserConfig; diff --git a/src/query/pipeline/sources/src/input_formats/input_context.rs b/src/query/pipeline/sources/src/input_formats/input_context.rs index 80f1422ea995..054160496b1a 100644 --- a/src/query/pipeline/sources/src/input_formats/input_context.rs +++ b/src/query/pipeline/sources/src/input_formats/input_context.rs @@ -21,28 +21,28 @@ use std::sync::atomic::Ordering; use std::sync::Arc; use std::sync::Mutex; -use common_base::base::tokio::sync::mpsc::Receiver; -use common_base::base::Progress; -use common_catalog::table_context::TableContext; -use common_compress::CompressAlgorithm; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::BlockThresholds; -use common_expression::ColumnBuilder; -use common_expression::DataSchema; -use common_expression::Scalar; -use common_expression::TableSchemaRef; -use common_formats::ClickhouseFormatType; -use common_formats::FileFormatOptionsExt; -use common_meta_app::principal::FileFormatParams; -use common_meta_app::principal::OnErrorMode; -use common_meta_app::principal::StageFileCompression; -use common_meta_app::principal::StageInfo; -use common_pipeline_core::InputError; -use common_settings::Settings; -use common_storage::FileParseError; -use common_storage::FileStatus; use dashmap::DashMap; +use databend_common_base::base::tokio::sync::mpsc::Receiver; +use databend_common_base::base::Progress; +use databend_common_catalog::table_context::TableContext; +use databend_common_compress::CompressAlgorithm; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::BlockThresholds; +use databend_common_expression::ColumnBuilder; +use databend_common_expression::DataSchema; +use databend_common_expression::Scalar; +use databend_common_expression::TableSchemaRef; +use databend_common_formats::ClickhouseFormatType; +use databend_common_formats::FileFormatOptionsExt; +use databend_common_meta_app::principal::FileFormatParams; +use databend_common_meta_app::principal::OnErrorMode; +use databend_common_meta_app::principal::StageFileCompression; +use databend_common_meta_app::principal::StageInfo; +use databend_common_pipeline_core::InputError; +use databend_common_settings::Settings; +use databend_common_storage::FileParseError; +use databend_common_storage::FileStatus; use opendal::Operator; use crate::input_formats::impls::InputFormatCSV; diff --git a/src/query/pipeline/sources/src/input_formats/input_format.rs b/src/query/pipeline/sources/src/input_formats/input_format.rs index f8cc9ec78891..49835a9ffd08 100644 --- a/src/query/pipeline/sources/src/input_formats/input_format.rs +++ b/src/query/pipeline/sources/src/input_formats/input_format.rs @@ -14,11 +14,11 @@ use std::sync::Arc; -use common_exception::Result; -use common_meta_app::principal::StageInfo; -use common_pipeline_core::Pipeline; -use common_settings::Settings; -use common_storage::StageFileInfo; +use databend_common_exception::Result; +use databend_common_meta_app::principal::StageInfo; +use databend_common_pipeline_core::Pipeline; +use databend_common_settings::Settings; +use databend_common_storage::StageFileInfo; use opendal::Operator; use crate::input_formats::InputContext; diff --git a/src/query/pipeline/sources/src/input_formats/input_format_text.rs b/src/query/pipeline/sources/src/input_formats/input_format_text.rs index 379937457e99..c882f25ad219 100644 --- a/src/query/pipeline/sources/src/input_formats/input_format_text.rs +++ b/src/query/pipeline/sources/src/input_formats/input_format_text.rs @@ -16,25 +16,25 @@ use std::marker::PhantomData; use std::mem; use std::sync::Arc; -use common_compress::DecompressDecoder; -use common_compress::DecompressState; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::types::string::StringColumnBuilder; -use common_expression::BlockMetaInfo; -use common_expression::Column; -use common_expression::ColumnBuilder; -use common_expression::DataBlock; -use common_formats::FieldDecoder; -use common_formats::FileFormatOptionsExt; -use common_meta_app::principal::FileFormatParams; -use common_meta_app::principal::OnErrorMode; -use common_meta_app::principal::StageFileFormatType; -use common_meta_app::principal::StageInfo; -use common_pipeline_core::Pipeline; -use common_settings::Settings; -use common_storage::FileStatus; -use common_storage::StageFileInfo; +use databend_common_compress::DecompressDecoder; +use databend_common_compress::DecompressState; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::types::string::StringColumnBuilder; +use databend_common_expression::BlockMetaInfo; +use databend_common_expression::Column; +use databend_common_expression::ColumnBuilder; +use databend_common_expression::DataBlock; +use databend_common_formats::FieldDecoder; +use databend_common_formats::FileFormatOptionsExt; +use databend_common_meta_app::principal::FileFormatParams; +use databend_common_meta_app::principal::OnErrorMode; +use databend_common_meta_app::principal::StageFileFormatType; +use databend_common_meta_app::principal::StageInfo; +use databend_common_pipeline_core::Pipeline; +use databend_common_settings::Settings; +use databend_common_storage::FileStatus; +use databend_common_storage::StageFileInfo; use log::debug; use opendal::Operator; diff --git a/src/query/pipeline/sources/src/input_formats/input_pipeline.rs b/src/query/pipeline/sources/src/input_formats/input_pipeline.rs index 04ef6d87eea8..5eb45ed580dd 100644 --- a/src/query/pipeline/sources/src/input_formats/input_pipeline.rs +++ b/src/query/pipeline/sources/src/input_formats/input_pipeline.rs @@ -15,17 +15,17 @@ use std::fmt::Debug; use std::sync::Arc; -use common_base::base::tokio; -use common_base::base::tokio::sync::mpsc::Receiver; -use common_base::base::tokio::sync::mpsc::Sender; -use common_base::runtime::GlobalIORuntime; -use common_base::runtime::TrySpawn; -use common_compress::CompressAlgorithm; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::BlockMetaInfo; -use common_expression::DataBlock; -use common_pipeline_core::Pipeline; +use databend_common_base::base::tokio; +use databend_common_base::base::tokio::sync::mpsc::Receiver; +use databend_common_base::base::tokio::sync::mpsc::Sender; +use databend_common_base::runtime::GlobalIORuntime; +use databend_common_base::runtime::TrySpawn; +use databend_common_compress::CompressAlgorithm; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::BlockMetaInfo; +use databend_common_expression::DataBlock; +use databend_common_pipeline_core::Pipeline; use futures::AsyncRead; use futures_util::AsyncReadExt; use log::debug; diff --git a/src/query/pipeline/sources/src/input_formats/input_split.rs b/src/query/pipeline/sources/src/input_formats/input_split.rs index fbebde4533f4..97291fe43884 100644 --- a/src/query/pipeline/sources/src/input_formats/input_split.rs +++ b/src/query/pipeline/sources/src/input_formats/input_split.rs @@ -21,8 +21,8 @@ use std::hash::Hash; use std::hash::Hasher; use std::sync::Arc; -use common_catalog::plan::PartInfo; -use common_compress::CompressAlgorithm; +use databend_common_catalog::plan::PartInfo; +use databend_common_compress::CompressAlgorithm; #[typetag::serde(tag = "type")] pub trait DynData: Send + Sync + 'static { diff --git a/src/query/pipeline/sources/src/input_formats/source_aligner.rs b/src/query/pipeline/sources/src/input_formats/source_aligner.rs index 77b4c84baca1..c7dde0138b13 100644 --- a/src/query/pipeline/sources/src/input_formats/source_aligner.rs +++ b/src/query/pipeline/sources/src/input_formats/source_aligner.rs @@ -17,15 +17,15 @@ use std::collections::VecDeque; use std::mem; use std::sync::Arc; -use common_base::base::tokio::sync::mpsc::Receiver; -use common_base::base::ProgressValues; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::DataBlock; -use common_pipeline_core::processors::Event; -use common_pipeline_core::processors::OutputPort; -use common_pipeline_core::processors::Processor; -use common_pipeline_core::processors::ProcessorPtr; +use databend_common_base::base::tokio::sync::mpsc::Receiver; +use databend_common_base::base::ProgressValues; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::DataBlock; +use databend_common_pipeline_core::processors::Event; +use databend_common_pipeline_core::processors::OutputPort; +use databend_common_pipeline_core::processors::Processor; +use databend_common_pipeline_core::processors::ProcessorPtr; use log::debug; use crate::input_formats::input_pipeline::AligningStateTrait; diff --git a/src/query/pipeline/sources/src/input_formats/transform_deserializer.rs b/src/query/pipeline/sources/src/input_formats/transform_deserializer.rs index 35c0f2e662f8..4d4dff5e7ad5 100644 --- a/src/query/pipeline/sources/src/input_formats/transform_deserializer.rs +++ b/src/query/pipeline/sources/src/input_formats/transform_deserializer.rs @@ -16,14 +16,14 @@ use std::any::Any; use std::collections::VecDeque; use std::sync::Arc; -use common_exception::Result; -use common_expression::BlockMetaInfoDowncast; -use common_expression::DataBlock; -use common_pipeline_core::processors::Event; -use common_pipeline_core::processors::InputPort; -use common_pipeline_core::processors::OutputPort; -use common_pipeline_core::processors::Processor; -use common_pipeline_core::processors::ProcessorPtr; +use databend_common_exception::Result; +use databend_common_expression::BlockMetaInfoDowncast; +use databend_common_expression::DataBlock; +use databend_common_pipeline_core::processors::Event; +use databend_common_pipeline_core::processors::InputPort; +use databend_common_pipeline_core::processors::OutputPort; +use databend_common_pipeline_core::processors::Processor; +use databend_common_pipeline_core::processors::ProcessorPtr; use log::trace; use crate::input_formats::input_pipeline::BlockBuilderTrait; diff --git a/src/query/pipeline/sources/src/one_block_source.rs b/src/query/pipeline/sources/src/one_block_source.rs index 9b2a34576219..43914a6b53cf 100644 --- a/src/query/pipeline/sources/src/one_block_source.rs +++ b/src/query/pipeline/sources/src/one_block_source.rs @@ -15,12 +15,12 @@ use std::any::Any; use std::sync::Arc; -use common_exception::Result; -use common_expression::DataBlock; -use common_pipeline_core::processors::Event; -use common_pipeline_core::processors::OutputPort; -use common_pipeline_core::processors::Processor; -use common_pipeline_core::processors::ProcessorPtr; +use databend_common_exception::Result; +use databend_common_expression::DataBlock; +use databend_common_pipeline_core::processors::Event; +use databend_common_pipeline_core::processors::OutputPort; +use databend_common_pipeline_core::processors::Processor; +use databend_common_pipeline_core::processors::ProcessorPtr; pub struct OneBlockSource { output: Arc, diff --git a/src/query/pipeline/sources/src/stream_source.rs b/src/query/pipeline/sources/src/stream_source.rs index c8801e410a60..a843e0757673 100644 --- a/src/query/pipeline/sources/src/stream_source.rs +++ b/src/query/pipeline/sources/src/stream_source.rs @@ -14,13 +14,13 @@ use std::sync::Arc; -use common_catalog::table_context::TableContext; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::DataBlock; -use common_expression::SendableDataBlockStream; -use common_pipeline_core::processors::OutputPort; -use common_pipeline_core::processors::ProcessorPtr; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::DataBlock; +use databend_common_expression::SendableDataBlockStream; +use databend_common_pipeline_core::processors::OutputPort; +use databend_common_pipeline_core::processors::ProcessorPtr; use futures::StreamExt; use crate::AsyncSource; diff --git a/src/query/pipeline/sources/src/sync_source.rs b/src/query/pipeline/sources/src/sync_source.rs index 6805697b17a5..c35907efff3d 100644 --- a/src/query/pipeline/sources/src/sync_source.rs +++ b/src/query/pipeline/sources/src/sync_source.rs @@ -15,15 +15,15 @@ use std::any::Any; use std::sync::Arc; -use common_base::base::Progress; -use common_base::base::ProgressValues; -use common_catalog::table_context::TableContext; -use common_exception::Result; -use common_expression::DataBlock; -use common_pipeline_core::processors::Event; -use common_pipeline_core::processors::OutputPort; -use common_pipeline_core::processors::Processor; -use common_pipeline_core::processors::ProcessorPtr; +use databend_common_base::base::Progress; +use databend_common_base::base::ProgressValues; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::Result; +use databend_common_expression::DataBlock; +use databend_common_pipeline_core::processors::Event; +use databend_common_pipeline_core::processors::OutputPort; +use databend_common_pipeline_core::processors::Processor; +use databend_common_pipeline_core::processors::ProcessorPtr; /// Synchronized source. such as: /// - Memory storage engine. diff --git a/src/query/pipeline/sources/src/sync_source_receiver.rs b/src/query/pipeline/sources/src/sync_source_receiver.rs index 15d9144938ca..73c245c32414 100644 --- a/src/query/pipeline/sources/src/sync_source_receiver.rs +++ b/src/query/pipeline/sources/src/sync_source_receiver.rs @@ -14,12 +14,12 @@ use std::sync::Arc; -use common_base::base::tokio::sync::mpsc::Receiver; -use common_catalog::table_context::TableContext; -use common_exception::Result; -use common_expression::DataBlock; -use common_pipeline_core::processors::OutputPort; -use common_pipeline_core::processors::ProcessorPtr; +use databend_common_base::base::tokio::sync::mpsc::Receiver; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::Result; +use databend_common_expression::DataBlock; +use databend_common_pipeline_core::processors::OutputPort; +use databend_common_pipeline_core::processors::ProcessorPtr; use crate::SyncSource; use crate::SyncSourcer; diff --git a/src/query/pipeline/sources/tests/it/sources/input_formats/split.rs b/src/query/pipeline/sources/tests/it/sources/input_formats/split.rs index 608dcebb4376..406a23f640c8 100644 --- a/src/query/pipeline/sources/tests/it/sources/input_formats/split.rs +++ b/src/query/pipeline/sources/tests/it/sources/input_formats/split.rs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_pipeline_sources::input_formats::split_by_size; +use databend_common_pipeline_sources::input_formats::split_by_size; #[test] fn test_split_by_size() { diff --git a/src/query/pipeline/transforms/Cargo.toml b/src/query/pipeline/transforms/Cargo.toml index a3339dbab386..0630c15e4654 100644 --- a/src/query/pipeline/transforms/Cargo.toml +++ b/src/query/pipeline/transforms/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "common-pipeline-transforms" +name = "databend-common-pipeline-transforms" version = "0.1.0" edition = "2021" @@ -9,11 +9,11 @@ doctest = false test = false [dependencies] -common-base = { path = "../../../common/base" } -common-exception = { path = "../../../common/exception" } -common-expression = { path = "../../expression" } -common-pipeline-core = { path = "../core" } -common-profile = { path = "../../profile" } +databend-common-base = { path = "../../../common/base" } +databend-common-exception = { path = "../../../common/exception" } +databend-common-expression = { path = "../../expression" } +databend-common-pipeline-core = { path = "../core" } +databend-common-profile = { path = "../../profile" } async-backtrace = { workspace = true } async-trait = { workspace = true } diff --git a/src/query/pipeline/transforms/src/processors/profile_wrapper.rs b/src/query/pipeline/transforms/src/processors/profile_wrapper.rs index 5d59b0e32ccd..51cc4388ab27 100644 --- a/src/query/pipeline/transforms/src/processors/profile_wrapper.rs +++ b/src/query/pipeline/transforms/src/processors/profile_wrapper.rs @@ -15,14 +15,14 @@ use std::sync::Arc; use std::time::Instant; -use common_exception::Result; -use common_expression::DataBlock; -use common_pipeline_core::processors::Event; -use common_pipeline_core::processors::InputPort; -use common_pipeline_core::processors::OutputPort; -use common_pipeline_core::processors::Processor; -use common_profile::ProcessorProfile; -use common_profile::SharedProcessorProfiles; +use databend_common_exception::Result; +use databend_common_expression::DataBlock; +use databend_common_pipeline_core::processors::Event; +use databend_common_pipeline_core::processors::InputPort; +use databend_common_pipeline_core::processors::OutputPort; +use databend_common_pipeline_core::processors::Processor; +use databend_common_profile::ProcessorProfile; +use databend_common_profile::SharedProcessorProfiles; use crate::processors::transforms::Transform; use crate::processors::transforms::Transformer; diff --git a/src/query/pipeline/transforms/src/processors/transforms/sort/rows/common.rs b/src/query/pipeline/transforms/src/processors/transforms/sort/rows/common.rs index e580034e127a..6405fb0b30a6 100644 --- a/src/query/pipeline/transforms/src/processors/transforms/sort/rows/common.rs +++ b/src/query/pipeline/transforms/src/processors/transforms/sort/rows/common.rs @@ -12,20 +12,20 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_exception::Result; -use common_expression::types::nullable::NullableColumn; -use common_expression::types::string::StringColumn; -use common_expression::types::string::StringColumnBuilder; -use common_expression::types::DataType; -use common_expression::BlockEntry; -use common_expression::Column; -use common_expression::ColumnBuilder; -use common_expression::DataSchemaRef; -use common_expression::RowConverter as CommonRowConverter; -use common_expression::Scalar; -use common_expression::SortColumnDescription; -use common_expression::SortField; -use common_expression::Value; +use databend_common_exception::Result; +use databend_common_expression::types::nullable::NullableColumn; +use databend_common_expression::types::string::StringColumn; +use databend_common_expression::types::string::StringColumnBuilder; +use databend_common_expression::types::DataType; +use databend_common_expression::BlockEntry; +use databend_common_expression::Column; +use databend_common_expression::ColumnBuilder; +use databend_common_expression::DataSchemaRef; +use databend_common_expression::RowConverter as CommonRowConverter; +use databend_common_expression::Scalar; +use databend_common_expression::SortColumnDescription; +use databend_common_expression::SortField; +use databend_common_expression::Value; use jsonb::convert_to_comparable; use super::RowConverter; diff --git a/src/query/pipeline/transforms/src/processors/transforms/sort/rows/mod.rs b/src/query/pipeline/transforms/src/processors/transforms/sort/rows/mod.rs index 7683a7fbbf1b..9437f466c7e0 100644 --- a/src/query/pipeline/transforms/src/processors/transforms/sort/rows/mod.rs +++ b/src/query/pipeline/transforms/src/processors/transforms/sort/rows/mod.rs @@ -16,11 +16,11 @@ mod common; mod simple; pub use common::*; -use common_exception::Result; -use common_expression::BlockEntry; -use common_expression::Column; -use common_expression::DataSchemaRef; -use common_expression::SortColumnDescription; +use databend_common_exception::Result; +use databend_common_expression::BlockEntry; +use databend_common_expression::Column; +use databend_common_expression::DataSchemaRef; +use databend_common_expression::SortColumnDescription; pub use simple::*; /// Convert columns to rows. diff --git a/src/query/pipeline/transforms/src/processors/transforms/sort/rows/simple.rs b/src/query/pipeline/transforms/src/processors/transforms/sort/rows/simple.rs index bf02daa0309e..88367d1f9e70 100644 --- a/src/query/pipeline/transforms/src/processors/transforms/sort/rows/simple.rs +++ b/src/query/pipeline/transforms/src/processors/transforms/sort/rows/simple.rs @@ -15,19 +15,19 @@ use std::cmp::Ordering; use std::marker::PhantomData; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::types::ArgType; -use common_expression::types::DateType; -use common_expression::types::StringType; -use common_expression::types::TimestampType; -use common_expression::types::ValueType; -use common_expression::BlockEntry; -use common_expression::Column; -use common_expression::ColumnBuilder; -use common_expression::DataSchemaRef; -use common_expression::SortColumnDescription; -use common_expression::Value; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::types::ArgType; +use databend_common_expression::types::DateType; +use databend_common_expression::types::StringType; +use databend_common_expression::types::TimestampType; +use databend_common_expression::types::ValueType; +use databend_common_expression::BlockEntry; +use databend_common_expression::Column; +use databend_common_expression::ColumnBuilder; +use databend_common_expression::DataSchemaRef; +use databend_common_expression::SortColumnDescription; +use databend_common_expression::Value; use super::RowConverter; use super::Rows; diff --git a/src/query/pipeline/transforms/src/processors/transforms/sort/spill.rs b/src/query/pipeline/transforms/src/processors/transforms/sort/spill.rs index 28681ed222e5..6fe14fa37c6e 100644 --- a/src/query/pipeline/transforms/src/processors/transforms/sort/spill.rs +++ b/src/query/pipeline/transforms/src/processors/transforms/sort/spill.rs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_expression::BlockMetaInfo; +use databend_common_expression::BlockMetaInfo; /// Mark a partially sorted [`DataBlock`] as a block needs to be spilled. #[derive(serde::Serialize, serde::Deserialize, Debug)] diff --git a/src/query/pipeline/transforms/src/processors/transforms/transform.rs b/src/query/pipeline/transforms/src/processors/transforms/transform.rs index dd8933ae960e..ae6ec7a0b785 100644 --- a/src/query/pipeline/transforms/src/processors/transforms/transform.rs +++ b/src/query/pipeline/transforms/src/processors/transforms/transform.rs @@ -16,15 +16,15 @@ use std::any::Any; use std::marker::PhantomData; use std::sync::Arc; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::BlockMetaInfo; -use common_expression::BlockMetaInfoDowncast; -use common_expression::DataBlock; -use common_pipeline_core::processors::Event; -use common_pipeline_core::processors::InputPort; -use common_pipeline_core::processors::OutputPort; -use common_pipeline_core::processors::Processor; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::BlockMetaInfo; +use databend_common_expression::BlockMetaInfoDowncast; +use databend_common_expression::DataBlock; +use databend_common_pipeline_core::processors::Event; +use databend_common_pipeline_core::processors::InputPort; +use databend_common_pipeline_core::processors::OutputPort; +use databend_common_pipeline_core::processors::Processor; // TODO: maybe we also need async transform for `SELECT sleep(1)`? pub trait Transform: Send { diff --git a/src/query/pipeline/transforms/src/processors/transforms/transform_accumulating.rs b/src/query/pipeline/transforms/src/processors/transforms/transform_accumulating.rs index 36f5dfe269e4..4441612e3194 100644 --- a/src/query/pipeline/transforms/src/processors/transforms/transform_accumulating.rs +++ b/src/query/pipeline/transforms/src/processors/transforms/transform_accumulating.rs @@ -17,14 +17,14 @@ use std::collections::VecDeque; use std::marker::PhantomData; use std::sync::Arc; -use common_exception::Result; -use common_expression::BlockMetaInfo; -use common_expression::BlockMetaInfoDowncast; -use common_expression::DataBlock; -use common_pipeline_core::processors::Event; -use common_pipeline_core::processors::InputPort; -use common_pipeline_core::processors::OutputPort; -use common_pipeline_core::processors::Processor; +use databend_common_exception::Result; +use databend_common_expression::BlockMetaInfo; +use databend_common_expression::BlockMetaInfoDowncast; +use databend_common_expression::DataBlock; +use databend_common_pipeline_core::processors::Event; +use databend_common_pipeline_core::processors::InputPort; +use databend_common_pipeline_core::processors::OutputPort; +use databend_common_pipeline_core::processors::Processor; pub trait AccumulatingTransform: Send { const NAME: &'static str; diff --git a/src/query/pipeline/transforms/src/processors/transforms/transform_accumulating_async.rs b/src/query/pipeline/transforms/src/processors/transforms/transform_accumulating_async.rs index 6b2a9b0c5098..d4e4455595b9 100644 --- a/src/query/pipeline/transforms/src/processors/transforms/transform_accumulating_async.rs +++ b/src/query/pipeline/transforms/src/processors/transforms/transform_accumulating_async.rs @@ -15,12 +15,12 @@ use std::any::Any; use std::sync::Arc; -use common_exception::Result; -use common_expression::DataBlock; -use common_pipeline_core::processors::Event; -use common_pipeline_core::processors::InputPort; -use common_pipeline_core::processors::OutputPort; -use common_pipeline_core::processors::Processor; +use databend_common_exception::Result; +use databend_common_expression::DataBlock; +use databend_common_pipeline_core::processors::Event; +use databend_common_pipeline_core::processors::InputPort; +use databend_common_pipeline_core::processors::OutputPort; +use databend_common_pipeline_core::processors::Processor; #[async_trait::async_trait] pub trait AsyncAccumulatingTransform: Send { diff --git a/src/query/pipeline/transforms/src/processors/transforms/transform_async.rs b/src/query/pipeline/transforms/src/processors/transforms/transform_async.rs index b9d07b159a7c..8a27d0774ec2 100644 --- a/src/query/pipeline/transforms/src/processors/transforms/transform_async.rs +++ b/src/query/pipeline/transforms/src/processors/transforms/transform_async.rs @@ -15,12 +15,12 @@ use std::any::Any; use std::sync::Arc; -use common_exception::Result; -use common_expression::DataBlock; -use common_pipeline_core::processors::Event; -use common_pipeline_core::processors::InputPort; -use common_pipeline_core::processors::OutputPort; -use common_pipeline_core::processors::Processor; +use databend_common_exception::Result; +use databend_common_expression::DataBlock; +use databend_common_pipeline_core::processors::Event; +use databend_common_pipeline_core::processors::InputPort; +use databend_common_pipeline_core::processors::OutputPort; +use databend_common_pipeline_core::processors::Processor; #[async_trait::async_trait] pub trait AsyncTransform: Send { diff --git a/src/query/pipeline/transforms/src/processors/transforms/transform_block_compact.rs b/src/query/pipeline/transforms/src/processors/transforms/transform_block_compact.rs index 4f52ec84c5fc..68aafade5669 100644 --- a/src/query/pipeline/transforms/src/processors/transforms/transform_block_compact.rs +++ b/src/query/pipeline/transforms/src/processors/transforms/transform_block_compact.rs @@ -16,10 +16,10 @@ use std::sync::atomic::AtomicBool; use std::sync::atomic::Ordering; use std::sync::Arc; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::BlockThresholds; -use common_expression::DataBlock; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::BlockThresholds; +use databend_common_expression::DataBlock; use super::Compactor; diff --git a/src/query/pipeline/transforms/src/processors/transforms/transform_block_compact_for_copy.rs b/src/query/pipeline/transforms/src/processors/transforms/transform_block_compact_for_copy.rs index 947daf12122e..0c03bb6be334 100644 --- a/src/query/pipeline/transforms/src/processors/transforms/transform_block_compact_for_copy.rs +++ b/src/query/pipeline/transforms/src/processors/transforms/transform_block_compact_for_copy.rs @@ -16,10 +16,10 @@ use std::sync::atomic::AtomicBool; use std::sync::atomic::Ordering; use std::sync::Arc; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::BlockThresholds; -use common_expression::DataBlock; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::BlockThresholds; +use databend_common_expression::DataBlock; use super::Compactor; diff --git a/src/query/pipeline/transforms/src/processors/transforms/transform_blocking.rs b/src/query/pipeline/transforms/src/processors/transforms/transform_blocking.rs index 61d8695b8608..dd9792a83d85 100644 --- a/src/query/pipeline/transforms/src/processors/transforms/transform_blocking.rs +++ b/src/query/pipeline/transforms/src/processors/transforms/transform_blocking.rs @@ -15,12 +15,12 @@ use std::any::Any; use std::sync::Arc; -use common_exception::Result; -use common_expression::DataBlock; -use common_pipeline_core::processors::Event; -use common_pipeline_core::processors::InputPort; -use common_pipeline_core::processors::OutputPort; -use common_pipeline_core::processors::Processor; +use databend_common_exception::Result; +use databend_common_expression::DataBlock; +use databend_common_pipeline_core::processors::Event; +use databend_common_pipeline_core::processors::InputPort; +use databend_common_pipeline_core::processors::OutputPort; +use databend_common_pipeline_core::processors::Processor; pub trait BlockingTransform: Send { const NAME: &'static str; diff --git a/src/query/pipeline/transforms/src/processors/transforms/transform_compact.rs b/src/query/pipeline/transforms/src/processors/transforms/transform_compact.rs index 0cf537bb3b2c..6b7cfbfb8ffa 100644 --- a/src/query/pipeline/transforms/src/processors/transforms/transform_compact.rs +++ b/src/query/pipeline/transforms/src/processors/transforms/transform_compact.rs @@ -16,13 +16,13 @@ use std::any::Any; use std::collections::VecDeque; use std::sync::Arc; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::DataBlock; -use common_pipeline_core::processors::Event; -use common_pipeline_core::processors::InputPort; -use common_pipeline_core::processors::OutputPort; -use common_pipeline_core::processors::Processor; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::DataBlock; +use databend_common_pipeline_core::processors::Event; +use databend_common_pipeline_core::processors::InputPort; +use databend_common_pipeline_core::processors::OutputPort; +use databend_common_pipeline_core::processors::Processor; pub type Aborting = Arc bool + Send + Sync + 'static>>; diff --git a/src/query/pipeline/transforms/src/processors/transforms/transform_dummy.rs b/src/query/pipeline/transforms/src/processors/transforms/transform_dummy.rs index 59ec8f1f6e06..1dc6ee7d0d39 100644 --- a/src/query/pipeline/transforms/src/processors/transforms/transform_dummy.rs +++ b/src/query/pipeline/transforms/src/processors/transforms/transform_dummy.rs @@ -14,12 +14,12 @@ use std::sync::Arc; -use common_exception::Result; -use common_expression::DataBlock; -use common_pipeline_core::processors::InputPort; -use common_pipeline_core::processors::OutputPort; -use common_pipeline_core::processors::ProcessorPtr; -use common_pipeline_core::PipeItem; +use databend_common_exception::Result; +use databend_common_expression::DataBlock; +use databend_common_pipeline_core::processors::InputPort; +use databend_common_pipeline_core::processors::OutputPort; +use databend_common_pipeline_core::processors::ProcessorPtr; +use databend_common_pipeline_core::PipeItem; use crate::processors::transforms::Transform; use crate::processors::transforms::Transformer; diff --git a/src/query/pipeline/transforms/src/processors/transforms/transform_multi_sort_merge.rs b/src/query/pipeline/transforms/src/processors/transforms/transform_multi_sort_merge.rs index 6a39851026a4..5de1dd6daea7 100644 --- a/src/query/pipeline/transforms/src/processors/transforms/transform_multi_sort_merge.rs +++ b/src/query/pipeline/transforms/src/processors/transforms/transform_multi_sort_merge.rs @@ -18,28 +18,28 @@ use std::collections::BinaryHeap; use std::collections::VecDeque; use std::sync::Arc; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::types::string::StringColumn; -use common_expression::types::DataType; -use common_expression::types::DateType; -use common_expression::types::NumberDataType; -use common_expression::types::NumberType; -use common_expression::types::StringType; -use common_expression::types::TimestampType; -use common_expression::with_number_mapped_type; -use common_expression::DataBlock; -use common_expression::DataSchemaRef; -use common_expression::SortColumnDescription; -use common_pipeline_core::processors::Event; -use common_pipeline_core::processors::InputPort; -use common_pipeline_core::processors::OutputPort; -use common_pipeline_core::processors::Processor; -use common_pipeline_core::processors::ProcessorPtr; -use common_pipeline_core::Pipe; -use common_pipeline_core::PipeItem; -use common_pipeline_core::Pipeline; -use common_profile::SharedProcessorProfiles; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::types::string::StringColumn; +use databend_common_expression::types::DataType; +use databend_common_expression::types::DateType; +use databend_common_expression::types::NumberDataType; +use databend_common_expression::types::NumberType; +use databend_common_expression::types::StringType; +use databend_common_expression::types::TimestampType; +use databend_common_expression::with_number_mapped_type; +use databend_common_expression::DataBlock; +use databend_common_expression::DataSchemaRef; +use databend_common_expression::SortColumnDescription; +use databend_common_pipeline_core::processors::Event; +use databend_common_pipeline_core::processors::InputPort; +use databend_common_pipeline_core::processors::OutputPort; +use databend_common_pipeline_core::processors::Processor; +use databend_common_pipeline_core::processors::ProcessorPtr; +use databend_common_pipeline_core::Pipe; +use databend_common_pipeline_core::PipeItem; +use databend_common_pipeline_core::Pipeline; +use databend_common_profile::SharedProcessorProfiles; use super::sort::utils::find_bigger_child_of_root; use super::sort::Cursor; diff --git a/src/query/pipeline/transforms/src/processors/transforms/transform_sort_merge.rs b/src/query/pipeline/transforms/src/processors/transforms/transform_sort_merge.rs index 15b0e635f88e..729b279ed117 100644 --- a/src/query/pipeline/transforms/src/processors/transforms/transform_sort_merge.rs +++ b/src/query/pipeline/transforms/src/processors/transforms/transform_sort_merge.rs @@ -19,14 +19,14 @@ use std::sync::atomic::AtomicBool; use std::sync::atomic::Ordering; use std::sync::Arc; -use common_base::runtime::GLOBAL_MEM_STAT; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::row::RowConverter as CommonConverter; -use common_expression::BlockMetaInfo; -use common_expression::DataBlock; -use common_expression::DataSchemaRef; -use common_expression::SortColumnDescription; +use databend_common_base::runtime::GLOBAL_MEM_STAT; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::row::RowConverter as CommonConverter; +use databend_common_expression::BlockMetaInfo; +use databend_common_expression::DataBlock; +use databend_common_expression::DataSchemaRef; +use databend_common_expression::SortColumnDescription; use super::sort::utils::find_bigger_child_of_root; use super::sort::CommonRows; diff --git a/src/query/pipeline/transforms/src/processors/transforms/transform_sort_merge_base.rs b/src/query/pipeline/transforms/src/processors/transforms/transform_sort_merge_base.rs index 2d82eca4409a..b16b7e1eeac3 100644 --- a/src/query/pipeline/transforms/src/processors/transforms/transform_sort_merge_base.rs +++ b/src/query/pipeline/transforms/src/processors/transforms/transform_sort_merge_base.rs @@ -15,20 +15,20 @@ use std::marker::PhantomData; use std::sync::Arc; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::types::DataType; -use common_expression::types::NumberDataType; -use common_expression::types::NumberType; -use common_expression::with_number_mapped_type; -use common_expression::BlockEntry; -use common_expression::DataBlock; -use common_expression::DataSchemaRef; -use common_expression::SortColumnDescription; -use common_expression::Value; -use common_pipeline_core::processors::InputPort; -use common_pipeline_core::processors::OutputPort; -use common_pipeline_core::processors::Processor; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::types::DataType; +use databend_common_expression::types::NumberDataType; +use databend_common_expression::types::NumberType; +use databend_common_expression::with_number_mapped_type; +use databend_common_expression::BlockEntry; +use databend_common_expression::DataBlock; +use databend_common_expression::DataSchemaRef; +use databend_common_expression::SortColumnDescription; +use databend_common_expression::Value; +use databend_common_pipeline_core::processors::InputPort; +use databend_common_pipeline_core::processors::OutputPort; +use databend_common_pipeline_core::processors::Processor; use super::sort::Cursor; use super::sort::RowConverter; diff --git a/src/query/pipeline/transforms/src/processors/transforms/transform_sort_merge_limit.rs b/src/query/pipeline/transforms/src/processors/transforms/transform_sort_merge_limit.rs index a19e30bfcb5b..61ab2f4aa6f7 100644 --- a/src/query/pipeline/transforms/src/processors/transforms/transform_sort_merge_limit.rs +++ b/src/query/pipeline/transforms/src/processors/transforms/transform_sort_merge_limit.rs @@ -16,10 +16,10 @@ use std::cmp::Reverse; use std::collections::HashMap; use std::intrinsics::unlikely; -use common_base::containers::FixedHeap; -use common_exception::Result; -use common_expression::row::RowConverter as CommonConverter; -use common_expression::DataBlock; +use databend_common_base::containers::FixedHeap; +use databend_common_exception::Result; +use databend_common_expression::row::RowConverter as CommonConverter; +use databend_common_expression::DataBlock; use super::sort::CommonRows; use super::sort::Cursor; diff --git a/src/query/pipeline/transforms/src/processors/transforms/transform_sort_partial.rs b/src/query/pipeline/transforms/src/processors/transforms/transform_sort_partial.rs index 40dfe8a79c47..b8beb33b69b3 100644 --- a/src/query/pipeline/transforms/src/processors/transforms/transform_sort_partial.rs +++ b/src/query/pipeline/transforms/src/processors/transforms/transform_sort_partial.rs @@ -14,12 +14,12 @@ use std::sync::Arc; -use common_exception::Result; -use common_expression::DataBlock; -use common_expression::SortColumnDescription; -use common_pipeline_core::processors::InputPort; -use common_pipeline_core::processors::OutputPort; -use common_pipeline_core::processors::Processor; +use databend_common_exception::Result; +use databend_common_expression::DataBlock; +use databend_common_expression::SortColumnDescription; +use databend_common_pipeline_core::processors::InputPort; +use databend_common_pipeline_core::processors::OutputPort; +use databend_common_pipeline_core::processors::Processor; use crate::processors::transforms::Transform; use crate::processors::transforms::Transformer; diff --git a/src/query/profile/Cargo.toml b/src/query/profile/Cargo.toml index 1fdc5ff46cde..ed81eeee1078 100644 --- a/src/query/profile/Cargo.toml +++ b/src/query/profile/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "common-profile" +name = "databend-common-profile" version = { workspace = true } authors = { workspace = true } license = { workspace = true } @@ -11,6 +11,6 @@ doctest = false test = false [dependencies] -common-base = { path = "../../common/base" } +databend-common-base = { path = "../../common/base" } dashmap = { workspace = true } diff --git a/src/query/profile/src/mgr.rs b/src/query/profile/src/mgr.rs index 97035a2a0a69..9f3e29f02af7 100644 --- a/src/query/profile/src/mgr.rs +++ b/src/query/profile/src/mgr.rs @@ -16,9 +16,9 @@ use std::collections::VecDeque; use std::sync::Arc; use std::sync::Mutex; -use common_base::base::GlobalInstance; use dashmap::mapref::entry::Entry; use dashmap::DashMap; +use databend_common_base::base::GlobalInstance; use crate::prof::QueryProfile; diff --git a/src/query/service/Cargo.toml b/src/query/service/Cargo.toml index 8cabd4348744..3f2e4e294f51 100644 --- a/src/query/service/Cargo.toml +++ b/src/query/service/Cargo.toml @@ -13,87 +13,87 @@ test = false [features] default = ["simd", "z3-prove"] -simd = ["common-arrow/simd"] +simd = ["databend-common-arrow/simd"] -z3-prove = ["common-sql/z3-prove"] -disable_initial_exec_tls = ["common-base/disable_initial_exec_tls"] +z3-prove = ["databend-common-sql/z3-prove"] +disable_initial_exec_tls = ["databend-common-base/disable_initial_exec_tls"] -tokio-console = ["common-tracing/console", "common-base/tracing"] -memory-profiling = ["common-base/memory-profiling", "common-http/memory-profiling"] -storage-hdfs = ["opendal/services-hdfs", "common-storage/storage-hdfs"] +tokio-console = ["databend-common-tracing/console", "databend-common-base/tracing"] +memory-profiling = ["databend-common-base/memory-profiling", "databend-common-http/memory-profiling"] +storage-hdfs = ["opendal/services-hdfs", "databend-common-storage/storage-hdfs"] io-uring = [ - # "common-meta-embedded/io-uring", - "common-meta-store/io-uring", - # "common-meta-sled-store/io-uring", - # "common-meta-raft-store/io-uring", + # "databend-common-meta-embedded/io-uring", + "databend-common-meta-store/io-uring", + # "databend-common-meta-sled-store/io-uring", + # "databend-common-meta-raft-store/io-uring", ] [dependencies] # Workspace dependencies -common-arrow = { path = "../../common/arrow" } -common-ast = { path = "../ast" } -common-base = { path = "../../common/base" } -common-cache = { path = "../../common/cache" } -common-catalog = { path = "../catalog" } -common-compress = { path = "../../common/compress" } -common-config = { path = "../config" } -common-exception = { path = "../../common/exception" } -common-expression = { path = "../expression" } -common-formats = { path = "../formats" } -common-functions = { path = "../functions" } -common-grpc = { path = "../../common/grpc" } -common-hashtable = { path = "../../common/hashtable" } -common-http = { path = "../../common/http" } -common-io = { path = "../../common/io" } -common-management = { path = "../management" } -common-meta-api = { path = "../../meta/api" } -common-meta-app = { path = "../../meta/app" } +databend-common-arrow = { path = "../../common/arrow" } +databend-common-ast = { path = "../ast" } +databend-common-base = { path = "../../common/base" } +databend-common-cache = { path = "../../common/cache" } +databend-common-catalog = { path = "../catalog" } +databend-common-compress = { path = "../../common/compress" } +databend-common-config = { path = "../config" } +databend-common-exception = { path = "../../common/exception" } +databend-common-expression = { path = "../expression" } +databend-common-formats = { path = "../formats" } +databend-common-functions = { path = "../functions" } +databend-common-grpc = { path = "../../common/grpc" } +databend-common-hashtable = { path = "../../common/hashtable" } +databend-common-http = { path = "../../common/http" } +databend-common-io = { path = "../../common/io" } +databend-common-management = { path = "../management" } +databend-common-meta-api = { path = "../../meta/api" } +databend-common-meta-app = { path = "../../meta/app" } -aggregating-index = { path = "../ee_features/aggregating_index" } -background-service = { path = "../ee_features/background_service" } -common-cloud-control = { path = "../../common/cloud_control" } -common-license = { path = "../../common/license" } -common-meta-embedded = { path = "../../meta/embedded" } -common-meta-kvapi = { path = "../../meta/kvapi" } -common-meta-store = { path = "../../meta/store" } -common-meta-types = { path = "../../meta/types" } -common-metrics = { path = "../../common/metrics" } -common-openai = { path = "../../common/openai" } -common-pipeline-core = { path = "../pipeline/core" } -common-pipeline-sinks = { path = "../pipeline/sinks" } -common-pipeline-sources = { path = "../pipeline/sources" } -common-pipeline-transforms = { path = "../pipeline/transforms" } -common-profile = { path = "../profile" } -common-settings = { path = "../settings" } -common-sharing = { path = "../sharing" } -common-sql = { path = "../sql" } -common-storage = { path = "../../common/storage" } -common-storages-delta = { path = "../storages/delta" } -common-storages-factory = { path = "../storages/factory" } -common-storages-fuse = { path = "../storages/fuse" } -common-storages-hive = { path = "../storages/hive/hive" } -common-storages-iceberg = { path = "../storages/iceberg" } -common-storages-information-schema = { path = "../storages/information_schema" } -common-storages-null = { path = "../storages/null" } -common-storages-parquet = { path = "../storages/parquet" } -common-storages-result-cache = { path = "../storages/result_cache" } -common-storages-share = { path = "../storages/share" } -common-storages-stage = { path = "../storages/stage" } -common-storages-stream = { path = "../storages/stream" } -common-storages-system = { path = "../storages/system" } -common-storages-view = { path = "../storages/view" } -common-tracing = { path = "../../common/tracing" } -common-users = { path = "../users" } -data-mask-feature = { path = "../ee_features/data_mask" } +databend-common-cloud-control = { path = "../../common/cloud_control" } +databend-common-license = { path = "../../common/license" } +databend-common-meta-embedded = { path = "../../meta/embedded" } +databend-common-meta-kvapi = { path = "../../meta/kvapi" } +databend-common-meta-store = { path = "../../meta/store" } +databend-common-meta-types = { path = "../../meta/types" } +databend-common-metrics = { path = "../../common/metrics" } +databend-common-openai = { path = "../../common/openai" } +databend-common-pipeline-core = { path = "../pipeline/core" } +databend-common-pipeline-sinks = { path = "../pipeline/sinks" } +databend-common-pipeline-sources = { path = "../pipeline/sources" } +databend-common-pipeline-transforms = { path = "../pipeline/transforms" } +databend-common-profile = { path = "../profile" } +databend-common-settings = { path = "../settings" } +databend-common-sharing = { path = "../sharing" } +databend-common-sql = { path = "../sql" } +databend-common-storage = { path = "../../common/storage" } +databend-common-storages-delta = { path = "../storages/delta" } +databend-common-storages-factory = { path = "../storages/factory" } +databend-common-storages-fuse = { path = "../storages/fuse" } +databend-common-storages-hive = { path = "../storages/hive/hive" } +databend-common-storages-iceberg = { path = "../storages/iceberg" } +databend-common-storages-information-schema = { path = "../storages/information_schema" } +databend-common-storages-null = { path = "../storages/null" } +databend-common-storages-parquet = { path = "../storages/parquet" } +databend-common-storages-result-cache = { path = "../storages/result_cache" } +databend-common-storages-share = { path = "../storages/share" } +databend-common-storages-stage = { path = "../storages/stage" } +databend-common-storages-stream = { path = "../storages/stream" } +databend-common-storages-system = { path = "../storages/system" } +databend-common-storages-view = { path = "../storages/view" } +databend-common-tracing = { path = "../../common/tracing" } +databend-common-users = { path = "../users" } +databend-enterprise-aggregating-index = { path = "../ee_features/aggregating_index" } +databend-enterprise-background-service = { path = "../ee_features/background_service" } +databend-enterprise-data-mask-feature = { path = "../ee_features/data_mask" } +databend-enterprise-stream-handler = { path = "../ee_features/stream_handler" } +databend-enterprise-vacuum-handler = { path = "../ee_features/vacuum_handler" } +databend-enterprise-virtual-column = { path = "../ee_features/virtual_column" } +databend-storages-common-blocks = { path = "../storages/common/blocks" } +databend-storages-common-cache = { path = "../storages/common/cache" } +databend-storages-common-cache-manager = { path = "../storages/common/cache_manager" } +databend-storages-common-index = { path = "../storages/common/index" } +databend-storages-common-table-meta = { path = "../storages/common/table_meta" } jsonb = { workspace = true } -storages-common-blocks = { path = "../storages/common/blocks" } -storages-common-cache = { path = "../storages/common/cache" } -storages-common-cache-manager = { path = "../storages/common/cache_manager" } -storages-common-index = { path = "../storages/common/index" } -storages-common-table-meta = { path = "../storages/common/table_meta" } -stream-handler = { path = "../ee_features/stream_handler" } -vacuum-handler = { path = "../ee_features/vacuum_handler" } -virtual-column = { path = "../ee_features/virtual_column" } # GitHub dependencies @@ -189,7 +189,7 @@ url = "2.3.1" wiremock = "0.5.14" [build-dependencies] -common-building = { path = "../../common/building" } +databend-common-building = { path = "../../common/building" } [package.metadata.cargo-machete] ignored = ["match-template"] diff --git a/src/query/service/build.rs b/src/query/service/build.rs index f15f5ed5e215..a69a90fdcb0f 100644 --- a/src/query/service/build.rs +++ b/src/query/service/build.rs @@ -13,5 +13,5 @@ // limitations under the License. fn main() { - common_building::setup(); + databend_common_building::setup(); } diff --git a/src/query/service/src/api/http/v1/background_tasks.rs b/src/query/service/src/api/http/v1/background_tasks.rs index ac7177dccbb7..d5c058f16b97 100644 --- a/src/query/service/src/api/http/v1/background_tasks.rs +++ b/src/query/service/src/api/http/v1/background_tasks.rs @@ -14,13 +14,13 @@ use chrono::DateTime; use chrono::Utc; -use common_exception::Result; -use common_meta_api::BackgroundApi; -use common_meta_app::background::BackgroundTaskInfo; -use common_meta_app::background::BackgroundTaskState; -use common_meta_app::background::BackgroundTaskType; -use common_meta_app::background::ListBackgroundTasksReq; -use common_users::UserApiProvider; +use databend_common_exception::Result; +use databend_common_meta_api::BackgroundApi; +use databend_common_meta_app::background::BackgroundTaskInfo; +use databend_common_meta_app::background::BackgroundTaskState; +use databend_common_meta_app::background::BackgroundTaskType; +use databend_common_meta_app::background::ListBackgroundTasksReq; +use databend_common_users::UserApiProvider; use log::debug; use poem::web::Json; use poem::web::Path; diff --git a/src/query/service/src/api/http/v1/cluster.rs b/src/query/service/src/api/http/v1/cluster.rs index 8853500ac310..04033be7cd3f 100644 --- a/src/query/service/src/api/http/v1/cluster.rs +++ b/src/query/service/src/api/http/v1/cluster.rs @@ -14,8 +14,8 @@ use std::sync::Arc; -use common_exception::Result; -use common_meta_types::NodeInfo; +use databend_common_exception::Result; +use databend_common_meta_types::NodeInfo; use poem::http::StatusCode; use poem::web::IntoResponse; use poem::web::Json; diff --git a/src/query/service/src/api/http/v1/config.rs b/src/query/service/src/api/http/v1/config.rs index b48bb24c322a..754de1ad093d 100644 --- a/src/query/service/src/api/http/v1/config.rs +++ b/src/query/service/src/api/http/v1/config.rs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_config::GlobalConfig; +use databend_common_config::GlobalConfig; use poem::web::Json; use poem::IntoResponse; diff --git a/src/query/service/src/api/http/v1/logs.rs b/src/query/service/src/api/http/v1/logs.rs index 7c69c336b1ed..9b7f6d2523d4 100644 --- a/src/query/service/src/api/http/v1/logs.rs +++ b/src/query/service/src/api/http/v1/logs.rs @@ -14,10 +14,10 @@ use std::sync::Arc; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::SendableDataBlockStream; -use common_sql::executor::table_read_plan::ToReadDataSourcePlan; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::SendableDataBlockStream; +use databend_common_sql::executor::table_read_plan::ToReadDataSourcePlan; use poem::http::StatusCode; use poem::Body; use poem::IntoResponse; diff --git a/src/query/service/src/api/http/v1/tenant_tables.rs b/src/query/service/src/api/http/v1/tenant_tables.rs index d2d3c0f5572c..a42383b57bba 100644 --- a/src/query/service/src/api/http/v1/tenant_tables.rs +++ b/src/query/service/src/api/http/v1/tenant_tables.rs @@ -14,9 +14,9 @@ use chrono::DateTime; use chrono::Utc; -use common_catalog::catalog::CatalogManager; -use common_config::GlobalConfig; -use common_exception::Result; +use databend_common_catalog::catalog::CatalogManager; +use databend_common_config::GlobalConfig; +use databend_common_exception::Result; use poem::web::Json; use poem::web::Path; use poem::IntoResponse; diff --git a/src/query/service/src/api/http_service.rs b/src/query/service/src/api/http_service.rs index 649720b1f88d..e3c2b3a0030d 100644 --- a/src/query/service/src/api/http_service.rs +++ b/src/query/service/src/api/http_service.rs @@ -16,17 +16,17 @@ use std::net::SocketAddr; use std::path::Path; use std::time::Duration; -use common_config::InnerConfig; -use common_exception::ErrorCode; -use common_http::health_handler; -use common_http::home::debug_home_handler; +use databend_common_config::InnerConfig; +use databend_common_exception::ErrorCode; +use databend_common_http::health_handler; +use databend_common_http::home::debug_home_handler; #[cfg(feature = "memory-profiling")] -use common_http::jeprof::debug_jeprof_dump_handler; -use common_http::pprof::debug_pprof_handler; -use common_http::stack::debug_dump_stack; -use common_http::HttpError; -use common_http::HttpShutdownHandler; -use common_meta_types::anyerror::AnyError; +use databend_common_http::jeprof::debug_jeprof_dump_handler; +use databend_common_http::pprof::debug_pprof_handler; +use databend_common_http::stack::debug_dump_stack; +use databend_common_http::HttpError; +use databend_common_http::HttpShutdownHandler; +use databend_common_meta_types::anyerror::AnyError; use log::info; use log::warn; use poem::get; diff --git a/src/query/service/src/api/rpc/exchange/data_exchange.rs b/src/query/service/src/api/rpc/exchange/data_exchange.rs index 7209148e4194..1e77fa3ad69d 100644 --- a/src/query/service/src/api/rpc/exchange/data_exchange.rs +++ b/src/query/service/src/api/rpc/exchange/data_exchange.rs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_expression::RemoteExpr; +use databend_common_expression::RemoteExpr; #[derive(Debug, Clone, serde::Serialize, serde::Deserialize)] pub enum DataExchange { diff --git a/src/query/service/src/api/rpc/exchange/exchange_injector.rs b/src/query/service/src/api/rpc/exchange/exchange_injector.rs index dab6d1e0b65e..b51b0f08dbe0 100644 --- a/src/query/service/src/api/rpc/exchange/exchange_injector.rs +++ b/src/query/service/src/api/rpc/exchange/exchange_injector.rs @@ -14,10 +14,10 @@ use std::sync::Arc; -use common_catalog::table_context::TableContext; -use common_exception::Result; -use common_pipeline_core::Pipeline; -use common_settings::FlightCompression; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::Result; +use databend_common_pipeline_core::Pipeline; +use databend_common_settings::FlightCompression; use crate::api::rpc::exchange::exchange_params::MergeExchangeParams; use crate::api::rpc::exchange::serde::exchange_deserializer::TransformExchangeDeserializer; diff --git a/src/query/service/src/api/rpc/exchange/exchange_manager.rs b/src/query/service/src/api/rpc/exchange/exchange_manager.rs index 2524a8ce7364..ba392ea91ba0 100644 --- a/src/query/service/src/api/rpc/exchange/exchange_manager.rs +++ b/src/query/service/src/api/rpc/exchange/exchange_manager.rs @@ -19,20 +19,20 @@ use std::ops::Deref; use std::sync::Arc; use async_channel::Receiver; -use common_arrow::arrow_format::flight::data::FlightData; -use common_arrow::arrow_format::flight::service::flight_service_client::FlightServiceClient; -use common_base::base::GlobalInstance; -use common_base::runtime::GlobalIORuntime; -use common_base::runtime::Thread; -use common_base::runtime::TrySpawn; -use common_base::GLOBAL_TASK; -use common_config::GlobalConfig; -use common_exception::ErrorCode; -use common_exception::Result; -use common_grpc::ConnectionFactory; -use common_pipeline_core::processors::profile::Profile; -use common_profile::SharedProcessorProfiles; -use common_sql::executor::PhysicalPlan; +use databend_common_arrow::arrow_format::flight::data::FlightData; +use databend_common_arrow::arrow_format::flight::service::flight_service_client::FlightServiceClient; +use databend_common_base::base::GlobalInstance; +use databend_common_base::runtime::GlobalIORuntime; +use databend_common_base::runtime::Thread; +use databend_common_base::runtime::TrySpawn; +use databend_common_base::GLOBAL_TASK; +use databend_common_config::GlobalConfig; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_grpc::ConnectionFactory; +use databend_common_pipeline_core::processors::profile::Profile; +use databend_common_profile::SharedProcessorProfiles; +use databend_common_sql::executor::PhysicalPlan; use minitrace::prelude::*; use parking_lot::Mutex; use parking_lot::ReentrantMutex; diff --git a/src/query/service/src/api/rpc/exchange/exchange_params.rs b/src/query/service/src/api/rpc/exchange/exchange_params.rs index a757b9a8810e..236698aaa6af 100644 --- a/src/query/service/src/api/rpc/exchange/exchange_params.rs +++ b/src/query/service/src/api/rpc/exchange/exchange_params.rs @@ -14,9 +14,9 @@ use std::sync::Arc; -use common_arrow::arrow::io::ipc::write::WriteOptions; -use common_arrow::arrow::io::ipc::IpcField; -use common_expression::DataSchemaRef; +use databend_common_arrow::arrow::io::ipc::write::WriteOptions; +use databend_common_arrow::arrow::io::ipc::IpcField; +use databend_common_expression::DataSchemaRef; use crate::api::rpc::flight_scatter::FlightScatter; use crate::api::ExchangeInjector; diff --git a/src/query/service/src/api/rpc/exchange/exchange_sink.rs b/src/query/service/src/api/rpc/exchange/exchange_sink.rs index 0976e15070db..d2c9e4f7c94e 100644 --- a/src/query/service/src/api/rpc/exchange/exchange_sink.rs +++ b/src/query/service/src/api/rpc/exchange/exchange_sink.rs @@ -14,14 +14,14 @@ use std::sync::Arc; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::BlockMetaInfoDowncast; -use common_expression::DataBlock; -use common_pipeline_core::processors::ProcessorPtr; -use common_pipeline_core::Pipe; -use common_pipeline_core::PipeItem; -use common_pipeline_core::Pipeline; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::BlockMetaInfoDowncast; +use databend_common_expression::DataBlock; +use databend_common_pipeline_core::processors::ProcessorPtr; +use databend_common_pipeline_core::Pipe; +use databend_common_pipeline_core::PipeItem; +use databend_common_pipeline_core::Pipeline; use crate::api::rpc::exchange::exchange_params::ExchangeParams; use crate::api::rpc::exchange::exchange_sink_writer::create_writer_item; diff --git a/src/query/service/src/api/rpc/exchange/exchange_sink_writer.rs b/src/query/service/src/api/rpc/exchange/exchange_sink_writer.rs index 304e858fa09e..e076a5e9d8ec 100644 --- a/src/query/service/src/api/rpc/exchange/exchange_sink_writer.rs +++ b/src/query/service/src/api/rpc/exchange/exchange_sink_writer.rs @@ -14,20 +14,20 @@ use std::sync::Arc; -use common_catalog::table_context::TableContext; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::BlockMetaInfoDowncast; -use common_expression::DataBlock; -use common_metrics::transform::*; -use common_pipeline_core::processors::InputPort; -use common_pipeline_core::processors::Processor; -use common_pipeline_core::processors::ProcessorPtr; -use common_pipeline_core::PipeItem; -use common_pipeline_sinks::AsyncSink; -use common_pipeline_sinks::AsyncSinker; -use common_pipeline_sinks::Sink; -use common_pipeline_sinks::Sinker; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::BlockMetaInfoDowncast; +use databend_common_expression::DataBlock; +use databend_common_metrics::transform::*; +use databend_common_pipeline_core::processors::InputPort; +use databend_common_pipeline_core::processors::Processor; +use databend_common_pipeline_core::processors::ProcessorPtr; +use databend_common_pipeline_core::PipeItem; +use databend_common_pipeline_sinks::AsyncSink; +use databend_common_pipeline_sinks::AsyncSinker; +use databend_common_pipeline_sinks::Sink; +use databend_common_pipeline_sinks::Sinker; use crate::api::rpc::flight_client::FlightSender; use crate::api::ExchangeSerializeMeta; diff --git a/src/query/service/src/api/rpc/exchange/exchange_sorting.rs b/src/query/service/src/api/rpc/exchange/exchange_sorting.rs index 2fe2d2942725..8cc931d64641 100644 --- a/src/query/service/src/api/rpc/exchange/exchange_sorting.rs +++ b/src/query/service/src/api/rpc/exchange/exchange_sorting.rs @@ -15,12 +15,12 @@ use std::any::Any; use std::sync::Arc; -use common_exception::Result; -use common_expression::DataBlock; -use common_pipeline_core::processors::Event; -use common_pipeline_core::processors::InputPort; -use common_pipeline_core::processors::OutputPort; -use common_pipeline_core::processors::Processor; +use databend_common_exception::Result; +use databend_common_expression::DataBlock; +use databend_common_pipeline_core::processors::Event; +use databend_common_pipeline_core::processors::InputPort; +use databend_common_pipeline_core::processors::OutputPort; +use databend_common_pipeline_core::processors::Processor; pub trait ExchangeSorting: Send + Sync + 'static { fn block_number(&self, data_block: &DataBlock) -> Result; diff --git a/src/query/service/src/api/rpc/exchange/exchange_source.rs b/src/query/service/src/api/rpc/exchange/exchange_source.rs index bed2901ae3e1..4cfbf023b628 100644 --- a/src/query/service/src/api/rpc/exchange/exchange_source.rs +++ b/src/query/service/src/api/rpc/exchange/exchange_source.rs @@ -14,15 +14,15 @@ use std::sync::Arc; -use common_catalog::table_context::TableContext; -use common_exception::ErrorCode; -use common_exception::Result; -use common_pipeline_core::processors::InputPort; -use common_pipeline_core::processors::OutputPort; -use common_pipeline_core::Pipe; -use common_pipeline_core::PipeItem; -use common_pipeline_core::Pipeline; -use common_pipeline_transforms::processors::TransformDummy; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_pipeline_core::processors::InputPort; +use databend_common_pipeline_core::processors::OutputPort; +use databend_common_pipeline_core::Pipe; +use databend_common_pipeline_core::PipeItem; +use databend_common_pipeline_core::Pipeline; +use databend_common_pipeline_transforms::processors::TransformDummy; use crate::api::rpc::exchange::exchange_params::ExchangeParams; use crate::api::rpc::exchange::exchange_params::MergeExchangeParams; diff --git a/src/query/service/src/api/rpc/exchange/exchange_source_reader.rs b/src/query/service/src/api/rpc/exchange/exchange_source_reader.rs index 717f6a7a395a..e6aee2acb472 100644 --- a/src/query/service/src/api/rpc/exchange/exchange_source_reader.rs +++ b/src/query/service/src/api/rpc/exchange/exchange_source_reader.rs @@ -17,15 +17,15 @@ use std::sync::atomic::AtomicBool; use std::sync::atomic::Ordering; use std::sync::Arc; -use common_exception::Result; -use common_expression::DataBlock; -use common_metrics::transform::*; -use common_pipeline_core::processors::Event; -use common_pipeline_core::processors::EventCause; -use common_pipeline_core::processors::OutputPort; -use common_pipeline_core::processors::Processor; -use common_pipeline_core::processors::ProcessorPtr; -use common_pipeline_core::PipeItem; +use databend_common_exception::Result; +use databend_common_expression::DataBlock; +use databend_common_metrics::transform::*; +use databend_common_pipeline_core::processors::Event; +use databend_common_pipeline_core::processors::EventCause; +use databend_common_pipeline_core::processors::OutputPort; +use databend_common_pipeline_core::processors::Processor; +use databend_common_pipeline_core::processors::ProcessorPtr; +use databend_common_pipeline_core::PipeItem; use log::info; use crate::api::rpc::flight_client::FlightReceiver; diff --git a/src/query/service/src/api/rpc/exchange/exchange_transform.rs b/src/query/service/src/api/rpc/exchange/exchange_transform.rs index 7d774a0c6ef6..ee2793ca578b 100644 --- a/src/query/service/src/api/rpc/exchange/exchange_transform.rs +++ b/src/query/service/src/api/rpc/exchange/exchange_transform.rs @@ -14,12 +14,12 @@ use std::sync::Arc; -use common_catalog::table_context::TableContext; -use common_exception::Result; -use common_pipeline_core::processors::create_resize_item; -use common_pipeline_core::Pipe; -use common_pipeline_core::Pipeline; -use common_pipeline_transforms::processors::create_dummy_item; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::Result; +use databend_common_pipeline_core::processors::create_resize_item; +use databend_common_pipeline_core::Pipe; +use databend_common_pipeline_core::Pipeline; +use databend_common_pipeline_transforms::processors::create_dummy_item; use crate::api::rpc::exchange::exchange_params::ExchangeParams; use crate::api::rpc::exchange::exchange_sink_writer::create_writer_item; diff --git a/src/query/service/src/api/rpc/exchange/exchange_transform_scatter.rs b/src/query/service/src/api/rpc/exchange/exchange_transform_scatter.rs index 775ed439e6f1..98df73d6006f 100644 --- a/src/query/service/src/api/rpc/exchange/exchange_transform_scatter.rs +++ b/src/query/service/src/api/rpc/exchange/exchange_transform_scatter.rs @@ -14,12 +14,12 @@ use std::sync::Arc; -use common_expression::DataBlock; -use common_pipeline_core::processors::InputPort; -use common_pipeline_core::processors::OutputPort; -use common_pipeline_core::processors::ProcessorPtr; -use common_pipeline_transforms::processors::Transform; -use common_pipeline_transforms::processors::Transformer; +use databend_common_expression::DataBlock; +use databend_common_pipeline_core::processors::InputPort; +use databend_common_pipeline_core::processors::OutputPort; +use databend_common_pipeline_core::processors::ProcessorPtr; +use databend_common_pipeline_transforms::processors::Transform; +use databend_common_pipeline_transforms::processors::Transformer; use crate::api::rpc::exchange::exchange_transform_shuffle::ExchangeShuffleMeta; use crate::api::rpc::flight_scatter::FlightScatter; @@ -43,7 +43,7 @@ impl ScatterTransform { impl Transform for ScatterTransform { const NAME: &'static str = "ScatterTransform"; - fn transform(&mut self, data: DataBlock) -> common_exception::Result { + fn transform(&mut self, data: DataBlock) -> databend_common_exception::Result { let blocks = self.scatter.execute(data)?; Ok(DataBlock::empty_with_meta(ExchangeShuffleMeta::create( diff --git a/src/query/service/src/api/rpc/exchange/exchange_transform_shuffle.rs b/src/query/service/src/api/rpc/exchange/exchange_transform_shuffle.rs index 212c86731403..01c2aa1aa939 100644 --- a/src/query/service/src/api/rpc/exchange/exchange_transform_shuffle.rs +++ b/src/query/service/src/api/rpc/exchange/exchange_transform_shuffle.rs @@ -18,22 +18,22 @@ use std::fmt::Debug; use std::fmt::Formatter; use std::sync::Arc; -use common_catalog::table_context::TableContext; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::BlockMetaInfo; -use common_expression::BlockMetaInfoDowncast; -use common_expression::BlockMetaInfoPtr; -use common_expression::DataBlock; -use common_pipeline_core::processors::Event; -use common_pipeline_core::processors::EventCause; -use common_pipeline_core::processors::InputPort; -use common_pipeline_core::processors::OutputPort; -use common_pipeline_core::processors::Processor; -use common_pipeline_core::processors::ProcessorPtr; -use common_pipeline_core::Pipe; -use common_pipeline_core::PipeItem; -use common_pipeline_core::Pipeline; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::BlockMetaInfo; +use databend_common_expression::BlockMetaInfoDowncast; +use databend_common_expression::BlockMetaInfoPtr; +use databend_common_expression::DataBlock; +use databend_common_pipeline_core::processors::Event; +use databend_common_pipeline_core::processors::EventCause; +use databend_common_pipeline_core::processors::InputPort; +use databend_common_pipeline_core::processors::OutputPort; +use databend_common_pipeline_core::processors::Processor; +use databend_common_pipeline_core::processors::ProcessorPtr; +use databend_common_pipeline_core::Pipe; +use databend_common_pipeline_core::PipeItem; +use databend_common_pipeline_core::Pipeline; use crate::api::rpc::exchange::exchange_params::ShuffleExchangeParams; use crate::api::rpc::exchange::exchange_sorting::ExchangeSorting; diff --git a/src/query/service/src/api/rpc/exchange/serde/exchange_deserializer.rs b/src/query/service/src/api/rpc/exchange/serde/exchange_deserializer.rs index b7078cc9ac57..a63459460d58 100644 --- a/src/query/service/src/api/rpc/exchange/serde/exchange_deserializer.rs +++ b/src/query/service/src/api/rpc/exchange/serde/exchange_deserializer.rs @@ -16,26 +16,26 @@ use std::fmt::Debug; use std::fmt::Formatter; use std::sync::Arc; -use common_arrow::arrow::datatypes::Schema as ArrowSchema; -use common_arrow::arrow::io::flight::default_ipc_fields; -use common_arrow::arrow::io::flight::deserialize_batch; -use common_arrow::arrow::io::flight::deserialize_dictionary; -use common_arrow::arrow::io::ipc::read::Dictionaries; -use common_arrow::arrow::io::ipc::IpcSchema; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::BlockMetaInfo; -use common_expression::BlockMetaInfoPtr; -use common_expression::DataBlock; -use common_expression::DataSchemaRef; -use common_io::prelude::bincode_deserialize_from_slice; -use common_io::prelude::BinaryRead; -use common_pipeline_core::processors::InputPort; -use common_pipeline_core::processors::OutputPort; -use common_pipeline_core::processors::ProcessorPtr; -use common_pipeline_transforms::processors::BlockMetaTransform; -use common_pipeline_transforms::processors::BlockMetaTransformer; -use common_pipeline_transforms::processors::UnknownMode; +use databend_common_arrow::arrow::datatypes::Schema as ArrowSchema; +use databend_common_arrow::arrow::io::flight::default_ipc_fields; +use databend_common_arrow::arrow::io::flight::deserialize_batch; +use databend_common_arrow::arrow::io::flight::deserialize_dictionary; +use databend_common_arrow::arrow::io::ipc::read::Dictionaries; +use databend_common_arrow::arrow::io::ipc::IpcSchema; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::BlockMetaInfo; +use databend_common_expression::BlockMetaInfoPtr; +use databend_common_expression::DataBlock; +use databend_common_expression::DataSchemaRef; +use databend_common_io::prelude::bincode_deserialize_from_slice; +use databend_common_io::prelude::BinaryRead; +use databend_common_pipeline_core::processors::InputPort; +use databend_common_pipeline_core::processors::OutputPort; +use databend_common_pipeline_core::processors::ProcessorPtr; +use databend_common_pipeline_transforms::processors::BlockMetaTransform; +use databend_common_pipeline_transforms::processors::BlockMetaTransformer; +use databend_common_pipeline_transforms::processors::UnknownMode; use serde::Deserializer; use serde::Serializer; diff --git a/src/query/service/src/api/rpc/exchange/serde/exchange_serializer.rs b/src/query/service/src/api/rpc/exchange/serde/exchange_serializer.rs index de5da2ed9a3e..ffc021f536da 100644 --- a/src/query/service/src/api/rpc/exchange/serde/exchange_serializer.rs +++ b/src/query/service/src/api/rpc/exchange/serde/exchange_serializer.rs @@ -16,28 +16,28 @@ use std::fmt::Debug; use std::fmt::Formatter; use std::sync::Arc; -use common_arrow::arrow::chunk::Chunk; -use common_arrow::arrow::io::flight::default_ipc_fields; -use common_arrow::arrow::io::flight::serialize_batch; -use common_arrow::arrow::io::flight::WriteOptions; -use common_arrow::arrow::io::ipc::write::Compression; -use common_arrow::arrow::io::ipc::IpcField; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::BlockMetaInfo; -use common_expression::BlockMetaInfoPtr; -use common_expression::DataBlock; -use common_io::prelude::bincode_serialize_into_buf; -use common_io::prelude::BinaryWrite; -use common_pipeline_core::processors::InputPort; -use common_pipeline_core::processors::OutputPort; -use common_pipeline_core::processors::ProcessorPtr; -use common_pipeline_transforms::processors::BlockMetaTransform; -use common_pipeline_transforms::processors::BlockMetaTransformer; -use common_pipeline_transforms::processors::Transform; -use common_pipeline_transforms::processors::Transformer; -use common_pipeline_transforms::processors::UnknownMode; -use common_settings::FlightCompression; +use databend_common_arrow::arrow::chunk::Chunk; +use databend_common_arrow::arrow::io::flight::default_ipc_fields; +use databend_common_arrow::arrow::io::flight::serialize_batch; +use databend_common_arrow::arrow::io::flight::WriteOptions; +use databend_common_arrow::arrow::io::ipc::write::Compression; +use databend_common_arrow::arrow::io::ipc::IpcField; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::BlockMetaInfo; +use databend_common_expression::BlockMetaInfoPtr; +use databend_common_expression::DataBlock; +use databend_common_io::prelude::bincode_serialize_into_buf; +use databend_common_io::prelude::BinaryWrite; +use databend_common_pipeline_core::processors::InputPort; +use databend_common_pipeline_core::processors::OutputPort; +use databend_common_pipeline_core::processors::ProcessorPtr; +use databend_common_pipeline_transforms::processors::BlockMetaTransform; +use databend_common_pipeline_transforms::processors::BlockMetaTransformer; +use databend_common_pipeline_transforms::processors::Transform; +use databend_common_pipeline_transforms::processors::Transformer; +use databend_common_pipeline_transforms::processors::UnknownMode; +use databend_common_settings::FlightCompression; use serde::Deserializer; use serde::Serializer; diff --git a/src/query/service/src/api/rpc/exchange/statistics_receiver.rs b/src/query/service/src/api/rpc/exchange/statistics_receiver.rs index 1effe7c28229..9bee184a6de1 100644 --- a/src/query/service/src/api/rpc/exchange/statistics_receiver.rs +++ b/src/query/service/src/api/rpc/exchange/statistics_receiver.rs @@ -15,14 +15,14 @@ use std::collections::HashMap; use std::sync::Arc; -use common_base::base::tokio::sync::broadcast::channel; -use common_base::base::tokio::sync::broadcast::Sender; -use common_base::base::tokio::task::JoinHandle; -use common_base::match_join_handle; -use common_base::runtime::Runtime; -use common_base::runtime::TrySpawn; -use common_catalog::table_context::TableContext; -use common_exception::Result; +use databend_common_base::base::tokio::sync::broadcast::channel; +use databend_common_base::base::tokio::sync::broadcast::Sender; +use databend_common_base::base::tokio::task::JoinHandle; +use databend_common_base::match_join_handle; +use databend_common_base::runtime::Runtime; +use databend_common_base::runtime::TrySpawn; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::Result; use futures_util::future::select; use futures_util::future::Either; diff --git a/src/query/service/src/api/rpc/exchange/statistics_sender.rs b/src/query/service/src/api/rpc/exchange/statistics_sender.rs index 780b1e8e1f56..14bc576b7752 100644 --- a/src/query/service/src/api/rpc/exchange/statistics_sender.rs +++ b/src/query/service/src/api/rpc/exchange/statistics_sender.rs @@ -18,15 +18,15 @@ use std::sync::Arc; use std::time::Duration; use async_channel::Sender; -use common_base::base::tokio::task::JoinHandle; -use common_base::base::tokio::time::sleep; -use common_base::runtime::TrySpawn; -use common_catalog::table_context::TableContext; -use common_exception::ErrorCode; -use common_exception::Result; -use common_pipeline_core::processors::profile::PlanProfile; -use common_pipeline_core::processors::profile::Profile; -use common_storage::MergeStatus; +use databend_common_base::base::tokio::task::JoinHandle; +use databend_common_base::base::tokio::time::sleep; +use databend_common_base::runtime::TrySpawn; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_pipeline_core::processors::profile::PlanProfile; +use databend_common_pipeline_core::processors::profile::Profile; +use databend_common_storage::MergeStatus; use futures_util::future::Either; use log::warn; diff --git a/src/query/service/src/api/rpc/flight_actions.rs b/src/query/service/src/api/rpc/flight_actions.rs index 58cdb2040e55..377002982cf4 100644 --- a/src/query/service/src/api/rpc/flight_actions.rs +++ b/src/query/service/src/api/rpc/flight_actions.rs @@ -14,9 +14,9 @@ use std::convert::TryInto; -use common_arrow::arrow_format::flight::data::Action; -use common_exception::ErrorCode; -use common_exception::ToErrorCode; +use databend_common_arrow::arrow_format::flight::data::Action; +use databend_common_exception::ErrorCode; +use databend_common_exception::ToErrorCode; use tonic::Status; use crate::api::rpc::packets::KillQueryPacket; diff --git a/src/query/service/src/api/rpc/flight_client.rs b/src/query/service/src/api/rpc/flight_client.rs index afa5a0b965bd..1d0fd9b41c09 100644 --- a/src/query/service/src/api/rpc/flight_client.rs +++ b/src/query/service/src/api/rpc/flight_client.rs @@ -18,14 +18,14 @@ use std::sync::Arc; use async_channel::Receiver; use async_channel::Sender; -use common_arrow::arrow_format::flight::data::Action; -use common_arrow::arrow_format::flight::data::FlightData; -use common_arrow::arrow_format::flight::data::Ticket; -use common_arrow::arrow_format::flight::service::flight_service_client::FlightServiceClient; -use common_base::base::tokio; -use common_base::base::tokio::time::Duration; -use common_exception::ErrorCode; -use common_exception::Result; +use databend_common_arrow::arrow_format::flight::data::Action; +use databend_common_arrow::arrow_format::flight::data::FlightData; +use databend_common_arrow::arrow_format::flight::data::Ticket; +use databend_common_arrow::arrow_format::flight::service::flight_service_client::FlightServiceClient; +use databend_common_base::base::tokio; +use databend_common_base::base::tokio::time::Duration; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; use futures::StreamExt; use futures_util::future::Either; use minitrace::full_name; @@ -97,7 +97,7 @@ impl FlightClient { .with_metadata("x-query-id", query_id)? .with_metadata("x-fragment-id", &fragment.to_string())? .build(); - let request = common_tracing::inject_span_to_tonic_request(request); + let request = databend_common_tracing::inject_span_to_tonic_request(request); let streaming = self.get_streaming(request).await?; @@ -167,7 +167,7 @@ impl FlightClient { let action: Action = action.try_into()?; let action_type = action.r#type.clone(); let request = Request::new(action); - let mut request = common_tracing::inject_span_to_tonic_request(request); + let mut request = databend_common_tracing::inject_span_to_tonic_request(request); request.set_timeout(Duration::from_secs(timeout)); let response = self.inner.do_action(request).await?; diff --git a/src/query/service/src/api/rpc/flight_scatter.rs b/src/query/service/src/api/rpc/flight_scatter.rs index 1e5367dc7e9c..4a29a487b389 100644 --- a/src/query/service/src/api/rpc/flight_scatter.rs +++ b/src/query/service/src/api/rpc/flight_scatter.rs @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_exception::Result; -use common_expression::DataBlock; +use databend_common_exception::Result; +use databend_common_expression::DataBlock; pub trait FlightScatter: Sync + Send { fn execute(&self, data_block: DataBlock) -> Result>; diff --git a/src/query/service/src/api/rpc/flight_scatter_broadcast.rs b/src/query/service/src/api/rpc/flight_scatter_broadcast.rs index c8e862de7c13..88274b6a7680 100644 --- a/src/query/service/src/api/rpc/flight_scatter_broadcast.rs +++ b/src/query/service/src/api/rpc/flight_scatter_broadcast.rs @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_exception::Result; -use common_expression::DataBlock; +use databend_common_exception::Result; +use databend_common_expression::DataBlock; use crate::api::rpc::flight_scatter::FlightScatter; diff --git a/src/query/service/src/api/rpc/flight_scatter_hash.rs b/src/query/service/src/api/rpc/flight_scatter_hash.rs index 7636efe3f942..55492dbe121c 100644 --- a/src/query/service/src/api/rpc/flight_scatter_hash.rs +++ b/src/query/service/src/api/rpc/flight_scatter_hash.rs @@ -15,25 +15,25 @@ use std::collections::hash_map::DefaultHasher; use std::hash::Hasher; -use common_arrow::arrow::buffer::Buffer; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::type_check::check_function; -use common_expression::types::number::NumberScalar; -use common_expression::types::AnyType; -use common_expression::types::DataType; -use common_expression::types::NullableType; -use common_expression::types::NumberDataType; -use common_expression::types::NumberType; -use common_expression::types::ValueType; -use common_expression::DataBlock; -use common_expression::Evaluator; -use common_expression::Expr; -use common_expression::FunctionContext; -use common_expression::RemoteExpr; -use common_expression::Scalar; -use common_expression::Value; -use common_functions::BUILTIN_FUNCTIONS; +use databend_common_arrow::arrow::buffer::Buffer; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::type_check::check_function; +use databend_common_expression::types::number::NumberScalar; +use databend_common_expression::types::AnyType; +use databend_common_expression::types::DataType; +use databend_common_expression::types::NullableType; +use databend_common_expression::types::NumberDataType; +use databend_common_expression::types::NumberType; +use databend_common_expression::types::ValueType; +use databend_common_expression::DataBlock; +use databend_common_expression::Evaluator; +use databend_common_expression::Expr; +use databend_common_expression::FunctionContext; +use databend_common_expression::RemoteExpr; +use databend_common_expression::Scalar; +use databend_common_expression::Value; +use databend_common_functions::BUILTIN_FUNCTIONS; use crate::api::rpc::flight_scatter::FlightScatter; @@ -189,8 +189,10 @@ impl HashFlightScatter { fn get_hash_values(column: Value, rows: usize) -> Result> { match column { Value::Scalar(c) => match c { - common_expression::Scalar::Null => Ok(vec![0; rows].into()), - common_expression::Scalar::Number(NumberScalar::UInt64(x)) => Ok(vec![x; rows].into()), + databend_common_expression::Scalar::Null => Ok(vec![0; rows].into()), + databend_common_expression::Scalar::Number(NumberScalar::UInt64(x)) => { + Ok(vec![x; rows].into()) + } _ => unreachable!(), }, Value::Column(c) => { diff --git a/src/query/service/src/api/rpc/flight_service.rs b/src/query/service/src/api/rpc/flight_service.rs index e865073d83fc..8ce1565ad6ae 100644 --- a/src/query/service/src/api/rpc/flight_service.rs +++ b/src/query/service/src/api/rpc/flight_service.rs @@ -15,25 +15,25 @@ use std::convert::TryInto; use std::pin::Pin; -use common_arrow::arrow_format::flight::data::Action; -use common_arrow::arrow_format::flight::data::ActionType; -use common_arrow::arrow_format::flight::data::Criteria; -use common_arrow::arrow_format::flight::data::Empty; -use common_arrow::arrow_format::flight::data::FlightData; -use common_arrow::arrow_format::flight::data::FlightDescriptor; -use common_arrow::arrow_format::flight::data::FlightInfo; -use common_arrow::arrow_format::flight::data::HandshakeRequest; -use common_arrow::arrow_format::flight::data::HandshakeResponse; -use common_arrow::arrow_format::flight::data::PutResult; -use common_arrow::arrow_format::flight::data::Result as FlightResult; -use common_arrow::arrow_format::flight::data::SchemaResult; -use common_arrow::arrow_format::flight::data::Ticket; -use common_arrow::arrow_format::flight::service::flight_service_server::FlightService; -use common_base::match_join_handle; -use common_base::runtime::TrySpawn; -use common_catalog::table_context::TableContext; -use common_config::GlobalConfig; -use common_settings::Settings; +use databend_common_arrow::arrow_format::flight::data::Action; +use databend_common_arrow::arrow_format::flight::data::ActionType; +use databend_common_arrow::arrow_format::flight::data::Criteria; +use databend_common_arrow::arrow_format::flight::data::Empty; +use databend_common_arrow::arrow_format::flight::data::FlightData; +use databend_common_arrow::arrow_format::flight::data::FlightDescriptor; +use databend_common_arrow::arrow_format::flight::data::FlightInfo; +use databend_common_arrow::arrow_format::flight::data::HandshakeRequest; +use databend_common_arrow::arrow_format::flight::data::HandshakeResponse; +use databend_common_arrow::arrow_format::flight::data::PutResult; +use databend_common_arrow::arrow_format::flight::data::Result as FlightResult; +use databend_common_arrow::arrow_format::flight::data::SchemaResult; +use databend_common_arrow::arrow_format::flight::data::Ticket; +use databend_common_arrow::arrow_format::flight::service::flight_service_server::FlightService; +use databend_common_base::match_join_handle; +use databend_common_base::runtime::TrySpawn; +use databend_common_catalog::table_context::TableContext; +use databend_common_config::GlobalConfig; +use databend_common_settings::Settings; use minitrace::full_name; use minitrace::prelude::*; use tokio_stream::Stream; @@ -112,7 +112,7 @@ impl FlightService for DatabendQueryFlightService { #[async_backtrace::framed] async fn do_get(&self, request: Request) -> Response { - let root = common_tracing::start_trace_for_remote_request(full_name!(), &request); + let root = databend_common_tracing::start_trace_for_remote_request(full_name!(), &request); let _guard = root.set_local_parent(); match request.get_metadata("x-type")?.as_str() { @@ -152,7 +152,7 @@ impl FlightService for DatabendQueryFlightService { #[async_backtrace::framed] async fn do_action(&self, request: Request) -> Response { - let root = common_tracing::start_trace_for_remote_request(full_name!(), &request); + let root = databend_common_tracing::start_trace_for_remote_request(full_name!(), &request); async { let action = request.into_inner(); @@ -264,7 +264,7 @@ impl FlightService for DatabendQueryFlightService { #[async_backtrace::framed] async fn list_actions(&self, request: Request) -> Response { - let root = common_tracing::start_trace_for_remote_request(full_name!(), &request); + let root = databend_common_tracing::start_trace_for_remote_request(full_name!(), &request); async { Result::Ok(RawResponse::new( diff --git a/src/query/service/src/api/rpc/packets/packet.rs b/src/query/service/src/api/rpc/packets/packet.rs index acf2a34e7705..0b79df547f5a 100644 --- a/src/query/service/src/api/rpc/packets/packet.rs +++ b/src/query/service/src/api/rpc/packets/packet.rs @@ -12,10 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_arrow::arrow_format::flight::service::flight_service_client::FlightServiceClient; -use common_config::InnerConfig; -use common_exception::Result; -use common_grpc::ConnectionFactory; +use databend_common_arrow::arrow_format::flight::service::flight_service_client::FlightServiceClient; +use databend_common_config::InnerConfig; +use databend_common_exception::Result; +use databend_common_grpc::ConnectionFactory; use crate::api::FlightClient; diff --git a/src/query/service/src/api/rpc/packets/packet_data.rs b/src/query/service/src/api/rpc/packets/packet_data.rs index d28d2b27d532..e5177a87246a 100644 --- a/src/query/service/src/api/rpc/packets/packet_data.rs +++ b/src/query/service/src/api/rpc/packets/packet_data.rs @@ -19,12 +19,12 @@ use std::vec; use byteorder::BigEndian; use byteorder::ReadBytesExt; use byteorder::WriteBytesExt; -use common_arrow::arrow_format::flight::data::FlightData; -use common_exception::ErrorCode; -use common_exception::Result; -use common_pipeline_core::processors::profile::PlanProfile; -use common_storage::CopyStatus; -use common_storage::MergeStatus; +use databend_common_arrow::arrow_format::flight::data::FlightData; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_pipeline_core::processors::profile::PlanProfile; +use databend_common_storage::CopyStatus; +use databend_common_storage::MergeStatus; use log::error; use crate::api::rpc::packets::ProgressInfo; diff --git a/src/query/service/src/api/rpc/packets/packet_data_progressinfo.rs b/src/query/service/src/api/rpc/packets/packet_data_progressinfo.rs index 83d8f13d74a0..81866733cad6 100644 --- a/src/query/service/src/api/rpc/packets/packet_data_progressinfo.rs +++ b/src/query/service/src/api/rpc/packets/packet_data_progressinfo.rs @@ -20,9 +20,9 @@ use std::sync::Arc; use byteorder::BigEndian; use byteorder::ReadBytesExt; use byteorder::WriteBytesExt; -use common_base::base::ProgressValues; -use common_exception::ErrorCode; -use common_exception::Result; +use databend_common_base::base::ProgressValues; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; use crate::sessions::QueryContext; use crate::sessions::TableContext; diff --git a/src/query/service/src/api/rpc/packets/packet_execute.rs b/src/query/service/src/api/rpc/packets/packet_execute.rs index 0f936fd0fa41..02c2428546b7 100644 --- a/src/query/service/src/api/rpc/packets/packet_execute.rs +++ b/src/query/service/src/api/rpc/packets/packet_execute.rs @@ -15,10 +15,10 @@ use std::collections::HashMap; use std::sync::Arc; -use common_config::InnerConfig; -use common_exception::ErrorCode; -use common_exception::Result; -use common_meta_types::NodeInfo; +use databend_common_config::InnerConfig; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_meta_types::NodeInfo; use crate::api::rpc::packets::packet::create_client; use crate::api::rpc::Packet; diff --git a/src/query/service/src/api/rpc/packets/packet_executor.rs b/src/query/service/src/api/rpc/packets/packet_executor.rs index 3f2e8e497d94..77272cee6646 100644 --- a/src/query/service/src/api/rpc/packets/packet_executor.rs +++ b/src/query/service/src/api/rpc/packets/packet_executor.rs @@ -15,12 +15,12 @@ use std::collections::HashMap; use std::sync::Arc; -use common_catalog::query_kind::QueryKind; -use common_config::InnerConfig; -use common_exception::ErrorCode; -use common_exception::Result; -use common_meta_types::NodeInfo; -use common_settings::Settings; +use databend_common_catalog::query_kind::QueryKind; +use databend_common_config::InnerConfig; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_meta_types::NodeInfo; +use databend_common_settings::Settings; use crate::api::rpc::flight_actions::InitQueryFragmentsPlan; use crate::api::rpc::packets::packet::create_client; diff --git a/src/query/service/src/api/rpc/packets/packet_kill_query.rs b/src/query/service/src/api/rpc/packets/packet_kill_query.rs index 4bcc2c01cc8e..9637f59a9a64 100644 --- a/src/query/service/src/api/rpc/packets/packet_kill_query.rs +++ b/src/query/service/src/api/rpc/packets/packet_kill_query.rs @@ -14,9 +14,9 @@ use std::sync::Arc; -use common_config::InnerConfig; -use common_exception::Result; -use common_meta_types::NodeInfo; +use databend_common_config::InnerConfig; +use databend_common_exception::Result; +use databend_common_meta_types::NodeInfo; use crate::api::rpc::flight_actions::KillQuery; use crate::api::rpc::packets::packet::create_client; diff --git a/src/query/service/src/api/rpc/packets/packet_publisher.rs b/src/query/service/src/api/rpc/packets/packet_publisher.rs index 134da838d56d..a721daccdcf9 100644 --- a/src/query/service/src/api/rpc/packets/packet_publisher.rs +++ b/src/query/service/src/api/rpc/packets/packet_publisher.rs @@ -14,9 +14,9 @@ use std::sync::Arc; -use common_config::InnerConfig; -use common_exception::Result; -use common_meta_types::NodeInfo; +use databend_common_config::InnerConfig; +use databend_common_exception::Result; +use databend_common_meta_types::NodeInfo; use crate::api::rpc::flight_actions::InitNodesChannel; use crate::api::rpc::packets::packet::create_client; diff --git a/src/query/service/src/api/rpc/packets/packet_truncate_table.rs b/src/query/service/src/api/rpc/packets/packet_truncate_table.rs index 75670a86214c..968312ebe1b4 100644 --- a/src/query/service/src/api/rpc/packets/packet_truncate_table.rs +++ b/src/query/service/src/api/rpc/packets/packet_truncate_table.rs @@ -14,9 +14,9 @@ use std::sync::Arc; -use common_config::InnerConfig; -use common_exception::Result; -use common_meta_types::NodeInfo; +use databend_common_config::InnerConfig; +use databend_common_exception::Result; +use databend_common_meta_types::NodeInfo; use crate::api::rpc::flight_actions::TruncateTable; use crate::api::rpc::packets::packet::create_client; diff --git a/src/query/service/src/api/rpc/request_builder.rs b/src/query/service/src/api/rpc/request_builder.rs index ad711822b50a..b17d4b6a9df7 100644 --- a/src/query/service/src/api/rpc/request_builder.rs +++ b/src/query/service/src/api/rpc/request_builder.rs @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_exception::ErrorCode; -use common_exception::Result; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; use tonic::metadata::MetadataKey; use tonic::metadata::MetadataValue; use tonic::Request; diff --git a/src/query/service/src/api/rpc_service.rs b/src/query/service/src/api/rpc_service.rs index 8e8988798d61..486fdfa92bbb 100644 --- a/src/query/service/src/api/rpc_service.rs +++ b/src/query/service/src/api/rpc_service.rs @@ -16,12 +16,12 @@ use std::future::Future; use std::net::SocketAddr; use std::sync::Arc; -use common_arrow::arrow_format::flight::service::flight_service_server::FlightServiceServer; -use common_base::base::tokio; -use common_base::base::tokio::sync::Notify; -use common_config::InnerConfig; -use common_exception::ErrorCode; -use common_exception::Result; +use databend_common_arrow::arrow_format::flight::service::flight_service_server::FlightServiceServer; +use databend_common_base::base::tokio; +use databend_common_base::base::tokio::sync::Notify; +use databend_common_config::InnerConfig; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; use log::info; use tonic::transport::server::TcpIncoming; use tonic::transport::Identity; diff --git a/src/query/service/src/auth.rs b/src/query/service/src/auth.rs index c961af3b2eab..34caaaf92232 100644 --- a/src/query/service/src/auth.rs +++ b/src/query/service/src/auth.rs @@ -14,15 +14,15 @@ use std::sync::Arc; -use common_base::base::GlobalInstance; -use common_config::InnerConfig; -use common_exception::ErrorCode; -use common_exception::Result; -use common_meta_app::principal::AuthInfo; -use common_meta_app::principal::UserIdentity; -use common_meta_app::principal::UserInfo; -use common_users::JwtAuthenticator; -use common_users::UserApiProvider; +use databend_common_base::base::GlobalInstance; +use databend_common_config::InnerConfig; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_meta_app::principal::AuthInfo; +use databend_common_meta_app::principal::UserIdentity; +use databend_common_meta_app::principal::UserInfo; +use databend_common_users::JwtAuthenticator; +use databend_common_users::UserApiProvider; use crate::sessions::Session; diff --git a/src/query/service/src/catalogs/default/catalog_context.rs b/src/query/service/src/catalogs/default/catalog_context.rs index 67d904d66218..6253d84efa4d 100644 --- a/src/query/service/src/catalogs/default/catalog_context.rs +++ b/src/query/service/src/catalogs/default/catalog_context.rs @@ -14,7 +14,7 @@ use std::sync::Arc; -use common_meta_store::MetaStore; +use databend_common_meta_store::MetaStore; use crate::databases::DatabaseFactory; use crate::storages::StorageFactory; diff --git a/src/query/service/src/catalogs/default/database_catalog.rs b/src/query/service/src/catalogs/default/database_catalog.rs index 1b037f4ba429..03661692e7e3 100644 --- a/src/query/service/src/catalogs/default/database_catalog.rs +++ b/src/query/service/src/catalogs/default/database_catalog.rs @@ -17,78 +17,78 @@ use std::fmt::Debug; use std::fmt::Formatter; use std::sync::Arc; -use common_catalog::catalog::Catalog; -use common_catalog::catalog::StorageDescription; -use common_catalog::database::Database; -use common_catalog::table_args::TableArgs; -use common_catalog::table_function::TableFunction; -use common_config::InnerConfig; -use common_exception::ErrorCode; -use common_exception::Result; -use common_meta_app::schema::CatalogInfo; -use common_meta_app::schema::CountTablesReply; -use common_meta_app::schema::CountTablesReq; -use common_meta_app::schema::CreateDatabaseReply; -use common_meta_app::schema::CreateDatabaseReq; -use common_meta_app::schema::CreateIndexReply; -use common_meta_app::schema::CreateIndexReq; -use common_meta_app::schema::CreateLockRevReply; -use common_meta_app::schema::CreateLockRevReq; -use common_meta_app::schema::CreateTableReply; -use common_meta_app::schema::CreateTableReq; -use common_meta_app::schema::CreateVirtualColumnReply; -use common_meta_app::schema::CreateVirtualColumnReq; -use common_meta_app::schema::DeleteLockRevReq; -use common_meta_app::schema::DropDatabaseReply; -use common_meta_app::schema::DropDatabaseReq; -use common_meta_app::schema::DropIndexReply; -use common_meta_app::schema::DropIndexReq; -use common_meta_app::schema::DropTableByIdReq; -use common_meta_app::schema::DropTableReply; -use common_meta_app::schema::DropVirtualColumnReply; -use common_meta_app::schema::DropVirtualColumnReq; -use common_meta_app::schema::DroppedId; -use common_meta_app::schema::ExtendLockRevReq; -use common_meta_app::schema::GcDroppedTableReq; -use common_meta_app::schema::GcDroppedTableResp; -use common_meta_app::schema::GetIndexReply; -use common_meta_app::schema::GetIndexReq; -use common_meta_app::schema::GetTableCopiedFileReply; -use common_meta_app::schema::GetTableCopiedFileReq; -use common_meta_app::schema::IndexMeta; -use common_meta_app::schema::ListDroppedTableReq; -use common_meta_app::schema::ListIndexesByIdReq; -use common_meta_app::schema::ListIndexesReq; -use common_meta_app::schema::ListLockRevReq; -use common_meta_app::schema::ListLocksReq; -use common_meta_app::schema::ListVirtualColumnsReq; -use common_meta_app::schema::LockInfo; -use common_meta_app::schema::LockMeta; -use common_meta_app::schema::RenameDatabaseReply; -use common_meta_app::schema::RenameDatabaseReq; -use common_meta_app::schema::RenameTableReply; -use common_meta_app::schema::RenameTableReq; -use common_meta_app::schema::SetTableColumnMaskPolicyReply; -use common_meta_app::schema::SetTableColumnMaskPolicyReq; -use common_meta_app::schema::TableIdent; -use common_meta_app::schema::TableInfo; -use common_meta_app::schema::TableMeta; -use common_meta_app::schema::TruncateTableReply; -use common_meta_app::schema::TruncateTableReq; -use common_meta_app::schema::UndropDatabaseReply; -use common_meta_app::schema::UndropDatabaseReq; -use common_meta_app::schema::UndropTableReply; -use common_meta_app::schema::UndropTableReq; -use common_meta_app::schema::UpdateIndexReply; -use common_meta_app::schema::UpdateIndexReq; -use common_meta_app::schema::UpdateTableMetaReply; -use common_meta_app::schema::UpdateTableMetaReq; -use common_meta_app::schema::UpdateVirtualColumnReply; -use common_meta_app::schema::UpdateVirtualColumnReq; -use common_meta_app::schema::UpsertTableOptionReply; -use common_meta_app::schema::UpsertTableOptionReq; -use common_meta_app::schema::VirtualColumnMeta; -use common_meta_types::MetaId; +use databend_common_catalog::catalog::Catalog; +use databend_common_catalog::catalog::StorageDescription; +use databend_common_catalog::database::Database; +use databend_common_catalog::table_args::TableArgs; +use databend_common_catalog::table_function::TableFunction; +use databend_common_config::InnerConfig; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_meta_app::schema::CatalogInfo; +use databend_common_meta_app::schema::CountTablesReply; +use databend_common_meta_app::schema::CountTablesReq; +use databend_common_meta_app::schema::CreateDatabaseReply; +use databend_common_meta_app::schema::CreateDatabaseReq; +use databend_common_meta_app::schema::CreateIndexReply; +use databend_common_meta_app::schema::CreateIndexReq; +use databend_common_meta_app::schema::CreateLockRevReply; +use databend_common_meta_app::schema::CreateLockRevReq; +use databend_common_meta_app::schema::CreateTableReply; +use databend_common_meta_app::schema::CreateTableReq; +use databend_common_meta_app::schema::CreateVirtualColumnReply; +use databend_common_meta_app::schema::CreateVirtualColumnReq; +use databend_common_meta_app::schema::DeleteLockRevReq; +use databend_common_meta_app::schema::DropDatabaseReply; +use databend_common_meta_app::schema::DropDatabaseReq; +use databend_common_meta_app::schema::DropIndexReply; +use databend_common_meta_app::schema::DropIndexReq; +use databend_common_meta_app::schema::DropTableByIdReq; +use databend_common_meta_app::schema::DropTableReply; +use databend_common_meta_app::schema::DropVirtualColumnReply; +use databend_common_meta_app::schema::DropVirtualColumnReq; +use databend_common_meta_app::schema::DroppedId; +use databend_common_meta_app::schema::ExtendLockRevReq; +use databend_common_meta_app::schema::GcDroppedTableReq; +use databend_common_meta_app::schema::GcDroppedTableResp; +use databend_common_meta_app::schema::GetIndexReply; +use databend_common_meta_app::schema::GetIndexReq; +use databend_common_meta_app::schema::GetTableCopiedFileReply; +use databend_common_meta_app::schema::GetTableCopiedFileReq; +use databend_common_meta_app::schema::IndexMeta; +use databend_common_meta_app::schema::ListDroppedTableReq; +use databend_common_meta_app::schema::ListIndexesByIdReq; +use databend_common_meta_app::schema::ListIndexesReq; +use databend_common_meta_app::schema::ListLockRevReq; +use databend_common_meta_app::schema::ListLocksReq; +use databend_common_meta_app::schema::ListVirtualColumnsReq; +use databend_common_meta_app::schema::LockInfo; +use databend_common_meta_app::schema::LockMeta; +use databend_common_meta_app::schema::RenameDatabaseReply; +use databend_common_meta_app::schema::RenameDatabaseReq; +use databend_common_meta_app::schema::RenameTableReply; +use databend_common_meta_app::schema::RenameTableReq; +use databend_common_meta_app::schema::SetTableColumnMaskPolicyReply; +use databend_common_meta_app::schema::SetTableColumnMaskPolicyReq; +use databend_common_meta_app::schema::TableIdent; +use databend_common_meta_app::schema::TableInfo; +use databend_common_meta_app::schema::TableMeta; +use databend_common_meta_app::schema::TruncateTableReply; +use databend_common_meta_app::schema::TruncateTableReq; +use databend_common_meta_app::schema::UndropDatabaseReply; +use databend_common_meta_app::schema::UndropDatabaseReq; +use databend_common_meta_app::schema::UndropTableReply; +use databend_common_meta_app::schema::UndropTableReq; +use databend_common_meta_app::schema::UpdateIndexReply; +use databend_common_meta_app::schema::UpdateIndexReq; +use databend_common_meta_app::schema::UpdateTableMetaReply; +use databend_common_meta_app::schema::UpdateTableMetaReq; +use databend_common_meta_app::schema::UpdateVirtualColumnReply; +use databend_common_meta_app::schema::UpdateVirtualColumnReq; +use databend_common_meta_app::schema::UpsertTableOptionReply; +use databend_common_meta_app::schema::UpsertTableOptionReq; +use databend_common_meta_app::schema::VirtualColumnMeta; +use databend_common_meta_types::MetaId; use log::info; use crate::catalogs::default::ImmutableCatalog; diff --git a/src/query/service/src/catalogs/default/immutable_catalog.rs b/src/query/service/src/catalogs/default/immutable_catalog.rs index f3323711982a..21d577cfcedb 100644 --- a/src/query/service/src/catalogs/default/immutable_catalog.rs +++ b/src/query/service/src/catalogs/default/immutable_catalog.rs @@ -17,70 +17,70 @@ use std::fmt::Debug; use std::fmt::Formatter; use std::sync::Arc; -use common_catalog::catalog::Catalog; -use common_config::InnerConfig; -use common_exception::ErrorCode; -use common_exception::Result; -use common_meta_app::schema::CatalogInfo; -use common_meta_app::schema::CountTablesReply; -use common_meta_app::schema::CountTablesReq; -use common_meta_app::schema::CreateDatabaseReply; -use common_meta_app::schema::CreateDatabaseReq; -use common_meta_app::schema::CreateIndexReply; -use common_meta_app::schema::CreateIndexReq; -use common_meta_app::schema::CreateLockRevReply; -use common_meta_app::schema::CreateLockRevReq; -use common_meta_app::schema::CreateTableReply; -use common_meta_app::schema::CreateTableReq; -use common_meta_app::schema::CreateVirtualColumnReply; -use common_meta_app::schema::CreateVirtualColumnReq; -use common_meta_app::schema::DeleteLockRevReq; -use common_meta_app::schema::DropDatabaseReply; -use common_meta_app::schema::DropDatabaseReq; -use common_meta_app::schema::DropIndexReply; -use common_meta_app::schema::DropIndexReq; -use common_meta_app::schema::DropTableByIdReq; -use common_meta_app::schema::DropTableReply; -use common_meta_app::schema::DropVirtualColumnReply; -use common_meta_app::schema::DropVirtualColumnReq; -use common_meta_app::schema::ExtendLockRevReq; -use common_meta_app::schema::GetIndexReply; -use common_meta_app::schema::GetIndexReq; -use common_meta_app::schema::GetTableCopiedFileReply; -use common_meta_app::schema::GetTableCopiedFileReq; -use common_meta_app::schema::IndexMeta; -use common_meta_app::schema::ListIndexesByIdReq; -use common_meta_app::schema::ListIndexesReq; -use common_meta_app::schema::ListLockRevReq; -use common_meta_app::schema::ListLocksReq; -use common_meta_app::schema::ListVirtualColumnsReq; -use common_meta_app::schema::LockInfo; -use common_meta_app::schema::LockMeta; -use common_meta_app::schema::RenameDatabaseReply; -use common_meta_app::schema::RenameDatabaseReq; -use common_meta_app::schema::RenameTableReply; -use common_meta_app::schema::RenameTableReq; -use common_meta_app::schema::SetTableColumnMaskPolicyReply; -use common_meta_app::schema::SetTableColumnMaskPolicyReq; -use common_meta_app::schema::TableIdent; -use common_meta_app::schema::TableInfo; -use common_meta_app::schema::TableMeta; -use common_meta_app::schema::TruncateTableReply; -use common_meta_app::schema::TruncateTableReq; -use common_meta_app::schema::UndropDatabaseReply; -use common_meta_app::schema::UndropDatabaseReq; -use common_meta_app::schema::UndropTableReply; -use common_meta_app::schema::UndropTableReq; -use common_meta_app::schema::UpdateIndexReply; -use common_meta_app::schema::UpdateIndexReq; -use common_meta_app::schema::UpdateTableMetaReply; -use common_meta_app::schema::UpdateTableMetaReq; -use common_meta_app::schema::UpdateVirtualColumnReply; -use common_meta_app::schema::UpdateVirtualColumnReq; -use common_meta_app::schema::UpsertTableOptionReply; -use common_meta_app::schema::UpsertTableOptionReq; -use common_meta_app::schema::VirtualColumnMeta; -use common_meta_types::MetaId; +use databend_common_catalog::catalog::Catalog; +use databend_common_config::InnerConfig; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_meta_app::schema::CatalogInfo; +use databend_common_meta_app::schema::CountTablesReply; +use databend_common_meta_app::schema::CountTablesReq; +use databend_common_meta_app::schema::CreateDatabaseReply; +use databend_common_meta_app::schema::CreateDatabaseReq; +use databend_common_meta_app::schema::CreateIndexReply; +use databend_common_meta_app::schema::CreateIndexReq; +use databend_common_meta_app::schema::CreateLockRevReply; +use databend_common_meta_app::schema::CreateLockRevReq; +use databend_common_meta_app::schema::CreateTableReply; +use databend_common_meta_app::schema::CreateTableReq; +use databend_common_meta_app::schema::CreateVirtualColumnReply; +use databend_common_meta_app::schema::CreateVirtualColumnReq; +use databend_common_meta_app::schema::DeleteLockRevReq; +use databend_common_meta_app::schema::DropDatabaseReply; +use databend_common_meta_app::schema::DropDatabaseReq; +use databend_common_meta_app::schema::DropIndexReply; +use databend_common_meta_app::schema::DropIndexReq; +use databend_common_meta_app::schema::DropTableByIdReq; +use databend_common_meta_app::schema::DropTableReply; +use databend_common_meta_app::schema::DropVirtualColumnReply; +use databend_common_meta_app::schema::DropVirtualColumnReq; +use databend_common_meta_app::schema::ExtendLockRevReq; +use databend_common_meta_app::schema::GetIndexReply; +use databend_common_meta_app::schema::GetIndexReq; +use databend_common_meta_app::schema::GetTableCopiedFileReply; +use databend_common_meta_app::schema::GetTableCopiedFileReq; +use databend_common_meta_app::schema::IndexMeta; +use databend_common_meta_app::schema::ListIndexesByIdReq; +use databend_common_meta_app::schema::ListIndexesReq; +use databend_common_meta_app::schema::ListLockRevReq; +use databend_common_meta_app::schema::ListLocksReq; +use databend_common_meta_app::schema::ListVirtualColumnsReq; +use databend_common_meta_app::schema::LockInfo; +use databend_common_meta_app::schema::LockMeta; +use databend_common_meta_app::schema::RenameDatabaseReply; +use databend_common_meta_app::schema::RenameDatabaseReq; +use databend_common_meta_app::schema::RenameTableReply; +use databend_common_meta_app::schema::RenameTableReq; +use databend_common_meta_app::schema::SetTableColumnMaskPolicyReply; +use databend_common_meta_app::schema::SetTableColumnMaskPolicyReq; +use databend_common_meta_app::schema::TableIdent; +use databend_common_meta_app::schema::TableInfo; +use databend_common_meta_app::schema::TableMeta; +use databend_common_meta_app::schema::TruncateTableReply; +use databend_common_meta_app::schema::TruncateTableReq; +use databend_common_meta_app::schema::UndropDatabaseReply; +use databend_common_meta_app::schema::UndropDatabaseReq; +use databend_common_meta_app::schema::UndropTableReply; +use databend_common_meta_app::schema::UndropTableReq; +use databend_common_meta_app::schema::UpdateIndexReply; +use databend_common_meta_app::schema::UpdateIndexReq; +use databend_common_meta_app::schema::UpdateTableMetaReply; +use databend_common_meta_app::schema::UpdateTableMetaReq; +use databend_common_meta_app::schema::UpdateVirtualColumnReply; +use databend_common_meta_app::schema::UpdateVirtualColumnReq; +use databend_common_meta_app::schema::UpsertTableOptionReply; +use databend_common_meta_app::schema::UpsertTableOptionReq; +use databend_common_meta_app::schema::VirtualColumnMeta; +use databend_common_meta_types::MetaId; use crate::catalogs::InMemoryMetas; use crate::catalogs::SYS_DB_ID_BEGIN; @@ -198,7 +198,7 @@ impl Catalog for ImmutableCatalog { Ok(table.name().to_string()) } - async fn get_db_name_by_id(&self, db_id: MetaId) -> common_exception::Result { + async fn get_db_name_by_id(&self, db_id: MetaId) -> databend_common_exception::Result { if self.sys_db.get_db_info().ident.db_id == db_id { Ok("system".to_string()) } else if self.info_schema_db.get_db_info().ident.db_id == db_id { diff --git a/src/query/service/src/catalogs/default/mutable_catalog.rs b/src/query/service/src/catalogs/default/mutable_catalog.rs index 6fc5f5d3d66f..88460e4630e5 100644 --- a/src/query/service/src/catalogs/default/mutable_catalog.rs +++ b/src/query/service/src/catalogs/default/mutable_catalog.rs @@ -17,82 +17,82 @@ use std::fmt::Debug; use std::fmt::Formatter; use std::sync::Arc; -use common_catalog::catalog::Catalog; -use common_config::InnerConfig; -use common_exception::Result; -use common_meta_api::SchemaApi; -use common_meta_app::schema::CatalogInfo; -use common_meta_app::schema::CountTablesReply; -use common_meta_app::schema::CountTablesReq; -use common_meta_app::schema::CreateDatabaseReply; -use common_meta_app::schema::CreateDatabaseReq; -use common_meta_app::schema::CreateIndexReply; -use common_meta_app::schema::CreateIndexReq; -use common_meta_app::schema::CreateLockRevReply; -use common_meta_app::schema::CreateLockRevReq; -use common_meta_app::schema::CreateTableReply; -use common_meta_app::schema::CreateTableReq; -use common_meta_app::schema::CreateVirtualColumnReply; -use common_meta_app::schema::CreateVirtualColumnReq; -use common_meta_app::schema::DatabaseIdent; -use common_meta_app::schema::DatabaseInfo; -use common_meta_app::schema::DatabaseMeta; -use common_meta_app::schema::DatabaseNameIdent; -use common_meta_app::schema::DatabaseType; -use common_meta_app::schema::DeleteLockRevReq; -use common_meta_app::schema::DropDatabaseReply; -use common_meta_app::schema::DropDatabaseReq; -use common_meta_app::schema::DropIndexReply; -use common_meta_app::schema::DropIndexReq; -use common_meta_app::schema::DropTableByIdReq; -use common_meta_app::schema::DropTableReply; -use common_meta_app::schema::DropVirtualColumnReply; -use common_meta_app::schema::DropVirtualColumnReq; -use common_meta_app::schema::DroppedId; -use common_meta_app::schema::ExtendLockRevReq; -use common_meta_app::schema::GcDroppedTableReq; -use common_meta_app::schema::GcDroppedTableResp; -use common_meta_app::schema::GetDatabaseReq; -use common_meta_app::schema::GetIndexReply; -use common_meta_app::schema::GetIndexReq; -use common_meta_app::schema::GetTableCopiedFileReply; -use common_meta_app::schema::GetTableCopiedFileReq; -use common_meta_app::schema::IndexMeta; -use common_meta_app::schema::ListDatabaseReq; -use common_meta_app::schema::ListDroppedTableReq; -use common_meta_app::schema::ListIndexesByIdReq; -use common_meta_app::schema::ListIndexesReq; -use common_meta_app::schema::ListLockRevReq; -use common_meta_app::schema::ListLocksReq; -use common_meta_app::schema::ListVirtualColumnsReq; -use common_meta_app::schema::LockInfo; -use common_meta_app::schema::LockMeta; -use common_meta_app::schema::RenameDatabaseReply; -use common_meta_app::schema::RenameDatabaseReq; -use common_meta_app::schema::RenameTableReply; -use common_meta_app::schema::RenameTableReq; -use common_meta_app::schema::SetTableColumnMaskPolicyReply; -use common_meta_app::schema::SetTableColumnMaskPolicyReq; -use common_meta_app::schema::TableIdent; -use common_meta_app::schema::TableInfo; -use common_meta_app::schema::TableMeta; -use common_meta_app::schema::TruncateTableReply; -use common_meta_app::schema::TruncateTableReq; -use common_meta_app::schema::UndropDatabaseReply; -use common_meta_app::schema::UndropDatabaseReq; -use common_meta_app::schema::UndropTableReply; -use common_meta_app::schema::UndropTableReq; -use common_meta_app::schema::UpdateIndexReply; -use common_meta_app::schema::UpdateIndexReq; -use common_meta_app::schema::UpdateTableMetaReply; -use common_meta_app::schema::UpdateTableMetaReq; -use common_meta_app::schema::UpdateVirtualColumnReply; -use common_meta_app::schema::UpdateVirtualColumnReq; -use common_meta_app::schema::UpsertTableOptionReply; -use common_meta_app::schema::UpsertTableOptionReq; -use common_meta_app::schema::VirtualColumnMeta; -use common_meta_store::MetaStoreProvider; -use common_meta_types::MetaId; +use databend_common_catalog::catalog::Catalog; +use databend_common_config::InnerConfig; +use databend_common_exception::Result; +use databend_common_meta_api::SchemaApi; +use databend_common_meta_app::schema::CatalogInfo; +use databend_common_meta_app::schema::CountTablesReply; +use databend_common_meta_app::schema::CountTablesReq; +use databend_common_meta_app::schema::CreateDatabaseReply; +use databend_common_meta_app::schema::CreateDatabaseReq; +use databend_common_meta_app::schema::CreateIndexReply; +use databend_common_meta_app::schema::CreateIndexReq; +use databend_common_meta_app::schema::CreateLockRevReply; +use databend_common_meta_app::schema::CreateLockRevReq; +use databend_common_meta_app::schema::CreateTableReply; +use databend_common_meta_app::schema::CreateTableReq; +use databend_common_meta_app::schema::CreateVirtualColumnReply; +use databend_common_meta_app::schema::CreateVirtualColumnReq; +use databend_common_meta_app::schema::DatabaseIdent; +use databend_common_meta_app::schema::DatabaseInfo; +use databend_common_meta_app::schema::DatabaseMeta; +use databend_common_meta_app::schema::DatabaseNameIdent; +use databend_common_meta_app::schema::DatabaseType; +use databend_common_meta_app::schema::DeleteLockRevReq; +use databend_common_meta_app::schema::DropDatabaseReply; +use databend_common_meta_app::schema::DropDatabaseReq; +use databend_common_meta_app::schema::DropIndexReply; +use databend_common_meta_app::schema::DropIndexReq; +use databend_common_meta_app::schema::DropTableByIdReq; +use databend_common_meta_app::schema::DropTableReply; +use databend_common_meta_app::schema::DropVirtualColumnReply; +use databend_common_meta_app::schema::DropVirtualColumnReq; +use databend_common_meta_app::schema::DroppedId; +use databend_common_meta_app::schema::ExtendLockRevReq; +use databend_common_meta_app::schema::GcDroppedTableReq; +use databend_common_meta_app::schema::GcDroppedTableResp; +use databend_common_meta_app::schema::GetDatabaseReq; +use databend_common_meta_app::schema::GetIndexReply; +use databend_common_meta_app::schema::GetIndexReq; +use databend_common_meta_app::schema::GetTableCopiedFileReply; +use databend_common_meta_app::schema::GetTableCopiedFileReq; +use databend_common_meta_app::schema::IndexMeta; +use databend_common_meta_app::schema::ListDatabaseReq; +use databend_common_meta_app::schema::ListDroppedTableReq; +use databend_common_meta_app::schema::ListIndexesByIdReq; +use databend_common_meta_app::schema::ListIndexesReq; +use databend_common_meta_app::schema::ListLockRevReq; +use databend_common_meta_app::schema::ListLocksReq; +use databend_common_meta_app::schema::ListVirtualColumnsReq; +use databend_common_meta_app::schema::LockInfo; +use databend_common_meta_app::schema::LockMeta; +use databend_common_meta_app::schema::RenameDatabaseReply; +use databend_common_meta_app::schema::RenameDatabaseReq; +use databend_common_meta_app::schema::RenameTableReply; +use databend_common_meta_app::schema::RenameTableReq; +use databend_common_meta_app::schema::SetTableColumnMaskPolicyReply; +use databend_common_meta_app::schema::SetTableColumnMaskPolicyReq; +use databend_common_meta_app::schema::TableIdent; +use databend_common_meta_app::schema::TableInfo; +use databend_common_meta_app::schema::TableMeta; +use databend_common_meta_app::schema::TruncateTableReply; +use databend_common_meta_app::schema::TruncateTableReq; +use databend_common_meta_app::schema::UndropDatabaseReply; +use databend_common_meta_app::schema::UndropDatabaseReq; +use databend_common_meta_app::schema::UndropTableReply; +use databend_common_meta_app::schema::UndropTableReq; +use databend_common_meta_app::schema::UpdateIndexReply; +use databend_common_meta_app::schema::UpdateIndexReq; +use databend_common_meta_app::schema::UpdateTableMetaReply; +use databend_common_meta_app::schema::UpdateTableMetaReq; +use databend_common_meta_app::schema::UpdateVirtualColumnReply; +use databend_common_meta_app::schema::UpdateVirtualColumnReq; +use databend_common_meta_app::schema::UpsertTableOptionReply; +use databend_common_meta_app::schema::UpsertTableOptionReq; +use databend_common_meta_app::schema::VirtualColumnMeta; +use databend_common_meta_store::MetaStoreProvider; +use databend_common_meta_types::MetaId; use log::info; use crate::catalogs::default::catalog_context::CatalogContext; @@ -348,19 +348,22 @@ impl Catalog for MutableCatalog { async fn get_table_meta_by_id( &self, table_id: MetaId, - ) -> common_exception::Result<(TableIdent, Arc)> { + ) -> databend_common_exception::Result<(TableIdent, Arc)> { let res = self.ctx.meta.get_table_by_id(table_id).await?; Ok(res) } #[async_backtrace::framed] - async fn get_table_name_by_id(&self, table_id: MetaId) -> common_exception::Result { + async fn get_table_name_by_id( + &self, + table_id: MetaId, + ) -> databend_common_exception::Result { let res = self.ctx.meta.get_table_name_by_id(table_id).await?; Ok(res) } #[async_backtrace::framed] - async fn get_db_name_by_id(&self, db_id: MetaId) -> common_exception::Result { + async fn get_db_name_by_id(&self, db_id: MetaId) -> databend_common_exception::Result { let res = self.ctx.meta.get_db_name_by_id(db_id).await?; Ok(res) } diff --git a/src/query/service/src/catalogs/default/table_memory_meta.rs b/src/query/service/src/catalogs/default/table_memory_meta.rs index 6702eb52fa67..0bb61a8fd985 100644 --- a/src/query/service/src/catalogs/default/table_memory_meta.rs +++ b/src/query/service/src/catalogs/default/table_memory_meta.rs @@ -16,10 +16,10 @@ use std::sync::atomic::AtomicU64; use std::sync::atomic::Ordering; use std::sync::Arc; -use common_exception::ErrorCode; -use common_exception::Result; -use common_meta_types::MetaId; use dashmap::DashMap; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_meta_types::MetaId; use crate::storages::Table; diff --git a/src/query/service/src/catalogs/mod.rs b/src/query/service/src/catalogs/mod.rs index 42028576da8d..b6d6c80a1b71 100644 --- a/src/query/service/src/catalogs/mod.rs +++ b/src/query/service/src/catalogs/mod.rs @@ -13,8 +13,8 @@ // limitations under the License. pub mod default; -pub use common_catalog::catalog::Catalog; -pub use common_storages_hive as hive; +pub use databend_common_catalog::catalog::Catalog; +pub use databend_common_storages_hive as hive; pub use default::table_id_ranges::*; pub use default::table_memory_meta::InMemoryMetas; pub use default::DatabaseCatalog; diff --git a/src/query/service/src/clusters/cluster.rs b/src/query/service/src/clusters/cluster.rs index 38c3284045c1..70d9b133c622 100644 --- a/src/query/service/src/clusters/cluster.rs +++ b/src/query/service/src/clusters/cluster.rs @@ -21,29 +21,29 @@ use std::sync::Arc; use std::time::Duration; use std::time::Instant; -use common_arrow::arrow_format::flight::service::flight_service_client::FlightServiceClient; -use common_base::base::tokio; -use common_base::base::tokio::sync::Mutex; -use common_base::base::tokio::sync::Notify; -use common_base::base::tokio::task::JoinHandle; -use common_base::base::tokio::time::sleep as tokio_async_sleep; -use common_base::base::DummySignalStream; -use common_base::base::GlobalInstance; -use common_base::base::SignalStream; -use common_base::base::SignalType; -pub use common_catalog::cluster_info::Cluster; -use common_config::InnerConfig; -use common_config::DATABEND_COMMIT_VERSION; -use common_exception::ErrorCode; -use common_exception::Result; -use common_grpc::ConnectionFactory; -use common_management::ClusterApi; -use common_management::ClusterMgr; -use common_meta_store::MetaStore; -use common_meta_store::MetaStoreProvider; -use common_meta_types::MatchSeq; -use common_meta_types::NodeInfo; -use common_metrics::cluster::*; +use databend_common_arrow::arrow_format::flight::service::flight_service_client::FlightServiceClient; +use databend_common_base::base::tokio; +use databend_common_base::base::tokio::sync::Mutex; +use databend_common_base::base::tokio::sync::Notify; +use databend_common_base::base::tokio::task::JoinHandle; +use databend_common_base::base::tokio::time::sleep as tokio_async_sleep; +use databend_common_base::base::DummySignalStream; +use databend_common_base::base::GlobalInstance; +use databend_common_base::base::SignalStream; +use databend_common_base::base::SignalType; +pub use databend_common_catalog::cluster_info::Cluster; +use databend_common_config::InnerConfig; +use databend_common_config::DATABEND_COMMIT_VERSION; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_grpc::ConnectionFactory; +use databend_common_management::ClusterApi; +use databend_common_management::ClusterMgr; +use databend_common_meta_store::MetaStore; +use databend_common_meta_store::MetaStoreProvider; +use databend_common_meta_types::MatchSeq; +use databend_common_meta_types::NodeInfo; +use databend_common_metrics::cluster::*; use futures::future::select; use futures::future::Either; use futures::Future; diff --git a/src/query/service/src/databases/database.rs b/src/query/service/src/databases/database.rs index 117b7ac3e5b4..1ee7958f17e1 100644 --- a/src/query/service/src/databases/database.rs +++ b/src/query/service/src/databases/database.rs @@ -12,4 +12,4 @@ // See the License for the specific language governing permissions and // limitations under the License. -pub use common_catalog::database::Database; +pub use databend_common_catalog::database::Database; diff --git a/src/query/service/src/databases/database_context.rs b/src/query/service/src/databases/database_context.rs index 5e93e93bc350..3077d75ae4d3 100644 --- a/src/query/service/src/databases/database_context.rs +++ b/src/query/service/src/databases/database_context.rs @@ -14,7 +14,7 @@ use std::sync::Arc; -use common_meta_store::MetaStore; +use databend_common_meta_store::MetaStore; use crate::storages::StorageFactory; diff --git a/src/query/service/src/databases/database_factory.rs b/src/query/service/src/databases/database_factory.rs index 15d0d26c56dd..3e169740ee00 100644 --- a/src/query/service/src/databases/database_factory.rs +++ b/src/query/service/src/databases/database_factory.rs @@ -14,11 +14,11 @@ use std::sync::Arc; -use common_config::InnerConfig; -use common_exception::ErrorCode; -use common_exception::Result; -use common_meta_app::schema::DatabaseInfo; use dashmap::DashMap; +use databend_common_config::InnerConfig; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_meta_app::schema::DatabaseInfo; use crate::databases::default::DefaultDatabase; use crate::databases::share::ShareDatabase; diff --git a/src/query/service/src/databases/default/default_database.rs b/src/query/service/src/databases/default/default_database.rs index bb8aef3fcd95..e5a658ff6fe0 100644 --- a/src/query/service/src/databases/default/default_database.rs +++ b/src/query/service/src/databases/default/default_database.rs @@ -14,31 +14,31 @@ use std::sync::Arc; -use common_catalog::table::Table; -use common_exception::Result; -use common_meta_api::SchemaApi; -use common_meta_app::schema::CreateTableReply; -use common_meta_app::schema::CreateTableReq; -use common_meta_app::schema::DatabaseInfo; -use common_meta_app::schema::DropTableByIdReq; -use common_meta_app::schema::DropTableReply; -use common_meta_app::schema::GetTableCopiedFileReply; -use common_meta_app::schema::GetTableCopiedFileReq; -use common_meta_app::schema::GetTableReq; -use common_meta_app::schema::ListTableReq; -use common_meta_app::schema::RenameTableReply; -use common_meta_app::schema::RenameTableReq; -use common_meta_app::schema::SetTableColumnMaskPolicyReply; -use common_meta_app::schema::SetTableColumnMaskPolicyReq; -use common_meta_app::schema::TableInfo; -use common_meta_app::schema::TruncateTableReply; -use common_meta_app::schema::TruncateTableReq; -use common_meta_app::schema::UndropTableReply; -use common_meta_app::schema::UndropTableReq; -use common_meta_app::schema::UpdateTableMetaReply; -use common_meta_app::schema::UpdateTableMetaReq; -use common_meta_app::schema::UpsertTableOptionReply; -use common_meta_app::schema::UpsertTableOptionReq; +use databend_common_catalog::table::Table; +use databend_common_exception::Result; +use databend_common_meta_api::SchemaApi; +use databend_common_meta_app::schema::CreateTableReply; +use databend_common_meta_app::schema::CreateTableReq; +use databend_common_meta_app::schema::DatabaseInfo; +use databend_common_meta_app::schema::DropTableByIdReq; +use databend_common_meta_app::schema::DropTableReply; +use databend_common_meta_app::schema::GetTableCopiedFileReply; +use databend_common_meta_app::schema::GetTableCopiedFileReq; +use databend_common_meta_app::schema::GetTableReq; +use databend_common_meta_app::schema::ListTableReq; +use databend_common_meta_app::schema::RenameTableReply; +use databend_common_meta_app::schema::RenameTableReq; +use databend_common_meta_app::schema::SetTableColumnMaskPolicyReply; +use databend_common_meta_app::schema::SetTableColumnMaskPolicyReq; +use databend_common_meta_app::schema::TableInfo; +use databend_common_meta_app::schema::TruncateTableReply; +use databend_common_meta_app::schema::TruncateTableReq; +use databend_common_meta_app::schema::UndropTableReply; +use databend_common_meta_app::schema::UndropTableReq; +use databend_common_meta_app::schema::UpdateTableMetaReply; +use databend_common_meta_app::schema::UpdateTableMetaReq; +use databend_common_meta_app::schema::UpsertTableOptionReply; +use databend_common_meta_app::schema::UpsertTableOptionReq; use crate::databases::Database; use crate::databases::DatabaseContext; diff --git a/src/query/service/src/databases/information_schema/information_schema_database.rs b/src/query/service/src/databases/information_schema/information_schema_database.rs index 77a054acbdbd..705c81bf26b3 100644 --- a/src/query/service/src/databases/information_schema/information_schema_database.rs +++ b/src/query/service/src/databases/information_schema/information_schema_database.rs @@ -14,17 +14,17 @@ use std::sync::Arc; -use common_meta_app::schema::DatabaseIdent; -use common_meta_app::schema::DatabaseInfo; -use common_meta_app::schema::DatabaseMeta; -use common_meta_app::schema::DatabaseNameIdent; -use common_storages_information_schema::ColumnsTable; -use common_storages_information_schema::KeyColumnUsageTable; -use common_storages_information_schema::KeywordsTable; -use common_storages_information_schema::SchemataTable; -use common_storages_information_schema::StatisticsTable; -use common_storages_information_schema::TablesTable; -use common_storages_information_schema::ViewsTable; +use databend_common_meta_app::schema::DatabaseIdent; +use databend_common_meta_app::schema::DatabaseInfo; +use databend_common_meta_app::schema::DatabaseMeta; +use databend_common_meta_app::schema::DatabaseNameIdent; +use databend_common_storages_information_schema::ColumnsTable; +use databend_common_storages_information_schema::KeyColumnUsageTable; +use databend_common_storages_information_schema::KeywordsTable; +use databend_common_storages_information_schema::SchemataTable; +use databend_common_storages_information_schema::StatisticsTable; +use databend_common_storages_information_schema::TablesTable; +use databend_common_storages_information_schema::ViewsTable; use crate::catalogs::InMemoryMetas; use crate::databases::Database; diff --git a/src/query/service/src/databases/share/share_database.rs b/src/query/service/src/databases/share/share_database.rs index a27c8a27df55..c53dc64b69b8 100644 --- a/src/query/service/src/databases/share/share_database.rs +++ b/src/query/service/src/databases/share/share_database.rs @@ -15,31 +15,31 @@ use std::str; use std::sync::Arc; -use common_catalog::table::Table; -use common_exception::ErrorCode; -use common_exception::Result; -use common_meta_api::SchemaApi; -use common_meta_app::schema::CreateTableReply; -use common_meta_app::schema::CreateTableReq; -use common_meta_app::schema::DatabaseInfo; -use common_meta_app::schema::DropTableByIdReq; -use common_meta_app::schema::DropTableReply; -use common_meta_app::schema::GetTableCopiedFileReply; -use common_meta_app::schema::GetTableCopiedFileReq; -use common_meta_app::schema::RenameTableReply; -use common_meta_app::schema::RenameTableReq; -use common_meta_app::schema::SetTableColumnMaskPolicyReply; -use common_meta_app::schema::SetTableColumnMaskPolicyReq; -use common_meta_app::schema::TableInfo; -use common_meta_app::schema::TruncateTableReply; -use common_meta_app::schema::TruncateTableReq; -use common_meta_app::schema::UndropTableReply; -use common_meta_app::schema::UndropTableReq; -use common_meta_app::schema::UpdateTableMetaReply; -use common_meta_app::schema::UpdateTableMetaReq; -use common_meta_app::schema::UpsertTableOptionReply; -use common_meta_app::schema::UpsertTableOptionReq; -use common_sharing::ShareEndpointManager; +use databend_common_catalog::table::Table; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_meta_api::SchemaApi; +use databend_common_meta_app::schema::CreateTableReply; +use databend_common_meta_app::schema::CreateTableReq; +use databend_common_meta_app::schema::DatabaseInfo; +use databend_common_meta_app::schema::DropTableByIdReq; +use databend_common_meta_app::schema::DropTableReply; +use databend_common_meta_app::schema::GetTableCopiedFileReply; +use databend_common_meta_app::schema::GetTableCopiedFileReq; +use databend_common_meta_app::schema::RenameTableReply; +use databend_common_meta_app::schema::RenameTableReq; +use databend_common_meta_app::schema::SetTableColumnMaskPolicyReply; +use databend_common_meta_app::schema::SetTableColumnMaskPolicyReq; +use databend_common_meta_app::schema::TableInfo; +use databend_common_meta_app::schema::TruncateTableReply; +use databend_common_meta_app::schema::TruncateTableReq; +use databend_common_meta_app::schema::UndropTableReply; +use databend_common_meta_app::schema::UndropTableReq; +use databend_common_meta_app::schema::UpdateTableMetaReply; +use databend_common_meta_app::schema::UpdateTableMetaReq; +use databend_common_meta_app::schema::UpsertTableOptionReply; +use databend_common_meta_app::schema::UpsertTableOptionReq; +use databend_common_sharing::ShareEndpointManager; use crate::databases::Database; use crate::databases::DatabaseContext; diff --git a/src/query/service/src/databases/system/system_database.rs b/src/query/service/src/databases/system/system_database.rs index e127d38089aa..591d4976389f 100644 --- a/src/query/service/src/databases/system/system_database.rs +++ b/src/query/service/src/databases/system/system_database.rs @@ -15,50 +15,50 @@ use std::collections::HashMap; use std::sync::Arc; -use common_config::InnerConfig; -use common_meta_app::schema::DatabaseIdent; -use common_meta_app::schema::DatabaseInfo; -use common_meta_app::schema::DatabaseMeta; -use common_meta_app::schema::DatabaseNameIdent; -use common_storages_system::BackgroundJobTable; -use common_storages_system::BackgroundTaskTable; -use common_storages_system::BacktraceTable; -use common_storages_system::BuildOptionsTable; -use common_storages_system::CachesTable; -use common_storages_system::CatalogsTable; -use common_storages_system::ClusteringHistoryTable; -use common_storages_system::ClustersTable; -use common_storages_system::ColumnsTable; -use common_storages_system::ConfigsTable; -use common_storages_system::ContributorsTable; -use common_storages_system::CreditsTable; -use common_storages_system::DatabasesTable; -use common_storages_system::EnginesTable; -use common_storages_system::FunctionsTable; -use common_storages_system::IndexesTable; -use common_storages_system::LocksTable; -use common_storages_system::MallocStatsTable; -use common_storages_system::MallocStatsTotalsTable; -use common_storages_system::MetricsTable; -use common_storages_system::OneTable; -use common_storages_system::ProcessesTable; -use common_storages_system::ProcessorProfileTable; -use common_storages_system::QueryCacheTable; -use common_storages_system::QueryLogTable; -use common_storages_system::QueryProfileTable; -use common_storages_system::QuerySummaryTable; -use common_storages_system::RolesTable; -use common_storages_system::SettingsTable; -use common_storages_system::StagesTable; -use common_storages_system::StreamsTable; -use common_storages_system::TableFunctionsTable; -use common_storages_system::TablesTableWithHistory; -use common_storages_system::TablesTableWithoutHistory; -use common_storages_system::TaskHistoryTable; -use common_storages_system::TasksTable; -use common_storages_system::TempFilesTable; -use common_storages_system::TracingTable; -use common_storages_system::UsersTable; +use databend_common_config::InnerConfig; +use databend_common_meta_app::schema::DatabaseIdent; +use databend_common_meta_app::schema::DatabaseInfo; +use databend_common_meta_app::schema::DatabaseMeta; +use databend_common_meta_app::schema::DatabaseNameIdent; +use databend_common_storages_system::BackgroundJobTable; +use databend_common_storages_system::BackgroundTaskTable; +use databend_common_storages_system::BacktraceTable; +use databend_common_storages_system::BuildOptionsTable; +use databend_common_storages_system::CachesTable; +use databend_common_storages_system::CatalogsTable; +use databend_common_storages_system::ClusteringHistoryTable; +use databend_common_storages_system::ClustersTable; +use databend_common_storages_system::ColumnsTable; +use databend_common_storages_system::ConfigsTable; +use databend_common_storages_system::ContributorsTable; +use databend_common_storages_system::CreditsTable; +use databend_common_storages_system::DatabasesTable; +use databend_common_storages_system::EnginesTable; +use databend_common_storages_system::FunctionsTable; +use databend_common_storages_system::IndexesTable; +use databend_common_storages_system::LocksTable; +use databend_common_storages_system::MallocStatsTable; +use databend_common_storages_system::MallocStatsTotalsTable; +use databend_common_storages_system::MetricsTable; +use databend_common_storages_system::OneTable; +use databend_common_storages_system::ProcessesTable; +use databend_common_storages_system::ProcessorProfileTable; +use databend_common_storages_system::QueryCacheTable; +use databend_common_storages_system::QueryLogTable; +use databend_common_storages_system::QueryProfileTable; +use databend_common_storages_system::QuerySummaryTable; +use databend_common_storages_system::RolesTable; +use databend_common_storages_system::SettingsTable; +use databend_common_storages_system::StagesTable; +use databend_common_storages_system::StreamsTable; +use databend_common_storages_system::TableFunctionsTable; +use databend_common_storages_system::TablesTableWithHistory; +use databend_common_storages_system::TablesTableWithoutHistory; +use databend_common_storages_system::TaskHistoryTable; +use databend_common_storages_system::TasksTable; +use databend_common_storages_system::TempFilesTable; +use databend_common_storages_system::TracingTable; +use databend_common_storages_system::UsersTable; use crate::catalogs::InMemoryMetas; use crate::databases::Database; diff --git a/src/query/service/src/global_services.rs b/src/query/service/src/global_services.rs index 9bb09f9a9710..72061499d66d 100644 --- a/src/query/service/src/global_services.rs +++ b/src/query/service/src/global_services.rs @@ -15,26 +15,26 @@ use std::collections::BTreeMap; use std::sync::Arc; -use common_base::base::GlobalInstance; -use common_base::runtime::GlobalIORuntime; -use common_base::runtime::GlobalQueryRuntime; -use common_catalog::catalog::CatalogCreator; -use common_catalog::catalog::CatalogManager; -use common_cloud_control::cloud_api::CloudControlApiProvider; -use common_config::GlobalConfig; -use common_config::InnerConfig; -use common_exception::Result; -use common_meta_app::schema::CatalogType; -use common_profile::QueryProfileManager; -use common_sharing::ShareEndpointManager; -use common_storage::DataOperator; -use common_storage::ShareTableConfig; -use common_storages_hive::HiveCreator; -use common_storages_iceberg::IcebergCreator; -use common_tracing::GlobalLogger; -use common_users::RoleCacheManager; -use common_users::UserApiProvider; -use storages_common_cache_manager::CacheManager; +use databend_common_base::base::GlobalInstance; +use databend_common_base::runtime::GlobalIORuntime; +use databend_common_base::runtime::GlobalQueryRuntime; +use databend_common_catalog::catalog::CatalogCreator; +use databend_common_catalog::catalog::CatalogManager; +use databend_common_cloud_control::cloud_api::CloudControlApiProvider; +use databend_common_config::GlobalConfig; +use databend_common_config::InnerConfig; +use databend_common_exception::Result; +use databend_common_meta_app::schema::CatalogType; +use databend_common_profile::QueryProfileManager; +use databend_common_sharing::ShareEndpointManager; +use databend_common_storage::DataOperator; +use databend_common_storage::ShareTableConfig; +use databend_common_storages_hive::HiveCreator; +use databend_common_storages_iceberg::IcebergCreator; +use databend_common_tracing::GlobalLogger; +use databend_common_users::RoleCacheManager; +use databend_common_users::UserApiProvider; +use databend_storages_common_cache_manager::CacheManager; use crate::api::DataExchangeManager; use crate::auth::AuthMgr; diff --git a/src/query/service/src/interpreters/access/accessor.rs b/src/query/service/src/interpreters/access/accessor.rs index 0cb84273e495..9085abae00b5 100644 --- a/src/query/service/src/interpreters/access/accessor.rs +++ b/src/query/service/src/interpreters/access/accessor.rs @@ -15,7 +15,7 @@ use std::collections::HashMap; use std::sync::Arc; -use common_exception::Result; +use databend_common_exception::Result; use crate::interpreters::access::PrivilegeAccess; use crate::interpreters::ManagementModeAccess; diff --git a/src/query/service/src/interpreters/access/management_mode_access.rs b/src/query/service/src/interpreters/access/management_mode_access.rs index 389a26d5a8e7..0bab8c57edec 100644 --- a/src/query/service/src/interpreters/access/management_mode_access.rs +++ b/src/query/service/src/interpreters/access/management_mode_access.rs @@ -14,12 +14,12 @@ use std::sync::Arc; -use common_catalog::table_context::TableContext; -use common_config::GlobalConfig; -use common_exception::ErrorCode; -use common_exception::Result; -use common_storages_stream::stream_table::STREAM_ENGINE; -use common_storages_view::view_table::VIEW_ENGINE; +use databend_common_catalog::table_context::TableContext; +use databend_common_config::GlobalConfig; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_storages_stream::stream_table::STREAM_ENGINE; +use databend_common_storages_view::view_table::VIEW_ENGINE; use crate::interpreters::access::AccessChecker; use crate::sessions::QueryContext; @@ -41,7 +41,7 @@ impl AccessChecker for ManagementModeAccess { if GlobalConfig::instance().query.management_mode { let ok = match plan { Plan::Query {rewrite_kind, .. } => { - use common_sql::plans::RewriteKind; + use databend_common_sql::plans::RewriteKind; match rewrite_kind { Some(ref v) => matches!(v, RewriteKind::ShowDatabases diff --git a/src/query/service/src/interpreters/access/privilege_access.rs b/src/query/service/src/interpreters/access/privilege_access.rs index 756a39d24010..ff547435adc7 100644 --- a/src/query/service/src/interpreters/access/privilege_access.rs +++ b/src/query/service/src/interpreters/access/privilege_access.rs @@ -15,21 +15,21 @@ use std::collections::HashSet; use std::sync::Arc; -use common_catalog::plan::DataSourceInfo; -use common_catalog::table_context::TableContext; -use common_exception::ErrorCode; -use common_exception::Result; -use common_meta_app::principal::GrantObject; -use common_meta_app::principal::GrantObjectByID; -use common_meta_app::principal::StageInfo; -use common_meta_app::principal::StageType; -use common_meta_app::principal::UserGrantSet; -use common_meta_app::principal::UserPrivilegeType; -use common_sql::optimizer::get_udf_names; -use common_sql::plans::InsertInputSource; -use common_sql::plans::PresignAction; -use common_sql::plans::RewriteKind; -use common_users::RoleCacheManager; +use databend_common_catalog::plan::DataSourceInfo; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_meta_app::principal::GrantObject; +use databend_common_meta_app::principal::GrantObjectByID; +use databend_common_meta_app::principal::StageInfo; +use databend_common_meta_app::principal::StageType; +use databend_common_meta_app::principal::UserGrantSet; +use databend_common_meta_app::principal::UserPrivilegeType; +use databend_common_sql::optimizer::get_udf_names; +use databend_common_sql::plans::InsertInputSource; +use databend_common_sql::plans::PresignAction; +use databend_common_sql::plans::RewriteKind; +use databend_common_users::RoleCacheManager; use crate::interpreters::access::AccessChecker; use crate::sessions::QueryContext; diff --git a/src/query/service/src/interpreters/common/grant.rs b/src/query/service/src/interpreters/common/grant.rs index ec8427a76ad8..b5bd7365267a 100644 --- a/src/query/service/src/interpreters/common/grant.rs +++ b/src/query/service/src/interpreters/common/grant.rs @@ -14,10 +14,10 @@ use std::sync::Arc; -use common_catalog::table_context::TableContext; -use common_exception::Result; -use common_meta_app::principal::GrantObject; -use common_users::UserApiProvider; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::Result; +use databend_common_meta_app::principal::GrantObject; +use databend_common_users::UserApiProvider; use crate::sessions::QueryContext; @@ -39,7 +39,7 @@ pub async fn validate_grant_object_exists( .exists_table(tenant.as_str(), database_name, table_name) .await? { - return Err(common_exception::ErrorCode::UnknownTable(format!( + return Err(databend_common_exception::ErrorCode::UnknownTable(format!( "table `{}`.`{}` not exists in catalog '{}'", database_name, table_name, catalog_name, ))); @@ -51,10 +51,9 @@ pub async fn validate_grant_object_exists( .exists_database(tenant.as_str(), database_name) .await? { - return Err(common_exception::ErrorCode::UnknownDatabase(format!( - "database {} not exists", - database_name, - ))); + return Err(databend_common_exception::ErrorCode::UnknownDatabase( + format!("database {} not exists", database_name,), + )); } } GrantObject::UDF(udf) => { @@ -62,7 +61,7 @@ pub async fn validate_grant_object_exists( .exists_udf(tenant.as_str(), udf) .await? { - return Err(common_exception::ErrorCode::UnknownStage(format!( + return Err(databend_common_exception::ErrorCode::UnknownStage(format!( "udf {udf} not exists" ))); } @@ -72,7 +71,7 @@ pub async fn validate_grant_object_exists( .exists_stage(ctx.get_tenant().as_str(), stage) .await? { - return Err(common_exception::ErrorCode::UnknownStage(format!( + return Err(databend_common_exception::ErrorCode::UnknownStage(format!( "stage {stage} not exists" ))); } diff --git a/src/query/service/src/interpreters/common/metrics.rs b/src/query/service/src/interpreters/common/metrics.rs index 71260f7d606a..6cbb3b7c5d0b 100644 --- a/src/query/service/src/interpreters/common/metrics.rs +++ b/src/query/service/src/interpreters/common/metrics.rs @@ -14,9 +14,9 @@ use std::sync::LazyLock; -use common_metrics::register_histogram_family_in_milliseconds; -use common_metrics::Family; -use common_metrics::Histogram; +use databend_common_metrics::register_histogram_family_in_milliseconds; +use databend_common_metrics::Family; +use databend_common_metrics::Histogram; static COMPACT_HOOK_EXECUTION_MS: LazyLock, Histogram>> = LazyLock::new(|| register_histogram_family_in_milliseconds("compact_hook_execution_ms")); diff --git a/src/query/service/src/interpreters/common/query_log.rs b/src/query/service/src/interpreters/common/query_log.rs index fc7c76e29c2a..150f920f8066 100644 --- a/src/query/service/src/interpreters/common/query_log.rs +++ b/src/query/service/src/interpreters/common/query_log.rs @@ -16,12 +16,12 @@ use std::fmt::Write; use std::sync::Arc; use std::time::SystemTime; -use common_config::GlobalConfig; -use common_exception::ErrorCode; -use common_exception::Result; -use common_storages_system::LogType; -use common_storages_system::QueryLogElement; -use common_storages_system::QueryLogQueue; +use databend_common_config::GlobalConfig; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_storages_system::LogType; +use databend_common_storages_system::QueryLogElement; +use databend_common_storages_system::QueryLogQueue; use log::error; use log::info; use serde_json; diff --git a/src/query/service/src/interpreters/common/stream.rs b/src/query/service/src/interpreters/common/stream.rs index 548685ae28d7..79d1daf6bb3d 100644 --- a/src/query/service/src/interpreters/common/stream.rs +++ b/src/query/service/src/interpreters/common/stream.rs @@ -14,19 +14,19 @@ use std::sync::Arc; -use common_exception::Result; -use common_license::license::Feature; -use common_license::license_manager::get_license_manager; -use common_meta_app::schema::UpdateStreamMetaReq; -use common_meta_types::MatchSeq; -use common_sql::MetadataRef; -use common_storages_factory::Table; -use common_storages_fuse::FuseTable; -use common_storages_fuse::TableContext; -use common_storages_stream::stream_table::StreamTable; -use common_storages_stream::stream_table::OPT_KEY_TABLE_VER; -use common_storages_stream::stream_table::STREAM_ENGINE; -use storages_common_table_meta::table::OPT_KEY_SNAPSHOT_LOCATION; +use databend_common_exception::Result; +use databend_common_license::license::Feature; +use databend_common_license::license_manager::get_license_manager; +use databend_common_meta_app::schema::UpdateStreamMetaReq; +use databend_common_meta_types::MatchSeq; +use databend_common_sql::MetadataRef; +use databend_common_storages_factory::Table; +use databend_common_storages_fuse::FuseTable; +use databend_common_storages_fuse::TableContext; +use databend_common_storages_stream::stream_table::StreamTable; +use databend_common_storages_stream::stream_table::OPT_KEY_TABLE_VER; +use databend_common_storages_stream::stream_table::STREAM_ENGINE; +use databend_storages_common_table_meta::table::OPT_KEY_SNAPSHOT_LOCATION; use crate::sessions::QueryContext; diff --git a/src/query/service/src/interpreters/common/table.rs b/src/query/service/src/interpreters/common/table.rs index b814a9c6397b..45e6eebee395 100644 --- a/src/query/service/src/interpreters/common/table.rs +++ b/src/query/service/src/interpreters/common/table.rs @@ -14,12 +14,12 @@ use std::sync::Arc; -use common_catalog::table_context::TableContext; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::ComputedExpr; -use common_expression::DataSchemaRef; -use common_sql::parse_computed_expr; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::ComputedExpr; +use databend_common_expression::DataSchemaRef; +use databend_common_sql::parse_computed_expr; pub fn check_referenced_computed_columns( ctx: Arc, diff --git a/src/query/service/src/interpreters/common/task.rs b/src/query/service/src/interpreters/common/task.rs index 320211bb6c06..1ce4a0108623 100644 --- a/src/query/service/src/interpreters/common/task.rs +++ b/src/query/service/src/interpreters/common/task.rs @@ -14,26 +14,30 @@ use std::sync::Arc; -use common_ast::ast::ScheduleOptions; -use common_ast::ast::WarehouseOptions; -use common_catalog::table_context::TableContext; -use common_cloud_control::client_config::build_client_config; -use common_cloud_control::client_config::ClientConfig; -use common_cloud_control::pb::schedule_options::ScheduleType; -use common_exception::Result; +use databend_common_ast::ast::ScheduleOptions; +use databend_common_ast::ast::WarehouseOptions; +use databend_common_catalog::table_context::TableContext; +use databend_common_cloud_control::client_config::build_client_config; +use databend_common_cloud_control::client_config::ClientConfig; +use databend_common_cloud_control::pb::schedule_options::ScheduleType; +use databend_common_exception::Result; use crate::sessions::QueryContext; -pub fn make_schedule_options(opt: ScheduleOptions) -> common_cloud_control::pb::ScheduleOptions { +pub fn make_schedule_options( + opt: ScheduleOptions, +) -> databend_common_cloud_control::pb::ScheduleOptions { match opt { - ScheduleOptions::IntervalMinutes(minute) => common_cloud_control::pb::ScheduleOptions { - interval: Some(minute as i32), - cron: None, - time_zone: None, - schedule_type: i32::from(ScheduleType::IntervalType), - }, + ScheduleOptions::IntervalMinutes(minute) => { + databend_common_cloud_control::pb::ScheduleOptions { + interval: Some(minute as i32), + cron: None, + time_zone: None, + schedule_type: i32::from(ScheduleType::IntervalType), + } + } ScheduleOptions::CronExpression(expr, timezone) => { - common_cloud_control::pb::ScheduleOptions { + databend_common_cloud_control::pb::ScheduleOptions { interval: None, cron: Some(expr), time_zone: timezone, @@ -43,8 +47,10 @@ pub fn make_schedule_options(opt: ScheduleOptions) -> common_cloud_control::pb:: } } -pub fn make_warehouse_options(opt: WarehouseOptions) -> common_cloud_control::pb::WarehouseOptions { - let mut ret = common_cloud_control::pb::WarehouseOptions { +pub fn make_warehouse_options( + opt: WarehouseOptions, +) -> databend_common_cloud_control::pb::WarehouseOptions { + let mut ret = databend_common_cloud_control::pb::WarehouseOptions { warehouse: None, using_warehouse_size: None, }; diff --git a/src/query/service/src/interpreters/common/util.rs b/src/query/service/src/interpreters/common/util.rs index 5efb581c94f0..7cf33e617875 100644 --- a/src/query/service/src/interpreters/common/util.rs +++ b/src/query/service/src/interpreters/common/util.rs @@ -14,13 +14,13 @@ use std::sync::Arc; -use common_catalog::plan::Filters; -use common_catalog::table_context::TableContext; -use common_exception::Result; -use common_expression::type_check::check_function; -use common_functions::BUILTIN_FUNCTIONS; -use common_meta_kvapi::kvapi::KVApi; -use common_users::UserApiProvider; +use databend_common_catalog::plan::Filters; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::Result; +use databend_common_expression::type_check::check_function; +use databend_common_functions::BUILTIN_FUNCTIONS; +use databend_common_meta_kvapi::kvapi::KVApi; +use databend_common_users::UserApiProvider; use crate::sql::executor::cast_expr_to_non_null_boolean; use crate::sql::ScalarExpr; diff --git a/src/query/service/src/interpreters/hook/compact_hook.rs b/src/query/service/src/interpreters/hook/compact_hook.rs index 73ba57932c84..2f0bdd2dd41c 100644 --- a/src/query/service/src/interpreters/hook/compact_hook.rs +++ b/src/query/service/src/interpreters/hook/compact_hook.rs @@ -15,12 +15,12 @@ use std::sync::Arc; use std::time::Instant; -use common_base::runtime::GlobalIORuntime; -use common_catalog::table_context::TableContext; -use common_exception::Result; -use common_pipeline_core::Pipeline; -use common_sql::plans::OptimizeTableAction; -use common_sql::plans::OptimizeTablePlan; +use databend_common_base::runtime::GlobalIORuntime; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::Result; +use databend_common_pipeline_core::Pipeline; +use databend_common_sql::plans::OptimizeTableAction; +use databend_common_sql::plans::OptimizeTablePlan; use log::info; use crate::interpreters::common::metrics_inc_compact_hook_compact_time_ms; diff --git a/src/query/service/src/interpreters/hook/refresh_hook.rs b/src/query/service/src/interpreters/hook/refresh_hook.rs index 046b9ddfed8f..b151ed841325 100644 --- a/src/query/service/src/interpreters/hook/refresh_hook.rs +++ b/src/query/service/src/interpreters/hook/refresh_hook.rs @@ -14,25 +14,25 @@ use std::sync::Arc; -use common_base::runtime::GlobalIORuntime; -use common_catalog::catalog::CatalogManager; -use common_catalog::table_context::TableContext; -use common_exception::ErrorCode; -use common_exception::Result; -use common_meta_app::schema::IndexMeta; -use common_meta_app::schema::ListIndexesByIdReq; -use common_meta_types::MetaId; -use common_pipeline_core::Pipeline; -use common_sql::plans::Plan; -use common_sql::plans::RefreshIndexPlan; -use common_sql::plans::RefreshVirtualColumnPlan; -use common_sql::BindContext; -use common_sql::Binder; -use common_sql::Metadata; -use common_sql::NameResolutionContext; +use databend_common_base::runtime::GlobalIORuntime; +use databend_common_catalog::catalog::CatalogManager; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_meta_app::schema::IndexMeta; +use databend_common_meta_app::schema::ListIndexesByIdReq; +use databend_common_meta_types::MetaId; +use databend_common_pipeline_core::Pipeline; +use databend_common_sql::plans::Plan; +use databend_common_sql::plans::RefreshIndexPlan; +use databend_common_sql::plans::RefreshVirtualColumnPlan; +use databend_common_sql::BindContext; +use databend_common_sql::Binder; +use databend_common_sql::Metadata; +use databend_common_sql::NameResolutionContext; +use databend_storages_common_table_meta::meta::Location; use log::info; use parking_lot::RwLock; -use storages_common_table_meta::meta::Location; use crate::interpreters::Interpreter; use crate::interpreters::RefreshIndexInterpreter; diff --git a/src/query/service/src/interpreters/interpreter.rs b/src/query/service/src/interpreters/interpreter.rs index b38d6b2a64dc..6e8b2f981fa9 100644 --- a/src/query/service/src/interpreters/interpreter.rs +++ b/src/query/service/src/interpreters/interpreter.rs @@ -15,12 +15,12 @@ use std::sync::Arc; use std::time::SystemTime; -use common_catalog::table_context::TableContext; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::SendableDataBlockStream; -use common_pipeline_core::processors::profile::PlanProfile; -use common_pipeline_core::SourcePipeBuilder; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::SendableDataBlockStream; +use databend_common_pipeline_core::processors::profile::PlanProfile; +use databend_common_pipeline_core::SourcePipeBuilder; use log::error; use log::info; diff --git a/src/query/service/src/interpreters/interpreter_catalog_create.rs b/src/query/service/src/interpreters/interpreter_catalog_create.rs index c3e260998b23..6a7f2b2158b3 100644 --- a/src/query/service/src/interpreters/interpreter_catalog_create.rs +++ b/src/query/service/src/interpreters/interpreter_catalog_create.rs @@ -14,17 +14,17 @@ use std::sync::Arc; -use common_catalog::catalog::CatalogManager; -use common_config::GlobalConfig; -use common_exception::ErrorCode; -use common_exception::Result; -use common_meta_app::schema::CatalogId; -use common_meta_app::schema::CatalogInfo; -use common_meta_app::schema::CatalogMeta; -use common_meta_app::schema::CatalogNameIdent; -use common_meta_app::schema::CatalogOption; -use common_sql::plans::CreateCatalogPlan; -use common_storages_fuse::TableContext; +use databend_common_catalog::catalog::CatalogManager; +use databend_common_config::GlobalConfig; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_meta_app::schema::CatalogId; +use databend_common_meta_app::schema::CatalogInfo; +use databend_common_meta_app::schema::CatalogMeta; +use databend_common_meta_app::schema::CatalogNameIdent; +use databend_common_meta_app::schema::CatalogOption; +use databend_common_sql::plans::CreateCatalogPlan; +use databend_common_storages_fuse::TableContext; use log::debug; use super::Interpreter; diff --git a/src/query/service/src/interpreters/interpreter_catalog_drop.rs b/src/query/service/src/interpreters/interpreter_catalog_drop.rs index 01835eb177c0..c8111c2c57d7 100644 --- a/src/query/service/src/interpreters/interpreter_catalog_drop.rs +++ b/src/query/service/src/interpreters/interpreter_catalog_drop.rs @@ -15,10 +15,10 @@ use std::sync::Arc; use async_trait::async_trait; -use common_catalog::catalog::CatalogManager; -use common_exception::Result; -use common_sql::plans::DropCatalogPlan; -use common_storages_fuse::TableContext; +use databend_common_catalog::catalog::CatalogManager; +use databend_common_exception::Result; +use databend_common_sql::plans::DropCatalogPlan; +use databend_common_storages_fuse::TableContext; use log::debug; use super::Interpreter; diff --git a/src/query/service/src/interpreters/interpreter_catalog_show_create.rs b/src/query/service/src/interpreters/interpreter_catalog_show_create.rs index 0fa8931bad42..df5a8c81066a 100644 --- a/src/query/service/src/interpreters/interpreter_catalog_show_create.rs +++ b/src/query/service/src/interpreters/interpreter_catalog_show_create.rs @@ -14,15 +14,15 @@ use std::sync::Arc; -use common_exception::Result; -use common_expression::types::DataType; -use common_expression::BlockEntry; -use common_expression::DataBlock; -use common_expression::Scalar; -use common_expression::Value; -use common_meta_app::schema::CatalogOption; -use common_meta_app::storage::StorageParams; -use common_sql::plans::ShowCreateCatalogPlan; +use databend_common_exception::Result; +use databend_common_expression::types::DataType; +use databend_common_expression::BlockEntry; +use databend_common_expression::DataBlock; +use databend_common_expression::Scalar; +use databend_common_expression::Value; +use databend_common_meta_app::schema::CatalogOption; +use databend_common_meta_app::storage::StorageParams; +use databend_common_sql::plans::ShowCreateCatalogPlan; use log::debug; use crate::interpreters::Interpreter; diff --git a/src/query/service/src/interpreters/interpreter_cluster_key_alter.rs b/src/query/service/src/interpreters/interpreter_cluster_key_alter.rs index c39e49895ef7..1d497ba637fb 100644 --- a/src/query/service/src/interpreters/interpreter_cluster_key_alter.rs +++ b/src/query/service/src/interpreters/interpreter_cluster_key_alter.rs @@ -14,8 +14,8 @@ use std::sync::Arc; -use common_exception::Result; -use common_sql::plans::AlterTableClusterKeyPlan; +use databend_common_exception::Result; +use databend_common_sql::plans::AlterTableClusterKeyPlan; use super::Interpreter; use crate::pipelines::PipelineBuildResult; diff --git a/src/query/service/src/interpreters/interpreter_cluster_key_drop.rs b/src/query/service/src/interpreters/interpreter_cluster_key_drop.rs index b012df07b943..d45c49719037 100644 --- a/src/query/service/src/interpreters/interpreter_cluster_key_drop.rs +++ b/src/query/service/src/interpreters/interpreter_cluster_key_drop.rs @@ -14,8 +14,8 @@ use std::sync::Arc; -use common_exception::Result; -use common_sql::plans::DropTableClusterKeyPlan; +use databend_common_exception::Result; +use databend_common_sql::plans::DropTableClusterKeyPlan; use super::Interpreter; use crate::pipelines::PipelineBuildResult; diff --git a/src/query/service/src/interpreters/interpreter_clustering_history.rs b/src/query/service/src/interpreters/interpreter_clustering_history.rs index 06785c3ca4be..f0afd906beb7 100644 --- a/src/query/service/src/interpreters/interpreter_clustering_history.rs +++ b/src/query/service/src/interpreters/interpreter_clustering_history.rs @@ -15,9 +15,9 @@ use std::time::SystemTime; use std::time::UNIX_EPOCH; -use common_exception::Result; -use common_storages_system::ClusteringHistoryLogElement; -use common_storages_system::ClusteringHistoryQueue; +use databend_common_exception::Result; +use databend_common_storages_system::ClusteringHistoryLogElement; +use databend_common_storages_system::ClusteringHistoryQueue; use crate::sessions::QueryContext; use crate::sessions::TableContext; diff --git a/src/query/service/src/interpreters/interpreter_connection_create.rs b/src/query/service/src/interpreters/interpreter_connection_create.rs index 09e7f9af3e88..85fc8392ff63 100644 --- a/src/query/service/src/interpreters/interpreter_connection_create.rs +++ b/src/query/service/src/interpreters/interpreter_connection_create.rs @@ -14,10 +14,10 @@ use std::sync::Arc; -use common_exception::Result; -use common_meta_app::principal::UserDefinedConnection; -use common_sql::plans::CreateConnectionPlan; -use common_users::UserApiProvider; +use databend_common_exception::Result; +use databend_common_meta_app::principal::UserDefinedConnection; +use databend_common_sql::plans::CreateConnectionPlan; +use databend_common_users::UserApiProvider; use log::debug; use crate::interpreters::Interpreter; diff --git a/src/query/service/src/interpreters/interpreter_connection_desc.rs b/src/query/service/src/interpreters/interpreter_connection_desc.rs index 9447e64d9e6e..8f15a2f35cb4 100644 --- a/src/query/service/src/interpreters/interpreter_connection_desc.rs +++ b/src/query/service/src/interpreters/interpreter_connection_desc.rs @@ -14,13 +14,13 @@ use std::sync::Arc; -use common_ast::ast::Connection; -use common_exception::Result; -use common_expression::types::StringType; -use common_expression::DataBlock; -use common_expression::FromData; -use common_sql::plans::DescConnectionPlan; -use common_users::UserApiProvider; +use databend_common_ast::ast::Connection; +use databend_common_exception::Result; +use databend_common_expression::types::StringType; +use databend_common_expression::DataBlock; +use databend_common_expression::FromData; +use databend_common_sql::plans::DescConnectionPlan; +use databend_common_users::UserApiProvider; use crate::interpreters::Interpreter; use crate::pipelines::PipelineBuildResult; diff --git a/src/query/service/src/interpreters/interpreter_connection_drop.rs b/src/query/service/src/interpreters/interpreter_connection_drop.rs index c9125ea1f3e0..78cdd10ccf6b 100644 --- a/src/query/service/src/interpreters/interpreter_connection_drop.rs +++ b/src/query/service/src/interpreters/interpreter_connection_drop.rs @@ -14,9 +14,9 @@ use std::sync::Arc; -use common_exception::Result; -use common_sql::plans::DropConnectionPlan; -use common_users::UserApiProvider; +use databend_common_exception::Result; +use databend_common_sql::plans::DropConnectionPlan; +use databend_common_users::UserApiProvider; use log::debug; use crate::interpreters::Interpreter; diff --git a/src/query/service/src/interpreters/interpreter_connection_show.rs b/src/query/service/src/interpreters/interpreter_connection_show.rs index 1d220329af8a..4f5683daf83d 100644 --- a/src/query/service/src/interpreters/interpreter_connection_show.rs +++ b/src/query/service/src/interpreters/interpreter_connection_show.rs @@ -14,12 +14,12 @@ use std::sync::Arc; -use common_ast::ast::Connection; -use common_exception::Result; -use common_expression::types::StringType; -use common_expression::DataBlock; -use common_expression::FromData; -use common_users::UserApiProvider; +use databend_common_ast::ast::Connection; +use databend_common_exception::Result; +use databend_common_expression::types::StringType; +use databend_common_expression::DataBlock; +use databend_common_expression::FromData; +use databend_common_users::UserApiProvider; use log::debug; use crate::interpreters::Interpreter; diff --git a/src/query/service/src/interpreters/interpreter_copy_into_location.rs b/src/query/service/src/interpreters/interpreter_copy_into_location.rs index ad09c488ded5..68d1bdae08bc 100644 --- a/src/query/service/src/interpreters/interpreter_copy_into_location.rs +++ b/src/query/service/src/interpreters/interpreter_copy_into_location.rs @@ -14,16 +14,16 @@ use std::sync::Arc; -use common_catalog::plan::StageTableInfo; -use common_catalog::table::AppendMode; -use common_exception::Result; -use common_expression::infer_table_schema; -use common_expression::DataField; -use common_expression::DataSchemaRef; -use common_expression::DataSchemaRefExt; -use common_meta_app::principal::StageInfo; -use common_storage::StageFilesInfo; -use common_storages_stage::StageTable; +use databend_common_catalog::plan::StageTableInfo; +use databend_common_catalog::table::AppendMode; +use databend_common_exception::Result; +use databend_common_expression::infer_table_schema; +use databend_common_expression::DataField; +use databend_common_expression::DataSchemaRef; +use databend_common_expression::DataSchemaRefExt; +use databend_common_meta_app::principal::StageInfo; +use databend_common_storage::StageFilesInfo; +use databend_common_storages_stage::StageTable; use log::debug; use crate::interpreters::common::check_deduplicate_label; diff --git a/src/query/service/src/interpreters/interpreter_copy_into_table.rs b/src/query/service/src/interpreters/interpreter_copy_into_table.rs index 093d99f868ff..2d9acfee615c 100644 --- a/src/query/service/src/interpreters/interpreter_copy_into_table.rs +++ b/src/query/service/src/interpreters/interpreter_copy_into_table.rs @@ -15,28 +15,28 @@ use std::sync::Arc; use std::time::Instant; -use common_catalog::plan::StageTableInfo; -use common_exception::Result; -use common_expression::types::Int32Type; -use common_expression::types::StringType; -use common_expression::BlockThresholds; -use common_expression::DataBlock; -use common_expression::DataField; -use common_expression::DataSchemaRef; -use common_expression::DataSchemaRefExt; -use common_expression::FromData; -use common_expression::SendableDataBlockStream; -use common_meta_app::schema::UpdateStreamMetaReq; -use common_pipeline_core::Pipeline; -use common_sql::executor::physical_plans::CopyIntoTable; -use common_sql::executor::physical_plans::CopyIntoTableSource; -use common_sql::executor::physical_plans::Exchange; -use common_sql::executor::physical_plans::FragmentKind; -use common_sql::executor::physical_plans::QuerySource; -use common_sql::executor::table_read_plan::ToReadDataSourcePlan; -use common_sql::executor::PhysicalPlan; -use common_storage::StageFileInfo; -use common_storages_stage::StageTable; +use databend_common_catalog::plan::StageTableInfo; +use databend_common_exception::Result; +use databend_common_expression::types::Int32Type; +use databend_common_expression::types::StringType; +use databend_common_expression::BlockThresholds; +use databend_common_expression::DataBlock; +use databend_common_expression::DataField; +use databend_common_expression::DataSchemaRef; +use databend_common_expression::DataSchemaRefExt; +use databend_common_expression::FromData; +use databend_common_expression::SendableDataBlockStream; +use databend_common_meta_app::schema::UpdateStreamMetaReq; +use databend_common_pipeline_core::Pipeline; +use databend_common_sql::executor::physical_plans::CopyIntoTable; +use databend_common_sql::executor::physical_plans::CopyIntoTableSource; +use databend_common_sql::executor::physical_plans::Exchange; +use databend_common_sql::executor::physical_plans::FragmentKind; +use databend_common_sql::executor::physical_plans::QuerySource; +use databend_common_sql::executor::table_read_plan::ToReadDataSourcePlan; +use databend_common_sql::executor::PhysicalPlan; +use databend_common_storage::StageFileInfo; +use databend_common_storages_stage::StageTable; use log::debug; use log::info; diff --git a/src/query/service/src/interpreters/interpreter_data_mask_create.rs b/src/query/service/src/interpreters/interpreter_data_mask_create.rs index 7982fbe2cf7f..e3ca674c04c7 100644 --- a/src/query/service/src/interpreters/interpreter_data_mask_create.rs +++ b/src/query/service/src/interpreters/interpreter_data_mask_create.rs @@ -14,12 +14,12 @@ use std::sync::Arc; -use common_exception::Result; -use common_license::license::Feature; -use common_license::license_manager::get_license_manager; -use common_sql::plans::CreateDatamaskPolicyPlan; -use common_users::UserApiProvider; -use data_mask_feature::get_datamask_handler; +use databend_common_exception::Result; +use databend_common_license::license::Feature; +use databend_common_license::license_manager::get_license_manager; +use databend_common_sql::plans::CreateDatamaskPolicyPlan; +use databend_common_users::UserApiProvider; +use databend_enterprise_data_mask_feature::get_datamask_handler; use crate::interpreters::Interpreter; use crate::pipelines::PipelineBuildResult; diff --git a/src/query/service/src/interpreters/interpreter_data_mask_desc.rs b/src/query/service/src/interpreters/interpreter_data_mask_desc.rs index 2d600a1073de..d5a3c6ba259b 100644 --- a/src/query/service/src/interpreters/interpreter_data_mask_desc.rs +++ b/src/query/service/src/interpreters/interpreter_data_mask_desc.rs @@ -14,16 +14,16 @@ use std::sync::Arc; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::types::StringType; -use common_expression::DataBlock; -use common_expression::FromData; -use common_license::license::Feature; -use common_license::license_manager::get_license_manager; -use common_sql::plans::DescDatamaskPolicyPlan; -use common_users::UserApiProvider; -use data_mask_feature::get_datamask_handler; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::types::StringType; +use databend_common_expression::DataBlock; +use databend_common_expression::FromData; +use databend_common_license::license::Feature; +use databend_common_license::license_manager::get_license_manager; +use databend_common_sql::plans::DescDatamaskPolicyPlan; +use databend_common_users::UserApiProvider; +use databend_enterprise_data_mask_feature::get_datamask_handler; use log::warn; use crate::interpreters::Interpreter; diff --git a/src/query/service/src/interpreters/interpreter_data_mask_drop.rs b/src/query/service/src/interpreters/interpreter_data_mask_drop.rs index b388fa1242f5..9520c5c74d61 100644 --- a/src/query/service/src/interpreters/interpreter_data_mask_drop.rs +++ b/src/query/service/src/interpreters/interpreter_data_mask_drop.rs @@ -14,12 +14,12 @@ use std::sync::Arc; -use common_exception::Result; -use common_license::license::Feature; -use common_license::license_manager::get_license_manager; -use common_sql::plans::DropDatamaskPolicyPlan; -use common_users::UserApiProvider; -use data_mask_feature::get_datamask_handler; +use databend_common_exception::Result; +use databend_common_license::license::Feature; +use databend_common_license::license_manager::get_license_manager; +use databend_common_sql::plans::DropDatamaskPolicyPlan; +use databend_common_users::UserApiProvider; +use databend_enterprise_data_mask_feature::get_datamask_handler; use crate::interpreters::Interpreter; use crate::pipelines::PipelineBuildResult; diff --git a/src/query/service/src/interpreters/interpreter_database_create.rs b/src/query/service/src/interpreters/interpreter_database_create.rs index da49bf34f9bb..9fff245b89d9 100644 --- a/src/query/service/src/interpreters/interpreter_database_create.rs +++ b/src/query/service/src/interpreters/interpreter_database_create.rs @@ -14,18 +14,18 @@ use std::sync::Arc; -use common_exception::ErrorCode; -use common_exception::Result; -use common_management::RoleApi; -use common_meta_app::principal::GrantObjectByID; -use common_meta_app::schema::CreateDatabaseReq; -use common_meta_app::schema::Ownership; -use common_meta_app::share::ShareGrantObjectPrivilege; -use common_meta_app::share::ShareNameIdent; -use common_meta_types::MatchSeq; -use common_sharing::ShareEndpointManager; -use common_sql::plans::CreateDatabasePlan; -use common_users::UserApiProvider; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_management::RoleApi; +use databend_common_meta_app::principal::GrantObjectByID; +use databend_common_meta_app::schema::CreateDatabaseReq; +use databend_common_meta_app::schema::Ownership; +use databend_common_meta_app::share::ShareGrantObjectPrivilege; +use databend_common_meta_app::share::ShareNameIdent; +use databend_common_meta_types::MatchSeq; +use databend_common_sharing::ShareEndpointManager; +use databend_common_sql::plans::CreateDatabasePlan; +use databend_common_users::UserApiProvider; use log::debug; use crate::interpreters::Interpreter; diff --git a/src/query/service/src/interpreters/interpreter_database_drop.rs b/src/query/service/src/interpreters/interpreter_database_drop.rs index c0592c74c4a7..bd5e94948490 100644 --- a/src/query/service/src/interpreters/interpreter_database_drop.rs +++ b/src/query/service/src/interpreters/interpreter_database_drop.rs @@ -14,12 +14,12 @@ use std::sync::Arc; -use common_exception::Result; -use common_management::RoleApi; -use common_meta_app::principal::GrantObjectByID; -use common_sql::plans::DropDatabasePlan; -use common_storages_share::save_share_spec; -use common_users::UserApiProvider; +use databend_common_exception::Result; +use databend_common_management::RoleApi; +use databend_common_meta_app::principal::GrantObjectByID; +use databend_common_sql::plans::DropDatabasePlan; +use databend_common_storages_share::save_share_spec; +use databend_common_users::UserApiProvider; use crate::interpreters::Interpreter; use crate::pipelines::PipelineBuildResult; diff --git a/src/query/service/src/interpreters/interpreter_database_rename.rs b/src/query/service/src/interpreters/interpreter_database_rename.rs index 7ca067c5fad9..2edf5cf65a78 100644 --- a/src/query/service/src/interpreters/interpreter_database_rename.rs +++ b/src/query/service/src/interpreters/interpreter_database_rename.rs @@ -14,10 +14,10 @@ use std::sync::Arc; -use common_exception::Result; -use common_meta_app::schema::DatabaseNameIdent; -use common_meta_app::schema::RenameDatabaseReq; -use common_sql::plans::RenameDatabasePlan; +use databend_common_exception::Result; +use databend_common_meta_app::schema::DatabaseNameIdent; +use databend_common_meta_app::schema::RenameDatabaseReq; +use databend_common_sql::plans::RenameDatabasePlan; use crate::interpreters::Interpreter; use crate::pipelines::PipelineBuildResult; diff --git a/src/query/service/src/interpreters/interpreter_database_show_create.rs b/src/query/service/src/interpreters/interpreter_database_show_create.rs index fb0d822dc733..7211abb0438a 100644 --- a/src/query/service/src/interpreters/interpreter_database_show_create.rs +++ b/src/query/service/src/interpreters/interpreter_database_show_create.rs @@ -15,13 +15,13 @@ use std::fmt::Write; use std::sync::Arc; -use common_exception::Result; -use common_expression::types::DataType; -use common_expression::BlockEntry; -use common_expression::DataBlock; -use common_expression::Scalar; -use common_expression::Value; -use common_sql::plans::ShowCreateDatabasePlan; +use databend_common_exception::Result; +use databend_common_expression::types::DataType; +use databend_common_expression::BlockEntry; +use databend_common_expression::DataBlock; +use databend_common_expression::Scalar; +use databend_common_expression::Value; +use databend_common_sql::plans::ShowCreateDatabasePlan; use crate::interpreters::Interpreter; use crate::pipelines::PipelineBuildResult; diff --git a/src/query/service/src/interpreters/interpreter_database_undrop.rs b/src/query/service/src/interpreters/interpreter_database_undrop.rs index f909ae899d82..6353c7adea0b 100644 --- a/src/query/service/src/interpreters/interpreter_database_undrop.rs +++ b/src/query/service/src/interpreters/interpreter_database_undrop.rs @@ -14,8 +14,8 @@ use std::sync::Arc; -use common_exception::Result; -use common_sql::plans::UndropDatabasePlan; +use databend_common_exception::Result; +use databend_common_sql::plans::UndropDatabasePlan; use crate::interpreters::Interpreter; use crate::pipelines::PipelineBuildResult; diff --git a/src/query/service/src/interpreters/interpreter_delete.rs b/src/query/service/src/interpreters/interpreter_delete.rs index 7830d00897a0..0f9350dd097e 100644 --- a/src/query/service/src/interpreters/interpreter_delete.rs +++ b/src/query/service/src/interpreters/interpreter_delete.rs @@ -16,45 +16,45 @@ use std::collections::HashSet; use std::collections::VecDeque; use std::sync::Arc; -use common_catalog::plan::Filters; -use common_catalog::plan::Partitions; -use common_catalog::table::TableExt; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::types::DataType; -use common_expression::types::NumberDataType; -use common_expression::DataBlock; -use common_expression::ROW_ID_COL_NAME; -use common_functions::BUILTIN_FUNCTIONS; -use common_meta_app::schema::CatalogInfo; -use common_meta_app::schema::TableInfo; -use common_sql::binder::ColumnBindingBuilder; -use common_sql::executor::physical_plans::CommitSink; -use common_sql::executor::physical_plans::DeleteSource; -use common_sql::executor::physical_plans::Exchange; -use common_sql::executor::physical_plans::FragmentKind; -use common_sql::executor::physical_plans::MutationKind; -use common_sql::executor::PhysicalPlan; -use common_sql::optimizer::optimize_query; -use common_sql::optimizer::OptimizerContext; -use common_sql::optimizer::SExpr; -use common_sql::plans::BoundColumnRef; -use common_sql::plans::ConstantExpr; -use common_sql::plans::EvalScalar; -use common_sql::plans::FunctionCall; -use common_sql::plans::RelOperator; -use common_sql::plans::ScalarItem; -use common_sql::plans::SubqueryDesc; -use common_sql::BindContext; -use common_sql::ColumnBinding; -use common_sql::MetadataRef; -use common_sql::ScalarExpr; -use common_sql::Visibility; -use common_storages_factory::Table; -use common_storages_fuse::FuseTable; +use databend_common_catalog::plan::Filters; +use databend_common_catalog::plan::Partitions; +use databend_common_catalog::table::TableExt; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::types::DataType; +use databend_common_expression::types::NumberDataType; +use databend_common_expression::DataBlock; +use databend_common_expression::ROW_ID_COL_NAME; +use databend_common_functions::BUILTIN_FUNCTIONS; +use databend_common_meta_app::schema::CatalogInfo; +use databend_common_meta_app::schema::TableInfo; +use databend_common_sql::binder::ColumnBindingBuilder; +use databend_common_sql::executor::physical_plans::CommitSink; +use databend_common_sql::executor::physical_plans::DeleteSource; +use databend_common_sql::executor::physical_plans::Exchange; +use databend_common_sql::executor::physical_plans::FragmentKind; +use databend_common_sql::executor::physical_plans::MutationKind; +use databend_common_sql::executor::PhysicalPlan; +use databend_common_sql::optimizer::optimize_query; +use databend_common_sql::optimizer::OptimizerContext; +use databend_common_sql::optimizer::SExpr; +use databend_common_sql::plans::BoundColumnRef; +use databend_common_sql::plans::ConstantExpr; +use databend_common_sql::plans::EvalScalar; +use databend_common_sql::plans::FunctionCall; +use databend_common_sql::plans::RelOperator; +use databend_common_sql::plans::ScalarItem; +use databend_common_sql::plans::SubqueryDesc; +use databend_common_sql::BindContext; +use databend_common_sql::ColumnBinding; +use databend_common_sql::MetadataRef; +use databend_common_sql::ScalarExpr; +use databend_common_sql::Visibility; +use databend_common_storages_factory::Table; +use databend_common_storages_fuse::FuseTable; +use databend_storages_common_table_meta::meta::TableSnapshot; use futures_util::TryStreamExt; use log::debug; -use storages_common_table_meta::meta::TableSnapshot; use crate::interpreters::common::create_push_down_filters; use crate::interpreters::Interpreter; diff --git a/src/query/service/src/interpreters/interpreter_explain.rs b/src/query/service/src/interpreters/interpreter_explain.rs index 4e8b580a1ca0..8d83d1cc34cf 100644 --- a/src/query/service/src/interpreters/interpreter_explain.rs +++ b/src/query/service/src/interpreters/interpreter_explain.rs @@ -14,24 +14,24 @@ use std::sync::Arc; -use common_ast::ast::ExplainKind; -use common_ast::ast::FormatTreeNode; -use common_catalog::table_context::TableContext; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::types::StringType; -use common_expression::DataBlock; -use common_expression::FromData; -use common_profile::QueryProfileManager; -use common_profile::SharedProcessorProfiles; -use common_sql::executor::ProfileHelper; -use common_sql::optimizer::ColumnSet; -use common_sql::BindContext; -use common_sql::InsertInputSource; -use common_sql::MetadataRef; -use common_storages_result_cache::gen_result_cache_key; -use common_storages_result_cache::ResultCacheReader; -use common_users::UserApiProvider; +use databend_common_ast::ast::ExplainKind; +use databend_common_ast::ast::FormatTreeNode; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::types::StringType; +use databend_common_expression::DataBlock; +use databend_common_expression::FromData; +use databend_common_profile::QueryProfileManager; +use databend_common_profile::SharedProcessorProfiles; +use databend_common_sql::executor::ProfileHelper; +use databend_common_sql::optimizer::ColumnSet; +use databend_common_sql::BindContext; +use databend_common_sql::InsertInputSource; +use databend_common_sql::MetadataRef; +use databend_common_storages_result_cache::gen_result_cache_key; +use databend_common_storages_result_cache::ResultCacheReader; +use databend_common_users::UserApiProvider; use super::InterpreterFactory; use crate::interpreters::Interpreter; diff --git a/src/query/service/src/interpreters/interpreter_factory.rs b/src/query/service/src/interpreters/interpreter_factory.rs index ec0f435ead5c..4e394dc38924 100644 --- a/src/query/service/src/interpreters/interpreter_factory.rs +++ b/src/query/service/src/interpreters/interpreter_factory.rs @@ -14,8 +14,8 @@ use std::sync::Arc; -use common_ast::ast::ExplainKind; -use common_exception::Result; +use databend_common_ast::ast::ExplainKind; +use databend_common_exception::Result; use log::error; use super::interpreter_catalog_create::CreateCatalogInterpreter; diff --git a/src/query/service/src/interpreters/interpreter_file_format_create.rs b/src/query/service/src/interpreters/interpreter_file_format_create.rs index ce8beee3b4fe..4d04dec3938f 100644 --- a/src/query/service/src/interpreters/interpreter_file_format_create.rs +++ b/src/query/service/src/interpreters/interpreter_file_format_create.rs @@ -14,10 +14,10 @@ use std::sync::Arc; -use common_exception::Result; -use common_meta_app::principal::UserDefinedFileFormat; -use common_sql::plans::CreateFileFormatPlan; -use common_users::UserApiProvider; +use databend_common_exception::Result; +use databend_common_meta_app::principal::UserDefinedFileFormat; +use databend_common_sql::plans::CreateFileFormatPlan; +use databend_common_users::UserApiProvider; use log::debug; use crate::interpreters::Interpreter; diff --git a/src/query/service/src/interpreters/interpreter_file_format_drop.rs b/src/query/service/src/interpreters/interpreter_file_format_drop.rs index 25d8f76dd430..5f1416d88bbf 100644 --- a/src/query/service/src/interpreters/interpreter_file_format_drop.rs +++ b/src/query/service/src/interpreters/interpreter_file_format_drop.rs @@ -14,9 +14,9 @@ use std::sync::Arc; -use common_exception::Result; -use common_sql::plans::DropFileFormatPlan; -use common_users::UserApiProvider; +use databend_common_exception::Result; +use databend_common_sql::plans::DropFileFormatPlan; +use databend_common_users::UserApiProvider; use log::debug; use crate::interpreters::Interpreter; diff --git a/src/query/service/src/interpreters/interpreter_file_format_show.rs b/src/query/service/src/interpreters/interpreter_file_format_show.rs index 626551ff5310..dace4ee3430b 100644 --- a/src/query/service/src/interpreters/interpreter_file_format_show.rs +++ b/src/query/service/src/interpreters/interpreter_file_format_show.rs @@ -14,11 +14,11 @@ use std::sync::Arc; -use common_exception::Result; -use common_expression::types::StringType; -use common_expression::DataBlock; -use common_expression::FromData; -use common_users::UserApiProvider; +use databend_common_exception::Result; +use databend_common_expression::types::StringType; +use databend_common_expression::DataBlock; +use databend_common_expression::FromData; +use databend_common_users::UserApiProvider; use log::debug; use crate::interpreters::Interpreter; diff --git a/src/query/service/src/interpreters/interpreter_index_create.rs b/src/query/service/src/interpreters/interpreter_index_create.rs index 258c5dded51c..09b2606eda12 100644 --- a/src/query/service/src/interpreters/interpreter_index_create.rs +++ b/src/query/service/src/interpreters/interpreter_index_create.rs @@ -14,17 +14,17 @@ use std::sync::Arc; -use aggregating_index::get_agg_index_handler; use chrono::Utc; -use common_exception::ErrorCode; -use common_exception::Result; -use common_license::license::Feature; -use common_license::license_manager::get_license_manager; -use common_meta_app::schema::CreateIndexReq; -use common_meta_app::schema::IndexMeta; -use common_meta_app::schema::IndexNameIdent; -use common_meta_app::schema::IndexType; -use common_sql::plans::CreateIndexPlan; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_license::license::Feature; +use databend_common_license::license_manager::get_license_manager; +use databend_common_meta_app::schema::CreateIndexReq; +use databend_common_meta_app::schema::IndexMeta; +use databend_common_meta_app::schema::IndexNameIdent; +use databend_common_meta_app::schema::IndexType; +use databend_common_sql::plans::CreateIndexPlan; +use databend_enterprise_aggregating_index::get_agg_index_handler; use crate::interpreters::Interpreter; use crate::pipelines::PipelineBuildResult; diff --git a/src/query/service/src/interpreters/interpreter_index_drop.rs b/src/query/service/src/interpreters/interpreter_index_drop.rs index c541e66583c2..12b9c7aa3bc1 100644 --- a/src/query/service/src/interpreters/interpreter_index_drop.rs +++ b/src/query/service/src/interpreters/interpreter_index_drop.rs @@ -14,13 +14,13 @@ use std::sync::Arc; -use aggregating_index::get_agg_index_handler; -use common_exception::Result; -use common_license::license::Feature; -use common_license::license_manager::get_license_manager; -use common_meta_app::schema::DropIndexReq; -use common_meta_app::schema::IndexNameIdent; -use common_sql::plans::DropIndexPlan; +use databend_common_exception::Result; +use databend_common_license::license::Feature; +use databend_common_license::license_manager::get_license_manager; +use databend_common_meta_app::schema::DropIndexReq; +use databend_common_meta_app::schema::IndexNameIdent; +use databend_common_sql::plans::DropIndexPlan; +use databend_enterprise_aggregating_index::get_agg_index_handler; use crate::interpreters::Interpreter; use crate::pipelines::PipelineBuildResult; diff --git a/src/query/service/src/interpreters/interpreter_index_refresh.rs b/src/query/service/src/interpreters/interpreter_index_refresh.rs index f00a86685b8e..0c4a3900ef3b 100644 --- a/src/query/service/src/interpreters/interpreter_index_refresh.rs +++ b/src/query/service/src/interpreters/interpreter_index_refresh.rs @@ -14,40 +14,40 @@ use std::sync::Arc; -use aggregating_index::get_agg_index_handler; -use common_base::runtime::GlobalIORuntime; -use common_catalog::plan::DataSourcePlan; -use common_catalog::plan::Partitions; -use common_catalog::table_context::TableContext; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::infer_schema_type; -use common_expression::DataField; -use common_expression::DataSchemaRefExt; -use common_expression::TableField; -use common_expression::TableSchema; -use common_expression::BLOCK_NAME_COL_NAME; -use common_license::license::Feature; -use common_license::license_manager::get_license_manager; -use common_meta_app::schema::IndexMeta; -use common_meta_app::schema::UpdateIndexReq; -use common_pipeline_core::processors::ProcessorPtr; -use common_sql::evaluator::BlockOperator; -use common_sql::evaluator::CompoundBlockOperator; -use common_sql::executor::PhysicalPlan; -use common_sql::executor::PhysicalPlanBuilder; -use common_sql::executor::PhysicalPlanReplacer; -use common_sql::plans::Plan; -use common_sql::plans::RefreshIndexPlan; -use common_sql::plans::RelOperator; -use common_storages_fuse::operations::AggIndexSink; -use common_storages_fuse::pruning::create_segment_location_vector; -use common_storages_fuse::FuseLazyPartInfo; -use common_storages_fuse::FusePartInfo; -use common_storages_fuse::FuseTable; -use common_storages_fuse::SegmentLocation; +use databend_common_base::runtime::GlobalIORuntime; +use databend_common_catalog::plan::DataSourcePlan; +use databend_common_catalog::plan::Partitions; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::infer_schema_type; +use databend_common_expression::DataField; +use databend_common_expression::DataSchemaRefExt; +use databend_common_expression::TableField; +use databend_common_expression::TableSchema; +use databend_common_expression::BLOCK_NAME_COL_NAME; +use databend_common_license::license::Feature; +use databend_common_license::license_manager::get_license_manager; +use databend_common_meta_app::schema::IndexMeta; +use databend_common_meta_app::schema::UpdateIndexReq; +use databend_common_pipeline_core::processors::ProcessorPtr; +use databend_common_sql::evaluator::BlockOperator; +use databend_common_sql::evaluator::CompoundBlockOperator; +use databend_common_sql::executor::PhysicalPlan; +use databend_common_sql::executor::PhysicalPlanBuilder; +use databend_common_sql::executor::PhysicalPlanReplacer; +use databend_common_sql::plans::Plan; +use databend_common_sql::plans::RefreshIndexPlan; +use databend_common_sql::plans::RelOperator; +use databend_common_storages_fuse::operations::AggIndexSink; +use databend_common_storages_fuse::pruning::create_segment_location_vector; +use databend_common_storages_fuse::FuseLazyPartInfo; +use databend_common_storages_fuse::FusePartInfo; +use databend_common_storages_fuse::FuseTable; +use databend_common_storages_fuse::SegmentLocation; +use databend_enterprise_aggregating_index::get_agg_index_handler; +use databend_storages_common_table_meta::meta::Location; use opendal::Operator; -use storages_common_table_meta::meta::Location; use crate::interpreters::Interpreter; use crate::pipelines::PipelineBuildResult; diff --git a/src/query/service/src/interpreters/interpreter_insert.rs b/src/query/service/src/interpreters/interpreter_insert.rs index ec4b99bbccbe..700a121a937a 100644 --- a/src/query/service/src/interpreters/interpreter_insert.rs +++ b/src/query/service/src/interpreters/interpreter_insert.rs @@ -15,20 +15,20 @@ use std::str::FromStr; use std::sync::Arc; -use common_catalog::table::AppendMode; -use common_catalog::table::TableExt; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::DataSchema; -use common_meta_app::principal::StageFileFormatType; -use common_pipeline_sources::AsyncSourcer; -use common_sql::executor::physical_plans::DistributedInsertSelect; -use common_sql::executor::PhysicalPlan; -use common_sql::executor::PhysicalPlanBuilder; -use common_sql::plans::Insert; -use common_sql::plans::InsertInputSource; -use common_sql::plans::Plan; -use common_sql::NameResolutionContext; +use databend_common_catalog::table::AppendMode; +use databend_common_catalog::table::TableExt; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::DataSchema; +use databend_common_meta_app::principal::StageFileFormatType; +use databend_common_pipeline_sources::AsyncSourcer; +use databend_common_sql::executor::physical_plans::DistributedInsertSelect; +use databend_common_sql::executor::PhysicalPlan; +use databend_common_sql::executor::PhysicalPlanBuilder; +use databend_common_sql::plans::Insert; +use databend_common_sql::plans::InsertInputSource; +use databend_common_sql::plans::Plan; +use databend_common_sql::NameResolutionContext; use crate::interpreters::common::build_update_stream_meta_seq; use crate::interpreters::common::check_deduplicate_label; diff --git a/src/query/service/src/interpreters/interpreter_kill.rs b/src/query/service/src/interpreters/interpreter_kill.rs index 15b590cf02a0..b84721c4f7ce 100644 --- a/src/query/service/src/interpreters/interpreter_kill.rs +++ b/src/query/service/src/interpreters/interpreter_kill.rs @@ -14,11 +14,11 @@ use std::sync::Arc; -use common_catalog::table_context::TableContext; -use common_config::GlobalConfig; -use common_exception::ErrorCode; -use common_exception::Result; -use common_sql::plans::KillPlan; +use databend_common_catalog::table_context::TableContext; +use databend_common_config::GlobalConfig; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_sql::plans::KillPlan; use crate::api::KillQueryPacket; use crate::api::Packet; diff --git a/src/query/service/src/interpreters/interpreter_merge_into.rs b/src/query/service/src/interpreters/interpreter_merge_into.rs index ae219ec93d82..aae4a1b114a9 100644 --- a/src/query/service/src/interpreters/interpreter_merge_into.rs +++ b/src/query/service/src/interpreters/interpreter_merge_into.rs @@ -17,43 +17,43 @@ use std::sync::Arc; use std::time::Instant; use std::u64::MAX; -use common_catalog::table::TableExt; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::types::UInt32Type; -use common_expression::ConstantFolder; -use common_expression::DataBlock; -use common_expression::DataSchema; -use common_expression::DataSchemaRef; -use common_expression::FieldIndex; -use common_expression::FromData; -use common_expression::RemoteExpr; -use common_expression::SendableDataBlockStream; -use common_expression::ROW_NUMBER_COL_NAME; -use common_functions::BUILTIN_FUNCTIONS; -use common_meta_app::schema::TableInfo; -use common_sql::binder::MergeIntoType; -use common_sql::executor::physical_plans::CommitSink; -use common_sql::executor::physical_plans::Exchange; -use common_sql::executor::physical_plans::FragmentKind; -use common_sql::executor::physical_plans::MergeInto; -use common_sql::executor::physical_plans::MergeIntoAppendNotMatched; -use common_sql::executor::physical_plans::MergeIntoSource; -use common_sql::executor::physical_plans::MutationKind; -use common_sql::executor::PhysicalPlan; -use common_sql::executor::PhysicalPlanBuilder; -use common_sql::plans; -use common_sql::plans::MergeInto as MergePlan; -use common_sql::plans::RelOperator; -use common_sql::plans::UpdatePlan; -use common_sql::IndexType; -use common_sql::ScalarExpr; -use common_sql::TypeCheck; -use common_storages_factory::Table; -use common_storages_fuse::FuseTable; -use common_storages_fuse::TableContext; +use databend_common_catalog::table::TableExt; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::types::UInt32Type; +use databend_common_expression::ConstantFolder; +use databend_common_expression::DataBlock; +use databend_common_expression::DataSchema; +use databend_common_expression::DataSchemaRef; +use databend_common_expression::FieldIndex; +use databend_common_expression::FromData; +use databend_common_expression::RemoteExpr; +use databend_common_expression::SendableDataBlockStream; +use databend_common_expression::ROW_NUMBER_COL_NAME; +use databend_common_functions::BUILTIN_FUNCTIONS; +use databend_common_meta_app::schema::TableInfo; +use databend_common_sql::binder::MergeIntoType; +use databend_common_sql::executor::physical_plans::CommitSink; +use databend_common_sql::executor::physical_plans::Exchange; +use databend_common_sql::executor::physical_plans::FragmentKind; +use databend_common_sql::executor::physical_plans::MergeInto; +use databend_common_sql::executor::physical_plans::MergeIntoAppendNotMatched; +use databend_common_sql::executor::physical_plans::MergeIntoSource; +use databend_common_sql::executor::physical_plans::MutationKind; +use databend_common_sql::executor::PhysicalPlan; +use databend_common_sql::executor::PhysicalPlanBuilder; +use databend_common_sql::plans; +use databend_common_sql::plans::MergeInto as MergePlan; +use databend_common_sql::plans::RelOperator; +use databend_common_sql::plans::UpdatePlan; +use databend_common_sql::IndexType; +use databend_common_sql::ScalarExpr; +use databend_common_sql::TypeCheck; +use databend_common_storages_factory::Table; +use databend_common_storages_fuse::FuseTable; +use databend_common_storages_fuse::TableContext; +use databend_storages_common_table_meta::meta::TableSnapshot; use itertools::Itertools; -use storages_common_table_meta::meta::TableSnapshot; use crate::interpreters::common::build_update_stream_meta_seq; use crate::interpreters::hook::hook_compact; diff --git a/src/query/service/src/interpreters/interpreter_merge_into_static_filter.rs b/src/query/service/src/interpreters/interpreter_merge_into_static_filter.rs index 928f5146820a..997fcf17df17 100644 --- a/src/query/service/src/interpreters/interpreter_merge_into_static_filter.rs +++ b/src/query/service/src/interpreters/interpreter_merge_into_static_filter.rs @@ -15,38 +15,38 @@ use std::collections::HashMap; use std::sync::Arc; -use common_ast::parser::parse_comma_separated_exprs; -use common_ast::parser::tokenize_sql; -use common_ast::Dialect; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::SendableDataBlockStream; -use common_sql::bind_one_table; -use common_sql::format_scalar; -use common_sql::optimizer::SExpr; -use common_sql::plans::Aggregate; -use common_sql::plans::AggregateFunction; -use common_sql::plans::AggregateMode; -use common_sql::plans::BoundColumnRef; -use common_sql::plans::ConstantExpr; -use common_sql::plans::EvalScalar; -use common_sql::plans::FunctionCall; -use common_sql::plans::JoinType; -use common_sql::plans::Plan; -use common_sql::plans::RelOperator; -use common_sql::plans::ScalarItem; -use common_sql::plans::VisitorMut; -use common_sql::BindContext; -use common_sql::ColumnBinding; -use common_sql::ColumnBindingBuilder; -use common_sql::MetadataRef; -use common_sql::NameResolutionContext; -use common_sql::ScalarExpr; -use common_sql::TypeChecker; -use common_sql::Visibility; -use common_storages_factory::Table; -use common_storages_fuse::FuseTable; -use common_storages_fuse::TableContext; +use databend_common_ast::parser::parse_comma_separated_exprs; +use databend_common_ast::parser::tokenize_sql; +use databend_common_ast::Dialect; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::SendableDataBlockStream; +use databend_common_sql::bind_one_table; +use databend_common_sql::format_scalar; +use databend_common_sql::optimizer::SExpr; +use databend_common_sql::plans::Aggregate; +use databend_common_sql::plans::AggregateFunction; +use databend_common_sql::plans::AggregateMode; +use databend_common_sql::plans::BoundColumnRef; +use databend_common_sql::plans::ConstantExpr; +use databend_common_sql::plans::EvalScalar; +use databend_common_sql::plans::FunctionCall; +use databend_common_sql::plans::JoinType; +use databend_common_sql::plans::Plan; +use databend_common_sql::plans::RelOperator; +use databend_common_sql::plans::ScalarItem; +use databend_common_sql::plans::VisitorMut; +use databend_common_sql::BindContext; +use databend_common_sql::ColumnBinding; +use databend_common_sql::ColumnBindingBuilder; +use databend_common_sql::MetadataRef; +use databend_common_sql::NameResolutionContext; +use databend_common_sql::ScalarExpr; +use databend_common_sql::TypeChecker; +use databend_common_sql::Visibility; +use databend_common_storages_factory::Table; +use databend_common_storages_fuse::FuseTable; +use databend_common_storages_fuse::TableContext; use log::info; use log::warn; use tokio_stream::StreamExt; diff --git a/src/query/service/src/interpreters/interpreter_metrics.rs b/src/query/service/src/interpreters/interpreter_metrics.rs index ea60e8264775..ce0d59a77931 100644 --- a/src/query/service/src/interpreters/interpreter_metrics.rs +++ b/src/query/service/src/interpreters/interpreter_metrics.rs @@ -16,9 +16,9 @@ use std::time::Duration; use std::time::SystemTime; use std::time::UNIX_EPOCH; -use common_config::GlobalConfig; -use common_exception::ErrorCode; -use common_metrics::interpreter::*; +use databend_common_config::GlobalConfig; +use databend_common_exception::ErrorCode; +use databend_common_metrics::interpreter::*; use crate::sessions::QueryContext; use crate::sessions::TableContext; diff --git a/src/query/service/src/interpreters/interpreter_network_policies_show.rs b/src/query/service/src/interpreters/interpreter_network_policies_show.rs index 753fb2d6bcd5..d92d0d1be1c9 100644 --- a/src/query/service/src/interpreters/interpreter_network_policies_show.rs +++ b/src/query/service/src/interpreters/interpreter_network_policies_show.rs @@ -14,11 +14,11 @@ use std::sync::Arc; -use common_exception::Result; -use common_expression::types::StringType; -use common_expression::DataBlock; -use common_expression::FromData; -use common_users::UserApiProvider; +use databend_common_exception::Result; +use databend_common_expression::types::StringType; +use databend_common_expression::DataBlock; +use databend_common_expression::FromData; +use databend_common_users::UserApiProvider; use crate::interpreters::Interpreter; use crate::pipelines::PipelineBuildResult; diff --git a/src/query/service/src/interpreters/interpreter_network_policy_alter.rs b/src/query/service/src/interpreters/interpreter_network_policy_alter.rs index ab01c83dfe6d..cc57791309cc 100644 --- a/src/query/service/src/interpreters/interpreter_network_policy_alter.rs +++ b/src/query/service/src/interpreters/interpreter_network_policy_alter.rs @@ -14,9 +14,9 @@ use std::sync::Arc; -use common_exception::Result; -use common_sql::plans::AlterNetworkPolicyPlan; -use common_users::UserApiProvider; +use databend_common_exception::Result; +use databend_common_sql::plans::AlterNetworkPolicyPlan; +use databend_common_users::UserApiProvider; use log::debug; use crate::interpreters::Interpreter; diff --git a/src/query/service/src/interpreters/interpreter_network_policy_create.rs b/src/query/service/src/interpreters/interpreter_network_policy_create.rs index fdc5ec81805f..a289aa76d8c0 100644 --- a/src/query/service/src/interpreters/interpreter_network_policy_create.rs +++ b/src/query/service/src/interpreters/interpreter_network_policy_create.rs @@ -15,10 +15,10 @@ use std::sync::Arc; use chrono::Utc; -use common_exception::Result; -use common_meta_app::principal::NetworkPolicy; -use common_sql::plans::CreateNetworkPolicyPlan; -use common_users::UserApiProvider; +use databend_common_exception::Result; +use databend_common_meta_app::principal::NetworkPolicy; +use databend_common_sql::plans::CreateNetworkPolicyPlan; +use databend_common_users::UserApiProvider; use log::debug; use crate::interpreters::Interpreter; diff --git a/src/query/service/src/interpreters/interpreter_network_policy_desc.rs b/src/query/service/src/interpreters/interpreter_network_policy_desc.rs index 9fdd151958de..94d2fb1a0300 100644 --- a/src/query/service/src/interpreters/interpreter_network_policy_desc.rs +++ b/src/query/service/src/interpreters/interpreter_network_policy_desc.rs @@ -14,12 +14,12 @@ use std::sync::Arc; -use common_exception::Result; -use common_expression::types::StringType; -use common_expression::DataBlock; -use common_expression::FromData; -use common_sql::plans::DescNetworkPolicyPlan; -use common_users::UserApiProvider; +use databend_common_exception::Result; +use databend_common_expression::types::StringType; +use databend_common_expression::DataBlock; +use databend_common_expression::FromData; +use databend_common_sql::plans::DescNetworkPolicyPlan; +use databend_common_users::UserApiProvider; use crate::interpreters::Interpreter; use crate::pipelines::PipelineBuildResult; diff --git a/src/query/service/src/interpreters/interpreter_network_policy_drop.rs b/src/query/service/src/interpreters/interpreter_network_policy_drop.rs index 6020ecba87f1..6e8c27f025d9 100644 --- a/src/query/service/src/interpreters/interpreter_network_policy_drop.rs +++ b/src/query/service/src/interpreters/interpreter_network_policy_drop.rs @@ -14,9 +14,9 @@ use std::sync::Arc; -use common_exception::Result; -use common_sql::plans::DropNetworkPolicyPlan; -use common_users::UserApiProvider; +use databend_common_exception::Result; +use databend_common_sql::plans::DropNetworkPolicyPlan; +use databend_common_users::UserApiProvider; use log::debug; use crate::interpreters::Interpreter; diff --git a/src/query/service/src/interpreters/interpreter_presign.rs b/src/query/service/src/interpreters/interpreter_presign.rs index 523cee33ff8a..82cacd65c501 100644 --- a/src/query/service/src/interpreters/interpreter_presign.rs +++ b/src/query/service/src/interpreters/interpreter_presign.rs @@ -14,14 +14,14 @@ use std::sync::Arc; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::types::DataType; -use common_expression::BlockEntry; -use common_expression::DataBlock; -use common_expression::Scalar; -use common_expression::Value; -use common_storages_stage::StageTable; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::types::DataType; +use databend_common_expression::BlockEntry; +use databend_common_expression::DataBlock; +use databend_common_expression::Scalar; +use databend_common_expression::Value; +use databend_common_storages_stage::StageTable; use jsonb::Value as JsonbValue; use log::debug; diff --git a/src/query/service/src/interpreters/interpreter_privilege_grant.rs b/src/query/service/src/interpreters/interpreter_privilege_grant.rs index 760fa7b26a1b..181f2ef16e7c 100644 --- a/src/query/service/src/interpreters/interpreter_privilege_grant.rs +++ b/src/query/service/src/interpreters/interpreter_privilege_grant.rs @@ -14,16 +14,16 @@ use std::sync::Arc; -use common_exception::ErrorCode; -use common_exception::Result; -use common_meta_app::principal::GrantObject; -use common_meta_app::principal::GrantObjectByID; -use common_meta_app::principal::PrincipalIdentity; -use common_meta_app::principal::UserPrivilegeSet; -use common_meta_app::principal::UserPrivilegeType::Ownership; -use common_sql::plans::GrantPrivilegePlan; -use common_users::RoleCacheManager; -use common_users::UserApiProvider; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_meta_app::principal::GrantObject; +use databend_common_meta_app::principal::GrantObjectByID; +use databend_common_meta_app::principal::PrincipalIdentity; +use databend_common_meta_app::principal::UserPrivilegeSet; +use databend_common_meta_app::principal::UserPrivilegeType::Ownership; +use databend_common_sql::plans::GrantPrivilegePlan; +use databend_common_users::RoleCacheManager; +use databend_common_users::UserApiProvider; use log::debug; use log::info; @@ -59,7 +59,7 @@ impl GrantPrivilegeInterpreter { let current_role = match self.ctx.get_current_role() { Some(current_role) => current_role, None => { - return Err(common_exception::ErrorCode::UnknownRole( + return Err(databend_common_exception::ErrorCode::UnknownRole( "No current role, cannot grant ownership", )); } @@ -202,7 +202,7 @@ pub fn validate_grant_privileges(object: &GrantObject, privileges: UserPrivilege .iter() .all(|p| available_privileges.has_privilege(p)); if !ok { - return Err(common_exception::ErrorCode::IllegalGrant( + return Err(databend_common_exception::ErrorCode::IllegalGrant( "Illegal GRANT/REVOKE command; please consult the manual to see which privileges can be used", )); } diff --git a/src/query/service/src/interpreters/interpreter_privilege_revoke.rs b/src/query/service/src/interpreters/interpreter_privilege_revoke.rs index 87310a7febbe..f268ec246228 100644 --- a/src/query/service/src/interpreters/interpreter_privilege_revoke.rs +++ b/src/query/service/src/interpreters/interpreter_privilege_revoke.rs @@ -14,10 +14,10 @@ use std::sync::Arc; -use common_exception::Result; -use common_meta_app::principal::PrincipalIdentity; -use common_sql::plans::RevokePrivilegePlan; -use common_users::UserApiProvider; +use databend_common_exception::Result; +use databend_common_meta_app::principal::PrincipalIdentity; +use databend_common_sql::plans::RevokePrivilegePlan; +use databend_common_users::UserApiProvider; use log::debug; use crate::interpreters::common::validate_grant_object_exists; diff --git a/src/query/service/src/interpreters/interpreter_replace.rs b/src/query/service/src/interpreters/interpreter_replace.rs index df60def0cbaa..449ff5fd882d 100644 --- a/src/query/service/src/interpreters/interpreter_replace.rs +++ b/src/query/service/src/interpreters/interpreter_replace.rs @@ -15,37 +15,37 @@ use std::sync::Arc; use std::time::Instant; -use common_catalog::table::TableExt; -use common_catalog::table_context::TableContext; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::DataSchemaRef; -use common_functions::BUILTIN_FUNCTIONS; -use common_meta_app::principal::StageInfo; -use common_meta_app::schema::UpdateStreamMetaReq; -use common_sql::executor::cast_expr_to_non_null_boolean; -use common_sql::executor::physical_plans::CommitSink; -use common_sql::executor::physical_plans::Exchange; -use common_sql::executor::physical_plans::FragmentKind; -use common_sql::executor::physical_plans::MutationKind; -use common_sql::executor::physical_plans::OnConflictField; -use common_sql::executor::physical_plans::ReplaceAsyncSourcer; -use common_sql::executor::physical_plans::ReplaceDeduplicate; -use common_sql::executor::physical_plans::ReplaceInto; -use common_sql::executor::physical_plans::ReplaceSelectCtx; -use common_sql::executor::PhysicalPlan; -use common_sql::plans::InsertInputSource; -use common_sql::plans::Plan; -use common_sql::plans::Replace; -use common_sql::BindContext; -use common_sql::Metadata; -use common_sql::NameResolutionContext; -use common_sql::ScalarBinder; -use common_storage::StageFileInfo; -use common_storages_factory::Table; -use common_storages_fuse::FuseTable; +use databend_common_catalog::table::TableExt; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::DataSchemaRef; +use databend_common_functions::BUILTIN_FUNCTIONS; +use databend_common_meta_app::principal::StageInfo; +use databend_common_meta_app::schema::UpdateStreamMetaReq; +use databend_common_sql::executor::cast_expr_to_non_null_boolean; +use databend_common_sql::executor::physical_plans::CommitSink; +use databend_common_sql::executor::physical_plans::Exchange; +use databend_common_sql::executor::physical_plans::FragmentKind; +use databend_common_sql::executor::physical_plans::MutationKind; +use databend_common_sql::executor::physical_plans::OnConflictField; +use databend_common_sql::executor::physical_plans::ReplaceAsyncSourcer; +use databend_common_sql::executor::physical_plans::ReplaceDeduplicate; +use databend_common_sql::executor::physical_plans::ReplaceInto; +use databend_common_sql::executor::physical_plans::ReplaceSelectCtx; +use databend_common_sql::executor::PhysicalPlan; +use databend_common_sql::plans::InsertInputSource; +use databend_common_sql::plans::Plan; +use databend_common_sql::plans::Replace; +use databend_common_sql::BindContext; +use databend_common_sql::Metadata; +use databend_common_sql::NameResolutionContext; +use databend_common_sql::ScalarBinder; +use databend_common_storage::StageFileInfo; +use databend_common_storages_factory::Table; +use databend_common_storages_fuse::FuseTable; +use databend_storages_common_table_meta::meta::TableSnapshot; use parking_lot::RwLock; -use storages_common_table_meta::meta::TableSnapshot; use crate::interpreters::common::build_update_stream_meta_seq; use crate::interpreters::common::check_deduplicate_label; diff --git a/src/query/service/src/interpreters/interpreter_role_create.rs b/src/query/service/src/interpreters/interpreter_role_create.rs index 15feec61a1d7..7397c8bc6154 100644 --- a/src/query/service/src/interpreters/interpreter_role_create.rs +++ b/src/query/service/src/interpreters/interpreter_role_create.rs @@ -14,11 +14,11 @@ use std::sync::Arc; -use common_exception::Result; -use common_meta_app::principal::RoleInfo; -use common_sql::plans::CreateRolePlan; -use common_users::RoleCacheManager; -use common_users::UserApiProvider; +use databend_common_exception::Result; +use databend_common_meta_app::principal::RoleInfo; +use databend_common_sql::plans::CreateRolePlan; +use databend_common_users::RoleCacheManager; +use databend_common_users::UserApiProvider; use log::debug; use crate::interpreters::Interpreter; diff --git a/src/query/service/src/interpreters/interpreter_role_drop.rs b/src/query/service/src/interpreters/interpreter_role_drop.rs index df7b90680f40..338eb9570685 100644 --- a/src/query/service/src/interpreters/interpreter_role_drop.rs +++ b/src/query/service/src/interpreters/interpreter_role_drop.rs @@ -14,10 +14,10 @@ use std::sync::Arc; -use common_exception::Result; -use common_sql::plans::DropRolePlan; -use common_users::RoleCacheManager; -use common_users::UserApiProvider; +use databend_common_exception::Result; +use databend_common_sql::plans::DropRolePlan; +use databend_common_users::RoleCacheManager; +use databend_common_users::UserApiProvider; use log::debug; use crate::interpreters::Interpreter; diff --git a/src/query/service/src/interpreters/interpreter_role_grant.rs b/src/query/service/src/interpreters/interpreter_role_grant.rs index 062dc8e40797..02dbc460567e 100644 --- a/src/query/service/src/interpreters/interpreter_role_grant.rs +++ b/src/query/service/src/interpreters/interpreter_role_grant.rs @@ -14,11 +14,11 @@ use std::sync::Arc; -use common_exception::Result; -use common_meta_app::principal::PrincipalIdentity; -use common_sql::plans::GrantRolePlan; -use common_users::RoleCacheManager; -use common_users::UserApiProvider; +use databend_common_exception::Result; +use databend_common_meta_app::principal::PrincipalIdentity; +use databend_common_sql::plans::GrantRolePlan; +use databend_common_users::RoleCacheManager; +use databend_common_users::UserApiProvider; use log::debug; use crate::interpreters::Interpreter; diff --git a/src/query/service/src/interpreters/interpreter_role_revoke.rs b/src/query/service/src/interpreters/interpreter_role_revoke.rs index c122a725119f..250a6b9d85a6 100644 --- a/src/query/service/src/interpreters/interpreter_role_revoke.rs +++ b/src/query/service/src/interpreters/interpreter_role_revoke.rs @@ -14,11 +14,11 @@ use std::sync::Arc; -use common_exception::Result; -use common_meta_app::principal::PrincipalIdentity; -use common_sql::plans::RevokeRolePlan; -use common_users::RoleCacheManager; -use common_users::UserApiProvider; +use databend_common_exception::Result; +use databend_common_meta_app::principal::PrincipalIdentity; +use databend_common_sql::plans::RevokeRolePlan; +use databend_common_users::RoleCacheManager; +use databend_common_users::UserApiProvider; use log::debug; use crate::interpreters::Interpreter; diff --git a/src/query/service/src/interpreters/interpreter_role_set.rs b/src/query/service/src/interpreters/interpreter_role_set.rs index b6a0c6f0974d..d96c673b8c07 100644 --- a/src/query/service/src/interpreters/interpreter_role_set.rs +++ b/src/query/service/src/interpreters/interpreter_role_set.rs @@ -14,9 +14,9 @@ use std::sync::Arc; -use common_exception::Result; -use common_sql::plans::SetRolePlan; -use common_users::UserApiProvider; +use databend_common_exception::Result; +use databend_common_sql::plans::SetRolePlan; +use databend_common_users::UserApiProvider; use log::debug; use crate::interpreters::Interpreter; diff --git a/src/query/service/src/interpreters/interpreter_role_set_secondary.rs b/src/query/service/src/interpreters/interpreter_role_set_secondary.rs index e4b80df8efa3..e27433af3603 100644 --- a/src/query/service/src/interpreters/interpreter_role_set_secondary.rs +++ b/src/query/service/src/interpreters/interpreter_role_set_secondary.rs @@ -14,8 +14,8 @@ use std::sync::Arc; -use common_exception::Result; -use common_sql::plans::SetSecondaryRolesPlan; +use databend_common_exception::Result; +use databend_common_sql::plans::SetSecondaryRolesPlan; use log::debug; use crate::interpreters::Interpreter; diff --git a/src/query/service/src/interpreters/interpreter_role_show.rs b/src/query/service/src/interpreters/interpreter_role_show.rs index 744bc3fb87ae..e39322148dbe 100644 --- a/src/query/service/src/interpreters/interpreter_role_show.rs +++ b/src/query/service/src/interpreters/interpreter_role_show.rs @@ -14,13 +14,13 @@ use std::sync::Arc; -use common_exception::Result; -use common_expression::types::number::UInt64Type; -use common_expression::types::BooleanType; -use common_expression::types::StringType; -use common_expression::DataBlock; -use common_expression::FromData; -use common_storages_fuse::TableContext; +use databend_common_exception::Result; +use databend_common_expression::types::number::UInt64Type; +use databend_common_expression::types::BooleanType; +use databend_common_expression::types::StringType; +use databend_common_expression::DataBlock; +use databend_common_expression::FromData; +use databend_common_storages_fuse::TableContext; use log::debug; use crate::interpreters::Interpreter; diff --git a/src/query/service/src/interpreters/interpreter_select.rs b/src/query/service/src/interpreters/interpreter_select.rs index 41ccd436fbb0..4c1493ea61f5 100644 --- a/src/query/service/src/interpreters/interpreter_select.rs +++ b/src/query/service/src/interpreters/interpreter_select.rs @@ -14,28 +14,28 @@ use std::sync::Arc; -use common_catalog::table::Table; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::infer_table_schema; -use common_expression::TableSchemaRef; -use common_meta_store::MetaStore; -use common_pipeline_core::processors::InputPort; -use common_pipeline_core::processors::OutputPort; -use common_pipeline_core::Pipe; -use common_pipeline_core::PipeItem; -use common_pipeline_core::Pipeline; -use common_pipeline_transforms::processors::TransformDummy; -use common_profile::SharedProcessorProfiles; -use common_sql::executor::physical_plans::FragmentKind; -use common_sql::executor::PhysicalPlan; -use common_sql::parse_result_scan_args; -use common_sql::ColumnBinding; -use common_sql::MetadataRef; -use common_storages_result_cache::gen_result_cache_key; -use common_storages_result_cache::ResultCacheReader; -use common_storages_result_cache::WriteResultCacheSink; -use common_users::UserApiProvider; +use databend_common_catalog::table::Table; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::infer_table_schema; +use databend_common_expression::TableSchemaRef; +use databend_common_meta_store::MetaStore; +use databend_common_pipeline_core::processors::InputPort; +use databend_common_pipeline_core::processors::OutputPort; +use databend_common_pipeline_core::Pipe; +use databend_common_pipeline_core::PipeItem; +use databend_common_pipeline_core::Pipeline; +use databend_common_pipeline_transforms::processors::TransformDummy; +use databend_common_profile::SharedProcessorProfiles; +use databend_common_sql::executor::physical_plans::FragmentKind; +use databend_common_sql::executor::PhysicalPlan; +use databend_common_sql::parse_result_scan_args; +use databend_common_sql::ColumnBinding; +use databend_common_sql::MetadataRef; +use databend_common_storages_result_cache::gen_result_cache_key; +use databend_common_storages_result_cache::ResultCacheReader; +use databend_common_storages_result_cache::WriteResultCacheSink; +use databend_common_users::UserApiProvider; use log::error; use log::info; diff --git a/src/query/service/src/interpreters/interpreter_setting.rs b/src/query/service/src/interpreters/interpreter_setting.rs index 6c1e0b1883f2..8859cad06570 100644 --- a/src/query/service/src/interpreters/interpreter_setting.rs +++ b/src/query/service/src/interpreters/interpreter_setting.rs @@ -15,9 +15,9 @@ use std::sync::Arc; use chrono_tz::Tz; -use common_exception::ErrorCode; -use common_exception::Result; -use common_sql::plans::SettingPlan; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_sql::plans::SettingPlan; use crate::interpreters::Interpreter; use crate::pipelines::PipelineBuildResult; diff --git a/src/query/service/src/interpreters/interpreter_share_alter_tenants.rs b/src/query/service/src/interpreters/interpreter_share_alter_tenants.rs index 01d6a2cff5e5..cb68e78b545a 100644 --- a/src/query/service/src/interpreters/interpreter_share_alter_tenants.rs +++ b/src/query/service/src/interpreters/interpreter_share_alter_tenants.rs @@ -15,13 +15,13 @@ use std::sync::Arc; use chrono::Utc; -use common_exception::Result; -use common_meta_api::ShareApi; -use common_meta_app::share::AddShareAccountsReq; -use common_meta_app::share::RemoveShareAccountsReq; -use common_meta_app::share::ShareNameIdent; -use common_storages_share::save_share_spec; -use common_users::UserApiProvider; +use databend_common_exception::Result; +use databend_common_meta_api::ShareApi; +use databend_common_meta_app::share::AddShareAccountsReq; +use databend_common_meta_app::share::RemoveShareAccountsReq; +use databend_common_meta_app::share::ShareNameIdent; +use databend_common_storages_share::save_share_spec; +use databend_common_users::UserApiProvider; use crate::interpreters::Interpreter; use crate::pipelines::PipelineBuildResult; diff --git a/src/query/service/src/interpreters/interpreter_share_create.rs b/src/query/service/src/interpreters/interpreter_share_create.rs index e7e80fd98462..b7ae48bf16be 100644 --- a/src/query/service/src/interpreters/interpreter_share_create.rs +++ b/src/query/service/src/interpreters/interpreter_share_create.rs @@ -14,10 +14,10 @@ use std::sync::Arc; -use common_exception::Result; -use common_meta_api::ShareApi; -use common_storages_share::save_share_spec; -use common_users::UserApiProvider; +use databend_common_exception::Result; +use databend_common_meta_api::ShareApi; +use databend_common_storages_share::save_share_spec; +use databend_common_users::UserApiProvider; use crate::interpreters::Interpreter; use crate::pipelines::PipelineBuildResult; diff --git a/src/query/service/src/interpreters/interpreter_share_desc.rs b/src/query/service/src/interpreters/interpreter_share_desc.rs index 8f381a78636a..815410d9660e 100644 --- a/src/query/service/src/interpreters/interpreter_share_desc.rs +++ b/src/query/service/src/interpreters/interpreter_share_desc.rs @@ -14,15 +14,15 @@ use std::sync::Arc; -use common_exception::Result; -use common_expression::types::StringType; -use common_expression::DataBlock; -use common_expression::FromData; -use common_meta_api::ShareApi; -use common_meta_app::share::GetShareGrantObjectReq; -use common_meta_app::share::ShareGrantObjectName; -use common_meta_app::share::ShareNameIdent; -use common_users::UserApiProvider; +use databend_common_exception::Result; +use databend_common_expression::types::StringType; +use databend_common_expression::DataBlock; +use databend_common_expression::FromData; +use databend_common_meta_api::ShareApi; +use databend_common_meta_app::share::GetShareGrantObjectReq; +use databend_common_meta_app::share::ShareGrantObjectName; +use databend_common_meta_app::share::ShareNameIdent; +use databend_common_users::UserApiProvider; use crate::interpreters::Interpreter; use crate::pipelines::PipelineBuildResult; diff --git a/src/query/service/src/interpreters/interpreter_share_drop.rs b/src/query/service/src/interpreters/interpreter_share_drop.rs index 0943753493b7..81298bae6c28 100644 --- a/src/query/service/src/interpreters/interpreter_share_drop.rs +++ b/src/query/service/src/interpreters/interpreter_share_drop.rs @@ -14,10 +14,10 @@ use std::sync::Arc; -use common_exception::Result; -use common_meta_api::ShareApi; -use common_storages_share::save_share_spec; -use common_users::UserApiProvider; +use databend_common_exception::Result; +use databend_common_meta_api::ShareApi; +use databend_common_storages_share::save_share_spec; +use databend_common_users::UserApiProvider; use crate::interpreters::Interpreter; use crate::pipelines::PipelineBuildResult; diff --git a/src/query/service/src/interpreters/interpreter_share_endpoint_create.rs b/src/query/service/src/interpreters/interpreter_share_endpoint_create.rs index 22ff5bd148d5..0a1290f1f693 100644 --- a/src/query/service/src/interpreters/interpreter_share_endpoint_create.rs +++ b/src/query/service/src/interpreters/interpreter_share_endpoint_create.rs @@ -14,9 +14,9 @@ use std::sync::Arc; -use common_exception::Result; -use common_meta_api::ShareApi; -use common_users::UserApiProvider; +use databend_common_exception::Result; +use databend_common_meta_api::ShareApi; +use databend_common_users::UserApiProvider; use crate::interpreters::Interpreter; use crate::pipelines::PipelineBuildResult; diff --git a/src/query/service/src/interpreters/interpreter_share_endpoint_drop.rs b/src/query/service/src/interpreters/interpreter_share_endpoint_drop.rs index d1103fa8928a..bd0a1fd475d4 100644 --- a/src/query/service/src/interpreters/interpreter_share_endpoint_drop.rs +++ b/src/query/service/src/interpreters/interpreter_share_endpoint_drop.rs @@ -14,9 +14,9 @@ use std::sync::Arc; -use common_exception::Result; -use common_meta_api::ShareApi; -use common_users::UserApiProvider; +use databend_common_exception::Result; +use databend_common_meta_api::ShareApi; +use databend_common_users::UserApiProvider; use crate::interpreters::Interpreter; use crate::pipelines::PipelineBuildResult; diff --git a/src/query/service/src/interpreters/interpreter_share_endpoint_show.rs b/src/query/service/src/interpreters/interpreter_share_endpoint_show.rs index 0d93e6055479..1664feb9de28 100644 --- a/src/query/service/src/interpreters/interpreter_share_endpoint_show.rs +++ b/src/query/service/src/interpreters/interpreter_share_endpoint_show.rs @@ -14,12 +14,12 @@ use std::sync::Arc; -use common_exception::Result; -use common_expression::types::StringType; -use common_expression::DataBlock; -use common_expression::FromData; -use common_meta_api::ShareApi; -use common_users::UserApiProvider; +use databend_common_exception::Result; +use databend_common_expression::types::StringType; +use databend_common_expression::DataBlock; +use databend_common_expression::FromData; +use databend_common_meta_api::ShareApi; +use databend_common_users::UserApiProvider; use crate::interpreters::Interpreter; use crate::pipelines::PipelineBuildResult; diff --git a/src/query/service/src/interpreters/interpreter_share_grant_object.rs b/src/query/service/src/interpreters/interpreter_share_grant_object.rs index 317166038b1a..454d40629151 100644 --- a/src/query/service/src/interpreters/interpreter_share_grant_object.rs +++ b/src/query/service/src/interpreters/interpreter_share_grant_object.rs @@ -15,12 +15,12 @@ use std::sync::Arc; use chrono::Utc; -use common_exception::Result; -use common_meta_api::ShareApi; -use common_meta_app::share::GrantShareObjectReq; -use common_meta_app::share::ShareNameIdent; -use common_storages_share::save_share_spec; -use common_users::UserApiProvider; +use databend_common_exception::Result; +use databend_common_meta_api::ShareApi; +use databend_common_meta_app::share::GrantShareObjectReq; +use databend_common_meta_app::share::ShareNameIdent; +use databend_common_storages_share::save_share_spec; +use databend_common_users::UserApiProvider; use crate::interpreters::Interpreter; use crate::pipelines::PipelineBuildResult; diff --git a/src/query/service/src/interpreters/interpreter_share_revoke_object.rs b/src/query/service/src/interpreters/interpreter_share_revoke_object.rs index 77c005c32ad8..c5b29e837bc3 100644 --- a/src/query/service/src/interpreters/interpreter_share_revoke_object.rs +++ b/src/query/service/src/interpreters/interpreter_share_revoke_object.rs @@ -15,12 +15,12 @@ use std::sync::Arc; use chrono::Utc; -use common_exception::Result; -use common_meta_api::ShareApi; -use common_meta_app::share::RevokeShareObjectReq; -use common_meta_app::share::ShareNameIdent; -use common_storages_share::save_share_spec; -use common_users::UserApiProvider; +use databend_common_exception::Result; +use databend_common_meta_api::ShareApi; +use databend_common_meta_app::share::RevokeShareObjectReq; +use databend_common_meta_app::share::ShareNameIdent; +use databend_common_storages_share::save_share_spec; +use databend_common_users::UserApiProvider; use crate::interpreters::Interpreter; use crate::pipelines::PipelineBuildResult; diff --git a/src/query/service/src/interpreters/interpreter_share_show.rs b/src/query/service/src/interpreters/interpreter_share_show.rs index 5b892c77cb0d..18f18c59a039 100644 --- a/src/query/service/src/interpreters/interpreter_share_show.rs +++ b/src/query/service/src/interpreters/interpreter_share_show.rs @@ -14,14 +14,14 @@ use std::sync::Arc; -use common_exception::Result; -use common_expression::types::StringType; -use common_expression::DataBlock; -use common_expression::FromData; -use common_meta_api::ShareApi; -use common_meta_app::share::ShowSharesReq; -use common_sharing::ShareEndpointManager; -use common_users::UserApiProvider; +use databend_common_exception::Result; +use databend_common_expression::types::StringType; +use databend_common_expression::DataBlock; +use databend_common_expression::FromData; +use databend_common_meta_api::ShareApi; +use databend_common_meta_app::share::ShowSharesReq; +use databend_common_sharing::ShareEndpointManager; +use databend_common_users::UserApiProvider; use crate::interpreters::Interpreter; use crate::pipelines::PipelineBuildResult; diff --git a/src/query/service/src/interpreters/interpreter_share_show_grant_tenants.rs b/src/query/service/src/interpreters/interpreter_share_show_grant_tenants.rs index de0cf3cbb12c..dc585d3cb3dc 100644 --- a/src/query/service/src/interpreters/interpreter_share_show_grant_tenants.rs +++ b/src/query/service/src/interpreters/interpreter_share_show_grant_tenants.rs @@ -14,14 +14,14 @@ use std::sync::Arc; -use common_exception::Result; -use common_expression::types::StringType; -use common_expression::DataBlock; -use common_expression::FromData; -use common_meta_api::ShareApi; -use common_meta_app::share::GetShareGrantTenantsReq; -use common_meta_app::share::ShareNameIdent; -use common_users::UserApiProvider; +use databend_common_exception::Result; +use databend_common_expression::types::StringType; +use databend_common_expression::DataBlock; +use databend_common_expression::FromData; +use databend_common_meta_api::ShareApi; +use databend_common_meta_app::share::GetShareGrantTenantsReq; +use databend_common_meta_app::share::ShareNameIdent; +use databend_common_users::UserApiProvider; use crate::interpreters::Interpreter; use crate::pipelines::PipelineBuildResult; diff --git a/src/query/service/src/interpreters/interpreter_show_grants.rs b/src/query/service/src/interpreters/interpreter_show_grants.rs index f94ea9949dbd..388cdfdce120 100644 --- a/src/query/service/src/interpreters/interpreter_show_grants.rs +++ b/src/query/service/src/interpreters/interpreter_show_grants.rs @@ -14,14 +14,14 @@ use std::sync::Arc; -use common_exception::Result; -use common_expression::types::StringType; -use common_expression::DataBlock; -use common_expression::FromData; -use common_meta_app::principal::PrincipalIdentity; -use common_sql::plans::ShowGrantsPlan; -use common_users::RoleCacheManager; -use common_users::UserApiProvider; +use databend_common_exception::Result; +use databend_common_expression::types::StringType; +use databend_common_expression::DataBlock; +use databend_common_expression::FromData; +use databend_common_meta_app::principal::PrincipalIdentity; +use databend_common_sql::plans::ShowGrantsPlan; +use databend_common_users::RoleCacheManager; +use databend_common_users::UserApiProvider; use crate::interpreters::Interpreter; use crate::pipelines::PipelineBuildResult; diff --git a/src/query/service/src/interpreters/interpreter_show_object_grant_privileges.rs b/src/query/service/src/interpreters/interpreter_show_object_grant_privileges.rs index 03c30fae7171..403a6a503be5 100644 --- a/src/query/service/src/interpreters/interpreter_show_object_grant_privileges.rs +++ b/src/query/service/src/interpreters/interpreter_show_object_grant_privileges.rs @@ -14,13 +14,13 @@ use std::sync::Arc; -use common_exception::Result; -use common_expression::types::StringType; -use common_expression::DataBlock; -use common_expression::FromData; -use common_meta_api::ShareApi; -use common_meta_app::share::GetObjectGrantPrivilegesReq; -use common_users::UserApiProvider; +use databend_common_exception::Result; +use databend_common_expression::types::StringType; +use databend_common_expression::DataBlock; +use databend_common_expression::FromData; +use databend_common_meta_api::ShareApi; +use databend_common_meta_app::share::GetObjectGrantPrivilegesReq; +use databend_common_users::UserApiProvider; use crate::interpreters::Interpreter; use crate::pipelines::PipelineBuildResult; diff --git a/src/query/service/src/interpreters/interpreter_stream_create.rs b/src/query/service/src/interpreters/interpreter_stream_create.rs index 61f85ce786fb..5d1e6d01c5da 100644 --- a/src/query/service/src/interpreters/interpreter_stream_create.rs +++ b/src/query/service/src/interpreters/interpreter_stream_create.rs @@ -14,12 +14,12 @@ use std::sync::Arc; -use common_exception::Result; -use common_license::license::Feature; -use common_license::license_manager::get_license_manager; -use common_sql::plans::CreateStreamPlan; -use common_storages_fuse::TableContext; -use stream_handler::get_stream_handler; +use databend_common_exception::Result; +use databend_common_license::license::Feature; +use databend_common_license::license_manager::get_license_manager; +use databend_common_sql::plans::CreateStreamPlan; +use databend_common_storages_fuse::TableContext; +use databend_enterprise_stream_handler::get_stream_handler; use crate::interpreters::Interpreter; use crate::pipelines::PipelineBuildResult; diff --git a/src/query/service/src/interpreters/interpreter_stream_drop.rs b/src/query/service/src/interpreters/interpreter_stream_drop.rs index fc41d1a3a974..49530a828e1f 100644 --- a/src/query/service/src/interpreters/interpreter_stream_drop.rs +++ b/src/query/service/src/interpreters/interpreter_stream_drop.rs @@ -14,11 +14,11 @@ use std::sync::Arc; -use common_exception::Result; -use common_license::license::Feature; -use common_license::license_manager::get_license_manager; -use common_sql::plans::DropStreamPlan; -use stream_handler::get_stream_handler; +use databend_common_exception::Result; +use databend_common_license::license::Feature; +use databend_common_license::license_manager::get_license_manager; +use databend_common_sql::plans::DropStreamPlan; +use databend_enterprise_stream_handler::get_stream_handler; use crate::interpreters::Interpreter; use crate::pipelines::PipelineBuildResult; diff --git a/src/query/service/src/interpreters/interpreter_table_add_column.rs b/src/query/service/src/interpreters/interpreter_table_add_column.rs index cdcf6f293365..b16e6a1444ca 100644 --- a/src/query/service/src/interpreters/interpreter_table_add_column.rs +++ b/src/query/service/src/interpreters/interpreter_table_add_column.rs @@ -14,20 +14,20 @@ use std::sync::Arc; -use common_catalog::table::TableExt; -use common_exception::ErrorCode; -use common_exception::Result; -use common_license::license::Feature::ComputedColumn; -use common_license::license_manager::get_license_manager; -use common_meta_app::schema::DatabaseType; -use common_meta_app::schema::UpdateTableMetaReq; -use common_meta_types::MatchSeq; -use common_sql::field_default_value; -use common_sql::plans::AddColumnOption; -use common_sql::plans::AddTableColumnPlan; -use common_storages_share::save_share_table_info; -use common_storages_stream::stream_table::STREAM_ENGINE; -use common_storages_view::view_table::VIEW_ENGINE; +use databend_common_catalog::table::TableExt; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_license::license::Feature::ComputedColumn; +use databend_common_license::license_manager::get_license_manager; +use databend_common_meta_app::schema::DatabaseType; +use databend_common_meta_app::schema::UpdateTableMetaReq; +use databend_common_meta_types::MatchSeq; +use databend_common_sql::field_default_value; +use databend_common_sql::plans::AddColumnOption; +use databend_common_sql::plans::AddTableColumnPlan; +use databend_common_storages_share::save_share_table_info; +use databend_common_storages_stream::stream_table::STREAM_ENGINE; +use databend_common_storages_view::view_table::VIEW_ENGINE; use crate::interpreters::interpreter_table_create::is_valid_column; use crate::interpreters::Interpreter; diff --git a/src/query/service/src/interpreters/interpreter_table_analyze.rs b/src/query/service/src/interpreters/interpreter_table_analyze.rs index a442704478f0..18c65a7be449 100644 --- a/src/query/service/src/interpreters/interpreter_table_analyze.rs +++ b/src/query/service/src/interpreters/interpreter_table_analyze.rs @@ -14,9 +14,9 @@ use std::sync::Arc; -use common_catalog::table::TableExt; -use common_exception::Result; -use common_sql::plans::AnalyzeTablePlan; +use databend_common_catalog::table::TableExt; +use databend_common_exception::Result; +use databend_common_sql::plans::AnalyzeTablePlan; use crate::interpreters::Interpreter; use crate::pipelines::PipelineBuildResult; diff --git a/src/query/service/src/interpreters/interpreter_table_create.rs b/src/query/service/src/interpreters/interpreter_table_create.rs index ff1222d6ee6e..2a5171f7532c 100644 --- a/src/query/service/src/interpreters/interpreter_table_create.rs +++ b/src/query/service/src/interpreters/interpreter_table_create.rs @@ -17,52 +17,52 @@ use std::collections::HashSet; use std::sync::Arc; use std::sync::LazyLock; -use common_config::GlobalConfig; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::is_internal_column; -use common_expression::TableSchemaRef; -use common_expression::TableSchemaRefExt; -use common_io::constants::DEFAULT_BLOCK_MAX_ROWS; -use common_license::license::Feature::ComputedColumn; -use common_license::license_manager::get_license_manager; -use common_management::RoleApi; -use common_meta_app::principal::GrantObjectByID; -use common_meta_app::schema::CreateTableReq; -use common_meta_app::schema::Ownership; -use common_meta_app::schema::TableMeta; -use common_meta_app::schema::TableNameIdent; -use common_meta_app::schema::TableStatistics; -use common_meta_types::MatchSeq; -use common_sql::field_default_value; -use common_sql::plans::CreateTablePlan; -use common_sql::BloomIndexColumns; -use common_storage::DataOperator; -use common_storages_fuse::io::MetaReaders; -use common_storages_fuse::FUSE_OPT_KEY_BLOCK_IN_MEM_SIZE_THRESHOLD; -use common_storages_fuse::FUSE_OPT_KEY_BLOCK_PER_SEGMENT; -use common_storages_fuse::FUSE_OPT_KEY_ROW_AVG_DEPTH_THRESHOLD; -use common_storages_fuse::FUSE_OPT_KEY_ROW_PER_BLOCK; -use common_storages_fuse::FUSE_OPT_KEY_ROW_PER_PAGE; -use common_storages_fuse::FUSE_TBL_LAST_SNAPSHOT_HINT; -use common_users::UserApiProvider; +use databend_common_config::GlobalConfig; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::is_internal_column; +use databend_common_expression::TableSchemaRef; +use databend_common_expression::TableSchemaRefExt; +use databend_common_io::constants::DEFAULT_BLOCK_MAX_ROWS; +use databend_common_license::license::Feature::ComputedColumn; +use databend_common_license::license_manager::get_license_manager; +use databend_common_management::RoleApi; +use databend_common_meta_app::principal::GrantObjectByID; +use databend_common_meta_app::schema::CreateTableReq; +use databend_common_meta_app::schema::Ownership; +use databend_common_meta_app::schema::TableMeta; +use databend_common_meta_app::schema::TableNameIdent; +use databend_common_meta_app::schema::TableStatistics; +use databend_common_meta_types::MatchSeq; +use databend_common_sql::field_default_value; +use databend_common_sql::plans::CreateTablePlan; +use databend_common_sql::BloomIndexColumns; +use databend_common_storage::DataOperator; +use databend_common_storages_fuse::io::MetaReaders; +use databend_common_storages_fuse::FUSE_OPT_KEY_BLOCK_IN_MEM_SIZE_THRESHOLD; +use databend_common_storages_fuse::FUSE_OPT_KEY_BLOCK_PER_SEGMENT; +use databend_common_storages_fuse::FUSE_OPT_KEY_ROW_AVG_DEPTH_THRESHOLD; +use databend_common_storages_fuse::FUSE_OPT_KEY_ROW_PER_BLOCK; +use databend_common_storages_fuse::FUSE_OPT_KEY_ROW_PER_PAGE; +use databend_common_storages_fuse::FUSE_TBL_LAST_SNAPSHOT_HINT; +use databend_common_users::UserApiProvider; +use databend_storages_common_cache::LoadParams; +use databend_storages_common_index::BloomIndex; +use databend_storages_common_table_meta::meta::TableSnapshot; +use databend_storages_common_table_meta::meta::Versioned; +use databend_storages_common_table_meta::table::OPT_KEY_BLOOM_INDEX_COLUMNS; +use databend_storages_common_table_meta::table::OPT_KEY_CHANGE_TRACKING; +use databend_storages_common_table_meta::table::OPT_KEY_COMMENT; +use databend_storages_common_table_meta::table::OPT_KEY_CONNECTION_NAME; +use databend_storages_common_table_meta::table::OPT_KEY_DATABASE_ID; +use databend_storages_common_table_meta::table::OPT_KEY_ENGINE; +use databend_storages_common_table_meta::table::OPT_KEY_LOCATION; +use databend_storages_common_table_meta::table::OPT_KEY_SNAPSHOT_LOCATION; +use databend_storages_common_table_meta::table::OPT_KEY_STORAGE_FORMAT; +use databend_storages_common_table_meta::table::OPT_KEY_STORAGE_PREFIX; +use databend_storages_common_table_meta::table::OPT_KEY_TABLE_ATTACHED_READ_ONLY; +use databend_storages_common_table_meta::table::OPT_KEY_TABLE_COMPRESSION; use log::error; -use storages_common_cache::LoadParams; -use storages_common_index::BloomIndex; -use storages_common_table_meta::meta::TableSnapshot; -use storages_common_table_meta::meta::Versioned; -use storages_common_table_meta::table::OPT_KEY_BLOOM_INDEX_COLUMNS; -use storages_common_table_meta::table::OPT_KEY_CHANGE_TRACKING; -use storages_common_table_meta::table::OPT_KEY_COMMENT; -use storages_common_table_meta::table::OPT_KEY_CONNECTION_NAME; -use storages_common_table_meta::table::OPT_KEY_DATABASE_ID; -use storages_common_table_meta::table::OPT_KEY_ENGINE; -use storages_common_table_meta::table::OPT_KEY_LOCATION; -use storages_common_table_meta::table::OPT_KEY_SNAPSHOT_LOCATION; -use storages_common_table_meta::table::OPT_KEY_STORAGE_FORMAT; -use storages_common_table_meta::table::OPT_KEY_STORAGE_PREFIX; -use storages_common_table_meta::table::OPT_KEY_TABLE_ATTACHED_READ_ONLY; -use storages_common_table_meta::table::OPT_KEY_TABLE_COMPRESSION; use crate::interpreters::InsertInterpreter; use crate::interpreters::Interpreter; diff --git a/src/query/service/src/interpreters/interpreter_table_describe.rs b/src/query/service/src/interpreters/interpreter_table_describe.rs index c8fa8d473a0e..1efd4285b148 100644 --- a/src/query/service/src/interpreters/interpreter_table_describe.rs +++ b/src/query/service/src/interpreters/interpreter_table_describe.rs @@ -14,17 +14,17 @@ use std::sync::Arc; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::infer_table_schema; -use common_expression::types::StringType; -use common_expression::ComputedExpr; -use common_expression::DataBlock; -use common_expression::FromData; -use common_expression::Scalar; -use common_sql::plans::DescribeTablePlan; -use common_storages_view::view_table::QUERY; -use common_storages_view::view_table::VIEW_ENGINE; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::infer_table_schema; +use databend_common_expression::types::StringType; +use databend_common_expression::ComputedExpr; +use databend_common_expression::DataBlock; +use databend_common_expression::FromData; +use databend_common_expression::Scalar; +use databend_common_sql::plans::DescribeTablePlan; +use databend_common_storages_view::view_table::QUERY; +use databend_common_storages_view::view_table::VIEW_ENGINE; use crate::interpreters::Interpreter; use crate::pipelines::PipelineBuildResult; diff --git a/src/query/service/src/interpreters/interpreter_table_drop.rs b/src/query/service/src/interpreters/interpreter_table_drop.rs index 60cb8c6e5bfc..1321cf6d1daf 100644 --- a/src/query/service/src/interpreters/interpreter_table_drop.rs +++ b/src/query/service/src/interpreters/interpreter_table_drop.rs @@ -14,18 +14,18 @@ use std::sync::Arc; -use common_catalog::table::TableExt; -use common_exception::ErrorCode; -use common_exception::Result; -use common_management::RoleApi; -use common_meta_app::principal::GrantObjectByID; -use common_meta_app::schema::DropTableByIdReq; -use common_sql::plans::DropTablePlan; -use common_storages_fuse::FuseTable; -use common_storages_share::save_share_spec; -use common_storages_stream::stream_table::STREAM_ENGINE; -use common_storages_view::view_table::VIEW_ENGINE; -use common_users::UserApiProvider; +use databend_common_catalog::table::TableExt; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_management::RoleApi; +use databend_common_meta_app::principal::GrantObjectByID; +use databend_common_meta_app::schema::DropTableByIdReq; +use databend_common_sql::plans::DropTablePlan; +use databend_common_storages_fuse::FuseTable; +use databend_common_storages_share::save_share_spec; +use databend_common_storages_stream::stream_table::STREAM_ENGINE; +use databend_common_storages_view::view_table::VIEW_ENGINE; +use databend_common_users::UserApiProvider; use crate::interpreters::Interpreter; use crate::pipelines::PipelineBuildResult; diff --git a/src/query/service/src/interpreters/interpreter_table_drop_column.rs b/src/query/service/src/interpreters/interpreter_table_drop_column.rs index 88d9dc10656f..7395f1534e90 100644 --- a/src/query/service/src/interpreters/interpreter_table_drop_column.rs +++ b/src/query/service/src/interpreters/interpreter_table_drop_column.rs @@ -14,19 +14,19 @@ use std::sync::Arc; -use common_catalog::table::TableExt; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::DataSchema; -use common_meta_app::schema::DatabaseType; -use common_meta_app::schema::UpdateTableMetaReq; -use common_meta_types::MatchSeq; -use common_sql::plans::DropTableColumnPlan; -use common_sql::BloomIndexColumns; -use common_storages_share::save_share_table_info; -use common_storages_stream::stream_table::STREAM_ENGINE; -use common_storages_view::view_table::VIEW_ENGINE; -use storages_common_table_meta::table::OPT_KEY_BLOOM_INDEX_COLUMNS; +use databend_common_catalog::table::TableExt; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::DataSchema; +use databend_common_meta_app::schema::DatabaseType; +use databend_common_meta_app::schema::UpdateTableMetaReq; +use databend_common_meta_types::MatchSeq; +use databend_common_sql::plans::DropTableColumnPlan; +use databend_common_sql::BloomIndexColumns; +use databend_common_storages_share::save_share_table_info; +use databend_common_storages_stream::stream_table::STREAM_ENGINE; +use databend_common_storages_view::view_table::VIEW_ENGINE; +use databend_storages_common_table_meta::table::OPT_KEY_BLOOM_INDEX_COLUMNS; use crate::interpreters::common::check_referenced_computed_columns; use crate::interpreters::Interpreter; diff --git a/src/query/service/src/interpreters/interpreter_table_exists.rs b/src/query/service/src/interpreters/interpreter_table_exists.rs index 813fdbbe0c2f..c25ed9176d1e 100644 --- a/src/query/service/src/interpreters/interpreter_table_exists.rs +++ b/src/query/service/src/interpreters/interpreter_table_exists.rs @@ -14,15 +14,15 @@ use std::sync::Arc; -use common_exception::Result; -use common_expression::types::number::NumberScalar; -use common_expression::types::DataType; -use common_expression::types::NumberDataType; -use common_expression::BlockEntry; -use common_expression::DataBlock; -use common_expression::Scalar; -use common_expression::Value; -use common_sql::plans::ExistsTablePlan; +use databend_common_exception::Result; +use databend_common_expression::types::number::NumberScalar; +use databend_common_expression::types::DataType; +use databend_common_expression::types::NumberDataType; +use databend_common_expression::BlockEntry; +use databend_common_expression::DataBlock; +use databend_common_expression::Scalar; +use databend_common_expression::Value; +use databend_common_sql::plans::ExistsTablePlan; use crate::interpreters::Interpreter; use crate::pipelines::PipelineBuildResult; diff --git a/src/query/service/src/interpreters/interpreter_table_modify_column.rs b/src/query/service/src/interpreters/interpreter_table_modify_column.rs index 181aaff100dc..868648816134 100644 --- a/src/query/service/src/interpreters/interpreter_table_modify_column.rs +++ b/src/query/service/src/interpreters/interpreter_table_modify_column.rs @@ -14,41 +14,41 @@ use std::sync::Arc; -use common_catalog::catalog::Catalog; -use common_catalog::table::Table; -use common_catalog::table::TableExt; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::ComputedExpr; -use common_expression::DataSchema; -use common_expression::TableField; -use common_expression::TableSchema; -use common_license::license::Feature::ComputedColumn; -use common_license::license::Feature::DataMask; -use common_license::license_manager::get_license_manager; -use common_meta_app::schema::DatabaseType; -use common_meta_app::schema::SetTableColumnMaskPolicyAction; -use common_meta_app::schema::SetTableColumnMaskPolicyReq; -use common_meta_app::schema::TableMeta; -use common_meta_app::schema::UpdateTableMetaReq; -use common_meta_types::MatchSeq; -use common_sql::executor::physical_plans::DistributedInsertSelect; -use common_sql::executor::PhysicalPlan; -use common_sql::executor::PhysicalPlanBuilder; -use common_sql::field_default_value; -use common_sql::plans::ModifyColumnAction; -use common_sql::plans::ModifyTableColumnPlan; -use common_sql::plans::Plan; -use common_sql::BloomIndexColumns; -use common_sql::Planner; -use common_storages_fuse::FuseTable; -use common_storages_share::save_share_table_info; -use common_storages_stream::stream_table::STREAM_ENGINE; -use common_storages_view::view_table::VIEW_ENGINE; -use common_users::UserApiProvider; -use data_mask_feature::get_datamask_handler; -use storages_common_index::BloomIndex; -use storages_common_table_meta::table::OPT_KEY_BLOOM_INDEX_COLUMNS; +use databend_common_catalog::catalog::Catalog; +use databend_common_catalog::table::Table; +use databend_common_catalog::table::TableExt; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::ComputedExpr; +use databend_common_expression::DataSchema; +use databend_common_expression::TableField; +use databend_common_expression::TableSchema; +use databend_common_license::license::Feature::ComputedColumn; +use databend_common_license::license::Feature::DataMask; +use databend_common_license::license_manager::get_license_manager; +use databend_common_meta_app::schema::DatabaseType; +use databend_common_meta_app::schema::SetTableColumnMaskPolicyAction; +use databend_common_meta_app::schema::SetTableColumnMaskPolicyReq; +use databend_common_meta_app::schema::TableMeta; +use databend_common_meta_app::schema::UpdateTableMetaReq; +use databend_common_meta_types::MatchSeq; +use databend_common_sql::executor::physical_plans::DistributedInsertSelect; +use databend_common_sql::executor::PhysicalPlan; +use databend_common_sql::executor::PhysicalPlanBuilder; +use databend_common_sql::field_default_value; +use databend_common_sql::plans::ModifyColumnAction; +use databend_common_sql::plans::ModifyTableColumnPlan; +use databend_common_sql::plans::Plan; +use databend_common_sql::BloomIndexColumns; +use databend_common_sql::Planner; +use databend_common_storages_fuse::FuseTable; +use databend_common_storages_share::save_share_table_info; +use databend_common_storages_stream::stream_table::STREAM_ENGINE; +use databend_common_storages_view::view_table::VIEW_ENGINE; +use databend_common_users::UserApiProvider; +use databend_enterprise_data_mask_feature::get_datamask_handler; +use databend_storages_common_index::BloomIndex; +use databend_storages_common_table_meta::table::OPT_KEY_BLOOM_INDEX_COLUMNS; use super::common::check_referenced_computed_columns; use crate::interpreters::Interpreter; diff --git a/src/query/service/src/interpreters/interpreter_table_optimize.rs b/src/query/service/src/interpreters/interpreter_table_optimize.rs index cb668e87c952..b39e3587fd67 100644 --- a/src/query/service/src/interpreters/interpreter_table_optimize.rs +++ b/src/query/service/src/interpreters/interpreter_table_optimize.rs @@ -15,29 +15,29 @@ use std::sync::Arc; use std::time::SystemTime; -use common_base::runtime::GlobalIORuntime; -use common_catalog::catalog::Catalog; -use common_catalog::lock::LockExt; -use common_catalog::plan::Partitions; -use common_catalog::table::CompactTarget; -use common_catalog::table::Table; -use common_catalog::table::TableExt; -use common_exception::ErrorCode; -use common_exception::Result; -use common_meta_app::schema::CatalogInfo; -use common_meta_app::schema::TableInfo; -use common_pipeline_core::Pipeline; -use common_sql::executor::physical_plans::CommitSink; -use common_sql::executor::physical_plans::CompactSource; -use common_sql::executor::physical_plans::Exchange; -use common_sql::executor::physical_plans::FragmentKind; -use common_sql::executor::physical_plans::MutationKind; -use common_sql::executor::PhysicalPlan; -use common_sql::plans::OptimizeTableAction; -use common_sql::plans::OptimizeTablePlan; -use common_storages_factory::NavigationPoint; -use common_storages_fuse::FuseTable; -use storages_common_table_meta::meta::TableSnapshot; +use databend_common_base::runtime::GlobalIORuntime; +use databend_common_catalog::catalog::Catalog; +use databend_common_catalog::lock::LockExt; +use databend_common_catalog::plan::Partitions; +use databend_common_catalog::table::CompactTarget; +use databend_common_catalog::table::Table; +use databend_common_catalog::table::TableExt; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_meta_app::schema::CatalogInfo; +use databend_common_meta_app::schema::TableInfo; +use databend_common_pipeline_core::Pipeline; +use databend_common_sql::executor::physical_plans::CommitSink; +use databend_common_sql::executor::physical_plans::CompactSource; +use databend_common_sql::executor::physical_plans::Exchange; +use databend_common_sql::executor::physical_plans::FragmentKind; +use databend_common_sql::executor::physical_plans::MutationKind; +use databend_common_sql::executor::PhysicalPlan; +use databend_common_sql::plans::OptimizeTableAction; +use databend_common_sql::plans::OptimizeTablePlan; +use databend_common_storages_factory::NavigationPoint; +use databend_common_storages_fuse::FuseTable; +use databend_storages_common_table_meta::meta::TableSnapshot; use crate::interpreters::interpreter_table_recluster::build_recluster_physical_plan; use crate::interpreters::Interpreter; diff --git a/src/query/service/src/interpreters/interpreter_table_recluster.rs b/src/query/service/src/interpreters/interpreter_table_recluster.rs index 6baba80a29b7..c7dc851a710e 100644 --- a/src/query/service/src/interpreters/interpreter_table_recluster.rs +++ b/src/query/service/src/interpreters/interpreter_table_recluster.rs @@ -16,29 +16,29 @@ use std::sync::Arc; use std::time::Duration; use std::time::SystemTime; -use common_catalog::lock::LockExt; -use common_catalog::plan::Filters; -use common_catalog::plan::PushDownInfo; -use common_catalog::table::TableExt; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::type_check::check_function; -use common_functions::BUILTIN_FUNCTIONS; -use common_meta_app::schema::CatalogInfo; -use common_meta_app::schema::TableInfo; -use common_sql::executor::physical_plans::Exchange; -use common_sql::executor::physical_plans::FragmentKind; -use common_sql::executor::physical_plans::ReclusterSink; -use common_sql::executor::physical_plans::ReclusterSource; -use common_sql::executor::physical_plans::ReclusterTask; -use common_sql::executor::PhysicalPlan; -use common_storages_fuse::FuseTable; +use databend_common_catalog::lock::LockExt; +use databend_common_catalog::plan::Filters; +use databend_common_catalog::plan::PushDownInfo; +use databend_common_catalog::table::TableExt; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::type_check::check_function; +use databend_common_functions::BUILTIN_FUNCTIONS; +use databend_common_meta_app::schema::CatalogInfo; +use databend_common_meta_app::schema::TableInfo; +use databend_common_sql::executor::physical_plans::Exchange; +use databend_common_sql::executor::physical_plans::FragmentKind; +use databend_common_sql::executor::physical_plans::ReclusterSink; +use databend_common_sql::executor::physical_plans::ReclusterSource; +use databend_common_sql::executor::physical_plans::ReclusterTask; +use databend_common_sql::executor::PhysicalPlan; +use databend_common_storages_fuse::FuseTable; +use databend_storages_common_table_meta::meta::BlockMeta; +use databend_storages_common_table_meta::meta::Statistics; +use databend_storages_common_table_meta::meta::TableSnapshot; use log::error; use log::info; use log::warn; -use storages_common_table_meta::meta::BlockMeta; -use storages_common_table_meta::meta::Statistics; -use storages_common_table_meta::meta::TableSnapshot; use crate::interpreters::Interpreter; use crate::interpreters::InterpreterClusteringHistory; diff --git a/src/query/service/src/interpreters/interpreter_table_rename.rs b/src/query/service/src/interpreters/interpreter_table_rename.rs index 2d89b8926a9c..283d9c7f573a 100644 --- a/src/query/service/src/interpreters/interpreter_table_rename.rs +++ b/src/query/service/src/interpreters/interpreter_table_rename.rs @@ -14,10 +14,10 @@ use std::sync::Arc; -use common_exception::Result; -use common_meta_app::schema::RenameTableReq; -use common_meta_app::schema::TableNameIdent; -use common_sql::plans::RenameTablePlan; +use databend_common_exception::Result; +use databend_common_meta_app::schema::RenameTableReq; +use databend_common_meta_app::schema::TableNameIdent; +use databend_common_sql::plans::RenameTablePlan; use crate::interpreters::Interpreter; use crate::pipelines::PipelineBuildResult; diff --git a/src/query/service/src/interpreters/interpreter_table_rename_column.rs b/src/query/service/src/interpreters/interpreter_table_rename_column.rs index f98ef5a7ef46..bf2af27580c8 100644 --- a/src/query/service/src/interpreters/interpreter_table_rename_column.rs +++ b/src/query/service/src/interpreters/interpreter_table_rename_column.rs @@ -14,19 +14,19 @@ use std::sync::Arc; -use common_catalog::table::TableExt; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::DataSchema; -use common_meta_app::schema::DatabaseType; -use common_meta_app::schema::UpdateTableMetaReq; -use common_meta_types::MatchSeq; -use common_sql::plans::RenameTableColumnPlan; -use common_sql::BloomIndexColumns; -use common_storages_share::save_share_table_info; -use common_storages_stream::stream_table::STREAM_ENGINE; -use common_storages_view::view_table::VIEW_ENGINE; -use storages_common_table_meta::table::OPT_KEY_BLOOM_INDEX_COLUMNS; +use databend_common_catalog::table::TableExt; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::DataSchema; +use databend_common_meta_app::schema::DatabaseType; +use databend_common_meta_app::schema::UpdateTableMetaReq; +use databend_common_meta_types::MatchSeq; +use databend_common_sql::plans::RenameTableColumnPlan; +use databend_common_sql::BloomIndexColumns; +use databend_common_storages_share::save_share_table_info; +use databend_common_storages_stream::stream_table::STREAM_ENGINE; +use databend_common_storages_view::view_table::VIEW_ENGINE; +use databend_storages_common_table_meta::table::OPT_KEY_BLOOM_INDEX_COLUMNS; use crate::interpreters::common::check_referenced_computed_columns; use crate::interpreters::interpreter_table_create::is_valid_column; diff --git a/src/query/service/src/interpreters/interpreter_table_revert.rs b/src/query/service/src/interpreters/interpreter_table_revert.rs index 020de261cfa9..3cfd013bc9bd 100644 --- a/src/query/service/src/interpreters/interpreter_table_revert.rs +++ b/src/query/service/src/interpreters/interpreter_table_revert.rs @@ -14,10 +14,10 @@ use std::sync::Arc; -use common_catalog::table::NavigationDescriptor; -use common_catalog::table::TableExt; -use common_exception::Result; -use common_sql::plans::RevertTablePlan; +use databend_common_catalog::table::NavigationDescriptor; +use databend_common_catalog::table::TableExt; +use databend_common_exception::Result; +use databend_common_sql::plans::RevertTablePlan; use crate::interpreters::Interpreter; use crate::pipelines::PipelineBuildResult; diff --git a/src/query/service/src/interpreters/interpreter_table_set_options.rs b/src/query/service/src/interpreters/interpreter_table_set_options.rs index 1704ad638c50..1ffef79d48c2 100644 --- a/src/query/service/src/interpreters/interpreter_table_set_options.rs +++ b/src/query/service/src/interpreters/interpreter_table_set_options.rs @@ -15,16 +15,16 @@ use std::collections::HashMap; use std::sync::Arc; -use common_catalog::table::TableExt; -use common_exception::ErrorCode; -use common_exception::Result; -use common_meta_app::schema::UpsertTableOptionReq; -use common_meta_types::MatchSeq; -use common_sql::plans::SetOptionsPlan; -use common_storages_fuse::TableContext; +use databend_common_catalog::table::TableExt; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_meta_app::schema::UpsertTableOptionReq; +use databend_common_meta_types::MatchSeq; +use databend_common_sql::plans::SetOptionsPlan; +use databend_common_storages_fuse::TableContext; +use databend_storages_common_table_meta::table::OPT_KEY_DATABASE_ID; +use databend_storages_common_table_meta::table::OPT_KEY_STORAGE_FORMAT; use log::error; -use storages_common_table_meta::table::OPT_KEY_DATABASE_ID; -use storages_common_table_meta::table::OPT_KEY_STORAGE_FORMAT; use super::interpreter_table_create::is_valid_block_per_segment; use super::interpreter_table_create::is_valid_bloom_index_columns; diff --git a/src/query/service/src/interpreters/interpreter_table_show_create.rs b/src/query/service/src/interpreters/interpreter_table_show_create.rs index b6c2a8ebc58d..e154569f1b6a 100644 --- a/src/query/service/src/interpreters/interpreter_table_show_create.rs +++ b/src/query/service/src/interpreters/interpreter_table_show_create.rs @@ -14,25 +14,25 @@ use std::sync::Arc; -use common_catalog::table::Table; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::types::DataType; -use common_expression::BlockEntry; -use common_expression::ComputedExpr; -use common_expression::DataBlock; -use common_expression::Scalar; -use common_expression::Value; -use common_sql::plans::ShowCreateTablePlan; -use common_storages_stream::stream_table::StreamTable; -use common_storages_stream::stream_table::STREAM_ENGINE; -use common_storages_view::view_table::QUERY; -use common_storages_view::view_table::VIEW_ENGINE; +use databend_common_catalog::table::Table; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::types::DataType; +use databend_common_expression::BlockEntry; +use databend_common_expression::ComputedExpr; +use databend_common_expression::DataBlock; +use databend_common_expression::Scalar; +use databend_common_expression::Value; +use databend_common_sql::plans::ShowCreateTablePlan; +use databend_common_storages_stream::stream_table::StreamTable; +use databend_common_storages_stream::stream_table::STREAM_ENGINE; +use databend_common_storages_view::view_table::QUERY; +use databend_common_storages_view::view_table::VIEW_ENGINE; +use databend_storages_common_table_meta::table::is_internal_opt_key; +use databend_storages_common_table_meta::table::OPT_KEY_STORAGE_PREFIX; +use databend_storages_common_table_meta::table::OPT_KEY_TABLE_ATTACHED_DATA_URI; +use databend_storages_common_table_meta::table::OPT_KEY_TABLE_ATTACHED_READ_ONLY; use log::debug; -use storages_common_table_meta::table::is_internal_opt_key; -use storages_common_table_meta::table::OPT_KEY_STORAGE_PREFIX; -use storages_common_table_meta::table::OPT_KEY_TABLE_ATTACHED_DATA_URI; -use storages_common_table_meta::table::OPT_KEY_TABLE_ATTACHED_READ_ONLY; use crate::interpreters::Interpreter; use crate::pipelines::PipelineBuildResult; diff --git a/src/query/service/src/interpreters/interpreter_table_truncate.rs b/src/query/service/src/interpreters/interpreter_table_truncate.rs index 8ab68e570568..2b6356c1eb9f 100644 --- a/src/query/service/src/interpreters/interpreter_table_truncate.rs +++ b/src/query/service/src/interpreters/interpreter_table_truncate.rs @@ -14,10 +14,10 @@ use std::sync::Arc; -use common_catalog::table::TableExt; -use common_config::GlobalConfig; -use common_exception::Result; -use common_sql::plans::TruncateTablePlan; +use databend_common_catalog::table::TableExt; +use databend_common_config::GlobalConfig; +use databend_common_exception::Result; +use databend_common_sql::plans::TruncateTablePlan; use crate::api::Packet; use crate::api::TruncateTablePacket; diff --git a/src/query/service/src/interpreters/interpreter_table_undrop.rs b/src/query/service/src/interpreters/interpreter_table_undrop.rs index b4cc5dcdad63..5bb7581605f6 100644 --- a/src/query/service/src/interpreters/interpreter_table_undrop.rs +++ b/src/query/service/src/interpreters/interpreter_table_undrop.rs @@ -14,8 +14,8 @@ use std::sync::Arc; -use common_exception::Result; -use common_sql::plans::UndropTablePlan; +use databend_common_exception::Result; +use databend_common_sql::plans::UndropTablePlan; use crate::interpreters::Interpreter; use crate::pipelines::PipelineBuildResult; diff --git a/src/query/service/src/interpreters/interpreter_table_vacuum.rs b/src/query/service/src/interpreters/interpreter_table_vacuum.rs index 39b2ddee7bde..243739fb08b6 100644 --- a/src/query/service/src/interpreters/interpreter_table_vacuum.rs +++ b/src/query/service/src/interpreters/interpreter_table_vacuum.rs @@ -14,16 +14,16 @@ use std::sync::Arc; -use common_catalog::table::TableExt; -use common_exception::Result; -use common_expression::types::StringType; -use common_expression::DataBlock; -use common_expression::FromData; -use common_license::license::Feature::Vacuum; -use common_license::license_manager::get_license_manager; -use common_sql::plans::VacuumTablePlan; -use common_storages_fuse::FuseTable; -use vacuum_handler::get_vacuum_handler; +use databend_common_catalog::table::TableExt; +use databend_common_exception::Result; +use databend_common_expression::types::StringType; +use databend_common_expression::DataBlock; +use databend_common_expression::FromData; +use databend_common_license::license::Feature::Vacuum; +use databend_common_license::license_manager::get_license_manager; +use databend_common_sql::plans::VacuumTablePlan; +use databend_common_storages_fuse::FuseTable; +use databend_enterprise_vacuum_handler::get_vacuum_handler; use crate::interpreters::Interpreter; use crate::pipelines::PipelineBuildResult; diff --git a/src/query/service/src/interpreters/interpreter_task_alter.rs b/src/query/service/src/interpreters/interpreter_task_alter.rs index c43ffdb4fdd5..fbf4337c8115 100644 --- a/src/query/service/src/interpreters/interpreter_task_alter.rs +++ b/src/query/service/src/interpreters/interpreter_task_alter.rs @@ -14,17 +14,17 @@ use std::sync::Arc; -use common_ast::ast::AlterTaskOptions; -use common_catalog::table_context::TableContext; -use common_cloud_control::cloud_api::CloudControlApiProvider; -use common_cloud_control::pb::alter_task_request::AlterTaskType; -use common_cloud_control::pb::AlterTaskRequest; -use common_cloud_control::pb::WarehouseOptions; -use common_cloud_control::task_client::make_request; -use common_config::GlobalConfig; -use common_exception::ErrorCode; -use common_exception::Result; -use common_sql::plans::AlterTaskPlan; +use databend_common_ast::ast::AlterTaskOptions; +use databend_common_catalog::table_context::TableContext; +use databend_common_cloud_control::cloud_api::CloudControlApiProvider; +use databend_common_cloud_control::pb::alter_task_request::AlterTaskType; +use databend_common_cloud_control::pb::AlterTaskRequest; +use databend_common_cloud_control::pb::WarehouseOptions; +use databend_common_cloud_control::task_client::make_request; +use databend_common_config::GlobalConfig; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_sql::plans::AlterTaskPlan; use crate::interpreters::common::get_client_config; use crate::interpreters::common::make_schedule_options; diff --git a/src/query/service/src/interpreters/interpreter_task_create.rs b/src/query/service/src/interpreters/interpreter_task_create.rs index 7f6bc8939232..9b8501ff45bf 100644 --- a/src/query/service/src/interpreters/interpreter_task_create.rs +++ b/src/query/service/src/interpreters/interpreter_task_create.rs @@ -14,14 +14,14 @@ use std::sync::Arc; -use common_catalog::table_context::TableContext; -use common_cloud_control::cloud_api::CloudControlApiProvider; -use common_cloud_control::pb::CreateTaskRequest; -use common_cloud_control::task_client::make_request; -use common_config::GlobalConfig; -use common_exception::ErrorCode; -use common_exception::Result; -use common_sql::plans::CreateTaskPlan; +use databend_common_catalog::table_context::TableContext; +use databend_common_cloud_control::cloud_api::CloudControlApiProvider; +use databend_common_cloud_control::pb::CreateTaskRequest; +use databend_common_cloud_control::task_client::make_request; +use databend_common_config::GlobalConfig; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_sql::plans::CreateTaskPlan; use crate::interpreters::common::get_client_config; use crate::interpreters::common::make_schedule_options; diff --git a/src/query/service/src/interpreters/interpreter_task_describe.rs b/src/query/service/src/interpreters/interpreter_task_describe.rs index b4ef6ba95af7..f16cd48b13fc 100644 --- a/src/query/service/src/interpreters/interpreter_task_describe.rs +++ b/src/query/service/src/interpreters/interpreter_task_describe.rs @@ -14,14 +14,14 @@ use std::sync::Arc; -use common_cloud_control::cloud_api::CloudControlApiProvider; -use common_cloud_control::pb::DescribeTaskRequest; -use common_cloud_control::task_client::make_request; -use common_config::GlobalConfig; -use common_exception::ErrorCode; -use common_exception::Result; -use common_sql::plans::DescribeTaskPlan; -use common_storages_system::parse_tasks_to_datablock; +use databend_common_cloud_control::cloud_api::CloudControlApiProvider; +use databend_common_cloud_control::pb::DescribeTaskRequest; +use databend_common_cloud_control::task_client::make_request; +use databend_common_config::GlobalConfig; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_sql::plans::DescribeTaskPlan; +use databend_common_storages_system::parse_tasks_to_datablock; use crate::interpreters::common::get_client_config; use crate::interpreters::Interpreter; diff --git a/src/query/service/src/interpreters/interpreter_task_drop.rs b/src/query/service/src/interpreters/interpreter_task_drop.rs index cc619dad429c..a63e72da01d4 100644 --- a/src/query/service/src/interpreters/interpreter_task_drop.rs +++ b/src/query/service/src/interpreters/interpreter_task_drop.rs @@ -14,13 +14,13 @@ use std::sync::Arc; -use common_cloud_control::cloud_api::CloudControlApiProvider; -use common_cloud_control::pb::DropTaskRequest; -use common_cloud_control::task_client::make_request; -use common_config::GlobalConfig; -use common_exception::ErrorCode; -use common_exception::Result; -use common_sql::plans::DropTaskPlan; +use databend_common_cloud_control::cloud_api::CloudControlApiProvider; +use databend_common_cloud_control::pb::DropTaskRequest; +use databend_common_cloud_control::task_client::make_request; +use databend_common_config::GlobalConfig; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_sql::plans::DropTaskPlan; use crate::interpreters::common::get_client_config; use crate::interpreters::Interpreter; diff --git a/src/query/service/src/interpreters/interpreter_task_execute.rs b/src/query/service/src/interpreters/interpreter_task_execute.rs index eab5e6d7f32a..7affcdd8d5c1 100644 --- a/src/query/service/src/interpreters/interpreter_task_execute.rs +++ b/src/query/service/src/interpreters/interpreter_task_execute.rs @@ -14,13 +14,13 @@ use std::sync::Arc; -use common_cloud_control::cloud_api::CloudControlApiProvider; -use common_cloud_control::pb::ExecuteTaskRequest; -use common_cloud_control::task_client::make_request; -use common_config::GlobalConfig; -use common_exception::ErrorCode; -use common_exception::Result; -use common_sql::plans::ExecuteTaskPlan; +use databend_common_cloud_control::cloud_api::CloudControlApiProvider; +use databend_common_cloud_control::pb::ExecuteTaskRequest; +use databend_common_cloud_control::task_client::make_request; +use databend_common_config::GlobalConfig; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_sql::plans::ExecuteTaskPlan; use crate::interpreters::common::get_client_config; use crate::interpreters::Interpreter; diff --git a/src/query/service/src/interpreters/interpreter_tasks_show.rs b/src/query/service/src/interpreters/interpreter_tasks_show.rs index d446b3412fbb..ab1524daa173 100644 --- a/src/query/service/src/interpreters/interpreter_tasks_show.rs +++ b/src/query/service/src/interpreters/interpreter_tasks_show.rs @@ -14,14 +14,14 @@ use std::sync::Arc; -use common_cloud_control::cloud_api::CloudControlApiProvider; -use common_cloud_control::pb::ShowTasksRequest; -use common_cloud_control::task_client::make_request; -use common_config::GlobalConfig; -use common_exception::ErrorCode; -use common_exception::Result; -use common_sql::plans::ShowTasksPlan; -use common_storages_system::parse_tasks_to_datablock; +use databend_common_cloud_control::cloud_api::CloudControlApiProvider; +use databend_common_cloud_control::pb::ShowTasksRequest; +use databend_common_cloud_control::task_client::make_request; +use databend_common_config::GlobalConfig; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_sql::plans::ShowTasksPlan; +use databend_common_storages_system::parse_tasks_to_datablock; use crate::interpreters::common::get_client_config; use crate::interpreters::Interpreter; diff --git a/src/query/service/src/interpreters/interpreter_unsetting.rs b/src/query/service/src/interpreters/interpreter_unsetting.rs index e312049ecbfb..66044013cc48 100644 --- a/src/query/service/src/interpreters/interpreter_unsetting.rs +++ b/src/query/service/src/interpreters/interpreter_unsetting.rs @@ -14,9 +14,9 @@ use std::sync::Arc; -use common_config::GlobalConfig; -use common_exception::Result; -use common_sql::plans::UnSettingPlan; +use databend_common_config::GlobalConfig; +use databend_common_exception::Result; +use databend_common_sql::plans::UnSettingPlan; use crate::interpreters::Interpreter; use crate::pipelines::PipelineBuildResult; diff --git a/src/query/service/src/interpreters/interpreter_update.rs b/src/query/service/src/interpreters/interpreter_update.rs index 71655b345fa4..6597baaa725b 100644 --- a/src/query/service/src/interpreters/interpreter_update.rs +++ b/src/query/service/src/interpreters/interpreter_update.rs @@ -17,31 +17,31 @@ use std::collections::HashSet; use std::collections::VecDeque; use std::sync::Arc; -use common_catalog::plan::Filters; -use common_catalog::plan::Partitions; -use common_catalog::table::TableExt; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::types::DataType; -use common_expression::types::NumberDataType; -use common_expression::FieldIndex; -use common_expression::RemoteExpr; -use common_expression::ROW_ID_COL_NAME; -use common_functions::BUILTIN_FUNCTIONS; -use common_license::license::Feature::ComputedColumn; -use common_license::license_manager::get_license_manager; -use common_meta_app::schema::CatalogInfo; -use common_meta_app::schema::TableInfo; -use common_sql::binder::ColumnBindingBuilder; -use common_sql::executor::physical_plans::CommitSink; -use common_sql::executor::physical_plans::MutationKind; -use common_sql::executor::physical_plans::UpdateSource; -use common_sql::executor::PhysicalPlan; -use common_sql::Visibility; -use common_storages_factory::Table; -use common_storages_fuse::FuseTable; +use databend_common_catalog::plan::Filters; +use databend_common_catalog::plan::Partitions; +use databend_common_catalog::table::TableExt; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::types::DataType; +use databend_common_expression::types::NumberDataType; +use databend_common_expression::FieldIndex; +use databend_common_expression::RemoteExpr; +use databend_common_expression::ROW_ID_COL_NAME; +use databend_common_functions::BUILTIN_FUNCTIONS; +use databend_common_license::license::Feature::ComputedColumn; +use databend_common_license::license_manager::get_license_manager; +use databend_common_meta_app::schema::CatalogInfo; +use databend_common_meta_app::schema::TableInfo; +use databend_common_sql::binder::ColumnBindingBuilder; +use databend_common_sql::executor::physical_plans::CommitSink; +use databend_common_sql::executor::physical_plans::MutationKind; +use databend_common_sql::executor::physical_plans::UpdateSource; +use databend_common_sql::executor::PhysicalPlan; +use databend_common_sql::Visibility; +use databend_common_storages_factory::Table; +use databend_common_storages_fuse::FuseTable; +use databend_storages_common_table_meta::meta::TableSnapshot; use log::debug; -use storages_common_table_meta::meta::TableSnapshot; use crate::interpreters::common::check_deduplicate_label; use crate::interpreters::common::create_push_down_filters; diff --git a/src/query/service/src/interpreters/interpreter_use_database.rs b/src/query/service/src/interpreters/interpreter_use_database.rs index fb83802de999..13c4475a46fe 100644 --- a/src/query/service/src/interpreters/interpreter_use_database.rs +++ b/src/query/service/src/interpreters/interpreter_use_database.rs @@ -14,10 +14,10 @@ use std::sync::Arc; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::DataSchema; -use common_sql::plans::UseDatabasePlan; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::DataSchema; +use databend_common_sql::plans::UseDatabasePlan; use crate::interpreters::Interpreter; use crate::pipelines::PipelineBuildResult; diff --git a/src/query/service/src/interpreters/interpreter_user_alter.rs b/src/query/service/src/interpreters/interpreter_user_alter.rs index adbf5cf101f5..e2760fbe1e1a 100644 --- a/src/query/service/src/interpreters/interpreter_user_alter.rs +++ b/src/query/service/src/interpreters/interpreter_user_alter.rs @@ -14,9 +14,9 @@ use std::sync::Arc; -use common_exception::Result; -use common_sql::plans::AlterUserPlan; -use common_users::UserApiProvider; +use databend_common_exception::Result; +use databend_common_sql::plans::AlterUserPlan; +use databend_common_users::UserApiProvider; use log::debug; use crate::interpreters::Interpreter; diff --git a/src/query/service/src/interpreters/interpreter_user_create.rs b/src/query/service/src/interpreters/interpreter_user_create.rs index 612f53e40d2a..4f61b4b548f5 100644 --- a/src/query/service/src/interpreters/interpreter_user_create.rs +++ b/src/query/service/src/interpreters/interpreter_user_create.rs @@ -14,14 +14,14 @@ use std::sync::Arc; -use common_exception::ErrorCode; -use common_exception::Result; -use common_meta_app::principal::UserGrantSet; -use common_meta_app::principal::UserInfo; -use common_meta_app::principal::UserQuota; -use common_meta_types::MatchSeq; -use common_sql::plans::CreateUserPlan; -use common_users::UserApiProvider; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_meta_app::principal::UserGrantSet; +use databend_common_meta_app::principal::UserInfo; +use databend_common_meta_app::principal::UserQuota; +use databend_common_meta_types::MatchSeq; +use databend_common_sql::plans::CreateUserPlan; +use databend_common_users::UserApiProvider; use log::debug; use crate::interpreters::Interpreter; diff --git a/src/query/service/src/interpreters/interpreter_user_drop.rs b/src/query/service/src/interpreters/interpreter_user_drop.rs index 17b4857a1e6d..a1918fd88a4a 100644 --- a/src/query/service/src/interpreters/interpreter_user_drop.rs +++ b/src/query/service/src/interpreters/interpreter_user_drop.rs @@ -14,9 +14,9 @@ use std::sync::Arc; -use common_exception::Result; -use common_sql::plans::DropUserPlan; -use common_users::UserApiProvider; +use databend_common_exception::Result; +use databend_common_sql::plans::DropUserPlan; +use databend_common_users::UserApiProvider; use log::debug; use crate::interpreters::Interpreter; diff --git a/src/query/service/src/interpreters/interpreter_user_stage_create.rs b/src/query/service/src/interpreters/interpreter_user_stage_create.rs index 53bafbca7cdf..a447e77174e7 100644 --- a/src/query/service/src/interpreters/interpreter_user_stage_create.rs +++ b/src/query/service/src/interpreters/interpreter_user_stage_create.rs @@ -15,12 +15,12 @@ use std::sync::Arc; use chrono::Utc; -use common_exception::ErrorCode; -use common_exception::Result; -use common_meta_app::principal::StageType; -use common_meta_types::MatchSeq; -use common_sql::plans::CreateStagePlan; -use common_users::UserApiProvider; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_meta_app::principal::StageType; +use databend_common_meta_types::MatchSeq; +use databend_common_sql::plans::CreateStagePlan; +use databend_common_users::UserApiProvider; use log::debug; use crate::interpreters::Interpreter; diff --git a/src/query/service/src/interpreters/interpreter_user_stage_drop.rs b/src/query/service/src/interpreters/interpreter_user_stage_drop.rs index cd53abe2ac4b..48bba67f9173 100644 --- a/src/query/service/src/interpreters/interpreter_user_stage_drop.rs +++ b/src/query/service/src/interpreters/interpreter_user_stage_drop.rs @@ -14,12 +14,12 @@ use std::sync::Arc; -use common_exception::ErrorCode; -use common_exception::Result; -use common_meta_app::principal::StageType; -use common_sql::plans::DropStagePlan; -use common_storages_stage::StageTable; -use common_users::UserApiProvider; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_meta_app::principal::StageType; +use databend_common_sql::plans::DropStagePlan; +use databend_common_storages_stage::StageTable; +use databend_common_users::UserApiProvider; use log::debug; use log::info; diff --git a/src/query/service/src/interpreters/interpreter_user_stage_remove.rs b/src/query/service/src/interpreters/interpreter_user_stage_remove.rs index cf5ab6cbb2a0..ef79e5d7f4ea 100644 --- a/src/query/service/src/interpreters/interpreter_user_stage_remove.rs +++ b/src/query/service/src/interpreters/interpreter_user_stage_remove.rs @@ -14,12 +14,12 @@ use std::sync::Arc; -use common_catalog::table_context::TableContext; -use common_exception::Result; -use common_sql::plans::RemoveStagePlan; -use common_storage::StageFilesInfo; -use common_storages_fuse::io::Files; -use common_storages_stage::StageTable; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::Result; +use databend_common_sql::plans::RemoveStagePlan; +use databend_common_storage::StageFilesInfo; +use databend_common_storages_fuse::io::Files; +use databend_common_storages_stage::StageTable; use log::debug; use log::error; diff --git a/src/query/service/src/interpreters/interpreter_user_udf_alter.rs b/src/query/service/src/interpreters/interpreter_user_udf_alter.rs index 3b8a22d017fb..f49db41ff533 100644 --- a/src/query/service/src/interpreters/interpreter_user_udf_alter.rs +++ b/src/query/service/src/interpreters/interpreter_user_udf_alter.rs @@ -14,9 +14,9 @@ use std::sync::Arc; -use common_exception::Result; -use common_sql::plans::AlterUDFPlan; -use common_users::UserApiProvider; +use databend_common_exception::Result; +use databend_common_sql::plans::AlterUDFPlan; +use databend_common_users::UserApiProvider; use log::debug; use crate::interpreters::Interpreter; diff --git a/src/query/service/src/interpreters/interpreter_user_udf_create.rs b/src/query/service/src/interpreters/interpreter_user_udf_create.rs index 44b5e3c7040e..d1efc2c8523c 100644 --- a/src/query/service/src/interpreters/interpreter_user_udf_create.rs +++ b/src/query/service/src/interpreters/interpreter_user_udf_create.rs @@ -14,9 +14,9 @@ use std::sync::Arc; -use common_exception::Result; -use common_sql::plans::CreateUDFPlan; -use common_users::UserApiProvider; +use databend_common_exception::Result; +use databend_common_sql::plans::CreateUDFPlan; +use databend_common_users::UserApiProvider; use log::debug; use crate::interpreters::Interpreter; diff --git a/src/query/service/src/interpreters/interpreter_user_udf_drop.rs b/src/query/service/src/interpreters/interpreter_user_udf_drop.rs index 8db802e72624..1b3440142a9b 100644 --- a/src/query/service/src/interpreters/interpreter_user_udf_drop.rs +++ b/src/query/service/src/interpreters/interpreter_user_udf_drop.rs @@ -14,9 +14,9 @@ use std::sync::Arc; -use common_exception::Result; -use common_sql::plans::DropUDFPlan; -use common_users::UserApiProvider; +use databend_common_exception::Result; +use databend_common_sql::plans::DropUDFPlan; +use databend_common_users::UserApiProvider; use log::debug; use crate::interpreters::Interpreter; diff --git a/src/query/service/src/interpreters/interpreter_vacuum_drop_tables.rs b/src/query/service/src/interpreters/interpreter_vacuum_drop_tables.rs index 33b4bf33dc43..91e192f1945c 100644 --- a/src/query/service/src/interpreters/interpreter_vacuum_drop_tables.rs +++ b/src/query/service/src/interpreters/interpreter_vacuum_drop_tables.rs @@ -15,20 +15,20 @@ use std::cmp::min; use std::sync::Arc; -use common_exception::Result; -use common_expression::types::StringType; -use common_expression::DataBlock; -use common_expression::FromData; -use common_license::license::Feature::Vacuum; -use common_license::license_manager::get_license_manager; -use common_meta_app::schema::DatabaseNameIdent; -use common_meta_app::schema::GcDroppedTableReq; -use common_meta_app::schema::ListDroppedTableReq; -use common_meta_app::schema::TableInfoFilter; -use common_sql::plans::VacuumDropTablePlan; +use databend_common_exception::Result; +use databend_common_expression::types::StringType; +use databend_common_expression::DataBlock; +use databend_common_expression::FromData; +use databend_common_license::license::Feature::Vacuum; +use databend_common_license::license_manager::get_license_manager; +use databend_common_meta_app::schema::DatabaseNameIdent; +use databend_common_meta_app::schema::GcDroppedTableReq; +use databend_common_meta_app::schema::ListDroppedTableReq; +use databend_common_meta_app::schema::TableInfoFilter; +use databend_common_sql::plans::VacuumDropTablePlan; +use databend_enterprise_vacuum_handler::get_vacuum_handler; use log::as_debug; use log::info; -use vacuum_handler::get_vacuum_handler; use crate::interpreters::Interpreter; use crate::pipelines::PipelineBuildResult; diff --git a/src/query/service/src/interpreters/interpreter_view_alter.rs b/src/query/service/src/interpreters/interpreter_view_alter.rs index 56f7b0824069..a2422fb5ede0 100644 --- a/src/query/service/src/interpreters/interpreter_view_alter.rs +++ b/src/query/service/src/interpreters/interpreter_view_alter.rs @@ -15,15 +15,15 @@ use std::collections::BTreeMap; use std::sync::Arc; -use common_exception::ErrorCode; -use common_exception::Result; -use common_meta_app::schema::CreateTableReq; -use common_meta_app::schema::DropTableByIdReq; -use common_meta_app::schema::TableMeta; -use common_meta_app::schema::TableNameIdent; -use common_sql::plans::AlterViewPlan; -use common_sql::Planner; -use common_storages_view::view_table::VIEW_ENGINE; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_meta_app::schema::CreateTableReq; +use databend_common_meta_app::schema::DropTableByIdReq; +use databend_common_meta_app::schema::TableMeta; +use databend_common_meta_app::schema::TableNameIdent; +use databend_common_sql::plans::AlterViewPlan; +use databend_common_sql::Planner; +use databend_common_storages_view::view_table::VIEW_ENGINE; use crate::interpreters::Interpreter; use crate::pipelines::PipelineBuildResult; diff --git a/src/query/service/src/interpreters/interpreter_view_create.rs b/src/query/service/src/interpreters/interpreter_view_create.rs index e0b3ba772e85..3ef62315e5d8 100644 --- a/src/query/service/src/interpreters/interpreter_view_create.rs +++ b/src/query/service/src/interpreters/interpreter_view_create.rs @@ -15,16 +15,16 @@ use std::collections::BTreeMap; use std::sync::Arc; -use common_exception::ErrorCode; -use common_exception::Result; -use common_meta_app::schema::CreateTableReq; -use common_meta_app::schema::TableMeta; -use common_meta_app::schema::TableNameIdent; -use common_sql::plans::CreateViewPlan; -use common_sql::plans::Plan; -use common_sql::Planner; -use common_storages_view::view_table::QUERY; -use common_storages_view::view_table::VIEW_ENGINE; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_meta_app::schema::CreateTableReq; +use databend_common_meta_app::schema::TableMeta; +use databend_common_meta_app::schema::TableNameIdent; +use databend_common_sql::plans::CreateViewPlan; +use databend_common_sql::plans::Plan; +use databend_common_sql::Planner; +use databend_common_storages_view::view_table::QUERY; +use databend_common_storages_view::view_table::VIEW_ENGINE; use crate::interpreters::Interpreter; use crate::pipelines::PipelineBuildResult; @@ -68,7 +68,7 @@ impl Interpreter for CreateViewInterpreter { && !table_function.contains(&table_name.to_string()) && !table.table().is_stage_table() { - return Err(common_exception::ErrorCode::UnknownTable(format!( + return Err(databend_common_exception::ErrorCode::UnknownTable(format!( "VIEW QUERY: table `{}`.`{}` not exists in catalog '{}'", database_name, table_name, diff --git a/src/query/service/src/interpreters/interpreter_view_drop.rs b/src/query/service/src/interpreters/interpreter_view_drop.rs index 079821f8ff8b..6268fb41105d 100644 --- a/src/query/service/src/interpreters/interpreter_view_drop.rs +++ b/src/query/service/src/interpreters/interpreter_view_drop.rs @@ -14,12 +14,12 @@ use std::sync::Arc; -use common_exception::ErrorCode; -use common_exception::Result; -use common_meta_app::schema::DropTableByIdReq; -use common_sql::plans::DropViewPlan; -use common_storages_stream::stream_table::STREAM_ENGINE; -use common_storages_view::view_table::VIEW_ENGINE; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_meta_app::schema::DropTableByIdReq; +use databend_common_sql::plans::DropViewPlan; +use databend_common_storages_stream::stream_table::STREAM_ENGINE; +use databend_common_storages_view::view_table::VIEW_ENGINE; use crate::interpreters::Interpreter; use crate::pipelines::PipelineBuildResult; diff --git a/src/query/service/src/interpreters/interpreter_virtual_column_alter.rs b/src/query/service/src/interpreters/interpreter_virtual_column_alter.rs index aba09dd81dd8..41f6dd7711c4 100644 --- a/src/query/service/src/interpreters/interpreter_virtual_column_alter.rs +++ b/src/query/service/src/interpreters/interpreter_virtual_column_alter.rs @@ -14,14 +14,14 @@ use std::sync::Arc; -use common_catalog::table::TableExt; -use common_exception::Result; -use common_license::license::Feature::VirtualColumn; -use common_license::license_manager::get_license_manager; -use common_meta_app::schema::UpdateVirtualColumnReq; -use common_meta_app::schema::VirtualColumnNameIdent; -use common_sql::plans::AlterVirtualColumnPlan; -use virtual_column::get_virtual_column_handler; +use databend_common_catalog::table::TableExt; +use databend_common_exception::Result; +use databend_common_license::license::Feature::VirtualColumn; +use databend_common_license::license_manager::get_license_manager; +use databend_common_meta_app::schema::UpdateVirtualColumnReq; +use databend_common_meta_app::schema::VirtualColumnNameIdent; +use databend_common_sql::plans::AlterVirtualColumnPlan; +use databend_enterprise_virtual_column::get_virtual_column_handler; use crate::interpreters::Interpreter; use crate::pipelines::PipelineBuildResult; diff --git a/src/query/service/src/interpreters/interpreter_virtual_column_create.rs b/src/query/service/src/interpreters/interpreter_virtual_column_create.rs index 94ce0e99bc49..019806353d64 100644 --- a/src/query/service/src/interpreters/interpreter_virtual_column_create.rs +++ b/src/query/service/src/interpreters/interpreter_virtual_column_create.rs @@ -14,14 +14,14 @@ use std::sync::Arc; -use common_catalog::table::TableExt; -use common_exception::Result; -use common_license::license::Feature::VirtualColumn; -use common_license::license_manager::get_license_manager; -use common_meta_app::schema::CreateVirtualColumnReq; -use common_meta_app::schema::VirtualColumnNameIdent; -use common_sql::plans::CreateVirtualColumnPlan; -use virtual_column::get_virtual_column_handler; +use databend_common_catalog::table::TableExt; +use databend_common_exception::Result; +use databend_common_license::license::Feature::VirtualColumn; +use databend_common_license::license_manager::get_license_manager; +use databend_common_meta_app::schema::CreateVirtualColumnReq; +use databend_common_meta_app::schema::VirtualColumnNameIdent; +use databend_common_sql::plans::CreateVirtualColumnPlan; +use databend_enterprise_virtual_column::get_virtual_column_handler; use crate::interpreters::Interpreter; use crate::pipelines::PipelineBuildResult; diff --git a/src/query/service/src/interpreters/interpreter_virtual_column_drop.rs b/src/query/service/src/interpreters/interpreter_virtual_column_drop.rs index a2d10a87f050..cce1366be6da 100644 --- a/src/query/service/src/interpreters/interpreter_virtual_column_drop.rs +++ b/src/query/service/src/interpreters/interpreter_virtual_column_drop.rs @@ -14,14 +14,14 @@ use std::sync::Arc; -use common_catalog::table::TableExt; -use common_exception::Result; -use common_license::license::Feature::VirtualColumn; -use common_license::license_manager::get_license_manager; -use common_meta_app::schema::DropVirtualColumnReq; -use common_meta_app::schema::VirtualColumnNameIdent; -use common_sql::plans::DropVirtualColumnPlan; -use virtual_column::get_virtual_column_handler; +use databend_common_catalog::table::TableExt; +use databend_common_exception::Result; +use databend_common_license::license::Feature::VirtualColumn; +use databend_common_license::license_manager::get_license_manager; +use databend_common_meta_app::schema::DropVirtualColumnReq; +use databend_common_meta_app::schema::VirtualColumnNameIdent; +use databend_common_sql::plans::DropVirtualColumnPlan; +use databend_enterprise_virtual_column::get_virtual_column_handler; use crate::interpreters::Interpreter; use crate::pipelines::PipelineBuildResult; diff --git a/src/query/service/src/interpreters/interpreter_virtual_column_refresh.rs b/src/query/service/src/interpreters/interpreter_virtual_column_refresh.rs index d9e4234f2e73..fa3f7aad3b3b 100644 --- a/src/query/service/src/interpreters/interpreter_virtual_column_refresh.rs +++ b/src/query/service/src/interpreters/interpreter_virtual_column_refresh.rs @@ -14,14 +14,14 @@ use std::sync::Arc; -use common_catalog::table::TableExt; -use common_exception::Result; -use common_license::license::Feature::VirtualColumn; -use common_license::license_manager::get_license_manager; -use common_meta_app::schema::ListVirtualColumnsReq; -use common_sql::plans::RefreshVirtualColumnPlan; -use common_storages_fuse::FuseTable; -use virtual_column::get_virtual_column_handler; +use databend_common_catalog::table::TableExt; +use databend_common_exception::Result; +use databend_common_license::license::Feature::VirtualColumn; +use databend_common_license::license_manager::get_license_manager; +use databend_common_meta_app::schema::ListVirtualColumnsReq; +use databend_common_sql::plans::RefreshVirtualColumnPlan; +use databend_common_storages_fuse::FuseTable; +use databend_enterprise_virtual_column::get_virtual_column_handler; use crate::interpreters::Interpreter; use crate::pipelines::PipelineBuildResult; diff --git a/src/query/service/src/lib.rs b/src/query/service/src/lib.rs index be9f12e1560d..b9152a509b7b 100644 --- a/src/query/service/src/lib.rs +++ b/src/query/service/src/lib.rs @@ -60,6 +60,6 @@ pub mod test_kits; mod global_services; -pub use common_sql as sql; -pub use common_storages_factory as storages; +pub use databend_common_sql as sql; +pub use databend_common_storages_factory as storages; pub use global_services::GlobalServices; diff --git a/src/query/service/src/local/config.rs b/src/query/service/src/local/config.rs index 1f7899081616..59862c02d2db 100644 --- a/src/query/service/src/local/config.rs +++ b/src/query/service/src/local/config.rs @@ -16,8 +16,8 @@ use std::path::Path; -use common_exception::ErrorCode; -use common_exception::Result; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; use serde::Deserialize; #[derive(Clone, Debug, Default, Deserialize)] diff --git a/src/query/service/src/local/display.rs b/src/query/service/src/local/display.rs index a0aad67141a8..3e3cfae1f712 100644 --- a/src/query/service/src/local/display.rs +++ b/src/query/service/src/local/display.rs @@ -18,20 +18,20 @@ use std::sync::atomic::AtomicBool; use std::sync::atomic::Ordering; use std::sync::Arc; -use common_ast::ast::Statement; -use common_base::base::tokio; -use common_base::base::tokio::io::AsyncWriteExt; -use common_base::base::ProgressValues; -use common_exception::Result; -use common_expression::block_debug::box_render; -use common_expression::infer_table_schema; -use common_expression::DataSchemaRef; -use common_expression::SendableDataBlockStream; -use common_formats::FileFormatOptionsExt; -use common_meta_app::principal::FileFormatParams; -use common_meta_app::principal::StageFileFormatType; -use common_sql::plans::Plan; -use common_storages_fuse::TableContext; +use databend_common_ast::ast::Statement; +use databend_common_base::base::tokio; +use databend_common_base::base::tokio::io::AsyncWriteExt; +use databend_common_base::base::ProgressValues; +use databend_common_exception::Result; +use databend_common_expression::block_debug::box_render; +use databend_common_expression::infer_table_schema; +use databend_common_expression::DataSchemaRef; +use databend_common_expression::SendableDataBlockStream; +use databend_common_formats::FileFormatOptionsExt; +use databend_common_meta_app::principal::FileFormatParams; +use databend_common_meta_app::principal::StageFileFormatType; +use databend_common_sql::plans::Plan; +use databend_common_storages_fuse::TableContext; use futures::StreamExt; use indicatif::HumanBytes; use indicatif::ProgressBar; diff --git a/src/query/service/src/local/executor.rs b/src/query/service/src/local/executor.rs index b6c971176832..fa3d986bc0d1 100644 --- a/src/query/service/src/local/executor.rs +++ b/src/query/service/src/local/executor.rs @@ -14,24 +14,24 @@ use std::sync::Arc; -use common_ast::ast::Statement; -use common_ast::parser::token::TokenKind; -use common_ast::parser::token::Tokenizer; -use common_base::base::tokio; -use common_base::base::tokio::io::AsyncRead; -use common_base::base::tokio::time::Instant; -use common_config::DATABEND_COMMIT_VERSION; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::types::DataType; -use common_expression::types::StringType; -use common_expression::types::ValueType; -use common_expression::SendableDataBlockStream; -use common_meta_app::principal::GrantObject; -use common_meta_app::principal::UserInfo; -use common_meta_app::principal::UserPrivilegeSet; -use common_sql::plans::Plan; -use common_sql::Planner; +use databend_common_ast::ast::Statement; +use databend_common_ast::parser::token::TokenKind; +use databend_common_ast::parser::token::Tokenizer; +use databend_common_base::base::tokio; +use databend_common_base::base::tokio::io::AsyncRead; +use databend_common_base::base::tokio::time::Instant; +use databend_common_config::DATABEND_COMMIT_VERSION; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::types::DataType; +use databend_common_expression::types::StringType; +use databend_common_expression::types::ValueType; +use databend_common_expression::SendableDataBlockStream; +use databend_common_meta_app::principal::GrantObject; +use databend_common_meta_app::principal::UserInfo; +use databend_common_meta_app::principal::UserPrivilegeSet; +use databend_common_sql::plans::Plan; +use databend_common_sql::Planner; use futures_util::StreamExt; use rustyline::config::Builder; use rustyline::error::ReadlineError; diff --git a/src/query/service/src/local/helper.rs b/src/query/service/src/local/helper.rs index 6cb1f0cd3ead..8ac5d8aa71cf 100644 --- a/src/query/service/src/local/helper.rs +++ b/src/query/service/src/local/helper.rs @@ -15,9 +15,9 @@ use std::borrow::Cow; use std::sync::Arc; -use common_ast::parser::all_reserved_keywords; -use common_ast::parser::token::TokenKind; -use common_ast::parser::tokenize_sql; +use databend_common_ast::parser::all_reserved_keywords; +use databend_common_ast::parser::token::TokenKind; +use databend_common_ast::parser::tokenize_sql; use rustyline::completion::Completer; use rustyline::completion::FilenameCompleter; use rustyline::completion::Pair; diff --git a/src/query/service/src/local/mod.rs b/src/query/service/src/local/mod.rs index 42c5e6077d96..5b72a138621a 100644 --- a/src/query/service/src/local/mod.rs +++ b/src/query/service/src/local/mod.rs @@ -22,14 +22,14 @@ use std::io::stdin; use std::io::IsTerminal; use std::path::Path; -use common_config::Config; -use common_config::InnerConfig; -use common_exception::Result; -use common_license::license_manager::LicenseManager; -use common_license::license_manager::OssLicenseManager; -use common_meta_app::storage::StorageFsConfig; -use common_meta_app::storage::StorageParams; -use common_meta_embedded::MetaEmbedded; +use databend_common_config::Config; +use databend_common_config::InnerConfig; +use databend_common_exception::Result; +use databend_common_license::license_manager::LicenseManager; +use databend_common_license::license_manager::OssLicenseManager; +use databend_common_meta_app::storage::StorageFsConfig; +use databend_common_meta_app::storage::StorageParams; +use databend_common_meta_embedded::MetaEmbedded; use crate::clusters::ClusterDiscovery; use crate::GlobalServices; diff --git a/src/query/service/src/locks/lock_holder.rs b/src/query/service/src/locks/lock_holder.rs index 93432f67da15..0653955d7597 100644 --- a/src/query/service/src/locks/lock_holder.rs +++ b/src/query/service/src/locks/lock_holder.rs @@ -19,18 +19,18 @@ use std::time::Duration; use std::time::Instant; use backoff::backoff::Backoff; -use common_base::base::tokio::sync::Notify; -use common_base::base::tokio::time::sleep; -use common_base::runtime::GlobalIORuntime; -use common_base::runtime::TrySpawn; -use common_catalog::catalog::Catalog; -use common_catalog::lock::Lock; -use common_catalog::lock::LockExt; -use common_exception::ErrorCode; -use common_exception::Result; -use common_meta_app::schema::DeleteLockRevReq; -use common_meta_app::schema::ExtendLockRevReq; -use common_storages_fuse::operations::set_backoff; +use databend_common_base::base::tokio::sync::Notify; +use databend_common_base::base::tokio::time::sleep; +use databend_common_base::runtime::GlobalIORuntime; +use databend_common_base::runtime::TrySpawn; +use databend_common_catalog::catalog::Catalog; +use databend_common_catalog::lock::Lock; +use databend_common_catalog::lock::LockExt; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_meta_app::schema::DeleteLockRevReq; +use databend_common_meta_app::schema::ExtendLockRevReq; +use databend_common_storages_fuse::operations::set_backoff; use futures::future::select; use futures::future::Either; use rand::thread_rng; diff --git a/src/query/service/src/locks/lock_manager.rs b/src/query/service/src/locks/lock_manager.rs index 39a384e99f6c..0b3bd60b15a0 100644 --- a/src/query/service/src/locks/lock_manager.rs +++ b/src/query/service/src/locks/lock_manager.rs @@ -16,27 +16,27 @@ use std::collections::HashMap; use std::sync::Arc; use std::time::Duration; -use common_base::base::tokio::sync::mpsc; -use common_base::base::tokio::time::timeout; -use common_base::base::GlobalInstance; -use common_base::runtime::GlobalIORuntime; -use common_base::runtime::TrySpawn; -use common_base::GLOBAL_TASK; -use common_catalog::lock::Lock; -use common_catalog::lock::LockExt; -use common_catalog::table_context::TableContext; -use common_exception::ErrorCode; -use common_exception::Result; -use common_meta_app::schema::TableInfo; -use common_meta_types::protobuf::watch_request::FilterType; -use common_meta_types::protobuf::WatchRequest; -use common_metrics::lock::metrics_inc_shutdown_lock_holder_nums; -use common_metrics::lock::metrics_inc_start_lock_holder_nums; -use common_metrics::lock::record_acquired_lock_nums; -use common_metrics::lock::record_created_lock_nums; -use common_pipeline_core::LockGuard; -use common_pipeline_core::UnlockApi; -use common_users::UserApiProvider; +use databend_common_base::base::tokio::sync::mpsc; +use databend_common_base::base::tokio::time::timeout; +use databend_common_base::base::GlobalInstance; +use databend_common_base::runtime::GlobalIORuntime; +use databend_common_base::runtime::TrySpawn; +use databend_common_base::GLOBAL_TASK; +use databend_common_catalog::lock::Lock; +use databend_common_catalog::lock::LockExt; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_meta_app::schema::TableInfo; +use databend_common_meta_types::protobuf::watch_request::FilterType; +use databend_common_meta_types::protobuf::WatchRequest; +use databend_common_metrics::lock::metrics_inc_shutdown_lock_holder_nums; +use databend_common_metrics::lock::metrics_inc_start_lock_holder_nums; +use databend_common_metrics::lock::record_acquired_lock_nums; +use databend_common_metrics::lock::record_created_lock_nums; +use databend_common_pipeline_core::LockGuard; +use databend_common_pipeline_core::UnlockApi; +use databend_common_users::UserApiProvider; use futures_util::StreamExt; use parking_lot::RwLock; diff --git a/src/query/service/src/locks/table_lock/mod.rs b/src/query/service/src/locks/table_lock/mod.rs index 4434f8bbea47..8b4429feb340 100644 --- a/src/query/service/src/locks/table_lock/mod.rs +++ b/src/query/service/src/locks/table_lock/mod.rs @@ -14,15 +14,15 @@ use std::sync::Arc; -use common_catalog::lock::Lock; -use common_catalog::table_context::TableContext; -use common_exception::Result; -use common_meta_app::schema::LockKey; -use common_meta_app::schema::LockType; -use common_meta_app::schema::TableInfo; -use common_meta_app::schema::TableLockKey; -use common_meta_kvapi::kvapi::Key; -use common_pipeline_core::LockGuard; +use databend_common_catalog::lock::Lock; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::Result; +use databend_common_meta_app::schema::LockKey; +use databend_common_meta_app::schema::LockType; +use databend_common_meta_app::schema::TableInfo; +use databend_common_meta_app::schema::TableLockKey; +use databend_common_meta_kvapi::kvapi::Key; +use databend_common_pipeline_core::LockGuard; use crate::locks::LockManager; diff --git a/src/query/service/src/metrics/metric_service.rs b/src/query/service/src/metrics/metric_service.rs index ff5abe1928be..97f9b7276f9f 100644 --- a/src/query/service/src/metrics/metric_service.rs +++ b/src/query/service/src/metrics/metric_service.rs @@ -15,11 +15,11 @@ use std::net::SocketAddr; use std::time::Duration; -use common_exception::ErrorCode; -use common_http::HttpError; -use common_http::HttpShutdownHandler; -use common_metrics::load_global_prometheus_registry; -use common_metrics::render_prometheus_metrics; +use databend_common_exception::ErrorCode; +use databend_common_http::HttpError; +use databend_common_http::HttpShutdownHandler; +use databend_common_metrics::load_global_prometheus_registry; +use databend_common_metrics::render_prometheus_metrics; use poem::IntoResponse; use crate::servers::Server; diff --git a/src/query/service/src/pipelines/builders/builder_aggregate.rs b/src/query/service/src/pipelines/builders/builder_aggregate.rs index 7e315234b8c7..d67fc5fff89e 100644 --- a/src/query/service/src/pipelines/builders/builder_aggregate.rs +++ b/src/query/service/src/pipelines/builders/builder_aggregate.rs @@ -14,27 +14,27 @@ use std::sync::Arc; -use common_catalog::table_context::TableContext; -use common_exception::Result; -use common_expression::with_hash_method; -use common_expression::with_mappedhash_method; -use common_expression::AggregateFunctionRef; -use common_expression::DataBlock; -use common_expression::DataSchemaRef; -use common_expression::HashMethodKind; -use common_functions::aggregates::AggregateFunctionFactory; -use common_pipeline_core::processors::ProcessorPtr; -use common_pipeline_core::query_spill_prefix; -use common_pipeline_transforms::processors::ProcessorProfileWrapper; -use common_pipeline_transforms::processors::ProfileStub; -use common_pipeline_transforms::processors::Transformer; -use common_sql::executor::physical_plans::AggregateExpand; -use common_sql::executor::physical_plans::AggregateFinal; -use common_sql::executor::physical_plans::AggregateFunctionDesc; -use common_sql::executor::physical_plans::AggregatePartial; -use common_sql::executor::PhysicalPlan; -use common_sql::IndexType; -use common_storage::DataOperator; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::Result; +use databend_common_expression::with_hash_method; +use databend_common_expression::with_mappedhash_method; +use databend_common_expression::AggregateFunctionRef; +use databend_common_expression::DataBlock; +use databend_common_expression::DataSchemaRef; +use databend_common_expression::HashMethodKind; +use databend_common_functions::aggregates::AggregateFunctionFactory; +use databend_common_pipeline_core::processors::ProcessorPtr; +use databend_common_pipeline_core::query_spill_prefix; +use databend_common_pipeline_transforms::processors::ProcessorProfileWrapper; +use databend_common_pipeline_transforms::processors::ProfileStub; +use databend_common_pipeline_transforms::processors::Transformer; +use databend_common_sql::executor::physical_plans::AggregateExpand; +use databend_common_sql::executor::physical_plans::AggregateFinal; +use databend_common_sql::executor::physical_plans::AggregateFunctionDesc; +use databend_common_sql::executor::physical_plans::AggregatePartial; +use databend_common_sql::executor::PhysicalPlan; +use databend_common_sql::IndexType; +use databend_common_storage::DataOperator; use crate::pipelines::processors::transforms::aggregator::build_partition_bucket; use crate::pipelines::processors::transforms::aggregator::AggregateInjector; diff --git a/src/query/service/src/pipelines/builders/builder_append_table.rs b/src/query/service/src/pipelines/builders/builder_append_table.rs index b33c9c783390..25016dfdf632 100644 --- a/src/query/service/src/pipelines/builders/builder_append_table.rs +++ b/src/query/service/src/pipelines/builders/builder_append_table.rs @@ -14,13 +14,13 @@ use std::sync::Arc; -use common_catalog::table::AppendMode; -use common_catalog::table::Table; -use common_exception::Result; -use common_expression::DataSchemaRef; -use common_meta_app::schema::UpdateStreamMetaReq; -use common_meta_app::schema::UpsertTableCopiedFileReq; -use common_pipeline_core::Pipeline; +use databend_common_catalog::table::AppendMode; +use databend_common_catalog::table::Table; +use databend_common_exception::Result; +use databend_common_expression::DataSchemaRef; +use databend_common_meta_app::schema::UpdateStreamMetaReq; +use databend_common_meta_app::schema::UpsertTableCopiedFileReq; +use databend_common_pipeline_core::Pipeline; use crate::pipelines::PipelineBuilder; use crate::sessions::QueryContext; diff --git a/src/query/service/src/pipelines/builders/builder_commit.rs b/src/query/service/src/pipelines/builders/builder_commit.rs index 8795c400dfb1..6fcd25b5aeca 100644 --- a/src/query/service/src/pipelines/builders/builder_commit.rs +++ b/src/query/service/src/pipelines/builders/builder_commit.rs @@ -12,17 +12,17 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_exception::Result; -use common_pipeline_core::processors::ProcessorPtr; -use common_pipeline_transforms::processors::AccumulatingTransformer; -use common_pipeline_transforms::processors::AsyncAccumulatingTransformer; -use common_sql::executor::physical_plans::CommitSink as PhysicalCommitSink; -use common_sql::executor::physical_plans::MutationKind; -use common_storages_fuse::operations::CommitSink; -use common_storages_fuse::operations::MutationGenerator; -use common_storages_fuse::operations::TableMutationAggregator; -use common_storages_fuse::operations::TransformMergeCommitMeta; -use common_storages_fuse::FuseTable; +use databend_common_exception::Result; +use databend_common_pipeline_core::processors::ProcessorPtr; +use databend_common_pipeline_transforms::processors::AccumulatingTransformer; +use databend_common_pipeline_transforms::processors::AsyncAccumulatingTransformer; +use databend_common_sql::executor::physical_plans::CommitSink as PhysicalCommitSink; +use databend_common_sql::executor::physical_plans::MutationKind; +use databend_common_storages_fuse::operations::CommitSink; +use databend_common_storages_fuse::operations::MutationGenerator; +use databend_common_storages_fuse::operations::TableMutationAggregator; +use databend_common_storages_fuse::operations::TransformMergeCommitMeta; +use databend_common_storages_fuse::FuseTable; use crate::locks::LockManager; use crate::pipelines::PipelineBuilder; diff --git a/src/query/service/src/pipelines/builders/builder_compact.rs b/src/query/service/src/pipelines/builders/builder_compact.rs index 7b3772667dc4..8c653add18f9 100644 --- a/src/query/service/src/pipelines/builders/builder_compact.rs +++ b/src/query/service/src/pipelines/builders/builder_compact.rs @@ -12,10 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_exception::Result; -use common_pipeline_sources::EmptySource; -use common_sql::executor::physical_plans::CompactSource; -use common_storages_fuse::FuseTable; +use databend_common_exception::Result; +use databend_common_pipeline_sources::EmptySource; +use databend_common_sql::executor::physical_plans::CompactSource; +use databend_common_storages_fuse::FuseTable; use crate::pipelines::PipelineBuilder; diff --git a/src/query/service/src/pipelines/builders/builder_copy_into.rs b/src/query/service/src/pipelines/builders/builder_copy_into.rs index 2e6157dc6aa6..eae57056e844 100644 --- a/src/query/service/src/pipelines/builders/builder_copy_into.rs +++ b/src/query/service/src/pipelines/builders/builder_copy_into.rs @@ -16,22 +16,22 @@ use std::collections::BTreeMap; use std::sync::Arc; use chrono::Utc; -use common_catalog::table::AppendMode; -use common_catalog::table::Table; -use common_catalog::table_context::TableContext; -use common_exception::Result; -use common_expression::DataSchema; -use common_expression::DataSchemaRef; -use common_expression::Scalar; -use common_meta_app::principal::StageInfo; -use common_meta_app::schema::TableCopiedFileInfo; -use common_meta_app::schema::UpsertTableCopiedFileReq; -use common_pipeline_core::Pipeline; -use common_sql::executor::physical_plans::CopyIntoTable; -use common_sql::executor::physical_plans::CopyIntoTableSource; -use common_sql::plans::CopyIntoTableMode; -use common_storage::StageFileInfo; -use common_storages_stage::StageTable; +use databend_common_catalog::table::AppendMode; +use databend_common_catalog::table::Table; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::Result; +use databend_common_expression::DataSchema; +use databend_common_expression::DataSchemaRef; +use databend_common_expression::Scalar; +use databend_common_meta_app::principal::StageInfo; +use databend_common_meta_app::schema::TableCopiedFileInfo; +use databend_common_meta_app::schema::UpsertTableCopiedFileReq; +use databend_common_pipeline_core::Pipeline; +use databend_common_sql::executor::physical_plans::CopyIntoTable; +use databend_common_sql::executor::physical_plans::CopyIntoTableSource; +use databend_common_sql::plans::CopyIntoTableMode; +use databend_common_storage::StageFileInfo; +use databend_common_storages_stage::StageTable; use log::debug; use log::info; diff --git a/src/query/service/src/pipelines/builders/builder_delete.rs b/src/query/service/src/pipelines/builders/builder_delete.rs index 3e12701d1dc7..9a9820e522d2 100644 --- a/src/query/service/src/pipelines/builders/builder_delete.rs +++ b/src/query/service/src/pipelines/builders/builder_delete.rs @@ -14,21 +14,21 @@ use std::sync::Arc; -use common_base::runtime::Runtime; -use common_catalog::plan::Projection; -use common_catalog::table::Table; -use common_catalog::table_context::TableContext; -use common_exception::Result; -use common_pipeline_sources::EmptySource; -use common_sql::evaluator::CompoundBlockOperator; -use common_sql::executor::physical_plans::DeleteSource; -use common_sql::executor::physical_plans::MutationKind; -use common_sql::gen_mutation_stream_operator; -use common_storages_fuse::operations::MutationBlockPruningContext; -use common_storages_fuse::operations::TransformSerializeBlock; -use common_storages_fuse::FuseLazyPartInfo; -use common_storages_fuse::FuseTable; -use common_storages_fuse::SegmentLocation; +use databend_common_base::runtime::Runtime; +use databend_common_catalog::plan::Projection; +use databend_common_catalog::table::Table; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::Result; +use databend_common_pipeline_sources::EmptySource; +use databend_common_sql::evaluator::CompoundBlockOperator; +use databend_common_sql::executor::physical_plans::DeleteSource; +use databend_common_sql::executor::physical_plans::MutationKind; +use databend_common_sql::gen_mutation_stream_operator; +use databend_common_storages_fuse::operations::MutationBlockPruningContext; +use databend_common_storages_fuse::operations::TransformSerializeBlock; +use databend_common_storages_fuse::FuseLazyPartInfo; +use databend_common_storages_fuse::FuseTable; +use databend_common_storages_fuse::SegmentLocation; use log::info; use crate::pipelines::processors::TransformAddStreamColumns; diff --git a/src/query/service/src/pipelines/builders/builder_distributed_insert_select.rs b/src/query/service/src/pipelines/builders/builder_distributed_insert_select.rs index 0959fe0173d7..0935c21d828e 100644 --- a/src/query/service/src/pipelines/builders/builder_distributed_insert_select.rs +++ b/src/query/service/src/pipelines/builders/builder_distributed_insert_select.rs @@ -12,9 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_catalog::table::AppendMode; -use common_exception::Result; -use common_sql::executor::physical_plans::DistributedInsertSelect; +use databend_common_catalog::table::AppendMode; +use databend_common_exception::Result; +use databend_common_sql::executor::physical_plans::DistributedInsertSelect; use crate::pipelines::processors::TransformCastSchema; use crate::pipelines::PipelineBuilder; diff --git a/src/query/service/src/pipelines/builders/builder_exchange.rs b/src/query/service/src/pipelines/builders/builder_exchange.rs index aff06342421f..733debac29d7 100644 --- a/src/query/service/src/pipelines/builders/builder_exchange.rs +++ b/src/query/service/src/pipelines/builders/builder_exchange.rs @@ -12,9 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_exception::Result; -use common_sql::executor::physical_plans::ExchangeSink; -use common_sql::executor::physical_plans::ExchangeSource; +use databend_common_exception::Result; +use databend_common_sql::executor::physical_plans::ExchangeSink; +use databend_common_sql::executor::physical_plans::ExchangeSource; use crate::pipelines::PipelineBuilder; diff --git a/src/query/service/src/pipelines/builders/builder_fill_missing_columns.rs b/src/query/service/src/pipelines/builders/builder_fill_missing_columns.rs index bbc9d4c964d9..58dff429f1c1 100644 --- a/src/query/service/src/pipelines/builders/builder_fill_missing_columns.rs +++ b/src/query/service/src/pipelines/builders/builder_fill_missing_columns.rs @@ -14,10 +14,10 @@ use std::sync::Arc; -use common_catalog::table::Table; -use common_exception::Result; -use common_expression::DataSchemaRef; -use common_pipeline_core::Pipeline; +use databend_common_catalog::table::Table; +use databend_common_exception::Result; +use databend_common_expression::DataSchemaRef; +use databend_common_pipeline_core::Pipeline; use crate::pipelines::processors::transforms::TransformAddComputedColumns; use crate::pipelines::processors::TransformResortAddOn; diff --git a/src/query/service/src/pipelines/builders/builder_filter.rs b/src/query/service/src/pipelines/builders/builder_filter.rs index 49193ca1a04f..1042a73edfc0 100644 --- a/src/query/service/src/pipelines/builders/builder_filter.rs +++ b/src/query/service/src/pipelines/builders/builder_filter.rs @@ -12,13 +12,13 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::type_check::check_function; -use common_functions::BUILTIN_FUNCTIONS; -use common_pipeline_core::processors::ProcessorPtr; -use common_pipeline_transforms::processors::ProcessorProfileWrapper; -use common_sql::executor::physical_plans::Filter; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::type_check::check_function; +use databend_common_functions::BUILTIN_FUNCTIONS; +use databend_common_pipeline_core::processors::ProcessorPtr; +use databend_common_pipeline_transforms::processors::ProcessorProfileWrapper; +use databend_common_sql::executor::physical_plans::Filter; use crate::pipelines::processors::transforms::TransformFilter; use crate::pipelines::PipelineBuilder; diff --git a/src/query/service/src/pipelines/builders/builder_join.rs b/src/query/service/src/pipelines/builders/builder_join.rs index 1cae642bf8d2..69126c3f3ce3 100644 --- a/src/query/service/src/pipelines/builders/builder_join.rs +++ b/src/query/service/src/pipelines/builders/builder_join.rs @@ -14,19 +14,19 @@ use std::sync::Arc; -use common_base::base::tokio::sync::Barrier; -use common_exception::Result; -use common_pipeline_core::processors::ProcessorPtr; -use common_pipeline_sinks::Sinker; -use common_pipeline_transforms::processors::ProcessorProfileWrapper; -use common_pipeline_transforms::processors::ProfileStub; -use common_pipeline_transforms::processors::Transformer; -use common_sql::executor::physical_plans::HashJoin; -use common_sql::executor::physical_plans::MaterializedCte; -use common_sql::executor::physical_plans::RangeJoin; -use common_sql::executor::PhysicalPlan; -use common_sql::ColumnBinding; -use common_sql::IndexType; +use databend_common_base::base::tokio::sync::Barrier; +use databend_common_exception::Result; +use databend_common_pipeline_core::processors::ProcessorPtr; +use databend_common_pipeline_sinks::Sinker; +use databend_common_pipeline_transforms::processors::ProcessorProfileWrapper; +use databend_common_pipeline_transforms::processors::ProfileStub; +use databend_common_pipeline_transforms::processors::Transformer; +use databend_common_sql::executor::physical_plans::HashJoin; +use databend_common_sql::executor::physical_plans::MaterializedCte; +use databend_common_sql::executor::physical_plans::RangeJoin; +use databend_common_sql::executor::PhysicalPlan; +use databend_common_sql::ColumnBinding; +use databend_common_sql::IndexType; use crate::pipelines::processors::transforms::range_join::RangeJoinState; use crate::pipelines::processors::transforms::range_join::TransformRangeJoinLeft; diff --git a/src/query/service/src/pipelines/builders/builder_limit.rs b/src/query/service/src/pipelines/builders/builder_limit.rs index 107edda73338..7b150531fadc 100644 --- a/src/query/service/src/pipelines/builders/builder_limit.rs +++ b/src/query/service/src/pipelines/builders/builder_limit.rs @@ -12,10 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_exception::Result; -use common_pipeline_core::processors::ProcessorPtr; -use common_pipeline_transforms::processors::ProcessorProfileWrapper; -use common_sql::executor::physical_plans::Limit; +use databend_common_exception::Result; +use databend_common_pipeline_core::processors::ProcessorPtr; +use databend_common_pipeline_transforms::processors::ProcessorProfileWrapper; +use databend_common_sql::executor::physical_plans::Limit; use crate::pipelines::processors::TransformLimit; use crate::pipelines::PipelineBuilder; diff --git a/src/query/service/src/pipelines/builders/builder_merge_into.rs b/src/query/service/src/pipelines/builders/builder_merge_into.rs index 8b8ee2c2ce0a..cebbac8f7433 100644 --- a/src/query/service/src/pipelines/builders/builder_merge_into.rs +++ b/src/query/service/src/pipelines/builders/builder_merge_into.rs @@ -15,37 +15,37 @@ use std::sync::atomic::AtomicU64; use std::sync::Arc; -use common_base::base::tokio::sync::Semaphore; -use common_catalog::table::Table; -use common_catalog::table_context::TableContext; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::DataSchema; -use common_expression::DataSchemaRef; -use common_expression::ROW_NUMBER_COL_NAME; -use common_pipeline_core::processors::InputPort; -use common_pipeline_core::processors::OutputPort; -use common_pipeline_core::processors::ProcessorPtr; -use common_pipeline_core::Pipe; -use common_pipeline_core::PipeItem; -use common_pipeline_core::TransformPipeBuilder; -use common_pipeline_transforms::processors::create_dummy_item; -use common_sql::binder::MergeIntoType; -use common_sql::evaluator::BlockOperator; -use common_sql::evaluator::CompoundBlockOperator; -use common_sql::executor::physical_plans::MergeInto; -use common_sql::executor::physical_plans::MergeIntoAddRowNumber; -use common_sql::executor::physical_plans::MergeIntoAppendNotMatched; -use common_sql::executor::physical_plans::MergeIntoSource; -use common_sql::executor::physical_plans::MutationKind; -use common_storages_fuse::operations::common::TransformSerializeSegment; -use common_storages_fuse::operations::MatchedSplitProcessor; -use common_storages_fuse::operations::MergeIntoNotMatchedProcessor; -use common_storages_fuse::operations::MergeIntoSplitProcessor; -use common_storages_fuse::operations::RowNumberAndLogSplitProcessor; -use common_storages_fuse::operations::TransformAddRowNumberColumnProcessor; -use common_storages_fuse::operations::TransformSerializeBlock; -use common_storages_fuse::FuseTable; +use databend_common_base::base::tokio::sync::Semaphore; +use databend_common_catalog::table::Table; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::DataSchema; +use databend_common_expression::DataSchemaRef; +use databend_common_expression::ROW_NUMBER_COL_NAME; +use databend_common_pipeline_core::processors::InputPort; +use databend_common_pipeline_core::processors::OutputPort; +use databend_common_pipeline_core::processors::ProcessorPtr; +use databend_common_pipeline_core::Pipe; +use databend_common_pipeline_core::PipeItem; +use databend_common_pipeline_core::TransformPipeBuilder; +use databend_common_pipeline_transforms::processors::create_dummy_item; +use databend_common_sql::binder::MergeIntoType; +use databend_common_sql::evaluator::BlockOperator; +use databend_common_sql::evaluator::CompoundBlockOperator; +use databend_common_sql::executor::physical_plans::MergeInto; +use databend_common_sql::executor::physical_plans::MergeIntoAddRowNumber; +use databend_common_sql::executor::physical_plans::MergeIntoAppendNotMatched; +use databend_common_sql::executor::physical_plans::MergeIntoSource; +use databend_common_sql::executor::physical_plans::MutationKind; +use databend_common_storages_fuse::operations::common::TransformSerializeSegment; +use databend_common_storages_fuse::operations::MatchedSplitProcessor; +use databend_common_storages_fuse::operations::MergeIntoNotMatchedProcessor; +use databend_common_storages_fuse::operations::MergeIntoSplitProcessor; +use databend_common_storages_fuse::operations::RowNumberAndLogSplitProcessor; +use databend_common_storages_fuse::operations::TransformAddRowNumberColumnProcessor; +use databend_common_storages_fuse::operations::TransformSerializeBlock; +use databend_common_storages_fuse::FuseTable; use crate::pipelines::processors::transforms::AccumulateRowNumber; use crate::pipelines::processors::transforms::ExtractHashTableByRowNumber; diff --git a/src/query/service/src/pipelines/builders/builder_on_finished.rs b/src/query/service/src/pipelines/builders/builder_on_finished.rs index 434f70834cd5..b644b0c6b116 100644 --- a/src/query/service/src/pipelines/builders/builder_on_finished.rs +++ b/src/query/service/src/pipelines/builders/builder_on_finished.rs @@ -15,15 +15,15 @@ use std::sync::Arc; use std::time::Instant; -use common_base::runtime::GlobalIORuntime; -use common_catalog::table_context::TableContext; -use common_exception::Result; -use common_meta_app::principal::StageInfo; -use common_metrics::storage::*; -use common_pipeline_core::Pipeline; -use common_storage::StageFileInfo; -use common_storages_fuse::io::Files; -use common_storages_stage::StageTable; +use databend_common_base::runtime::GlobalIORuntime; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::Result; +use databend_common_meta_app::principal::StageInfo; +use databend_common_metrics::storage::*; +use databend_common_pipeline_core::Pipeline; +use databend_common_storage::StageFileInfo; +use databend_common_storages_fuse::io::Files; +use databend_common_storages_stage::StageTable; use log::error; use crate::pipelines::PipelineBuilder; diff --git a/src/query/service/src/pipelines/builders/builder_project.rs b/src/query/service/src/pipelines/builders/builder_project.rs index 354a5575578b..b5baacc8569b 100644 --- a/src/query/service/src/pipelines/builders/builder_project.rs +++ b/src/query/service/src/pipelines/builders/builder_project.rs @@ -12,19 +12,19 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_exception::Result; -use common_expression::DataSchemaRef; -use common_expression::FunctionContext; -use common_functions::BUILTIN_FUNCTIONS; -use common_pipeline_core::processors::ProcessorPtr; -use common_pipeline_core::Pipeline; -use common_pipeline_sinks::EmptySink; -use common_pipeline_transforms::processors::ProcessorProfileWrapper; -use common_sql::evaluator::BlockOperator; -use common_sql::evaluator::CompoundBlockOperator; -use common_sql::executor::physical_plans::Project; -use common_sql::executor::physical_plans::ProjectSet; -use common_sql::ColumnBinding; +use databend_common_exception::Result; +use databend_common_expression::DataSchemaRef; +use databend_common_expression::FunctionContext; +use databend_common_functions::BUILTIN_FUNCTIONS; +use databend_common_pipeline_core::processors::ProcessorPtr; +use databend_common_pipeline_core::Pipeline; +use databend_common_pipeline_sinks::EmptySink; +use databend_common_pipeline_transforms::processors::ProcessorProfileWrapper; +use databend_common_sql::evaluator::BlockOperator; +use databend_common_sql::evaluator::CompoundBlockOperator; +use databend_common_sql::executor::physical_plans::Project; +use databend_common_sql::executor::physical_plans::ProjectSet; +use databend_common_sql::ColumnBinding; use crate::pipelines::processors::transforms::TransformSRF; use crate::pipelines::PipelineBuilder; diff --git a/src/query/service/src/pipelines/builders/builder_recluster.rs b/src/query/service/src/pipelines/builders/builder_recluster.rs index b2643c6bb3c4..c37000a00a4c 100644 --- a/src/query/service/src/pipelines/builders/builder_recluster.rs +++ b/src/query/service/src/pipelines/builders/builder_recluster.rs @@ -14,30 +14,30 @@ use std::sync::Arc; -use common_catalog::plan::DataSourceInfo; -use common_catalog::plan::DataSourcePlan; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::DataSchemaRefExt; -use common_expression::SortColumnDescription; -use common_metrics::storage::metrics_inc_recluster_block_bytes_to_read; -use common_metrics::storage::metrics_inc_recluster_block_nums_to_read; -use common_metrics::storage::metrics_inc_recluster_row_nums_to_read; -use common_pipeline_core::processors::ProcessorPtr; -use common_pipeline_sources::EmptySource; -use common_pipeline_transforms::processors::AsyncAccumulatingTransformer; -use common_sql::evaluator::CompoundBlockOperator; -use common_sql::executor::physical_plans::MutationKind; -use common_sql::executor::physical_plans::ReclusterSink; -use common_sql::executor::physical_plans::ReclusterSource; -use common_sql::gen_mutation_stream_operator; -use common_storages_factory::Table; -use common_storages_fuse::operations::common::CommitSink; -use common_storages_fuse::operations::common::MutationGenerator; -use common_storages_fuse::operations::ReclusterAggregator; -use common_storages_fuse::operations::TransformSerializeBlock; -use common_storages_fuse::FuseTable; -use common_storages_fuse::TableContext; +use databend_common_catalog::plan::DataSourceInfo; +use databend_common_catalog::plan::DataSourcePlan; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::DataSchemaRefExt; +use databend_common_expression::SortColumnDescription; +use databend_common_metrics::storage::metrics_inc_recluster_block_bytes_to_read; +use databend_common_metrics::storage::metrics_inc_recluster_block_nums_to_read; +use databend_common_metrics::storage::metrics_inc_recluster_row_nums_to_read; +use databend_common_pipeline_core::processors::ProcessorPtr; +use databend_common_pipeline_sources::EmptySource; +use databend_common_pipeline_transforms::processors::AsyncAccumulatingTransformer; +use databend_common_sql::evaluator::CompoundBlockOperator; +use databend_common_sql::executor::physical_plans::MutationKind; +use databend_common_sql::executor::physical_plans::ReclusterSink; +use databend_common_sql::executor::physical_plans::ReclusterSource; +use databend_common_sql::gen_mutation_stream_operator; +use databend_common_storages_factory::Table; +use databend_common_storages_fuse::operations::common::CommitSink; +use databend_common_storages_fuse::operations::common::MutationGenerator; +use databend_common_storages_fuse::operations::ReclusterAggregator; +use databend_common_storages_fuse::operations::TransformSerializeBlock; +use databend_common_storages_fuse::FuseTable; +use databend_common_storages_fuse::TableContext; use crate::locks::LockManager; use crate::pipelines::builders::SortPipelineBuilder; diff --git a/src/query/service/src/pipelines/builders/builder_replace_into.rs b/src/query/service/src/pipelines/builders/builder_replace_into.rs index 7d6662dcb990..377be04eef00 100644 --- a/src/query/service/src/pipelines/builders/builder_replace_into.rs +++ b/src/query/service/src/pipelines/builders/builder_replace_into.rs @@ -14,43 +14,43 @@ use std::sync::Arc; -use common_ast::parser::parse_comma_separated_exprs; -use common_ast::parser::tokenize_sql; -use common_base::base::tokio::sync::Semaphore; -use common_catalog::table::Table; -use common_catalog::table_context::TableContext; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::ColumnBuilder; -use common_expression::DataBlock; -use common_expression::DataSchema; -use common_expression::DataSchemaRef; -use common_expression::Scalar; -use common_formats::FastFieldDecoderValues; -use common_formats::FastValuesDecodeFallback; -use common_formats::FastValuesDecoder; -use common_functions::BUILTIN_FUNCTIONS; -use common_pipeline_core::processors::InputPort; -use common_pipeline_core::processors::OutputPort; -use common_pipeline_core::Pipe; -use common_pipeline_sources::AsyncSource; -use common_pipeline_sources::AsyncSourcer; -use common_pipeline_transforms::processors::create_dummy_item; -use common_sql::executor::physical_plans::MutationKind; -use common_sql::executor::physical_plans::ReplaceAsyncSourcer; -use common_sql::executor::physical_plans::ReplaceDeduplicate; -use common_sql::executor::physical_plans::ReplaceInto; -use common_sql::executor::physical_plans::ReplaceSelectCtx; -use common_sql::BindContext; -use common_sql::Metadata; -use common_sql::MetadataRef; -use common_sql::NameResolutionContext; -use common_storages_fuse::operations::common::TransformSerializeSegment; -use common_storages_fuse::operations::processors::BroadcastProcessor; -use common_storages_fuse::operations::processors::ReplaceIntoProcessor; -use common_storages_fuse::operations::processors::UnbranchedReplaceIntoProcessor; -use common_storages_fuse::operations::TransformSerializeBlock; -use common_storages_fuse::FuseTable; +use databend_common_ast::parser::parse_comma_separated_exprs; +use databend_common_ast::parser::tokenize_sql; +use databend_common_base::base::tokio::sync::Semaphore; +use databend_common_catalog::table::Table; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::ColumnBuilder; +use databend_common_expression::DataBlock; +use databend_common_expression::DataSchema; +use databend_common_expression::DataSchemaRef; +use databend_common_expression::Scalar; +use databend_common_formats::FastFieldDecoderValues; +use databend_common_formats::FastValuesDecodeFallback; +use databend_common_formats::FastValuesDecoder; +use databend_common_functions::BUILTIN_FUNCTIONS; +use databend_common_pipeline_core::processors::InputPort; +use databend_common_pipeline_core::processors::OutputPort; +use databend_common_pipeline_core::Pipe; +use databend_common_pipeline_sources::AsyncSource; +use databend_common_pipeline_sources::AsyncSourcer; +use databend_common_pipeline_transforms::processors::create_dummy_item; +use databend_common_sql::executor::physical_plans::MutationKind; +use databend_common_sql::executor::physical_plans::ReplaceAsyncSourcer; +use databend_common_sql::executor::physical_plans::ReplaceDeduplicate; +use databend_common_sql::executor::physical_plans::ReplaceInto; +use databend_common_sql::executor::physical_plans::ReplaceSelectCtx; +use databend_common_sql::BindContext; +use databend_common_sql::Metadata; +use databend_common_sql::MetadataRef; +use databend_common_sql::NameResolutionContext; +use databend_common_storages_fuse::operations::common::TransformSerializeSegment; +use databend_common_storages_fuse::operations::processors::BroadcastProcessor; +use databend_common_storages_fuse::operations::processors::ReplaceIntoProcessor; +use databend_common_storages_fuse::operations::processors::UnbranchedReplaceIntoProcessor; +use databend_common_storages_fuse::operations::TransformSerializeBlock; +use databend_common_storages_fuse::FuseTable; use parking_lot::RwLock; use crate::pipelines::processors::TransformCastSchema; diff --git a/src/query/service/src/pipelines/builders/builder_row_fetch.rs b/src/query/service/src/pipelines/builders/builder_row_fetch.rs index db2e7e951003..4632d9fe89c3 100644 --- a/src/query/service/src/pipelines/builders/builder_row_fetch.rs +++ b/src/query/service/src/pipelines/builders/builder_row_fetch.rs @@ -12,10 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_exception::Result; -use common_sql::executor::physical_plans::RowFetch; -use common_sql::executor::PhysicalPlan; -use common_storages_fuse::operations::build_row_fetcher_pipeline; +use databend_common_exception::Result; +use databend_common_sql::executor::physical_plans::RowFetch; +use databend_common_sql::executor::PhysicalPlan; +use databend_common_storages_fuse::operations::build_row_fetcher_pipeline; use crate::pipelines::PipelineBuilder; diff --git a/src/query/service/src/pipelines/builders/builder_scalar.rs b/src/query/service/src/pipelines/builders/builder_scalar.rs index 9522d3c3970c..a7bd3113a04b 100644 --- a/src/query/service/src/pipelines/builders/builder_scalar.rs +++ b/src/query/service/src/pipelines/builders/builder_scalar.rs @@ -12,14 +12,14 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_exception::Result; -use common_functions::BUILTIN_FUNCTIONS; -use common_pipeline_core::processors::ProcessorPtr; -use common_pipeline_transforms::processors::TransformProfileWrapper; -use common_pipeline_transforms::processors::Transformer; -use common_sql::evaluator::BlockOperator; -use common_sql::evaluator::CompoundBlockOperator; -use common_sql::executor::physical_plans::EvalScalar; +use databend_common_exception::Result; +use databend_common_functions::BUILTIN_FUNCTIONS; +use databend_common_pipeline_core::processors::ProcessorPtr; +use databend_common_pipeline_transforms::processors::TransformProfileWrapper; +use databend_common_pipeline_transforms::processors::Transformer; +use databend_common_sql::evaluator::BlockOperator; +use databend_common_sql::evaluator::CompoundBlockOperator; +use databend_common_sql::executor::physical_plans::EvalScalar; use crate::pipelines::PipelineBuilder; diff --git a/src/query/service/src/pipelines/builders/builder_scan.rs b/src/query/service/src/pipelines/builders/builder_scan.rs index d5baa887b9c5..799386af78d7 100644 --- a/src/query/service/src/pipelines/builders/builder_scan.rs +++ b/src/query/service/src/pipelines/builders/builder_scan.rs @@ -16,19 +16,19 @@ use std::sync::Arc; use std::sync::Mutex; use std::time::Instant; -use common_catalog::table_context::TableContext; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::DataBlock; -use common_pipeline_core::processors::ProcessorPtr; -use common_pipeline_sources::OneBlockSource; -use common_pipeline_transforms::processors::ProfileStub; -use common_pipeline_transforms::processors::Transformer; -use common_sql::evaluator::BlockOperator; -use common_sql::evaluator::CompoundBlockOperator; -use common_sql::executor::physical_plans::ConstantTableScan; -use common_sql::executor::physical_plans::CteScan; -use common_sql::executor::physical_plans::TableScan; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::DataBlock; +use databend_common_pipeline_core::processors::ProcessorPtr; +use databend_common_pipeline_sources::OneBlockSource; +use databend_common_pipeline_transforms::processors::ProfileStub; +use databend_common_pipeline_transforms::processors::Transformer; +use databend_common_sql::evaluator::BlockOperator; +use databend_common_sql::evaluator::CompoundBlockOperator; +use databend_common_sql::executor::physical_plans::ConstantTableScan; +use databend_common_sql::executor::physical_plans::CteScan; +use databend_common_sql::executor::physical_plans::TableScan; use crate::pipelines::processors::transforms::MaterializedCteSource; use crate::pipelines::processors::transforms::TransformAddInternalColumns; diff --git a/src/query/service/src/pipelines/builders/builder_sort.rs b/src/query/service/src/pipelines/builders/builder_sort.rs index 92ead930a85b..b921b8197695 100644 --- a/src/query/service/src/pipelines/builders/builder_sort.rs +++ b/src/query/service/src/pipelines/builders/builder_sort.rs @@ -14,26 +14,26 @@ use std::sync::Arc; -use common_exception::Result; -use common_expression::types::DataType; -use common_expression::DataField; -use common_expression::DataSchema; -use common_expression::DataSchemaRef; -use common_expression::DataSchemaRefExt; -use common_expression::SortColumnDescription; -use common_pipeline_core::processors::ProcessorPtr; -use common_pipeline_core::query_spill_prefix; -use common_pipeline_core::Pipeline; -use common_pipeline_transforms::processors::try_add_multi_sort_merge; -use common_pipeline_transforms::processors::ProcessorProfileWrapper; -use common_pipeline_transforms::processors::TransformSortMergeBuilder; -use common_pipeline_transforms::processors::TransformSortPartial; -use common_profile::SharedProcessorProfiles; -use common_sql::evaluator::BlockOperator; -use common_sql::evaluator::CompoundBlockOperator; -use common_sql::executor::physical_plans::Sort; -use common_storage::DataOperator; -use common_storages_fuse::TableContext; +use databend_common_exception::Result; +use databend_common_expression::types::DataType; +use databend_common_expression::DataField; +use databend_common_expression::DataSchema; +use databend_common_expression::DataSchemaRef; +use databend_common_expression::DataSchemaRefExt; +use databend_common_expression::SortColumnDescription; +use databend_common_pipeline_core::processors::ProcessorPtr; +use databend_common_pipeline_core::query_spill_prefix; +use databend_common_pipeline_core::Pipeline; +use databend_common_pipeline_transforms::processors::try_add_multi_sort_merge; +use databend_common_pipeline_transforms::processors::ProcessorProfileWrapper; +use databend_common_pipeline_transforms::processors::TransformSortMergeBuilder; +use databend_common_pipeline_transforms::processors::TransformSortPartial; +use databend_common_profile::SharedProcessorProfiles; +use databend_common_sql::evaluator::BlockOperator; +use databend_common_sql::evaluator::CompoundBlockOperator; +use databend_common_sql::executor::physical_plans::Sort; +use databend_common_storage::DataOperator; +use databend_common_storages_fuse::TableContext; use crate::pipelines::processors::transforms::create_transform_sort_spill; use crate::pipelines::PipelineBuilder; diff --git a/src/query/service/src/pipelines/builders/builder_udf.rs b/src/query/service/src/pipelines/builders/builder_udf.rs index 58ad76561efc..e82e17799537 100644 --- a/src/query/service/src/pipelines/builders/builder_udf.rs +++ b/src/query/service/src/pipelines/builders/builder_udf.rs @@ -12,10 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_exception::Result; -use common_pipeline_core::processors::ProcessorPtr; -use common_pipeline_transforms::processors::ProcessorProfileWrapper; -use common_sql::executor::physical_plans::Udf; +use databend_common_exception::Result; +use databend_common_pipeline_core::processors::ProcessorPtr; +use databend_common_pipeline_transforms::processors::ProcessorProfileWrapper; +use databend_common_sql::executor::physical_plans::Udf; use crate::pipelines::processors::transforms::TransformUdf; use crate::pipelines::PipelineBuilder; diff --git a/src/query/service/src/pipelines/builders/builder_union_all.rs b/src/query/service/src/pipelines/builders/builder_union_all.rs index 3fd88e0c09ef..4dd22005d31d 100644 --- a/src/query/service/src/pipelines/builders/builder_union_all.rs +++ b/src/query/service/src/pipelines/builders/builder_union_all.rs @@ -13,13 +13,13 @@ // limitations under the License. use async_channel::Receiver; -use common_exception::Result; -use common_expression::DataBlock; -use common_pipeline_core::processors::ProcessorPtr; -use common_pipeline_sinks::UnionReceiveSink; -use common_pipeline_transforms::processors::ProcessorProfileWrapper; -use common_sql::executor::physical_plans::UnionAll; -use common_sql::executor::PhysicalPlan; +use databend_common_exception::Result; +use databend_common_expression::DataBlock; +use databend_common_pipeline_core::processors::ProcessorPtr; +use databend_common_pipeline_sinks::UnionReceiveSink; +use databend_common_pipeline_transforms::processors::ProcessorProfileWrapper; +use databend_common_sql::executor::physical_plans::UnionAll; +use databend_common_sql::executor::PhysicalPlan; use crate::pipelines::processors::transforms::TransformMergeBlock; use crate::pipelines::PipelineBuilder; diff --git a/src/query/service/src/pipelines/builders/builder_update.rs b/src/query/service/src/pipelines/builders/builder_update.rs index bff05a7c1b81..3fa81ce674b0 100644 --- a/src/query/service/src/pipelines/builders/builder_update.rs +++ b/src/query/service/src/pipelines/builders/builder_update.rs @@ -12,16 +12,16 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_catalog::table::Table; -use common_catalog::table_context::TableContext; -use common_exception::Result; -use common_pipeline_sources::EmptySource; -use common_sql::evaluator::CompoundBlockOperator; -use common_sql::executor::physical_plans::MutationKind; -use common_sql::executor::physical_plans::UpdateSource; -use common_sql::gen_mutation_stream_operator; -use common_storages_fuse::operations::TransformSerializeBlock; -use common_storages_fuse::FuseTable; +use databend_common_catalog::table::Table; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::Result; +use databend_common_pipeline_sources::EmptySource; +use databend_common_sql::evaluator::CompoundBlockOperator; +use databend_common_sql::executor::physical_plans::MutationKind; +use databend_common_sql::executor::physical_plans::UpdateSource; +use databend_common_sql::gen_mutation_stream_operator; +use databend_common_storages_fuse::operations::TransformSerializeBlock; +use databend_common_storages_fuse::FuseTable; use crate::pipelines::processors::TransformAddStreamColumns; use crate::pipelines::PipelineBuilder; diff --git a/src/query/service/src/pipelines/builders/builder_window.rs b/src/query/service/src/pipelines/builders/builder_window.rs index 3e461cf3b845..82af7ab49986 100644 --- a/src/query/service/src/pipelines/builders/builder_window.rs +++ b/src/query/service/src/pipelines/builders/builder_window.rs @@ -12,14 +12,14 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_exception::Result; -use common_expression::types::DataType; -use common_expression::types::NumberDataType; -use common_expression::with_number_mapped_type; -use common_expression::SortColumnDescription; -use common_pipeline_core::processors::Processor; -use common_pipeline_core::processors::ProcessorPtr; -use common_sql::executor::physical_plans::Window; +use databend_common_exception::Result; +use databend_common_expression::types::DataType; +use databend_common_expression::types::NumberDataType; +use databend_common_expression::with_number_mapped_type; +use databend_common_expression::SortColumnDescription; +use databend_common_pipeline_core::processors::Processor; +use databend_common_pipeline_core::processors::ProcessorPtr; +use databend_common_sql::executor::physical_plans::Window; use crate::pipelines::processors::transforms::FrameBound; use crate::pipelines::processors::transforms::WindowFunctionInfo; diff --git a/src/query/service/src/pipelines/executor/executor_graph.rs b/src/query/service/src/pipelines/executor/executor_graph.rs index beca082b0b1d..134fb505cc1e 100644 --- a/src/query/service/src/pipelines/executor/executor_graph.rs +++ b/src/query/service/src/pipelines/executor/executor_graph.rs @@ -19,14 +19,14 @@ use std::sync::atomic::AtomicUsize; use std::sync::atomic::Ordering; use std::sync::Arc; -use common_base::runtime::TrackedFuture; -use common_base::runtime::TrySpawn; -use common_exception::ErrorCode; -use common_exception::Result; -use common_pipeline_core::processors::profile::Profile; -use common_pipeline_core::processors::EventCause; -use common_pipeline_core::Pipeline; -use common_pipeline_core::PlanScope; +use databend_common_base::runtime::TrackedFuture; +use databend_common_base::runtime::TrySpawn; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_pipeline_core::processors::profile::Profile; +use databend_common_pipeline_core::processors::EventCause; +use databend_common_pipeline_core::Pipeline; +use databend_common_pipeline_core::PlanScope; use log::debug; use log::trace; use minitrace::prelude::*; diff --git a/src/query/service/src/pipelines/executor/executor_settings.rs b/src/query/service/src/pipelines/executor/executor_settings.rs index 095b77ee6b2c..1275791cc92f 100644 --- a/src/query/service/src/pipelines/executor/executor_settings.rs +++ b/src/query/service/src/pipelines/executor/executor_settings.rs @@ -15,8 +15,8 @@ use std::sync::Arc; use std::time::Duration; -use common_exception::Result; -use common_settings::Settings; +use databend_common_exception::Result; +use databend_common_settings::Settings; #[derive(Clone)] pub struct ExecutorSettings { diff --git a/src/query/service/src/pipelines/executor/executor_tasks.rs b/src/query/service/src/pipelines/executor/executor_tasks.rs index 340293c4bf8e..3168cce975a1 100644 --- a/src/query/service/src/pipelines/executor/executor_tasks.rs +++ b/src/query/service/src/pipelines/executor/executor_tasks.rs @@ -18,7 +18,7 @@ use std::sync::atomic::Ordering; use std::sync::Arc; use std::time::Duration; -use common_exception::Result; +use databend_common_exception::Result; use parking_lot::Mutex; use petgraph::prelude::NodeIndex; diff --git a/src/query/service/src/pipelines/executor/executor_worker_context.rs b/src/query/service/src/pipelines/executor/executor_worker_context.rs index 8ec426be23a6..deb86134fa3a 100644 --- a/src/query/service/src/pipelines/executor/executor_worker_context.rs +++ b/src/query/service/src/pipelines/executor/executor_worker_context.rs @@ -18,8 +18,8 @@ use std::sync::Arc; use std::time::Duration; use std::time::Instant; -use common_exception::ErrorCode; -use common_exception::Result; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; use petgraph::prelude::NodeIndex; use crate::pipelines::executor::CompletedAsyncTask; diff --git a/src/query/service/src/pipelines/executor/mod.rs b/src/query/service/src/pipelines/executor/mod.rs index 00b8b0a6227c..ff21c2f3d82f 100644 --- a/src/query/service/src/pipelines/executor/mod.rs +++ b/src/query/service/src/pipelines/executor/mod.rs @@ -24,7 +24,7 @@ mod pipeline_pulling_executor; mod pipeline_pushing_executor; mod processor_async_task; -pub use common_base::base::WatchNotify; +pub use databend_common_base::base::WatchNotify; pub use executor_condvar::WorkersCondvar; pub use executor_condvar::WorkersWaitingStatus; pub use executor_graph::RunningGraph; diff --git a/src/query/service/src/pipelines/executor/pipeline_complete_executor.rs b/src/query/service/src/pipelines/executor/pipeline_complete_executor.rs index 7659e36171f7..60d970fa3a81 100644 --- a/src/query/service/src/pipelines/executor/pipeline_complete_executor.rs +++ b/src/query/service/src/pipelines/executor/pipeline_complete_executor.rs @@ -14,10 +14,10 @@ use std::sync::Arc; -use common_base::runtime::Thread; -use common_exception::ErrorCode; -use common_exception::Result; -use common_pipeline_core::Pipeline; +use databend_common_base::runtime::Thread; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_pipeline_core::Pipeline; use minitrace::full_name; use minitrace::prelude::*; diff --git a/src/query/service/src/pipelines/executor/pipeline_executor.rs b/src/query/service/src/pipelines/executor/pipeline_executor.rs index 574980ac600c..7d8c077d5a87 100644 --- a/src/query/service/src/pipelines/executor/pipeline_executor.rs +++ b/src/query/service/src/pipelines/executor/pipeline_executor.rs @@ -17,19 +17,19 @@ use std::sync::atomic::Ordering; use std::sync::Arc; use std::time::Instant; -use common_base::base::tokio; -use common_base::runtime::catch_unwind; -use common_base::runtime::GlobalIORuntime; -use common_base::runtime::Runtime; -use common_base::runtime::Thread; -use common_base::runtime::ThreadJoinHandle; -use common_base::runtime::TrySpawn; -use common_base::GLOBAL_TASK; -use common_exception::ErrorCode; -use common_exception::Result; -use common_pipeline_core::processors::profile::Profile; -use common_pipeline_core::LockGuard; -use common_pipeline_core::Pipeline; +use databend_common_base::base::tokio; +use databend_common_base::runtime::catch_unwind; +use databend_common_base::runtime::GlobalIORuntime; +use databend_common_base::runtime::Runtime; +use databend_common_base::runtime::Thread; +use databend_common_base::runtime::ThreadJoinHandle; +use databend_common_base::runtime::TrySpawn; +use databend_common_base::GLOBAL_TASK; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_pipeline_core::processors::profile::Profile; +use databend_common_pipeline_core::LockGuard; +use databend_common_pipeline_core::Pipeline; use futures::future::select; use futures_util::future::Either; use log::info; diff --git a/src/query/service/src/pipelines/executor/pipeline_pulling_executor.rs b/src/query/service/src/pipelines/executor/pipeline_pulling_executor.rs index 1b4ee78cb1e3..4c8697ea4292 100644 --- a/src/query/service/src/pipelines/executor/pipeline_pulling_executor.rs +++ b/src/query/service/src/pipelines/executor/pipeline_pulling_executor.rs @@ -20,14 +20,14 @@ use std::sync::mpsc::SyncSender; use std::sync::Arc; use std::time::Duration; -use common_base::runtime::Thread; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::DataBlock; -use common_pipeline_core::processors::Processor; -use common_pipeline_core::Pipeline; -use common_pipeline_sinks::Sink; -use common_pipeline_sinks::Sinker; +use databend_common_base::runtime::Thread; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::DataBlock; +use databend_common_pipeline_core::processors::Processor; +use databend_common_pipeline_core::Pipeline; +use databend_common_pipeline_sinks::Sink; +use databend_common_pipeline_sinks::Sinker; use log::warn; use minitrace::full_name; use minitrace::prelude::*; diff --git a/src/query/service/src/pipelines/executor/pipeline_pushing_executor.rs b/src/query/service/src/pipelines/executor/pipeline_pushing_executor.rs index d004fc09ece3..f6caffbf04ea 100644 --- a/src/query/service/src/pipelines/executor/pipeline_pushing_executor.rs +++ b/src/query/service/src/pipelines/executor/pipeline_pushing_executor.rs @@ -18,13 +18,13 @@ use std::sync::mpsc::Receiver; use std::sync::mpsc::SyncSender; use std::sync::Arc; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::DataBlock; -use common_pipeline_core::Pipeline; -use common_pipeline_core::SourcePipeBuilder; -use common_pipeline_sources::SyncSource; -use common_pipeline_sources::SyncSourcer; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::DataBlock; +use databend_common_pipeline_core::Pipeline; +use databend_common_pipeline_core::SourcePipeBuilder; +use databend_common_pipeline_sources::SyncSource; +use databend_common_pipeline_sources::SyncSourcer; use log::warn; use minitrace::full_name; use minitrace::prelude::*; diff --git a/src/query/service/src/pipelines/executor/processor_async_task.rs b/src/query/service/src/pipelines/executor/processor_async_task.rs index 4e2c001cbcea..0580f2698133 100644 --- a/src/query/service/src/pipelines/executor/processor_async_task.rs +++ b/src/query/service/src/pipelines/executor/processor_async_task.rs @@ -21,11 +21,11 @@ use std::task::Poll; use std::time::Duration; use std::time::Instant; -use common_base::base::tokio::time::sleep; -use common_base::runtime::catch_unwind; -use common_exception::ErrorCode; -use common_exception::Result; -use common_pipeline_core::processors::ProcessorPtr; +use databend_common_base::base::tokio::time::sleep; +use databend_common_base::runtime::catch_unwind; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_pipeline_core::processors::ProcessorPtr; use futures_util::future::BoxFuture; use futures_util::future::Either; use futures_util::FutureExt; diff --git a/src/query/service/src/pipelines/pipeline_build_res.rs b/src/query/service/src/pipelines/pipeline_build_res.rs index b7393784a712..b08c0b0635dc 100644 --- a/src/query/service/src/pipelines/pipeline_build_res.rs +++ b/src/query/service/src/pipelines/pipeline_build_res.rs @@ -14,14 +14,14 @@ use std::sync::Arc; -use common_exception::Result; -use common_expression::DataBlock; -use common_expression::DataField; -use common_pipeline_core::processors::OutputPort; -use common_pipeline_core::Pipeline; -use common_pipeline_core::SourcePipeBuilder; -use common_pipeline_sources::OneBlockSource; -use common_profile::SharedProcessorProfiles; +use databend_common_exception::Result; +use databend_common_expression::DataBlock; +use databend_common_expression::DataField; +use databend_common_pipeline_core::processors::OutputPort; +use databend_common_pipeline_core::Pipeline; +use databend_common_pipeline_core::SourcePipeBuilder; +use databend_common_pipeline_sources::OneBlockSource; +use databend_common_profile::SharedProcessorProfiles; use crate::api::DefaultExchangeInjector; use crate::api::ExchangeInjector; diff --git a/src/query/service/src/pipelines/pipeline_builder.rs b/src/query/service/src/pipelines/pipeline_builder.rs index 9a8c29a15341..cf320eb4a82e 100644 --- a/src/query/service/src/pipelines/pipeline_builder.rs +++ b/src/query/service/src/pipelines/pipeline_builder.rs @@ -15,16 +15,16 @@ use std::collections::HashMap; use std::sync::Arc; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::DataField; -use common_expression::FunctionContext; -use common_pipeline_core::Pipeline; -use common_pipeline_core::PlanScope; -use common_profile::SharedProcessorProfiles; -use common_settings::Settings; -use common_sql::executor::PhysicalPlan; -use common_sql::IndexType; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::DataField; +use databend_common_expression::FunctionContext; +use databend_common_pipeline_core::Pipeline; +use databend_common_pipeline_core::PlanScope; +use databend_common_profile::SharedProcessorProfiles; +use databend_common_settings::Settings; +use databend_common_sql::executor::PhysicalPlan; +use databend_common_sql::IndexType; use super::PipelineBuilderData; use crate::api::DefaultExchangeInjector; diff --git a/src/query/service/src/pipelines/processors/mod.rs b/src/query/service/src/pipelines/processors/mod.rs index 011163f9c02b..615bff4cf2fb 100644 --- a/src/query/service/src/pipelines/processors/mod.rs +++ b/src/query/service/src/pipelines/processors/mod.rs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -pub use common_pipeline_core::processors::*; +pub use databend_common_pipeline_core::processors::*; pub(crate) mod transforms; pub use transforms::DeduplicateRowNumber; diff --git a/src/query/service/src/pipelines/processors/transforms/aggregator/aggregate_cell.rs b/src/query/service/src/pipelines/processors/transforms/aggregator/aggregate_cell.rs index 704b51fec825..417a9ea09aea 100644 --- a/src/query/service/src/pipelines/processors/transforms/aggregator/aggregate_cell.rs +++ b/src/query/service/src/pipelines/processors/transforms/aggregator/aggregate_cell.rs @@ -16,9 +16,9 @@ use std::any::Any; use std::marker::PhantomData; use std::sync::Arc; -use common_functions::aggregates::StateAddr; -use common_hashtable::HashtableEntryRefLike; -use common_hashtable::HashtableLike; +use databend_common_functions::aggregates::StateAddr; +use databend_common_hashtable::HashtableEntryRefLike; +use databend_common_hashtable::HashtableLike; use crate::pipelines::processors::transforms::aggregator::AggregatorParams; use crate::pipelines::processors::transforms::group_by::Area; diff --git a/src/query/service/src/pipelines/processors/transforms/aggregator/aggregate_exchange_injector.rs b/src/query/service/src/pipelines/processors/transforms/aggregator/aggregate_exchange_injector.rs index c06266f29aa1..9c523cfefa50 100644 --- a/src/query/service/src/pipelines/processors/transforms/aggregator/aggregate_exchange_injector.rs +++ b/src/query/service/src/pipelines/processors/transforms/aggregator/aggregate_exchange_injector.rs @@ -16,20 +16,20 @@ use std::marker::PhantomData; use std::sync::Arc; use bumpalo::Bump; -use common_catalog::table_context::TableContext; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::BlockMetaInfoDowncast; -use common_expression::DataBlock; -use common_hashtable::FastHash; -use common_hashtable::HashtableEntryMutRefLike; -use common_hashtable::HashtableEntryRefLike; -use common_hashtable::HashtableLike; -use common_pipeline_core::processors::ProcessorPtr; -use common_pipeline_core::query_spill_prefix; -use common_pipeline_core::Pipeline; -use common_settings::FlightCompression; -use common_storage::DataOperator; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::BlockMetaInfoDowncast; +use databend_common_expression::DataBlock; +use databend_common_hashtable::FastHash; +use databend_common_hashtable::HashtableEntryMutRefLike; +use databend_common_hashtable::HashtableEntryRefLike; +use databend_common_hashtable::HashtableLike; +use databend_common_pipeline_core::processors::ProcessorPtr; +use databend_common_pipeline_core::query_spill_prefix; +use databend_common_pipeline_core::Pipeline; +use databend_common_settings::FlightCompression; +use databend_common_storage::DataOperator; use strength_reduce::StrengthReducedU64; use crate::api::DataExchange; diff --git a/src/query/service/src/pipelines/processors/transforms/aggregator/aggregate_meta.rs b/src/query/service/src/pipelines/processors/transforms/aggregator/aggregate_meta.rs index eee739013d82..4912c828c62d 100644 --- a/src/query/service/src/pipelines/processors/transforms/aggregator/aggregate_meta.rs +++ b/src/query/service/src/pipelines/processors/transforms/aggregator/aggregate_meta.rs @@ -16,10 +16,10 @@ use std::fmt::Debug; use std::fmt::Formatter; use std::ops::Range; -use common_expression::BlockMetaInfo; -use common_expression::BlockMetaInfoPtr; -use common_expression::Column; -use common_expression::DataBlock; +use databend_common_expression::BlockMetaInfo; +use databend_common_expression::BlockMetaInfoPtr; +use databend_common_expression::Column; +use databend_common_expression::DataBlock; use crate::pipelines::processors::transforms::aggregator::HashTableCell; use crate::pipelines::processors::transforms::group_by::HashMethodBounds; diff --git a/src/query/service/src/pipelines/processors/transforms/aggregator/aggregator_params.rs b/src/query/service/src/pipelines/processors/transforms/aggregator/aggregator_params.rs index ec4b70546a8c..75204c68ce55 100644 --- a/src/query/service/src/pipelines/processors/transforms/aggregator/aggregator_params.rs +++ b/src/query/service/src/pipelines/processors/transforms/aggregator/aggregator_params.rs @@ -15,13 +15,13 @@ use std::alloc::Layout; use std::sync::Arc; -use common_exception::Result; -use common_expression::types::DataType; -use common_expression::DataSchemaRef; -use common_functions::aggregates::get_layout_offsets; -use common_functions::aggregates::AggregateFunctionRef; -use common_functions::aggregates::StateAddr; -use common_sql::IndexType; +use databend_common_exception::Result; +use databend_common_expression::types::DataType; +use databend_common_expression::DataSchemaRef; +use databend_common_functions::aggregates::get_layout_offsets; +use databend_common_functions::aggregates::AggregateFunctionRef; +use databend_common_functions::aggregates::StateAddr; +use databend_common_sql::IndexType; use crate::pipelines::processors::transforms::group_by::Area; diff --git a/src/query/service/src/pipelines/processors/transforms/aggregator/serde/mod.rs b/src/query/service/src/pipelines/processors/transforms/aggregator/serde/mod.rs index f77d469a0a55..d9a7ae070bc4 100644 --- a/src/query/service/src/pipelines/processors/transforms/aggregator/serde/mod.rs +++ b/src/query/service/src/pipelines/processors/transforms/aggregator/serde/mod.rs @@ -35,15 +35,15 @@ pub use transform_group_by_spill_writer::*; pub use transform_spill_reader::*; pub mod exchange_defines { - use common_arrow::arrow::datatypes::Field; - use common_arrow::arrow::io::flight::default_ipc_fields; - use common_arrow::arrow::io::flight::WriteOptions; - use common_arrow::arrow::io::ipc::IpcField; - use common_arrow::arrow::io::ipc::IpcSchema; - use common_expression::types::DataType; - use common_expression::types::NumberDataType; - use common_expression::DataField; - use common_expression::DataSchema; + use databend_common_arrow::arrow::datatypes::Field; + use databend_common_arrow::arrow::io::flight::default_ipc_fields; + use databend_common_arrow::arrow::io::flight::WriteOptions; + use databend_common_arrow::arrow::io::ipc::IpcField; + use databend_common_arrow::arrow::io::ipc::IpcSchema; + use databend_common_expression::types::DataType; + use databend_common_expression::types::NumberDataType; + use databend_common_expression::DataField; + use databend_common_expression::DataSchema; use once_cell::sync::OnceCell; pub fn spilled_schema() -> DataSchema { diff --git a/src/query/service/src/pipelines/processors/transforms/aggregator/serde/serde_meta.rs b/src/query/service/src/pipelines/processors/transforms/aggregator/serde/serde_meta.rs index 6717ddae2b65..9e10af17b7c0 100644 --- a/src/query/service/src/pipelines/processors/transforms/aggregator/serde/serde_meta.rs +++ b/src/query/service/src/pipelines/processors/transforms/aggregator/serde/serde_meta.rs @@ -14,9 +14,9 @@ use std::ops::Range; -use common_expression::BlockMetaInfo; -use common_expression::BlockMetaInfoDowncast; -use common_expression::BlockMetaInfoPtr; +use databend_common_expression::BlockMetaInfo; +use databend_common_expression::BlockMetaInfoDowncast; +use databend_common_expression::BlockMetaInfoPtr; pub const BUCKET_TYPE: usize = 1; pub const SPILLED_TYPE: usize = 2; diff --git a/src/query/service/src/pipelines/processors/transforms/aggregator/serde/transform_aggregate_serializer.rs b/src/query/service/src/pipelines/processors/transforms/aggregator/serde/transform_aggregate_serializer.rs index 37c4b3149400..901eaa6d8606 100644 --- a/src/query/service/src/pipelines/processors/transforms/aggregator/serde/transform_aggregate_serializer.rs +++ b/src/query/service/src/pipelines/processors/transforms/aggregator/serde/transform_aggregate_serializer.rs @@ -17,19 +17,19 @@ use std::pin::Pin; use std::ptr::NonNull; use std::sync::Arc; -use common_exception::Result; -use common_expression::types::string::StringColumnBuilder; -use common_expression::BlockMetaInfoDowncast; -use common_expression::Column; -use common_expression::DataBlock; -use common_functions::aggregates::StateAddr; -use common_hashtable::HashtableEntryRefLike; -use common_hashtable::HashtableLike; -use common_pipeline_core::processors::Event; -use common_pipeline_core::processors::InputPort; -use common_pipeline_core::processors::OutputPort; -use common_pipeline_core::processors::Processor; -use common_pipeline_core::processors::ProcessorPtr; +use databend_common_exception::Result; +use databend_common_expression::types::string::StringColumnBuilder; +use databend_common_expression::BlockMetaInfoDowncast; +use databend_common_expression::Column; +use databend_common_expression::DataBlock; +use databend_common_functions::aggregates::StateAddr; +use databend_common_hashtable::HashtableEntryRefLike; +use databend_common_hashtable::HashtableLike; +use databend_common_pipeline_core::processors::Event; +use databend_common_pipeline_core::processors::InputPort; +use databend_common_pipeline_core::processors::OutputPort; +use databend_common_pipeline_core::processors::Processor; +use databend_common_pipeline_core::processors::ProcessorPtr; use crate::pipelines::processors::transforms::aggregator::create_state_serializer; use crate::pipelines::processors::transforms::aggregator::estimated_key_size; diff --git a/src/query/service/src/pipelines/processors/transforms/aggregator/serde/transform_aggregate_spill_writer.rs b/src/query/service/src/pipelines/processors/transforms/aggregator/serde/transform_aggregate_spill_writer.rs index ec19c817cdc5..c53da0393099 100644 --- a/src/query/service/src/pipelines/processors/transforms/aggregator/serde/transform_aggregate_spill_writer.rs +++ b/src/query/service/src/pipelines/processors/transforms/aggregator/serde/transform_aggregate_spill_writer.rs @@ -16,20 +16,20 @@ use std::any::Any; use std::sync::Arc; use std::time::Instant; -use common_base::base::GlobalUniqName; -use common_base::base::ProgressValues; -use common_catalog::table_context::TableContext; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::arrow::serialize_column; -use common_expression::BlockMetaInfoDowncast; -use common_expression::DataBlock; -use common_hashtable::HashtableLike; -use common_metrics::transform::*; -use common_pipeline_core::processors::Event; -use common_pipeline_core::processors::InputPort; -use common_pipeline_core::processors::OutputPort; -use common_pipeline_core::processors::Processor; +use databend_common_base::base::GlobalUniqName; +use databend_common_base::base::ProgressValues; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::arrow::serialize_column; +use databend_common_expression::BlockMetaInfoDowncast; +use databend_common_expression::DataBlock; +use databend_common_hashtable::HashtableLike; +use databend_common_metrics::transform::*; +use databend_common_pipeline_core::processors::Event; +use databend_common_pipeline_core::processors::InputPort; +use databend_common_pipeline_core::processors::OutputPort; +use databend_common_pipeline_core::processors::Processor; use futures_util::future::BoxFuture; use log::info; use opendal::Operator; diff --git a/src/query/service/src/pipelines/processors/transforms/aggregator/serde/transform_deserializer.rs b/src/query/service/src/pipelines/processors/transforms/aggregator/serde/transform_deserializer.rs index caed70c3811e..d728eeeb1b16 100644 --- a/src/query/service/src/pipelines/processors/transforms/aggregator/serde/transform_deserializer.rs +++ b/src/query/service/src/pipelines/processors/transforms/aggregator/serde/transform_deserializer.rs @@ -15,30 +15,30 @@ use std::marker::PhantomData; use std::sync::Arc; -use common_arrow::arrow::datatypes::Field; -use common_arrow::arrow::datatypes::Schema as ArrowSchema; -use common_arrow::arrow::io::flight::default_ipc_fields; -use common_arrow::arrow::io::flight::deserialize_batch; -use common_arrow::arrow::io::flight::deserialize_dictionary; -use common_arrow::arrow::io::ipc::read::Dictionaries; -use common_arrow::arrow::io::ipc::IpcSchema; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::types::ArrayType; -use common_expression::types::NumberType; -use common_expression::types::UInt64Type; -use common_expression::types::ValueType; -use common_expression::BlockMetaInfoDowncast; -use common_expression::DataBlock; -use common_expression::DataSchemaRef; -use common_io::prelude::bincode_deserialize_from_slice; -use common_io::prelude::BinaryRead; -use common_pipeline_core::processors::InputPort; -use common_pipeline_core::processors::OutputPort; -use common_pipeline_core::processors::ProcessorPtr; -use common_pipeline_transforms::processors::BlockMetaTransform; -use common_pipeline_transforms::processors::BlockMetaTransformer; -use common_pipeline_transforms::processors::UnknownMode; +use databend_common_arrow::arrow::datatypes::Field; +use databend_common_arrow::arrow::datatypes::Schema as ArrowSchema; +use databend_common_arrow::arrow::io::flight::default_ipc_fields; +use databend_common_arrow::arrow::io::flight::deserialize_batch; +use databend_common_arrow::arrow::io::flight::deserialize_dictionary; +use databend_common_arrow::arrow::io::ipc::read::Dictionaries; +use databend_common_arrow::arrow::io::ipc::IpcSchema; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::types::ArrayType; +use databend_common_expression::types::NumberType; +use databend_common_expression::types::UInt64Type; +use databend_common_expression::types::ValueType; +use databend_common_expression::BlockMetaInfoDowncast; +use databend_common_expression::DataBlock; +use databend_common_expression::DataSchemaRef; +use databend_common_io::prelude::bincode_deserialize_from_slice; +use databend_common_io::prelude::BinaryRead; +use databend_common_pipeline_core::processors::InputPort; +use databend_common_pipeline_core::processors::OutputPort; +use databend_common_pipeline_core::processors::ProcessorPtr; +use databend_common_pipeline_transforms::processors::BlockMetaTransform; +use databend_common_pipeline_transforms::processors::BlockMetaTransformer; +use databend_common_pipeline_transforms::processors::UnknownMode; use crate::api::DataPacket; use crate::api::ExchangeDeserializeMeta; diff --git a/src/query/service/src/pipelines/processors/transforms/aggregator/serde/transform_exchange_aggregate_serializer.rs b/src/query/service/src/pipelines/processors/transforms/aggregator/serde/transform_exchange_aggregate_serializer.rs index d5e4c0d3b9d8..5e9b9d073674 100644 --- a/src/query/service/src/pipelines/processors/transforms/aggregator/serde/transform_exchange_aggregate_serializer.rs +++ b/src/query/service/src/pipelines/processors/transforms/aggregator/serde/transform_exchange_aggregate_serializer.rs @@ -15,32 +15,32 @@ use std::sync::Arc; use std::time::Instant; -use common_arrow::arrow::io::flight::default_ipc_fields; -use common_arrow::arrow::io::flight::WriteOptions; -use common_arrow::arrow::io::ipc::write::Compression; -use common_arrow::arrow::io::ipc::IpcField; -use common_base::base::GlobalUniqName; -use common_base::base::ProgressValues; -use common_catalog::table_context::TableContext; -use common_exception::Result; -use common_expression::arrow::serialize_column; -use common_expression::types::ArgType; -use common_expression::types::ArrayType; -use common_expression::types::Int64Type; -use common_expression::types::UInt64Type; -use common_expression::types::ValueType; -use common_expression::BlockMetaInfoDowncast; -use common_expression::DataBlock; -use common_expression::DataSchemaRef; -use common_expression::FromData; -use common_hashtable::HashtableLike; -use common_metrics::transform::*; -use common_pipeline_core::processors::InputPort; -use common_pipeline_core::processors::OutputPort; -use common_pipeline_core::processors::Processor; -use common_pipeline_transforms::processors::BlockMetaTransform; -use common_pipeline_transforms::processors::BlockMetaTransformer; -use common_settings::FlightCompression; +use databend_common_arrow::arrow::io::flight::default_ipc_fields; +use databend_common_arrow::arrow::io::flight::WriteOptions; +use databend_common_arrow::arrow::io::ipc::write::Compression; +use databend_common_arrow::arrow::io::ipc::IpcField; +use databend_common_base::base::GlobalUniqName; +use databend_common_base::base::ProgressValues; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::Result; +use databend_common_expression::arrow::serialize_column; +use databend_common_expression::types::ArgType; +use databend_common_expression::types::ArrayType; +use databend_common_expression::types::Int64Type; +use databend_common_expression::types::UInt64Type; +use databend_common_expression::types::ValueType; +use databend_common_expression::BlockMetaInfoDowncast; +use databend_common_expression::DataBlock; +use databend_common_expression::DataSchemaRef; +use databend_common_expression::FromData; +use databend_common_hashtable::HashtableLike; +use databend_common_metrics::transform::*; +use databend_common_pipeline_core::processors::InputPort; +use databend_common_pipeline_core::processors::OutputPort; +use databend_common_pipeline_core::processors::Processor; +use databend_common_pipeline_transforms::processors::BlockMetaTransform; +use databend_common_pipeline_transforms::processors::BlockMetaTransformer; +use databend_common_settings::FlightCompression; use futures_util::future::BoxFuture; use log::info; use opendal::Operator; diff --git a/src/query/service/src/pipelines/processors/transforms/aggregator/serde/transform_exchange_async_barrier.rs b/src/query/service/src/pipelines/processors/transforms/aggregator/serde/transform_exchange_async_barrier.rs index 2a12c7d011d4..a27ba0147927 100644 --- a/src/query/service/src/pipelines/processors/transforms/aggregator/serde/transform_exchange_async_barrier.rs +++ b/src/query/service/src/pipelines/processors/transforms/aggregator/serde/transform_exchange_async_barrier.rs @@ -14,15 +14,15 @@ use std::sync::Arc; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::BlockMetaInfoDowncast; -use common_expression::DataBlock; -use common_pipeline_core::processors::InputPort; -use common_pipeline_core::processors::OutputPort; -use common_pipeline_core::processors::ProcessorPtr; -use common_pipeline_transforms::processors::AsyncTransform; -use common_pipeline_transforms::processors::AsyncTransformer; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::BlockMetaInfoDowncast; +use databend_common_expression::DataBlock; +use databend_common_pipeline_core::processors::InputPort; +use databend_common_pipeline_core::processors::OutputPort; +use databend_common_pipeline_core::processors::ProcessorPtr; +use databend_common_pipeline_transforms::processors::AsyncTransform; +use databend_common_pipeline_transforms::processors::AsyncTransformer; use crate::api::ExchangeShuffleMeta; use crate::pipelines::processors::transforms::aggregator::FlightSerialized; @@ -52,7 +52,7 @@ impl AsyncTransform for TransformExchangeAsyncBarrier { let mut futures = Vec::with_capacity(meta.serialized_blocks.len()); for serialized_block in meta.serialized_blocks { - futures.push(common_base::base::tokio::spawn(async move { + futures.push(databend_common_base::base::tokio::spawn(async move { match serialized_block { FlightSerialized::DataBlock(v) => Ok(v), FlightSerialized::Future(f) => f.await, diff --git a/src/query/service/src/pipelines/processors/transforms/aggregator/serde/transform_exchange_group_by_serializer.rs b/src/query/service/src/pipelines/processors/transforms/aggregator/serde/transform_exchange_group_by_serializer.rs index 0940692b05b1..069de598af20 100644 --- a/src/query/service/src/pipelines/processors/transforms/aggregator/serde/transform_exchange_group_by_serializer.rs +++ b/src/query/service/src/pipelines/processors/transforms/aggregator/serde/transform_exchange_group_by_serializer.rs @@ -17,36 +17,36 @@ use std::fmt::Formatter; use std::sync::Arc; use std::time::Instant; -use common_arrow::arrow::io::flight::default_ipc_fields; -use common_arrow::arrow::io::flight::WriteOptions; -use common_arrow::arrow::io::ipc::write::Compression; -use common_arrow::arrow::io::ipc::IpcField; -use common_base::base::GlobalUniqName; -use common_base::base::ProgressValues; -use common_catalog::table_context::TableContext; -use common_exception::Result; -use common_expression::arrow::serialize_column; -use common_expression::types::ArgType; -use common_expression::types::ArrayType; -use common_expression::types::Int64Type; -use common_expression::types::UInt64Type; -use common_expression::types::ValueType; -use common_expression::BlockEntry; -use common_expression::BlockMetaInfo; -use common_expression::BlockMetaInfoDowncast; -use common_expression::BlockMetaInfoPtr; -use common_expression::DataBlock; -use common_expression::DataSchemaRef; -use common_expression::FromData; -use common_hashtable::HashtableLike; -use common_metrics::transform::*; -use common_pipeline_core::processors::InputPort; -use common_pipeline_core::processors::OutputPort; -use common_pipeline_core::processors::Processor; -use common_pipeline_transforms::processors::BlockMetaTransform; -use common_pipeline_transforms::processors::BlockMetaTransformer; -use common_pipeline_transforms::processors::UnknownMode; -use common_settings::FlightCompression; +use databend_common_arrow::arrow::io::flight::default_ipc_fields; +use databend_common_arrow::arrow::io::flight::WriteOptions; +use databend_common_arrow::arrow::io::ipc::write::Compression; +use databend_common_arrow::arrow::io::ipc::IpcField; +use databend_common_base::base::GlobalUniqName; +use databend_common_base::base::ProgressValues; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::Result; +use databend_common_expression::arrow::serialize_column; +use databend_common_expression::types::ArgType; +use databend_common_expression::types::ArrayType; +use databend_common_expression::types::Int64Type; +use databend_common_expression::types::UInt64Type; +use databend_common_expression::types::ValueType; +use databend_common_expression::BlockEntry; +use databend_common_expression::BlockMetaInfo; +use databend_common_expression::BlockMetaInfoDowncast; +use databend_common_expression::BlockMetaInfoPtr; +use databend_common_expression::DataBlock; +use databend_common_expression::DataSchemaRef; +use databend_common_expression::FromData; +use databend_common_hashtable::HashtableLike; +use databend_common_metrics::transform::*; +use databend_common_pipeline_core::processors::InputPort; +use databend_common_pipeline_core::processors::OutputPort; +use databend_common_pipeline_core::processors::Processor; +use databend_common_pipeline_transforms::processors::BlockMetaTransform; +use databend_common_pipeline_transforms::processors::BlockMetaTransformer; +use databend_common_pipeline_transforms::processors::UnknownMode; +use databend_common_settings::FlightCompression; use futures_util::future::BoxFuture; use log::info; use opendal::Operator; diff --git a/src/query/service/src/pipelines/processors/transforms/aggregator/serde/transform_group_by_serializer.rs b/src/query/service/src/pipelines/processors/transforms/aggregator/serde/transform_group_by_serializer.rs index 949b1fee315a..5ea397ca8b8e 100644 --- a/src/query/service/src/pipelines/processors/transforms/aggregator/serde/transform_group_by_serializer.rs +++ b/src/query/service/src/pipelines/processors/transforms/aggregator/serde/transform_group_by_serializer.rs @@ -17,16 +17,16 @@ use std::pin::Pin; use std::ptr::NonNull; use std::sync::Arc; -use common_exception::Result; -use common_expression::BlockMetaInfoDowncast; -use common_expression::DataBlock; -use common_hashtable::HashtableEntryRefLike; -use common_hashtable::HashtableLike; -use common_pipeline_core::processors::Event; -use common_pipeline_core::processors::InputPort; -use common_pipeline_core::processors::OutputPort; -use common_pipeline_core::processors::Processor; -use common_pipeline_core::processors::ProcessorPtr; +use databend_common_exception::Result; +use databend_common_expression::BlockMetaInfoDowncast; +use databend_common_expression::DataBlock; +use databend_common_hashtable::HashtableEntryRefLike; +use databend_common_hashtable::HashtableLike; +use databend_common_pipeline_core::processors::Event; +use databend_common_pipeline_core::processors::InputPort; +use databend_common_pipeline_core::processors::OutputPort; +use databend_common_pipeline_core::processors::Processor; +use databend_common_pipeline_core::processors::ProcessorPtr; use crate::pipelines::processors::transforms::aggregator::estimated_key_size; use crate::pipelines::processors::transforms::aggregator::AggregateMeta; diff --git a/src/query/service/src/pipelines/processors/transforms/aggregator/serde/transform_group_by_spill_writer.rs b/src/query/service/src/pipelines/processors/transforms/aggregator/serde/transform_group_by_spill_writer.rs index 99f9c43401d3..78905671f23e 100644 --- a/src/query/service/src/pipelines/processors/transforms/aggregator/serde/transform_group_by_spill_writer.rs +++ b/src/query/service/src/pipelines/processors/transforms/aggregator/serde/transform_group_by_spill_writer.rs @@ -16,20 +16,20 @@ use std::any::Any; use std::sync::Arc; use std::time::Instant; -use common_base::base::GlobalUniqName; -use common_base::base::ProgressValues; -use common_catalog::table_context::TableContext; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::arrow::serialize_column; -use common_expression::BlockMetaInfoDowncast; -use common_expression::DataBlock; -use common_hashtable::HashtableLike; -use common_metrics::transform::*; -use common_pipeline_core::processors::Event; -use common_pipeline_core::processors::InputPort; -use common_pipeline_core::processors::OutputPort; -use common_pipeline_core::processors::Processor; +use databend_common_base::base::GlobalUniqName; +use databend_common_base::base::ProgressValues; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::arrow::serialize_column; +use databend_common_expression::BlockMetaInfoDowncast; +use databend_common_expression::DataBlock; +use databend_common_hashtable::HashtableLike; +use databend_common_metrics::transform::*; +use databend_common_pipeline_core::processors::Event; +use databend_common_pipeline_core::processors::InputPort; +use databend_common_pipeline_core::processors::OutputPort; +use databend_common_pipeline_core::processors::Processor; use futures_util::future::BoxFuture; use log::info; use opendal::Operator; diff --git a/src/query/service/src/pipelines/processors/transforms/aggregator/serde/transform_spill_reader.rs b/src/query/service/src/pipelines/processors/transforms/aggregator/serde/transform_spill_reader.rs index e94b5e05ba87..eb52e34c3d97 100644 --- a/src/query/service/src/pipelines/processors/transforms/aggregator/serde/transform_spill_reader.rs +++ b/src/query/service/src/pipelines/processors/transforms/aggregator/serde/transform_spill_reader.rs @@ -17,18 +17,18 @@ use std::collections::VecDeque; use std::sync::Arc; use std::time::Instant; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::arrow::deserialize_column; -use common_expression::BlockMetaInfoDowncast; -use common_expression::BlockMetaInfoPtr; -use common_expression::DataBlock; -use common_metrics::transform::*; -use common_pipeline_core::processors::Event; -use common_pipeline_core::processors::InputPort; -use common_pipeline_core::processors::OutputPort; -use common_pipeline_core::processors::Processor; -use common_pipeline_core::processors::ProcessorPtr; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::arrow::deserialize_column; +use databend_common_expression::BlockMetaInfoDowncast; +use databend_common_expression::BlockMetaInfoPtr; +use databend_common_expression::DataBlock; +use databend_common_metrics::transform::*; +use databend_common_pipeline_core::processors::Event; +use databend_common_pipeline_core::processors::InputPort; +use databend_common_pipeline_core::processors::OutputPort; +use databend_common_pipeline_core::processors::Processor; +use databend_common_pipeline_core::processors::ProcessorPtr; use itertools::Itertools; use log::info; use opendal::Operator; @@ -199,7 +199,7 @@ impl Processor let location = payload.location.clone(); let operator = self.operator.clone(); let data_range = payload.data_range.clone(); - read_data.push(common_base::base::tokio::spawn( + read_data.push(databend_common_base::base::tokio::spawn( async_backtrace::frame!(async move { let instant = Instant::now(); let data = diff --git a/src/query/service/src/pipelines/processors/transforms/aggregator/transform_aggregate_expand.rs b/src/query/service/src/pipelines/processors/transforms/aggregator/transform_aggregate_expand.rs index beba89076f78..74ca95282465 100644 --- a/src/query/service/src/pipelines/processors/transforms/aggregator/transform_aggregate_expand.rs +++ b/src/query/service/src/pipelines/processors/transforms/aggregator/transform_aggregate_expand.rs @@ -14,19 +14,19 @@ use std::sync::Arc; -use common_exception::Result; -use common_expression::types::DataType; -use common_expression::types::NumberDataType; -use common_expression::types::NumberScalar; -use common_expression::BlockEntry; -use common_expression::DataBlock; -use common_expression::Scalar; -use common_expression::Value; -use common_pipeline_core::processors::InputPort; -use common_pipeline_core::processors::OutputPort; -use common_pipeline_core::processors::ProcessorPtr; -use common_pipeline_transforms::processors::Transform; -use common_pipeline_transforms::processors::Transformer; +use databend_common_exception::Result; +use databend_common_expression::types::DataType; +use databend_common_expression::types::NumberDataType; +use databend_common_expression::types::NumberScalar; +use databend_common_expression::BlockEntry; +use databend_common_expression::DataBlock; +use databend_common_expression::Scalar; +use databend_common_expression::Value; +use databend_common_pipeline_core::processors::InputPort; +use databend_common_pipeline_core::processors::OutputPort; +use databend_common_pipeline_core::processors::ProcessorPtr; +use databend_common_pipeline_transforms::processors::Transform; +use databend_common_pipeline_transforms::processors::Transformer; pub struct TransformExpandGroupingSets { group_bys: Vec, diff --git a/src/query/service/src/pipelines/processors/transforms/aggregator/transform_aggregate_final.rs b/src/query/service/src/pipelines/processors/transforms/aggregator/transform_aggregate_final.rs index d4a0c87434ae..d5e74a84303c 100644 --- a/src/query/service/src/pipelines/processors/transforms/aggregator/transform_aggregate_final.rs +++ b/src/query/service/src/pipelines/processors/transforms/aggregator/transform_aggregate_final.rs @@ -16,19 +16,19 @@ use std::borrow::BorrowMut; use std::sync::Arc; use bumpalo::Bump; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::ColumnBuilder; -use common_expression::DataBlock; -use common_functions::aggregates::StateAddr; -use common_hashtable::HashtableEntryMutRefLike; -use common_hashtable::HashtableEntryRefLike; -use common_hashtable::HashtableLike; -use common_pipeline_core::processors::InputPort; -use common_pipeline_core::processors::OutputPort; -use common_pipeline_core::processors::Processor; -use common_pipeline_transforms::processors::BlockMetaTransform; -use common_pipeline_transforms::processors::BlockMetaTransformer; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::ColumnBuilder; +use databend_common_expression::DataBlock; +use databend_common_functions::aggregates::StateAddr; +use databend_common_hashtable::HashtableEntryMutRefLike; +use databend_common_hashtable::HashtableEntryRefLike; +use databend_common_hashtable::HashtableLike; +use databend_common_pipeline_core::processors::InputPort; +use databend_common_pipeline_core::processors::OutputPort; +use databend_common_pipeline_core::processors::Processor; +use databend_common_pipeline_transforms::processors::BlockMetaTransform; +use databend_common_pipeline_transforms::processors::BlockMetaTransformer; use crate::pipelines::processors::transforms::aggregator::aggregate_cell::AggregateHashTableDropper; use crate::pipelines::processors::transforms::aggregator::aggregate_meta::AggregateMeta; diff --git a/src/query/service/src/pipelines/processors/transforms/aggregator/transform_aggregate_partial.rs b/src/query/service/src/pipelines/processors/transforms/aggregator/transform_aggregate_partial.rs index e925c23dae6b..f72e6e244e23 100644 --- a/src/query/service/src/pipelines/processors/transforms/aggregator/transform_aggregate_partial.rs +++ b/src/query/service/src/pipelines/processors/transforms/aggregator/transform_aggregate_partial.rs @@ -16,26 +16,26 @@ use std::sync::Arc; use std::vec; use bumpalo::Bump; -use common_base::base::convert_byte_size; -use common_base::base::convert_number_size; -use common_base::runtime::GLOBAL_MEM_STAT; -use common_catalog::plan::AggIndexMeta; -use common_catalog::table_context::TableContext; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::BlockMetaInfoDowncast; -use common_expression::Column; -use common_expression::DataBlock; -use common_functions::aggregates::StateAddr; -use common_functions::aggregates::StateAddrs; -use common_hashtable::HashtableEntryMutRefLike; -use common_hashtable::HashtableLike; -use common_metrics::transform::*; -use common_pipeline_core::processors::InputPort; -use common_pipeline_core::processors::OutputPort; -use common_pipeline_core::processors::Processor; -use common_pipeline_transforms::processors::AccumulatingTransform; -use common_pipeline_transforms::processors::AccumulatingTransformer; +use databend_common_base::base::convert_byte_size; +use databend_common_base::base::convert_number_size; +use databend_common_base::runtime::GLOBAL_MEM_STAT; +use databend_common_catalog::plan::AggIndexMeta; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::BlockMetaInfoDowncast; +use databend_common_expression::Column; +use databend_common_expression::DataBlock; +use databend_common_functions::aggregates::StateAddr; +use databend_common_functions::aggregates::StateAddrs; +use databend_common_hashtable::HashtableEntryMutRefLike; +use databend_common_hashtable::HashtableLike; +use databend_common_metrics::transform::*; +use databend_common_pipeline_core::processors::InputPort; +use databend_common_pipeline_core::processors::OutputPort; +use databend_common_pipeline_core::processors::Processor; +use databend_common_pipeline_transforms::processors::AccumulatingTransform; +use databend_common_pipeline_transforms::processors::AccumulatingTransformer; use log::info; use crate::pipelines::processors::transforms::aggregator::aggregate_cell::AggregateHashTableDropper; diff --git a/src/query/service/src/pipelines/processors/transforms/aggregator/transform_group_by_final.rs b/src/query/service/src/pipelines/processors/transforms/aggregator/transform_group_by_final.rs index 87b58c4629cb..f1f4b0985422 100644 --- a/src/query/service/src/pipelines/processors/transforms/aggregator/transform_group_by_final.rs +++ b/src/query/service/src/pipelines/processors/transforms/aggregator/transform_group_by_final.rs @@ -15,16 +15,16 @@ use std::sync::Arc; use bumpalo::Bump; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::DataBlock; -use common_hashtable::HashtableEntryRefLike; -use common_hashtable::HashtableLike; -use common_pipeline_core::processors::InputPort; -use common_pipeline_core::processors::OutputPort; -use common_pipeline_core::processors::Processor; -use common_pipeline_transforms::processors::BlockMetaTransform; -use common_pipeline_transforms::processors::BlockMetaTransformer; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::DataBlock; +use databend_common_hashtable::HashtableEntryRefLike; +use databend_common_hashtable::HashtableLike; +use databend_common_pipeline_core::processors::InputPort; +use databend_common_pipeline_core::processors::OutputPort; +use databend_common_pipeline_core::processors::Processor; +use databend_common_pipeline_transforms::processors::BlockMetaTransform; +use databend_common_pipeline_transforms::processors::BlockMetaTransformer; use crate::pipelines::processors::transforms::aggregator::aggregate_meta::AggregateMeta; use crate::pipelines::processors::transforms::aggregator::estimated_key_size; diff --git a/src/query/service/src/pipelines/processors/transforms/aggregator/transform_group_by_partial.rs b/src/query/service/src/pipelines/processors/transforms/aggregator/transform_group_by_partial.rs index 5c0bdef5502e..1080996ff58b 100644 --- a/src/query/service/src/pipelines/processors/transforms/aggregator/transform_group_by_partial.rs +++ b/src/query/service/src/pipelines/processors/transforms/aggregator/transform_group_by_partial.rs @@ -16,20 +16,20 @@ use std::sync::Arc; use std::vec; use bumpalo::Bump; -use common_base::base::convert_byte_size; -use common_base::base::convert_number_size; -use common_base::runtime::GLOBAL_MEM_STAT; -use common_catalog::table_context::TableContext; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::DataBlock; -use common_hashtable::HashtableLike; -use common_pipeline_core::processors::InputPort; -use common_pipeline_core::processors::OutputPort; -use common_pipeline_core::processors::Processor; -use common_pipeline_transforms::processors::AccumulatingTransform; -use common_pipeline_transforms::processors::AccumulatingTransformer; -use common_sql::IndexType; +use databend_common_base::base::convert_byte_size; +use databend_common_base::base::convert_number_size; +use databend_common_base::runtime::GLOBAL_MEM_STAT; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::DataBlock; +use databend_common_hashtable::HashtableLike; +use databend_common_pipeline_core::processors::InputPort; +use databend_common_pipeline_core::processors::OutputPort; +use databend_common_pipeline_core::processors::Processor; +use databend_common_pipeline_transforms::processors::AccumulatingTransform; +use databend_common_pipeline_transforms::processors::AccumulatingTransformer; +use databend_common_sql::IndexType; use log::info; use crate::pipelines::processors::transforms::aggregator::aggregate_cell::GroupByHashTableDropper; diff --git a/src/query/service/src/pipelines/processors/transforms/aggregator/transform_partition_bucket.rs b/src/query/service/src/pipelines/processors/transforms/aggregator/transform_partition_bucket.rs index c7048574f656..550dc19610f9 100644 --- a/src/query/service/src/pipelines/processors/transforms/aggregator/transform_partition_bucket.rs +++ b/src/query/service/src/pipelines/processors/transforms/aggregator/transform_partition_bucket.rs @@ -19,25 +19,25 @@ use std::marker::PhantomData; use std::mem::take; use std::sync::Arc; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::BlockMetaInfoDowncast; -use common_expression::DataBlock; -use common_hashtable::hash2bucket; -use common_hashtable::HashtableLike; -use common_pipeline_core::processors::Event; -use common_pipeline_core::processors::InputPort; -use common_pipeline_core::processors::OutputPort; -use common_pipeline_core::processors::Processor; -use common_pipeline_core::processors::ProcessorPtr; -use common_pipeline_core::Pipe; -use common_pipeline_core::PipeItem; -use common_pipeline_core::Pipeline; -use common_pipeline_transforms::processors::ProcessorProfileWrapper; -use common_pipeline_transforms::processors::ProfileStub; -use common_pipeline_transforms::processors::Transformer; -use common_profile::SharedProcessorProfiles; -use common_storage::DataOperator; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::BlockMetaInfoDowncast; +use databend_common_expression::DataBlock; +use databend_common_hashtable::hash2bucket; +use databend_common_hashtable::HashtableLike; +use databend_common_pipeline_core::processors::Event; +use databend_common_pipeline_core::processors::InputPort; +use databend_common_pipeline_core::processors::OutputPort; +use databend_common_pipeline_core::processors::Processor; +use databend_common_pipeline_core::processors::ProcessorPtr; +use databend_common_pipeline_core::Pipe; +use databend_common_pipeline_core::PipeItem; +use databend_common_pipeline_core::Pipeline; +use databend_common_pipeline_transforms::processors::ProcessorProfileWrapper; +use databend_common_pipeline_transforms::processors::ProfileStub; +use databend_common_pipeline_transforms::processors::Transformer; +use databend_common_profile::SharedProcessorProfiles; +use databend_common_storage::DataOperator; use crate::pipelines::processors::transforms::aggregator::aggregate_meta::AggregateMeta; use crate::pipelines::processors::transforms::aggregator::aggregate_meta::HashTablePayload; diff --git a/src/query/service/src/pipelines/processors/transforms/aggregator/transform_single_key.rs b/src/query/service/src/pipelines/processors/transforms/aggregator/transform_single_key.rs index 6894d6eddc53..38daf26e67b0 100644 --- a/src/query/service/src/pipelines/processors/transforms/aggregator/transform_single_key.rs +++ b/src/query/service/src/pipelines/processors/transforms/aggregator/transform_single_key.rs @@ -18,24 +18,24 @@ use std::sync::Arc; use std::vec; use bumpalo::Bump; -use common_catalog::plan::AggIndexMeta; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::types::DataType; -use common_expression::BlockEntry; -use common_expression::BlockMetaInfoDowncast; -use common_expression::Column; -use common_expression::ColumnBuilder; -use common_expression::DataBlock; -use common_expression::Scalar; -use common_expression::Value; -use common_functions::aggregates::AggregateFunctionRef; -use common_functions::aggregates::StateAddr; -use common_pipeline_core::processors::InputPort; -use common_pipeline_core::processors::OutputPort; -use common_pipeline_core::processors::Processor; -use common_pipeline_transforms::processors::AccumulatingTransform; -use common_pipeline_transforms::processors::AccumulatingTransformer; +use databend_common_catalog::plan::AggIndexMeta; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::types::DataType; +use databend_common_expression::BlockEntry; +use databend_common_expression::BlockMetaInfoDowncast; +use databend_common_expression::Column; +use databend_common_expression::ColumnBuilder; +use databend_common_expression::DataBlock; +use databend_common_expression::Scalar; +use databend_common_expression::Value; +use databend_common_functions::aggregates::AggregateFunctionRef; +use databend_common_functions::aggregates::StateAddr; +use databend_common_pipeline_core::processors::InputPort; +use databend_common_pipeline_core::processors::OutputPort; +use databend_common_pipeline_core::processors::Processor; +use databend_common_pipeline_transforms::processors::AccumulatingTransform; +use databend_common_pipeline_transforms::processors::AccumulatingTransformer; use crate::pipelines::processors::transforms::aggregator::AggregatorParams; diff --git a/src/query/service/src/pipelines/processors/transforms/aggregator/utils.rs b/src/query/service/src/pipelines/processors/transforms/aggregator/utils.rs index 272d1a954694..0ab2eb49395e 100644 --- a/src/query/service/src/pipelines/processors/transforms/aggregator/utils.rs +++ b/src/query/service/src/pipelines/processors/transforms/aggregator/utils.rs @@ -12,9 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_expression::types::string::StringColumnBuilder; -use common_functions::aggregates::AggregateFunctionRef; -use common_hashtable::HashtableLike; +use databend_common_expression::types::string::StringColumnBuilder; +use databend_common_functions::aggregates::AggregateFunctionRef; +use databend_common_hashtable::HashtableLike; #[inline] pub fn estimated_key_size(table: &Table) -> usize { diff --git a/src/query/service/src/pipelines/processors/transforms/group_by/aggregator_groups_builder.rs b/src/query/service/src/pipelines/processors/transforms/group_by/aggregator_groups_builder.rs index c4eba2cac81a..dc997a71c437 100644 --- a/src/query/service/src/pipelines/processors/transforms/group_by/aggregator_groups_builder.rs +++ b/src/query/service/src/pipelines/processors/transforms/group_by/aggregator_groups_builder.rs @@ -14,13 +14,13 @@ use std::marker::PhantomData; -use common_exception::Result; -use common_expression::types::string::StringColumnBuilder; -use common_expression::types::DataType; -use common_expression::Column; -use common_expression::ColumnBuilder; -use common_expression::HashMethodFixedKeys; -use common_hashtable::DictionaryKeys; +use databend_common_exception::Result; +use databend_common_expression::types::string::StringColumnBuilder; +use databend_common_expression::types::DataType; +use databend_common_expression::Column; +use databend_common_expression::ColumnBuilder; +use databend_common_expression::HashMethodFixedKeys; +use databend_common_hashtable::DictionaryKeys; use crate::pipelines::processors::transforms::aggregator::AggregatorParams; diff --git a/src/query/service/src/pipelines/processors/transforms/group_by/aggregator_keys_builder.rs b/src/query/service/src/pipelines/processors/transforms/group_by/aggregator_keys_builder.rs index 3fbf98a23837..45f1bd8d1f29 100644 --- a/src/query/service/src/pipelines/processors/transforms/group_by/aggregator_keys_builder.rs +++ b/src/query/service/src/pipelines/processors/transforms/group_by/aggregator_keys_builder.rs @@ -16,14 +16,14 @@ use std::marker::PhantomData; use byteorder::BigEndian; use byteorder::WriteBytesExt; -use common_arrow::arrow::buffer::Buffer; -use common_expression::types::decimal::Decimal; -use common_expression::types::number::Number; -use common_expression::types::string::StringColumnBuilder; -use common_expression::types::NumberType; -use common_expression::types::ValueType; -use common_expression::Column; -use common_hashtable::DictionaryKeys; +use databend_common_arrow::arrow::buffer::Buffer; +use databend_common_expression::types::decimal::Decimal; +use databend_common_expression::types::number::Number; +use databend_common_expression::types::string::StringColumnBuilder; +use databend_common_expression::types::NumberType; +use databend_common_expression::types::ValueType; +use databend_common_expression::Column; +use databend_common_hashtable::DictionaryKeys; use ethnum::i256; use super::large_number::LargeNumber; diff --git a/src/query/service/src/pipelines/processors/transforms/group_by/aggregator_keys_iter.rs b/src/query/service/src/pipelines/processors/transforms/group_by/aggregator_keys_iter.rs index 25065afa9a17..dd02fcae47e5 100644 --- a/src/query/service/src/pipelines/processors/transforms/group_by/aggregator_keys_iter.rs +++ b/src/query/service/src/pipelines/processors/transforms/group_by/aggregator_keys_iter.rs @@ -17,12 +17,12 @@ use std::slice::Iter; use byteorder::BigEndian; use byteorder::ReadBytesExt; -use common_arrow::arrow::buffer::Buffer; -use common_exception::Result; -use common_expression::types::number::Number; -use common_expression::types::string::StringColumn; -use common_expression::types::string::StringIterator; -use common_hashtable::DictionaryKeys; +use databend_common_arrow::arrow::buffer::Buffer; +use databend_common_exception::Result; +use databend_common_expression::types::number::Number; +use databend_common_expression::types::string::StringColumn; +use databend_common_expression::types::string::StringIterator; +use databend_common_hashtable::DictionaryKeys; use super::large_number::LargeNumber; diff --git a/src/query/service/src/pipelines/processors/transforms/group_by/aggregator_polymorphic_keys.rs b/src/query/service/src/pipelines/processors/transforms/group_by/aggregator_polymorphic_keys.rs index 990fbf36ded6..4aeef8015c13 100644 --- a/src/query/service/src/pipelines/processors/transforms/group_by/aggregator_polymorphic_keys.rs +++ b/src/query/service/src/pipelines/processors/transforms/group_by/aggregator_polymorphic_keys.rs @@ -17,32 +17,32 @@ use std::sync::Arc; use std::time::Instant; use bumpalo::Bump; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::types::number::*; -use common_expression::types::DataType; -use common_expression::types::ValueType; -use common_expression::Column; -use common_expression::HashMethod; -use common_expression::HashMethodDictionarySerializer; -use common_expression::HashMethodFixedKeys; -use common_expression::HashMethodKeysU128; -use common_expression::HashMethodKeysU256; -use common_expression::HashMethodSerializer; -use common_expression::HashMethodSingleString; -use common_expression::KeyAccessor; -use common_expression::KeysState; -use common_hashtable::DictionaryKeys; -use common_hashtable::DictionaryStringHashMap; -use common_hashtable::FastHash; -use common_hashtable::HashMap; -use common_hashtable::HashtableEntryMutRefLike; -use common_hashtable::HashtableEntryRefLike; -use common_hashtable::HashtableLike; -use common_hashtable::LookupHashMap; -use common_hashtable::PartitionedHashMap; -use common_hashtable::ShortStringHashMap; -use common_hashtable::StringHashMap; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::types::number::*; +use databend_common_expression::types::DataType; +use databend_common_expression::types::ValueType; +use databend_common_expression::Column; +use databend_common_expression::HashMethod; +use databend_common_expression::HashMethodDictionarySerializer; +use databend_common_expression::HashMethodFixedKeys; +use databend_common_expression::HashMethodKeysU128; +use databend_common_expression::HashMethodKeysU256; +use databend_common_expression::HashMethodSerializer; +use databend_common_expression::HashMethodSingleString; +use databend_common_expression::KeyAccessor; +use databend_common_expression::KeysState; +use databend_common_hashtable::DictionaryKeys; +use databend_common_hashtable::DictionaryStringHashMap; +use databend_common_hashtable::FastHash; +use databend_common_hashtable::HashMap; +use databend_common_hashtable::HashtableEntryMutRefLike; +use databend_common_hashtable::HashtableEntryRefLike; +use databend_common_hashtable::HashtableLike; +use databend_common_hashtable::LookupHashMap; +use databend_common_hashtable::PartitionedHashMap; +use databend_common_hashtable::ShortStringHashMap; +use databend_common_hashtable::StringHashMap; use ethnum::U256; use log::info; @@ -79,7 +79,7 @@ use crate::pipelines::processors::transforms::group_by::StringKeysColumnBuilder; // // use bumpalo::Bump; // use databend_query::common::HashTable; -// use common_expression::HashMethodSerializer; +// use databend_common_expression::HashMethodSerializer; // use databend_query::pipelines::processors::transforms::group_by::PolymorphicKeysHelper; // use databend_query::pipelines::processors::transforms::group_by::aggregator_state::SerializedKeysAggregatorState; // use databend_query::pipelines::processors::transforms::group_by::aggregator_keys_builder::StringKeysColumnBuilder; diff --git a/src/query/service/src/pipelines/processors/transforms/group_by/aggregator_state_entity.rs b/src/query/service/src/pipelines/processors/transforms/group_by/aggregator_state_entity.rs index 7ddadff648d1..1df6aacebd31 100644 --- a/src/query/service/src/pipelines/processors/transforms/group_by/aggregator_state_entity.rs +++ b/src/query/service/src/pipelines/processors/transforms/group_by/aggregator_state_entity.rs @@ -12,10 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_hashtable::HashtableEntry; -use common_hashtable::HashtableKeyable; -use common_hashtable::ShortStringHashtableEntryMutRef; -use common_hashtable::ShortStringHashtableEntryRef; +use databend_common_hashtable::HashtableEntry; +use databend_common_hashtable::HashtableKeyable; +use databend_common_hashtable::ShortStringHashtableEntryMutRef; +use databend_common_hashtable::ShortStringHashtableEntryRef; pub trait StateEntityRef { type KeyRef: Copy; diff --git a/src/query/service/src/pipelines/processors/transforms/hash_join/build_spill/build_spill_coordinator.rs b/src/query/service/src/pipelines/processors/transforms/hash_join/build_spill/build_spill_coordinator.rs index d7ec08aa6ff5..1553cdae0e32 100644 --- a/src/query/service/src/pipelines/processors/transforms/hash_join/build_spill/build_spill_coordinator.rs +++ b/src/query/service/src/pipelines/processors/transforms/hash_join/build_spill/build_spill_coordinator.rs @@ -18,12 +18,12 @@ use std::sync::atomic::AtomicUsize; use std::sync::atomic::Ordering; use std::sync::Arc; -use common_base::base::tokio::sync::watch; -use common_base::base::tokio::sync::watch::Receiver; -use common_base::base::tokio::sync::watch::Sender; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::DataBlock; +use databend_common_base::base::tokio::sync::watch; +use databend_common_base::base::tokio::sync::watch::Receiver; +use databend_common_base::base::tokio::sync::watch::Sender; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::DataBlock; use log::info; use parking_lot::Mutex; use parking_lot::RwLock; diff --git a/src/query/service/src/pipelines/processors/transforms/hash_join/build_spill/build_spill_state.rs b/src/query/service/src/pipelines/processors/transforms/hash_join/build_spill/build_spill_state.rs index 6052cbc9586e..88e6f590007e 100644 --- a/src/query/service/src/pipelines/processors/transforms/hash_join/build_spill/build_spill_state.rs +++ b/src/query/service/src/pipelines/processors/transforms/hash_join/build_spill/build_spill_state.rs @@ -19,14 +19,14 @@ use std::sync::Arc; use byte_unit::Byte; use byte_unit::ByteUnit; -use common_base::runtime::GLOBAL_MEM_STAT; -use common_catalog::table_context::TableContext; -use common_exception::Result; -use common_expression::DataBlock; -use common_hashtable::hash2bucket; -use common_pipeline_core::query_spill_prefix; -use common_sql::plans::JoinType; -use common_storage::DataOperator; +use databend_common_base::runtime::GLOBAL_MEM_STAT; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::Result; +use databend_common_expression::DataBlock; +use databend_common_hashtable::hash2bucket; +use databend_common_pipeline_core::query_spill_prefix; +use databend_common_sql::plans::JoinType; +use databend_common_storage::DataOperator; use log::info; use crate::pipelines::processors::transforms::hash_join::spill_common::get_hashes; diff --git a/src/query/service/src/pipelines/processors/transforms/hash_join/build_state.rs b/src/query/service/src/pipelines/processors/transforms/hash_join/build_state.rs index 16b97b7465b2..274cf9cda8c4 100644 --- a/src/query/service/src/pipelines/processors/transforms/hash_join/build_state.rs +++ b/src/query/service/src/pipelines/processors/transforms/hash_join/build_state.rs @@ -12,9 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_expression::types::DataType; -use common_expression::ColumnVec; -use common_expression::DataBlock; +use databend_common_expression::types::DataType; +use databend_common_expression::ColumnVec; +use databend_common_expression::DataBlock; pub struct BuildState { // The `generation_state` is used to generate build side `DataBlock`. diff --git a/src/query/service/src/pipelines/processors/transforms/hash_join/common.rs b/src/query/service/src/pipelines/processors/transforms/hash_join/common.rs index a5ca8da480d4..1571683d8f1f 100644 --- a/src/query/service/src/pipelines/processors/transforms/hash_join/common.rs +++ b/src/query/service/src/pipelines/processors/transforms/hash_join/common.rs @@ -12,23 +12,23 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_arrow::arrow::bitmap::Bitmap; -use common_arrow::arrow::bitmap::MutableBitmap; -use common_exception::Result; -use common_expression::arrow::or_validities; -use common_expression::types::nullable::NullableColumn; -use common_expression::types::AnyType; -use common_expression::types::BooleanType; -use common_expression::types::DataType; -use common_expression::BlockEntry; -use common_expression::Column; -use common_expression::DataBlock; -use common_expression::Evaluator; -use common_expression::Expr; -use common_expression::FunctionContext; -use common_expression::Value; -use common_functions::BUILTIN_FUNCTIONS; -use common_sql::executor::cast_expr_to_non_null_boolean; +use databend_common_arrow::arrow::bitmap::Bitmap; +use databend_common_arrow::arrow::bitmap::MutableBitmap; +use databend_common_exception::Result; +use databend_common_expression::arrow::or_validities; +use databend_common_expression::types::nullable::NullableColumn; +use databend_common_expression::types::AnyType; +use databend_common_expression::types::BooleanType; +use databend_common_expression::types::DataType; +use databend_common_expression::BlockEntry; +use databend_common_expression::Column; +use databend_common_expression::DataBlock; +use databend_common_expression::Evaluator; +use databend_common_expression::Expr; +use databend_common_expression::FunctionContext; +use databend_common_expression::Value; +use databend_common_functions::BUILTIN_FUNCTIONS; +use databend_common_sql::executor::cast_expr_to_non_null_boolean; use super::desc::MARKER_KIND_FALSE; use super::desc::MARKER_KIND_NULL; diff --git a/src/query/service/src/pipelines/processors/transforms/hash_join/desc.rs b/src/query/service/src/pipelines/processors/transforms/hash_join/desc.rs index 128f68c2bcbe..ab38e842c40f 100644 --- a/src/query/service/src/pipelines/processors/transforms/hash_join/desc.rs +++ b/src/query/service/src/pipelines/processors/transforms/hash_join/desc.rs @@ -12,12 +12,12 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_exception::Result; -use common_expression::type_check::check_function; -use common_expression::Expr; -use common_expression::RemoteExpr; -use common_functions::BUILTIN_FUNCTIONS; -use common_sql::executor::physical_plans::HashJoin; +use databend_common_exception::Result; +use databend_common_expression::type_check::check_function; +use databend_common_expression::Expr; +use databend_common_expression::RemoteExpr; +use databend_common_functions::BUILTIN_FUNCTIONS; +use databend_common_sql::executor::physical_plans::HashJoin; use parking_lot::RwLock; use crate::sql::plans::JoinType; diff --git a/src/query/service/src/pipelines/processors/transforms/hash_join/hash_join_build_state.rs b/src/query/service/src/pipelines/processors/transforms/hash_join/hash_join_build_state.rs index 01e9f60dea6c..92af7077892c 100644 --- a/src/query/service/src/pipelines/processors/transforms/hash_join/hash_join_build_state.rs +++ b/src/query/service/src/pipelines/processors/transforms/hash_join/hash_join_build_state.rs @@ -19,35 +19,35 @@ use std::sync::atomic::AtomicUsize; use std::sync::atomic::Ordering; use std::sync::Arc; -use common_arrow::arrow::bitmap::Bitmap; -use common_base::base::tokio::sync::Barrier; -use common_catalog::table_context::TableContext; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::arrow::and_validities; -use common_expression::types::DataType; -use common_expression::Column; -use common_expression::ColumnBuilder; -use common_expression::ColumnVec; -use common_expression::DataBlock; -use common_expression::Evaluator; -use common_expression::FunctionContext; -use common_expression::HashMethod; -use common_expression::HashMethodKind; -use common_expression::HashMethodSerializer; -use common_expression::HashMethodSingleString; -use common_expression::KeysState; -use common_expression::RemoteExpr; -use common_expression::Value; -use common_functions::BUILTIN_FUNCTIONS; -use common_hashtable::HashJoinHashMap; -use common_hashtable::RawEntry; -use common_hashtable::RowPtr; -use common_hashtable::StringHashJoinHashMap; -use common_hashtable::StringRawEntry; -use common_hashtable::STRING_EARLY_SIZE; -use common_sql::plans::JoinType; -use common_sql::ColumnSet; +use databend_common_arrow::arrow::bitmap::Bitmap; +use databend_common_base::base::tokio::sync::Barrier; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::arrow::and_validities; +use databend_common_expression::types::DataType; +use databend_common_expression::Column; +use databend_common_expression::ColumnBuilder; +use databend_common_expression::ColumnVec; +use databend_common_expression::DataBlock; +use databend_common_expression::Evaluator; +use databend_common_expression::FunctionContext; +use databend_common_expression::HashMethod; +use databend_common_expression::HashMethodKind; +use databend_common_expression::HashMethodSerializer; +use databend_common_expression::HashMethodSingleString; +use databend_common_expression::KeysState; +use databend_common_expression::RemoteExpr; +use databend_common_expression::Value; +use databend_common_functions::BUILTIN_FUNCTIONS; +use databend_common_hashtable::HashJoinHashMap; +use databend_common_hashtable::RawEntry; +use databend_common_hashtable::RowPtr; +use databend_common_hashtable::StringHashJoinHashMap; +use databend_common_hashtable::StringRawEntry; +use databend_common_hashtable::STRING_EARLY_SIZE; +use databend_common_sql::plans::JoinType; +use databend_common_sql::ColumnSet; use ethnum::U256; use itertools::Itertools; use log::info; diff --git a/src/query/service/src/pipelines/processors/transforms/hash_join/hash_join_probe_state.rs b/src/query/service/src/pipelines/processors/transforms/hash_join/hash_join_probe_state.rs index ed6aff7bc481..431d3ce49b69 100644 --- a/src/query/service/src/pipelines/processors/transforms/hash_join/hash_join_probe_state.rs +++ b/src/query/service/src/pipelines/processors/transforms/hash_join/hash_join_probe_state.rs @@ -18,29 +18,29 @@ use std::sync::atomic::AtomicUsize; use std::sync::atomic::Ordering; use std::sync::Arc; -use common_arrow::arrow::bitmap::Bitmap; -use common_arrow::arrow::bitmap::MutableBitmap; -use common_base::base::tokio::sync::Barrier; -use common_catalog::table_context::TableContext; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::arrow::and_validities; -use common_expression::types::nullable::NullableColumn; -use common_expression::with_join_hash_method; -use common_expression::BlockEntry; -use common_expression::Column; -use common_expression::DataBlock; -use common_expression::DataSchemaRef; -use common_expression::Evaluator; -use common_expression::FunctionContext; -use common_expression::HashMethod; -use common_expression::HashMethodKind; -use common_expression::RemoteExpr; -use common_expression::Scalar; -use common_expression::Value; -use common_functions::BUILTIN_FUNCTIONS; -use common_hashtable::HashJoinHashtableLike; -use common_sql::ColumnSet; +use databend_common_arrow::arrow::bitmap::Bitmap; +use databend_common_arrow::arrow::bitmap::MutableBitmap; +use databend_common_base::base::tokio::sync::Barrier; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::arrow::and_validities; +use databend_common_expression::types::nullable::NullableColumn; +use databend_common_expression::with_join_hash_method; +use databend_common_expression::BlockEntry; +use databend_common_expression::Column; +use databend_common_expression::DataBlock; +use databend_common_expression::DataSchemaRef; +use databend_common_expression::Evaluator; +use databend_common_expression::FunctionContext; +use databend_common_expression::HashMethod; +use databend_common_expression::HashMethodKind; +use databend_common_expression::RemoteExpr; +use databend_common_expression::Scalar; +use databend_common_expression::Value; +use databend_common_functions::BUILTIN_FUNCTIONS; +use databend_common_hashtable::HashJoinHashtableLike; +use databend_common_sql::ColumnSet; use itertools::Itertools; use log::info; use parking_lot::Mutex; diff --git a/src/query/service/src/pipelines/processors/transforms/hash_join/hash_join_state.rs b/src/query/service/src/pipelines/processors/transforms/hash_join/hash_join_state.rs index a87672fdf8df..d1135d9e98ba 100644 --- a/src/query/service/src/pipelines/processors/transforms/hash_join/hash_join_state.rs +++ b/src/query/service/src/pipelines/processors/transforms/hash_join/hash_join_state.rs @@ -20,22 +20,22 @@ use std::sync::atomic::AtomicUsize; use std::sync::atomic::Ordering; use std::sync::Arc; -use common_base::base::tokio::sync::watch; -use common_base::base::tokio::sync::watch::Receiver; -use common_base::base::tokio::sync::watch::Sender; -use common_catalog::table_context::TableContext; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::DataSchemaRef; -use common_expression::HashMethodFixedKeys; -use common_expression::HashMethodSerializer; -use common_expression::HashMethodSingleString; -use common_hashtable::HashJoinHashMap; -use common_hashtable::HashtableKeyable; -use common_hashtable::StringHashJoinHashMap; -use common_sql::plans::JoinType; -use common_sql::ColumnSet; -use common_sql::IndexType; +use databend_common_base::base::tokio::sync::watch; +use databend_common_base::base::tokio::sync::watch::Receiver; +use databend_common_base::base::tokio::sync::watch::Sender; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::DataSchemaRef; +use databend_common_expression::HashMethodFixedKeys; +use databend_common_expression::HashMethodSerializer; +use databend_common_expression::HashMethodSingleString; +use databend_common_hashtable::HashJoinHashMap; +use databend_common_hashtable::HashtableKeyable; +use databend_common_hashtable::StringHashJoinHashMap; +use databend_common_sql::plans::JoinType; +use databend_common_sql::ColumnSet; +use databend_common_sql::IndexType; use ethnum::U256; use parking_lot::RwLock; diff --git a/src/query/service/src/pipelines/processors/transforms/hash_join/probe_join/cross_join.rs b/src/query/service/src/pipelines/processors/transforms/hash_join/probe_join/cross_join.rs index 47223df386aa..834d7c96bb18 100644 --- a/src/query/service/src/pipelines/processors/transforms/hash_join/probe_join/cross_join.rs +++ b/src/query/service/src/pipelines/processors/transforms/hash_join/probe_join/cross_join.rs @@ -12,10 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_exception::Result; -use common_expression::BlockEntry; -use common_expression::DataBlock; -use common_expression::Value; +use databend_common_exception::Result; +use databend_common_expression::BlockEntry; +use databend_common_expression::DataBlock; +use databend_common_expression::Value; use crate::pipelines::processors::transforms::hash_join::HashJoinProbeState; use crate::pipelines::processors::transforms::hash_join::ProbeState; diff --git a/src/query/service/src/pipelines/processors/transforms/hash_join/probe_join/inner_join.rs b/src/query/service/src/pipelines/processors/transforms/hash_join/probe_join/inner_join.rs index dae64c34792f..0b6245fc1311 100644 --- a/src/query/service/src/pipelines/processors/transforms/hash_join/probe_join/inner_join.rs +++ b/src/query/service/src/pipelines/processors/transforms/hash_join/probe_join/inner_join.rs @@ -14,17 +14,17 @@ use std::sync::atomic::Ordering; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::types::BooleanType; -use common_expression::types::DataType; -use common_expression::DataBlock; -use common_expression::Evaluator; -use common_expression::KeyAccessor; -use common_functions::BUILTIN_FUNCTIONS; -use common_hashtable::HashJoinHashtableLike; -use common_hashtable::RowPtr; -use common_sql::executor::cast_expr_to_non_null_boolean; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::types::BooleanType; +use databend_common_expression::types::DataType; +use databend_common_expression::DataBlock; +use databend_common_expression::Evaluator; +use databend_common_expression::KeyAccessor; +use databend_common_functions::BUILTIN_FUNCTIONS; +use databend_common_hashtable::HashJoinHashtableLike; +use databend_common_hashtable::RowPtr; +use databend_common_sql::executor::cast_expr_to_non_null_boolean; use crate::pipelines::processors::transforms::hash_join::build_state::BuildBlockGenerationState; use crate::pipelines::processors::transforms::hash_join::common::wrap_true_validity; diff --git a/src/query/service/src/pipelines/processors/transforms/hash_join/probe_join/left_anti_join.rs b/src/query/service/src/pipelines/processors/transforms/hash_join/probe_join/left_anti_join.rs index 3a83835e1b91..caea33882c97 100644 --- a/src/query/service/src/pipelines/processors/transforms/hash_join/probe_join/left_anti_join.rs +++ b/src/query/service/src/pipelines/processors/transforms/hash_join/probe_join/left_anti_join.rs @@ -14,13 +14,13 @@ use std::sync::atomic::Ordering; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::DataBlock; -use common_expression::Expr; -use common_expression::KeyAccessor; -use common_hashtable::HashJoinHashtableLike; -use common_hashtable::RowPtr; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::DataBlock; +use databend_common_expression::Expr; +use databend_common_expression::KeyAccessor; +use databend_common_hashtable::HashJoinHashtableLike; +use databend_common_hashtable::RowPtr; use crate::pipelines::processors::transforms::hash_join::build_state::BuildBlockGenerationState; use crate::pipelines::processors::transforms::hash_join::probe_state::ProbeBlockGenerationState; diff --git a/src/query/service/src/pipelines/processors/transforms/hash_join/probe_join/left_join.rs b/src/query/service/src/pipelines/processors/transforms/hash_join/probe_join/left_join.rs index dbbea05cea95..42c494382cc0 100644 --- a/src/query/service/src/pipelines/processors/transforms/hash_join/probe_join/left_join.rs +++ b/src/query/service/src/pipelines/processors/transforms/hash_join/probe_join/left_join.rs @@ -14,16 +14,16 @@ use std::sync::atomic::Ordering; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::BlockEntry; -use common_expression::DataBlock; -use common_expression::Expr; -use common_expression::KeyAccessor; -use common_expression::Scalar; -use common_expression::Value; -use common_hashtable::HashJoinHashtableLike; -use common_hashtable::RowPtr; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::BlockEntry; +use databend_common_expression::DataBlock; +use databend_common_expression::Expr; +use databend_common_expression::KeyAccessor; +use databend_common_expression::Scalar; +use databend_common_expression::Value; +use databend_common_hashtable::HashJoinHashtableLike; +use databend_common_hashtable::RowPtr; use crate::pipelines::processors::transforms::hash_join::build_state::BuildBlockGenerationState; use crate::pipelines::processors::transforms::hash_join::common::wrap_true_validity; diff --git a/src/query/service/src/pipelines/processors/transforms/hash_join/probe_join/left_mark_join.rs b/src/query/service/src/pipelines/processors/transforms/hash_join/probe_join/left_mark_join.rs index 6ff61b417d99..163c77290888 100644 --- a/src/query/service/src/pipelines/processors/transforms/hash_join/probe_join/left_mark_join.rs +++ b/src/query/service/src/pipelines/processors/transforms/hash_join/probe_join/left_mark_join.rs @@ -14,16 +14,16 @@ use std::sync::atomic::Ordering; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::types::BooleanType; -use common_expression::types::NullableType; -use common_expression::types::ValueType; -use common_expression::DataBlock; -use common_expression::Expr; -use common_expression::KeyAccessor; -use common_hashtable::HashJoinHashtableLike; -use common_hashtable::RowPtr; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::types::BooleanType; +use databend_common_expression::types::NullableType; +use databend_common_expression::types::ValueType; +use databend_common_expression::DataBlock; +use databend_common_expression::Expr; +use databend_common_expression::KeyAccessor; +use databend_common_hashtable::HashJoinHashtableLike; +use databend_common_hashtable::RowPtr; use crate::pipelines::processors::transforms::hash_join::build_state::BuildBlockGenerationState; use crate::pipelines::processors::transforms::hash_join::desc::MARKER_KIND_FALSE; diff --git a/src/query/service/src/pipelines/processors/transforms/hash_join/probe_join/left_semi_join.rs b/src/query/service/src/pipelines/processors/transforms/hash_join/probe_join/left_semi_join.rs index 448f6c04090c..56dd6fcb8efd 100644 --- a/src/query/service/src/pipelines/processors/transforms/hash_join/probe_join/left_semi_join.rs +++ b/src/query/service/src/pipelines/processors/transforms/hash_join/probe_join/left_semi_join.rs @@ -14,13 +14,13 @@ use std::sync::atomic::Ordering; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::DataBlock; -use common_expression::Expr; -use common_expression::KeyAccessor; -use common_hashtable::HashJoinHashtableLike; -use common_hashtable::RowPtr; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::DataBlock; +use databend_common_expression::Expr; +use databend_common_expression::KeyAccessor; +use databend_common_hashtable::HashJoinHashtableLike; +use databend_common_hashtable::RowPtr; use crate::pipelines::processors::transforms::hash_join::build_state::BuildBlockGenerationState; use crate::pipelines::processors::transforms::hash_join::probe_state::ProbeBlockGenerationState; diff --git a/src/query/service/src/pipelines/processors/transforms/hash_join/probe_join/right_join.rs b/src/query/service/src/pipelines/processors/transforms/hash_join/probe_join/right_join.rs index d5ddf8c427d6..2f5413bf968c 100644 --- a/src/query/service/src/pipelines/processors/transforms/hash_join/probe_join/right_join.rs +++ b/src/query/service/src/pipelines/processors/transforms/hash_join/probe_join/right_join.rs @@ -15,13 +15,13 @@ use std::sync::atomic::AtomicBool; use std::sync::atomic::Ordering; -use common_arrow::arrow::bitmap::Bitmap; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::DataBlock; -use common_expression::KeyAccessor; -use common_hashtable::HashJoinHashtableLike; -use common_hashtable::RowPtr; +use databend_common_arrow::arrow::bitmap::Bitmap; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::DataBlock; +use databend_common_expression::KeyAccessor; +use databend_common_hashtable::HashJoinHashtableLike; +use databend_common_hashtable::RowPtr; use crate::pipelines::processors::transforms::hash_join::build_state::BuildBlockGenerationState; use crate::pipelines::processors::transforms::hash_join::common::wrap_true_validity; diff --git a/src/query/service/src/pipelines/processors/transforms/hash_join/probe_join/right_mark_join.rs b/src/query/service/src/pipelines/processors/transforms/hash_join/probe_join/right_mark_join.rs index 2af50b4a5233..45d8a23be659 100644 --- a/src/query/service/src/pipelines/processors/transforms/hash_join/probe_join/right_mark_join.rs +++ b/src/query/service/src/pipelines/processors/transforms/hash_join/probe_join/right_mark_join.rs @@ -14,16 +14,16 @@ use std::sync::atomic::Ordering; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::types::BooleanType; -use common_expression::types::NullableType; -use common_expression::types::ValueType; -use common_expression::DataBlock; -use common_expression::Expr; -use common_expression::KeyAccessor; -use common_hashtable::HashJoinHashtableLike; -use common_hashtable::RowPtr; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::types::BooleanType; +use databend_common_expression::types::NullableType; +use databend_common_expression::types::ValueType; +use databend_common_expression::DataBlock; +use databend_common_expression::Expr; +use databend_common_expression::KeyAccessor; +use databend_common_hashtable::HashJoinHashtableLike; +use databend_common_hashtable::RowPtr; use crate::pipelines::processors::transforms::hash_join::build_state::BuildBlockGenerationState; use crate::pipelines::processors::transforms::hash_join::desc::MARKER_KIND_FALSE; diff --git a/src/query/service/src/pipelines/processors/transforms/hash_join/probe_join/right_semi_anti_join.rs b/src/query/service/src/pipelines/processors/transforms/hash_join/probe_join/right_semi_anti_join.rs index b6bcc834ee7c..4bc5d6a08bc3 100644 --- a/src/query/service/src/pipelines/processors/transforms/hash_join/probe_join/right_semi_anti_join.rs +++ b/src/query/service/src/pipelines/processors/transforms/hash_join/probe_join/right_semi_anti_join.rs @@ -14,13 +14,13 @@ use std::sync::atomic::Ordering; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::DataBlock; -use common_expression::Expr; -use common_expression::KeyAccessor; -use common_hashtable::HashJoinHashtableLike; -use common_hashtable::RowPtr; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::DataBlock; +use databend_common_expression::Expr; +use databend_common_expression::KeyAccessor; +use databend_common_hashtable::HashJoinHashtableLike; +use databend_common_hashtable::RowPtr; use crate::pipelines::processors::transforms::hash_join::build_state::BuildBlockGenerationState; use crate::pipelines::processors::transforms::hash_join::probe_state::ProbeBlockGenerationState; diff --git a/src/query/service/src/pipelines/processors/transforms/hash_join/probe_spill/probe_spill_state.rs b/src/query/service/src/pipelines/processors/transforms/hash_join/probe_spill/probe_spill_state.rs index d133d4a58ed1..edcb386f9930 100644 --- a/src/query/service/src/pipelines/processors/transforms/hash_join/probe_spill/probe_spill_state.rs +++ b/src/query/service/src/pipelines/processors/transforms/hash_join/probe_spill/probe_spill_state.rs @@ -14,11 +14,11 @@ use std::sync::Arc; -use common_catalog::table_context::TableContext; -use common_exception::Result; -use common_expression::DataBlock; -use common_pipeline_core::query_spill_prefix; -use common_storage::DataOperator; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::Result; +use databend_common_expression::DataBlock; +use databend_common_pipeline_core::query_spill_prefix; +use databend_common_storage::DataOperator; use crate::pipelines::processors::transforms::hash_join::spill_common::get_hashes; use crate::pipelines::processors::transforms::hash_join::HashJoinProbeState; diff --git a/src/query/service/src/pipelines/processors/transforms/hash_join/probe_state.rs b/src/query/service/src/pipelines/processors/transforms/hash_join/probe_state.rs index 38c0aec69a59..c5e00e3e7ac5 100644 --- a/src/query/service/src/pipelines/processors/transforms/hash_join/probe_state.rs +++ b/src/query/service/src/pipelines/processors/transforms/hash_join/probe_state.rs @@ -12,9 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_arrow::arrow::bitmap::Bitmap; -use common_expression::FunctionContext; -use common_hashtable::RowPtr; +use databend_common_arrow::arrow::bitmap::Bitmap; +use databend_common_expression::FunctionContext; +use databend_common_hashtable::RowPtr; use super::desc::MARKER_KIND_FALSE; use crate::sql::plans::JoinType; diff --git a/src/query/service/src/pipelines/processors/transforms/hash_join/result_blocks.rs b/src/query/service/src/pipelines/processors/transforms/hash_join/result_blocks.rs index cc3f019c2298..5cd8f3ffb2bc 100644 --- a/src/query/service/src/pipelines/processors/transforms/hash_join/result_blocks.rs +++ b/src/query/service/src/pipelines/processors/transforms/hash_join/result_blocks.rs @@ -12,15 +12,15 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_arrow::arrow::bitmap::Bitmap; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::BlockEntry; -use common_expression::DataBlock; -use common_expression::KeyAccessor; -use common_expression::Scalar; -use common_expression::Value; -use common_hashtable::HashJoinHashtableLike; +use databend_common_arrow::arrow::bitmap::Bitmap; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::BlockEntry; +use databend_common_expression::DataBlock; +use databend_common_expression::KeyAccessor; +use databend_common_expression::Scalar; +use databend_common_expression::Value; +use databend_common_hashtable::HashJoinHashtableLike; use super::ProbeState; use crate::pipelines::processors::transforms::hash_join::common::wrap_true_validity; diff --git a/src/query/service/src/pipelines/processors/transforms/hash_join/row.rs b/src/query/service/src/pipelines/processors/transforms/hash_join/row.rs index b7ad0269f257..a73d953ddb6e 100644 --- a/src/query/service/src/pipelines/processors/transforms/hash_join/row.rs +++ b/src/query/service/src/pipelines/processors/transforms/hash_join/row.rs @@ -16,15 +16,15 @@ use std::sync::atomic::AtomicUsize; use std::sync::atomic::Ordering; use std::sync::Arc; -use common_exception::Result; -use common_expression::types::DataType; -use common_expression::ColumnVec; -use common_expression::DataBlock; -use common_expression::DataSchemaRef; -use common_expression::DataSchemaRefExt; -use common_hashtable::RowPtr; -use common_sql::ColumnSet; -use common_storages_fuse::TableContext; +use databend_common_exception::Result; +use databend_common_expression::types::DataType; +use databend_common_expression::ColumnVec; +use databend_common_expression::DataBlock; +use databend_common_expression::DataSchemaRef; +use databend_common_expression::DataSchemaRefExt; +use databend_common_hashtable::RowPtr; +use databend_common_sql::ColumnSet; +use databend_common_storages_fuse::TableContext; use parking_lot::RwLock; use crate::sessions::QueryContext; diff --git a/src/query/service/src/pipelines/processors/transforms/hash_join/spill_common.rs b/src/query/service/src/pipelines/processors/transforms/hash_join/spill_common.rs index 190eb00a5d25..65fbaea2d73e 100644 --- a/src/query/service/src/pipelines/processors/transforms/hash_join/spill_common.rs +++ b/src/query/service/src/pipelines/processors/transforms/hash_join/spill_common.rs @@ -14,16 +14,16 @@ // Define some methods that are used by both the build and probe spilling of the hash join. -use common_exception::Result; -use common_expression::types::DataType; -use common_expression::Column; -use common_expression::DataBlock; -use common_expression::Evaluator; -use common_expression::Expr; -use common_expression::FunctionContext; -use common_expression::HashMethod; -use common_expression::HashMethodKind; -use common_functions::BUILTIN_FUNCTIONS; +use databend_common_exception::Result; +use databend_common_expression::types::DataType; +use databend_common_expression::Column; +use databend_common_expression::DataBlock; +use databend_common_expression::Evaluator; +use databend_common_expression::Expr; +use databend_common_expression::FunctionContext; +use databend_common_expression::HashMethod; +use databend_common_expression::HashMethodKind; +use databend_common_functions::BUILTIN_FUNCTIONS; use crate::pipelines::processors::transforms::group_by::PolymorphicKeysHelper; diff --git a/src/query/service/src/pipelines/processors/transforms/hash_join/transform_hash_join_build.rs b/src/query/service/src/pipelines/processors/transforms/hash_join/transform_hash_join_build.rs index 08e53dcdfe69..a0c4949bd290 100644 --- a/src/query/service/src/pipelines/processors/transforms/hash_join/transform_hash_join_build.rs +++ b/src/query/service/src/pipelines/processors/transforms/hash_join/transform_hash_join_build.rs @@ -16,9 +16,9 @@ use std::any::Any; use std::sync::atomic::Ordering; use std::sync::Arc; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::DataBlock; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::DataBlock; use log::info; use crate::pipelines::processors::transforms::hash_join::BuildSpillState; diff --git a/src/query/service/src/pipelines/processors/transforms/hash_join/transform_hash_join_probe.rs b/src/query/service/src/pipelines/processors/transforms/hash_join/transform_hash_join_probe.rs index 3a0af7fa344b..0087cf458d1b 100644 --- a/src/query/service/src/pipelines/processors/transforms/hash_join/transform_hash_join_probe.rs +++ b/src/query/service/src/pipelines/processors/transforms/hash_join/transform_hash_join_probe.rs @@ -17,13 +17,13 @@ use std::collections::VecDeque; use std::sync::atomic::Ordering; use std::sync::Arc; -use common_catalog::table_context::TableContext; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::DataBlock; -use common_expression::FunctionContext; -use common_sql::optimizer::ColumnSet; -use common_sql::plans::JoinType; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::DataBlock; +use databend_common_expression::FunctionContext; +use databend_common_sql::optimizer::ColumnSet; +use databend_common_sql::plans::JoinType; use log::info; use crate::pipelines::processors::transforms::hash_join::probe_spill::ProbeSpillState; diff --git a/src/query/service/src/pipelines/processors/transforms/hash_join/util.rs b/src/query/service/src/pipelines/processors/transforms/hash_join/util.rs index 0c716dbf3a42..c257853886d0 100644 --- a/src/query/service/src/pipelines/processors/transforms/hash_join/util.rs +++ b/src/query/service/src/pipelines/processors/transforms/hash_join/util.rs @@ -12,18 +12,18 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_exception::Result; -use common_expression::type_check; -use common_expression::Column; -use common_expression::DataBlock; -use common_expression::DataField; -use common_expression::DataSchemaRef; -use common_expression::DataSchemaRefExt; -use common_expression::Evaluator; -use common_expression::Expr; -use common_expression::FunctionContext; -use common_expression::RawExpr; -use common_functions::BUILTIN_FUNCTIONS; +use databend_common_exception::Result; +use databend_common_expression::type_check; +use databend_common_expression::Column; +use databend_common_expression::DataBlock; +use databend_common_expression::DataField; +use databend_common_expression::DataSchemaRef; +use databend_common_expression::DataSchemaRefExt; +use databend_common_expression::Evaluator; +use databend_common_expression::Expr; +use databend_common_expression::FunctionContext; +use databend_common_expression::RawExpr; +use databend_common_functions::BUILTIN_FUNCTIONS; pub(crate) fn build_schema_wrap_nullable(build_schema: &DataSchemaRef) -> DataSchemaRef { let mut nullable_field = Vec::with_capacity(build_schema.fields().len()); diff --git a/src/query/service/src/pipelines/processors/transforms/processor_accumulate_row_number.rs b/src/query/service/src/pipelines/processors/transforms/processor_accumulate_row_number.rs index 4bc1eb92d5ba..3841948ec988 100644 --- a/src/query/service/src/pipelines/processors/transforms/processor_accumulate_row_number.rs +++ b/src/query/service/src/pipelines/processors/transforms/processor_accumulate_row_number.rs @@ -12,17 +12,17 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_exception::Result; -use common_expression::types::DataType; -use common_expression::types::NumberDataType; -use common_expression::DataBlock; -use common_pipeline_core::processors::InputPort; -use common_pipeline_core::processors::OutputPort; -use common_pipeline_core::processors::ProcessorPtr; -use common_pipeline_core::PipeItem; -use common_pipeline_transforms::processors::AsyncAccumulatingTransform; -use common_pipeline_transforms::processors::AsyncAccumulatingTransformer; -use common_storages_fuse::operations::SourceFullMatched; +use databend_common_exception::Result; +use databend_common_expression::types::DataType; +use databend_common_expression::types::NumberDataType; +use databend_common_expression::DataBlock; +use databend_common_pipeline_core::processors::InputPort; +use databend_common_pipeline_core::processors::OutputPort; +use databend_common_pipeline_core::processors::ProcessorPtr; +use databend_common_pipeline_core::PipeItem; +use databend_common_pipeline_transforms::processors::AsyncAccumulatingTransform; +use databend_common_pipeline_transforms::processors::AsyncAccumulatingTransformer; +use databend_common_storages_fuse::operations::SourceFullMatched; pub struct AccumulateRowNumber { data_blocks: Vec, diff --git a/src/query/service/src/pipelines/processors/transforms/processor_deduplicate_row_number.rs b/src/query/service/src/pipelines/processors/transforms/processor_deduplicate_row_number.rs index fac0fabe3678..f67c6aa7574c 100644 --- a/src/query/service/src/pipelines/processors/transforms/processor_deduplicate_row_number.rs +++ b/src/query/service/src/pipelines/processors/transforms/processor_deduplicate_row_number.rs @@ -14,20 +14,20 @@ use std::collections::HashSet; -use common_arrow::arrow::buffer::Buffer; -use common_exception::Result; -use common_expression::types::DataType; -use common_expression::types::NumberDataType; -use common_expression::types::UInt64Type; -use common_expression::DataBlock; -use common_expression::FromData; -use common_metrics::storage::*; -use common_pipeline_core::processors::InputPort; -use common_pipeline_core::processors::OutputPort; -use common_pipeline_core::processors::ProcessorPtr; -use common_pipeline_core::PipeItem; -use common_pipeline_transforms::processors::AsyncAccumulatingTransform; -use common_pipeline_transforms::processors::AsyncAccumulatingTransformer; +use databend_common_arrow::arrow::buffer::Buffer; +use databend_common_exception::Result; +use databend_common_expression::types::DataType; +use databend_common_expression::types::NumberDataType; +use databend_common_expression::types::UInt64Type; +use databend_common_expression::DataBlock; +use databend_common_expression::FromData; +use databend_common_metrics::storage::*; +use databend_common_pipeline_core::processors::InputPort; +use databend_common_pipeline_core::processors::OutputPort; +use databend_common_pipeline_core::processors::ProcessorPtr; +use databend_common_pipeline_core::PipeItem; +use databend_common_pipeline_transforms::processors::AsyncAccumulatingTransform; +use databend_common_pipeline_transforms::processors::AsyncAccumulatingTransformer; use itertools::Itertools; use log::info; @@ -114,8 +114,8 @@ pub(crate) fn get_row_number(data_block: &DataBlock, row_number_idx: usize) -> B ); let value = row_number_col.value.try_downcast::().unwrap(); match value { - common_expression::Value::Scalar(scalar) => Buffer::from(vec![scalar]), - common_expression::Value::Column(column) => column, + databend_common_expression::Value::Scalar(scalar) => Buffer::from(vec![scalar]), + databend_common_expression::Value::Column(column) => column, } } diff --git a/src/query/service/src/pipelines/processors/transforms/processor_extract_hash_table_by_row_number.rs b/src/query/service/src/pipelines/processors/transforms/processor_extract_hash_table_by_row_number.rs index e4589ceb1c15..9d1cd00e1fae 100644 --- a/src/query/service/src/pipelines/processors/transforms/processor_extract_hash_table_by_row_number.rs +++ b/src/query/service/src/pipelines/processors/transforms/processor_extract_hash_table_by_row_number.rs @@ -16,23 +16,23 @@ use std::any::Any; use std::collections::HashSet; use std::sync::Arc; -use common_arrow::arrow::bitmap::MutableBitmap; -use common_exception::Result; -use common_expression::types::DataType; -use common_expression::types::NumberDataType; -use common_expression::BlockEntry; -use common_expression::DataBlock; -use common_expression::DataField; -use common_expression::Scalar; -use common_expression::Value; -use common_metrics::storage::*; -use common_pipeline_core::processors::Event; -use common_pipeline_core::processors::InputPort; -use common_pipeline_core::processors::OutputPort; -use common_pipeline_core::processors::Processor; -use common_pipeline_core::processors::ProcessorPtr; -use common_pipeline_core::PipeItem; -use common_sql::binder::MergeIntoType; +use databend_common_arrow::arrow::bitmap::MutableBitmap; +use databend_common_exception::Result; +use databend_common_expression::types::DataType; +use databend_common_expression::types::NumberDataType; +use databend_common_expression::BlockEntry; +use databend_common_expression::DataBlock; +use databend_common_expression::DataField; +use databend_common_expression::Scalar; +use databend_common_expression::Value; +use databend_common_metrics::storage::*; +use databend_common_pipeline_core::processors::Event; +use databend_common_pipeline_core::processors::InputPort; +use databend_common_pipeline_core::processors::OutputPort; +use databend_common_pipeline_core::processors::Processor; +use databend_common_pipeline_core::processors::ProcessorPtr; +use databend_common_pipeline_core::PipeItem; +use databend_common_sql::binder::MergeIntoType; use super::hash_join::HashJoinBuildState; use super::processor_deduplicate_row_number::get_row_number; diff --git a/src/query/service/src/pipelines/processors/transforms/range_join/ie_join_state.rs b/src/query/service/src/pipelines/processors/transforms/range_join/ie_join_state.rs index cb0004be27e0..cd6ed45d80f4 100644 --- a/src/query/service/src/pipelines/processors/transforms/range_join/ie_join_state.rs +++ b/src/query/service/src/pipelines/processors/transforms/range_join/ie_join_state.rs @@ -12,29 +12,29 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_arrow::arrow::bitmap::Bitmap; -use common_arrow::arrow::bitmap::MutableBitmap; -use common_catalog::table_context::TableContext; -use common_exception::Result; -use common_expression::types::DataType; -use common_expression::types::NumberColumnBuilder; -use common_expression::types::NumberDataType; -use common_expression::types::NumberScalar; -use common_expression::types::UInt64Type; -use common_expression::types::ValueType; -use common_expression::BlockEntry; -use common_expression::Column; -use common_expression::DataBlock; -use common_expression::DataField; -use common_expression::DataSchemaRef; -use common_expression::DataSchemaRefExt; -use common_expression::ScalarRef; -use common_expression::SortColumnDescription; -use common_expression::Value; -use common_expression::ValueRef; -use common_functions::BUILTIN_FUNCTIONS; -use common_pipeline_transforms::processors::sort_merge; -use common_sql::executor::physical_plans::RangeJoin; +use databend_common_arrow::arrow::bitmap::Bitmap; +use databend_common_arrow::arrow::bitmap::MutableBitmap; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::Result; +use databend_common_expression::types::DataType; +use databend_common_expression::types::NumberColumnBuilder; +use databend_common_expression::types::NumberDataType; +use databend_common_expression::types::NumberScalar; +use databend_common_expression::types::UInt64Type; +use databend_common_expression::types::ValueType; +use databend_common_expression::BlockEntry; +use databend_common_expression::Column; +use databend_common_expression::DataBlock; +use databend_common_expression::DataField; +use databend_common_expression::DataSchemaRef; +use databend_common_expression::DataSchemaRefExt; +use databend_common_expression::ScalarRef; +use databend_common_expression::SortColumnDescription; +use databend_common_expression::Value; +use databend_common_expression::ValueRef; +use databend_common_functions::BUILTIN_FUNCTIONS; +use databend_common_pipeline_transforms::processors::sort_merge; +use databend_common_sql::executor::physical_plans::RangeJoin; use crate::pipelines::processors::transforms::range_join::filter_block; use crate::pipelines::processors::transforms::range_join::order_match; diff --git a/src/query/service/src/pipelines/processors/transforms/range_join/ie_join_util.rs b/src/query/service/src/pipelines/processors/transforms/range_join/ie_join_util.rs index 26ad77e6969f..864636c4fd7d 100644 --- a/src/query/service/src/pipelines/processors/transforms/range_join/ie_join_util.rs +++ b/src/query/service/src/pipelines/processors/transforms/range_join/ie_join_util.rs @@ -15,17 +15,17 @@ use std::cmp::min; use std::cmp::Ordering; -use common_exception::Result; -use common_expression::types::BooleanType; -use common_expression::types::DataType; -use common_expression::Column; -use common_expression::DataBlock; -use common_expression::Evaluator; -use common_expression::FunctionContext; -use common_expression::RemoteExpr; -use common_expression::ScalarRef; -use common_functions::BUILTIN_FUNCTIONS; -use common_sql::executor::cast_expr_to_non_null_boolean; +use databend_common_exception::Result; +use databend_common_expression::types::BooleanType; +use databend_common_expression::types::DataType; +use databend_common_expression::Column; +use databend_common_expression::DataBlock; +use databend_common_expression::Evaluator; +use databend_common_expression::FunctionContext; +use databend_common_expression::RemoteExpr; +use databend_common_expression::ScalarRef; +use databend_common_functions::BUILTIN_FUNCTIONS; +use databend_common_sql::executor::cast_expr_to_non_null_boolean; pub fn filter_block(block: DataBlock, filter: &RemoteExpr) -> Result { let filter = filter.as_expr(&BUILTIN_FUNCTIONS); diff --git a/src/query/service/src/pipelines/processors/transforms/range_join/merge_join_state.rs b/src/query/service/src/pipelines/processors/transforms/range_join/merge_join_state.rs index b6356126ee46..1e34e36c5315 100644 --- a/src/query/service/src/pipelines/processors/transforms/range_join/merge_join_state.rs +++ b/src/query/service/src/pipelines/processors/transforms/range_join/merge_join_state.rs @@ -12,14 +12,14 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_exception::Result; -use common_expression::types::DataType; -use common_expression::types::NumberDataType; -use common_expression::types::NumberScalar; -use common_expression::DataBlock; -use common_expression::ScalarRef; -use common_expression::SortColumnDescription; -use common_functions::BUILTIN_FUNCTIONS; +use databend_common_exception::Result; +use databend_common_expression::types::DataType; +use databend_common_expression::types::NumberDataType; +use databend_common_expression::types::NumberScalar; +use databend_common_expression::DataBlock; +use databend_common_expression::ScalarRef; +use databend_common_expression::SortColumnDescription; +use databend_common_functions::BUILTIN_FUNCTIONS; use crate::pipelines::processors::transforms::range_join::filter_block; use crate::pipelines::processors::transforms::range_join::RangeJoinState; diff --git a/src/query/service/src/pipelines/processors/transforms/range_join/range_join_state.rs b/src/query/service/src/pipelines/processors/transforms/range_join/range_join_state.rs index 2cc7eb275cd4..bdc79cd0df38 100644 --- a/src/query/service/src/pipelines/processors/transforms/range_join/range_join_state.rs +++ b/src/query/service/src/pipelines/processors/transforms/range_join/range_join_state.rs @@ -16,21 +16,21 @@ use std::sync::atomic; use std::sync::atomic::AtomicU64; use std::sync::Arc; -use common_catalog::table_context::TableContext; -use common_exception::Result; -use common_expression::types::DataType; -use common_expression::types::NumberDataType; -use common_expression::types::NumberScalar; -use common_expression::ColumnBuilder; -use common_expression::DataBlock; -use common_expression::Evaluator; -use common_expression::FunctionContext; -use common_expression::RemoteExpr; -use common_expression::ScalarRef; -use common_functions::BUILTIN_FUNCTIONS; -use common_sql::executor::physical_plans::RangeJoin; -use common_sql::executor::physical_plans::RangeJoinCondition; -use common_sql::executor::physical_plans::RangeJoinType; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::Result; +use databend_common_expression::types::DataType; +use databend_common_expression::types::NumberDataType; +use databend_common_expression::types::NumberScalar; +use databend_common_expression::ColumnBuilder; +use databend_common_expression::DataBlock; +use databend_common_expression::Evaluator; +use databend_common_expression::FunctionContext; +use databend_common_expression::RemoteExpr; +use databend_common_expression::ScalarRef; +use databend_common_functions::BUILTIN_FUNCTIONS; +use databend_common_sql::executor::physical_plans::RangeJoin; +use databend_common_sql::executor::physical_plans::RangeJoinCondition; +use databend_common_sql::executor::physical_plans::RangeJoinType; use parking_lot::Mutex; use parking_lot::RwLock; diff --git a/src/query/service/src/pipelines/processors/transforms/range_join/transform_range_join.rs b/src/query/service/src/pipelines/processors/transforms/range_join/transform_range_join.rs index c020eb4817ad..b41aaafaf7ce 100644 --- a/src/query/service/src/pipelines/processors/transforms/range_join/transform_range_join.rs +++ b/src/query/service/src/pipelines/processors/transforms/range_join/transform_range_join.rs @@ -16,13 +16,13 @@ use std::any::Any; use std::collections::VecDeque; use std::sync::Arc; -use common_exception::Result; -use common_expression::DataBlock; -use common_pipeline_core::processors::Event; -use common_pipeline_core::processors::InputPort; -use common_pipeline_core::processors::OutputPort; -use common_pipeline_core::processors::Processor; -use common_pipeline_sinks::Sink; +use databend_common_exception::Result; +use databend_common_expression::DataBlock; +use databend_common_pipeline_core::processors::Event; +use databend_common_pipeline_core::processors::InputPort; +use databend_common_pipeline_core::processors::OutputPort; +use databend_common_pipeline_core::processors::Processor; +use databend_common_pipeline_sinks::Sink; use crate::pipelines::processors::transforms::range_join::RangeJoinState; diff --git a/src/query/service/src/pipelines/processors/transforms/transform_add_computed_columns.rs b/src/query/service/src/pipelines/processors/transforms/transform_add_computed_columns.rs index 46383dbd4f02..993d6007344f 100644 --- a/src/query/service/src/pipelines/processors/transforms/transform_add_computed_columns.rs +++ b/src/query/service/src/pipelines/processors/transforms/transform_add_computed_columns.rs @@ -14,20 +14,20 @@ use std::sync::Arc; -use common_catalog::table_context::TableContext; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::ComputedExpr; -use common_expression::DataBlock; -use common_expression::DataSchemaRef; -use common_expression::Expr; -use common_license::license::Feature::ComputedColumn; -use common_license::license_manager::get_license_manager; -use common_pipeline_transforms::processors::Transform; -use common_pipeline_transforms::processors::Transformer; -use common_sql::evaluator::BlockOperator; -use common_sql::evaluator::CompoundBlockOperator; -use common_sql::parse_computed_expr; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::ComputedExpr; +use databend_common_expression::DataBlock; +use databend_common_expression::DataSchemaRef; +use databend_common_expression::Expr; +use databend_common_license::license::Feature::ComputedColumn; +use databend_common_license::license_manager::get_license_manager; +use databend_common_pipeline_transforms::processors::Transform; +use databend_common_pipeline_transforms::processors::Transformer; +use databend_common_sql::evaluator::BlockOperator; +use databend_common_sql::evaluator::CompoundBlockOperator; +use databend_common_sql::parse_computed_expr; use crate::pipelines::processors::InputPort; use crate::pipelines::processors::OutputPort; diff --git a/src/query/service/src/pipelines/processors/transforms/transform_add_const_columns.rs b/src/query/service/src/pipelines/processors/transforms/transform_add_const_columns.rs index b422e75a4de6..29b050811e5d 100644 --- a/src/query/service/src/pipelines/processors/transforms/transform_add_const_columns.rs +++ b/src/query/service/src/pipelines/processors/transforms/transform_add_const_columns.rs @@ -14,16 +14,16 @@ use std::sync::Arc; -use common_catalog::table_context::TableContext; -use common_exception::Result; -use common_expression::DataBlock; -use common_expression::DataSchemaRef; -use common_expression::Expr; -use common_expression::Scalar as DataScalar; -use common_pipeline_transforms::processors::Transform; -use common_pipeline_transforms::processors::Transformer; -use common_sql::evaluator::BlockOperator; -use common_sql::evaluator::CompoundBlockOperator; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::Result; +use databend_common_expression::DataBlock; +use databend_common_expression::DataSchemaRef; +use databend_common_expression::Expr; +use databend_common_expression::Scalar as DataScalar; +use databend_common_pipeline_transforms::processors::Transform; +use databend_common_pipeline_transforms::processors::Transformer; +use databend_common_sql::evaluator::BlockOperator; +use databend_common_sql::evaluator::CompoundBlockOperator; use crate::pipelines::processors::InputPort; use crate::pipelines::processors::OutputPort; diff --git a/src/query/service/src/pipelines/processors/transforms/transform_add_internal_columns.rs b/src/query/service/src/pipelines/processors/transforms/transform_add_internal_columns.rs index bff8364ef990..eebb5ef0c2e0 100644 --- a/src/query/service/src/pipelines/processors/transforms/transform_add_internal_columns.rs +++ b/src/query/service/src/pipelines/processors/transforms/transform_add_internal_columns.rs @@ -15,19 +15,19 @@ use std::collections::BTreeMap; use std::sync::Arc; -use common_catalog::plan::InternalColumn; -use common_catalog::plan::InternalColumnMeta; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::BlockMetaInfoDowncast; -use common_expression::DataBlock; -use common_expression::FieldIndex; -use common_expression::CHANGE_ROW_ID_COLUMN_ID; -use common_pipeline_core::processors::InputPort; -use common_pipeline_core::processors::OutputPort; -use common_pipeline_core::processors::ProcessorPtr; -use common_pipeline_transforms::processors::Transform; -use common_pipeline_transforms::processors::Transformer; +use databend_common_catalog::plan::InternalColumn; +use databend_common_catalog::plan::InternalColumnMeta; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::BlockMetaInfoDowncast; +use databend_common_expression::DataBlock; +use databend_common_expression::FieldIndex; +use databend_common_expression::CHANGE_ROW_ID_COLUMN_ID; +use databend_common_pipeline_core::processors::InputPort; +use databend_common_pipeline_core::processors::OutputPort; +use databend_common_pipeline_core::processors::ProcessorPtr; +use databend_common_pipeline_transforms::processors::Transform; +use databend_common_pipeline_transforms::processors::Transformer; pub struct TransformAddInternalColumns { internal_columns: BTreeMap, diff --git a/src/query/service/src/pipelines/processors/transforms/transform_add_stream_columns.rs b/src/query/service/src/pipelines/processors/transforms/transform_add_stream_columns.rs index 1e52985e5618..4b1b1d706060 100644 --- a/src/query/service/src/pipelines/processors/transforms/transform_add_stream_columns.rs +++ b/src/query/service/src/pipelines/processors/transforms/transform_add_stream_columns.rs @@ -14,18 +14,18 @@ use std::sync::Arc; -use common_catalog::plan::StreamColumn; -use common_catalog::plan::StreamColumnMeta; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::BlockMetaInfoDowncast; -use common_expression::DataBlock; -use common_pipeline_core::processors::InputPort; -use common_pipeline_core::processors::OutputPort; -use common_pipeline_core::processors::ProcessorPtr; -use common_pipeline_transforms::processors::Transform; -use common_pipeline_transforms::processors::Transformer; -use common_sql::evaluator::CompoundBlockOperator; +use databend_common_catalog::plan::StreamColumn; +use databend_common_catalog::plan::StreamColumnMeta; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::BlockMetaInfoDowncast; +use databend_common_expression::DataBlock; +use databend_common_pipeline_core::processors::InputPort; +use databend_common_pipeline_core::processors::OutputPort; +use databend_common_pipeline_core::processors::ProcessorPtr; +use databend_common_pipeline_transforms::processors::Transform; +use databend_common_pipeline_transforms::processors::Transformer; +use databend_common_sql::evaluator::CompoundBlockOperator; pub struct TransformAddStreamColumns { expression_transform: CompoundBlockOperator, diff --git a/src/query/service/src/pipelines/processors/transforms/transform_cast_schema.rs b/src/query/service/src/pipelines/processors/transforms/transform_cast_schema.rs index 501a1a9b4b39..58b9a5b7e317 100644 --- a/src/query/service/src/pipelines/processors/transforms/transform_cast_schema.rs +++ b/src/query/service/src/pipelines/processors/transforms/transform_cast_schema.rs @@ -14,16 +14,16 @@ use std::sync::Arc; -use common_exception::Result; -use common_expression::BlockEntry; -use common_expression::DataBlock; -use common_expression::DataSchemaRef; -use common_expression::Evaluator; -use common_expression::Expr; -use common_expression::FunctionContext; -use common_functions::BUILTIN_FUNCTIONS; -use common_pipeline_transforms::processors::Transform; -use common_pipeline_transforms::processors::Transformer; +use databend_common_exception::Result; +use databend_common_expression::BlockEntry; +use databend_common_expression::DataBlock; +use databend_common_expression::DataSchemaRef; +use databend_common_expression::Evaluator; +use databend_common_expression::Expr; +use databend_common_expression::FunctionContext; +use databend_common_functions::BUILTIN_FUNCTIONS; +use databend_common_pipeline_transforms::processors::Transform; +use databend_common_pipeline_transforms::processors::Transformer; use crate::pipelines::processors::InputPort; use crate::pipelines::processors::OutputPort; diff --git a/src/query/service/src/pipelines/processors/transforms/transform_create_sets.rs b/src/query/service/src/pipelines/processors/transforms/transform_create_sets.rs index 781f250320d1..31843e52a486 100644 --- a/src/query/service/src/pipelines/processors/transforms/transform_create_sets.rs +++ b/src/query/service/src/pipelines/processors/transforms/transform_create_sets.rs @@ -15,13 +15,13 @@ use std::any::Any; use std::sync::Arc; -use common_base::base::tokio::sync::broadcast::Receiver; -use common_exception::Result; -use common_expression::BlockEntry; -use common_expression::DataBlock; -use common_expression::DataSchemaRef; -use common_expression::Scalar; -use common_expression::Value; +use databend_common_base::base::tokio::sync::broadcast::Receiver; +use databend_common_exception::Result; +use databend_common_expression::BlockEntry; +use databend_common_expression::DataBlock; +use databend_common_expression::DataSchemaRef; +use databend_common_expression::Scalar; +use databend_common_expression::Value; use crate::pipelines::processors::Event; use crate::pipelines::processors::InputPort; diff --git a/src/query/service/src/pipelines/processors/transforms/transform_filter.rs b/src/query/service/src/pipelines/processors/transforms/transform_filter.rs index 167fb84fa198..468743937bf9 100644 --- a/src/query/service/src/pipelines/processors/transforms/transform_filter.rs +++ b/src/query/service/src/pipelines/processors/transforms/transform_filter.rs @@ -14,18 +14,18 @@ use std::sync::Arc; -use common_catalog::plan::AggIndexMeta; -use common_exception::Result; -use common_expression::types::BooleanType; -use common_expression::BlockMetaInfoDowncast; -use common_expression::DataBlock; -use common_expression::Evaluator; -use common_expression::Expr; -use common_expression::FunctionContext; -use common_functions::BUILTIN_FUNCTIONS; -use common_pipeline_transforms::processors::BlockingTransform; -use common_pipeline_transforms::processors::BlockingTransformer; -use common_sql::optimizer::ColumnSet; +use databend_common_catalog::plan::AggIndexMeta; +use databend_common_exception::Result; +use databend_common_expression::types::BooleanType; +use databend_common_expression::BlockMetaInfoDowncast; +use databend_common_expression::DataBlock; +use databend_common_expression::Evaluator; +use databend_common_expression::Expr; +use databend_common_expression::FunctionContext; +use databend_common_functions::BUILTIN_FUNCTIONS; +use databend_common_pipeline_transforms::processors::BlockingTransform; +use databend_common_pipeline_transforms::processors::BlockingTransformer; +use databend_common_sql::optimizer::ColumnSet; use crate::pipelines::processors::InputPort; use crate::pipelines::processors::OutputPort; diff --git a/src/query/service/src/pipelines/processors/transforms/transform_limit.rs b/src/query/service/src/pipelines/processors/transforms/transform_limit.rs index 16fcd6511084..efb230c71768 100644 --- a/src/query/service/src/pipelines/processors/transforms/transform_limit.rs +++ b/src/query/service/src/pipelines/processors/transforms/transform_limit.rs @@ -15,8 +15,8 @@ use std::any::Any; use std::sync::Arc; -use common_exception::Result; -use common_expression::DataBlock; +use databend_common_exception::Result; +use databend_common_expression::DataBlock; use crate::pipelines::processors::Event; use crate::pipelines::processors::InputPort; diff --git a/src/query/service/src/pipelines/processors/transforms/transform_materialized_cte.rs b/src/query/service/src/pipelines/processors/transforms/transform_materialized_cte.rs index c3c272a7cf77..20bcea1686a5 100644 --- a/src/query/service/src/pipelines/processors/transforms/transform_materialized_cte.rs +++ b/src/query/service/src/pipelines/processors/transforms/transform_materialized_cte.rs @@ -14,17 +14,17 @@ use std::sync::Arc; -use common_base::base::tokio::sync::Notify; -use common_catalog::table_context::TableContext; -use common_exception::Result; -use common_expression::BlockEntry; -use common_expression::DataBlock; -use common_pipeline_core::processors::OutputPort; -use common_pipeline_core::processors::ProcessorPtr; -use common_pipeline_sinks::Sink; -use common_pipeline_sources::AsyncSource; -use common_pipeline_sources::AsyncSourcer; -use common_sql::IndexType; +use databend_common_base::base::tokio::sync::Notify; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::Result; +use databend_common_expression::BlockEntry; +use databend_common_expression::DataBlock; +use databend_common_pipeline_core::processors::OutputPort; +use databend_common_pipeline_core::processors::ProcessorPtr; +use databend_common_pipeline_sinks::Sink; +use databend_common_pipeline_sources::AsyncSource; +use databend_common_pipeline_sources::AsyncSourcer; +use databend_common_sql::IndexType; use parking_lot::Mutex; use parking_lot::RwLock; diff --git a/src/query/service/src/pipelines/processors/transforms/transform_merge_block.rs b/src/query/service/src/pipelines/processors/transforms/transform_merge_block.rs index 36b109a52efc..a2735d9131c9 100644 --- a/src/query/service/src/pipelines/processors/transforms/transform_merge_block.rs +++ b/src/query/service/src/pipelines/processors/transforms/transform_merge_block.rs @@ -16,17 +16,17 @@ use std::any::Any; use std::sync::Arc; use async_channel::Receiver; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::BlockEntry; -use common_expression::ColumnBuilder; -use common_expression::DataBlock; -use common_expression::DataSchemaRef; -use common_expression::Value; -use common_pipeline_core::processors::Event; -use common_pipeline_core::processors::InputPort; -use common_pipeline_core::processors::OutputPort; -use common_pipeline_core::processors::Processor; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::BlockEntry; +use databend_common_expression::ColumnBuilder; +use databend_common_expression::DataBlock; +use databend_common_expression::DataSchemaRef; +use databend_common_expression::Value; +use databend_common_pipeline_core::processors::Event; +use databend_common_pipeline_core::processors::InputPort; +use databend_common_pipeline_core::processors::OutputPort; +use databend_common_pipeline_core::processors::Processor; pub struct TransformMergeBlock { finished: bool, diff --git a/src/query/service/src/pipelines/processors/transforms/transform_resort_addon.rs b/src/query/service/src/pipelines/processors/transforms/transform_resort_addon.rs index b83eab8b743f..99285b5c2599 100644 --- a/src/query/service/src/pipelines/processors/transforms/transform_resort_addon.rs +++ b/src/query/service/src/pipelines/processors/transforms/transform_resort_addon.rs @@ -14,13 +14,13 @@ use std::sync::Arc; -use common_exception::Result; -use common_expression::DataBlock; -use common_expression::DataSchemaRef; -use common_pipeline_transforms::processors::Transform; -use common_pipeline_transforms::processors::Transformer; -use common_sql::evaluator::CompoundBlockOperator; -use common_storages_factory::Table; +use databend_common_exception::Result; +use databend_common_expression::DataBlock; +use databend_common_expression::DataSchemaRef; +use databend_common_pipeline_transforms::processors::Transform; +use databend_common_pipeline_transforms::processors::Transformer; +use databend_common_sql::evaluator::CompoundBlockOperator; +use databend_common_storages_factory::Table; use super::transform_resort_addon_without_source_schema::build_expression_transform; use crate::pipelines::processors::InputPort; diff --git a/src/query/service/src/pipelines/processors/transforms/transform_resort_addon_without_source_schema.rs b/src/query/service/src/pipelines/processors/transforms/transform_resort_addon_without_source_schema.rs index 78c3042275a8..a5191cc01654 100644 --- a/src/query/service/src/pipelines/processors/transforms/transform_resort_addon_without_source_schema.rs +++ b/src/query/service/src/pipelines/processors/transforms/transform_resort_addon_without_source_schema.rs @@ -14,20 +14,20 @@ use std::sync::Arc; -use common_catalog::table_context::TableContext; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::BlockMetaInfoDowncast; -use common_expression::DataBlock; -use common_expression::DataSchemaRef; -use common_expression::Expr; -use common_expression::Scalar; -use common_pipeline_transforms::processors::Transform; -use common_pipeline_transforms::processors::Transformer; -use common_sql::evaluator::BlockOperator; -use common_sql::evaluator::CompoundBlockOperator; -use common_sql::parse_exprs; -use common_storages_factory::Table; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::BlockMetaInfoDowncast; +use databend_common_expression::DataBlock; +use databend_common_expression::DataSchemaRef; +use databend_common_expression::Expr; +use databend_common_expression::Scalar; +use databend_common_pipeline_transforms::processors::Transform; +use databend_common_pipeline_transforms::processors::Transformer; +use databend_common_sql::evaluator::BlockOperator; +use databend_common_sql::evaluator::CompoundBlockOperator; +use databend_common_sql::parse_exprs; +use databend_common_storages_factory::Table; use crate::pipelines::processors::InputPort; use crate::pipelines::processors::OutputPort; diff --git a/src/query/service/src/pipelines/processors/transforms/transform_runtime_cast_schema.rs b/src/query/service/src/pipelines/processors/transforms/transform_runtime_cast_schema.rs index f58bfe25e422..cb75e6492a05 100644 --- a/src/query/service/src/pipelines/processors/transforms/transform_runtime_cast_schema.rs +++ b/src/query/service/src/pipelines/processors/transforms/transform_runtime_cast_schema.rs @@ -14,16 +14,16 @@ use std::sync::Arc; -use common_exception::Result; -use common_expression::BlockEntry; -use common_expression::DataBlock; -use common_expression::DataSchemaRef; -use common_expression::Evaluator; -use common_expression::Expr; -use common_expression::FunctionContext; -use common_functions::BUILTIN_FUNCTIONS; -use common_pipeline_transforms::processors::Transform; -use common_pipeline_transforms::processors::Transformer; +use databend_common_exception::Result; +use databend_common_expression::BlockEntry; +use databend_common_expression::DataBlock; +use databend_common_expression::DataSchemaRef; +use databend_common_expression::Evaluator; +use databend_common_expression::Expr; +use databend_common_expression::FunctionContext; +use databend_common_functions::BUILTIN_FUNCTIONS; +use databend_common_pipeline_transforms::processors::Transform; +use databend_common_pipeline_transforms::processors::Transformer; use crate::pipelines::processors::InputPort; use crate::pipelines::processors::OutputPort; diff --git a/src/query/service/src/pipelines/processors/transforms/transform_sort_spill.rs b/src/query/service/src/pipelines/processors/transforms/transform_sort_spill.rs index e6df25e4ee6f..4b1f6b42d92c 100644 --- a/src/query/service/src/pipelines/processors/transforms/transform_sort_spill.rs +++ b/src/query/service/src/pipelines/processors/transforms/transform_sort_spill.rs @@ -20,36 +20,36 @@ use std::marker::PhantomData; use std::sync::Arc; use std::time::Instant; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::types::DataType; -use common_expression::types::NumberDataType; -use common_expression::types::NumberType; -use common_expression::with_number_mapped_type; -use common_expression::BlockMetaInfoDowncast; -use common_expression::DataBlock; -use common_expression::DataSchemaRef; -use common_expression::SortColumnDescription; -use common_metrics::transform::metrics_inc_sort_spill_read_bytes; -use common_metrics::transform::metrics_inc_sort_spill_read_count; -use common_metrics::transform::metrics_inc_sort_spill_read_milliseconds; -use common_metrics::transform::metrics_inc_sort_spill_write_bytes; -use common_metrics::transform::metrics_inc_sort_spill_write_count; -use common_metrics::transform::metrics_inc_sort_spill_write_milliseconds; -use common_pipeline_core::processors::Event; -use common_pipeline_core::processors::InputPort; -use common_pipeline_core::processors::OutputPort; -use common_pipeline_core::processors::Processor; -use common_pipeline_transforms::processors::sort::utils::find_bigger_child_of_root; -use common_pipeline_transforms::processors::sort::CommonRows; -use common_pipeline_transforms::processors::sort::Cursor; -use common_pipeline_transforms::processors::sort::DateRows; -use common_pipeline_transforms::processors::sort::Rows; -use common_pipeline_transforms::processors::sort::SimpleRows; -use common_pipeline_transforms::processors::sort::SortSpillMeta; -use common_pipeline_transforms::processors::sort::SortSpillMetaWithParams; -use common_pipeline_transforms::processors::sort::StringRows; -use common_pipeline_transforms::processors::sort::TimestampRows; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::types::DataType; +use databend_common_expression::types::NumberDataType; +use databend_common_expression::types::NumberType; +use databend_common_expression::with_number_mapped_type; +use databend_common_expression::BlockMetaInfoDowncast; +use databend_common_expression::DataBlock; +use databend_common_expression::DataSchemaRef; +use databend_common_expression::SortColumnDescription; +use databend_common_metrics::transform::metrics_inc_sort_spill_read_bytes; +use databend_common_metrics::transform::metrics_inc_sort_spill_read_count; +use databend_common_metrics::transform::metrics_inc_sort_spill_read_milliseconds; +use databend_common_metrics::transform::metrics_inc_sort_spill_write_bytes; +use databend_common_metrics::transform::metrics_inc_sort_spill_write_count; +use databend_common_metrics::transform::metrics_inc_sort_spill_write_milliseconds; +use databend_common_pipeline_core::processors::Event; +use databend_common_pipeline_core::processors::InputPort; +use databend_common_pipeline_core::processors::OutputPort; +use databend_common_pipeline_core::processors::Processor; +use databend_common_pipeline_transforms::processors::sort::utils::find_bigger_child_of_root; +use databend_common_pipeline_transforms::processors::sort::CommonRows; +use databend_common_pipeline_transforms::processors::sort::Cursor; +use databend_common_pipeline_transforms::processors::sort::DateRows; +use databend_common_pipeline_transforms::processors::sort::Rows; +use databend_common_pipeline_transforms::processors::sort::SimpleRows; +use databend_common_pipeline_transforms::processors::sort::SortSpillMeta; +use databend_common_pipeline_transforms::processors::sort::SortSpillMetaWithParams; +use databend_common_pipeline_transforms::processors::sort::StringRows; +use databend_common_pipeline_transforms::processors::sort::TimestampRows; use crate::spillers::Spiller; @@ -598,21 +598,21 @@ pub fn create_transform_sort_spill( mod tests { use std::sync::Arc; - use common_base::base::tokio; - use common_exception::Result; - use common_expression::block_debug::pretty_format_blocks; - use common_expression::types::DataType; - use common_expression::types::Int32Type; - use common_expression::types::NumberDataType; - use common_expression::DataBlock; - use common_expression::DataField; - use common_expression::DataSchemaRefExt; - use common_expression::FromData; - use common_expression::SortColumnDescription; - use common_pipeline_core::processors::InputPort; - use common_pipeline_core::processors::OutputPort; - use common_pipeline_transforms::processors::sort::SimpleRows; - use common_storage::DataOperator; + use databend_common_base::base::tokio; + use databend_common_exception::Result; + use databend_common_expression::block_debug::pretty_format_blocks; + use databend_common_expression::types::DataType; + use databend_common_expression::types::Int32Type; + use databend_common_expression::types::NumberDataType; + use databend_common_expression::DataBlock; + use databend_common_expression::DataField; + use databend_common_expression::DataSchemaRefExt; + use databend_common_expression::FromData; + use databend_common_expression::SortColumnDescription; + use databend_common_pipeline_core::processors::InputPort; + use databend_common_pipeline_core::processors::OutputPort; + use databend_common_pipeline_transforms::processors::sort::SimpleRows; + use databend_common_storage::DataOperator; use itertools::Itertools; use rand::rngs::ThreadRng; use rand::Rng; diff --git a/src/query/service/src/pipelines/processors/transforms/transform_srf.rs b/src/query/service/src/pipelines/processors/transforms/transform_srf.rs index 9ffb84f306f7..69ffe7f71a91 100644 --- a/src/query/service/src/pipelines/processors/transforms/transform_srf.rs +++ b/src/query/service/src/pipelines/processors/transforms/transform_srf.rs @@ -15,27 +15,27 @@ use std::collections::VecDeque; use std::sync::Arc; -use common_exception::Result; -use common_expression::types::nullable::NullableColumnBuilder; -use common_expression::types::AnyType; -use common_expression::types::DataType; -use common_expression::types::VariantType; -use common_expression::BlockEntry; -use common_expression::Column; -use common_expression::ColumnBuilder; -use common_expression::DataBlock; -use common_expression::Evaluator; -use common_expression::Expr; -use common_expression::FunctionContext; -use common_expression::ScalarRef; -use common_expression::Value; -use common_functions::BUILTIN_FUNCTIONS; -use common_pipeline_core::processors::InputPort; -use common_pipeline_core::processors::OutputPort; -use common_pipeline_core::processors::Processor; -use common_pipeline_transforms::processors::BlockingTransform; -use common_pipeline_transforms::processors::BlockingTransformer; -use common_sql::ColumnSet; +use databend_common_exception::Result; +use databend_common_expression::types::nullable::NullableColumnBuilder; +use databend_common_expression::types::AnyType; +use databend_common_expression::types::DataType; +use databend_common_expression::types::VariantType; +use databend_common_expression::BlockEntry; +use databend_common_expression::Column; +use databend_common_expression::ColumnBuilder; +use databend_common_expression::DataBlock; +use databend_common_expression::Evaluator; +use databend_common_expression::Expr; +use databend_common_expression::FunctionContext; +use databend_common_expression::ScalarRef; +use databend_common_expression::Value; +use databend_common_functions::BUILTIN_FUNCTIONS; +use databend_common_pipeline_core::processors::InputPort; +use databend_common_pipeline_core::processors::OutputPort; +use databend_common_pipeline_core::processors::Processor; +use databend_common_pipeline_transforms::processors::BlockingTransform; +use databend_common_pipeline_transforms::processors::BlockingTransformer; +use databend_common_sql::ColumnSet; /// Expand the input [`DataBlock`] with set-returning functions. pub struct TransformSRF { diff --git a/src/query/service/src/pipelines/processors/transforms/transform_udf.rs b/src/query/service/src/pipelines/processors/transforms/transform_udf.rs index 05a6c11640b9..d60d2f8a8bcd 100644 --- a/src/query/service/src/pipelines/processors/transforms/transform_udf.rs +++ b/src/query/service/src/pipelines/processors/transforms/transform_udf.rs @@ -14,19 +14,19 @@ use std::sync::Arc; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::udf_client::UDFFlightClient; -use common_expression::variant_transform::contains_variant; -use common_expression::variant_transform::transform_variant; -use common_expression::BlockEntry; -use common_expression::DataBlock; -use common_expression::DataField; -use common_expression::DataSchema; -use common_expression::FunctionContext; -use common_pipeline_transforms::processors::AsyncTransform; -use common_pipeline_transforms::processors::AsyncTransformer; -use common_sql::executor::physical_plans::UdfFunctionDesc; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::udf_client::UDFFlightClient; +use databend_common_expression::variant_transform::contains_variant; +use databend_common_expression::variant_transform::transform_variant; +use databend_common_expression::BlockEntry; +use databend_common_expression::DataBlock; +use databend_common_expression::DataField; +use databend_common_expression::DataSchema; +use databend_common_expression::FunctionContext; +use databend_common_pipeline_transforms::processors::AsyncTransform; +use databend_common_pipeline_transforms::processors::AsyncTransformer; +use databend_common_sql::executor::physical_plans::UdfFunctionDesc; use crate::pipelines::processors::InputPort; use crate::pipelines::processors::OutputPort; diff --git a/src/query/service/src/pipelines/processors/transforms/window/frame_bound.rs b/src/query/service/src/pipelines/processors/transforms/window/frame_bound.rs index 49fa853066b6..3c3e3d118895 100644 --- a/src/query/service/src/pipelines/processors/transforms/window/frame_bound.rs +++ b/src/query/service/src/pipelines/processors/transforms/window/frame_bound.rs @@ -14,11 +14,11 @@ use std::cmp::Ordering; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::types::Number; -use common_expression::Scalar; -use common_sql::plans::WindowFuncFrameBound; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::types::Number; +use databend_common_expression::Scalar; +use databend_common_sql::plans::WindowFuncFrameBound; #[derive(Debug, PartialEq)] pub enum FrameBound { diff --git a/src/query/service/src/pipelines/processors/transforms/window/transform_window.rs b/src/query/service/src/pipelines/processors/transforms/window/transform_window.rs index 1353b215d2de..5b83a0fcf724 100644 --- a/src/query/service/src/pipelines/processors/transforms/window/transform_window.rs +++ b/src/query/service/src/pipelines/processors/transforms/window/transform_window.rs @@ -21,24 +21,24 @@ use std::cmp::Ordering; use std::collections::VecDeque; use std::sync::Arc; -use common_exception::Result; -use common_expression::arithmetics_type::ResultTypeOfUnary; -use common_expression::types::Number; -use common_expression::types::NumberScalar; -use common_expression::BlockEntry; -use common_expression::Column; -use common_expression::ColumnBuilder; -use common_expression::DataBlock; -use common_expression::Scalar; -use common_expression::ScalarRef; -use common_expression::SortColumnDescription; -use common_expression::Value; -use common_pipeline_core::processors::Event; -use common_pipeline_core::processors::InputPort; -use common_pipeline_core::processors::OutputPort; -use common_pipeline_core::processors::Processor; -use common_sql::executor::physical_plans::LagLeadDefault; -use common_sql::plans::WindowFuncFrameUnits; +use databend_common_exception::Result; +use databend_common_expression::arithmetics_type::ResultTypeOfUnary; +use databend_common_expression::types::Number; +use databend_common_expression::types::NumberScalar; +use databend_common_expression::BlockEntry; +use databend_common_expression::Column; +use databend_common_expression::ColumnBuilder; +use databend_common_expression::DataBlock; +use databend_common_expression::Scalar; +use databend_common_expression::ScalarRef; +use databend_common_expression::SortColumnDescription; +use databend_common_expression::Value; +use databend_common_pipeline_core::processors::Event; +use databend_common_pipeline_core::processors::InputPort; +use databend_common_pipeline_core::processors::OutputPort; +use databend_common_pipeline_core::processors::Processor; +use databend_common_sql::executor::physical_plans::LagLeadDefault; +use databend_common_sql::plans::WindowFuncFrameUnits; use super::frame_bound::FrameBound; use super::window_function::WindowFuncAggImpl; @@ -1240,23 +1240,23 @@ where T: Number + ResultTypeOfUnary mod tests { use std::sync::Arc; - use common_base::base::tokio; - use common_exception::Result; - use common_expression::block_debug::assert_blocks_eq; - use common_expression::types::DataType; - use common_expression::types::Int32Type; - use common_expression::types::NumberDataType; - use common_expression::Column; - use common_expression::ColumnBuilder; - use common_expression::DataBlock; - use common_expression::FromData; - use common_functions::aggregates::AggregateFunctionFactory; - use common_pipeline_core::processors::connect; - use common_pipeline_core::processors::Event; - use common_pipeline_core::processors::InputPort; - use common_pipeline_core::processors::OutputPort; - use common_pipeline_core::processors::Processor; - use common_sql::plans::WindowFuncFrameUnits; + use databend_common_base::base::tokio; + use databend_common_exception::Result; + use databend_common_expression::block_debug::assert_blocks_eq; + use databend_common_expression::types::DataType; + use databend_common_expression::types::Int32Type; + use databend_common_expression::types::NumberDataType; + use databend_common_expression::Column; + use databend_common_expression::ColumnBuilder; + use databend_common_expression::DataBlock; + use databend_common_expression::FromData; + use databend_common_functions::aggregates::AggregateFunctionFactory; + use databend_common_pipeline_core::processors::connect; + use databend_common_pipeline_core::processors::Event; + use databend_common_pipeline_core::processors::InputPort; + use databend_common_pipeline_core::processors::OutputPort; + use databend_common_pipeline_core::processors::Processor; + use databend_common_sql::plans::WindowFuncFrameUnits; use super::TransformWindow; use super::WindowBlock; diff --git a/src/query/service/src/pipelines/processors/transforms/window/window_function.rs b/src/query/service/src/pipelines/processors/transforms/window/window_function.rs index 4de4c0069d3e..3187b64ccf3c 100644 --- a/src/query/service/src/pipelines/processors/transforms/window/window_function.rs +++ b/src/query/service/src/pipelines/processors/transforms/window/window_function.rs @@ -14,19 +14,19 @@ use std::sync::Arc; -use common_exception::Result; -use common_expression::types::DataType; -use common_expression::types::NumberDataType; -use common_expression::Column; -use common_expression::ColumnBuilder; -use common_expression::DataBlock; -use common_expression::DataSchema; -use common_functions::aggregates::get_layout_offsets; -use common_functions::aggregates::AggregateFunction; -use common_functions::aggregates::AggregateFunctionFactory; -use common_functions::aggregates::StateAddr; -use common_sql::executor::physical_plans::LagLeadDefault; -use common_sql::executor::physical_plans::WindowFunction; +use databend_common_exception::Result; +use databend_common_expression::types::DataType; +use databend_common_expression::types::NumberDataType; +use databend_common_expression::Column; +use databend_common_expression::ColumnBuilder; +use databend_common_expression::DataBlock; +use databend_common_expression::DataSchema; +use databend_common_functions::aggregates::get_layout_offsets; +use databend_common_functions::aggregates::AggregateFunction; +use databend_common_functions::aggregates::AggregateFunctionFactory; +use databend_common_functions::aggregates::StateAddr; +use databend_common_sql::executor::physical_plans::LagLeadDefault; +use databend_common_sql::executor::physical_plans::WindowFunction; use crate::pipelines::processors::transforms::group_by::Area; diff --git a/src/query/service/src/schedulers/fragments/fragmenter.rs b/src/query/service/src/schedulers/fragments/fragmenter.rs index f1f6648a1609..40ee0d081a5b 100644 --- a/src/query/service/src/schedulers/fragments/fragmenter.rs +++ b/src/query/service/src/schedulers/fragments/fragmenter.rs @@ -14,23 +14,23 @@ use std::sync::Arc; -use common_catalog::table_context::TableContext; -use common_exception::Result; -use common_sql::executor::physical_plans::CompactSource; -use common_sql::executor::physical_plans::CopyIntoTable; -use common_sql::executor::physical_plans::CopyIntoTableSource; -use common_sql::executor::physical_plans::DeleteSource; -use common_sql::executor::physical_plans::Exchange; -use common_sql::executor::physical_plans::ExchangeSink; -use common_sql::executor::physical_plans::ExchangeSource; -use common_sql::executor::physical_plans::FragmentKind; -use common_sql::executor::physical_plans::HashJoin; -use common_sql::executor::physical_plans::MergeInto; -use common_sql::executor::physical_plans::QuerySource; -use common_sql::executor::physical_plans::ReclusterSource; -use common_sql::executor::physical_plans::ReplaceInto; -use common_sql::executor::physical_plans::TableScan; -use common_sql::executor::PhysicalPlanReplacer; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::Result; +use databend_common_sql::executor::physical_plans::CompactSource; +use databend_common_sql::executor::physical_plans::CopyIntoTable; +use databend_common_sql::executor::physical_plans::CopyIntoTableSource; +use databend_common_sql::executor::physical_plans::DeleteSource; +use databend_common_sql::executor::physical_plans::Exchange; +use databend_common_sql::executor::physical_plans::ExchangeSink; +use databend_common_sql::executor::physical_plans::ExchangeSource; +use databend_common_sql::executor::physical_plans::FragmentKind; +use databend_common_sql::executor::physical_plans::HashJoin; +use databend_common_sql::executor::physical_plans::MergeInto; +use databend_common_sql::executor::physical_plans::QuerySource; +use databend_common_sql::executor::physical_plans::ReclusterSource; +use databend_common_sql::executor::physical_plans::ReplaceInto; +use databend_common_sql::executor::physical_plans::TableScan; +use databend_common_sql::executor::PhysicalPlanReplacer; use crate::api::BroadcastExchange; use crate::api::DataExchange; diff --git a/src/query/service/src/schedulers/fragments/plan_fragment.rs b/src/query/service/src/schedulers/fragments/plan_fragment.rs index 2d2d018095fe..7d749968fde5 100644 --- a/src/query/service/src/schedulers/fragments/plan_fragment.rs +++ b/src/query/service/src/schedulers/fragments/plan_fragment.rs @@ -15,24 +15,24 @@ use std::collections::HashMap; use std::sync::Arc; -use common_catalog::plan::DataSourcePlan; -use common_catalog::plan::Partitions; -use common_exception::ErrorCode; -use common_exception::Result; -use common_settings::ReplaceIntoShuffleStrategy; -use common_sql::executor::physical_plans::CompactSource; -use common_sql::executor::physical_plans::CopyIntoTable; -use common_sql::executor::physical_plans::CopyIntoTableSource; -use common_sql::executor::physical_plans::DeleteSource; -use common_sql::executor::physical_plans::QuerySource; -use common_sql::executor::physical_plans::ReclusterSource; -use common_sql::executor::physical_plans::ReclusterTask; -use common_sql::executor::physical_plans::ReplaceDeduplicate; -use common_sql::executor::physical_plans::ReplaceInto; -use common_sql::executor::physical_plans::TableScan; -use common_storages_fuse::TableContext; -use storages_common_table_meta::meta::BlockSlotDescription; -use storages_common_table_meta::meta::Location; +use databend_common_catalog::plan::DataSourcePlan; +use databend_common_catalog::plan::Partitions; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_settings::ReplaceIntoShuffleStrategy; +use databend_common_sql::executor::physical_plans::CompactSource; +use databend_common_sql::executor::physical_plans::CopyIntoTable; +use databend_common_sql::executor::physical_plans::CopyIntoTableSource; +use databend_common_sql::executor::physical_plans::DeleteSource; +use databend_common_sql::executor::physical_plans::QuerySource; +use databend_common_sql::executor::physical_plans::ReclusterSource; +use databend_common_sql::executor::physical_plans::ReclusterTask; +use databend_common_sql::executor::physical_plans::ReplaceDeduplicate; +use databend_common_sql::executor::physical_plans::ReplaceInto; +use databend_common_sql::executor::physical_plans::TableScan; +use databend_common_storages_fuse::TableContext; +use databend_storages_common_table_meta::meta::BlockSlotDescription; +use databend_storages_common_table_meta::meta::Location; use crate::api::DataExchange; use crate::schedulers::Fragmenter; diff --git a/src/query/service/src/schedulers/fragments/query_fragment_actions.rs b/src/query/service/src/schedulers/fragments/query_fragment_actions.rs index b6cddd563ce2..0884578eef5b 100644 --- a/src/query/service/src/schedulers/fragments/query_fragment_actions.rs +++ b/src/query/service/src/schedulers/fragments/query_fragment_actions.rs @@ -18,10 +18,10 @@ use std::fmt::Debug; use std::fmt::Formatter; use std::sync::Arc; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::DataSchemaRef; -use common_meta_types::NodeInfo; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::DataSchemaRef; +use databend_common_meta_types::NodeInfo; use itertools::Itertools; use crate::api::ConnectionInfo; diff --git a/src/query/service/src/schedulers/fragments/query_fragment_actions_display.rs b/src/query/service/src/schedulers/fragments/query_fragment_actions_display.rs index 8b73627cb084..647bd1b2ba0a 100644 --- a/src/query/service/src/schedulers/fragments/query_fragment_actions_display.rs +++ b/src/query/service/src/schedulers/fragments/query_fragment_actions_display.rs @@ -15,8 +15,8 @@ use std::fmt::Display; use std::fmt::Formatter; -use common_profile::SharedProcessorProfiles; -use common_sql::MetadataRef; +use databend_common_profile::SharedProcessorProfiles; +use databend_common_sql::MetadataRef; use crate::api::DataExchange; use crate::schedulers::QueryFragmentActions; diff --git a/src/query/service/src/schedulers/scheduler.rs b/src/query/service/src/schedulers/scheduler.rs index 5aec6e3abcb1..dd1830218e7c 100644 --- a/src/query/service/src/schedulers/scheduler.rs +++ b/src/query/service/src/schedulers/scheduler.rs @@ -14,8 +14,8 @@ use std::sync::Arc; -use common_exception::Result; -use common_profile::SharedProcessorProfiles; +use databend_common_exception::Result; +use databend_common_profile::SharedProcessorProfiles; use crate::pipelines::PipelineBuildResult; use crate::pipelines::PipelineBuilder; diff --git a/src/query/service/src/servers/federated_helper.rs b/src/query/service/src/servers/federated_helper.rs index 4163e94d62f4..6e6a102deb44 100644 --- a/src/query/service/src/servers/federated_helper.rs +++ b/src/query/service/src/servers/federated_helper.rs @@ -14,9 +14,9 @@ // The servers module used for external communication with user, such as MySQL wired protocol, etc. -use common_expression::DataBlock; -use common_expression::TableSchemaRef; -use common_expression::TableSchemaRefExt; +use databend_common_expression::DataBlock; +use databend_common_expression::TableSchemaRef; +use databend_common_expression::TableSchemaRefExt; use regex::Regex; pub type LazyBlockFunc = fn(&str) -> Option<(TableSchemaRef, DataBlock)>; diff --git a/src/query/service/src/servers/flight_sql/flight_sql_server.rs b/src/query/service/src/servers/flight_sql/flight_sql_server.rs index dae063330579..49ee4e5777a7 100644 --- a/src/query/service/src/servers/flight_sql/flight_sql_server.rs +++ b/src/query/service/src/servers/flight_sql/flight_sql_server.rs @@ -17,11 +17,11 @@ use std::net::SocketAddr; use std::sync::Arc; use arrow_flight::flight_service_server::FlightServiceServer; -use common_base::base::tokio; -use common_base::base::tokio::sync::Notify; -use common_config::InnerConfig; -use common_exception::ErrorCode; -use common_exception::Result; +use databend_common_base::base::tokio; +use databend_common_base::base::tokio::sync::Notify; +use databend_common_config::InnerConfig; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; use log::info; use tonic::transport::server::TcpIncoming; use tonic::transport::Identity; diff --git a/src/query/service/src/servers/flight_sql/flight_sql_service/catalog.rs b/src/query/service/src/servers/flight_sql/flight_sql_service/catalog.rs index 5068823a4a26..f9dfe0621606 100644 --- a/src/query/service/src/servers/flight_sql/flight_sql_service/catalog.rs +++ b/src/query/service/src/servers/flight_sql/flight_sql_service/catalog.rs @@ -21,10 +21,10 @@ use arrow_flight::utils::batches_to_flight_data; use arrow_schema::DataType; use arrow_schema::Field; use arrow_schema::Schema; -use common_catalog::catalog::Catalog; -use common_catalog::catalog::CatalogManager; -use common_catalog::table_context::TableContext; -use common_exception::ErrorCode; +use databend_common_catalog::catalog::Catalog; +use databend_common_catalog::catalog::CatalogManager; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::ErrorCode; use futures_util::stream; use log::warn; use tonic::Status; @@ -49,7 +49,8 @@ impl CatalogInfoProvider { ctx: Arc, catalog_name: Option, database_name: Option, - ) -> common_exception::Result<(Vec, Vec, Vec, Vec)> { + ) -> databend_common_exception::Result<(Vec, Vec, Vec, Vec)> + { let tenant = ctx.get_tenant(); let catalog_mgr = CatalogManager::instance(); let catalogs: Vec<(String, Arc)> = if let Some(catalog_name) = catalog_name { diff --git a/src/query/service/src/servers/flight_sql/flight_sql_service/mod.rs b/src/query/service/src/servers/flight_sql/flight_sql_service/mod.rs index d88a6174dd97..1b69debfa239 100644 --- a/src/query/service/src/servers/flight_sql/flight_sql_service/mod.rs +++ b/src/query/service/src/servers/flight_sql/flight_sql_service/mod.rs @@ -25,9 +25,9 @@ use std::sync::Arc; use arrow_flight::FlightData; use catalog::CatalogInfoProvider; -use common_sql::plans::Plan; -use common_sql::PlanExtras; use dashmap::DashMap; +use databend_common_sql::plans::Plan; +use databend_common_sql::PlanExtras; use futures::Stream; use parking_lot::Mutex; use sql_info::SqlInfoProvider; diff --git a/src/query/service/src/servers/flight_sql/flight_sql_service/query.rs b/src/query/service/src/servers/flight_sql/flight_sql_service/query.rs index ad68fb5a409c..99a56cfbd17a 100644 --- a/src/query/service/src/servers/flight_sql/flight_sql_service/query.rs +++ b/src/query/service/src/servers/flight_sql/flight_sql_service/query.rs @@ -21,15 +21,15 @@ use arrow_flight::SchemaAsIpc; use arrow_ipc::writer; use arrow_ipc::writer::IpcWriteOptions; use arrow_schema::Schema as ArrowSchema; -use common_base::base::tokio; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::DataBlock; -use common_expression::DataSchema; -use common_sql::plans::Plan; -use common_sql::PlanExtras; -use common_sql::Planner; -use common_storages_fuse::TableContext; +use databend_common_base::base::tokio; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::DataBlock; +use databend_common_expression::DataSchema; +use databend_common_sql::plans::Plan; +use databend_common_sql::PlanExtras; +use databend_common_sql::Planner; +use databend_common_storages_fuse::TableContext; use futures::Stream; use futures::StreamExt; use serde::Deserialize; diff --git a/src/query/service/src/servers/flight_sql/flight_sql_service/service.rs b/src/query/service/src/servers/flight_sql/flight_sql_service/service.rs index 746769d820fe..96b7f7e27eae 100644 --- a/src/query/service/src/servers/flight_sql/flight_sql_service/service.rs +++ b/src/query/service/src/servers/flight_sql/flight_sql_service/service.rs @@ -64,9 +64,9 @@ use arrow_flight::PutResult; use arrow_flight::SchemaAsIpc; use arrow_flight::Ticket; use arrow_ipc::writer::IpcWriteOptions; -use common_base::base::uuid::Uuid; -use common_exception::Result; -use common_expression::DataSchema; +use databend_common_base::base::uuid::Uuid; +use databend_common_exception::Result; +use databend_common_expression::DataSchema; use futures::Stream; use log::info; use prost::Message; diff --git a/src/query/service/src/servers/flight_sql/flight_sql_service/session.rs b/src/query/service/src/servers/flight_sql/flight_sql_service/session.rs index 272a52384a5d..542afeb4aa11 100644 --- a/src/query/service/src/servers/flight_sql/flight_sql_service/session.rs +++ b/src/query/service/src/servers/flight_sql/flight_sql_service/session.rs @@ -16,9 +16,9 @@ use std::sync::Arc; use base64::prelude::BASE64_STANDARD; use base64::Engine; -use common_meta_app::principal::AuthInfo; -use common_meta_app::principal::UserIdentity; -use common_users::UserApiProvider; +use databend_common_meta_app::principal::AuthInfo; +use databend_common_meta_app::principal::UserIdentity; +use databend_common_users::UserApiProvider; use tonic::metadata::MetadataMap; use tonic::Request; use tonic::Status; diff --git a/src/query/service/src/servers/http/clickhouse_handler.rs b/src/query/service/src/servers/http/clickhouse_handler.rs index eea72f135d08..23a278010e75 100644 --- a/src/query/service/src/servers/http/clickhouse_handler.rs +++ b/src/query/service/src/servers/http/clickhouse_handler.rs @@ -16,24 +16,24 @@ use std::collections::HashMap; use std::sync::Arc; use async_stream::stream; -use common_base::base::tokio; -use common_base::base::tokio::sync::mpsc::Sender; -use common_base::base::tokio::task::JoinHandle; -use common_base::runtime::TrySpawn; -use common_compress::CompressAlgorithm; -use common_exception::ErrorCode; -use common_exception::Result; -use common_exception::ToErrorCode; -use common_expression::infer_table_schema; -use common_expression::DataSchemaRef; -use common_formats::ClickhouseFormatType; -use common_formats::FileFormatOptionsExt; -use common_formats::FileFormatTypeExt; -use common_pipeline_sources::input_formats::InputContext; -use common_pipeline_sources::input_formats::StreamingReadBatch; -use common_sql::plans::InsertInputSource; -use common_sql::plans::Plan; -use common_sql::Planner; +use databend_common_base::base::tokio; +use databend_common_base::base::tokio::sync::mpsc::Sender; +use databend_common_base::base::tokio::task::JoinHandle; +use databend_common_base::runtime::TrySpawn; +use databend_common_compress::CompressAlgorithm; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_exception::ToErrorCode; +use databend_common_expression::infer_table_schema; +use databend_common_expression::DataSchemaRef; +use databend_common_formats::ClickhouseFormatType; +use databend_common_formats::FileFormatOptionsExt; +use databend_common_formats::FileFormatTypeExt; +use databend_common_pipeline_sources::input_formats::InputContext; +use databend_common_pipeline_sources::input_formats::StreamingReadBatch; +use databend_common_sql::plans::InsertInputSource; +use databend_common_sql::plans::Plan; +use databend_common_sql::Planner; use futures::StreamExt; use http::HeaderMap; use http::StatusCode; diff --git a/src/query/service/src/servers/http/http_services.rs b/src/query/service/src/servers/http/http_services.rs index cdef6bbe53c3..60a0ac9a67b2 100644 --- a/src/query/service/src/servers/http/http_services.rs +++ b/src/query/service/src/servers/http/http_services.rs @@ -16,12 +16,12 @@ use std::net::SocketAddr; use std::path::Path; use std::time::Duration; -use common_config::GlobalConfig; -use common_config::InnerConfig; -use common_exception::ErrorCode; -use common_http::HttpError; -use common_http::HttpShutdownHandler; -use common_meta_types::anyerror::AnyError; +use databend_common_config::GlobalConfig; +use databend_common_config::InnerConfig; +use databend_common_exception::ErrorCode; +use databend_common_http::HttpError; +use databend_common_http::HttpShutdownHandler; +use databend_common_meta_types::anyerror::AnyError; use log::info; use poem::get; use poem::listener::RustlsCertificate; diff --git a/src/query/service/src/servers/http/middleware.rs b/src/query/service/src/servers/http/middleware.rs index 568721b46628..2aca06702cea 100644 --- a/src/query/service/src/servers/http/middleware.rs +++ b/src/query/service/src/servers/http/middleware.rs @@ -17,12 +17,12 @@ use std::collections::HashMap; use std::sync::Arc; use std::time::Instant; -use common_exception::ErrorCode; -use common_exception::Result; -use common_metrics::http::metrics_incr_http_request_count; -use common_metrics::http::metrics_incr_http_response_panics_count; -use common_metrics::http::metrics_incr_http_slow_request_count; -use common_storages_fuse::TableContext; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_metrics::http::metrics_incr_http_request_count; +use databend_common_metrics::http::metrics_incr_http_response_panics_count; +use databend_common_metrics::http::metrics_incr_http_slow_request_count; +use databend_common_storages_fuse::TableContext; use headers::authorization::Basic; use headers::authorization::Bearer; use headers::authorization::Credentials; diff --git a/src/query/service/src/servers/http/v1/http_query_handlers.rs b/src/query/service/src/servers/http/v1/http_query_handlers.rs index 80a2e4281d3d..845d1014caeb 100644 --- a/src/query/service/src/servers/http/v1/http_query_handlers.rs +++ b/src/query/service/src/servers/http/v1/http_query_handlers.rs @@ -12,10 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_base::base::mask_connection_info; -use common_exception::ErrorCode; -use common_expression::DataSchemaRef; -use common_metrics::http::metrics_incr_http_response_errors_count; +use databend_common_base::base::mask_connection_info; +use databend_common_exception::ErrorCode; +use databend_common_expression::DataSchemaRef; +use databend_common_metrics::http::metrics_incr_http_response_errors_count; use highway::HighwayHash; use log::error; use log::info; diff --git a/src/query/service/src/servers/http/v1/json_block.rs b/src/query/service/src/servers/http/v1/json_block.rs index da2db18529b5..14bde8e551ea 100644 --- a/src/query/service/src/servers/http/v1/json_block.rs +++ b/src/query/service/src/servers/http/v1/json_block.rs @@ -14,13 +14,13 @@ use std::sync::Arc; -use common_exception::Result; -use common_expression::Column; -use common_expression::DataBlock; -use common_expression::DataSchema; -use common_expression::DataSchemaRef; -use common_formats::field_encoder::FieldEncoderValues; -use common_io::prelude::FormatSettings; +use databend_common_exception::Result; +use databend_common_expression::Column; +use databend_common_expression::DataBlock; +use databend_common_expression::DataSchema; +use databend_common_expression::DataSchemaRef; +use databend_common_formats::field_encoder::FieldEncoderValues; +use databend_common_io::prelude::FormatSettings; use serde_json::Value as JsonValue; #[derive(Debug, Clone)] diff --git a/src/query/service/src/servers/http/v1/load.rs b/src/query/service/src/servers/http/v1/load.rs index 1e37cf11cae4..9f33c769f4ae 100644 --- a/src/query/service/src/servers/http/v1/load.rs +++ b/src/query/service/src/servers/http/v1/load.rs @@ -15,20 +15,20 @@ use std::future::Future; use std::sync::Arc; -use common_base::base::tokio; -use common_base::base::tokio::io::AsyncRead; -use common_base::base::tokio::io::AsyncReadExt; -use common_base::base::unescape_string; -use common_base::base::ProgressValues; -use common_base::runtime::TrySpawn; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::infer_table_schema; -use common_pipeline_sources::input_formats::InputContext; -use common_pipeline_sources::input_formats::StreamingReadBatch; -use common_sql::plans::InsertInputSource; -use common_sql::plans::Plan; -use common_sql::Planner; +use databend_common_base::base::tokio; +use databend_common_base::base::tokio::io::AsyncRead; +use databend_common_base::base::tokio::io::AsyncReadExt; +use databend_common_base::base::unescape_string; +use databend_common_base::base::ProgressValues; +use databend_common_base::runtime::TrySpawn; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::infer_table_schema; +use databend_common_pipeline_sources::input_formats::InputContext; +use databend_common_pipeline_sources::input_formats::StreamingReadBatch; +use databend_common_sql::plans::InsertInputSource; +use databend_common_sql::plans::Plan; +use databend_common_sql::Planner; use futures::StreamExt; use log::debug; use log::info; diff --git a/src/query/service/src/servers/http/v1/query/execute_state.rs b/src/query/service/src/servers/http/v1/query/execute_state.rs index a93d9b2e2f8b..7c6b2867d0e8 100644 --- a/src/query/service/src/servers/http/v1/query/execute_state.rs +++ b/src/query/service/src/servers/http/v1/query/execute_state.rs @@ -15,20 +15,20 @@ use std::sync::Arc; use std::time::SystemTime; -use common_base::base::tokio::sync::RwLock; -use common_base::base::ProgressValues; -use common_base::runtime::CatchUnwindFuture; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::types::DataType; -use common_expression::BlockEntry; -use common_expression::DataBlock; -use common_expression::DataSchemaRef; -use common_expression::Scalar; -use common_settings::Settings; -use common_sql::plans::Plan; -use common_sql::PlanExtras; -use common_sql::Planner; +use databend_common_base::base::tokio::sync::RwLock; +use databend_common_base::base::ProgressValues; +use databend_common_base::runtime::CatchUnwindFuture; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::types::DataType; +use databend_common_expression::BlockEntry; +use databend_common_expression::DataBlock; +use databend_common_expression::DataSchemaRef; +use databend_common_expression::Scalar; +use databend_common_settings::Settings; +use databend_common_sql::plans::Plan; +use databend_common_sql::PlanExtras; +use databend_common_sql::Planner; use futures::StreamExt; use log::error; use log::info; @@ -325,7 +325,7 @@ async fn execute( // duplicate codes, but there is an async call let data = BlockEntry::new( DataType::String, - common_expression::Value::Scalar(Scalar::String(err.to_string().into_bytes())), + databend_common_expression::Value::Scalar(Scalar::String(err.to_string().into_bytes())), ); block_sender.send(DataBlock::new(vec![data], 1), 1).await; return Err(err); @@ -342,7 +342,9 @@ async fn execute( // duplicate codes, but there is an async call let data = BlockEntry::new( DataType::String, - common_expression::Value::Scalar(Scalar::String(err.to_string().into_bytes())), + databend_common_expression::Value::Scalar(Scalar::String( + err.to_string().into_bytes(), + )), ); block_sender.send(DataBlock::new(vec![data], 1), 1).await; Executor::stop(&executor, Err(err), false).await; @@ -360,7 +362,7 @@ async fn execute( // duplicate codes, but there is an async call let data = BlockEntry::new( DataType::String, - common_expression::Value::Scalar(Scalar::String( + databend_common_expression::Value::Scalar(Scalar::String( err.to_string().into_bytes(), )), ); diff --git a/src/query/service/src/servers/http/v1/query/expiring_map.rs b/src/query/service/src/servers/http/v1/query/expiring_map.rs index 03edfa3db6e2..16e4286a2575 100644 --- a/src/query/service/src/servers/http/v1/query/expiring_map.rs +++ b/src/query/service/src/servers/http/v1/query/expiring_map.rs @@ -17,9 +17,9 @@ use std::hash::Hash; use std::sync::Arc; use std::time::Duration; -use common_base::base::tokio::task; -use common_base::base::tokio::time::sleep; use dashmap::DashMap; +use databend_common_base::base::tokio::task; +use databend_common_base::base::tokio::time::sleep; use crate::servers::http::v1::query::expirable::Expirable; use crate::servers::http::v1::query::expirable::ExpiringState; diff --git a/src/query/service/src/servers/http/v1/query/http_query.rs b/src/query/service/src/servers/http/v1/query/http_query.rs index 0a4eee7f1088..2bbe7ea7aa76 100644 --- a/src/query/service/src/servers/http/v1/query/http_query.rs +++ b/src/query/service/src/servers/http/v1/query/http_query.rs @@ -18,14 +18,14 @@ use std::sync::Arc; use std::time::Duration; use std::time::Instant; -use common_base::base::tokio; -use common_base::base::tokio::sync::Mutex as TokioMutex; -use common_base::base::tokio::sync::RwLock; -use common_base::runtime::GlobalQueryRuntime; -use common_base::runtime::TrySpawn; -use common_catalog::table_context::StageAttachment; -use common_exception::ErrorCode; -use common_exception::Result; +use databend_common_base::base::tokio; +use databend_common_base::base::tokio::sync::Mutex as TokioMutex; +use databend_common_base::base::tokio::sync::RwLock; +use databend_common_base::runtime::GlobalQueryRuntime; +use databend_common_base::runtime::TrySpawn; +use databend_common_catalog::table_context::StageAttachment; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; use log::info; use log::warn; use minitrace::prelude::*; diff --git a/src/query/service/src/servers/http/v1/query/http_query_manager.rs b/src/query/service/src/servers/http/v1/query/http_query_manager.rs index 124d9388c8af..0c3e80440898 100644 --- a/src/query/service/src/servers/http/v1/query/http_query_manager.rs +++ b/src/query/service/src/servers/http/v1/query/http_query_manager.rs @@ -21,13 +21,13 @@ use std::hash::Hash; use std::sync::Arc; use std::time::Duration; -use common_base::base::tokio::sync::RwLock; -use common_base::base::tokio::time::sleep; -use common_base::base::GlobalInstance; -use common_base::runtime::GlobalIORuntime; -use common_base::runtime::TrySpawn; -use common_config::InnerConfig; -use common_exception::Result; +use databend_common_base::base::tokio::sync::RwLock; +use databend_common_base::base::tokio::time::sleep; +use databend_common_base::base::GlobalInstance; +use databend_common_base::runtime::GlobalIORuntime; +use databend_common_base::runtime::TrySpawn; +use databend_common_config::InnerConfig; +use databend_common_exception::Result; use log::warn; use parking_lot::Mutex; diff --git a/src/query/service/src/servers/http/v1/query/page_manager.rs b/src/query/service/src/servers/http/v1/query/page_manager.rs index 0d2e842b2f73..11f2ddecc3df 100644 --- a/src/query/service/src/servers/http/v1/query/page_manager.rs +++ b/src/query/service/src/servers/http/v1/query/page_manager.rs @@ -15,12 +15,12 @@ use std::collections::VecDeque; use std::time::Instant; -use common_base::base::tokio; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::DataBlock; -use common_expression::DataSchemaRef; -use common_io::prelude::FormatSettings; +use databend_common_base::base::tokio; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::DataBlock; +use databend_common_expression::DataSchemaRef; +use databend_common_io::prelude::FormatSettings; use log::debug; use log::info; use serde_json::Value as JsonValue; diff --git a/src/query/service/src/servers/http/v1/query/sized_spsc.rs b/src/query/service/src/servers/http/v1/query/sized_spsc.rs index 386748b9dab3..1881bccb6145 100644 --- a/src/query/service/src/servers/http/v1/query/sized_spsc.rs +++ b/src/query/service/src/servers/http/v1/query/sized_spsc.rs @@ -22,7 +22,7 @@ use std::collections::VecDeque; use std::sync::Arc; use std::sync::Mutex; -use common_base::base::tokio::sync::Notify; +use databend_common_base::base::tokio::sync::Notify; struct SizedChannelInner { max_size: usize, diff --git a/src/query/service/src/servers/http/v1/stage.rs b/src/query/service/src/servers/http/v1/stage.rs index 38772102a20b..ff9c9898ea67 100644 --- a/src/query/service/src/servers/http/v1/stage.rs +++ b/src/query/service/src/servers/http/v1/stage.rs @@ -12,9 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_meta_app::principal::StageInfo; -use common_storages_stage::StageTable; -use common_users::UserApiProvider; +use databend_common_meta_app::principal::StageInfo; +use databend_common_storages_stage::StageTable; +use databend_common_users::UserApiProvider; use poem::error::InternalServerError; use poem::error::Result as PoemResult; use poem::http::StatusCode; diff --git a/src/query/service/src/servers/http/v1/suggestions.rs b/src/query/service/src/servers/http/v1/suggestions.rs index 551b51d42cda..bb5cfbbde9d3 100644 --- a/src/query/service/src/servers/http/v1/suggestions.rs +++ b/src/query/service/src/servers/http/v1/suggestions.rs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -use background_service::Suggestion; +use databend_enterprise_background_service::Suggestion; use http::StatusCode; use poem::error::InternalServerError; use poem::error::Result as PoemResult; diff --git a/src/query/service/src/servers/mysql/mysql_federated.rs b/src/query/service/src/servers/mysql/mysql_federated.rs index c2cfc33fae4b..88723083246c 100644 --- a/src/query/service/src/servers/mysql/mysql_federated.rs +++ b/src/query/service/src/servers/mysql/mysql_federated.rs @@ -15,16 +15,16 @@ use std::collections::HashMap; use std::sync::Arc; -use common_expression::types::StringType; -use common_expression::utils::FromData; -use common_expression::DataBlock; -use common_expression::DataSchema; -use common_expression::DataSchemaRef; -use common_expression::TableDataType; -use common_expression::TableField; -use common_expression::TableSchemaRef; -use common_expression::TableSchemaRefExt; use ctor::ctor; +use databend_common_expression::types::StringType; +use databend_common_expression::utils::FromData; +use databend_common_expression::DataBlock; +use databend_common_expression::DataSchema; +use databend_common_expression::DataSchemaRef; +use databend_common_expression::TableDataType; +use databend_common_expression::TableField; +use databend_common_expression::TableSchemaRef; +use databend_common_expression::TableSchemaRefExt; use regex::Regex; use crate::servers::federated_helper::FederatedHelper; diff --git a/src/query/service/src/servers/mysql/mysql_handler.rs b/src/query/service/src/servers/mysql/mysql_handler.rs index ec82bb7ee6cc..a71a5b69a980 100644 --- a/src/query/service/src/servers/mysql/mysql_handler.rs +++ b/src/query/service/src/servers/mysql/mysql_handler.rs @@ -16,14 +16,14 @@ use std::future::Future; use std::net::SocketAddr; use std::sync::Arc; -use common_base::base::tokio; -use common_base::base::tokio::net::TcpStream; -use common_base::base::tokio::task::JoinHandle; -use common_base::runtime::Runtime; -use common_base::runtime::TrySpawn; -use common_base::GLOBAL_TASK; -use common_exception::ErrorCode; -use common_exception::Result; +use databend_common_base::base::tokio; +use databend_common_base::base::tokio::net::TcpStream; +use databend_common_base::base::tokio::task::JoinHandle; +use databend_common_base::runtime::Runtime; +use databend_common_base::runtime::TrySpawn; +use databend_common_base::GLOBAL_TASK; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; use futures::future::AbortHandle; use futures::future::AbortRegistration; use futures::future::Abortable; diff --git a/src/query/service/src/servers/mysql/mysql_interactive_worker.rs b/src/query/service/src/servers/mysql/mysql_interactive_worker.rs index 553988f401ec..b79f0f28b82c 100644 --- a/src/query/service/src/servers/mysql/mysql_interactive_worker.rs +++ b/src/query/service/src/servers/mysql/mysql_interactive_worker.rs @@ -15,23 +15,23 @@ use std::sync::Arc; use std::time::Instant; -use common_base::base::convert_byte_size; -use common_base::base::convert_number_size; -use common_base::base::tokio::io::AsyncWrite; -use common_base::runtime::TrySpawn; -use common_config::DATABEND_COMMIT_VERSION; -use common_exception::ErrorCode; -use common_exception::Result; -use common_exception::ToErrorCode; -use common_expression::DataBlock; -use common_expression::DataSchemaRef; -use common_expression::SendableDataBlockStream; -use common_io::prelude::FormatSettings; -use common_meta_app::principal::UserIdentity; -use common_metrics::mysql::*; -use common_sql::Planner; -use common_users::CertifiedInfo; -use common_users::UserApiProvider; +use databend_common_base::base::convert_byte_size; +use databend_common_base::base::convert_number_size; +use databend_common_base::base::tokio::io::AsyncWrite; +use databend_common_base::runtime::TrySpawn; +use databend_common_config::DATABEND_COMMIT_VERSION; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_exception::ToErrorCode; +use databend_common_expression::DataBlock; +use databend_common_expression::DataSchemaRef; +use databend_common_expression::SendableDataBlockStream; +use databend_common_io::prelude::FormatSettings; +use databend_common_meta_app::principal::UserIdentity; +use databend_common_metrics::mysql::*; +use databend_common_sql::Planner; +use databend_common_users::CertifiedInfo; +use databend_common_users::UserApiProvider; use futures_util::StreamExt; use log::error; use log::info; diff --git a/src/query/service/src/servers/mysql/mysql_session.rs b/src/query/service/src/servers/mysql/mysql_session.rs index 75bd0647f68f..b7dd29d002a5 100644 --- a/src/query/service/src/servers/mysql/mysql_session.rs +++ b/src/query/service/src/servers/mysql/mysql_session.rs @@ -15,15 +15,15 @@ use std::net::Shutdown; use std::sync::Arc; -use common_base::base::tokio::io::BufWriter; -use common_base::base::tokio::net::TcpStream; -use common_base::runtime::Runtime; -use common_base::runtime::Thread; -use common_base::runtime::TrySpawn; -use common_base::GLOBAL_TASK; -use common_exception::ErrorCode; -use common_exception::Result; -use common_exception::ToErrorCode; +use databend_common_base::base::tokio::io::BufWriter; +use databend_common_base::base::tokio::net::TcpStream; +use databend_common_base::runtime::Runtime; +use databend_common_base::runtime::Thread; +use databend_common_base::runtime::TrySpawn; +use databend_common_base::GLOBAL_TASK; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_exception::ToErrorCode; use log::error; use log::warn; use opensrv_mysql::plain_run_with_options; diff --git a/src/query/service/src/servers/mysql/reject_connection.rs b/src/query/service/src/servers/mysql/reject_connection.rs index d799c0795637..92aa81bcd67b 100644 --- a/src/query/service/src/servers/mysql/reject_connection.rs +++ b/src/query/service/src/servers/mysql/reject_connection.rs @@ -12,10 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_base::base::tokio::io::AsyncReadExt; -use common_base::base::tokio::io::AsyncWriteExt; -use common_base::base::tokio::net::TcpStream; -use common_exception::Result; +use databend_common_base::base::tokio::io::AsyncReadExt; +use databend_common_base::base::tokio::io::AsyncWriteExt; +use databend_common_base::base::tokio::net::TcpStream; +use databend_common_exception::Result; use opensrv_mysql::ErrorKind; pub struct RejectConnection; diff --git a/src/query/service/src/servers/mysql/tls.rs b/src/query/service/src/servers/mysql/tls.rs index b931e829e0e1..894a191c52d1 100644 --- a/src/query/service/src/servers/mysql/tls.rs +++ b/src/query/service/src/servers/mysql/tls.rs @@ -15,8 +15,8 @@ use std::fs::File; use std::io::BufReader; -use common_exception::ErrorCode; -use common_exception::Result; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; use rustls::Certificate; use rustls::PrivateKey; use rustls::ServerConfig; diff --git a/src/query/service/src/servers/mysql/writers/init_result_writer.rs b/src/query/service/src/servers/mysql/writers/init_result_writer.rs index e2e681955bfd..b56212910f45 100644 --- a/src/query/service/src/servers/mysql/writers/init_result_writer.rs +++ b/src/query/service/src/servers/mysql/writers/init_result_writer.rs @@ -12,9 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_base::base::tokio::io::AsyncWrite; -use common_exception::ErrorCode; -use common_exception::Result; +use databend_common_base::base::tokio::io::AsyncWrite; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; use log::error; use opensrv_mysql::*; diff --git a/src/query/service/src/servers/mysql/writers/query_result_writer.rs b/src/query/service/src/servers/mysql/writers/query_result_writer.rs index 534aaf793eff..7e76e89fa7f7 100644 --- a/src/query/service/src/servers/mysql/writers/query_result_writer.rs +++ b/src/query/service/src/servers/mysql/writers/query_result_writer.rs @@ -12,19 +12,19 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_base::base::tokio::io::AsyncWrite; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::types::number::NumberScalar; -use common_expression::types::DataType; -use common_expression::types::NumberDataType; -use common_expression::Column as ExprColumn; -use common_expression::DataField; -use common_expression::DataSchemaRef; -use common_expression::ScalarRef; -use common_expression::SendableDataBlockStream; -use common_formats::field_encoder::FieldEncoderValues; -use common_io::prelude::FormatSettings; +use databend_common_base::base::tokio::io::AsyncWrite; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::types::number::NumberScalar; +use databend_common_expression::types::DataType; +use databend_common_expression::types::NumberDataType; +use databend_common_expression::Column as ExprColumn; +use databend_common_expression::DataField; +use databend_common_expression::DataSchemaRef; +use databend_common_expression::ScalarRef; +use databend_common_expression::SendableDataBlockStream; +use databend_common_formats::field_encoder::FieldEncoderValues; +use databend_common_io::prelude::FormatSettings; use futures_util::StreamExt; use log::error; use opensrv_mysql::*; diff --git a/src/query/service/src/servers/server.rs b/src/query/service/src/servers/server.rs index 7659d0df2f0d..07948c3b91ac 100644 --- a/src/query/service/src/servers/server.rs +++ b/src/query/service/src/servers/server.rs @@ -17,11 +17,11 @@ use std::sync::atomic::AtomicBool; use std::sync::atomic::Ordering; use std::sync::Arc; -use common_base::base::signal_stream; -use common_base::base::DummySignalStream; -use common_base::base::SignalStream; -use common_base::base::SignalType; -use common_exception::Result; +use databend_common_base::base::signal_stream; +use databend_common_base::base::DummySignalStream; +use databend_common_base::base::SignalStream; +use databend_common_base::base::SignalType; +use databend_common_exception::Result; use futures::stream::Abortable; use futures::StreamExt; use log::error; diff --git a/src/query/service/src/sessions/mod.rs b/src/query/service/src/sessions/mod.rs index 7eef6e43f547..15d217c22849 100644 --- a/src/query/service/src/sessions/mod.rs +++ b/src/query/service/src/sessions/mod.rs @@ -24,7 +24,7 @@ mod session_privilege_mgr; mod session_status; mod session_type; -pub use common_catalog::table_context::TableContext; +pub use databend_common_catalog::table_context::TableContext; pub use query_affect::QueryAffect; pub use query_ctx::convert_query_log_timestamp; pub use query_ctx::QueryContext; diff --git a/src/query/service/src/sessions/query_ctx.rs b/src/query/service/src/sessions/query_ctx.rs index c06b5e3199ae..188c5ab1bc22 100644 --- a/src/query/service/src/sessions/query_ctx.rs +++ b/src/query/service/src/sessions/query_ctx.rs @@ -30,66 +30,66 @@ use std::time::SystemTime; use std::time::UNIX_EPOCH; use chrono_tz::Tz; -use common_base::base::tokio::task::JoinHandle; -use common_base::base::Progress; -use common_base::base::ProgressValues; -use common_base::runtime::TrySpawn; -use common_catalog::plan::DataSourceInfo; -use common_catalog::plan::DataSourcePlan; -use common_catalog::plan::PartInfoPtr; -use common_catalog::plan::Partitions; -use common_catalog::plan::StageTableInfo; -use common_catalog::query_kind::QueryKind; -use common_catalog::table_args::TableArgs; -use common_catalog::table_context::MaterializedCtesBlocks; -use common_catalog::table_context::StageAttachment; -use common_config::GlobalConfig; -use common_config::DATABEND_COMMIT_VERSION; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::date_helper::TzFactory; -use common_expression::DataBlock; -use common_expression::Expr; -use common_expression::FunctionContext; -use common_io::prelude::FormatSettings; -use common_meta_app::principal::FileFormatParams; -use common_meta_app::principal::OnErrorMode; -use common_meta_app::principal::RoleInfo; -use common_meta_app::principal::StageFileFormatType; -use common_meta_app::principal::UserDefinedConnection; -use common_meta_app::principal::UserInfo; -use common_meta_app::principal::COPY_MAX_FILES_COMMIT_MSG; -use common_meta_app::principal::COPY_MAX_FILES_PER_COMMIT; -use common_meta_app::schema::CatalogInfo; -use common_meta_app::schema::GetTableCopiedFileReq; -use common_meta_app::schema::TableInfo; -use common_metrics::storage::*; -use common_pipeline_core::processors::profile::PlanProfile; -use common_pipeline_core::processors::profile::Profile; -use common_pipeline_core::InputError; -use common_settings::Settings; -use common_sql::IndexType; -use common_storage::CopyStatus; -use common_storage::DataOperator; -use common_storage::FileStatus; -use common_storage::MergeStatus; -use common_storage::StageFileInfo; -use common_storage::StorageMetrics; -use common_storages_delta::DeltaTable; -use common_storages_fuse::TableContext; -use common_storages_iceberg::IcebergTable; -use common_storages_parquet::Parquet2Table; -use common_storages_parquet::ParquetRSTable; -use common_storages_result_cache::ResultScan; -use common_storages_stage::StageTable; -use common_users::GrantObjectVisibilityChecker; -use common_users::UserApiProvider; use dashmap::mapref::multiple::RefMulti; use dashmap::DashMap; +use databend_common_base::base::tokio::task::JoinHandle; +use databend_common_base::base::Progress; +use databend_common_base::base::ProgressValues; +use databend_common_base::runtime::TrySpawn; +use databend_common_catalog::plan::DataSourceInfo; +use databend_common_catalog::plan::DataSourcePlan; +use databend_common_catalog::plan::PartInfoPtr; +use databend_common_catalog::plan::Partitions; +use databend_common_catalog::plan::StageTableInfo; +use databend_common_catalog::query_kind::QueryKind; +use databend_common_catalog::table_args::TableArgs; +use databend_common_catalog::table_context::MaterializedCtesBlocks; +use databend_common_catalog::table_context::StageAttachment; +use databend_common_config::GlobalConfig; +use databend_common_config::DATABEND_COMMIT_VERSION; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::date_helper::TzFactory; +use databend_common_expression::DataBlock; +use databend_common_expression::Expr; +use databend_common_expression::FunctionContext; +use databend_common_io::prelude::FormatSettings; +use databend_common_meta_app::principal::FileFormatParams; +use databend_common_meta_app::principal::OnErrorMode; +use databend_common_meta_app::principal::RoleInfo; +use databend_common_meta_app::principal::StageFileFormatType; +use databend_common_meta_app::principal::UserDefinedConnection; +use databend_common_meta_app::principal::UserInfo; +use databend_common_meta_app::principal::COPY_MAX_FILES_COMMIT_MSG; +use databend_common_meta_app::principal::COPY_MAX_FILES_PER_COMMIT; +use databend_common_meta_app::schema::CatalogInfo; +use databend_common_meta_app::schema::GetTableCopiedFileReq; +use databend_common_meta_app::schema::TableInfo; +use databend_common_metrics::storage::*; +use databend_common_pipeline_core::processors::profile::PlanProfile; +use databend_common_pipeline_core::processors::profile::Profile; +use databend_common_pipeline_core::InputError; +use databend_common_settings::Settings; +use databend_common_sql::IndexType; +use databend_common_storage::CopyStatus; +use databend_common_storage::DataOperator; +use databend_common_storage::FileStatus; +use databend_common_storage::MergeStatus; +use databend_common_storage::StageFileInfo; +use databend_common_storage::StorageMetrics; +use databend_common_storages_delta::DeltaTable; +use databend_common_storages_fuse::TableContext; +use databend_common_storages_iceberg::IcebergTable; +use databend_common_storages_parquet::Parquet2Table; +use databend_common_storages_parquet::ParquetRSTable; +use databend_common_storages_result_cache::ResultScan; +use databend_common_storages_stage::StageTable; +use databend_common_users::GrantObjectVisibilityChecker; +use databend_common_users::UserApiProvider; +use databend_storages_common_table_meta::meta::Location; use log::debug; use log::info; use parking_lot::RwLock; -use storages_common_table_meta::meta::Location; use crate::api::DataExchangeManager; use crate::catalogs::Catalog; diff --git a/src/query/service/src/sessions/query_ctx_shared.rs b/src/query/service/src/sessions/query_ctx_shared.rs index b71321a2b152..0e1433072152 100644 --- a/src/query/service/src/sessions/query_ctx_shared.rs +++ b/src/query/service/src/sessions/query_ctx_shared.rs @@ -20,29 +20,29 @@ use std::sync::Arc; use std::sync::Weak; use std::time::SystemTime; -use common_base::base::Progress; -use common_base::runtime::Runtime; -use common_catalog::catalog::CatalogManager; -use common_catalog::query_kind::QueryKind; -use common_catalog::table_context::MaterializedCtesBlocks; -use common_catalog::table_context::StageAttachment; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::Expr; -use common_meta_app::principal::OnErrorMode; -use common_meta_app::principal::RoleInfo; -use common_meta_app::principal::UserDefinedConnection; -use common_meta_app::principal::UserInfo; -use common_pipeline_core::processors::profile::PlanProfile; -use common_pipeline_core::InputError; -use common_settings::Settings; -use common_sql::IndexType; -use common_storage::CopyStatus; -use common_storage::DataOperator; -use common_storage::MergeStatus; -use common_storage::StorageMetrics; -use common_users::UserApiProvider; use dashmap::DashMap; +use databend_common_base::base::Progress; +use databend_common_base::runtime::Runtime; +use databend_common_catalog::catalog::CatalogManager; +use databend_common_catalog::query_kind::QueryKind; +use databend_common_catalog::table_context::MaterializedCtesBlocks; +use databend_common_catalog::table_context::StageAttachment; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::Expr; +use databend_common_meta_app::principal::OnErrorMode; +use databend_common_meta_app::principal::RoleInfo; +use databend_common_meta_app::principal::UserDefinedConnection; +use databend_common_meta_app::principal::UserInfo; +use databend_common_pipeline_core::processors::profile::PlanProfile; +use databend_common_pipeline_core::InputError; +use databend_common_settings::Settings; +use databend_common_sql::IndexType; +use databend_common_storage::CopyStatus; +use databend_common_storage::DataOperator; +use databend_common_storage::MergeStatus; +use databend_common_storage::StorageMetrics; +use databend_common_users::UserApiProvider; use parking_lot::Mutex; use parking_lot::RwLock; use uuid::Uuid; diff --git a/src/query/service/src/sessions/session.rs b/src/query/service/src/sessions/session.rs index f4faeecce8ee..d669fd431bc5 100644 --- a/src/query/service/src/sessions/session.rs +++ b/src/query/service/src/sessions/session.rs @@ -15,17 +15,17 @@ use std::net::SocketAddr; use std::sync::Arc; -use common_config::GlobalConfig; -use common_exception::ErrorCode; -use common_exception::Result; -use common_io::prelude::FormatSettings; -use common_meta_app::principal::GrantObject; -use common_meta_app::principal::GrantObjectByID; -use common_meta_app::principal::RoleInfo; -use common_meta_app::principal::UserInfo; -use common_meta_app::principal::UserPrivilegeType; -use common_settings::Settings; -use common_users::GrantObjectVisibilityChecker; +use databend_common_config::GlobalConfig; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_io::prelude::FormatSettings; +use databend_common_meta_app::principal::GrantObject; +use databend_common_meta_app::principal::GrantObjectByID; +use databend_common_meta_app::principal::RoleInfo; +use databend_common_meta_app::principal::UserInfo; +use databend_common_meta_app::principal::UserPrivilegeType; +use databend_common_settings::Settings; +use databend_common_users::GrantObjectVisibilityChecker; use log::debug; use parking_lot::RwLock; diff --git a/src/query/service/src/sessions/session_ctx.rs b/src/query/service/src/sessions/session_ctx.rs index eb79998d588d..a5c5a1ffcf92 100644 --- a/src/query/service/src/sessions/session_ctx.rs +++ b/src/query/service/src/sessions/session_ctx.rs @@ -19,11 +19,11 @@ use std::sync::atomic::Ordering; use std::sync::Arc; use std::sync::Weak; -use common_config::GlobalConfig; -use common_exception::Result; -use common_meta_app::principal::RoleInfo; -use common_meta_app::principal::UserInfo; -use common_settings::Settings; +use databend_common_config::GlobalConfig; +use databend_common_exception::Result; +use databend_common_meta_app::principal::RoleInfo; +use databend_common_meta_app::principal::UserInfo; +use databend_common_settings::Settings; use parking_lot::RwLock; use super::SessionType; diff --git a/src/query/service/src/sessions/session_info.rs b/src/query/service/src/sessions/session_info.rs index 5193a5d970c3..17a2e4119db6 100644 --- a/src/query/service/src/sessions/session_info.rs +++ b/src/query/service/src/sessions/session_info.rs @@ -15,10 +15,10 @@ use std::sync::Arc; use std::time::SystemTime; -use common_base::base::ProgressValues; -pub use common_catalog::table_context::ProcessInfo; -use common_catalog::table_context::ProcessInfoState; -use common_storage::StorageMetrics; +use databend_common_base::base::ProgressValues; +pub use databend_common_catalog::table_context::ProcessInfo; +use databend_common_catalog::table_context::ProcessInfoState; +use databend_common_storage::StorageMetrics; use crate::sessions::Session; use crate::sessions::SessionContext; diff --git a/src/query/service/src/sessions/session_mgr.rs b/src/query/service/src/sessions/session_mgr.rs index a656adb15577..444752b9720f 100644 --- a/src/query/service/src/sessions/session_mgr.rs +++ b/src/query/service/src/sessions/session_mgr.rs @@ -21,17 +21,17 @@ use std::sync::Arc; use std::sync::Weak; use std::time::Duration; -use common_base::base::tokio; -use common_base::base::GlobalInstance; -use common_base::base::SignalStream; -use common_catalog::table_context::ProcessInfoState; -use common_config::GlobalConfig; -use common_config::InnerConfig; -use common_exception::ErrorCode; -use common_exception::Result; -use common_metrics::session::*; -use common_pipeline_core::processors::profile::Profile; -use common_settings::Settings; +use databend_common_base::base::tokio; +use databend_common_base::base::GlobalInstance; +use databend_common_base::base::SignalStream; +use databend_common_catalog::table_context::ProcessInfoState; +use databend_common_config::GlobalConfig; +use databend_common_config::InnerConfig; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_metrics::session::*; +use databend_common_pipeline_core::processors::profile::Profile; +use databend_common_settings::Settings; use futures::future::Either; use futures::StreamExt; use log::info; diff --git a/src/query/service/src/sessions/session_privilege_mgr.rs b/src/query/service/src/sessions/session_privilege_mgr.rs index ad5f688aa8d2..62cc8143ebfc 100644 --- a/src/query/service/src/sessions/session_privilege_mgr.rs +++ b/src/query/service/src/sessions/session_privilege_mgr.rs @@ -14,16 +14,16 @@ use std::sync::Arc; -use common_exception::ErrorCode; -use common_exception::Result; -use common_meta_app::principal::GrantObject; -use common_meta_app::principal::GrantObjectByID; -use common_meta_app::principal::RoleInfo; -use common_meta_app::principal::UserInfo; -use common_meta_app::principal::UserPrivilegeType; -use common_users::GrantObjectVisibilityChecker; -use common_users::RoleCacheManager; -use common_users::BUILTIN_ROLE_PUBLIC; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_meta_app::principal::GrantObject; +use databend_common_meta_app::principal::GrantObjectByID; +use databend_common_meta_app::principal::RoleInfo; +use databend_common_meta_app::principal::UserInfo; +use databend_common_meta_app::principal::UserPrivilegeType; +use databend_common_users::GrantObjectVisibilityChecker; +use databend_common_users::RoleCacheManager; +use databend_common_users::BUILTIN_ROLE_PUBLIC; use crate::sessions::SessionContext; diff --git a/src/query/service/src/spillers/spiller.rs b/src/query/service/src/spillers/spiller.rs index 6eb256e7c390..3bac2ce2e811 100644 --- a/src/query/service/src/spillers/spiller.rs +++ b/src/query/service/src/spillers/spiller.rs @@ -18,14 +18,14 @@ use std::fmt::Display; use std::fmt::Formatter; use std::sync::Arc; -use common_base::base::GlobalUniqName; -use common_base::base::ProgressValues; -use common_catalog::table_context::TableContext; -use common_exception::Result; -use common_expression::arrow::deserialize_column; -use common_expression::arrow::serialize_column; -use common_expression::DataBlock; -use common_hashtable::hash2bucket; +use databend_common_base::base::GlobalUniqName; +use databend_common_base::base::ProgressValues; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::Result; +use databend_common_expression::arrow::deserialize_column; +use databend_common_expression::arrow::serialize_column; +use databend_common_expression::DataBlock; +use databend_common_hashtable::hash2bucket; use log::info; use opendal::Operator; diff --git a/src/query/service/src/stream/datablock_stream.rs b/src/query/service/src/stream/datablock_stream.rs index 25e18f05faf8..7b6d5b6596c3 100644 --- a/src/query/service/src/stream/datablock_stream.rs +++ b/src/query/service/src/stream/datablock_stream.rs @@ -15,8 +15,8 @@ use std::task::Context; use std::task::Poll; -use common_exception::Result; -use common_expression::DataBlock; +use databend_common_exception::Result; +use databend_common_expression::DataBlock; pub struct DataBlockStream { current: usize, diff --git a/src/query/service/src/stream/processor_executor_stream.rs b/src/query/service/src/stream/processor_executor_stream.rs index d54f46776312..8f727114acab 100644 --- a/src/query/service/src/stream/processor_executor_stream.rs +++ b/src/query/service/src/stream/processor_executor_stream.rs @@ -16,8 +16,8 @@ use std::pin::Pin; use std::task::Context; use std::task::Poll; -use common_exception::Result; -use common_expression::DataBlock; +use databend_common_exception::Result; +use databend_common_expression::DataBlock; use futures::Stream; use crate::pipelines::executor::PipelinePullingExecutor; diff --git a/src/query/service/src/stream/progress_stream.rs b/src/query/service/src/stream/progress_stream.rs index 1478d06bdfc1..a6e05a7244f8 100644 --- a/src/query/service/src/stream/progress_stream.rs +++ b/src/query/service/src/stream/progress_stream.rs @@ -16,11 +16,11 @@ use std::sync::Arc; use std::task::Context; use std::task::Poll; -use common_base::base::Progress; -use common_base::base::ProgressValues; -use common_exception::Result; -use common_expression::DataBlock; -use common_expression::SendableDataBlockStream; +use databend_common_base::base::Progress; +use databend_common_base::base::ProgressValues; +use databend_common_exception::Result; +use databend_common_expression::DataBlock; +use databend_common_expression::SendableDataBlockStream; use futures::Stream; use pin_project_lite::pin_project; diff --git a/src/query/service/src/stream/table_read_block_stream.rs b/src/query/service/src/stream/table_read_block_stream.rs index 97925bbd4794..1c3a1b4278c6 100644 --- a/src/query/service/src/stream/table_read_block_stream.rs +++ b/src/query/service/src/stream/table_read_block_stream.rs @@ -14,10 +14,10 @@ use std::sync::Arc; -use common_catalog::plan::DataSourcePlan; -use common_exception::Result; -use common_expression::SendableDataBlockStream; -use common_pipeline_core::Pipeline; +use databend_common_catalog::plan::DataSourcePlan; +use databend_common_exception::Result; +use databend_common_expression::SendableDataBlockStream; +use databend_common_pipeline_core::Pipeline; use crate::pipelines::executor::ExecutorSettings; use crate::pipelines::executor::PipelinePullingExecutor; diff --git a/src/query/service/src/table_functions/async_crash_me.rs b/src/query/service/src/table_functions/async_crash_me.rs index 7885e24399e0..b2408e5760be 100644 --- a/src/query/service/src/table_functions/async_crash_me.rs +++ b/src/query/service/src/table_functions/async_crash_me.rs @@ -21,23 +21,23 @@ use std::task::Poll; use chrono::NaiveDateTime; use chrono::TimeZone; use chrono::Utc; -use common_catalog::plan::DataSourcePlan; -use common_catalog::plan::PartStatistics; -use common_catalog::plan::Partitions; -use common_catalog::plan::PushDownInfo; -use common_catalog::table_args::TableArgs; -use common_catalog::table_function::TableFunction; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::DataBlock; -use common_expression::Scalar; -use common_expression::TableSchemaRefExt; -use common_meta_app::schema::TableIdent; -use common_meta_app::schema::TableInfo; -use common_meta_app::schema::TableMeta; -use common_pipeline_core::Pipeline; -use common_pipeline_sources::AsyncSource; -use common_pipeline_sources::AsyncSourcer; +use databend_common_catalog::plan::DataSourcePlan; +use databend_common_catalog::plan::PartStatistics; +use databend_common_catalog::plan::Partitions; +use databend_common_catalog::plan::PushDownInfo; +use databend_common_catalog::table_args::TableArgs; +use databend_common_catalog::table_function::TableFunction; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::DataBlock; +use databend_common_expression::Scalar; +use databend_common_expression::TableSchemaRefExt; +use databend_common_meta_app::schema::TableIdent; +use databend_common_meta_app::schema::TableInfo; +use databend_common_meta_app::schema::TableMeta; +use databend_common_pipeline_core::Pipeline; +use databend_common_pipeline_sources::AsyncSource; +use databend_common_pipeline_sources::AsyncSourcer; use futures::Stream; use crate::pipelines::processors::OutputPort; diff --git a/src/query/service/src/table_functions/infer_schema/infer_schema_table.rs b/src/query/service/src/table_functions/infer_schema/infer_schema_table.rs index 2c502bb2d864..95d05ecc6d11 100644 --- a/src/query/service/src/table_functions/infer_schema/infer_schema_table.rs +++ b/src/query/service/src/table_functions/infer_schema/infer_schema_table.rs @@ -16,39 +16,39 @@ use std::any::Any; use std::collections::BTreeMap; use std::sync::Arc; -use common_ast::ast::FileLocation; -use common_ast::ast::UriLocation; -use common_catalog::plan::DataSourcePlan; -use common_catalog::plan::PartStatistics; -use common_catalog::plan::Partitions; -use common_catalog::plan::PushDownInfo; -use common_catalog::table::Table; -use common_catalog::table_args::TableArgs; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::types::BooleanType; -use common_expression::types::NumberDataType; -use common_expression::types::StringType; -use common_expression::types::UInt64Type; -use common_expression::DataBlock; -use common_expression::FromData; -use common_expression::TableDataType; -use common_expression::TableField; -use common_expression::TableSchema; -use common_expression::TableSchemaRefExt; -use common_meta_app::principal::StageFileFormatType; -use common_meta_app::schema::TableIdent; -use common_meta_app::schema::TableInfo; -use common_meta_app::schema::TableMeta; -use common_pipeline_core::processors::ProcessorPtr; -use common_pipeline_core::Pipeline; -use common_pipeline_sources::AsyncSource; -use common_pipeline_sources::AsyncSourcer; -use common_sql::binder::resolve_file_location; -use common_storage::init_stage_operator; -use common_storage::read_parquet_schema_async; -use common_storage::read_parquet_schema_async_rs; -use common_storage::StageFilesInfo; +use databend_common_ast::ast::FileLocation; +use databend_common_ast::ast::UriLocation; +use databend_common_catalog::plan::DataSourcePlan; +use databend_common_catalog::plan::PartStatistics; +use databend_common_catalog::plan::Partitions; +use databend_common_catalog::plan::PushDownInfo; +use databend_common_catalog::table::Table; +use databend_common_catalog::table_args::TableArgs; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::types::BooleanType; +use databend_common_expression::types::NumberDataType; +use databend_common_expression::types::StringType; +use databend_common_expression::types::UInt64Type; +use databend_common_expression::DataBlock; +use databend_common_expression::FromData; +use databend_common_expression::TableDataType; +use databend_common_expression::TableField; +use databend_common_expression::TableSchema; +use databend_common_expression::TableSchemaRefExt; +use databend_common_meta_app::principal::StageFileFormatType; +use databend_common_meta_app::schema::TableIdent; +use databend_common_meta_app::schema::TableInfo; +use databend_common_meta_app::schema::TableMeta; +use databend_common_pipeline_core::processors::ProcessorPtr; +use databend_common_pipeline_core::Pipeline; +use databend_common_pipeline_sources::AsyncSource; +use databend_common_pipeline_sources::AsyncSourcer; +use databend_common_sql::binder::resolve_file_location; +use databend_common_storage::init_stage_operator; +use databend_common_storage::read_parquet_schema_async; +use databend_common_storage::read_parquet_schema_async_rs; +use databend_common_storage::StageFilesInfo; use opendal::Scheme; use crate::pipelines::processors::OutputPort; diff --git a/src/query/service/src/table_functions/infer_schema/table_args.rs b/src/query/service/src/table_functions/infer_schema/table_args.rs index d7a38f77804c..07d359d5985a 100644 --- a/src/query/service/src/table_functions/infer_schema/table_args.rs +++ b/src/query/service/src/table_functions/infer_schema/table_args.rs @@ -12,11 +12,11 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_catalog::table_args::TableArgs; -use common_exception::ErrorCode; -use common_exception::Result; -use common_storage::StageFilesInfo; -use common_storages_fuse::table_functions::string_value; +use databend_common_catalog::table_args::TableArgs; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_storage::StageFilesInfo; +use databend_common_storages_fuse::table_functions::string_value; #[derive(Clone)] pub(crate) struct InferSchemaArgsParsed { diff --git a/src/query/service/src/table_functions/inspect_parquet/inspect_parquet_table.rs b/src/query/service/src/table_functions/inspect_parquet/inspect_parquet_table.rs index 57455e8a3b07..e105f801505a 100644 --- a/src/query/service/src/table_functions/inspect_parquet/inspect_parquet_table.rs +++ b/src/query/service/src/table_functions/inspect_parquet/inspect_parquet_table.rs @@ -16,39 +16,39 @@ use std::any::Any; use std::cmp::max; use std::sync::Arc; -use common_catalog::plan::DataSourcePlan; -use common_catalog::plan::PartStatistics; -use common_catalog::plan::Partitions; -use common_catalog::plan::PushDownInfo; -use common_catalog::table::Table; -use common_catalog::table_args::TableArgs; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::types::DataType; -use common_expression::types::Int64Type; -use common_expression::types::NumberDataType; -use common_expression::types::StringType; -use common_expression::types::UInt64Type; -use common_expression::types::ValueType; -use common_expression::BlockEntry; -use common_expression::DataBlock; -use common_expression::TableDataType; -use common_expression::TableField; -use common_expression::TableSchema; -use common_expression::TableSchemaRefExt; -use common_expression::Value; -use common_meta_app::schema::TableIdent; -use common_meta_app::schema::TableInfo; -use common_meta_app::schema::TableMeta; -use common_pipeline_core::processors::ProcessorPtr; -use common_pipeline_core::Pipeline; -use common_pipeline_sources::AsyncSource; -use common_pipeline_sources::AsyncSourcer; -use common_sql::binder::resolve_stage_location; -use common_storage::init_stage_operator; -use common_storage::read_metadata_async; -use common_storage::StageFilesInfo; -use common_storages_fuse::table_functions::string_literal; +use databend_common_catalog::plan::DataSourcePlan; +use databend_common_catalog::plan::PartStatistics; +use databend_common_catalog::plan::Partitions; +use databend_common_catalog::plan::PushDownInfo; +use databend_common_catalog::table::Table; +use databend_common_catalog::table_args::TableArgs; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::types::DataType; +use databend_common_expression::types::Int64Type; +use databend_common_expression::types::NumberDataType; +use databend_common_expression::types::StringType; +use databend_common_expression::types::UInt64Type; +use databend_common_expression::types::ValueType; +use databend_common_expression::BlockEntry; +use databend_common_expression::DataBlock; +use databend_common_expression::TableDataType; +use databend_common_expression::TableField; +use databend_common_expression::TableSchema; +use databend_common_expression::TableSchemaRefExt; +use databend_common_expression::Value; +use databend_common_meta_app::schema::TableIdent; +use databend_common_meta_app::schema::TableInfo; +use databend_common_meta_app::schema::TableMeta; +use databend_common_pipeline_core::processors::ProcessorPtr; +use databend_common_pipeline_core::Pipeline; +use databend_common_pipeline_sources::AsyncSource; +use databend_common_pipeline_sources::AsyncSourcer; +use databend_common_sql::binder::resolve_stage_location; +use databend_common_storage::init_stage_operator; +use databend_common_storage::read_metadata_async; +use databend_common_storage::StageFilesInfo; +use databend_common_storages_fuse::table_functions::string_literal; use crate::pipelines::processors::OutputPort; use crate::sessions::TableContext; diff --git a/src/query/service/src/table_functions/list_stage/list_stage_table.rs b/src/query/service/src/table_functions/list_stage/list_stage_table.rs index b5d45ca90165..69055fe7b043 100644 --- a/src/query/service/src/table_functions/list_stage/list_stage_table.rs +++ b/src/query/service/src/table_functions/list_stage/list_stage_table.rs @@ -15,36 +15,36 @@ use std::any::Any; use std::sync::Arc; -use common_catalog::plan::DataSourcePlan; -use common_catalog::plan::PartStatistics; -use common_catalog::plan::Partitions; -use common_catalog::plan::PushDownInfo; -use common_catalog::table::Table; -use common_catalog::table_args::TableArgs; -use common_catalog::table_context::TableContext; -use common_catalog::table_function::TableFunction; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::types::NumberDataType; -use common_expression::types::StringType; -use common_expression::types::UInt64Type; -use common_expression::DataBlock; -use common_expression::FromData; -use common_expression::TableDataType; -use common_expression::TableField; -use common_expression::TableSchema; -use common_expression::TableSchemaRefExt; -use common_meta_app::schema::TableIdent; -use common_meta_app::schema::TableInfo; -use common_meta_app::schema::TableMeta; -use common_pipeline_core::processors::OutputPort; -use common_pipeline_core::processors::ProcessorPtr; -use common_pipeline_core::Pipeline; -use common_pipeline_sources::AsyncSource; -use common_pipeline_sources::AsyncSourcer; -use common_sql::binder::resolve_stage_location; -use common_storage::StageFilesInfo; -use common_storages_stage::StageTable; +use databend_common_catalog::plan::DataSourcePlan; +use databend_common_catalog::plan::PartStatistics; +use databend_common_catalog::plan::Partitions; +use databend_common_catalog::plan::PushDownInfo; +use databend_common_catalog::table::Table; +use databend_common_catalog::table_args::TableArgs; +use databend_common_catalog::table_context::TableContext; +use databend_common_catalog::table_function::TableFunction; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::types::NumberDataType; +use databend_common_expression::types::StringType; +use databend_common_expression::types::UInt64Type; +use databend_common_expression::DataBlock; +use databend_common_expression::FromData; +use databend_common_expression::TableDataType; +use databend_common_expression::TableField; +use databend_common_expression::TableSchema; +use databend_common_expression::TableSchemaRefExt; +use databend_common_meta_app::schema::TableIdent; +use databend_common_meta_app::schema::TableInfo; +use databend_common_meta_app::schema::TableMeta; +use databend_common_pipeline_core::processors::OutputPort; +use databend_common_pipeline_core::processors::ProcessorPtr; +use databend_common_pipeline_core::Pipeline; +use databend_common_pipeline_sources::AsyncSource; +use databend_common_pipeline_sources::AsyncSourcer; +use databend_common_sql::binder::resolve_stage_location; +use databend_common_storage::StageFilesInfo; +use databend_common_storages_stage::StageTable; use crate::table_functions::list_stage::table_args::ListStageArgsParsed; diff --git a/src/query/service/src/table_functions/list_stage/table_args.rs b/src/query/service/src/table_functions/list_stage/table_args.rs index a1e81b5317f9..21554f8d412d 100644 --- a/src/query/service/src/table_functions/list_stage/table_args.rs +++ b/src/query/service/src/table_functions/list_stage/table_args.rs @@ -12,11 +12,11 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_catalog::table_args::TableArgs; -use common_exception::ErrorCode; -use common_exception::Result; -use common_storage::StageFilesInfo; -use common_storages_fuse::table_functions::string_value; +use databend_common_catalog::table_args::TableArgs; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_storage::StageFilesInfo; +use databend_common_storages_fuse::table_functions::string_value; #[derive(Clone)] pub(crate) struct ListStageArgsParsed { diff --git a/src/query/service/src/table_functions/numbers/numbers_part.rs b/src/query/service/src/table_functions/numbers/numbers_part.rs index 9c03228c988f..32d4437b5af4 100644 --- a/src/query/service/src/table_functions/numbers/numbers_part.rs +++ b/src/query/service/src/table_functions/numbers/numbers_part.rs @@ -15,12 +15,12 @@ use std::any::Any; use std::sync::Arc; -use common_catalog::plan::PartInfo; -use common_catalog::plan::PartInfoPtr; -use common_catalog::plan::Partitions; -use common_catalog::plan::PartitionsShuffleKind; -use common_exception::ErrorCode; -use common_exception::Result; +use databend_common_catalog::plan::PartInfo; +use databend_common_catalog::plan::PartInfoPtr; +use databend_common_catalog::plan::Partitions; +use databend_common_catalog::plan::PartitionsShuffleKind; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; #[derive(serde::Serialize, serde::Deserialize, PartialEq, Eq)] pub struct NumbersPartInfo { diff --git a/src/query/service/src/table_functions/numbers/numbers_table.rs b/src/query/service/src/table_functions/numbers/numbers_table.rs index ff6ef69f1a7e..63b5a13d4d2a 100644 --- a/src/query/service/src/table_functions/numbers/numbers_table.rs +++ b/src/query/service/src/table_functions/numbers/numbers_table.rs @@ -19,35 +19,35 @@ use std::sync::Arc; use chrono::NaiveDateTime; use chrono::TimeZone; use chrono::Utc; -use common_catalog::plan::DataSourcePlan; -use common_catalog::plan::PartInfoPtr; -use common_catalog::plan::PartStatistics; -use common_catalog::plan::Partitions; -use common_catalog::plan::PushDownInfo; -use common_catalog::table::TableStatistics; -use common_catalog::table_args::TableArgs; -use common_exception::Result; -use common_expression::type_check::check_number; -use common_expression::types::number::NumberScalar; -use common_expression::types::number::UInt64Type; -use common_expression::types::NumberDataType; -use common_expression::utils::FromData; -use common_expression::DataBlock; -use common_expression::Expr; -use common_expression::FunctionContext; -use common_expression::Scalar; -use common_expression::TableDataType; -use common_expression::TableField; -use common_expression::TableSchemaRefExt; -use common_functions::BUILTIN_FUNCTIONS; -use common_meta_app::schema::TableIdent; -use common_meta_app::schema::TableInfo; -use common_meta_app::schema::TableMeta; -use common_pipeline_core::Pipeline; -use common_pipeline_core::SourcePipeBuilder; -use common_pipeline_sources::EmptySource; -use common_pipeline_sources::SyncSource; -use common_pipeline_sources::SyncSourcer; +use databend_common_catalog::plan::DataSourcePlan; +use databend_common_catalog::plan::PartInfoPtr; +use databend_common_catalog::plan::PartStatistics; +use databend_common_catalog::plan::Partitions; +use databend_common_catalog::plan::PushDownInfo; +use databend_common_catalog::table::TableStatistics; +use databend_common_catalog::table_args::TableArgs; +use databend_common_exception::Result; +use databend_common_expression::type_check::check_number; +use databend_common_expression::types::number::NumberScalar; +use databend_common_expression::types::number::UInt64Type; +use databend_common_expression::types::NumberDataType; +use databend_common_expression::utils::FromData; +use databend_common_expression::DataBlock; +use databend_common_expression::Expr; +use databend_common_expression::FunctionContext; +use databend_common_expression::Scalar; +use databend_common_expression::TableDataType; +use databend_common_expression::TableField; +use databend_common_expression::TableSchemaRefExt; +use databend_common_functions::BUILTIN_FUNCTIONS; +use databend_common_meta_app::schema::TableIdent; +use databend_common_meta_app::schema::TableInfo; +use databend_common_meta_app::schema::TableMeta; +use databend_common_pipeline_core::Pipeline; +use databend_common_pipeline_core::SourcePipeBuilder; +use databend_common_pipeline_sources::EmptySource; +use databend_common_pipeline_sources::SyncSource; +use databend_common_pipeline_sources::SyncSourcer; use super::numbers_part::generate_numbers_parts; use super::NumbersPartInfo; diff --git a/src/query/service/src/table_functions/openai/ai_to_sql.rs b/src/query/service/src/table_functions/openai/ai_to_sql.rs index 469f299ee89a..078f4e46415d 100644 --- a/src/query/service/src/table_functions/openai/ai_to_sql.rs +++ b/src/query/service/src/table_functions/openai/ai_to_sql.rs @@ -18,36 +18,36 @@ use std::sync::Arc; use chrono::NaiveDateTime; use chrono::TimeZone; use chrono::Utc; -use common_catalog::catalog::CATALOG_DEFAULT; -use common_catalog::plan::DataSourcePlan; -use common_catalog::plan::PartStatistics; -use common_catalog::plan::Partitions; -use common_catalog::plan::PushDownInfo; -use common_catalog::table_args::TableArgs; -use common_catalog::table_function::TableFunction; -use common_config::GlobalConfig; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::types::StringType; -use common_expression::DataBlock; -use common_expression::FromData; -use common_expression::TableDataType; -use common_expression::TableField; -use common_expression::TableSchema; -use common_meta_app::schema::TableIdent; -use common_meta_app::schema::TableInfo; -use common_meta_app::schema::TableMeta; -use common_openai::OpenAI; -use common_pipeline_core::processors::OutputPort; -use common_pipeline_core::processors::ProcessorPtr; -use common_pipeline_core::Pipeline; -use common_pipeline_sources::AsyncSource; -use common_pipeline_sources::AsyncSourcer; -use common_storages_factory::Table; -use common_storages_fuse::table_functions::string_literal; -use common_storages_fuse::TableContext; -use common_storages_stream::stream_table::STREAM_ENGINE; -use common_storages_view::view_table::VIEW_ENGINE; +use databend_common_catalog::catalog::CATALOG_DEFAULT; +use databend_common_catalog::plan::DataSourcePlan; +use databend_common_catalog::plan::PartStatistics; +use databend_common_catalog::plan::Partitions; +use databend_common_catalog::plan::PushDownInfo; +use databend_common_catalog::table_args::TableArgs; +use databend_common_catalog::table_function::TableFunction; +use databend_common_config::GlobalConfig; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::types::StringType; +use databend_common_expression::DataBlock; +use databend_common_expression::FromData; +use databend_common_expression::TableDataType; +use databend_common_expression::TableField; +use databend_common_expression::TableSchema; +use databend_common_meta_app::schema::TableIdent; +use databend_common_meta_app::schema::TableInfo; +use databend_common_meta_app::schema::TableMeta; +use databend_common_openai::OpenAI; +use databend_common_pipeline_core::processors::OutputPort; +use databend_common_pipeline_core::processors::ProcessorPtr; +use databend_common_pipeline_core::Pipeline; +use databend_common_pipeline_sources::AsyncSource; +use databend_common_pipeline_sources::AsyncSourcer; +use databend_common_storages_factory::Table; +use databend_common_storages_fuse::table_functions::string_literal; +use databend_common_storages_fuse::TableContext; +use databend_common_storages_stream::stream_table::STREAM_ENGINE; +use databend_common_storages_view::view_table::VIEW_ENGINE; use log::info; pub struct GPT2SQLTable { diff --git a/src/query/service/src/table_functions/others/execute_background_job.rs b/src/query/service/src/table_functions/others/execute_background_job.rs index 6a0ab9bd21df..22e8705a6942 100644 --- a/src/query/service/src/table_functions/others/execute_background_job.rs +++ b/src/query/service/src/table_functions/others/execute_background_job.rs @@ -15,30 +15,30 @@ use std::any::Any; use std::sync::Arc; -use background_service::get_background_service_handler; use chrono::NaiveDateTime; use chrono::TimeZone; use chrono::Utc; -use common_catalog::plan::DataSourcePlan; -use common_catalog::plan::PartStatistics; -use common_catalog::plan::Partitions; -use common_catalog::plan::PushDownInfo; -use common_catalog::table_args::TableArgs; -use common_catalog::table_context::TableContext; -use common_catalog::table_function::TableFunction; -pub use common_exception::Result; -use common_expression::DataBlock; -use common_expression::Scalar; -use common_expression::TableSchemaRefExt; -use common_meta_app::schema::TableIdent; -use common_meta_app::schema::TableInfo; -use common_meta_app::schema::TableMeta; -use common_pipeline_core::processors::OutputPort; -use common_pipeline_core::processors::ProcessorPtr; -use common_pipeline_core::Pipeline; -use common_pipeline_sources::AsyncSource; -use common_pipeline_sources::AsyncSourcer; -use common_storages_factory::Table; +use databend_common_catalog::plan::DataSourcePlan; +use databend_common_catalog::plan::PartStatistics; +use databend_common_catalog::plan::Partitions; +use databend_common_catalog::plan::PushDownInfo; +use databend_common_catalog::table_args::TableArgs; +use databend_common_catalog::table_context::TableContext; +use databend_common_catalog::table_function::TableFunction; +pub use databend_common_exception::Result; +use databend_common_expression::DataBlock; +use databend_common_expression::Scalar; +use databend_common_expression::TableSchemaRefExt; +use databend_common_meta_app::schema::TableIdent; +use databend_common_meta_app::schema::TableInfo; +use databend_common_meta_app::schema::TableMeta; +use databend_common_pipeline_core::processors::OutputPort; +use databend_common_pipeline_core::processors::ProcessorPtr; +use databend_common_pipeline_core::Pipeline; +use databend_common_pipeline_sources::AsyncSource; +use databend_common_pipeline_sources::AsyncSourcer; +use databend_common_storages_factory::Table; +use databend_enterprise_background_service::get_background_service_handler; pub struct ExecuteBackgroundJobTable { job_name: String, diff --git a/src/query/service/src/table_functions/others/license_info.rs b/src/query/service/src/table_functions/others/license_info.rs index e0f26c7be6cd..df62b0207e40 100644 --- a/src/query/service/src/table_functions/others/license_info.rs +++ b/src/query/service/src/table_functions/others/license_info.rs @@ -20,37 +20,37 @@ use std::time::Duration; use chrono::NaiveDateTime; use chrono::TimeZone; use chrono::Utc; -use common_catalog::plan::DataSourcePlan; -use common_catalog::plan::PartStatistics; -use common_catalog::plan::Partitions; -use common_catalog::plan::PushDownInfo; -use common_catalog::table_args::TableArgs; -use common_catalog::table_context::TableContext; -use common_catalog::table_function::TableFunction; -use common_exception::ErrorCode; -pub use common_exception::Result; -use common_exception::ToErrorCode; -use common_expression::types::DataType; -use common_expression::BlockEntry; -use common_expression::DataBlock; -use common_expression::Scalar; -use common_expression::TableDataType; -use common_expression::TableField; -use common_expression::TableSchemaRef; -use common_expression::TableSchemaRefExt; -use common_expression::Value; -use common_license::license::Feature; -use common_license::license::LicenseInfo; -use common_license::license_manager::get_license_manager; -use common_meta_app::schema::TableIdent; -use common_meta_app::schema::TableInfo; -use common_meta_app::schema::TableMeta; -use common_pipeline_core::processors::OutputPort; -use common_pipeline_core::processors::ProcessorPtr; -use common_pipeline_core::Pipeline; -use common_pipeline_sources::AsyncSource; -use common_pipeline_sources::AsyncSourcer; -use common_storages_factory::Table; +use databend_common_catalog::plan::DataSourcePlan; +use databend_common_catalog::plan::PartStatistics; +use databend_common_catalog::plan::Partitions; +use databend_common_catalog::plan::PushDownInfo; +use databend_common_catalog::table_args::TableArgs; +use databend_common_catalog::table_context::TableContext; +use databend_common_catalog::table_function::TableFunction; +use databend_common_exception::ErrorCode; +pub use databend_common_exception::Result; +use databend_common_exception::ToErrorCode; +use databend_common_expression::types::DataType; +use databend_common_expression::BlockEntry; +use databend_common_expression::DataBlock; +use databend_common_expression::Scalar; +use databend_common_expression::TableDataType; +use databend_common_expression::TableField; +use databend_common_expression::TableSchemaRef; +use databend_common_expression::TableSchemaRefExt; +use databend_common_expression::Value; +use databend_common_license::license::Feature; +use databend_common_license::license::LicenseInfo; +use databend_common_license::license_manager::get_license_manager; +use databend_common_meta_app::schema::TableIdent; +use databend_common_meta_app::schema::TableInfo; +use databend_common_meta_app::schema::TableMeta; +use databend_common_pipeline_core::processors::OutputPort; +use databend_common_pipeline_core::processors::ProcessorPtr; +use databend_common_pipeline_core::Pipeline; +use databend_common_pipeline_sources::AsyncSource; +use databend_common_pipeline_sources::AsyncSourcer; +use databend_common_storages_factory::Table; use humantime::Duration as HumanDuration; use jwt_simple::claims::JWTClaims; use jwt_simple::prelude::Clock; diff --git a/src/query/service/src/table_functions/others/suggested_background_compaction_tasks.rs b/src/query/service/src/table_functions/others/suggested_background_compaction_tasks.rs index 98cc2e957972..471e903a31ae 100644 --- a/src/query/service/src/table_functions/others/suggested_background_compaction_tasks.rs +++ b/src/query/service/src/table_functions/others/suggested_background_compaction_tasks.rs @@ -19,9 +19,9 @@ use arrow_array::BooleanArray; use arrow_array::LargeBinaryArray; use arrow_array::PrimitiveArray; use arrow_array::RecordBatch; -use background_service::Suggestion; -use common_exception::Result; -use common_meta_app::schema::TableStatistics; +use databend_common_exception::Result; +use databend_common_meta_app::schema::TableStatistics; +use databend_enterprise_background_service::Suggestion; use log::as_debug; use log::info; diff --git a/src/query/service/src/table_functions/others/suggested_background_tasks.rs b/src/query/service/src/table_functions/others/suggested_background_tasks.rs index 131315ff77dd..6032138024b0 100644 --- a/src/query/service/src/table_functions/others/suggested_background_tasks.rs +++ b/src/query/service/src/table_functions/others/suggested_background_tasks.rs @@ -16,40 +16,40 @@ use std::any::Any; use std::sync::Arc; use arrow_array::RecordBatch; -use background_service::Suggestion; use chrono::NaiveDateTime; use chrono::TimeZone; use chrono::Utc; -use common_catalog::plan::DataSourcePlan; -use common_catalog::plan::PartStatistics; -use common_catalog::plan::Partitions; -use common_catalog::plan::PushDownInfo; -use common_catalog::table_args::TableArgs; -use common_catalog::table_context::TableContext; -use common_catalog::table_function::TableFunction; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::types::BooleanType; -use common_expression::types::StringType; -use common_expression::types::VariantType; -use common_expression::DataBlock; -use common_expression::FromData; -use common_expression::TableDataType; -use common_expression::TableField; -use common_expression::TableSchemaRef; -use common_expression::TableSchemaRefExt; -use common_license::license::Feature; -use common_license::license_manager::get_license_manager; -use common_meta_app::schema::TableIdent; -use common_meta_app::schema::TableInfo; -use common_meta_app::schema::TableMeta; -use common_pipeline_core::processors::OutputPort; -use common_pipeline_core::processors::ProcessorPtr; -use common_pipeline_core::Pipeline; -use common_pipeline_sources::AsyncSource; -use common_pipeline_sources::AsyncSourcer; -use common_sql::Planner; -use common_storages_factory::Table; +use databend_common_catalog::plan::DataSourcePlan; +use databend_common_catalog::plan::PartStatistics; +use databend_common_catalog::plan::Partitions; +use databend_common_catalog::plan::PushDownInfo; +use databend_common_catalog::table_args::TableArgs; +use databend_common_catalog::table_context::TableContext; +use databend_common_catalog::table_function::TableFunction; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::types::BooleanType; +use databend_common_expression::types::StringType; +use databend_common_expression::types::VariantType; +use databend_common_expression::DataBlock; +use databend_common_expression::FromData; +use databend_common_expression::TableDataType; +use databend_common_expression::TableField; +use databend_common_expression::TableSchemaRef; +use databend_common_expression::TableSchemaRefExt; +use databend_common_license::license::Feature; +use databend_common_license::license_manager::get_license_manager; +use databend_common_meta_app::schema::TableIdent; +use databend_common_meta_app::schema::TableInfo; +use databend_common_meta_app::schema::TableMeta; +use databend_common_pipeline_core::processors::OutputPort; +use databend_common_pipeline_core::processors::ProcessorPtr; +use databend_common_pipeline_core::Pipeline; +use databend_common_pipeline_sources::AsyncSource; +use databend_common_pipeline_sources::AsyncSourcer; +use databend_common_sql::Planner; +use databend_common_storages_factory::Table; +use databend_enterprise_background_service::Suggestion; use futures_util::StreamExt; use log::error; use log::info; diff --git a/src/query/service/src/table_functions/others/tenant_quota.rs b/src/query/service/src/table_functions/others/tenant_quota.rs index 666ecd90ddea..a1cd50241efd 100644 --- a/src/query/service/src/table_functions/others/tenant_quota.rs +++ b/src/query/service/src/table_functions/others/tenant_quota.rs @@ -18,40 +18,40 @@ use std::sync::Arc; use chrono::NaiveDateTime; use chrono::TimeZone; use chrono::Utc; -use common_catalog::plan::DataSourcePlan; -use common_catalog::plan::PartStatistics; -use common_catalog::plan::Partitions; -use common_catalog::plan::PushDownInfo; -use common_catalog::table_args::TableArgs; -use common_catalog::table_context::TableContext; -use common_catalog::table_function::TableFunction; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::types::DataType; -use common_expression::types::NumberDataType; -use common_expression::types::UInt32Type; -use common_expression::types::ValueType; -use common_expression::BlockEntry; -use common_expression::DataBlock; -use common_expression::Scalar; -use common_expression::TableDataType; -use common_expression::TableField; -use common_expression::TableSchemaRef; -use common_expression::TableSchemaRefExt; -use common_expression::Value; -use common_meta_app::principal::UserOptionFlag; -use common_meta_app::schema::TableIdent; -use common_meta_app::schema::TableInfo; -use common_meta_app::schema::TableMeta; -use common_meta_app::tenant::TenantQuota; -use common_meta_types::MatchSeq; -use common_pipeline_core::processors::OutputPort; -use common_pipeline_core::processors::ProcessorPtr; -use common_pipeline_core::Pipeline; -use common_pipeline_sources::AsyncSource; -use common_pipeline_sources::AsyncSourcer; -use common_storages_factory::Table; -use common_users::UserApiProvider; +use databend_common_catalog::plan::DataSourcePlan; +use databend_common_catalog::plan::PartStatistics; +use databend_common_catalog::plan::Partitions; +use databend_common_catalog::plan::PushDownInfo; +use databend_common_catalog::table_args::TableArgs; +use databend_common_catalog::table_context::TableContext; +use databend_common_catalog::table_function::TableFunction; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::types::DataType; +use databend_common_expression::types::NumberDataType; +use databend_common_expression::types::UInt32Type; +use databend_common_expression::types::ValueType; +use databend_common_expression::BlockEntry; +use databend_common_expression::DataBlock; +use databend_common_expression::Scalar; +use databend_common_expression::TableDataType; +use databend_common_expression::TableField; +use databend_common_expression::TableSchemaRef; +use databend_common_expression::TableSchemaRefExt; +use databend_common_expression::Value; +use databend_common_meta_app::principal::UserOptionFlag; +use databend_common_meta_app::schema::TableIdent; +use databend_common_meta_app::schema::TableInfo; +use databend_common_meta_app::schema::TableMeta; +use databend_common_meta_app::tenant::TenantQuota; +use databend_common_meta_types::MatchSeq; +use databend_common_pipeline_core::processors::OutputPort; +use databend_common_pipeline_core::processors::ProcessorPtr; +use databend_common_pipeline_core::Pipeline; +use databend_common_pipeline_sources::AsyncSource; +use databend_common_pipeline_sources::AsyncSourcer; +use databend_common_storages_factory::Table; +use databend_common_users::UserApiProvider; pub struct TenantQuotaTable { table_info: TableInfo, diff --git a/src/query/service/src/table_functions/srf/range.rs b/src/query/service/src/table_functions/srf/range.rs index 1bc6eb7e558f..f84094cbd6d1 100644 --- a/src/query/service/src/table_functions/srf/range.rs +++ b/src/query/service/src/table_functions/srf/range.rs @@ -19,36 +19,36 @@ use std::sync::Arc; use chrono::NaiveDateTime; use chrono::TimeZone; use chrono::Utc; -use common_catalog::plan::DataSourcePlan; -use common_catalog::plan::PartStatistics; -use common_catalog::plan::Partitions; -use common_catalog::plan::PushDownInfo; -use common_catalog::table_args::TableArgs; -use common_catalog::table_function::TableFunction; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::infer_schema_type; -use common_expression::type_check::check_number; -use common_expression::types::*; -use common_expression::DataBlock; -use common_expression::Expr; -use common_expression::FromData; -use common_expression::FunctionContext; -use common_expression::Scalar; -use common_expression::TableField; -use common_expression::TableSchema; -use common_functions::BUILTIN_FUNCTIONS; -use common_meta_app::schema::TableIdent; -use common_meta_app::schema::TableInfo; -use common_meta_app::schema::TableMeta; -use common_pipeline_core::processors::OutputPort; -use common_pipeline_core::processors::ProcessorPtr; -use common_pipeline_core::Pipeline; -use common_pipeline_sources::SyncSource; -use common_pipeline_sources::SyncSourcer; -use common_sql::validate_function_arg; -use common_storages_factory::Table; -use common_storages_fuse::TableContext; +use databend_common_catalog::plan::DataSourcePlan; +use databend_common_catalog::plan::PartStatistics; +use databend_common_catalog::plan::Partitions; +use databend_common_catalog::plan::PushDownInfo; +use databend_common_catalog::table_args::TableArgs; +use databend_common_catalog::table_function::TableFunction; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::infer_schema_type; +use databend_common_expression::type_check::check_number; +use databend_common_expression::types::*; +use databend_common_expression::DataBlock; +use databend_common_expression::Expr; +use databend_common_expression::FromData; +use databend_common_expression::FunctionContext; +use databend_common_expression::Scalar; +use databend_common_expression::TableField; +use databend_common_expression::TableSchema; +use databend_common_functions::BUILTIN_FUNCTIONS; +use databend_common_meta_app::schema::TableIdent; +use databend_common_meta_app::schema::TableInfo; +use databend_common_meta_app::schema::TableMeta; +use databend_common_pipeline_core::processors::OutputPort; +use databend_common_pipeline_core::processors::ProcessorPtr; +use databend_common_pipeline_core::Pipeline; +use databend_common_pipeline_sources::SyncSource; +use databend_common_pipeline_sources::SyncSourcer; +use databend_common_sql::validate_function_arg; +use databend_common_storages_factory::Table; +use databend_common_storages_fuse::TableContext; use itertools::Itertools; pub struct RangeTable { diff --git a/src/query/service/src/table_functions/sync_crash_me.rs b/src/query/service/src/table_functions/sync_crash_me.rs index c22eeedca064..131fa7999839 100644 --- a/src/query/service/src/table_functions/sync_crash_me.rs +++ b/src/query/service/src/table_functions/sync_crash_me.rs @@ -21,22 +21,22 @@ use std::task::Poll; use chrono::NaiveDateTime; use chrono::TimeZone; use chrono::Utc; -use common_catalog::plan::DataSourcePlan; -use common_catalog::plan::PartStatistics; -use common_catalog::plan::Partitions; -use common_catalog::plan::PushDownInfo; -use common_catalog::table_args::TableArgs; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::DataBlock; -use common_expression::Scalar; -use common_expression::TableSchemaRefExt; -use common_meta_app::schema::TableIdent; -use common_meta_app::schema::TableInfo; -use common_meta_app::schema::TableMeta; -use common_pipeline_core::Pipeline; -use common_pipeline_sources::SyncSource; -use common_pipeline_sources::SyncSourcer; +use databend_common_catalog::plan::DataSourcePlan; +use databend_common_catalog::plan::PartStatistics; +use databend_common_catalog::plan::Partitions; +use databend_common_catalog::plan::PushDownInfo; +use databend_common_catalog::table_args::TableArgs; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::DataBlock; +use databend_common_expression::Scalar; +use databend_common_expression::TableSchemaRefExt; +use databend_common_meta_app::schema::TableIdent; +use databend_common_meta_app::schema::TableInfo; +use databend_common_meta_app::schema::TableMeta; +use databend_common_pipeline_core::Pipeline; +use databend_common_pipeline_sources::SyncSource; +use databend_common_pipeline_sources::SyncSourcer; use futures::Stream; use crate::pipelines::processors::OutputPort; diff --git a/src/query/service/src/table_functions/table_function.rs b/src/query/service/src/table_functions/table_function.rs index 7263da908c80..d542f6c7cad7 100644 --- a/src/query/service/src/table_functions/table_function.rs +++ b/src/query/service/src/table_functions/table_function.rs @@ -12,4 +12,4 @@ // See the License for the specific language governing permissions and // limitations under the License. -pub use common_catalog::table_function::TableFunction; +pub use databend_common_catalog::table_function::TableFunction; diff --git a/src/query/service/src/table_functions/table_function_factory.rs b/src/query/service/src/table_functions/table_function_factory.rs index 325962733a73..1945dff4e4c4 100644 --- a/src/query/service/src/table_functions/table_function_factory.rs +++ b/src/query/service/src/table_functions/table_function_factory.rs @@ -15,13 +15,13 @@ use std::collections::HashMap; use std::sync::Arc; -use common_catalog::table_args::TableArgs; -use common_exception::ErrorCode; -use common_exception::Result; -use common_meta_types::MetaId; -use common_storages_fuse::table_functions::FuseColumnTable; -use common_storages_fuse::table_functions::FuseEncodingTable; -use common_storages_stream::stream_status_table_func::StreamStatusTable; +use databend_common_catalog::table_args::TableArgs; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_meta_types::MetaId; +use databend_common_storages_fuse::table_functions::FuseColumnTable; +use databend_common_storages_fuse::table_functions::FuseEncodingTable; +use databend_common_storages_stream::stream_status_table_func::StreamStatusTable; use itertools::Itertools; use parking_lot::RwLock; diff --git a/src/query/service/src/test_kits/block_writer.rs b/src/query/service/src/test_kits/block_writer.rs index 285311051544..e8879292617a 100644 --- a/src/query/service/src/test_kits/block_writer.rs +++ b/src/query/service/src/test_kits/block_writer.rs @@ -13,27 +13,27 @@ // limitations under the License. use chrono::Utc; -use common_arrow::parquet::metadata::ThriftFileMetaData; -use common_exception::Result; -use common_expression::DataBlock; -use common_expression::FunctionContext; -use common_expression::TableSchemaRef; -use common_io::constants::DEFAULT_BLOCK_BUFFER_SIZE; -use common_io::constants::DEFAULT_BLOCK_INDEX_BUFFER_SIZE; -use common_sql::BloomIndexColumns; -use common_storages_fuse::io::serialize_block; -use common_storages_fuse::io::TableMetaLocationGenerator; -use common_storages_fuse::io::WriteSettings; -use common_storages_fuse::FuseStorageFormat; +use databend_common_arrow::parquet::metadata::ThriftFileMetaData; +use databend_common_exception::Result; +use databend_common_expression::DataBlock; +use databend_common_expression::FunctionContext; +use databend_common_expression::TableSchemaRef; +use databend_common_io::constants::DEFAULT_BLOCK_BUFFER_SIZE; +use databend_common_io::constants::DEFAULT_BLOCK_INDEX_BUFFER_SIZE; +use databend_common_sql::BloomIndexColumns; +use databend_common_storages_fuse::io::serialize_block; +use databend_common_storages_fuse::io::TableMetaLocationGenerator; +use databend_common_storages_fuse::io::WriteSettings; +use databend_common_storages_fuse::FuseStorageFormat; +use databend_storages_common_blocks::blocks_to_parquet; +use databend_storages_common_index::BloomIndex; +use databend_storages_common_table_meta::meta::BlockMeta; +use databend_storages_common_table_meta::meta::ClusterStatistics; +use databend_storages_common_table_meta::meta::Compression; +use databend_storages_common_table_meta::meta::Location; +use databend_storages_common_table_meta::meta::StatisticsOfColumns; +use databend_storages_common_table_meta::table::TableCompression; use opendal::Operator; -use storages_common_blocks::blocks_to_parquet; -use storages_common_index::BloomIndex; -use storages_common_table_meta::meta::BlockMeta; -use storages_common_table_meta::meta::ClusterStatistics; -use storages_common_table_meta::meta::Compression; -use storages_common_table_meta::meta::Location; -use storages_common_table_meta::meta::StatisticsOfColumns; -use storages_common_table_meta::table::TableCompression; use uuid::Uuid; pub struct BlockWriter<'a> { diff --git a/src/query/service/src/test_kits/check.rs b/src/query/service/src/test_kits/check.rs index c645c5da5ef9..e4d0adf8caff 100644 --- a/src/query/service/src/test_kits/check.rs +++ b/src/query/service/src/test_kits/check.rs @@ -14,19 +14,19 @@ use std::str; -use common_config::GlobalConfig; -use common_exception::Result; -use common_expression::block_debug::assert_blocks_sorted_eq_with_name; -use common_expression::DataBlock; -use common_expression::SendableDataBlockStream; -use common_meta_app::storage::StorageParams; -use common_storages_fuse::FuseTable; -use common_storages_fuse::FUSE_TBL_BLOCK_PREFIX; -use common_storages_fuse::FUSE_TBL_LAST_SNAPSHOT_HINT; -use common_storages_fuse::FUSE_TBL_SEGMENT_PREFIX; -use common_storages_fuse::FUSE_TBL_SNAPSHOT_PREFIX; -use common_storages_fuse::FUSE_TBL_SNAPSHOT_STATISTICS_PREFIX; -use common_storages_fuse::FUSE_TBL_XOR_BLOOM_INDEX_PREFIX; +use databend_common_config::GlobalConfig; +use databend_common_exception::Result; +use databend_common_expression::block_debug::assert_blocks_sorted_eq_with_name; +use databend_common_expression::DataBlock; +use databend_common_expression::SendableDataBlockStream; +use databend_common_meta_app::storage::StorageParams; +use databend_common_storages_fuse::FuseTable; +use databend_common_storages_fuse::FUSE_TBL_BLOCK_PREFIX; +use databend_common_storages_fuse::FUSE_TBL_LAST_SNAPSHOT_HINT; +use databend_common_storages_fuse::FUSE_TBL_SEGMENT_PREFIX; +use databend_common_storages_fuse::FUSE_TBL_SNAPSHOT_PREFIX; +use databend_common_storages_fuse::FUSE_TBL_SNAPSHOT_STATISTICS_PREFIX; +use databend_common_storages_fuse::FUSE_TBL_XOR_BLOOM_INDEX_PREFIX; use futures::TryStreamExt; use walkdir::WalkDir; diff --git a/src/query/service/src/test_kits/cluster.rs b/src/query/service/src/test_kits/cluster.rs index 489b372e8c57..6ed59918fa10 100644 --- a/src/query/service/src/test_kits/cluster.rs +++ b/src/query/service/src/test_kits/cluster.rs @@ -14,8 +14,8 @@ use std::sync::Arc; -use common_config::DATABEND_COMMIT_VERSION; -use common_meta_types::NodeInfo; +use databend_common_config::DATABEND_COMMIT_VERSION; +use databend_common_meta_types::NodeInfo; /// A descriptor for a cluster. #[derive(Clone)] diff --git a/src/query/service/src/test_kits/config.rs b/src/query/service/src/test_kits/config.rs index 5d5e4e05d1eb..e90f1cf8a1a4 100644 --- a/src/query/service/src/test_kits/config.rs +++ b/src/query/service/src/test_kits/config.rs @@ -14,12 +14,12 @@ use std::collections::HashMap; -use common_base::base::GlobalUniqName; -use common_config::InnerConfig; -use common_meta_app::principal::AuthInfo; -use common_meta_app::storage::StorageFsConfig; -use common_meta_app::storage::StorageParams; -use common_users::idm_config::IDMConfig; +use databend_common_base::base::GlobalUniqName; +use databend_common_config::InnerConfig; +use databend_common_meta_app::principal::AuthInfo; +use databend_common_meta_app::storage::StorageFsConfig; +use databend_common_meta_app::storage::StorageParams; +use databend_common_users::idm_config::IDMConfig; use tempfile::TempDir; pub struct ConfigBuilder { @@ -30,7 +30,7 @@ impl ConfigBuilder { pub fn create() -> ConfigBuilder { let mut conf = InnerConfig::default(); conf.query.tenant_id = "test".to_string(); - conf.log = common_tracing::Config::new_testing(); + conf.log = databend_common_tracing::Config::new_testing(); // add idm users for test let mut users = HashMap::new(); users.insert("root".to_string(), AuthInfo::None); diff --git a/src/query/service/src/test_kits/context.rs b/src/query/service/src/test_kits/context.rs index b64542bb3787..d369bee24d72 100644 --- a/src/query/service/src/test_kits/context.rs +++ b/src/query/service/src/test_kits/context.rs @@ -15,10 +15,10 @@ use std::str; use std::sync::Arc; -use common_catalog::table_context::TableContext; -use common_exception::Result; -use common_expression::DataBlock; -use common_expression::SendableDataBlockStream; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::Result; +use databend_common_expression::DataBlock; +use databend_common_expression::SendableDataBlockStream; use futures::TryStreamExt; use crate::interpreters::InterpreterFactory; diff --git a/src/query/service/src/test_kits/fixture.rs b/src/query/service/src/test_kits/fixture.rs index 802dcee386f9..9b640179d357 100644 --- a/src/query/service/src/test_kits/fixture.rs +++ b/src/query/service/src/test_kits/fixture.rs @@ -16,53 +16,53 @@ use std::collections::VecDeque; use std::str; use std::sync::Arc; -use common_ast::ast::Engine; -use common_catalog::catalog_kind::CATALOG_DEFAULT; -use common_catalog::cluster_info::Cluster; -use common_catalog::table::AppendMode; -use common_config::InnerConfig; -use common_exception::Result; -use common_expression::infer_table_schema; -use common_expression::types::number::Int32Type; -use common_expression::types::number::Int64Type; -use common_expression::types::string::StringColumnBuilder; -use common_expression::types::DataType; -use common_expression::types::NumberDataType; -use common_expression::types::StringType; -use common_expression::Column; -use common_expression::ComputedExpr; -use common_expression::DataBlock; -use common_expression::DataField; -use common_expression::DataSchemaRef; -use common_expression::DataSchemaRefExt; -use common_expression::FromData; -use common_expression::SendableDataBlockStream; -use common_expression::TableDataType; -use common_expression::TableField; -use common_expression::TableSchemaRef; -use common_expression::TableSchemaRefExt; -use common_license::license_manager::LicenseManager; -use common_license::license_manager::OssLicenseManager; -use common_meta_app::principal::AuthInfo; -use common_meta_app::principal::GrantObject; -use common_meta_app::principal::PasswordHashMethod; -use common_meta_app::principal::UserInfo; -use common_meta_app::principal::UserPrivilegeSet; -use common_meta_app::schema::DatabaseMeta; -use common_meta_app::storage::StorageParams; -use common_pipeline_core::processors::ProcessorPtr; -use common_pipeline_sinks::EmptySink; -use common_pipeline_sources::BlocksSource; -use common_sql::plans::CreateDatabasePlan; -use common_sql::plans::CreateTablePlan; -use common_tracing::set_panic_hook; +use databend_common_ast::ast::Engine; +use databend_common_catalog::catalog_kind::CATALOG_DEFAULT; +use databend_common_catalog::cluster_info::Cluster; +use databend_common_catalog::table::AppendMode; +use databend_common_config::InnerConfig; +use databend_common_exception::Result; +use databend_common_expression::infer_table_schema; +use databend_common_expression::types::number::Int32Type; +use databend_common_expression::types::number::Int64Type; +use databend_common_expression::types::string::StringColumnBuilder; +use databend_common_expression::types::DataType; +use databend_common_expression::types::NumberDataType; +use databend_common_expression::types::StringType; +use databend_common_expression::Column; +use databend_common_expression::ComputedExpr; +use databend_common_expression::DataBlock; +use databend_common_expression::DataField; +use databend_common_expression::DataSchemaRef; +use databend_common_expression::DataSchemaRefExt; +use databend_common_expression::FromData; +use databend_common_expression::SendableDataBlockStream; +use databend_common_expression::TableDataType; +use databend_common_expression::TableField; +use databend_common_expression::TableSchemaRef; +use databend_common_expression::TableSchemaRefExt; +use databend_common_license::license_manager::LicenseManager; +use databend_common_license::license_manager::OssLicenseManager; +use databend_common_meta_app::principal::AuthInfo; +use databend_common_meta_app::principal::GrantObject; +use databend_common_meta_app::principal::PasswordHashMethod; +use databend_common_meta_app::principal::UserInfo; +use databend_common_meta_app::principal::UserPrivilegeSet; +use databend_common_meta_app::schema::DatabaseMeta; +use databend_common_meta_app::storage::StorageParams; +use databend_common_pipeline_core::processors::ProcessorPtr; +use databend_common_pipeline_sinks::EmptySink; +use databend_common_pipeline_sources::BlocksSource; +use databend_common_sql::plans::CreateDatabasePlan; +use databend_common_sql::plans::CreateTablePlan; +use databend_common_tracing::set_panic_hook; +use databend_storages_common_table_meta::table::OPT_KEY_DATABASE_ID; use futures::TryStreamExt; use jsonb::Number as JsonbNumber; use jsonb::Object as JsonbObject; use jsonb::Value as JsonbValue; use log::info; use parking_lot::Mutex; -use storages_common_table_meta::table::OPT_KEY_DATABASE_ID; use uuid::Uuid; use crate::clusters::ClusterDiscovery; @@ -110,7 +110,7 @@ impl TestGuard { impl Drop for TestGuard { fn drop(&mut self) { #[cfg(debug_assertions)] - common_base::base::GlobalInstance::drop_testing(&self._thread_name); + databend_common_base::base::GlobalInstance::drop_testing(&self._thread_name); } } @@ -205,7 +205,7 @@ impl TestFixture { #[cfg(debug_assertions)] { let thread_name = std::thread::current().name().unwrap().to_string(); - common_base::base::GlobalInstance::init_testing(&thread_name); + databend_common_base::base::GlobalInstance::init_testing(&thread_name); } GlobalServices::init_with(config).await?; diff --git a/src/query/service/src/test_kits/fuse.rs b/src/query/service/src/test_kits/fuse.rs index 1577c0a5da07..41983ebd10b5 100644 --- a/src/query/service/src/test_kits/fuse.rs +++ b/src/query/service/src/test_kits/fuse.rs @@ -19,34 +19,34 @@ use std::vec; use chrono::DateTime; use chrono::Duration; use chrono::Utc; -use common_exception::Result; -use common_expression::types::NumberScalar; -use common_expression::BlockThresholds; -use common_expression::DataBlock; -use common_expression::ScalarRef; -use common_expression::SendableDataBlockStream; -use common_sql::plans::DeletePlan; -use common_sql::plans::UpdatePlan; -use common_storages_factory::Table; -use common_storages_fuse::io::MetaWriter; -use common_storages_fuse::io::SegmentWriter; -use common_storages_fuse::statistics::gen_columns_statistics; -use common_storages_fuse::statistics::merge_statistics; -use common_storages_fuse::statistics::reducers::reduce_block_metas; -use common_storages_fuse::FuseStorageFormat; -use common_storages_fuse::FuseTable; -use common_storages_fuse::FUSE_TBL_SEGMENT_PREFIX; +use databend_common_exception::Result; +use databend_common_expression::types::NumberScalar; +use databend_common_expression::BlockThresholds; +use databend_common_expression::DataBlock; +use databend_common_expression::ScalarRef; +use databend_common_expression::SendableDataBlockStream; +use databend_common_sql::plans::DeletePlan; +use databend_common_sql::plans::UpdatePlan; +use databend_common_storages_factory::Table; +use databend_common_storages_fuse::io::MetaWriter; +use databend_common_storages_fuse::io::SegmentWriter; +use databend_common_storages_fuse::statistics::gen_columns_statistics; +use databend_common_storages_fuse::statistics::merge_statistics; +use databend_common_storages_fuse::statistics::reducers::reduce_block_metas; +use databend_common_storages_fuse::FuseStorageFormat; +use databend_common_storages_fuse::FuseTable; +use databend_common_storages_fuse::FUSE_TBL_SEGMENT_PREFIX; +use databend_storages_common_table_meta::meta::testing::SegmentInfoV2; +use databend_storages_common_table_meta::meta::testing::TableSnapshotV2; +use databend_storages_common_table_meta::meta::BlockMeta; +use databend_storages_common_table_meta::meta::Location; +use databend_storages_common_table_meta::meta::SegmentInfo; +use databend_storages_common_table_meta::meta::Statistics; +use databend_storages_common_table_meta::meta::TableSnapshot; +use databend_storages_common_table_meta::meta::Versioned; use futures_util::TryStreamExt; use opendal::Operator; use serde::Serialize; -use storages_common_table_meta::meta::testing::SegmentInfoV2; -use storages_common_table_meta::meta::testing::TableSnapshotV2; -use storages_common_table_meta::meta::BlockMeta; -use storages_common_table_meta::meta::Location; -use storages_common_table_meta::meta::SegmentInfo; -use storages_common_table_meta::meta::Statistics; -use storages_common_table_meta::meta::TableSnapshot; -use storages_common_table_meta::meta::Versioned; use uuid::Uuid; use super::block_writer::BlockWriter; diff --git a/src/query/service/tests/it/api/http/cluster.rs b/src/query/service/tests/it/api/http/cluster.rs index f054cf9bd690..39c7edba60d8 100644 --- a/src/query/service/tests/it/api/http/cluster.rs +++ b/src/query/service/tests/it/api/http/cluster.rs @@ -12,9 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_base::base::tokio; -use common_exception::Result; -use common_meta_types::NodeInfo; +use databend_common_base::base::tokio; +use databend_common_exception::Result; +use databend_common_meta_types::NodeInfo; use databend_query::api::http::v1::cluster::*; use databend_query::test_kits::*; use poem::get; diff --git a/src/query/service/tests/it/api/http/config.rs b/src/query/service/tests/it/api/http/config.rs index 46f34b75757f..9976983f3d2d 100644 --- a/src/query/service/tests/it/api/http/config.rs +++ b/src/query/service/tests/it/api/http/config.rs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_base::base::tokio; +use databend_common_base::base::tokio; use databend_query::api::http::v1::config::config_handler; use databend_query::test_kits::*; use poem::get; @@ -25,7 +25,7 @@ use poem::Route; use pretty_assertions::assert_eq; // for `app.oneshot()` #[tokio::test(flavor = "multi_thread")] -async fn test_config() -> common_exception::Result<()> { +async fn test_config() -> databend_common_exception::Result<()> { let _fixture = TestFixture::setup().await?; let cluster_router = Route::new().at("/v1/config", get(config_handler)); diff --git a/src/query/service/tests/it/api/http/logs.rs b/src/query/service/tests/it/api/http/logs.rs index b5feb41bba56..95f6ee8d9f70 100644 --- a/src/query/service/tests/it/api/http/logs.rs +++ b/src/query/service/tests/it/api/http/logs.rs @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_base::base::tokio; -use common_exception::Result; +use databend_common_base::base::tokio; +use databend_common_exception::Result; use databend_query::api::http::v1::logs::logs_handler; use databend_query::test_kits::*; use poem::get; diff --git a/src/query/service/tests/it/api/http/status.rs b/src/query/service/tests/it/api/http/status.rs index 50ed893e617e..7fec056ef6dd 100644 --- a/src/query/service/tests/it/api/http/status.rs +++ b/src/query/service/tests/it/api/http/status.rs @@ -14,10 +14,10 @@ use std::sync::Arc; -use common_base::base::tokio; -use common_exception::Result; -use common_meta_app::principal::UserIdentity; -use common_users::UserApiProvider; +use databend_common_base::base::tokio; +use databend_common_exception::Result; +use databend_common_meta_app::principal::UserIdentity; +use databend_common_users::UserApiProvider; use databend_query::api::http::v1::instance_status::instance_status_handler; use databend_query::api::http::v1::instance_status::InstanceStatus; use databend_query::interpreters::Interpreter; diff --git a/src/query/service/tests/it/api/http_service.rs b/src/query/service/tests/it/api/http_service.rs index 19da5f27ff4f..c85f7e42e30c 100644 --- a/src/query/service/tests/it/api/http_service.rs +++ b/src/query/service/tests/it/api/http_service.rs @@ -15,9 +15,9 @@ use std::fs::File; use std::io::Read; -use common_base::base::get_free_tcp_port; -use common_base::base::tokio; -use common_exception::Result; +use databend_common_base::base::get_free_tcp_port; +use databend_common_base::base::tokio; +use databend_common_exception::Result; use databend_query::api::HttpService; use databend_query::servers::Server; use databend_query::test_kits::*; diff --git a/src/query/service/tests/it/api/rpc_service.rs b/src/query/service/tests/it/api/rpc_service.rs index 72f706daaf2c..cd8f95b02228 100644 --- a/src/query/service/tests/it/api/rpc_service.rs +++ b/src/query/service/tests/it/api/rpc_service.rs @@ -17,14 +17,14 @@ use std::net::TcpListener; use std::str::FromStr; use std::sync::Arc; -use common_arrow::arrow_format::flight::data::Empty; -use common_arrow::arrow_format::flight::service::flight_service_client::FlightServiceClient; -use common_base::base::tokio; -use common_exception::ErrorCode; -use common_exception::Result; -use common_grpc::ConnectionFactory; -use common_grpc::GrpcConnectionError; -use common_grpc::RpcClientTlsConfig; +use databend_common_arrow::arrow_format::flight::data::Empty; +use databend_common_arrow::arrow_format::flight::service::flight_service_client::FlightServiceClient; +use databend_common_base::base::tokio; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_grpc::ConnectionFactory; +use databend_common_grpc::GrpcConnectionError; +use databend_common_grpc::RpcClientTlsConfig; use databend_query::api::RpcService; use databend_query::test_kits::*; diff --git a/src/query/service/tests/it/auth.rs b/src/query/service/tests/it/auth.rs index 0336686eb95d..1f5722b3e510 100644 --- a/src/query/service/tests/it/auth.rs +++ b/src/query/service/tests/it/auth.rs @@ -14,13 +14,13 @@ use base64::engine::general_purpose; use base64::prelude::*; -use common_base::base::tokio; -use common_exception::Result; -use common_meta_app::principal::AuthInfo; -use common_meta_app::principal::UserInfo; -use common_users::CustomClaims; -use common_users::EnsureUser; -use common_users::UserApiProvider; +use databend_common_base::base::tokio; +use databend_common_exception::Result; +use databend_common_meta_app::principal::AuthInfo; +use databend_common_meta_app::principal::UserInfo; +use databend_common_users::CustomClaims; +use databend_common_users::EnsureUser; +use databend_common_users::UserApiProvider; use databend_query::auth::AuthMgr; use databend_query::auth::Credential; use databend_query::sessions::TableContext; diff --git a/src/query/service/tests/it/catalogs/database_catalog.rs b/src/query/service/tests/it/catalogs/database_catalog.rs index ba289e6fa9ea..74d1957a5f3e 100644 --- a/src/query/service/tests/it/catalogs/database_catalog.rs +++ b/src/query/service/tests/it/catalogs/database_catalog.rs @@ -15,21 +15,21 @@ use std::sync::Arc; use chrono::Utc; -use common_base::base::tokio; -use common_exception::Result; -use common_expression::types::NumberDataType; -use common_expression::TableDataType; -use common_expression::TableField; -use common_expression::TableSchema; -use common_meta_app::schema::CreateDatabaseReq; -use common_meta_app::schema::CreateTableReq; -use common_meta_app::schema::DatabaseMeta; -use common_meta_app::schema::DatabaseNameIdent; -use common_meta_app::schema::DropDatabaseReq; -use common_meta_app::schema::DropTableByIdReq; -use common_meta_app::schema::RenameDatabaseReq; -use common_meta_app::schema::TableMeta; -use common_meta_app::schema::TableNameIdent; +use databend_common_base::base::tokio; +use databend_common_exception::Result; +use databend_common_expression::types::NumberDataType; +use databend_common_expression::TableDataType; +use databend_common_expression::TableField; +use databend_common_expression::TableSchema; +use databend_common_meta_app::schema::CreateDatabaseReq; +use databend_common_meta_app::schema::CreateTableReq; +use databend_common_meta_app::schema::DatabaseMeta; +use databend_common_meta_app::schema::DatabaseNameIdent; +use databend_common_meta_app::schema::DropDatabaseReq; +use databend_common_meta_app::schema::DropTableByIdReq; +use databend_common_meta_app::schema::RenameDatabaseReq; +use databend_common_meta_app::schema::TableMeta; +use databend_common_meta_app::schema::TableNameIdent; use databend_query::catalogs::Catalog; use crate::tests::create_catalog; diff --git a/src/query/service/tests/it/catalogs/immutable_catalogs.rs b/src/query/service/tests/it/catalogs/immutable_catalogs.rs index e13c8e1ba136..2fe15a54a543 100644 --- a/src/query/service/tests/it/catalogs/immutable_catalogs.rs +++ b/src/query/service/tests/it/catalogs/immutable_catalogs.rs @@ -12,12 +12,12 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_base::base::tokio; -use common_exception::Result; -use common_meta_app::schema::CreateDatabaseReq; -use common_meta_app::schema::DatabaseNameIdent; -use common_meta_app::schema::DropDatabaseReq; -use common_meta_app::schema::RenameDatabaseReq; +use databend_common_base::base::tokio; +use databend_common_exception::Result; +use databend_common_meta_app::schema::CreateDatabaseReq; +use databend_common_meta_app::schema::DatabaseNameIdent; +use databend_common_meta_app::schema::DropDatabaseReq; +use databend_common_meta_app::schema::RenameDatabaseReq; use databend_query::catalogs::default::ImmutableCatalog; use databend_query::catalogs::Catalog; diff --git a/src/query/service/tests/it/clusters.rs b/src/query/service/tests/it/clusters.rs index df6686e5b86b..e9242b7a747d 100644 --- a/src/query/service/tests/it/clusters.rs +++ b/src/query/service/tests/it/clusters.rs @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_base::base::tokio; -use common_exception::Result; +use databend_common_base::base::tokio; +use databend_common_exception::Result; use databend_query::clusters::ClusterDiscovery; use databend_query::clusters::ClusterHelper; use databend_query::test_kits::*; diff --git a/src/query/service/tests/it/configs.rs b/src/query/service/tests/it/configs.rs index 5db766c0617b..f91df5f9f4f5 100644 --- a/src/query/service/tests/it/configs.rs +++ b/src/query/service/tests/it/configs.rs @@ -17,14 +17,14 @@ use std::env::temp_dir; use std::fs; use std::io::Write; -use common_config::CacheConfig; -use common_config::CacheStorageTypeConfig; -use common_config::CatalogConfig; -use common_config::CatalogHiveConfig; -use common_config::InnerConfig; -use common_config::ThriftProtocol; -use common_exception::ErrorCode; -use common_exception::Result; +use databend_common_config::CacheConfig; +use databend_common_config::CacheStorageTypeConfig; +use databend_common_config::CatalogConfig; +use databend_common_config::CatalogHiveConfig; +use databend_common_config::InnerConfig; +use databend_common_config::ThriftProtocol; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; use pretty_assertions::assert_eq; // From env, defaulting. diff --git a/src/query/service/tests/it/databases/system/system_database.rs b/src/query/service/tests/it/databases/system/system_database.rs index 66412f7e76ee..03b6d0c83a43 100644 --- a/src/query/service/tests/it/databases/system/system_database.rs +++ b/src/query/service/tests/it/databases/system/system_database.rs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_exception::Result; +use databend_common_exception::Result; use databend_query::catalogs::InMemoryMetas; use databend_query::catalogs::SYS_DB_ID_BEGIN; use databend_query::catalogs::SYS_TBL_ID_BEGIN; diff --git a/src/query/service/tests/it/distributed/cluster.rs b/src/query/service/tests/it/distributed/cluster.rs index bd503910e529..c44a0712d516 100644 --- a/src/query/service/tests/it/distributed/cluster.rs +++ b/src/query/service/tests/it/distributed/cluster.rs @@ -14,11 +14,11 @@ use std::thread; -use common_base::base::tokio; -use common_config::InnerConfig; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::DataBlock; +use databend_common_base::base::tokio; +use databend_common_config::InnerConfig; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::DataBlock; use databend_query::api::RpcService; use databend_query::test_kits::*; use futures_util::TryStreamExt; @@ -86,7 +86,7 @@ fn test_simple_cluster() -> Result<()> { "| 'node5' | '0.0.0.0' | 6065 |", "+----------+-----------+----------+", ]; - common_expression::block_debug::assert_blocks_sorted_eq( + databend_common_expression::block_debug::assert_blocks_sorted_eq( expected, blocks.as_slice(), ); diff --git a/src/query/service/tests/it/frame/dataframe.rs b/src/query/service/tests/it/frame/dataframe.rs index ef6156e27c6b..c482126556dc 100644 --- a/src/query/service/tests/it/frame/dataframe.rs +++ b/src/query/service/tests/it/frame/dataframe.rs @@ -16,19 +16,19 @@ use std::io::Write; // use std::sync::Arc; -// use common_ast::ast::BinaryOperator; -// use common_ast::ast::ColumnID; -// use common_ast::ast::Expr; -// use common_ast::ast::GroupBy; -// use common_ast::ast::Identifier; -// use common_ast::ast::JoinCondition; -// use common_ast::ast::JoinOperator; -// use common_ast::ast::Literal; -use common_base::base::tokio; -// use common_exception::Result; -use common_expression::block_debug::box_render; -// use common_sql::dataframe::Dataframe; -use common_sql::Planner; +// use databend_common_ast::ast::BinaryOperator; +// use databend_common_ast::ast::ColumnID; +// use databend_common_ast::ast::Expr; +// use databend_common_ast::ast::GroupBy; +// use databend_common_ast::ast::Identifier; +// use databend_common_ast::ast::JoinCondition; +// use databend_common_ast::ast::JoinOperator; +// use databend_common_ast::ast::Literal; +use databend_common_base::base::tokio; +// use databend_common_exception::Result; +use databend_common_expression::block_debug::box_render; +// use databend_common_sql::dataframe::Dataframe; +use databend_common_sql::Planner; use databend_query::interpreters::InterpreterFactory; // use databend_query::sessions::QueryContext; use databend_query::test_kits::TestFixture; diff --git a/src/query/service/tests/it/interpreters/union.rs b/src/query/service/tests/it/interpreters/union.rs index a13589b360de..24fb475a3aaa 100644 --- a/src/query/service/tests/it/interpreters/union.rs +++ b/src/query/service/tests/it/interpreters/union.rs @@ -14,17 +14,17 @@ use std::sync::Arc; -use common_base::base::tokio; -use common_exception::Result; -use common_expression::type_check::common_super_type; -use common_expression::types::DataType; -use common_expression::types::NumberDataType; -use common_expression::DataSchemaRef; -use common_expression::SendableDataBlockStream; -use common_expression::TableSchemaRef; -use common_functions::BUILTIN_FUNCTIONS; -use common_sql::planner::plans::Plan; -use common_sql::Planner; +use databend_common_base::base::tokio; +use databend_common_exception::Result; +use databend_common_expression::type_check::common_super_type; +use databend_common_expression::types::DataType; +use databend_common_expression::types::NumberDataType; +use databend_common_expression::DataSchemaRef; +use databend_common_expression::SendableDataBlockStream; +use databend_common_expression::TableSchemaRef; +use databend_common_functions::BUILTIN_FUNCTIONS; +use databend_common_sql::planner::plans::Plan; +use databend_common_sql::Planner; use databend_query::interpreters::InterpreterFactory; use databend_query::interpreters::InterpreterPtr; use databend_query::sessions::QueryContext; diff --git a/src/query/service/tests/it/metrics.rs b/src/query/service/tests/it/metrics.rs index abf2d235a6ba..f2ecb8a798b1 100644 --- a/src/query/service/tests/it/metrics.rs +++ b/src/query/service/tests/it/metrics.rs @@ -14,13 +14,13 @@ use std::net::SocketAddr; -use common_base::base::tokio; -use common_metrics::register_counter; +use databend_common_base::base::tokio; +use databend_common_metrics::register_counter; use databend_query::metrics::MetricService; use databend_query::servers::Server; #[tokio::test(flavor = "multi_thread")] -async fn test_metric_server() -> common_exception::Result<()> { +async fn test_metric_server() -> databend_common_exception::Result<()> { let mut service = MetricService::create(); let listening = "127.0.0.1:0".parse::()?; let listening = service.start(listening).await?; diff --git a/src/query/service/tests/it/parquet_rs/prune_pages.rs b/src/query/service/tests/it/parquet_rs/prune_pages.rs index 4e1c5672f257..61c1599ca693 100644 --- a/src/query/service/tests/it/parquet_rs/prune_pages.rs +++ b/src/query/service/tests/it/parquet_rs/prune_pages.rs @@ -14,11 +14,11 @@ use std::sync::Arc; -use common_base::base::tokio; -use common_catalog::plan::ParquetReadOptions; -use common_expression::FunctionContext; -use common_expression::TableSchema; -use common_storages_parquet::ParquetRSPruner; +use databend_common_base::base::tokio; +use databend_common_catalog::plan::ParquetReadOptions; +use databend_common_expression::FunctionContext; +use databend_common_expression::TableSchema; +use databend_common_storages_parquet::ParquetRSPruner; use parquet::arrow::arrow_reader::ArrowReaderMetadata; use parquet::arrow::arrow_reader::ArrowReaderOptions; use parquet::arrow::arrow_reader::RowSelection; diff --git a/src/query/service/tests/it/parquet_rs/prune_row_groups.rs b/src/query/service/tests/it/parquet_rs/prune_row_groups.rs index 2569f0036ba3..539a134264d4 100644 --- a/src/query/service/tests/it/parquet_rs/prune_row_groups.rs +++ b/src/query/service/tests/it/parquet_rs/prune_row_groups.rs @@ -14,11 +14,11 @@ use std::sync::Arc; -use common_base::base::tokio; -use common_catalog::plan::ParquetReadOptions; -use common_expression::FunctionContext; -use common_expression::TableSchema; -use common_storages_parquet::ParquetRSPruner; +use databend_common_base::base::tokio; +use databend_common_catalog::plan::ParquetReadOptions; +use databend_common_expression::FunctionContext; +use databend_common_expression::TableSchema; +use databend_common_storages_parquet::ParquetRSPruner; use super::data::make_test_file_rg; use super::data::Scenario; diff --git a/src/query/service/tests/it/parquet_rs/utils.rs b/src/query/service/tests/it/parquet_rs/utils.rs index 0289dd050ef8..07de8e8ba1da 100644 --- a/src/query/service/tests/it/parquet_rs/utils.rs +++ b/src/query/service/tests/it/parquet_rs/utils.rs @@ -14,12 +14,12 @@ use std::sync::Arc; -use common_catalog::plan::DataSourcePlan; -use common_catalog::table_context::TableContext; -use common_exception::Result; -use common_sql::executor::PhysicalPlanBuilder; -use common_sql::plans::Plan; -use common_sql::Planner; +use databend_common_catalog::plan::DataSourcePlan; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::Result; +use databend_common_sql::executor::PhysicalPlanBuilder; +use databend_common_sql::plans::Plan; +use databend_common_sql::Planner; use databend_query::test_kits::ConfigBuilder; use databend_query::test_kits::TestFixture; diff --git a/src/query/service/tests/it/pipelines/executor/executor_graph.rs b/src/query/service/tests/it/pipelines/executor/executor_graph.rs index 67c4333498aa..f0d6644abdd3 100644 --- a/src/query/service/tests/it/pipelines/executor/executor_graph.rs +++ b/src/query/service/tests/it/pipelines/executor/executor_graph.rs @@ -14,19 +14,19 @@ use std::sync::Arc; -use common_base::base::tokio; -use common_base::base::tokio::sync::mpsc::channel; -use common_base::base::tokio::sync::mpsc::Receiver; -use common_base::base::tokio::sync::mpsc::Sender; -use common_exception::Result; -use common_expression::DataBlock; -use common_pipeline_core::processors::ProcessorPtr; -use common_pipeline_core::Pipe; -use common_pipeline_core::PipeItem; -use common_pipeline_core::Pipeline; -use common_pipeline_sinks::SyncSenderSink; -use common_pipeline_sources::SyncReceiverSource; -use common_pipeline_transforms::processors::TransformDummy; +use databend_common_base::base::tokio; +use databend_common_base::base::tokio::sync::mpsc::channel; +use databend_common_base::base::tokio::sync::mpsc::Receiver; +use databend_common_base::base::tokio::sync::mpsc::Sender; +use databend_common_exception::Result; +use databend_common_expression::DataBlock; +use databend_common_pipeline_core::processors::ProcessorPtr; +use databend_common_pipeline_core::Pipe; +use databend_common_pipeline_core::PipeItem; +use databend_common_pipeline_core::Pipeline; +use databend_common_pipeline_sinks::SyncSenderSink; +use databend_common_pipeline_sources::SyncReceiverSource; +use databend_common_pipeline_transforms::processors::TransformDummy; use databend_query::pipelines::executor::RunningGraph; use databend_query::pipelines::processors::InputPort; use databend_query::pipelines::processors::OutputPort; diff --git a/src/query/service/tests/it/pipelines/executor/pipeline_executor.rs b/src/query/service/tests/it/pipelines/executor/pipeline_executor.rs index 5fd74967f70d..d68fa1a16750 100644 --- a/src/query/service/tests/it/pipelines/executor/pipeline_executor.rs +++ b/src/query/service/tests/it/pipelines/executor/pipeline_executor.rs @@ -16,21 +16,21 @@ use std::sync::atomic::AtomicBool; use std::sync::atomic::Ordering; use std::sync::Arc; -use common_base::base::tokio; -use common_base::base::tokio::sync::mpsc::channel; -use common_base::base::tokio::sync::mpsc::Receiver; -use common_base::base::tokio::sync::mpsc::Sender; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::DataBlock; -use common_pipeline_core::processors::InputPort; -use common_pipeline_core::processors::OutputPort; -use common_pipeline_core::processors::ProcessorPtr; -use common_pipeline_core::Pipe; -use common_pipeline_core::PipeItem; -use common_pipeline_core::Pipeline; -use common_pipeline_sinks::SyncSenderSink; -use common_pipeline_sources::SyncReceiverSource; +use databend_common_base::base::tokio; +use databend_common_base::base::tokio::sync::mpsc::channel; +use databend_common_base::base::tokio::sync::mpsc::Receiver; +use databend_common_base::base::tokio::sync::mpsc::Sender; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::DataBlock; +use databend_common_pipeline_core::processors::InputPort; +use databend_common_pipeline_core::processors::OutputPort; +use databend_common_pipeline_core::processors::ProcessorPtr; +use databend_common_pipeline_core::Pipe; +use databend_common_pipeline_core::PipeItem; +use databend_common_pipeline_core::Pipeline; +use databend_common_pipeline_sinks::SyncSenderSink; +use databend_common_pipeline_sources::SyncReceiverSource; use databend_query::pipelines::executor::ExecutorSettings; use databend_query::pipelines::executor::PipelineExecutor; use databend_query::sessions::QueryContext; diff --git a/src/query/service/tests/it/servers/flight_sql/flight_sql_handler.rs b/src/query/service/tests/it/servers/flight_sql/flight_sql_handler.rs index 955ea383205e..8801bdfafa0e 100644 --- a/src/query/service/tests/it/servers/flight_sql/flight_sql_handler.rs +++ b/src/query/service/tests/it/servers/flight_sql/flight_sql_handler.rs @@ -23,11 +23,11 @@ use arrow_flight::sql::client::FlightSqlServiceClient; use arrow_flight::utils::flight_data_to_batches; use arrow_flight::FlightData; use arrow_schema::ArrowError; -use common_base::base::tokio; -use common_config::InnerConfig; -use common_exception::Result; -use common_meta_app::principal::AuthInfo; -use common_meta_app::principal::PasswordHashMethod; +use databend_common_base::base::tokio; +use databend_common_config::InnerConfig; +use databend_common_exception::Result; +use databend_common_meta_app::principal::AuthInfo; +use databend_common_meta_app::principal::PasswordHashMethod; use databend_query::servers::flight_sql::flight_sql_service::FlightSqlServiceImpl; use databend_query::test_kits::ConfigBuilder; use databend_query::test_kits::TestFixture; diff --git a/src/query/service/tests/it/servers/flight_sql/flight_sql_server.rs b/src/query/service/tests/it/servers/flight_sql/flight_sql_server.rs index afc957791a29..44612a7b443b 100644 --- a/src/query/service/tests/it/servers/flight_sql/flight_sql_server.rs +++ b/src/query/service/tests/it/servers/flight_sql/flight_sql_server.rs @@ -15,8 +15,8 @@ use std::net::TcpListener; use std::sync::Arc; -use common_base::base::tokio; -use common_exception::Result; +use databend_common_base::base::tokio; +use databend_common_exception::Result; use databend_query::servers::FlightSQLServer; use databend_query::test_kits::ConfigBuilder; diff --git a/src/query/service/tests/it/servers/http/clickhouse_handler.rs b/src/query/service/tests/it/servers/http/clickhouse_handler.rs index 032576269de7..a9536cdda161 100644 --- a/src/query/service/tests/it/servers/http/clickhouse_handler.rs +++ b/src/query/service/tests/it/servers/http/clickhouse_handler.rs @@ -14,7 +14,7 @@ use std::collections::HashMap; -use common_base::base::tokio; +use databend_common_base::base::tokio; use databend_query::auth::AuthMgr; use databend_query::servers::http::middleware::HTTPSessionEndpoint; use databend_query::servers::http::middleware::HTTPSessionMiddleware; diff --git a/src/query/service/tests/it/servers/http/http_query_handlers.rs b/src/query/service/tests/it/servers/http/http_query_handlers.rs index f91f18fad9c6..d2db0f123046 100644 --- a/src/query/service/tests/it/servers/http/http_query_handlers.rs +++ b/src/query/service/tests/it/servers/http/http_query_handlers.rs @@ -19,14 +19,14 @@ use std::time::Duration; use base64::engine::general_purpose; use base64::prelude::*; -use common_base::base::get_free_tcp_port; -use common_base::base::tokio; -use common_exception::ErrorCode; -use common_exception::Result; -use common_meta_app::principal::AuthInfo; -use common_meta_app::principal::PasswordHashMethod; -use common_users::CustomClaims; -use common_users::EnsureUser; +use databend_common_base::base::get_free_tcp_port; +use databend_common_base::base::tokio; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_meta_app::principal::AuthInfo; +use databend_common_meta_app::principal::PasswordHashMethod; +use databend_common_users::CustomClaims; +use databend_common_users::EnsureUser; use databend_query::auth::AuthMgr; use databend_query::servers::http::middleware::HTTPSessionEndpoint; use databend_query::servers::http::middleware::HTTPSessionMiddleware; diff --git a/src/query/service/tests/it/servers/http/json_block.rs b/src/query/service/tests/it/servers/http/json_block.rs index f76b21090cdd..9e0858873893 100644 --- a/src/query/service/tests/it/servers/http/json_block.rs +++ b/src/query/service/tests/it/servers/http/json_block.rs @@ -12,22 +12,22 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_arrow::arrow::bitmap::Bitmap; -use common_exception::Result; -use common_expression::types::nullable::NullableColumn; -use common_expression::types::number::Float64Type; -use common_expression::types::number::Int32Type; -use common_expression::types::BooleanType; -use common_expression::types::DataType; -use common_expression::types::DateType; -use common_expression::types::NumberDataType; -use common_expression::types::StringType; -use common_expression::Column; -use common_expression::DataBlock; -use common_expression::DataField; -use common_expression::DataSchemaRefExt; -use common_expression::FromData; -use common_io::prelude::FormatSettings; +use databend_common_arrow::arrow::bitmap::Bitmap; +use databend_common_exception::Result; +use databend_common_expression::types::nullable::NullableColumn; +use databend_common_expression::types::number::Float64Type; +use databend_common_expression::types::number::Int32Type; +use databend_common_expression::types::BooleanType; +use databend_common_expression::types::DataType; +use databend_common_expression::types::DateType; +use databend_common_expression::types::NumberDataType; +use databend_common_expression::types::StringType; +use databend_common_expression::Column; +use databend_common_expression::DataBlock; +use databend_common_expression::DataField; +use databend_common_expression::DataSchemaRefExt; +use databend_common_expression::FromData; +use databend_common_io::prelude::FormatSettings; use databend_query::servers::http::v1::json_block::JsonBlock; use pretty_assertions::assert_eq; use serde::Serialize; diff --git a/src/query/service/tests/it/servers/mysql/mysql_federated.rs b/src/query/service/tests/it/servers/mysql/mysql_federated.rs index 0ae6ee8ace54..49281fd359e9 100644 --- a/src/query/service/tests/it/servers/mysql/mysql_federated.rs +++ b/src/query/service/tests/it/servers/mysql/mysql_federated.rs @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_exception::Result; -use common_expression::block_debug::assert_blocks_eq; +use databend_common_exception::Result; +use databend_common_expression::block_debug::assert_blocks_eq; use databend_query::servers::MySQLFederated; #[test] diff --git a/src/query/service/tests/it/servers/mysql/mysql_handler.rs b/src/query/service/tests/it/servers/mysql/mysql_handler.rs index 42254f86b4de..9778af043e2e 100644 --- a/src/query/service/tests/it/servers/mysql/mysql_handler.rs +++ b/src/query/service/tests/it/servers/mysql/mysql_handler.rs @@ -17,13 +17,13 @@ use std::path::Path; use std::sync::Arc; use std::time::Duration; -use common_base::base::tokio; -use common_base::runtime::Runtime; -use common_base::runtime::TrySpawn; -use common_base::GLOBAL_TASK; -use common_exception::ErrorCode; -use common_exception::Result; -use common_exception::ToErrorCode; +use databend_common_base::base::tokio; +use databend_common_base::runtime::Runtime; +use databend_common_base::runtime::TrySpawn; +use databend_common_base::GLOBAL_TASK; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_exception::ToErrorCode; use databend_query::servers::MySQLHandler; use databend_query::servers::MySQLTlsConfig; use databend_query::test_kits::ConfigBuilder; diff --git a/src/query/service/tests/it/sessions/query_ctx.rs b/src/query/service/tests/it/sessions/query_ctx.rs index d827f57de8c7..0175eb5d39f8 100644 --- a/src/query/service/tests/it/sessions/query_ctx.rs +++ b/src/query/service/tests/it/sessions/query_ctx.rs @@ -12,11 +12,11 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_base::base::tokio; -use common_exception::Result; -use common_meta_app::storage::StorageFsConfig; -use common_meta_app::storage::StorageParams; -use common_meta_app::storage::StorageS3Config; +use databend_common_base::base::tokio; +use databend_common_exception::Result; +use databend_common_meta_app::storage::StorageFsConfig; +use databend_common_meta_app::storage::StorageParams; +use databend_common_meta_app::storage::StorageS3Config; use databend_query::sessions::TableContext; use databend_query::test_kits::ConfigBuilder; use databend_query::test_kits::TestFixture; diff --git a/src/query/service/tests/it/sessions/session.rs b/src/query/service/tests/it/sessions/session.rs index 58de2be888fe..5ac30b5b1dec 100644 --- a/src/query/service/tests/it/sessions/session.rs +++ b/src/query/service/tests/it/sessions/session.rs @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_base::base::tokio; -use common_exception::Result; +use databend_common_base::base::tokio; +use databend_common_exception::Result; use databend_query::sessions::SessionType; use databend_query::test_kits::ConfigBuilder; use databend_query::test_kits::TestFixture; diff --git a/src/query/service/tests/it/sessions/session_context.rs b/src/query/service/tests/it/sessions/session_context.rs index a670d90b1458..9224ab86de90 100644 --- a/src/query/service/tests/it/sessions/session_context.rs +++ b/src/query/service/tests/it/sessions/session_context.rs @@ -14,10 +14,10 @@ use std::net::SocketAddr; -use common_base::base::tokio; -use common_exception::Result; -use common_meta_app::principal::UserInfo; -use common_settings::Settings; +use databend_common_base::base::tokio; +use databend_common_exception::Result; +use databend_common_meta_app::principal::UserInfo; +use databend_common_settings::Settings; use databend_query::sessions::SessionContext; use databend_query::sessions::SessionType; diff --git a/src/query/service/tests/it/sessions/session_setting.rs b/src/query/service/tests/it/sessions/session_setting.rs index 9d85ac464cff..db70998c797c 100644 --- a/src/query/service/tests/it/sessions/session_setting.rs +++ b/src/query/service/tests/it/sessions/session_setting.rs @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_base::base::tokio; -use common_exception::Result; +use databend_common_base::base::tokio; +use databend_common_exception::Result; use databend_query::sessions::SessionType; use databend_query::test_kits::ConfigBuilder; use databend_query::test_kits::TestFixture; diff --git a/src/query/service/tests/it/spillers/spiller.rs b/src/query/service/tests/it/spillers/spiller.rs index 5ffb38d1fd7f..d41a146542ef 100644 --- a/src/query/service/tests/it/spillers/spiller.rs +++ b/src/query/service/tests/it/spillers/spiller.rs @@ -12,18 +12,18 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_base::base::tokio; -use common_catalog::table_context::TableContext; -use common_exception::Result; -use common_expression::types::DataType; -use common_expression::types::Int32Type; -use common_expression::types::NumberDataType; -use common_expression::types::NumberScalar; -use common_expression::DataBlock; -use common_expression::FromData; -use common_expression::ScalarRef; -use common_pipeline_core::query_spill_prefix; -use common_storage::DataOperator; +use databend_common_base::base::tokio; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::Result; +use databend_common_expression::types::DataType; +use databend_common_expression::types::Int32Type; +use databend_common_expression::types::NumberDataType; +use databend_common_expression::types::NumberScalar; +use databend_common_expression::DataBlock; +use databend_common_expression::FromData; +use databend_common_expression::ScalarRef; +use databend_common_pipeline_core::query_spill_prefix; +use databend_common_storage::DataOperator; use databend_query::spillers::Spiller; use databend_query::spillers::SpillerConfig; use databend_query::spillers::SpillerType; diff --git a/src/query/service/tests/it/sql/exec/get_table_bind_test.rs b/src/query/service/tests/it/sql/exec/get_table_bind_test.rs index 63038b24c218..08037c441b86 100644 --- a/src/query/service/tests/it/sql/exec/get_table_bind_test.rs +++ b/src/query/service/tests/it/sql/exec/get_table_bind_test.rs @@ -18,110 +18,110 @@ use std::collections::HashSet; use std::sync::atomic::AtomicUsize; use std::sync::Arc; -use common_base::base::tokio; -use common_base::base::Progress; -use common_base::base::ProgressValues; -use common_catalog::catalog::Catalog; -use common_catalog::cluster_info::Cluster; -use common_catalog::database::Database; -use common_catalog::plan::DataSourcePlan; -use common_catalog::plan::PartInfoPtr; -use common_catalog::plan::Partitions; -use common_catalog::query_kind::QueryKind; -use common_catalog::table::Table; -use common_catalog::table_context::MaterializedCtesBlocks; -use common_catalog::table_context::ProcessInfo; -use common_catalog::table_context::StageAttachment; -use common_catalog::table_context::TableContext; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::DataBlock; -use common_expression::Expr; -use common_expression::FunctionContext; -use common_io::prelude::FormatSettings; -use common_meta_app::principal::FileFormatParams; -use common_meta_app::principal::OnErrorMode; -use common_meta_app::principal::RoleInfo; -use common_meta_app::principal::UserDefinedConnection; -use common_meta_app::principal::UserInfo; -use common_meta_app::schema::CatalogInfo; -use common_meta_app::schema::CountTablesReply; -use common_meta_app::schema::CountTablesReq; -use common_meta_app::schema::CreateDatabaseReply; -use common_meta_app::schema::CreateDatabaseReq; -use common_meta_app::schema::CreateIndexReply; -use common_meta_app::schema::CreateIndexReq; -use common_meta_app::schema::CreateLockRevReply; -use common_meta_app::schema::CreateLockRevReq; -use common_meta_app::schema::CreateTableReply; -use common_meta_app::schema::CreateTableReq; -use common_meta_app::schema::CreateVirtualColumnReply; -use common_meta_app::schema::CreateVirtualColumnReq; -use common_meta_app::schema::DeleteLockRevReq; -use common_meta_app::schema::DropDatabaseReply; -use common_meta_app::schema::DropDatabaseReq; -use common_meta_app::schema::DropIndexReply; -use common_meta_app::schema::DropIndexReq; -use common_meta_app::schema::DropTableByIdReq; -use common_meta_app::schema::DropTableReply; -use common_meta_app::schema::DropVirtualColumnReply; -use common_meta_app::schema::DropVirtualColumnReq; -use common_meta_app::schema::ExtendLockRevReq; -use common_meta_app::schema::GetIndexReply; -use common_meta_app::schema::GetIndexReq; -use common_meta_app::schema::GetTableCopiedFileReply; -use common_meta_app::schema::GetTableCopiedFileReq; -use common_meta_app::schema::IndexMeta; -use common_meta_app::schema::ListIndexesByIdReq; -use common_meta_app::schema::ListIndexesReq; -use common_meta_app::schema::ListLockRevReq; -use common_meta_app::schema::ListLocksReq; -use common_meta_app::schema::ListVirtualColumnsReq; -use common_meta_app::schema::LockInfo; -use common_meta_app::schema::LockMeta; -use common_meta_app::schema::RenameDatabaseReply; -use common_meta_app::schema::RenameDatabaseReq; -use common_meta_app::schema::RenameTableReply; -use common_meta_app::schema::RenameTableReq; -use common_meta_app::schema::SetTableColumnMaskPolicyReply; -use common_meta_app::schema::SetTableColumnMaskPolicyReq; -use common_meta_app::schema::TableIdent; -use common_meta_app::schema::TableInfo; -use common_meta_app::schema::TableMeta; -use common_meta_app::schema::TruncateTableReply; -use common_meta_app::schema::TruncateTableReq; -use common_meta_app::schema::UndropDatabaseReply; -use common_meta_app::schema::UndropDatabaseReq; -use common_meta_app::schema::UndropTableReply; -use common_meta_app::schema::UndropTableReq; -use common_meta_app::schema::UpdateIndexReply; -use common_meta_app::schema::UpdateIndexReq; -use common_meta_app::schema::UpdateTableMetaReply; -use common_meta_app::schema::UpdateTableMetaReq; -use common_meta_app::schema::UpdateVirtualColumnReply; -use common_meta_app::schema::UpdateVirtualColumnReq; -use common_meta_app::schema::UpsertTableOptionReply; -use common_meta_app::schema::UpsertTableOptionReq; -use common_meta_app::schema::VirtualColumnMeta; -use common_meta_types::MetaId; -use common_pipeline_core::processors::profile::PlanProfile; -use common_pipeline_core::processors::profile::Profile; -use common_pipeline_core::InputError; -use common_settings::Settings; -use common_sql::IndexType; -use common_sql::Planner; -use common_storage::CopyStatus; -use common_storage::DataOperator; -use common_storage::FileStatus; -use common_storage::MergeStatus; -use common_storage::StageFileInfo; -use common_users::GrantObjectVisibilityChecker; use dashmap::DashMap; +use databend_common_base::base::tokio; +use databend_common_base::base::Progress; +use databend_common_base::base::ProgressValues; +use databend_common_catalog::catalog::Catalog; +use databend_common_catalog::cluster_info::Cluster; +use databend_common_catalog::database::Database; +use databend_common_catalog::plan::DataSourcePlan; +use databend_common_catalog::plan::PartInfoPtr; +use databend_common_catalog::plan::Partitions; +use databend_common_catalog::query_kind::QueryKind; +use databend_common_catalog::table::Table; +use databend_common_catalog::table_context::MaterializedCtesBlocks; +use databend_common_catalog::table_context::ProcessInfo; +use databend_common_catalog::table_context::StageAttachment; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::DataBlock; +use databend_common_expression::Expr; +use databend_common_expression::FunctionContext; +use databend_common_io::prelude::FormatSettings; +use databend_common_meta_app::principal::FileFormatParams; +use databend_common_meta_app::principal::OnErrorMode; +use databend_common_meta_app::principal::RoleInfo; +use databend_common_meta_app::principal::UserDefinedConnection; +use databend_common_meta_app::principal::UserInfo; +use databend_common_meta_app::schema::CatalogInfo; +use databend_common_meta_app::schema::CountTablesReply; +use databend_common_meta_app::schema::CountTablesReq; +use databend_common_meta_app::schema::CreateDatabaseReply; +use databend_common_meta_app::schema::CreateDatabaseReq; +use databend_common_meta_app::schema::CreateIndexReply; +use databend_common_meta_app::schema::CreateIndexReq; +use databend_common_meta_app::schema::CreateLockRevReply; +use databend_common_meta_app::schema::CreateLockRevReq; +use databend_common_meta_app::schema::CreateTableReply; +use databend_common_meta_app::schema::CreateTableReq; +use databend_common_meta_app::schema::CreateVirtualColumnReply; +use databend_common_meta_app::schema::CreateVirtualColumnReq; +use databend_common_meta_app::schema::DeleteLockRevReq; +use databend_common_meta_app::schema::DropDatabaseReply; +use databend_common_meta_app::schema::DropDatabaseReq; +use databend_common_meta_app::schema::DropIndexReply; +use databend_common_meta_app::schema::DropIndexReq; +use databend_common_meta_app::schema::DropTableByIdReq; +use databend_common_meta_app::schema::DropTableReply; +use databend_common_meta_app::schema::DropVirtualColumnReply; +use databend_common_meta_app::schema::DropVirtualColumnReq; +use databend_common_meta_app::schema::ExtendLockRevReq; +use databend_common_meta_app::schema::GetIndexReply; +use databend_common_meta_app::schema::GetIndexReq; +use databend_common_meta_app::schema::GetTableCopiedFileReply; +use databend_common_meta_app::schema::GetTableCopiedFileReq; +use databend_common_meta_app::schema::IndexMeta; +use databend_common_meta_app::schema::ListIndexesByIdReq; +use databend_common_meta_app::schema::ListIndexesReq; +use databend_common_meta_app::schema::ListLockRevReq; +use databend_common_meta_app::schema::ListLocksReq; +use databend_common_meta_app::schema::ListVirtualColumnsReq; +use databend_common_meta_app::schema::LockInfo; +use databend_common_meta_app::schema::LockMeta; +use databend_common_meta_app::schema::RenameDatabaseReply; +use databend_common_meta_app::schema::RenameDatabaseReq; +use databend_common_meta_app::schema::RenameTableReply; +use databend_common_meta_app::schema::RenameTableReq; +use databend_common_meta_app::schema::SetTableColumnMaskPolicyReply; +use databend_common_meta_app::schema::SetTableColumnMaskPolicyReq; +use databend_common_meta_app::schema::TableIdent; +use databend_common_meta_app::schema::TableInfo; +use databend_common_meta_app::schema::TableMeta; +use databend_common_meta_app::schema::TruncateTableReply; +use databend_common_meta_app::schema::TruncateTableReq; +use databend_common_meta_app::schema::UndropDatabaseReply; +use databend_common_meta_app::schema::UndropDatabaseReq; +use databend_common_meta_app::schema::UndropTableReply; +use databend_common_meta_app::schema::UndropTableReq; +use databend_common_meta_app::schema::UpdateIndexReply; +use databend_common_meta_app::schema::UpdateIndexReq; +use databend_common_meta_app::schema::UpdateTableMetaReply; +use databend_common_meta_app::schema::UpdateTableMetaReq; +use databend_common_meta_app::schema::UpdateVirtualColumnReply; +use databend_common_meta_app::schema::UpdateVirtualColumnReq; +use databend_common_meta_app::schema::UpsertTableOptionReply; +use databend_common_meta_app::schema::UpsertTableOptionReq; +use databend_common_meta_app::schema::VirtualColumnMeta; +use databend_common_meta_types::MetaId; +use databend_common_pipeline_core::processors::profile::PlanProfile; +use databend_common_pipeline_core::processors::profile::Profile; +use databend_common_pipeline_core::InputError; +use databend_common_settings::Settings; +use databend_common_sql::IndexType; +use databend_common_sql::Planner; +use databend_common_storage::CopyStatus; +use databend_common_storage::DataOperator; +use databend_common_storage::FileStatus; +use databend_common_storage::MergeStatus; +use databend_common_storage::StageFileInfo; +use databend_common_users::GrantObjectVisibilityChecker; use databend_query::sessions::QueryContext; use databend_query::test_kits::*; +use databend_storages_common_table_meta::meta::Location; use parking_lot::Mutex; use parking_lot::RwLock; -use storages_common_table_meta::meta::Location; type MetaType = (String, String, String); diff --git a/src/query/service/tests/it/sql/exec/mod.rs b/src/query/service/tests/it/sql/exec/mod.rs index 58a3ef1db40f..c9d5510309b4 100644 --- a/src/query/service/tests/it/sql/exec/mod.rs +++ b/src/query/service/tests/it/sql/exec/mod.rs @@ -12,15 +12,15 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_base::base::tokio; -use common_base::runtime::Runtime; -use common_base::runtime::TrySpawn; -use common_base::GLOBAL_TASK; -use common_exception::ErrorCode; -use common_exception::Result; -use common_sql::plans::Plan; -use common_sql::Planner; -use common_storages_fuse::FuseTable; +use databend_common_base::base::tokio; +use databend_common_base::runtime::Runtime; +use databend_common_base::runtime::TrySpawn; +use databend_common_base::GLOBAL_TASK; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_sql::plans::Plan; +use databend_common_sql::Planner; +use databend_common_storages_fuse::FuseTable; use databend_query::interpreters::Interpreter; use databend_query::interpreters::OptimizeTableInterpreter; use databend_query::test_kits::*; diff --git a/src/query/service/tests/it/sql/planner/builders/select_builder.rs b/src/query/service/tests/it/sql/planner/builders/select_builder.rs index f24f2fae280f..f1d49488bc9c 100644 --- a/src/query/service/tests/it/sql/planner/builders/select_builder.rs +++ b/src/query/service/tests/it/sql/planner/builders/select_builder.rs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_sql::SelectBuilder; +use databend_common_sql::SelectBuilder; struct SelectBuilderCase { pub columns: Vec, diff --git a/src/query/service/tests/it/sql/planner/format/mod.rs b/src/query/service/tests/it/sql/planner/format/mod.rs index c324529f4578..317fff56e603 100644 --- a/src/query/service/tests/it/sql/planner/format/mod.rs +++ b/src/query/service/tests/it/sql/planner/format/mod.rs @@ -14,18 +14,18 @@ use std::sync::Arc; -use common_base::base::GlobalInstance; -use common_expression::types::DataType; -use common_expression::types::NumberScalar; -use common_expression::Scalar; -use common_expression::TableDataType; -use common_expression::TableSchemaRefExt; -use common_meta_app::schema::TableIdent; -use common_meta_app::schema::TableInfo; -use common_meta_app::schema::TableMeta; -use common_sql::binder::ColumnBindingBuilder; -use common_sql::plans::Join; -use common_sql::plans::Scan; +use databend_common_base::base::GlobalInstance; +use databend_common_expression::types::DataType; +use databend_common_expression::types::NumberScalar; +use databend_common_expression::Scalar; +use databend_common_expression::TableDataType; +use databend_common_expression::TableSchemaRefExt; +use databend_common_meta_app::schema::TableIdent; +use databend_common_meta_app::schema::TableInfo; +use databend_common_meta_app::schema::TableMeta; +use databend_common_sql::binder::ColumnBindingBuilder; +use databend_common_sql::plans::Join; +use databend_common_sql::plans::Scan; use databend_query::sql::optimizer::SExpr; use databend_query::sql::planner::plans::JoinType; use databend_query::sql::planner::Metadata; diff --git a/src/query/service/tests/it/sql/planner/optimizer/agg_index_query_rewrite.rs b/src/query/service/tests/it/sql/planner/optimizer/agg_index_query_rewrite.rs index d2ed76d26a53..8c25cab0919f 100644 --- a/src/query/service/tests/it/sql/planner/optimizer/agg_index_query_rewrite.rs +++ b/src/query/service/tests/it/sql/planner/optimizer/agg_index_query_rewrite.rs @@ -14,38 +14,38 @@ use std::sync::Arc; -use common_ast::ast::Engine; -use common_ast::parser::parse_sql; -use common_ast::parser::tokenize_sql; -use common_ast::Dialect; -use common_base::base::tokio; -use common_catalog::catalog::CatalogManager; -use common_catalog::table_context::TableContext; -use common_exception::Result; -use common_expression::types::NumberDataType; -use common_expression::TableDataType; -use common_expression::TableField; -use common_expression::TableSchemaRefExt; -use common_sql::optimizer::agg_index; -use common_sql::optimizer::OptimizerContext; -use common_sql::optimizer::RecursiveOptimizer; -use common_sql::optimizer::SExpr; -use common_sql::optimizer::DEFAULT_REWRITE_RULES; -use common_sql::plans::AggIndexInfo; -use common_sql::plans::CreateTablePlan; -use common_sql::plans::Plan; -use common_sql::plans::RelOperator; -use common_sql::BindContext; -use common_sql::Binder; -use common_sql::Metadata; -use common_sql::MetadataRef; -use common_sql::NameResolutionContext; +use databend_common_ast::ast::Engine; +use databend_common_ast::parser::parse_sql; +use databend_common_ast::parser::tokenize_sql; +use databend_common_ast::Dialect; +use databend_common_base::base::tokio; +use databend_common_catalog::catalog::CatalogManager; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::Result; +use databend_common_expression::types::NumberDataType; +use databend_common_expression::TableDataType; +use databend_common_expression::TableField; +use databend_common_expression::TableSchemaRefExt; +use databend_common_sql::optimizer::agg_index; +use databend_common_sql::optimizer::OptimizerContext; +use databend_common_sql::optimizer::RecursiveOptimizer; +use databend_common_sql::optimizer::SExpr; +use databend_common_sql::optimizer::DEFAULT_REWRITE_RULES; +use databend_common_sql::plans::AggIndexInfo; +use databend_common_sql::plans::CreateTablePlan; +use databend_common_sql::plans::Plan; +use databend_common_sql::plans::RelOperator; +use databend_common_sql::BindContext; +use databend_common_sql::Binder; +use databend_common_sql::Metadata; +use databend_common_sql::MetadataRef; +use databend_common_sql::NameResolutionContext; use databend_query::interpreters::CreateTableInterpreter; use databend_query::interpreters::Interpreter; use databend_query::test_kits::TestFixture; +use databend_storages_common_table_meta::table::OPT_KEY_DATABASE_ID; +use databend_storages_common_table_meta::table::OPT_KEY_STORAGE_FORMAT; use parking_lot::RwLock; -use storages_common_table_meta::table::OPT_KEY_DATABASE_ID; -use storages_common_table_meta::table::OPT_KEY_STORAGE_FORMAT; #[derive(Default)] struct TestSuite { @@ -481,13 +481,13 @@ fn find_push_down_index_info(s_expr: &SExpr) -> Result<&Option> { fn format_selection(info: &AggIndexInfo) -> Vec { info.selection .iter() - .map(|sel| common_sql::format_scalar(&sel.scalar)) + .map(|sel| databend_common_sql::format_scalar(&sel.scalar)) .collect() } fn format_filter(info: &AggIndexInfo) -> Vec { info.predicates .iter() - .map(common_sql::format_scalar) + .map(databend_common_sql::format_scalar) .collect() } diff --git a/src/query/service/tests/it/sql/planner/semantic/name_resolution.rs b/src/query/service/tests/it/sql/planner/semantic/name_resolution.rs index bcfec82d4477..68a215bf1dcf 100644 --- a/src/query/service/tests/it/sql/planner/semantic/name_resolution.rs +++ b/src/query/service/tests/it/sql/planner/semantic/name_resolution.rs @@ -12,11 +12,11 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_ast::ast::Identifier; -use common_ast::parser::parse_expr; -use common_ast::parser::tokenize_sql; -use common_ast::walk_expr_mut; -use common_ast::Dialect; +use databend_common_ast::ast::Identifier; +use databend_common_ast::parser::parse_expr; +use databend_common_ast::parser::tokenize_sql; +use databend_common_ast::walk_expr_mut; +use databend_common_ast::Dialect; use databend_query::sql::normalize_identifier; use databend_query::sql::IdentifierNormalizer; use databend_query::sql::NameResolutionContext; diff --git a/src/query/service/tests/it/storages/fuse/bloom_index_meta_size.rs b/src/query/service/tests/it/storages/fuse/bloom_index_meta_size.rs index f738f9b51e4e..785aaa8fbd3b 100644 --- a/src/query/service/tests/it/storages/fuse/bloom_index_meta_size.rs +++ b/src/query/service/tests/it/storages/fuse/bloom_index_meta_size.rs @@ -17,39 +17,39 @@ use std::collections::HashSet; use std::sync::Arc; use chrono::Utc; -use common_arrow::parquet::metadata::FileMetaData; -use common_arrow::parquet::metadata::ThriftFileMetaData; -use common_base::base::tokio; -use common_cache::Cache; -use common_expression::types::Int32Type; -use common_expression::types::NumberDataType; -use common_expression::types::NumberScalar; -use common_expression::ColumnId; -use common_expression::DataBlock; -use common_expression::FromData; -use common_expression::Scalar; -use common_expression::TableDataType; -use common_expression::TableField; -use common_expression::TableSchemaRefExt; -use common_storages_fuse::io::TableMetaLocationGenerator; -use common_storages_fuse::statistics::gen_columns_statistics; -use common_storages_fuse::statistics::STATS_STRING_PREFIX_LEN; -use common_storages_fuse::FuseStorageFormat; +use databend_common_arrow::parquet::metadata::FileMetaData; +use databend_common_arrow::parquet::metadata::ThriftFileMetaData; +use databend_common_base::base::tokio; +use databend_common_cache::Cache; +use databend_common_expression::types::Int32Type; +use databend_common_expression::types::NumberDataType; +use databend_common_expression::types::NumberScalar; +use databend_common_expression::ColumnId; +use databend_common_expression::DataBlock; +use databend_common_expression::FromData; +use databend_common_expression::Scalar; +use databend_common_expression::TableDataType; +use databend_common_expression::TableField; +use databend_common_expression::TableSchemaRefExt; +use databend_common_storages_fuse::io::TableMetaLocationGenerator; +use databend_common_storages_fuse::statistics::gen_columns_statistics; +use databend_common_storages_fuse::statistics::STATS_STRING_PREFIX_LEN; +use databend_common_storages_fuse::FuseStorageFormat; use databend_query::test_kits::*; +use databend_storages_common_cache::InMemoryCacheBuilder; +use databend_storages_common_cache::InMemoryItemCacheHolder; +use databend_storages_common_index::BloomIndexMeta; +use databend_storages_common_table_meta::meta::BlockMeta; +use databend_storages_common_table_meta::meta::ColumnMeta; +use databend_storages_common_table_meta::meta::ColumnStatistics; +use databend_storages_common_table_meta::meta::CompactSegmentInfo; +use databend_storages_common_table_meta::meta::Compression; +use databend_storages_common_table_meta::meta::Location; +use databend_storages_common_table_meta::meta::SegmentInfo; +use databend_storages_common_table_meta::meta::SingleColumnMeta; +use databend_storages_common_table_meta::meta::Statistics; +use databend_storages_common_table_meta::meta::Versioned; use opendal::Operator; -use storages_common_cache::InMemoryCacheBuilder; -use storages_common_cache::InMemoryItemCacheHolder; -use storages_common_index::BloomIndexMeta; -use storages_common_table_meta::meta::BlockMeta; -use storages_common_table_meta::meta::ColumnMeta; -use storages_common_table_meta::meta::ColumnStatistics; -use storages_common_table_meta::meta::CompactSegmentInfo; -use storages_common_table_meta::meta::Compression; -use storages_common_table_meta::meta::Location; -use storages_common_table_meta::meta::SegmentInfo; -use storages_common_table_meta::meta::SingleColumnMeta; -use storages_common_table_meta::meta::Statistics; -use storages_common_table_meta::meta::Versioned; use sysinfo::get_current_pid; use sysinfo::ProcessExt; use sysinfo::System; @@ -67,7 +67,7 @@ use uuid::Uuid; #[tokio::test(flavor = "multi_thread")] #[ignore] -async fn test_index_meta_cache_size_file_meta_data() -> common_exception::Result<()> { +async fn test_index_meta_cache_size_file_meta_data() -> databend_common_exception::Result<()> { let thrift_file_meta = setup().await?; let cache_number = 300_000; @@ -97,7 +97,7 @@ async fn test_index_meta_cache_size_file_meta_data() -> common_exception::Result #[tokio::test(flavor = "multi_thread")] #[ignore] -async fn test_index_meta_cache_size_bloom_meta() -> common_exception::Result<()> { +async fn test_index_meta_cache_size_bloom_meta() -> databend_common_exception::Result<()> { let thrift_file_meta = setup().await?; let cache_number = 300_000; @@ -127,7 +127,7 @@ async fn test_index_meta_cache_size_bloom_meta() -> common_exception::Result<()> // cargo test --test it storages::fuse::bloom_index_meta_size::test_random_location_memory_size --no-fail-fast -- --ignored --exact -Z unstable-options --show-output #[tokio::test(flavor = "multi_thread")] #[ignore] -async fn test_random_location_memory_size() -> common_exception::Result<()> { +async fn test_random_location_memory_size() -> databend_common_exception::Result<()> { // generate random location of Type Location let location_gen = TableMetaLocationGenerator::with_prefix("/root".to_string()); @@ -160,7 +160,7 @@ async fn test_random_location_memory_size() -> common_exception::Result<()> { // cargo test --test it storages::fuse::bloom_index_meta_size::test_segment_info_size --no-fail-fast -- --ignored --exact -Z unstable-options --show-output #[tokio::test(flavor = "multi_thread")] #[ignore] -async fn test_segment_info_size() -> common_exception::Result<()> { +async fn test_segment_info_size() -> databend_common_exception::Result<()> { let cache_number = 3000; let num_block_per_seg = 1000; @@ -203,7 +203,7 @@ async fn test_segment_info_size() -> common_exception::Result<()> { // cargo test --test it storages::fuse::bloom_index_meta_size::test_segment_raw_bytes_size --no-fail-fast -- --ignored --exact -Z unstable-options --show-output #[tokio::test(flavor = "multi_thread")] #[ignore] -async fn test_segment_raw_bytes_size() -> common_exception::Result<()> { +async fn test_segment_raw_bytes_size() -> databend_common_exception::Result<()> { let cache_number = 3000; let num_block_per_seg = 1000; @@ -247,7 +247,7 @@ async fn test_segment_raw_bytes_size() -> common_exception::Result<()> { // cargo test --test it storages::fuse::bloom_index_meta_size::test_segment_raw_repr_bytes_size --no-fail-fast -- --ignored --exact -Z unstable-options --show-output #[tokio::test(flavor = "multi_thread")] #[ignore] -async fn test_segment_raw_repr_bytes_size() -> common_exception::Result<()> { +async fn test_segment_raw_repr_bytes_size() -> databend_common_exception::Result<()> { let cache_number = 3000; let num_block_per_seg = 1000; @@ -286,7 +286,9 @@ async fn test_segment_raw_repr_bytes_size() -> common_exception::Result<()> { Ok(()) } -fn build_test_segment_info(num_blocks_per_seg: usize) -> common_exception::Result { +fn build_test_segment_info( + num_blocks_per_seg: usize, +) -> databend_common_exception::Result { let col_meta = ColumnMeta::Parquet(SingleColumnMeta { offset: 0, len: 0, @@ -373,7 +375,7 @@ where T: Clone { } } -async fn setup() -> common_exception::Result { +async fn setup() -> databend_common_exception::Result { let fields = (0..23) .map(|_| TableField::new("id", TableDataType::Number(NumberDataType::Int32))) .collect::>(); diff --git a/src/query/service/tests/it/storages/fuse/conflict.rs b/src/query/service/tests/it/storages/fuse/conflict.rs index c5e997dd9227..6af61e6dd2e3 100644 --- a/src/query/service/tests/it/storages/fuse/conflict.rs +++ b/src/query/service/tests/it/storages/fuse/conflict.rs @@ -16,13 +16,13 @@ use std::collections::HashMap; use std::sync::Arc; use std::vec; -use common_expression::TableSchema; -use common_storages_fuse::operations::common::ConflictResolveContext; -use common_storages_fuse::operations::common::MutationGenerator; -use common_storages_fuse::operations::common::SnapshotChanges; -use common_storages_fuse::operations::common::SnapshotGenerator; -use storages_common_table_meta::meta::Statistics; -use storages_common_table_meta::meta::TableSnapshot; +use databend_common_expression::TableSchema; +use databend_common_storages_fuse::operations::common::ConflictResolveContext; +use databend_common_storages_fuse::operations::common::MutationGenerator; +use databend_common_storages_fuse::operations::common::SnapshotChanges; +use databend_common_storages_fuse::operations::common::SnapshotGenerator; +use databend_storages_common_table_meta::meta::Statistics; +use databend_storages_common_table_meta::meta::TableSnapshot; #[test] /// base snapshot contains segments 1, 2, 3, diff --git a/src/query/service/tests/it/storages/fuse/io.rs b/src/query/service/tests/it/storages/fuse/io.rs index 7fd4974cfc5b..cf7ccb77da54 100644 --- a/src/query/service/tests/it/storages/fuse/io.rs +++ b/src/query/service/tests/it/storages/fuse/io.rs @@ -12,10 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_exception::Result; +use databend_common_exception::Result; use databend_query::storages::fuse::io::TableMetaLocationGenerator; -use storages_common_table_meta::meta::TableSnapshot; -use storages_common_table_meta::meta::Versioned; +use databend_storages_common_table_meta::meta::TableSnapshot; +use databend_storages_common_table_meta::meta::Versioned; use uuid::Uuid; #[test] diff --git a/src/query/service/tests/it/storages/fuse/meta/serialization_format_compatability.rs b/src/query/service/tests/it/storages/fuse/meta/serialization_format_compatability.rs index d72894dc482c..822ba645af4a 100644 --- a/src/query/service/tests/it/storages/fuse/meta/serialization_format_compatability.rs +++ b/src/query/service/tests/it/storages/fuse/meta/serialization_format_compatability.rs @@ -14,8 +14,8 @@ use std::io::Cursor; -use common_io::prelude::bincode_deserialize_from_slice; -use common_io::prelude::bincode_serialize_into_buf; +use databend_common_io::prelude::bincode_deserialize_from_slice; +use databend_common_io::prelude::bincode_serialize_into_buf; #[derive(serde::Serialize, serde::Deserialize, Clone, Debug, PartialEq)] struct BasicOld { diff --git a/src/query/service/tests/it/storages/fuse/meta/snapshot.rs b/src/query/service/tests/it/storages/fuse/meta/snapshot.rs index 46f94418b49e..b7b81b7a037c 100644 --- a/src/query/service/tests/it/storages/fuse/meta/snapshot.rs +++ b/src/query/service/tests/it/storages/fuse/meta/snapshot.rs @@ -15,11 +15,11 @@ use std::collections::HashMap; use std::ops::Add; -use common_expression::TableSchema; -use storages_common_table_meta::meta::testing::StatisticsV0; -use storages_common_table_meta::meta::testing::TableSnapshotV1; -use storages_common_table_meta::meta::testing::TableSnapshotV2; -use storages_common_table_meta::meta::TableSnapshot; +use databend_common_expression::TableSchema; +use databend_storages_common_table_meta::meta::testing::StatisticsV0; +use databend_storages_common_table_meta::meta::testing::TableSnapshotV1; +use databend_storages_common_table_meta::meta::testing::TableSnapshotV2; +use databend_storages_common_table_meta::meta::TableSnapshot; use uuid::Uuid; fn default_snapshot() -> TableSnapshot { diff --git a/src/query/service/tests/it/storages/fuse/operations/alter_table.rs b/src/query/service/tests/it/storages/fuse/operations/alter_table.rs index e4308015ddaa..11b56f553a50 100644 --- a/src/query/service/tests/it/storages/fuse/operations/alter_table.rs +++ b/src/query/service/tests/it/storages/fuse/operations/alter_table.rs @@ -14,38 +14,38 @@ use std::collections::HashSet; -use common_base::base::tokio; -use common_exception::Result; -use common_expression::types::Float64Type; -use common_expression::types::Int32Type; -use common_expression::types::NumberDataType; -use common_expression::types::UInt64Type; -use common_expression::Column; -use common_expression::ColumnId; -use common_expression::DataBlock; -use common_expression::FromData; -use common_expression::Scalar; -use common_expression::TableDataType; -use common_expression::TableField; -use common_sql::plans::AddColumnOption; -use common_sql::plans::AddTableColumnPlan; -use common_sql::plans::DropTableColumnPlan; -use common_sql::Planner; -use common_storages_fuse::io::MetaReaders; -use common_storages_fuse::FuseTable; -use common_storages_fuse::TableContext; +use databend_common_base::base::tokio; +use databend_common_exception::Result; +use databend_common_expression::types::Float64Type; +use databend_common_expression::types::Int32Type; +use databend_common_expression::types::NumberDataType; +use databend_common_expression::types::UInt64Type; +use databend_common_expression::Column; +use databend_common_expression::ColumnId; +use databend_common_expression::DataBlock; +use databend_common_expression::FromData; +use databend_common_expression::Scalar; +use databend_common_expression::TableDataType; +use databend_common_expression::TableField; +use databend_common_sql::plans::AddColumnOption; +use databend_common_sql::plans::AddTableColumnPlan; +use databend_common_sql::plans::DropTableColumnPlan; +use databend_common_sql::Planner; +use databend_common_storages_fuse::io::MetaReaders; +use databend_common_storages_fuse::FuseTable; +use databend_common_storages_fuse::TableContext; use databend_query::interpreters::AddTableColumnInterpreter; use databend_query::interpreters::DropTableColumnInterpreter; use databend_query::interpreters::Interpreter; use databend_query::interpreters::InterpreterFactory; use databend_query::test_kits::*; +use databend_storages_common_cache::LoadParams; +use databend_storages_common_table_meta::meta::SegmentInfo; +use databend_storages_common_table_meta::meta::TableSnapshot; +use databend_storages_common_table_meta::meta::Versioned; +use databend_storages_common_table_meta::table::OPT_KEY_SNAPSHOT_LOCATION; use futures_util::TryStreamExt; use ordered_float::OrderedFloat; -use storages_common_cache::LoadParams; -use storages_common_table_meta::meta::SegmentInfo; -use storages_common_table_meta::meta::TableSnapshot; -use storages_common_table_meta::meta::Versioned; -use storages_common_table_meta::table::OPT_KEY_SNAPSHOT_LOCATION; async fn check_segment_column_ids( fixture: &TestFixture, @@ -223,19 +223,27 @@ async fn test_fuse_table_optimize_alter_table() -> Result<()> { ( 3, ( - Scalar::Number(common_expression::types::number::NumberScalar::UInt64(1)), - Scalar::Number(common_expression::types::number::NumberScalar::UInt64(4)), + Scalar::Number( + databend_common_expression::types::number::NumberScalar::UInt64(1), + ), + Scalar::Number( + databend_common_expression::types::number::NumberScalar::UInt64(4), + ), ), ), ( 4, ( - Scalar::Number(common_expression::types::number::NumberScalar::Float64( - OrderedFloat(13.0), - )), - Scalar::Number(common_expression::types::number::NumberScalar::Float64( - OrderedFloat(15.0), - )), + Scalar::Number( + databend_common_expression::types::number::NumberScalar::Float64( + OrderedFloat(13.0), + ), + ), + Scalar::Number( + databend_common_expression::types::number::NumberScalar::Float64( + OrderedFloat(15.0), + ), + ), ), ), ]), @@ -261,19 +269,27 @@ async fn test_fuse_table_optimize_alter_table() -> Result<()> { ( 3, ( - Scalar::Number(common_expression::types::number::NumberScalar::UInt64(1)), - Scalar::Number(common_expression::types::number::NumberScalar::UInt64(4)), + Scalar::Number( + databend_common_expression::types::number::NumberScalar::UInt64(1), + ), + Scalar::Number( + databend_common_expression::types::number::NumberScalar::UInt64(4), + ), ), ), ( 4, ( - Scalar::Number(common_expression::types::number::NumberScalar::Float64( - OrderedFloat(13.0), - )), - Scalar::Number(common_expression::types::number::NumberScalar::Float64( - OrderedFloat(15.0), - )), + Scalar::Number( + databend_common_expression::types::number::NumberScalar::Float64( + OrderedFloat(13.0), + ), + ), + Scalar::Number( + databend_common_expression::types::number::NumberScalar::Float64( + OrderedFloat(15.0), + ), + ), ), ), ]), diff --git a/src/query/service/tests/it/storages/fuse/operations/analyze.rs b/src/query/service/tests/it/storages/fuse/operations/analyze.rs index 2df8608af132..c4d5921db66f 100644 --- a/src/query/service/tests/it/storages/fuse/operations/analyze.rs +++ b/src/query/service/tests/it/storages/fuse/operations/analyze.rs @@ -14,11 +14,11 @@ use std::sync::Arc; -use common_base::base::tokio; -use common_exception::Result; -use common_storages_factory::Table; -use common_storages_fuse::FuseTable; -use common_storages_fuse::TableContext; +use databend_common_base::base::tokio; +use databend_common_exception::Result; +use databend_common_storages_factory::Table; +use databend_common_storages_fuse::FuseTable; +use databend_common_storages_fuse::TableContext; use databend_query::test_kits::*; use crate::storages::fuse::utils::do_insertions; diff --git a/src/query/service/tests/it/storages/fuse/operations/clustering.rs b/src/query/service/tests/it/storages/fuse/operations/clustering.rs index cafde9bd437a..f907ed325d88 100644 --- a/src/query/service/tests/it/storages/fuse/operations/clustering.rs +++ b/src/query/service/tests/it/storages/fuse/operations/clustering.rs @@ -12,26 +12,26 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_ast::ast::Engine; -use common_base::base::tokio; -use common_sql::plans::AlterTableClusterKeyPlan; -use common_sql::plans::CreateTablePlan; -use common_sql::plans::DropTableClusterKeyPlan; -use common_storages_fuse::io::MetaReaders; -use common_storages_fuse::FuseTable; +use databend_common_ast::ast::Engine; +use databend_common_base::base::tokio; +use databend_common_sql::plans::AlterTableClusterKeyPlan; +use databend_common_sql::plans::CreateTablePlan; +use databend_common_sql::plans::DropTableClusterKeyPlan; +use databend_common_storages_fuse::io::MetaReaders; +use databend_common_storages_fuse::FuseTable; use databend_query::interpreters::AlterTableClusterKeyInterpreter; use databend_query::interpreters::CreateTableInterpreter; use databend_query::interpreters::DropTableClusterKeyInterpreter; use databend_query::interpreters::Interpreter; use databend_query::test_kits::*; -use storages_common_cache::LoadParams; -use storages_common_table_meta::meta::TableSnapshot; -use storages_common_table_meta::meta::Versioned; -use storages_common_table_meta::table::OPT_KEY_DATABASE_ID; -use storages_common_table_meta::table::OPT_KEY_SNAPSHOT_LOCATION; +use databend_storages_common_cache::LoadParams; +use databend_storages_common_table_meta::meta::TableSnapshot; +use databend_storages_common_table_meta::meta::Versioned; +use databend_storages_common_table_meta::table::OPT_KEY_DATABASE_ID; +use databend_storages_common_table_meta::table::OPT_KEY_SNAPSHOT_LOCATION; #[tokio::test(flavor = "multi_thread")] -async fn test_fuse_alter_table_cluster_key() -> common_exception::Result<()> { +async fn test_fuse_alter_table_cluster_key() -> databend_common_exception::Result<()> { let fixture = TestFixture::setup().await?; fixture.create_default_database().await?; diff --git a/src/query/service/tests/it/storages/fuse/operations/commit.rs b/src/query/service/tests/it/storages/fuse/operations/commit.rs index 380224cb9aa6..d9af0f00725e 100644 --- a/src/query/service/tests/it/storages/fuse/operations/commit.rs +++ b/src/query/service/tests/it/storages/fuse/operations/commit.rs @@ -17,115 +17,115 @@ use std::collections::HashMap; use std::collections::HashSet; use std::sync::Arc; -use common_base::base::tokio; -use common_base::base::Progress; -use common_base::base::ProgressValues; -use common_catalog::catalog::Catalog; -use common_catalog::cluster_info::Cluster; -use common_catalog::database::Database; -use common_catalog::plan::DataSourcePlan; -use common_catalog::plan::PartInfoPtr; -use common_catalog::plan::Partitions; -use common_catalog::query_kind::QueryKind; -use common_catalog::table::Table; -use common_catalog::table_context::MaterializedCtesBlocks; -use common_catalog::table_context::ProcessInfo; -use common_catalog::table_context::StageAttachment; -use common_catalog::table_context::TableContext; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::DataBlock; -use common_expression::Expr; -use common_expression::FunctionContext; -use common_io::prelude::FormatSettings; -use common_meta_app::principal::FileFormatParams; -use common_meta_app::principal::OnErrorMode; -use common_meta_app::principal::RoleInfo; -use common_meta_app::principal::UserDefinedConnection; -use common_meta_app::principal::UserInfo; -use common_meta_app::schema::CatalogInfo; -use common_meta_app::schema::CountTablesReply; -use common_meta_app::schema::CountTablesReq; -use common_meta_app::schema::CreateDatabaseReply; -use common_meta_app::schema::CreateDatabaseReq; -use common_meta_app::schema::CreateIndexReply; -use common_meta_app::schema::CreateIndexReq; -use common_meta_app::schema::CreateLockRevReply; -use common_meta_app::schema::CreateLockRevReq; -use common_meta_app::schema::CreateTableReply; -use common_meta_app::schema::CreateTableReq; -use common_meta_app::schema::CreateVirtualColumnReply; -use common_meta_app::schema::CreateVirtualColumnReq; -use common_meta_app::schema::DeleteLockRevReq; -use common_meta_app::schema::DropDatabaseReply; -use common_meta_app::schema::DropDatabaseReq; -use common_meta_app::schema::DropIndexReply; -use common_meta_app::schema::DropIndexReq; -use common_meta_app::schema::DropTableByIdReq; -use common_meta_app::schema::DropTableReply; -use common_meta_app::schema::DropVirtualColumnReply; -use common_meta_app::schema::DropVirtualColumnReq; -use common_meta_app::schema::ExtendLockRevReq; -use common_meta_app::schema::GetIndexReply; -use common_meta_app::schema::GetIndexReq; -use common_meta_app::schema::GetTableCopiedFileReply; -use common_meta_app::schema::GetTableCopiedFileReq; -use common_meta_app::schema::IndexMeta; -use common_meta_app::schema::ListIndexesByIdReq; -use common_meta_app::schema::ListIndexesReq; -use common_meta_app::schema::ListLockRevReq; -use common_meta_app::schema::ListLocksReq; -use common_meta_app::schema::ListVirtualColumnsReq; -use common_meta_app::schema::LockInfo; -use common_meta_app::schema::LockMeta; -use common_meta_app::schema::RenameDatabaseReply; -use common_meta_app::schema::RenameDatabaseReq; -use common_meta_app::schema::RenameTableReply; -use common_meta_app::schema::RenameTableReq; -use common_meta_app::schema::SetTableColumnMaskPolicyReply; -use common_meta_app::schema::SetTableColumnMaskPolicyReq; -use common_meta_app::schema::TableIdent; -use common_meta_app::schema::TableInfo; -use common_meta_app::schema::TableMeta; -use common_meta_app::schema::TruncateTableReply; -use common_meta_app::schema::TruncateTableReq; -use common_meta_app::schema::UndropDatabaseReply; -use common_meta_app::schema::UndropDatabaseReq; -use common_meta_app::schema::UndropTableReply; -use common_meta_app::schema::UndropTableReq; -use common_meta_app::schema::UpdateIndexReply; -use common_meta_app::schema::UpdateIndexReq; -use common_meta_app::schema::UpdateTableMetaReply; -use common_meta_app::schema::UpdateTableMetaReq; -use common_meta_app::schema::UpdateVirtualColumnReply; -use common_meta_app::schema::UpdateVirtualColumnReq; -use common_meta_app::schema::UpsertTableOptionReply; -use common_meta_app::schema::UpsertTableOptionReq; -use common_meta_app::schema::VirtualColumnMeta; -use common_meta_types::MetaId; -use common_pipeline_core::processors::profile::PlanProfile; -use common_pipeline_core::processors::profile::Profile; -use common_pipeline_core::InputError; -use common_settings::Settings; -use common_sql::IndexType; -use common_storage::CopyStatus; -use common_storage::DataOperator; -use common_storage::FileStatus; -use common_storage::MergeStatus; -use common_storage::StageFileInfo; -use common_storages_fuse::FuseTable; -use common_storages_fuse::FUSE_TBL_SNAPSHOT_PREFIX; -use common_users::GrantObjectVisibilityChecker; use dashmap::DashMap; +use databend_common_base::base::tokio; +use databend_common_base::base::Progress; +use databend_common_base::base::ProgressValues; +use databend_common_catalog::catalog::Catalog; +use databend_common_catalog::cluster_info::Cluster; +use databend_common_catalog::database::Database; +use databend_common_catalog::plan::DataSourcePlan; +use databend_common_catalog::plan::PartInfoPtr; +use databend_common_catalog::plan::Partitions; +use databend_common_catalog::query_kind::QueryKind; +use databend_common_catalog::table::Table; +use databend_common_catalog::table_context::MaterializedCtesBlocks; +use databend_common_catalog::table_context::ProcessInfo; +use databend_common_catalog::table_context::StageAttachment; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::DataBlock; +use databend_common_expression::Expr; +use databend_common_expression::FunctionContext; +use databend_common_io::prelude::FormatSettings; +use databend_common_meta_app::principal::FileFormatParams; +use databend_common_meta_app::principal::OnErrorMode; +use databend_common_meta_app::principal::RoleInfo; +use databend_common_meta_app::principal::UserDefinedConnection; +use databend_common_meta_app::principal::UserInfo; +use databend_common_meta_app::schema::CatalogInfo; +use databend_common_meta_app::schema::CountTablesReply; +use databend_common_meta_app::schema::CountTablesReq; +use databend_common_meta_app::schema::CreateDatabaseReply; +use databend_common_meta_app::schema::CreateDatabaseReq; +use databend_common_meta_app::schema::CreateIndexReply; +use databend_common_meta_app::schema::CreateIndexReq; +use databend_common_meta_app::schema::CreateLockRevReply; +use databend_common_meta_app::schema::CreateLockRevReq; +use databend_common_meta_app::schema::CreateTableReply; +use databend_common_meta_app::schema::CreateTableReq; +use databend_common_meta_app::schema::CreateVirtualColumnReply; +use databend_common_meta_app::schema::CreateVirtualColumnReq; +use databend_common_meta_app::schema::DeleteLockRevReq; +use databend_common_meta_app::schema::DropDatabaseReply; +use databend_common_meta_app::schema::DropDatabaseReq; +use databend_common_meta_app::schema::DropIndexReply; +use databend_common_meta_app::schema::DropIndexReq; +use databend_common_meta_app::schema::DropTableByIdReq; +use databend_common_meta_app::schema::DropTableReply; +use databend_common_meta_app::schema::DropVirtualColumnReply; +use databend_common_meta_app::schema::DropVirtualColumnReq; +use databend_common_meta_app::schema::ExtendLockRevReq; +use databend_common_meta_app::schema::GetIndexReply; +use databend_common_meta_app::schema::GetIndexReq; +use databend_common_meta_app::schema::GetTableCopiedFileReply; +use databend_common_meta_app::schema::GetTableCopiedFileReq; +use databend_common_meta_app::schema::IndexMeta; +use databend_common_meta_app::schema::ListIndexesByIdReq; +use databend_common_meta_app::schema::ListIndexesReq; +use databend_common_meta_app::schema::ListLockRevReq; +use databend_common_meta_app::schema::ListLocksReq; +use databend_common_meta_app::schema::ListVirtualColumnsReq; +use databend_common_meta_app::schema::LockInfo; +use databend_common_meta_app::schema::LockMeta; +use databend_common_meta_app::schema::RenameDatabaseReply; +use databend_common_meta_app::schema::RenameDatabaseReq; +use databend_common_meta_app::schema::RenameTableReply; +use databend_common_meta_app::schema::RenameTableReq; +use databend_common_meta_app::schema::SetTableColumnMaskPolicyReply; +use databend_common_meta_app::schema::SetTableColumnMaskPolicyReq; +use databend_common_meta_app::schema::TableIdent; +use databend_common_meta_app::schema::TableInfo; +use databend_common_meta_app::schema::TableMeta; +use databend_common_meta_app::schema::TruncateTableReply; +use databend_common_meta_app::schema::TruncateTableReq; +use databend_common_meta_app::schema::UndropDatabaseReply; +use databend_common_meta_app::schema::UndropDatabaseReq; +use databend_common_meta_app::schema::UndropTableReply; +use databend_common_meta_app::schema::UndropTableReq; +use databend_common_meta_app::schema::UpdateIndexReply; +use databend_common_meta_app::schema::UpdateIndexReq; +use databend_common_meta_app::schema::UpdateTableMetaReply; +use databend_common_meta_app::schema::UpdateTableMetaReq; +use databend_common_meta_app::schema::UpdateVirtualColumnReply; +use databend_common_meta_app::schema::UpdateVirtualColumnReq; +use databend_common_meta_app::schema::UpsertTableOptionReply; +use databend_common_meta_app::schema::UpsertTableOptionReq; +use databend_common_meta_app::schema::VirtualColumnMeta; +use databend_common_meta_types::MetaId; +use databend_common_pipeline_core::processors::profile::PlanProfile; +use databend_common_pipeline_core::processors::profile::Profile; +use databend_common_pipeline_core::InputError; +use databend_common_settings::Settings; +use databend_common_sql::IndexType; +use databend_common_storage::CopyStatus; +use databend_common_storage::DataOperator; +use databend_common_storage::FileStatus; +use databend_common_storage::MergeStatus; +use databend_common_storage::StageFileInfo; +use databend_common_storages_fuse::FuseTable; +use databend_common_storages_fuse::FUSE_TBL_SNAPSHOT_PREFIX; +use databend_common_users::GrantObjectVisibilityChecker; use databend_query::sessions::QueryContext; use databend_query::test_kits::*; +use databend_storages_common_table_meta::meta::Location; +use databend_storages_common_table_meta::meta::SegmentInfo; +use databend_storages_common_table_meta::meta::Statistics; +use databend_storages_common_table_meta::meta::TableSnapshot; +use databend_storages_common_table_meta::meta::Versioned; use futures::TryStreamExt; use parking_lot::RwLock; -use storages_common_table_meta::meta::Location; -use storages_common_table_meta::meta::SegmentInfo; -use storages_common_table_meta::meta::Statistics; -use storages_common_table_meta::meta::TableSnapshot; -use storages_common_table_meta::meta::Versioned; use uuid::Uuid; use walkdir::WalkDir; @@ -183,7 +183,7 @@ async fn test_fuse_occ_retry() -> Result<()> { "| 5 | (10, 15) |", "+----------+----------+", ]; - common_expression::block_debug::assert_blocks_sorted_eq(expected, blocks.as_slice()); + databend_common_expression::block_debug::assert_blocks_sorted_eq(expected, blocks.as_slice()); Ok(()) } diff --git a/src/query/service/tests/it/storages/fuse/operations/gc.rs b/src/query/service/tests/it/storages/fuse/operations/gc.rs index fe482734fb5f..45f6e516ddfc 100644 --- a/src/query/service/tests/it/storages/fuse/operations/gc.rs +++ b/src/query/service/tests/it/storages/fuse/operations/gc.rs @@ -16,15 +16,15 @@ use std::sync::Arc; use chrono::Duration; use chrono::Utc; -use common_base::base::tokio; -use common_catalog::table_context::TableContext; -use common_exception::Result; -use common_storages_fuse::io::MetaWriter; -use common_storages_fuse::FuseTable; +use databend_common_base::base::tokio; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::Result; +use databend_common_storages_fuse::io::MetaWriter; +use databend_common_storages_fuse::FuseTable; use databend_query::test_kits::*; -use storages_common_table_meta::meta::Location; -use storages_common_table_meta::meta::TableSnapshot; -use storages_common_table_meta::meta::Versioned; +use databend_storages_common_table_meta::meta::Location; +use databend_storages_common_table_meta::meta::TableSnapshot; +use databend_storages_common_table_meta::meta::Versioned; use uuid::Uuid; use crate::storages::fuse::operations::mutation::compact_segment; diff --git a/src/query/service/tests/it/storages/fuse/operations/internal_column.rs b/src/query/service/tests/it/storages/fuse/operations/internal_column.rs index 42eed2de61ec..21970e701729 100644 --- a/src/query/service/tests/it/storages/fuse/operations/internal_column.rs +++ b/src/query/service/tests/it/storages/fuse/operations/internal_column.rs @@ -14,25 +14,25 @@ use std::collections::HashSet; -use common_base::base::tokio; -use common_catalog::plan::InternalColumn; -use common_catalog::plan::InternalColumnMeta; -use common_catalog::plan::Partitions; -use common_exception::Result; -use common_expression::DataBlock; -use common_sql::binder::INTERNAL_COLUMN_FACTORY; -use common_sql::Planner; -use common_storages_fuse::io::MetaReaders; -use common_storages_fuse::FusePartInfo; -use common_storages_fuse::FuseTable; +use databend_common_base::base::tokio; +use databend_common_catalog::plan::InternalColumn; +use databend_common_catalog::plan::InternalColumnMeta; +use databend_common_catalog::plan::Partitions; +use databend_common_exception::Result; +use databend_common_expression::DataBlock; +use databend_common_sql::binder::INTERNAL_COLUMN_FACTORY; +use databend_common_sql::Planner; +use databend_common_storages_fuse::io::MetaReaders; +use databend_common_storages_fuse::FusePartInfo; +use databend_common_storages_fuse::FuseTable; use databend_query::interpreters::InterpreterFactory; use databend_query::test_kits::*; +use databend_storages_common_cache::LoadParams; +use databend_storages_common_table_meta::meta::SegmentInfo; +use databend_storages_common_table_meta::meta::TableSnapshot; +use databend_storages_common_table_meta::meta::Versioned; +use databend_storages_common_table_meta::table::OPT_KEY_SNAPSHOT_LOCATION; use futures::TryStreamExt; -use storages_common_cache::LoadParams; -use storages_common_table_meta::meta::SegmentInfo; -use storages_common_table_meta::meta::TableSnapshot; -use storages_common_table_meta::meta::Versioned; -use storages_common_table_meta::table::OPT_KEY_SNAPSHOT_LOCATION; fn expected_data_block( parts: &Partitions, diff --git a/src/query/service/tests/it/storages/fuse/operations/mutation/block_compact_mutator.rs b/src/query/service/tests/it/storages/fuse/operations/mutation/block_compact_mutator.rs index c275f05d37e1..073da79240e3 100644 --- a/src/query/service/tests/it/storages/fuse/operations/mutation/block_compact_mutator.rs +++ b/src/query/service/tests/it/storages/fuse/operations/mutation/block_compact_mutator.rs @@ -15,15 +15,15 @@ use std::collections::HashSet; use std::sync::Arc; -use common_base::base::tokio; -use common_catalog::table::Table; -use common_exception::Result; -use common_expression::BlockThresholds; -use common_storages_fuse::io::SegmentsIO; -use common_storages_fuse::operations::BlockCompactMutator; -use common_storages_fuse::operations::CompactOptions; -use common_storages_fuse::operations::CompactPartInfo; -use common_storages_fuse::statistics::reducers::merge_statistics_mut; +use databend_common_base::base::tokio; +use databend_common_catalog::table::Table; +use databend_common_exception::Result; +use databend_common_expression::BlockThresholds; +use databend_common_storages_fuse::io::SegmentsIO; +use databend_common_storages_fuse::operations::BlockCompactMutator; +use databend_common_storages_fuse::operations::CompactOptions; +use databend_common_storages_fuse::operations::CompactPartInfo; +use databend_common_storages_fuse::statistics::reducers::merge_statistics_mut; use databend_query::interpreters::OptimizeTableInterpreter; use databend_query::pipelines::executor::ExecutorSettings; use databend_query::pipelines::executor::PipelineCompleteExecutor; @@ -31,11 +31,11 @@ use databend_query::schedulers::build_query_pipeline_without_render_result_set; use databend_query::sessions::QueryContext; use databend_query::sessions::TableContext; use databend_query::test_kits::*; +use databend_storages_common_table_meta::meta::SegmentInfo; +use databend_storages_common_table_meta::meta::Statistics; +use databend_storages_common_table_meta::meta::TableSnapshot; use rand::thread_rng; use rand::Rng; -use storages_common_table_meta::meta::SegmentInfo; -use storages_common_table_meta::meta::Statistics; -use storages_common_table_meta::meta::TableSnapshot; use uuid::Uuid; use crate::storages::fuse::operations::mutation::segments_compact_mutator::CompactSegmentTestFixture; @@ -106,7 +106,7 @@ async fn test_compact() -> Result<()> { async fn do_compact(ctx: Arc, table: Arc) -> Result { let settings = ctx.get_settings(); - let mut pipeline = common_pipeline_core::Pipeline::create(); + let mut pipeline = databend_common_pipeline_core::Pipeline::create(); let res = table.compact_blocks(ctx.clone(), None).await?; let table_info = table.get_table_info().clone(); diff --git a/src/query/service/tests/it/storages/fuse/operations/mutation/deletion.rs b/src/query/service/tests/it/storages/fuse/operations/mutation/deletion.rs index fdf16fcc1e5f..4a6009300f83 100644 --- a/src/query/service/tests/it/storages/fuse/operations/mutation/deletion.rs +++ b/src/query/service/tests/it/storages/fuse/operations/mutation/deletion.rs @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_base::base::tokio; -use common_exception::Result; +use databend_common_base::base::tokio; +use databend_common_exception::Result; use databend_query::test_kits::*; #[tokio::test(flavor = "multi_thread")] diff --git a/src/query/service/tests/it/storages/fuse/operations/mutation/recluster_mutator.rs b/src/query/service/tests/it/storages/fuse/operations/mutation/recluster_mutator.rs index cd91cfb3c456..0ad5808e99da 100644 --- a/src/query/service/tests/it/storages/fuse/operations/mutation/recluster_mutator.rs +++ b/src/query/service/tests/it/storages/fuse/operations/mutation/recluster_mutator.rs @@ -17,33 +17,33 @@ use std::collections::HashSet; use std::sync::Arc; use chrono::Utc; -use common_base::base::tokio; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::BlockThresholds; -use common_expression::DataBlock; -use common_expression::Scalar; -use common_expression::TableSchema; -use common_expression::TableSchemaRef; -use common_storages_fuse::io::SegmentWriter; -use common_storages_fuse::io::TableMetaLocationGenerator; -use common_storages_fuse::operations::ReclusterMutator; -use common_storages_fuse::pruning::create_segment_location_vector; -use common_storages_fuse::statistics::reducers::merge_statistics_mut; -use common_storages_fuse::statistics::reducers::reduce_block_metas; -use common_storages_fuse::FusePartInfo; -use common_storages_fuse::FuseTable; +use databend_common_base::base::tokio; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::BlockThresholds; +use databend_common_expression::DataBlock; +use databend_common_expression::Scalar; +use databend_common_expression::TableSchema; +use databend_common_expression::TableSchemaRef; +use databend_common_storages_fuse::io::SegmentWriter; +use databend_common_storages_fuse::io::TableMetaLocationGenerator; +use databend_common_storages_fuse::operations::ReclusterMutator; +use databend_common_storages_fuse::pruning::create_segment_location_vector; +use databend_common_storages_fuse::statistics::reducers::merge_statistics_mut; +use databend_common_storages_fuse::statistics::reducers::reduce_block_metas; +use databend_common_storages_fuse::FusePartInfo; +use databend_common_storages_fuse::FuseTable; use databend_query::sessions::TableContext; use databend_query::test_kits::*; +use databend_storages_common_table_meta::meta; +use databend_storages_common_table_meta::meta::BlockMeta; +use databend_storages_common_table_meta::meta::ClusterStatistics; +use databend_storages_common_table_meta::meta::SegmentInfo; +use databend_storages_common_table_meta::meta::Statistics; +use databend_storages_common_table_meta::meta::TableSnapshot; +use databend_storages_common_table_meta::meta::Versioned; use rand::thread_rng; use rand::Rng; -use storages_common_table_meta::meta; -use storages_common_table_meta::meta::BlockMeta; -use storages_common_table_meta::meta::ClusterStatistics; -use storages_common_table_meta::meta::SegmentInfo; -use storages_common_table_meta::meta::Statistics; -use storages_common_table_meta::meta::TableSnapshot; -use storages_common_table_meta::meta::Versioned; use uuid::Uuid; use crate::storages::fuse::operations::mutation::CompactSegmentTestFixture; diff --git a/src/query/service/tests/it/storages/fuse/operations/mutation/segments_compact_mutator.rs b/src/query/service/tests/it/storages/fuse/operations/mutation/segments_compact_mutator.rs index a51fd68e4ab2..057c65a159c0 100644 --- a/src/query/service/tests/it/storages/fuse/operations/mutation/segments_compact_mutator.rs +++ b/src/query/service/tests/it/storages/fuse/operations/mutation/segments_compact_mutator.rs @@ -16,55 +16,55 @@ use std::collections::HashSet; use std::sync::Arc; use chrono::Utc; -use common_base::base::tokio; -use common_base::runtime::execute_futures_in_parallel; -use common_catalog::table::Table; -use common_catalog::table::TableExt; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::types::number::NumberColumn; -use common_expression::types::number::NumberScalar; -use common_expression::BlockThresholds; -use common_expression::Column; -use common_expression::DataBlock; -use common_expression::Scalar; -use common_expression::SendableDataBlockStream; -use common_expression::Value; -use common_io::constants::DEFAULT_BLOCK_BUFFER_SIZE; -use common_storage::DataOperator; -use common_storages_fuse::io::serialize_block; -use common_storages_fuse::io::CompactSegmentInfoReader; -use common_storages_fuse::io::MetaReaders; -use common_storages_fuse::io::MetaWriter; -use common_storages_fuse::io::SegmentWriter; -use common_storages_fuse::io::SegmentsIO; -use common_storages_fuse::io::TableMetaLocationGenerator; -use common_storages_fuse::io::WriteSettings; -use common_storages_fuse::operations::CompactOptions; -use common_storages_fuse::operations::SegmentCompactMutator; -use common_storages_fuse::operations::SegmentCompactionState; -use common_storages_fuse::operations::SegmentCompactor; -use common_storages_fuse::statistics::gen_columns_statistics; -use common_storages_fuse::statistics::reducers::merge_statistics_mut; -use common_storages_fuse::statistics::sort_by_cluster_stats; -use common_storages_fuse::statistics::StatisticsAccumulator; -use common_storages_fuse::FuseStorageFormat; -use common_storages_fuse::FuseTable; +use databend_common_base::base::tokio; +use databend_common_base::runtime::execute_futures_in_parallel; +use databend_common_catalog::table::Table; +use databend_common_catalog::table::TableExt; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::types::number::NumberColumn; +use databend_common_expression::types::number::NumberScalar; +use databend_common_expression::BlockThresholds; +use databend_common_expression::Column; +use databend_common_expression::DataBlock; +use databend_common_expression::Scalar; +use databend_common_expression::SendableDataBlockStream; +use databend_common_expression::Value; +use databend_common_io::constants::DEFAULT_BLOCK_BUFFER_SIZE; +use databend_common_storage::DataOperator; +use databend_common_storages_fuse::io::serialize_block; +use databend_common_storages_fuse::io::CompactSegmentInfoReader; +use databend_common_storages_fuse::io::MetaReaders; +use databend_common_storages_fuse::io::MetaWriter; +use databend_common_storages_fuse::io::SegmentWriter; +use databend_common_storages_fuse::io::SegmentsIO; +use databend_common_storages_fuse::io::TableMetaLocationGenerator; +use databend_common_storages_fuse::io::WriteSettings; +use databend_common_storages_fuse::operations::CompactOptions; +use databend_common_storages_fuse::operations::SegmentCompactMutator; +use databend_common_storages_fuse::operations::SegmentCompactionState; +use databend_common_storages_fuse::operations::SegmentCompactor; +use databend_common_storages_fuse::statistics::gen_columns_statistics; +use databend_common_storages_fuse::statistics::reducers::merge_statistics_mut; +use databend_common_storages_fuse::statistics::sort_by_cluster_stats; +use databend_common_storages_fuse::statistics::StatisticsAccumulator; +use databend_common_storages_fuse::FuseStorageFormat; +use databend_common_storages_fuse::FuseTable; use databend_query::locks::LockManager; use databend_query::sessions::QueryContext; use databend_query::sessions::TableContext; use databend_query::test_kits::*; +use databend_storages_common_cache::LoadParams; +use databend_storages_common_table_meta::meta::BlockMeta; +use databend_storages_common_table_meta::meta::ClusterStatistics; +use databend_storages_common_table_meta::meta::Compression; +use databend_storages_common_table_meta::meta::Location; +use databend_storages_common_table_meta::meta::SegmentInfo; +use databend_storages_common_table_meta::meta::Statistics; +use databend_storages_common_table_meta::meta::Versioned; use futures_util::TryStreamExt; use rand::thread_rng; use rand::Rng; -use storages_common_cache::LoadParams; -use storages_common_table_meta::meta::BlockMeta; -use storages_common_table_meta::meta::ClusterStatistics; -use storages_common_table_meta::meta::Compression; -use storages_common_table_meta::meta::Location; -use storages_common_table_meta::meta::SegmentInfo; -use storages_common_table_meta::meta::Statistics; -use storages_common_table_meta::meta::Versioned; #[tokio::test(flavor = "multi_thread")] async fn test_compact_segment_normal_case() -> Result<()> { diff --git a/src/query/service/tests/it/storages/fuse/operations/navigate.rs b/src/query/service/tests/it/storages/fuse/operations/navigate.rs index fef00ceb0c57..dcb415edacdf 100644 --- a/src/query/service/tests/it/storages/fuse/operations/navigate.rs +++ b/src/query/service/tests/it/storages/fuse/operations/navigate.rs @@ -15,11 +15,11 @@ use std::ops::Sub; use std::time::Duration; -use common_base::base::tokio; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::DataBlock; -use common_storages_fuse::io::SnapshotHistoryReader; +use databend_common_base::base::tokio; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::DataBlock; +use databend_common_storages_fuse::io::SnapshotHistoryReader; use databend_query::storages::fuse::io::MetaReaders; use databend_query::storages::fuse::io::TableMetaLocationGenerator; use databend_query::storages::fuse::FuseTable; diff --git a/src/query/service/tests/it/storages/fuse/operations/optimize.rs b/src/query/service/tests/it/storages/fuse/operations/optimize.rs index 2b930de160a1..02f300cf3680 100644 --- a/src/query/service/tests/it/storages/fuse/operations/optimize.rs +++ b/src/query/service/tests/it/storages/fuse/operations/optimize.rs @@ -12,10 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_base::base::tokio; -use common_exception::Result; -use common_sql::Planner; -use common_storages_fuse::TableContext; +use databend_common_base::base::tokio; +use databend_common_exception::Result; +use databend_common_sql::Planner; +use databend_common_storages_fuse::TableContext; use databend_query::interpreters::InterpreterFactory; use databend_query::test_kits::*; use futures_util::TryStreamExt; diff --git a/src/query/service/tests/it/storages/fuse/operations/purge_drop.rs b/src/query/service/tests/it/storages/fuse/operations/purge_drop.rs index b76454e60eb4..2a94c849a669 100644 --- a/src/query/service/tests/it/storages/fuse/operations/purge_drop.rs +++ b/src/query/service/tests/it/storages/fuse/operations/purge_drop.rs @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_base::base::tokio; -use common_exception::Result; +use databend_common_base::base::tokio; +use databend_common_exception::Result; use databend_query::test_kits::*; #[tokio::test(flavor = "multi_thread")] diff --git a/src/query/service/tests/it/storages/fuse/operations/read_plan.rs b/src/query/service/tests/it/storages/fuse/operations/read_plan.rs index 8ca95de5a8da..6f2d1bc71ad8 100644 --- a/src/query/service/tests/it/storages/fuse/operations/read_plan.rs +++ b/src/query/service/tests/it/storages/fuse/operations/read_plan.rs @@ -17,25 +17,25 @@ use std::iter::Iterator; use std::sync::Arc; use chrono::Utc; -use common_arrow::arrow::datatypes::DataType as ArrowType; -use common_arrow::arrow::datatypes::Field as ArrowField; -use common_base::base::tokio; -use common_catalog::plan::Projection; -use common_catalog::plan::PushDownInfo; -use common_exception::Result; -use common_expression::ColumnId; -use common_expression::FieldIndex; -use common_expression::Scalar; -use common_storage::ColumnNode; -use common_storage::ColumnNodes; -use common_storages_fuse::FusePartInfo; +use databend_common_arrow::arrow::datatypes::DataType as ArrowType; +use databend_common_arrow::arrow::datatypes::Field as ArrowField; +use databend_common_base::base::tokio; +use databend_common_catalog::plan::Projection; +use databend_common_catalog::plan::PushDownInfo; +use databend_common_exception::Result; +use databend_common_expression::ColumnId; +use databend_common_expression::FieldIndex; +use databend_common_expression::Scalar; +use databend_common_storage::ColumnNode; +use databend_common_storage::ColumnNodes; +use databend_common_storages_fuse::FusePartInfo; use databend_query::storages::fuse::FuseTable; use databend_query::test_kits::*; +use databend_storages_common_table_meta::meta; +use databend_storages_common_table_meta::meta::BlockMeta; +use databend_storages_common_table_meta::meta::ColumnMeta; +use databend_storages_common_table_meta::meta::ColumnStatistics; use futures::TryStreamExt; -use storages_common_table_meta::meta; -use storages_common_table_meta::meta::BlockMeta; -use storages_common_table_meta::meta::ColumnMeta; -use storages_common_table_meta::meta::ColumnStatistics; #[test] fn test_to_partitions() -> Result<()> { diff --git a/src/query/service/tests/it/storages/fuse/operations/replace_into.rs b/src/query/service/tests/it/storages/fuse/operations/replace_into.rs index d708070db1a9..554d0242d09f 100644 --- a/src/query/service/tests/it/storages/fuse/operations/replace_into.rs +++ b/src/query/service/tests/it/storages/fuse/operations/replace_into.rs @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_exception::Result; -use common_storages_fuse::FuseTable; +use databend_common_exception::Result; +use databend_common_storages_fuse::FuseTable; use itertools::Itertools; #[test] diff --git a/src/query/service/tests/it/storages/fuse/operations/table_analyze.rs b/src/query/service/tests/it/storages/fuse/operations/table_analyze.rs index 9e97f313e84c..cc53f55d7eec 100644 --- a/src/query/service/tests/it/storages/fuse/operations/table_analyze.rs +++ b/src/query/service/tests/it/storages/fuse/operations/table_analyze.rs @@ -15,22 +15,22 @@ use std::collections::HashMap; use std::sync::Arc; -use common_base::base::tokio; -use common_catalog::table::Table; -use common_exception::Result; -use common_expression::types::number::NumberScalar; -use common_expression::Scalar; -use common_storages_fuse::io::MetaReaders; -use common_storages_fuse::statistics::reducers::merge_statistics_mut; -use common_storages_fuse::FuseTable; +use databend_common_base::base::tokio; +use databend_common_catalog::table::Table; +use databend_common_exception::Result; +use databend_common_expression::types::number::NumberScalar; +use databend_common_expression::Scalar; +use databend_common_storages_fuse::io::MetaReaders; +use databend_common_storages_fuse::statistics::reducers::merge_statistics_mut; +use databend_common_storages_fuse::FuseTable; use databend_query::sessions::QueryContext; use databend_query::sessions::TableContext; use databend_query::sql::plans::Plan; use databend_query::sql::Planner; use databend_query::test_kits::*; -use storages_common_cache::LoadParams; -use storages_common_table_meta::meta::SegmentInfo; -use storages_common_table_meta::meta::Statistics; +use databend_storages_common_cache::LoadParams; +use databend_storages_common_table_meta::meta::SegmentInfo; +use databend_storages_common_table_meta::meta::Statistics; #[tokio::test(flavor = "multi_thread")] async fn test_table_modify_column_ndv_statistics() -> Result<()> { diff --git a/src/query/service/tests/it/storages/fuse/operations/truncate.rs b/src/query/service/tests/it/storages/fuse/operations/truncate.rs index 5cc81ce1436f..1c8edddb8260 100644 --- a/src/query/service/tests/it/storages/fuse/operations/truncate.rs +++ b/src/query/service/tests/it/storages/fuse/operations/truncate.rs @@ -14,16 +14,16 @@ use std::sync::Arc; -use common_base::base::tokio; -use common_catalog::table::Table; -use common_exception::ErrorCode; -use common_expression::DataBlock; -use common_sql::executor::table_read_plan::ToReadDataSourcePlan; +use databend_common_base::base::tokio; +use databend_common_catalog::table::Table; +use databend_common_exception::ErrorCode; +use databend_common_expression::DataBlock; +use databend_common_sql::executor::table_read_plan::ToReadDataSourcePlan; use databend_query::test_kits::*; use futures_util::TryStreamExt; #[tokio::test(flavor = "multi_thread")] -async fn test_fuse_table_truncate() -> common_exception::Result<()> { +async fn test_fuse_table_truncate() -> databend_common_exception::Result<()> { let fixture = TestFixture::setup().await?; let ctx = fixture.new_query_ctx().await?; @@ -84,7 +84,8 @@ async fn test_fuse_table_truncate() -> common_exception::Result<()> { } #[tokio::test(flavor = "multi_thread")] -async fn test_fuse_table_truncate_appending_concurrently() -> common_exception::Result<()> { +async fn test_fuse_table_truncate_appending_concurrently() -> databend_common_exception::Result<()> +{ // the test scenario is as follows: // ┌──────┐ // │ s0 │ diff --git a/src/query/service/tests/it/storages/fuse/pruning.rs b/src/query/service/tests/it/storages/fuse/pruning.rs index 27e321fe9317..52e2ae37c4fb 100644 --- a/src/query/service/tests/it/storages/fuse/pruning.rs +++ b/src/query/service/tests/it/storages/fuse/pruning.rs @@ -14,27 +14,27 @@ use std::sync::Arc; -use common_ast::ast::Engine; -use common_base::base::tokio; -use common_catalog::plan::PushDownInfo; -use common_exception::Result; -use common_expression::types::number::Int64Type; -use common_expression::types::number::UInt64Type; -use common_expression::types::ArgType; -use common_expression::types::NumberDataType; -use common_expression::DataBlock; -use common_expression::FromData; -use common_expression::RemoteExpr; -use common_expression::TableDataType; -use common_expression::TableField; -use common_expression::TableSchemaRef; -use common_expression::TableSchemaRefExt; -use common_sql::parse_to_filters; -use common_sql::plans::CreateTablePlan; -use common_sql::BloomIndexColumns; -use common_storages_fuse::pruning::create_segment_location_vector; -use common_storages_fuse::pruning::FusePruner; -use common_storages_fuse::FuseTable; +use databend_common_ast::ast::Engine; +use databend_common_base::base::tokio; +use databend_common_catalog::plan::PushDownInfo; +use databend_common_exception::Result; +use databend_common_expression::types::number::Int64Type; +use databend_common_expression::types::number::UInt64Type; +use databend_common_expression::types::ArgType; +use databend_common_expression::types::NumberDataType; +use databend_common_expression::DataBlock; +use databend_common_expression::FromData; +use databend_common_expression::RemoteExpr; +use databend_common_expression::TableDataType; +use databend_common_expression::TableField; +use databend_common_expression::TableSchemaRef; +use databend_common_expression::TableSchemaRefExt; +use databend_common_sql::parse_to_filters; +use databend_common_sql::plans::CreateTablePlan; +use databend_common_sql::BloomIndexColumns; +use databend_common_storages_fuse::pruning::create_segment_location_vector; +use databend_common_storages_fuse::pruning::FusePruner; +use databend_common_storages_fuse::FuseTable; use databend_query::interpreters::CreateTableInterpreter; use databend_query::interpreters::Interpreter; use databend_query::sessions::QueryContext; @@ -43,13 +43,13 @@ use databend_query::storages::fuse::io::MetaReaders; use databend_query::storages::fuse::FUSE_OPT_KEY_BLOCK_PER_SEGMENT; use databend_query::storages::fuse::FUSE_OPT_KEY_ROW_PER_BLOCK; use databend_query::test_kits::*; +use databend_storages_common_cache::LoadParams; +use databend_storages_common_table_meta::meta::BlockMeta; +use databend_storages_common_table_meta::meta::TableSnapshot; +use databend_storages_common_table_meta::meta::Versioned; +use databend_storages_common_table_meta::table::OPT_KEY_DATABASE_ID; +use databend_storages_common_table_meta::table::OPT_KEY_SNAPSHOT_LOCATION; use opendal::Operator; -use storages_common_cache::LoadParams; -use storages_common_table_meta::meta::BlockMeta; -use storages_common_table_meta::meta::TableSnapshot; -use storages_common_table_meta::meta::Versioned; -use storages_common_table_meta::table::OPT_KEY_DATABASE_ID; -use storages_common_table_meta::table::OPT_KEY_SNAPSHOT_LOCATION; async fn apply_block_pruning( table_snapshot: Arc, diff --git a/src/query/service/tests/it/storages/fuse/statistics.rs b/src/query/service/tests/it/storages/fuse/statistics.rs index a81177b320fe..ab0def6fd9f6 100644 --- a/src/query/service/tests/it/storages/fuse/statistics.rs +++ b/src/query/service/tests/it/storages/fuse/statistics.rs @@ -16,49 +16,49 @@ use std::collections::HashMap; use std::sync::Arc; use chrono::Utc; -use common_base::base::tokio; -use common_expression::type_check::check; -use common_expression::types::number::Int32Type; -use common_expression::types::number::NumberScalar; -use common_expression::types::DataType; -use common_expression::types::NumberDataType; -use common_expression::types::StringType; -use common_expression::BlockThresholds; -use common_expression::Column; -use common_expression::DataBlock; -use common_expression::DataField; -use common_expression::DataSchemaRefExt; -use common_expression::FromData; -use common_expression::FunctionContext; -use common_expression::RawExpr; -use common_expression::Scalar; -use common_expression::TableDataType; -use common_expression::TableField; -use common_expression::TableSchema; -use common_functions::aggregates::eval_aggr; -use common_functions::BUILTIN_FUNCTIONS; -use common_sql::evaluator::BlockOperator; -use common_storages_fuse::statistics::reducers::reduce_block_metas; -use common_storages_fuse::statistics::Trim; -use common_storages_fuse::statistics::STATS_REPLACEMENT_CHAR; -use common_storages_fuse::statistics::STATS_STRING_PREFIX_LEN; -use common_storages_fuse::FuseStorageFormat; +use databend_common_base::base::tokio; +use databend_common_expression::type_check::check; +use databend_common_expression::types::number::Int32Type; +use databend_common_expression::types::number::NumberScalar; +use databend_common_expression::types::DataType; +use databend_common_expression::types::NumberDataType; +use databend_common_expression::types::StringType; +use databend_common_expression::BlockThresholds; +use databend_common_expression::Column; +use databend_common_expression::DataBlock; +use databend_common_expression::DataField; +use databend_common_expression::DataSchemaRefExt; +use databend_common_expression::FromData; +use databend_common_expression::FunctionContext; +use databend_common_expression::RawExpr; +use databend_common_expression::Scalar; +use databend_common_expression::TableDataType; +use databend_common_expression::TableField; +use databend_common_expression::TableSchema; +use databend_common_functions::aggregates::eval_aggr; +use databend_common_functions::BUILTIN_FUNCTIONS; +use databend_common_sql::evaluator::BlockOperator; +use databend_common_storages_fuse::statistics::reducers::reduce_block_metas; +use databend_common_storages_fuse::statistics::Trim; +use databend_common_storages_fuse::statistics::STATS_REPLACEMENT_CHAR; +use databend_common_storages_fuse::statistics::STATS_STRING_PREFIX_LEN; +use databend_common_storages_fuse::FuseStorageFormat; use databend_query::storages::fuse::io::TableMetaLocationGenerator; use databend_query::storages::fuse::statistics::gen_columns_statistics; use databend_query::storages::fuse::statistics::reducers; use databend_query::storages::fuse::statistics::ClusterStatsGenerator; use databend_query::storages::fuse::statistics::StatisticsAccumulator; use databend_query::test_kits::*; +use databend_storages_common_table_meta::meta::BlockMeta; +use databend_storages_common_table_meta::meta::ClusterStatistics; +use databend_storages_common_table_meta::meta::ColumnStatistics; +use databend_storages_common_table_meta::meta::Compression; +use databend_storages_common_table_meta::meta::Statistics; use opendal::Operator; use rand::Rng; -use storages_common_table_meta::meta::BlockMeta; -use storages_common_table_meta::meta::ClusterStatistics; -use storages_common_table_meta::meta::ColumnStatistics; -use storages_common_table_meta::meta::Compression; -use storages_common_table_meta::meta::Statistics; #[test] -fn test_ft_stats_block_stats() -> common_exception::Result<()> { +fn test_ft_stats_block_stats() -> databend_common_exception::Result<()> { let schema = Arc::new(TableSchema::new(vec![ TableField::new("a", TableDataType::Number(NumberDataType::Int32)), TableField::new("b", TableDataType::String), @@ -82,7 +82,7 @@ fn test_ft_stats_block_stats() -> common_exception::Result<()> { } #[test] -fn test_ft_stats_block_stats_with_column_distinct_count() -> common_exception::Result<()> { +fn test_ft_stats_block_stats_with_column_distinct_count() -> databend_common_exception::Result<()> { let schema = Arc::new(TableSchema::new(vec![ TableField::new("a", TableDataType::Number(NumberDataType::Int32)), TableField::new("b", TableDataType::String), @@ -109,7 +109,7 @@ fn test_ft_stats_block_stats_with_column_distinct_count() -> common_exception::R } #[test] -fn test_ft_tuple_stats_block_stats() -> common_exception::Result<()> { +fn test_ft_tuple_stats_block_stats() -> databend_common_exception::Result<()> { let schema = Arc::new(TableSchema::new(vec![TableField::new( "a", TableDataType::Tuple { @@ -142,7 +142,7 @@ fn test_ft_tuple_stats_block_stats() -> common_exception::Result<()> { } #[test] -fn test_ft_stats_col_stats_reduce() -> common_exception::Result<()> { +fn test_ft_stats_col_stats_reduce() -> databend_common_exception::Result<()> { let num_of_blocks = 10; let rows_per_block = 3; let val_start_with = 1; @@ -152,7 +152,7 @@ fn test_ft_stats_col_stats_reduce() -> common_exception::Result<()> { let col_stats = blocks .iter() .map(|b| gen_columns_statistics(&b.clone().unwrap(), None, &schema)) - .collect::>>()?; + .collect::>>()?; let r = reducers::reduce_block_statistics(&col_stats); assert_eq!(3, r.len()); let col0_stats = r.get(&0).unwrap(); @@ -188,7 +188,7 @@ fn test_ft_stats_col_stats_reduce() -> common_exception::Result<()> { } #[test] -fn test_reduce_block_statistics_in_memory_size() -> common_exception::Result<()> { +fn test_reduce_block_statistics_in_memory_size() -> databend_common_exception::Result<()> { let iter = |mut idx| { std::iter::from_fn(move || { idx += 1; @@ -219,7 +219,7 @@ fn test_reduce_block_statistics_in_memory_size() -> common_exception::Result<()> } #[test] -fn test_reduce_cluster_statistics() -> common_exception::Result<()> { +fn test_reduce_cluster_statistics() -> databend_common_exception::Result<()> { let default_cluster_key_id = Some(0); let cluster_stats_0 = Some(ClusterStatistics::new( 0, @@ -312,7 +312,7 @@ fn test_reduce_cluster_statistics() -> common_exception::Result<()> { } #[tokio::test(flavor = "multi_thread")] -async fn test_accumulator() -> common_exception::Result<()> { +async fn test_accumulator() -> databend_common_exception::Result<()> { let (schema, blocks) = TestFixture::gen_sample_blocks(10, 1); let mut stats_acc = StatisticsAccumulator::default(); @@ -334,7 +334,7 @@ async fn test_accumulator() -> common_exception::Result<()> { } #[tokio::test(flavor = "multi_thread")] -async fn test_ft_cluster_stats_with_stats() -> common_exception::Result<()> { +async fn test_ft_cluster_stats_with_stats() -> databend_common_exception::Result<()> { let schema = DataSchemaRefExt::create(vec![DataField::new( "a", DataType::Number(NumberDataType::Int32), @@ -429,8 +429,8 @@ async fn test_ft_cluster_stats_with_stats() -> common_exception::Result<()> { } #[test] -fn test_ft_stats_block_stats_string_columns_trimming() -> common_exception::Result<()> { - let suite = || -> common_exception::Result<()> { +fn test_ft_stats_block_stats_string_columns_trimming() -> databend_common_exception::Result<()> { + let suite = || -> databend_common_exception::Result<()> { // prepare random strings // 100 string, length ranges from 0 to 100 (chars) let mut rand_strings: Vec = vec![]; @@ -482,7 +482,8 @@ fn test_ft_stats_block_stats_string_columns_trimming() -> common_exception::Resu } #[test] -fn test_ft_stats_block_stats_string_columns_trimming_using_eval() -> common_exception::Result<()> { +fn test_ft_stats_block_stats_string_columns_trimming_using_eval() +-> databend_common_exception::Result<()> { // verifies (randomly) the following assumptions: // // https://github.com/datafuselabs/databend/issues/7829 @@ -491,7 +492,7 @@ fn test_ft_stats_block_stats_string_columns_trimming_using_eval() -> common_exce // > the trimmed max should be larger than the non-trimmed one, and the trimmed min // > should be lesser than the non-trimmed one. - let suite = || -> common_exception::Result<()> { + let suite = || -> databend_common_exception::Result<()> { // prepare random strings // 100 string, length ranges from 0 to 100 (chars) let mut rand_strings: Vec = vec![]; @@ -592,7 +593,7 @@ fn char_len(value: &[u8]) -> usize { } #[test] -fn test_reduce_block_meta() -> common_exception::Result<()> { +fn test_reduce_block_meta() -> databend_common_exception::Result<()> { // case 1: empty input should return the default statistics let block_metas: Vec = vec![]; let reduced = reduce_block_metas(&block_metas, BlockThresholds::default(), None); diff --git a/src/query/service/tests/it/storages/fuse/table.rs b/src/query/service/tests/it/storages/fuse/table.rs index 53c17eca04e5..2144ec6e9c3b 100644 --- a/src/query/service/tests/it/storages/fuse/table.rs +++ b/src/query/service/tests/it/storages/fuse/table.rs @@ -14,15 +14,15 @@ use std::default::Default; -use common_base::base::tokio; -use common_exception::Result; -use common_meta_app::schema::TableInfo; -use common_sql::executor::table_read_plan::ToReadDataSourcePlan; +use databend_common_base::base::tokio; +use databend_common_exception::Result; +use databend_common_meta_app::schema::TableInfo; +use databend_common_sql::executor::table_read_plan::ToReadDataSourcePlan; use databend_query::storages::fuse::FuseTable; use databend_query::stream::ReadDataBlockStream; use databend_query::test_kits::*; +use databend_storages_common_table_meta::table::OPT_KEY_DATABASE_ID; use futures::TryStreamExt; -use storages_common_table_meta::table::OPT_KEY_DATABASE_ID; #[tokio::test(flavor = "multi_thread")] async fn test_fuse_table_normal_case() -> Result<()> { @@ -77,7 +77,10 @@ async fn test_fuse_table_normal_case() -> Result<()> { "| 4 | (4, 6) |", "+----------+----------+", ]; - common_expression::block_debug::assert_blocks_sorted_eq(expected, blocks.as_slice()); + databend_common_expression::block_debug::assert_blocks_sorted_eq( + expected, + blocks.as_slice(), + ); } // test commit with overwrite @@ -121,7 +124,10 @@ async fn test_fuse_table_normal_case() -> Result<()> { "| 6 | (6, 9) |", "+----------+----------+", ]; - common_expression::block_debug::assert_blocks_sorted_eq(expected, blocks.as_slice()); + databend_common_expression::block_debug::assert_blocks_sorted_eq( + expected, + blocks.as_slice(), + ); } Ok(()) diff --git a/src/query/service/tests/it/storages/fuse/table_functions/clustering_information_table.rs b/src/query/service/tests/it/storages/fuse/table_functions/clustering_information_table.rs index 34b678b3c34f..bd14c1c56e14 100644 --- a/src/query/service/tests/it/storages/fuse/table_functions/clustering_information_table.rs +++ b/src/query/service/tests/it/storages/fuse/table_functions/clustering_information_table.rs @@ -14,17 +14,17 @@ use std::sync::Arc; -use common_base::base::tokio; -use common_catalog::plan::PushDownInfo; -use common_catalog::table_args::TableArgs; -use common_catalog::table_context::TableContext; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::DataBlock; -use common_expression::Scalar; -use common_expression::SendableDataBlockStream; -use common_sql::executor::table_read_plan::ToReadDataSourcePlan; -use common_storages_fuse::table_functions::ClusteringInformationTable; +use databend_common_base::base::tokio; +use databend_common_catalog::plan::PushDownInfo; +use databend_common_catalog::table_args::TableArgs; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::DataBlock; +use databend_common_expression::Scalar; +use databend_common_expression::SendableDataBlockStream; +use databend_common_sql::executor::table_read_plan::ToReadDataSourcePlan; +use databend_common_storages_fuse::table_functions::ClusteringInformationTable; use databend_query::sessions::QueryContext; use databend_query::stream::ReadDataBlockStream; use databend_query::test_kits::*; diff --git a/src/query/service/tests/it/storages/fuse/table_functions/fuse_block_table.rs b/src/query/service/tests/it/storages/fuse/table_functions/fuse_block_table.rs index 7fdc7bfcaabd..9c278275be25 100644 --- a/src/query/service/tests/it/storages/fuse/table_functions/fuse_block_table.rs +++ b/src/query/service/tests/it/storages/fuse/table_functions/fuse_block_table.rs @@ -12,10 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_base::base::tokio; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::DataBlock; +use databend_common_base::base::tokio; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::DataBlock; use databend_query::test_kits::*; use tokio_stream::StreamExt; diff --git a/src/query/service/tests/it/storages/fuse/utils.rs b/src/query/service/tests/it/storages/fuse/utils.rs index 85c0988743f0..402bba647f61 100644 --- a/src/query/service/tests/it/storages/fuse/utils.rs +++ b/src/query/service/tests/it/storages/fuse/utils.rs @@ -15,9 +15,9 @@ use std::str; use std::sync::Arc; -use common_exception::Result; -use common_storages_fuse::FuseTable; -use common_storages_fuse::TableContext; +use databend_common_exception::Result; +use databend_common_storages_fuse::FuseTable; +use databend_common_storages_fuse::TableContext; use databend_query::test_kits::*; pub async fn do_insertions(fixture: &TestFixture) -> Result<()> { diff --git a/src/query/service/tests/it/storages/null.rs b/src/query/service/tests/it/storages/null.rs index c0ea8de63e5f..f839a5298b7b 100644 --- a/src/query/service/tests/it/storages/null.rs +++ b/src/query/service/tests/it/storages/null.rs @@ -12,17 +12,17 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_base::base::tokio; -use common_exception::Result; -use common_expression::types::NumberDataType; -use common_expression::TableDataType; -use common_expression::TableField; -use common_expression::TableSchemaRefExt; -use common_meta_app::schema::TableInfo; -use common_meta_app::schema::TableMeta; -use common_sql::executor::table_read_plan::ToReadDataSourcePlan; -use common_sql::plans::TableOptions; -use common_storages_null::NullTable; +use databend_common_base::base::tokio; +use databend_common_exception::Result; +use databend_common_expression::types::NumberDataType; +use databend_common_expression::TableDataType; +use databend_common_expression::TableField; +use databend_common_expression::TableSchemaRefExt; +use databend_common_meta_app::schema::TableInfo; +use databend_common_meta_app::schema::TableMeta; +use databend_common_sql::executor::table_read_plan::ToReadDataSourcePlan; +use databend_common_sql::plans::TableOptions; +use databend_common_storages_null::NullTable; use databend_query::stream::ReadDataBlockStream; use databend_query::test_kits::TestFixture; use futures::TryStreamExt; diff --git a/src/query/service/tests/it/storages/statistics/column_statistics.rs b/src/query/service/tests/it/storages/statistics/column_statistics.rs index a1fa0cf3b1f4..2fd67b01b1a7 100644 --- a/src/query/service/tests/it/storages/statistics/column_statistics.rs +++ b/src/query/service/tests/it/storages/statistics/column_statistics.rs @@ -14,18 +14,18 @@ use std::sync::Arc; -use common_exception::Result; -use common_expression::types::number::Float64Type; -use common_expression::types::number::Int64Type; -use common_expression::types::NumberDataType; -use common_expression::Column; -use common_expression::DataBlock; -use common_expression::FromData; -use common_expression::Scalar; -use common_expression::TableDataType; -use common_expression::TableField; -use common_expression::TableSchema; -use common_expression::TableSchemaRef; +use databend_common_exception::Result; +use databend_common_expression::types::number::Float64Type; +use databend_common_expression::types::number::Int64Type; +use databend_common_expression::types::NumberDataType; +use databend_common_expression::Column; +use databend_common_expression::DataBlock; +use databend_common_expression::FromData; +use databend_common_expression::Scalar; +use databend_common_expression::TableDataType; +use databend_common_expression::TableField; +use databend_common_expression::TableSchema; +use databend_common_expression::TableSchemaRef; use databend_query::storages::fuse::statistics::gen_columns_statistics; fn gen_sample_block() -> (DataBlock, Vec, TableSchemaRef) { diff --git a/src/query/service/tests/it/storages/system.rs b/src/query/service/tests/it/storages/system.rs index 18d7317a374e..3bd176d0d7e7 100644 --- a/src/query/service/tests/it/storages/system.rs +++ b/src/query/service/tests/it/storages/system.rs @@ -15,39 +15,39 @@ use std::io::Write; use std::sync::Arc; -use common_base::base::tokio; -use common_catalog::table::Table; -use common_exception::Result; -use common_expression::block_debug::box_render; -use common_expression::block_debug::pretty_format_blocks; -use common_meta_app::principal::AuthInfo; -use common_meta_app::principal::AuthType; -use common_meta_app::principal::RoleInfo; -use common_meta_app::principal::UserGrantSet; -use common_meta_app::principal::UserInfo; -use common_meta_app::principal::UserOption; -use common_meta_app::principal::UserQuota; -use common_meta_app::storage::StorageFsConfig; -use common_meta_app::storage::StorageParams; -use common_meta_app::storage::StorageS3Config; -use common_sql::executor::table_read_plan::ToReadDataSourcePlan; -use common_storages_system::BuildOptionsTable; -use common_storages_system::CachesTable; -use common_storages_system::CatalogsTable; -use common_storages_system::ClustersTable; -use common_storages_system::ColumnsTable; -use common_storages_system::ConfigsTable; -use common_storages_system::ContributorsTable; -use common_storages_system::CreditsTable; -use common_storages_system::DatabasesTable; -use common_storages_system::EnginesTable; -use common_storages_system::FunctionsTable; -use common_storages_system::MetricsTable; -use common_storages_system::RolesTable; -use common_storages_system::SettingsTable; -use common_storages_system::TracingTable; -use common_storages_system::UsersTable; -use common_users::UserApiProvider; +use databend_common_base::base::tokio; +use databend_common_catalog::table::Table; +use databend_common_exception::Result; +use databend_common_expression::block_debug::box_render; +use databend_common_expression::block_debug::pretty_format_blocks; +use databend_common_meta_app::principal::AuthInfo; +use databend_common_meta_app::principal::AuthType; +use databend_common_meta_app::principal::RoleInfo; +use databend_common_meta_app::principal::UserGrantSet; +use databend_common_meta_app::principal::UserInfo; +use databend_common_meta_app::principal::UserOption; +use databend_common_meta_app::principal::UserQuota; +use databend_common_meta_app::storage::StorageFsConfig; +use databend_common_meta_app::storage::StorageParams; +use databend_common_meta_app::storage::StorageS3Config; +use databend_common_sql::executor::table_read_plan::ToReadDataSourcePlan; +use databend_common_storages_system::BuildOptionsTable; +use databend_common_storages_system::CachesTable; +use databend_common_storages_system::CatalogsTable; +use databend_common_storages_system::ClustersTable; +use databend_common_storages_system::ColumnsTable; +use databend_common_storages_system::ConfigsTable; +use databend_common_storages_system::ContributorsTable; +use databend_common_storages_system::CreditsTable; +use databend_common_storages_system::DatabasesTable; +use databend_common_storages_system::EnginesTable; +use databend_common_storages_system::FunctionsTable; +use databend_common_storages_system::MetricsTable; +use databend_common_storages_system::RolesTable; +use databend_common_storages_system::SettingsTable; +use databend_common_storages_system::TracingTable; +use databend_common_storages_system::UsersTable; +use databend_common_users::UserApiProvider; use databend_query::sessions::QueryContext; use databend_query::sessions::TableContext; use databend_query::stream::ReadDataBlockStream; @@ -298,9 +298,9 @@ async fn test_metrics_table() -> Result<()> { let table = MetricsTable::create(1); let source_plan = table.read_plan(ctx.clone(), None, true).await?; - let counter1 = common_metrics::register_counter("test_metrics_table_count"); + let counter1 = databend_common_metrics::register_counter("test_metrics_table_count"); let histogram1 = - common_metrics::register_histogram_in_milliseconds("test_metrics_table_histogram"); + databend_common_metrics::register_histogram_in_milliseconds("test_metrics_table_histogram"); counter1.inc(); histogram1.observe(2.0); diff --git a/src/query/service/tests/it/table_functions/ai_to_sql.rs b/src/query/service/tests/it/table_functions/ai_to_sql.rs index b201734ede74..fbefaba8fa69 100644 --- a/src/query/service/tests/it/table_functions/ai_to_sql.rs +++ b/src/query/service/tests/it/table_functions/ai_to_sql.rs @@ -12,9 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_catalog::table_args::TableArgs; -use common_exception::Result; -use common_expression::Scalar; +use databend_common_catalog::table_args::TableArgs; +use databend_common_exception::Result; +use databend_common_expression::Scalar; use databend_query::table_functions::GPT2SQLTable; #[test] diff --git a/src/query/service/tests/it/table_functions/numbers_table.rs b/src/query/service/tests/it/table_functions/numbers_table.rs index b1f848a87b3d..bf28b2eeb033 100644 --- a/src/query/service/tests/it/table_functions/numbers_table.rs +++ b/src/query/service/tests/it/table_functions/numbers_table.rs @@ -12,12 +12,12 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_base::base::tokio; -use common_catalog::plan::PushDownInfo; -use common_catalog::table_args::TableArgs; -use common_exception::Result; -use common_expression::Scalar; -use common_sql::executor::table_read_plan::ToReadDataSourcePlan; +use databend_common_base::base::tokio; +use databend_common_catalog::plan::PushDownInfo; +use databend_common_catalog::table_args::TableArgs; +use databend_common_exception::Result; +use databend_common_expression::Scalar; +use databend_common_sql::executor::table_read_plan::ToReadDataSourcePlan; use databend_query::sessions::TableContext; use databend_query::stream::ReadDataBlockStream; use databend_query::table_functions::generate_numbers_parts; @@ -64,7 +64,7 @@ async fn test_number_table() -> Result<()> { "| 7 |", "+----------+", ]; - common_expression::block_debug::assert_blocks_sorted_eq(expected, result.as_slice()); + databend_common_expression::block_debug::assert_blocks_sorted_eq(expected, result.as_slice()); Ok(()) } diff --git a/src/query/service/tests/it/tests/catalog.rs b/src/query/service/tests/it/tests/catalog.rs index 83d1918ebdc2..06dcdbe85eb6 100644 --- a/src/query/service/tests/it/tests/catalog.rs +++ b/src/query/service/tests/it/tests/catalog.rs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_exception::Result; +use databend_common_exception::Result; use databend_query::catalogs::DatabaseCatalog; pub async fn create_catalog() -> Result { diff --git a/src/query/settings/Cargo.toml b/src/query/settings/Cargo.toml index 8298c736024a..c5a2dee11a47 100644 --- a/src/query/settings/Cargo.toml +++ b/src/query/settings/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "common-settings" +name = "databend-common-settings" version = "0.1.0" edition = "2021" @@ -9,12 +9,12 @@ doctest = false test = false [dependencies] -common-ast = { path = "../ast" } -common-config = { path = "../config" } -common-exception = { path = "../../common/exception" } -common-meta-app = { path = "../../meta/app" } -common-meta-types = { path = "../../meta/types" } -common-users = { path = "../users" } +databend-common-ast = { path = "../ast" } +databend-common-config = { path = "../config" } +databend-common-exception = { path = "../../common/exception" } +databend-common-meta-app = { path = "../../meta/app" } +databend-common-meta-types = { path = "../../meta/types" } +databend-common-users = { path = "../users" } serde = { workspace = true } async-backtrace = { workspace = true } diff --git a/src/query/settings/src/settings.rs b/src/query/settings/src/settings.rs index 41a13ec6a7e8..0fb1c5a4b5ec 100644 --- a/src/query/settings/src/settings.rs +++ b/src/query/settings/src/settings.rs @@ -17,10 +17,10 @@ use std::fmt::Debug; use std::fmt::Formatter; use std::sync::Arc; -use common_exception::ErrorCode; -use common_exception::Result; -use common_meta_app::principal::UserSettingValue; use dashmap::DashMap; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_meta_app::principal::UserSettingValue; use itertools::Itertools; use crate::settings_default::DefaultSettingValue; diff --git a/src/query/settings/src/settings_default.rs b/src/query/settings/src/settings_default.rs index 2a0d50dd74af..8dd2acccae98 100644 --- a/src/query/settings/src/settings_default.rs +++ b/src/query/settings/src/settings_default.rs @@ -17,10 +17,10 @@ use std::fmt::Display; use std::ops::RangeInclusive; use std::sync::Arc; -use common_config::GlobalConfig; -use common_exception::ErrorCode; -use common_exception::Result; -use common_meta_app::principal::UserSettingValue; +use databend_common_config::GlobalConfig; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_meta_app::principal::UserSettingValue; use once_cell::sync::OnceCell; static DEFAULT_SETTINGS: OnceCell> = OnceCell::new(); diff --git a/src/query/settings/src/settings_getter_setter.rs b/src/query/settings/src/settings_getter_setter.rs index fb793525c2fd..693e761ca0b1 100644 --- a/src/query/settings/src/settings_getter_setter.rs +++ b/src/query/settings/src/settings_getter_setter.rs @@ -12,10 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_ast::Dialect; -use common_exception::ErrorCode; -use common_exception::Result; -use common_meta_app::principal::UserSettingValue; +use databend_common_ast::Dialect; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_meta_app::principal::UserSettingValue; use crate::settings::Settings; use crate::settings_default::DefaultSettings; diff --git a/src/query/settings/src/settings_global.rs b/src/query/settings/src/settings_global.rs index 2cec85c2a82a..dc0ba4e45e32 100644 --- a/src/query/settings/src/settings_global.rs +++ b/src/query/settings/src/settings_global.rs @@ -14,12 +14,12 @@ use std::sync::Arc; -use common_exception::ErrorCode; -use common_exception::Result; -use common_meta_app::principal::UserSetting; -use common_meta_app::principal::UserSettingValue; -use common_meta_types::MatchSeq; -use common_users::UserApiProvider; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_meta_app::principal::UserSetting; +use databend_common_meta_app::principal::UserSettingValue; +use databend_common_meta_types::MatchSeq; +use databend_common_users::UserApiProvider; use log::warn; use crate::settings::ChangeValue; diff --git a/src/query/settings/tests/it/setting.rs b/src/query/settings/tests/it/setting.rs index c4235603edf4..f863028ceeec 100644 --- a/src/query/settings/tests/it/setting.rs +++ b/src/query/settings/tests/it/setting.rs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_settings::Settings; +use databend_common_settings::Settings; #[test] fn test_set_settings() { diff --git a/src/query/sharing/Cargo.toml b/src/query/sharing/Cargo.toml index 2375522dc630..88ba9a48ff29 100644 --- a/src/query/sharing/Cargo.toml +++ b/src/query/sharing/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "common-sharing" +name = "databend-common-sharing" version = { workspace = true } authors = { workspace = true } license = { workspace = true } @@ -13,14 +13,14 @@ doctest = false anyhow = { workspace = true } async-trait = { workspace = true } bytes = { workspace = true } -common-auth = { path = "../../common/auth" } -common-base = { path = "../../common/base" } -common-config = { path = "../config" } -common-exception = { path = "../../common/exception" } -common-meta-api = { path = "../../meta/api" } -common-meta-app = { path = "../../meta/app" } -common-storage = { path = "../../common/storage" } -common-users = { path = "../users" } +databend-common-auth = { path = "../../common/auth" } +databend-common-base = { path = "../../common/base" } +databend-common-config = { path = "../config" } +databend-common-exception = { path = "../../common/exception" } +databend-common-meta-api = { path = "../../meta/api" } +databend-common-meta-app = { path = "../../meta/app" } +databend-common-storage = { path = "../../common/storage" } +databend-common-users = { path = "../users" } async-backtrace = { workspace = true } http = "0.2" diff --git a/src/query/sharing/src/layer.rs b/src/query/sharing/src/layer.rs index b3ad711542f3..ab8c2985b476 100644 --- a/src/query/sharing/src/layer.rs +++ b/src/query/sharing/src/layer.rs @@ -16,8 +16,8 @@ use std::collections::HashMap; use std::fmt::Debug; use async_trait::async_trait; -use common_auth::RefreshableToken; -use common_exception::ErrorCode; +use databend_common_auth::RefreshableToken; +use databend_common_exception::ErrorCode; use http::Request; use http::Response; use http::StatusCode; @@ -58,7 +58,7 @@ pub fn create_share_table_operator( share_tenant_id: &str, share_name: &str, table_name: &str, -) -> common_exception::Result { +) -> databend_common_exception::Result { let op = match share_endpoint_address { Some(share_endpoint_address) => { let signer = SharedSigner::new( diff --git a/src/query/sharing/src/share_endpoint.rs b/src/query/sharing/src/share_endpoint.rs index 926ed05effe3..643828d268d9 100644 --- a/src/query/sharing/src/share_endpoint.rs +++ b/src/query/sharing/src/share_endpoint.rs @@ -15,19 +15,19 @@ use std::sync::Arc; use bytes::Bytes; -use common_auth::RefreshableToken; -use common_base::base::GlobalInstance; -use common_config::GlobalConfig; -use common_exception::ErrorCode; -use common_exception::Result; -use common_meta_api::ShareApi; -use common_meta_app::schema::DatabaseInfo; -use common_meta_app::share::GetShareEndpointReq; -use common_meta_app::share::ShareNameIdent; -use common_meta_app::share::ShareSpec; -use common_meta_app::share::TableInfoMap; -use common_storage::ShareTableConfig; -use common_users::UserApiProvider; +use databend_common_auth::RefreshableToken; +use databend_common_base::base::GlobalInstance; +use databend_common_config::GlobalConfig; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_meta_api::ShareApi; +use databend_common_meta_app::schema::DatabaseInfo; +use databend_common_meta_app::share::GetShareEndpointReq; +use databend_common_meta_app::share::ShareNameIdent; +use databend_common_meta_app::share::ShareSpec; +use databend_common_meta_app::share::TableInfoMap; +use databend_common_storage::ShareTableConfig; +use databend_common_users::UserApiProvider; use http::header::AUTHORIZATION; use http::header::CONTENT_LENGTH; use http::Method; diff --git a/src/query/sharing/src/signer.rs b/src/query/sharing/src/signer.rs index 879135a9efef..1a60d6dcee79 100644 --- a/src/query/sharing/src/signer.rs +++ b/src/query/sharing/src/signer.rs @@ -21,8 +21,8 @@ use std::time::Duration; use anyhow::anyhow; use anyhow::Result; use bytes::Bytes; -use common_auth::RefreshableToken; -use common_config::GlobalConfig; +use databend_common_auth::RefreshableToken; +use databend_common_config::GlobalConfig; use http::header::AUTHORIZATION; use http::header::CONTENT_LENGTH; use http::Method; diff --git a/src/query/sharing_endpoint/Cargo.toml b/src/query/sharing_endpoint/Cargo.toml index ce91e97427b3..7ec48d130943 100644 --- a/src/query/sharing_endpoint/Cargo.toml +++ b/src/query/sharing_endpoint/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "sharing-endpoint" +name = "databend-sharing-endpoint" version = { workspace = true } authors = { workspace = true } license = { workspace = true } @@ -12,12 +12,12 @@ doctest = false [dependencies] async-backtrace = { workspace = true } chrono = { workspace = true } -common-base = { path = "../../common/base" } -common-config = { path = "../../query/config" } -common-exception = { path = "../../common/exception" } -common-meta-app = { path = "../../meta/app" } -common-storage = { path = "../../common/storage" } -common-storages-share = { path = "../storages/share" } +databend-common-base = { path = "../../common/base" } +databend-common-config = { path = "../../query/config" } +databend-common-exception = { path = "../../common/exception" } +databend-common-meta-app = { path = "../../meta/app" } +databend-common-storage = { path = "../../common/storage" } +databend-common-storages-share = { path = "../storages/share" } uuid = { workspace = true } time = { version = "0.3", features = ["serde"] } diff --git a/src/query/sharing_endpoint/src/accessor.rs b/src/query/sharing_endpoint/src/accessor.rs index 4381a6db3b3f..8f2a5569e5d8 100644 --- a/src/query/sharing_endpoint/src/accessor.rs +++ b/src/query/sharing_endpoint/src/accessor.rs @@ -12,10 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_base::base::GlobalInstance; -use common_exception::Result; -use common_meta_app::storage::StorageParams; -use common_storage::init_operator; +use databend_common_base::base::GlobalInstance; +use databend_common_exception::Result; +use databend_common_meta_app::storage::StorageParams; +use databend_common_storage::init_operator; use opendal::Operator; use crate::configs::Config; diff --git a/src/query/sharing_endpoint/src/accessor/share_spec_accessor.rs b/src/query/sharing_endpoint/src/accessor/share_spec_accessor.rs index 4ea47eb5326e..2cda060cc06f 100644 --- a/src/query/sharing_endpoint/src/accessor/share_spec_accessor.rs +++ b/src/query/sharing_endpoint/src/accessor/share_spec_accessor.rs @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_exception::Result; -use common_storages_share::get_share_spec_location; +use databend_common_exception::Result; +use databend_common_storages_share::get_share_spec_location; use crate::accessor::SharingAccessor; use crate::models; diff --git a/src/query/sharing_endpoint/src/accessor/share_table_accessor.rs b/src/query/sharing_endpoint/src/accessor/share_table_accessor.rs index cdae61688fd2..0f921af67f1c 100644 --- a/src/query/sharing_endpoint/src/accessor/share_table_accessor.rs +++ b/src/query/sharing_endpoint/src/accessor/share_table_accessor.rs @@ -14,8 +14,8 @@ use std::time::Duration; -use common_exception::Result; -use common_storages_share::get_share_spec_location; +use databend_common_exception::Result; +use databend_common_storages_share::get_share_spec_location; use crate::accessor::truncate_root; use crate::accessor::SharingAccessor; diff --git a/src/query/sharing_endpoint/src/accessor/share_table_meta_accessor.rs b/src/query/sharing_endpoint/src/accessor/share_table_meta_accessor.rs index 67277ff6c5d4..af9109da54f5 100644 --- a/src/query/sharing_endpoint/src/accessor/share_table_meta_accessor.rs +++ b/src/query/sharing_endpoint/src/accessor/share_table_meta_accessor.rs @@ -14,9 +14,9 @@ use std::collections::BTreeMap; -use common_exception::Result; -use common_meta_app::share::TableInfoMap; -use common_storages_share::share_table_info_location; +use databend_common_exception::Result; +use databend_common_meta_app::share::TableInfoMap; +use databend_common_storages_share::share_table_info_location; use crate::accessor::SharingAccessor; use crate::models::TableMetaLambdaInput; diff --git a/src/query/sharing_endpoint/src/configs/inner.rs b/src/query/sharing_endpoint/src/configs/inner.rs index 93e370b15c22..09aabf53b591 100644 --- a/src/query/sharing_endpoint/src/configs/inner.rs +++ b/src/query/sharing_endpoint/src/configs/inner.rs @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_exception::Result; -use common_storage::StorageConfig; +use databend_common_exception::Result; +use databend_common_storage::StorageConfig; use super::outer_v0::Config as OuterV0Config; diff --git a/src/query/sharing_endpoint/src/configs/outer_v0.rs b/src/query/sharing_endpoint/src/configs/outer_v0.rs index 52965eca3386..398223f3d19d 100644 --- a/src/query/sharing_endpoint/src/configs/outer_v0.rs +++ b/src/query/sharing_endpoint/src/configs/outer_v0.rs @@ -13,8 +13,8 @@ // limitations under the License. use clap::Parser; -use common_config::DATABEND_COMMIT_VERSION; -use common_exception::Result; +use databend_common_config::DATABEND_COMMIT_VERSION; +use databend_common_exception::Result; use serde::Deserialize; use serde::Serialize; use serfig::collectors::from_env; @@ -32,7 +32,7 @@ pub struct Config { pub share_endpoint_address: String, // Storage backend config. #[clap(flatten)] - pub storage: common_config::StorageConfig, + pub storage: databend_common_config::StorageConfig, } impl Default for Config { diff --git a/src/query/sharing_endpoint/src/handlers.rs b/src/query/sharing_endpoint/src/handlers.rs index e2aab3f7ddc0..c31789f54d65 100644 --- a/src/query/sharing_endpoint/src/handlers.rs +++ b/src/query/sharing_endpoint/src/handlers.rs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_meta_app::share::TableInfoMap; +use databend_common_meta_app::share::TableInfoMap; use models::Credentials; use models::RequestFile; use poem::error::BadRequest; diff --git a/src/query/sharing_endpoint/src/models.rs b/src/query/sharing_endpoint/src/models.rs index ae9f64174c62..27e701d17579 100644 --- a/src/query/sharing_endpoint/src/models.rs +++ b/src/query/sharing_endpoint/src/models.rs @@ -18,10 +18,10 @@ use std::collections::HashSet; use chrono::DateTime; use chrono::Utc; -use common_exception::ErrorCode; -use common_exception::Result; -use common_meta_app::schema::TableInfo; -use common_meta_app::share::ShareGrantObjectPrivilege; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_meta_app::schema::TableInfo; +use databend_common_meta_app::share::ShareGrantObjectPrivilege; use enumflags2::BitFlags; use poem::async_trait; use poem::error::Result as PoemResult; diff --git a/src/query/sharing_endpoint/src/services.rs b/src/query/sharing_endpoint/src/services.rs index e34409c77037..8c115f1504e5 100644 --- a/src/query/sharing_endpoint/src/services.rs +++ b/src/query/sharing_endpoint/src/services.rs @@ -12,9 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_base::base::GlobalInstance; -use common_base::runtime::GlobalIORuntime; -use common_exception::Result; +use databend_common_base::base::GlobalInstance; +use databend_common_base::runtime::GlobalIORuntime; +use databend_common_exception::Result; use crate::accessor::SharingAccessor; use crate::configs::Config; diff --git a/src/query/sharing_endpoint/tests/it/accessor.rs b/src/query/sharing_endpoint/tests/it/accessor.rs index 3e357b3b685d..30d7bb07515a 100644 --- a/src/query/sharing_endpoint/tests/it/accessor.rs +++ b/src/query/sharing_endpoint/tests/it/accessor.rs @@ -12,9 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_base::base::tokio; -use common_exception::Result; -use sharing_endpoint::accessor::truncate_root; +use databend_common_base::base::tokio; +use databend_common_exception::Result; +use databend_sharing_endpoint::accessor::truncate_root; #[tokio::test(flavor = "multi_thread")] async fn test_truncate_root() -> Result<()> { diff --git a/src/query/sharing_endpoint/tests/it/models.rs b/src/query/sharing_endpoint/tests/it/models.rs index 97cc3f53c803..a044f5f5b15c 100644 --- a/src/query/sharing_endpoint/tests/it/models.rs +++ b/src/query/sharing_endpoint/tests/it/models.rs @@ -14,14 +14,14 @@ use std::collections::HashMap; -use common_base::base::tokio; -use common_exception::Result; -use common_meta_app::share::ShareGrantObjectPrivilege; -use sharing_endpoint::models::DatabaseSpec; -use sharing_endpoint::models::LambdaInput; -use sharing_endpoint::models::ShareSpec; -use sharing_endpoint::models::SharingConfig; -use sharing_endpoint::models::TableSpec; +use databend_common_base::base::tokio; +use databend_common_exception::Result; +use databend_common_meta_app::share::ShareGrantObjectPrivilege; +use databend_sharing_endpoint::models::DatabaseSpec; +use databend_sharing_endpoint::models::LambdaInput; +use databend_sharing_endpoint::models::ShareSpec; +use databend_sharing_endpoint::models::SharingConfig; +use databend_sharing_endpoint::models::TableSpec; // mock some SharingConfig // and test on SharingConfig get_tables method #[tokio::test(flavor = "multi_thread")] diff --git a/src/query/sql/Cargo.toml b/src/query/sql/Cargo.toml index de8a89a383ef..398039106d16 100644 --- a/src/query/sql/Cargo.toml +++ b/src/query/sql/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "common-sql" +name = "databend-common-sql" version = { workspace = true } authors = { workspace = true } license = { workspace = true } @@ -12,40 +12,40 @@ test = false [features] default = [] -storage-hdfs = ["common-config/storage-hdfs"] -z3-prove = ["common-constraint"] +storage-hdfs = ["databend-common-config/storage-hdfs"] +z3-prove = ["databend-common-constraint"] [dependencies] # In alphabetical order # Workspace dependencies -common-ast = { path = "../ast" } -common-base = { path = "../../common/base" } -common-catalog = { path = "../catalog" } -common-config = { path = "../config" } -common-constraint = { path = "../constraint", optional = true } -common-exception = { path = "../../common/exception" } -common-expression = { path = "../expression" } -common-functions = { path = "../functions" } -common-license = { path = "../../common/license" } -common-meta-app = { path = "../../meta/app" } -common-meta-types = { path = "../../meta/types" } -common-metrics = { path = "../../common/metrics" } +databend-common-ast = { path = "../ast" } +databend-common-base = { path = "../../common/base" } +databend-common-catalog = { path = "../catalog" } +databend-common-config = { path = "../config" } +databend-common-constraint = { path = "../constraint", optional = true } +databend-common-exception = { path = "../../common/exception" } +databend-common-expression = { path = "../expression" } +databend-common-functions = { path = "../functions" } +databend-common-license = { path = "../../common/license" } +databend-common-meta-app = { path = "../../meta/app" } +databend-common-meta-types = { path = "../../meta/types" } +databend-common-metrics = { path = "../../common/metrics" } -common-pipeline-core = { path = "../pipeline/core" } -common-pipeline-sources = { path = "../pipeline/sources" } -common-pipeline-transforms = { path = "../pipeline/transforms" } +databend-common-pipeline-core = { path = "../pipeline/core" } +databend-common-pipeline-sources = { path = "../pipeline/sources" } +databend-common-pipeline-transforms = { path = "../pipeline/transforms" } -common-profile = { path = "../profile" } -common-settings = { path = "../settings" } -common-storage = { path = "../../common/storage" } -common-storages-delta = { path = "../storages/delta" } -common-storages-iceberg = { path = "../storages/iceberg" } -common-storages-parquet = { path = "../storages/parquet" } -common-storages-result-cache = { path = "../storages/result_cache" } -common-storages-stage = { path = "../storages/stage" } -common-storages-view = { path = "../storages/view" } -common-users = { path = "../users" } -data-mask-feature = { path = "../ee_features/data_mask" } -storages-common-table-meta = { path = "../storages/common/table_meta" } +databend-common-profile = { path = "../profile" } +databend-common-settings = { path = "../settings" } +databend-common-storage = { path = "../../common/storage" } +databend-common-storages-delta = { path = "../storages/delta" } +databend-common-storages-iceberg = { path = "../storages/iceberg" } +databend-common-storages-parquet = { path = "../storages/parquet" } +databend-common-storages-result-cache = { path = "../storages/result_cache" } +databend-common-storages-stage = { path = "../storages/stage" } +databend-common-storages-view = { path = "../storages/view" } +databend-common-users = { path = "../users" } +databend-enterprise-data-mask-feature = { path = "../ee_features/data_mask" } +databend-storages-common-table-meta = { path = "../storages/common/table_meta" } # GitHub dependencies diff --git a/src/query/sql/src/evaluator/block_operator.rs b/src/query/sql/src/evaluator/block_operator.rs index 15ba9dbc5797..0f892723a837 100644 --- a/src/query/sql/src/evaluator/block_operator.rs +++ b/src/query/sql/src/evaluator/block_operator.rs @@ -14,21 +14,21 @@ use std::sync::Arc; -use common_catalog::plan::AggIndexMeta; -use common_exception::Result; -use common_expression::BlockEntry; -use common_expression::BlockMetaInfoDowncast; -use common_expression::DataBlock; -use common_expression::Evaluator; -use common_expression::Expr; -use common_expression::FieldIndex; -use common_expression::FunctionContext; -use common_functions::BUILTIN_FUNCTIONS; -use common_pipeline_core::processors::InputPort; -use common_pipeline_core::processors::OutputPort; -use common_pipeline_core::processors::Processor; -use common_pipeline_transforms::processors::Transform; -use common_pipeline_transforms::processors::Transformer; +use databend_common_catalog::plan::AggIndexMeta; +use databend_common_exception::Result; +use databend_common_expression::BlockEntry; +use databend_common_expression::BlockMetaInfoDowncast; +use databend_common_expression::DataBlock; +use databend_common_expression::Evaluator; +use databend_common_expression::Expr; +use databend_common_expression::FieldIndex; +use databend_common_expression::FunctionContext; +use databend_common_functions::BUILTIN_FUNCTIONS; +use databend_common_pipeline_core::processors::InputPort; +use databend_common_pipeline_core::processors::OutputPort; +use databend_common_pipeline_core::processors::Processor; +use databend_common_pipeline_transforms::processors::Transform; +use databend_common_pipeline_transforms::processors::Transformer; use crate::optimizer::ColumnSet; diff --git a/src/query/sql/src/evaluator/cse.rs b/src/query/sql/src/evaluator/cse.rs index 388424e3b2a1..c4bc673f19eb 100644 --- a/src/query/sql/src/evaluator/cse.rs +++ b/src/query/sql/src/evaluator/cse.rs @@ -14,7 +14,7 @@ use std::collections::HashMap; -use common_expression::Expr; +use databend_common_expression::Expr; use log::info; use super::BlockOperator; diff --git a/src/query/sql/src/executor/format.rs b/src/query/sql/src/executor/format.rs index e4c650206c42..87daaa11254b 100644 --- a/src/query/sql/src/executor/format.rs +++ b/src/query/sql/src/executor/format.rs @@ -12,12 +12,12 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_ast::ast::FormatTreeNode; -use common_catalog::plan::PartStatistics; -use common_exception::Result; -use common_expression::DataSchemaRef; -use common_functions::BUILTIN_FUNCTIONS; -use common_profile::SharedProcessorProfiles; +use databend_common_ast::ast::FormatTreeNode; +use databend_common_catalog::plan::PartStatistics; +use databend_common_exception::Result; +use databend_common_expression::DataSchemaRef; +use databend_common_functions::BUILTIN_FUNCTIONS; +use databend_common_profile::SharedProcessorProfiles; use itertools::Itertools; use crate::executor::explain::PlanStatsInfo; diff --git a/src/query/sql/src/executor/physical_plan.rs b/src/query/sql/src/executor/physical_plan.rs index 12c3e637427f..429dce5cae5e 100644 --- a/src/query/sql/src/executor/physical_plan.rs +++ b/src/query/sql/src/executor/physical_plan.rs @@ -12,9 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_catalog::plan::DataSourcePlan; -use common_exception::Result; -use common_expression::DataSchemaRef; +use databend_common_catalog::plan::DataSourcePlan; +use databend_common_exception::Result; +use databend_common_expression::DataSchemaRef; use enum_as_inner::EnumAsInner; use crate::executor::physical_plans::AggregateExpand; diff --git a/src/query/sql/src/executor/physical_plan_builder.rs b/src/query/sql/src/executor/physical_plan_builder.rs index 4d1de21bd6f9..753f8fecc074 100644 --- a/src/query/sql/src/executor/physical_plan_builder.rs +++ b/src/query/sql/src/executor/physical_plan_builder.rs @@ -15,10 +15,10 @@ use std::collections::HashMap; use std::sync::Arc; -use common_catalog::table_context::TableContext; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::FunctionContext; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::FunctionContext; use crate::executor::explain::PlanStatsInfo; use crate::executor::PhysicalPlan; diff --git a/src/query/sql/src/executor/physical_plan_display.rs b/src/query/sql/src/executor/physical_plan_display.rs index 1400eb092711..994aad71582d 100644 --- a/src/query/sql/src/executor/physical_plan_display.rs +++ b/src/query/sql/src/executor/physical_plan_display.rs @@ -15,7 +15,7 @@ use std::fmt::Display; use std::fmt::Formatter; -use common_functions::BUILTIN_FUNCTIONS; +use databend_common_functions::BUILTIN_FUNCTIONS; use itertools::Itertools; use crate::executor::physical_plan::PhysicalPlan; diff --git a/src/query/sql/src/executor/physical_plan_visitor.rs b/src/query/sql/src/executor/physical_plan_visitor.rs index 70fa5b3453f8..c79d9305b2c8 100644 --- a/src/query/sql/src/executor/physical_plan_visitor.rs +++ b/src/query/sql/src/executor/physical_plan_visitor.rs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_exception::Result; +use databend_common_exception::Result; use crate::executor::physical_plan::PhysicalPlan; use crate::executor::physical_plans::AggregateExpand; diff --git a/src/query/sql/src/executor/physical_plans/common.rs b/src/query/sql/src/executor/physical_plans/common.rs index 69ab1cc72170..5381de4a35b9 100644 --- a/src/query/sql/src/executor/physical_plans/common.rs +++ b/src/query/sql/src/executor/physical_plans/common.rs @@ -15,10 +15,10 @@ use std::fmt::Display; use std::fmt::Formatter; -use common_exception::Result; -use common_expression::types::DataType; -use common_expression::Scalar; -use common_functions::aggregates::AggregateFunctionFactory; +use databend_common_exception::Result; +use databend_common_expression::types::DataType; +use databend_common_expression::Scalar; +use databend_common_functions::aggregates::AggregateFunctionFactory; use crate::IndexType; @@ -54,8 +54,8 @@ pub struct SortDesc { #[derive(Clone, Debug, serde::Serialize, serde::Deserialize)] pub struct OnConflictField { - pub table_field: common_expression::TableField, - pub field_index: common_expression::FieldIndex, + pub table_field: databend_common_expression::TableField, + pub field_index: databend_common_expression::FieldIndex, } #[derive(serde::Serialize, serde::Deserialize, Clone, Debug, PartialEq, Eq)] diff --git a/src/query/sql/src/executor/physical_plans/physical_aggregate_expand.rs b/src/query/sql/src/executor/physical_plans/physical_aggregate_expand.rs index cdaa5b338f0a..b36b0087680f 100644 --- a/src/query/sql/src/executor/physical_plans/physical_aggregate_expand.rs +++ b/src/query/sql/src/executor/physical_plans/physical_aggregate_expand.rs @@ -12,12 +12,12 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_exception::Result; -use common_expression::types::DataType; -use common_expression::types::NumberDataType; -use common_expression::DataField; -use common_expression::DataSchemaRef; -use common_expression::DataSchemaRefExt; +use databend_common_exception::Result; +use databend_common_expression::types::DataType; +use databend_common_expression::types::NumberDataType; +use databend_common_expression::DataField; +use databend_common_expression::DataSchemaRef; +use databend_common_expression::DataSchemaRefExt; use crate::executor::explain::PlanStatsInfo; use crate::executor::PhysicalPlan; diff --git a/src/query/sql/src/executor/physical_plans/physical_aggregate_final.rs b/src/query/sql/src/executor/physical_plans/physical_aggregate_final.rs index a29f4785ac85..b946c4a1e2b8 100644 --- a/src/query/sql/src/executor/physical_plans/physical_aggregate_final.rs +++ b/src/query/sql/src/executor/physical_plans/physical_aggregate_final.rs @@ -14,13 +14,13 @@ use std::sync::Arc; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::DataBlock; -use common_expression::DataField; -use common_expression::DataSchemaRef; -use common_expression::DataSchemaRefExt; -use common_expression::RemoteExpr; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::DataBlock; +use databend_common_expression::DataField; +use databend_common_expression::DataSchemaRef; +use databend_common_expression::DataSchemaRefExt; +use databend_common_expression::RemoteExpr; use crate::executor::explain::PlanStatsInfo; use crate::executor::physical_plans::AggregateExpand; diff --git a/src/query/sql/src/executor/physical_plans/physical_aggregate_partial.rs b/src/query/sql/src/executor/physical_plans/physical_aggregate_partial.rs index 6be4ea5bbe91..f1392b1c4d64 100644 --- a/src/query/sql/src/executor/physical_plans/physical_aggregate_partial.rs +++ b/src/query/sql/src/executor/physical_plans/physical_aggregate_partial.rs @@ -12,12 +12,12 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_exception::Result; -use common_expression::types::DataType; -use common_expression::DataBlock; -use common_expression::DataField; -use common_expression::DataSchemaRef; -use common_expression::DataSchemaRefExt; +use databend_common_exception::Result; +use databend_common_expression::types::DataType; +use databend_common_expression::DataBlock; +use databend_common_expression::DataField; +use databend_common_expression::DataSchemaRef; +use databend_common_expression::DataSchemaRefExt; use crate::executor::explain::PlanStatsInfo; use crate::executor::physical_plans::common::AggregateFunctionDesc; diff --git a/src/query/sql/src/executor/physical_plans/physical_commit_sink.rs b/src/query/sql/src/executor/physical_plans/physical_commit_sink.rs index efc4d9648fb6..dd022f83b95b 100644 --- a/src/query/sql/src/executor/physical_plans/physical_commit_sink.rs +++ b/src/query/sql/src/executor/physical_plans/physical_commit_sink.rs @@ -14,10 +14,10 @@ use std::sync::Arc; -use common_meta_app::schema::CatalogInfo; -use common_meta_app::schema::TableInfo; -use common_meta_app::schema::UpdateStreamMetaReq; -use storages_common_table_meta::meta::TableSnapshot; +use databend_common_meta_app::schema::CatalogInfo; +use databend_common_meta_app::schema::TableInfo; +use databend_common_meta_app::schema::UpdateStreamMetaReq; +use databend_storages_common_table_meta::meta::TableSnapshot; use crate::executor::physical_plans::common::MutationKind; use crate::executor::PhysicalPlan; diff --git a/src/query/sql/src/executor/physical_plans/physical_compact_source.rs b/src/query/sql/src/executor/physical_plans/physical_compact_source.rs index 8c5ed8c3bf34..209ba44d02f5 100644 --- a/src/query/sql/src/executor/physical_plans/physical_compact_source.rs +++ b/src/query/sql/src/executor/physical_plans/physical_compact_source.rs @@ -14,10 +14,10 @@ use std::collections::HashSet; -use common_catalog::plan::Partitions; -use common_expression::ColumnId; -use common_meta_app::schema::CatalogInfo; -use common_meta_app::schema::TableInfo; +use databend_common_catalog::plan::Partitions; +use databend_common_expression::ColumnId; +use databend_common_meta_app::schema::CatalogInfo; +use databend_common_meta_app::schema::TableInfo; #[derive(Clone, Debug, serde::Serialize, serde::Deserialize)] pub struct CompactSource { diff --git a/src/query/sql/src/executor/physical_plans/physical_constant_table_scan.rs b/src/query/sql/src/executor/physical_plans/physical_constant_table_scan.rs index 700dc503f438..d4db682128e1 100644 --- a/src/query/sql/src/executor/physical_plans/physical_constant_table_scan.rs +++ b/src/query/sql/src/executor/physical_plans/physical_constant_table_scan.rs @@ -12,10 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_exception::Result; -use common_expression::Column; -use common_expression::DataSchemaRef; -use common_expression::DataSchemaRefExt; +use databend_common_exception::Result; +use databend_common_expression::Column; +use databend_common_expression::DataSchemaRef; +use databend_common_expression::DataSchemaRefExt; use crate::executor::PhysicalPlan; use crate::executor::PhysicalPlanBuilder; diff --git a/src/query/sql/src/executor/physical_plans/physical_copy_into.rs b/src/query/sql/src/executor/physical_plans/physical_copy_into.rs index a24e53f455d3..8688f7f9f5eb 100644 --- a/src/query/sql/src/executor/physical_plans/physical_copy_into.rs +++ b/src/query/sql/src/executor/physical_plans/physical_copy_into.rs @@ -12,14 +12,14 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_catalog::plan::DataSourcePlan; -use common_catalog::plan::StageTableInfo; -use common_exception::Result; -use common_expression::DataSchemaRef; -use common_expression::Scalar; -use common_meta_app::schema::CatalogInfo; -use common_meta_app::schema::TableInfo; -use common_storage::StageFileInfo; +use databend_common_catalog::plan::DataSourcePlan; +use databend_common_catalog::plan::StageTableInfo; +use databend_common_exception::Result; +use databend_common_expression::DataSchemaRef; +use databend_common_expression::Scalar; +use databend_common_meta_app::schema::CatalogInfo; +use databend_common_meta_app::schema::TableInfo; +use databend_common_storage::StageFileInfo; use enum_as_inner::EnumAsInner; use crate::executor::physical_plan::PhysicalPlan; diff --git a/src/query/sql/src/executor/physical_plans/physical_cte_scan.rs b/src/query/sql/src/executor/physical_plans/physical_cte_scan.rs index 668f7116b9e9..23c02128ea7c 100644 --- a/src/query/sql/src/executor/physical_plans/physical_cte_scan.rs +++ b/src/query/sql/src/executor/physical_plans/physical_cte_scan.rs @@ -12,9 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_exception::Result; -use common_expression::DataSchemaRef; -use common_expression::DataSchemaRefExt; +use databend_common_exception::Result; +use databend_common_expression::DataSchemaRef; +use databend_common_expression::DataSchemaRefExt; use crate::executor::PhysicalPlan; use crate::executor::PhysicalPlanBuilder; diff --git a/src/query/sql/src/executor/physical_plans/physical_delete_source.rs b/src/query/sql/src/executor/physical_plans/physical_delete_source.rs index f5248f481a34..6600bdf0c3af 100644 --- a/src/query/sql/src/executor/physical_plans/physical_delete_source.rs +++ b/src/query/sql/src/executor/physical_plans/physical_delete_source.rs @@ -14,11 +14,11 @@ use std::sync::Arc; -use common_catalog::plan::Filters; -use common_catalog::plan::Partitions; -use common_meta_app::schema::CatalogInfo; -use common_meta_app::schema::TableInfo; -use storages_common_table_meta::meta::TableSnapshot; +use databend_common_catalog::plan::Filters; +use databend_common_catalog::plan::Partitions; +use databend_common_meta_app::schema::CatalogInfo; +use databend_common_meta_app::schema::TableInfo; +use databend_storages_common_table_meta::meta::TableSnapshot; #[derive(Clone, Debug, serde::Serialize, serde::Deserialize)] pub struct DeleteSource { diff --git a/src/query/sql/src/executor/physical_plans/physical_distributed_insert_select.rs b/src/query/sql/src/executor/physical_plans/physical_distributed_insert_select.rs index d7156d375494..3720977b04e1 100644 --- a/src/query/sql/src/executor/physical_plans/physical_distributed_insert_select.rs +++ b/src/query/sql/src/executor/physical_plans/physical_distributed_insert_select.rs @@ -12,9 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_expression::DataSchemaRef; -use common_meta_app::schema::CatalogInfo; -use common_meta_app::schema::TableInfo; +use databend_common_expression::DataSchemaRef; +use databend_common_meta_app::schema::CatalogInfo; +use databend_common_meta_app::schema::TableInfo; use crate::executor::PhysicalPlan; use crate::ColumnBinding; diff --git a/src/query/sql/src/executor/physical_plans/physical_eval_scalar.rs b/src/query/sql/src/executor/physical_plans/physical_eval_scalar.rs index 5a6293e0b5f4..e66a426ec7c3 100644 --- a/src/query/sql/src/executor/physical_plans/physical_eval_scalar.rs +++ b/src/query/sql/src/executor/physical_plans/physical_eval_scalar.rs @@ -14,13 +14,13 @@ use std::sync::Arc; -use common_exception::Result; -use common_expression::ConstantFolder; -use common_expression::DataField; -use common_expression::DataSchemaRef; -use common_expression::DataSchemaRefExt; -use common_expression::RemoteExpr; -use common_functions::BUILTIN_FUNCTIONS; +use databend_common_exception::Result; +use databend_common_expression::ConstantFolder; +use databend_common_expression::DataField; +use databend_common_expression::DataSchemaRef; +use databend_common_expression::DataSchemaRefExt; +use databend_common_expression::RemoteExpr; +use databend_common_functions::BUILTIN_FUNCTIONS; use crate::executor::explain::PlanStatsInfo; use crate::executor::physical_plan::PhysicalPlan; diff --git a/src/query/sql/src/executor/physical_plans/physical_exchange.rs b/src/query/sql/src/executor/physical_plans/physical_exchange.rs index 083aa4de0ffd..bf5065d8ede9 100644 --- a/src/query/sql/src/executor/physical_plans/physical_exchange.rs +++ b/src/query/sql/src/executor/physical_plans/physical_exchange.rs @@ -12,11 +12,11 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_exception::Result; -use common_expression::ConstantFolder; -use common_expression::DataSchemaRef; -use common_expression::RemoteExpr; -use common_functions::BUILTIN_FUNCTIONS; +use databend_common_exception::Result; +use databend_common_expression::ConstantFolder; +use databend_common_expression::DataSchemaRef; +use databend_common_expression::RemoteExpr; +use databend_common_functions::BUILTIN_FUNCTIONS; use crate::executor::physical_plans::common::FragmentKind; use crate::executor::PhysicalPlan; diff --git a/src/query/sql/src/executor/physical_plans/physical_exchange_sink.rs b/src/query/sql/src/executor/physical_plans/physical_exchange_sink.rs index 0c4c559064ec..cb5ad775bf2b 100644 --- a/src/query/sql/src/executor/physical_plans/physical_exchange_sink.rs +++ b/src/query/sql/src/executor/physical_plans/physical_exchange_sink.rs @@ -12,9 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_exception::Result; -use common_expression::DataSchemaRef; -use common_expression::RemoteExpr; +use databend_common_exception::Result; +use databend_common_expression::DataSchemaRef; +use databend_common_expression::RemoteExpr; use crate::executor::physical_plans::common::FragmentKind; use crate::executor::PhysicalPlan; diff --git a/src/query/sql/src/executor/physical_plans/physical_exchange_source.rs b/src/query/sql/src/executor/physical_plans/physical_exchange_source.rs index 84e1766f58cf..ab864c9ff602 100644 --- a/src/query/sql/src/executor/physical_plans/physical_exchange_source.rs +++ b/src/query/sql/src/executor/physical_plans/physical_exchange_source.rs @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_exception::Result; -use common_expression::DataSchemaRef; +use databend_common_exception::Result; +use databend_common_expression::DataSchemaRef; use crate::IndexType; diff --git a/src/query/sql/src/executor/physical_plans/physical_filter.rs b/src/query/sql/src/executor/physical_plans/physical_filter.rs index cfc6f7285156..1fd5154f8265 100644 --- a/src/query/sql/src/executor/physical_plans/physical_filter.rs +++ b/src/query/sql/src/executor/physical_plans/physical_filter.rs @@ -12,12 +12,12 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_exception::Result; -use common_expression::ConstantFolder; -use common_expression::DataSchemaRef; -use common_expression::DataSchemaRefExt; -use common_expression::RemoteExpr; -use common_functions::BUILTIN_FUNCTIONS; +use databend_common_exception::Result; +use databend_common_expression::ConstantFolder; +use databend_common_expression::DataSchemaRef; +use databend_common_expression::DataSchemaRefExt; +use databend_common_expression::RemoteExpr; +use databend_common_functions::BUILTIN_FUNCTIONS; use crate::executor::cast_expr_to_non_null_boolean; use crate::executor::explain::PlanStatsInfo; diff --git a/src/query/sql/src/executor/physical_plans/physical_hash_join.rs b/src/query/sql/src/executor/physical_plans/physical_hash_join.rs index 0ae1cb84aa4a..5373a541b175 100644 --- a/src/query/sql/src/executor/physical_plans/physical_hash_join.rs +++ b/src/query/sql/src/executor/physical_plans/physical_hash_join.rs @@ -12,18 +12,18 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::type_check::check_cast; -use common_expression::type_check::common_super_type; -use common_expression::types::DataType; -use common_expression::ConstantFolder; -use common_expression::DataField; -use common_expression::DataSchemaRef; -use common_expression::DataSchemaRefExt; -use common_expression::RemoteExpr; -use common_expression::ROW_NUMBER_COL_NAME; -use common_functions::BUILTIN_FUNCTIONS; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::type_check::check_cast; +use databend_common_expression::type_check::common_super_type; +use databend_common_expression::types::DataType; +use databend_common_expression::ConstantFolder; +use databend_common_expression::DataField; +use databend_common_expression::DataSchemaRef; +use databend_common_expression::DataSchemaRefExt; +use databend_common_expression::RemoteExpr; +use databend_common_expression::ROW_NUMBER_COL_NAME; +use databend_common_functions::BUILTIN_FUNCTIONS; use crate::executor::explain::PlanStatsInfo; use crate::executor::physical_plans::Exchange; diff --git a/src/query/sql/src/executor/physical_plans/physical_join.rs b/src/query/sql/src/executor/physical_plans/physical_join.rs index 0a0258ae5087..51b52a7d329c 100644 --- a/src/query/sql/src/executor/physical_plans/physical_join.rs +++ b/src/query/sql/src/executor/physical_plans/physical_join.rs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_exception::Result; +use databend_common_exception::Result; use crate::binder::JoinPredicate; use crate::executor::explain::PlanStatsInfo; diff --git a/src/query/sql/src/executor/physical_plans/physical_limit.rs b/src/query/sql/src/executor/physical_plans/physical_limit.rs index 7d9713d8fdeb..312d672916fb 100644 --- a/src/query/sql/src/executor/physical_plans/physical_limit.rs +++ b/src/query/sql/src/executor/physical_plans/physical_limit.rs @@ -12,11 +12,11 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::DataField; -use common_expression::DataSchemaRef; -use common_expression::ROW_ID_COL_NAME; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::DataField; +use databend_common_expression::DataSchemaRef; +use databend_common_expression::ROW_ID_COL_NAME; use itertools::Itertools; use crate::executor::explain::PlanStatsInfo; diff --git a/src/query/sql/src/executor/physical_plans/physical_materialized_cte.rs b/src/query/sql/src/executor/physical_plans/physical_materialized_cte.rs index 80975467f7a1..85dce1a6bba0 100644 --- a/src/query/sql/src/executor/physical_plans/physical_materialized_cte.rs +++ b/src/query/sql/src/executor/physical_plans/physical_materialized_cte.rs @@ -12,9 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_exception::Result; -use common_expression::DataSchemaRef; -use common_expression::DataSchemaRefExt; +use databend_common_exception::Result; +use databend_common_expression::DataSchemaRef; +use databend_common_expression::DataSchemaRefExt; use crate::executor::PhysicalPlan; use crate::executor::PhysicalPlanBuilder; diff --git a/src/query/sql/src/executor/physical_plans/physical_merge_into.rs b/src/query/sql/src/executor/physical_plans/physical_merge_into.rs index d817758ada36..67cf3132aba1 100644 --- a/src/query/sql/src/executor/physical_plans/physical_merge_into.rs +++ b/src/query/sql/src/executor/physical_plans/physical_merge_into.rs @@ -14,12 +14,12 @@ use std::collections::HashMap; -use common_expression::DataSchemaRef; -use common_expression::FieldIndex; -use common_expression::RemoteExpr; -use common_meta_app::schema::CatalogInfo; -use common_meta_app::schema::TableInfo; -use storages_common_table_meta::meta::Location; +use databend_common_expression::DataSchemaRef; +use databend_common_expression::FieldIndex; +use databend_common_expression::RemoteExpr; +use databend_common_meta_app::schema::CatalogInfo; +use databend_common_meta_app::schema::TableInfo; +use databend_storages_common_table_meta::meta::Location; use crate::binder::MergeIntoType; use crate::executor::physical_plan::PhysicalPlan; diff --git a/src/query/sql/src/executor/physical_plans/physical_merge_into_add_row_number.rs b/src/query/sql/src/executor/physical_plans/physical_merge_into_add_row_number.rs index adf2f8723f3a..8c46356c3b1b 100644 --- a/src/query/sql/src/executor/physical_plans/physical_merge_into_add_row_number.rs +++ b/src/query/sql/src/executor/physical_plans/physical_merge_into_add_row_number.rs @@ -15,14 +15,14 @@ use std::collections::BTreeMap; use std::sync::Arc; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::types::DataType; -use common_expression::types::NumberDataType; -use common_expression::DataField; -use common_expression::DataSchema; -use common_expression::DataSchemaRef; -use common_expression::ROW_NUMBER_COL_NAME; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::types::DataType; +use databend_common_expression::types::NumberDataType; +use databend_common_expression::DataField; +use databend_common_expression::DataSchema; +use databend_common_expression::DataSchemaRef; +use databend_common_expression::ROW_NUMBER_COL_NAME; use crate::executor::PhysicalPlan; use crate::executor::PhysicalPlanBuilder; diff --git a/src/query/sql/src/executor/physical_plans/physical_project.rs b/src/query/sql/src/executor/physical_plans/physical_project.rs index b8db3f4f2238..4f524852e1b9 100644 --- a/src/query/sql/src/executor/physical_plans/physical_project.rs +++ b/src/query/sql/src/executor/physical_plans/physical_project.rs @@ -12,9 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_exception::Result; -use common_expression::DataSchemaRef; -use common_expression::DataSchemaRefExt; +use databend_common_exception::Result; +use databend_common_expression::DataSchemaRef; +use databend_common_expression::DataSchemaRefExt; use crate::executor::explain::PlanStatsInfo; use crate::executor::PhysicalPlan; diff --git a/src/query/sql/src/executor/physical_plans/physical_project_set.rs b/src/query/sql/src/executor/physical_plans/physical_project_set.rs index 835e5c9d4175..087cf0d29eb7 100644 --- a/src/query/sql/src/executor/physical_plans/physical_project_set.rs +++ b/src/query/sql/src/executor/physical_plans/physical_project_set.rs @@ -12,13 +12,13 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_exception::Result; -use common_expression::ConstantFolder; -use common_expression::DataField; -use common_expression::DataSchemaRef; -use common_expression::DataSchemaRefExt; -use common_expression::RemoteExpr; -use common_functions::BUILTIN_FUNCTIONS; +use databend_common_exception::Result; +use databend_common_expression::ConstantFolder; +use databend_common_expression::DataField; +use databend_common_expression::DataSchemaRef; +use databend_common_expression::DataSchemaRefExt; +use databend_common_expression::RemoteExpr; +use databend_common_functions::BUILTIN_FUNCTIONS; use crate::executor::explain::PlanStatsInfo; use crate::executor::PhysicalPlan; diff --git a/src/query/sql/src/executor/physical_plans/physical_range_join.rs b/src/query/sql/src/executor/physical_plans/physical_range_join.rs index 1fb5d6c3eb76..2e55af28b1ea 100644 --- a/src/query/sql/src/executor/physical_plans/physical_range_join.rs +++ b/src/query/sql/src/executor/physical_plans/physical_range_join.rs @@ -12,13 +12,13 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::type_check::common_super_type; -use common_expression::DataSchemaRef; -use common_expression::DataSchemaRefExt; -use common_expression::RemoteExpr; -use common_functions::BUILTIN_FUNCTIONS; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::type_check::common_super_type; +use databend_common_expression::DataSchemaRef; +use databend_common_expression::DataSchemaRefExt; +use databend_common_expression::RemoteExpr; +use databend_common_functions::BUILTIN_FUNCTIONS; use crate::binder::wrap_cast; use crate::binder::JoinPredicate; diff --git a/src/query/sql/src/executor/physical_plans/physical_recluster_sink.rs b/src/query/sql/src/executor/physical_plans/physical_recluster_sink.rs index 4d9da230bffd..3a8ab154c51e 100644 --- a/src/query/sql/src/executor/physical_plans/physical_recluster_sink.rs +++ b/src/query/sql/src/executor/physical_plans/physical_recluster_sink.rs @@ -14,11 +14,11 @@ use std::sync::Arc; -use common_meta_app::schema::CatalogInfo; -use common_meta_app::schema::TableInfo; -use storages_common_table_meta::meta::BlockMeta; -use storages_common_table_meta::meta::Statistics; -use storages_common_table_meta::meta::TableSnapshot; +use databend_common_meta_app::schema::CatalogInfo; +use databend_common_meta_app::schema::TableInfo; +use databend_storages_common_table_meta::meta::BlockMeta; +use databend_storages_common_table_meta::meta::Statistics; +use databend_storages_common_table_meta::meta::TableSnapshot; use crate::executor::PhysicalPlan; diff --git a/src/query/sql/src/executor/physical_plans/physical_recluster_source.rs b/src/query/sql/src/executor/physical_plans/physical_recluster_source.rs index 6c85a042bbdc..2f231b59be97 100644 --- a/src/query/sql/src/executor/physical_plans/physical_recluster_source.rs +++ b/src/query/sql/src/executor/physical_plans/physical_recluster_source.rs @@ -12,10 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_catalog::plan::PartStatistics; -use common_catalog::plan::Partitions; -use common_meta_app::schema::CatalogInfo; -use common_meta_app::schema::TableInfo; +use databend_common_catalog::plan::PartStatistics; +use databend_common_catalog::plan::Partitions; +use databend_common_meta_app::schema::CatalogInfo; +use databend_common_meta_app::schema::TableInfo; #[derive(Clone, Debug, serde::Serialize, serde::Deserialize)] pub struct ReclusterTask { diff --git a/src/query/sql/src/executor/physical_plans/physical_refresh_index.rs b/src/query/sql/src/executor/physical_plans/physical_refresh_index.rs index 6be0580958c4..c5fb3c9e014e 100644 --- a/src/query/sql/src/executor/physical_plans/physical_refresh_index.rs +++ b/src/query/sql/src/executor/physical_plans/physical_refresh_index.rs @@ -15,12 +15,12 @@ use std::fmt::Display; use std::fmt::Formatter; -use common_exception::Result; -use common_expression::types::DataType; -use common_expression::DataField; -use common_expression::DataSchemaRef; -use common_expression::DataSchemaRefExt; -use common_meta_app::schema::TableInfo; +use databend_common_exception::Result; +use databend_common_expression::types::DataType; +use databend_common_expression::DataField; +use databend_common_expression::DataSchemaRef; +use databend_common_expression::DataSchemaRefExt; +use databend_common_meta_app::schema::TableInfo; use crate::executor::PhysicalPlan; use crate::ColumnBinding; diff --git a/src/query/sql/src/executor/physical_plans/physical_replace_async_source.rs b/src/query/sql/src/executor/physical_plans/physical_replace_async_source.rs index cf012c0af64f..8593ea0d0b77 100644 --- a/src/query/sql/src/executor/physical_plans/physical_replace_async_source.rs +++ b/src/query/sql/src/executor/physical_plans/physical_replace_async_source.rs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_expression::DataSchemaRef; +use databend_common_expression::DataSchemaRef; #[derive(Clone, Debug, serde::Serialize, serde::Deserialize)] pub struct ReplaceAsyncSourcer { diff --git a/src/query/sql/src/executor/physical_plans/physical_replace_deduplicate.rs b/src/query/sql/src/executor/physical_plans/physical_replace_deduplicate.rs index 569b50f59ec7..4a986b45f1f5 100644 --- a/src/query/sql/src/executor/physical_plans/physical_replace_deduplicate.rs +++ b/src/query/sql/src/executor/physical_plans/physical_replace_deduplicate.rs @@ -14,14 +14,14 @@ use std::collections::HashMap; -use common_expression::ColumnId; -use common_expression::DataSchemaRef; -use common_expression::FieldIndex; -use common_expression::RemoteExpr; -use common_expression::TableSchemaRef; -use common_meta_app::schema::CatalogInfo; -use common_meta_app::schema::TableInfo; -use storages_common_table_meta::meta::ColumnStatistics; +use databend_common_expression::ColumnId; +use databend_common_expression::DataSchemaRef; +use databend_common_expression::FieldIndex; +use databend_common_expression::RemoteExpr; +use databend_common_expression::TableSchemaRef; +use databend_common_meta_app::schema::CatalogInfo; +use databend_common_meta_app::schema::TableInfo; +use databend_storages_common_table_meta::meta::ColumnStatistics; use crate::executor::physical_plans::common::OnConflictField; use crate::executor::PhysicalPlan; diff --git a/src/query/sql/src/executor/physical_plans/physical_replace_into.rs b/src/query/sql/src/executor/physical_plans/physical_replace_into.rs index 0965ce8206c4..0743cc36903c 100644 --- a/src/query/sql/src/executor/physical_plans/physical_replace_into.rs +++ b/src/query/sql/src/executor/physical_plans/physical_replace_into.rs @@ -12,12 +12,12 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_expression::BlockThresholds; -use common_expression::FieldIndex; -use common_meta_app::schema::CatalogInfo; -use common_meta_app::schema::TableInfo; -use storages_common_table_meta::meta::BlockSlotDescription; -use storages_common_table_meta::meta::Location; +use databend_common_expression::BlockThresholds; +use databend_common_expression::FieldIndex; +use databend_common_meta_app::schema::CatalogInfo; +use databend_common_meta_app::schema::TableInfo; +use databend_storages_common_table_meta::meta::BlockSlotDescription; +use databend_storages_common_table_meta::meta::Location; use crate::executor::physical_plans::common::OnConflictField; use crate::executor::PhysicalPlan; diff --git a/src/query/sql/src/executor/physical_plans/physical_row_fetch.rs b/src/query/sql/src/executor/physical_plans/physical_row_fetch.rs index c23552dd9d5a..5a3bba5cafc6 100644 --- a/src/query/sql/src/executor/physical_plans/physical_row_fetch.rs +++ b/src/query/sql/src/executor/physical_plans/physical_row_fetch.rs @@ -12,12 +12,12 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_catalog::plan::DataSourcePlan; -use common_catalog::plan::Projection; -use common_exception::Result; -use common_expression::DataField; -use common_expression::DataSchemaRef; -use common_expression::DataSchemaRefExt; +use databend_common_catalog::plan::DataSourcePlan; +use databend_common_catalog::plan::Projection; +use databend_common_exception::Result; +use databend_common_expression::DataField; +use databend_common_expression::DataSchemaRef; +use databend_common_expression::DataSchemaRefExt; use crate::executor::explain::PlanStatsInfo; use crate::executor::PhysicalPlan; diff --git a/src/query/sql/src/executor/physical_plans/physical_sort.rs b/src/query/sql/src/executor/physical_plans/physical_sort.rs index acb15d7b57a4..67c940b8af88 100644 --- a/src/query/sql/src/executor/physical_plans/physical_sort.rs +++ b/src/query/sql/src/executor/physical_plans/physical_sort.rs @@ -12,12 +12,12 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_exception::Result; -use common_expression::types::DataType; -use common_expression::DataField; -use common_expression::DataSchema; -use common_expression::DataSchemaRef; -use common_expression::DataSchemaRefExt; +use databend_common_exception::Result; +use databend_common_expression::types::DataType; +use databend_common_expression::DataField; +use databend_common_expression::DataSchema; +use databend_common_expression::DataSchemaRef; +use databend_common_expression::DataSchemaRefExt; use itertools::Itertools; use crate::executor::explain::PlanStatsInfo; diff --git a/src/query/sql/src/executor/physical_plans/physical_table_scan.rs b/src/query/sql/src/executor/physical_plans/physical_table_scan.rs index 926df5dc34c6..acbddf470462 100644 --- a/src/query/sql/src/executor/physical_plans/physical_table_scan.rs +++ b/src/query/sql/src/executor/physical_plans/physical_table_scan.rs @@ -17,29 +17,29 @@ use std::collections::BTreeMap; use std::collections::HashSet; use std::sync::Arc; -use common_catalog::catalog::CatalogManager; -use common_catalog::catalog::CATALOG_DEFAULT; -use common_catalog::plan::DataSourcePlan; -use common_catalog::plan::Filters; -use common_catalog::plan::InternalColumn; -use common_catalog::plan::PrewhereInfo; -use common_catalog::plan::Projection; -use common_catalog::plan::PushDownInfo; -use common_catalog::plan::VirtualColumnInfo; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::type_check::check_function; -use common_expression::types::DataType; -use common_expression::ConstantFolder; -use common_expression::DataField; -use common_expression::DataSchemaRef; -use common_expression::DataSchemaRefExt; -use common_expression::FieldIndex; -use common_expression::RemoteExpr; -use common_expression::TableSchema; -use common_expression::TableSchemaRef; -use common_expression::ROW_ID_COL_NAME; -use common_functions::BUILTIN_FUNCTIONS; +use databend_common_catalog::catalog::CatalogManager; +use databend_common_catalog::catalog::CATALOG_DEFAULT; +use databend_common_catalog::plan::DataSourcePlan; +use databend_common_catalog::plan::Filters; +use databend_common_catalog::plan::InternalColumn; +use databend_common_catalog::plan::PrewhereInfo; +use databend_common_catalog::plan::Projection; +use databend_common_catalog::plan::PushDownInfo; +use databend_common_catalog::plan::VirtualColumnInfo; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::type_check::check_function; +use databend_common_expression::types::DataType; +use databend_common_expression::ConstantFolder; +use databend_common_expression::DataField; +use databend_common_expression::DataSchemaRef; +use databend_common_expression::DataSchemaRefExt; +use databend_common_expression::FieldIndex; +use databend_common_expression::RemoteExpr; +use databend_common_expression::TableSchema; +use databend_common_expression::TableSchemaRef; +use databend_common_expression::ROW_ID_COL_NAME; +use databend_common_functions::BUILTIN_FUNCTIONS; use itertools::Itertools; use crate::binder::INTERNAL_COLUMN_FACTORY; @@ -517,7 +517,7 @@ impl PhysicalPlanBuilder { pub(crate) fn build_agg_index( agg: &crate::plans::AggIndexInfo, source_fields: &[DataField], - ) -> Result { + ) -> Result { // Build projection let used_columns = agg.used_columns(); let mut col_indices = Vec::with_capacity(used_columns.len()); @@ -564,7 +564,7 @@ impl PhysicalPlanBuilder { }) .collect::>>()?; - Ok(common_catalog::plan::AggIndexInfo { + Ok(databend_common_catalog::plan::AggIndexInfo { index_id: agg.index_id, filter, selection, diff --git a/src/query/sql/src/executor/physical_plans/physical_udf.rs b/src/query/sql/src/executor/physical_plans/physical_udf.rs index 9f340a2a30c3..e3fbbc3e443b 100644 --- a/src/query/sql/src/executor/physical_plans/physical_udf.rs +++ b/src/query/sql/src/executor/physical_plans/physical_udf.rs @@ -14,13 +14,13 @@ use std::collections::HashMap; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::types::DataType; -use common_expression::DataField; -use common_expression::DataSchemaRef; -use common_expression::DataSchemaRefExt; -use common_functions::BUILTIN_FUNCTIONS; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::types::DataType; +use databend_common_expression::DataField; +use databend_common_expression::DataSchemaRef; +use databend_common_expression::DataSchemaRefExt; +use databend_common_functions::BUILTIN_FUNCTIONS; use crate::executor::explain::PlanStatsInfo; use crate::executor::PhysicalPlan; diff --git a/src/query/sql/src/executor/physical_plans/physical_union_all.rs b/src/query/sql/src/executor/physical_plans/physical_union_all.rs index b614196cd76f..8ad873c02b98 100644 --- a/src/query/sql/src/executor/physical_plans/physical_union_all.rs +++ b/src/query/sql/src/executor/physical_plans/physical_union_all.rs @@ -12,15 +12,15 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::type_check::common_super_type; -use common_expression::types::DataType; -use common_expression::DataField; -use common_expression::DataSchema; -use common_expression::DataSchemaRef; -use common_expression::DataSchemaRefExt; -use common_functions::BUILTIN_FUNCTIONS; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::type_check::common_super_type; +use databend_common_expression::types::DataType; +use databend_common_expression::DataField; +use databend_common_expression::DataSchema; +use databend_common_expression::DataSchemaRef; +use databend_common_expression::DataSchemaRefExt; +use databend_common_functions::BUILTIN_FUNCTIONS; use crate::binder::wrap_cast; use crate::executor::explain::PlanStatsInfo; diff --git a/src/query/sql/src/executor/physical_plans/physical_update_source.rs b/src/query/sql/src/executor/physical_plans/physical_update_source.rs index bf9341587ae2..795a1b0b3c1c 100644 --- a/src/query/sql/src/executor/physical_plans/physical_update_source.rs +++ b/src/query/sql/src/executor/physical_plans/physical_update_source.rs @@ -14,12 +14,12 @@ use std::collections::BTreeMap; -use common_catalog::plan::Filters; -use common_catalog::plan::Partitions; -use common_expression::FieldIndex; -use common_expression::RemoteExpr; -use common_meta_app::schema::CatalogInfo; -use common_meta_app::schema::TableInfo; +use databend_common_catalog::plan::Filters; +use databend_common_catalog::plan::Partitions; +use databend_common_expression::FieldIndex; +use databend_common_expression::RemoteExpr; +use databend_common_meta_app::schema::CatalogInfo; +use databend_common_meta_app::schema::TableInfo; #[derive(Clone, Debug, serde::Serialize, serde::Deserialize)] pub struct UpdateSource { diff --git a/src/query/sql/src/executor/physical_plans/physical_window.rs b/src/query/sql/src/executor/physical_plans/physical_window.rs index 3addb7b856ea..b7639998d4c8 100644 --- a/src/query/sql/src/executor/physical_plans/physical_window.rs +++ b/src/query/sql/src/executor/physical_plans/physical_window.rs @@ -14,19 +14,19 @@ use std::fmt::Display; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::type_check; -use common_expression::type_check::common_super_type; -use common_expression::types::DataType; -use common_expression::types::NumberDataType; -use common_expression::ConstantFolder; -use common_expression::DataField; -use common_expression::DataSchemaRef; -use common_expression::DataSchemaRefExt; -use common_expression::FunctionContext; -use common_expression::RawExpr; -use common_functions::BUILTIN_FUNCTIONS; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::type_check; +use databend_common_expression::type_check::common_super_type; +use databend_common_expression::types::DataType; +use databend_common_expression::types::NumberDataType; +use databend_common_expression::ConstantFolder; +use databend_common_expression::DataField; +use databend_common_expression::DataSchemaRef; +use databend_common_expression::DataSchemaRefExt; +use databend_common_expression::FunctionContext; +use databend_common_expression::RawExpr; +use databend_common_functions::BUILTIN_FUNCTIONS; use crate::binder::wrap_cast; use crate::executor::explain::PlanStatsInfo; @@ -249,7 +249,7 @@ impl PhysicalPlanBuilder { let expr = type_check::check(&raw_expr, &BUILTIN_FUNCTIONS)?; let (expr, _) = ConstantFolder::fold(&expr, &FunctionContext::default(), &BUILTIN_FUNCTIONS); - if let common_expression::Expr::Constant { + if let databend_common_expression::Expr::Constant { scalar: new_scalar, .. } = expr { diff --git a/src/query/sql/src/executor/profile.rs b/src/query/sql/src/executor/profile.rs index 10e1592b5e41..189ac0e68534 100644 --- a/src/query/sql/src/executor/profile.rs +++ b/src/query/sql/src/executor/profile.rs @@ -12,26 +12,26 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_exception::Result; -use common_functions::BUILTIN_FUNCTIONS; -use common_profile::AggregateAttribute; -use common_profile::AggregateExpandAttribute; -use common_profile::CteScanAttribute; -use common_profile::EvalScalarAttribute; -use common_profile::ExchangeAttribute; -use common_profile::FilterAttribute; -use common_profile::JoinAttribute; -use common_profile::LimitAttribute; -use common_profile::OperatorAttribute; -use common_profile::OperatorProfile; -use common_profile::OperatorType; -use common_profile::ProcessorProfiles; -use common_profile::ProjectSetAttribute; -use common_profile::QueryProfile; -use common_profile::SortAttribute; -use common_profile::TableScanAttribute; -use common_profile::UdfAttribute; -use common_profile::WindowAttribute; +use databend_common_exception::Result; +use databend_common_functions::BUILTIN_FUNCTIONS; +use databend_common_profile::AggregateAttribute; +use databend_common_profile::AggregateExpandAttribute; +use databend_common_profile::CteScanAttribute; +use databend_common_profile::EvalScalarAttribute; +use databend_common_profile::ExchangeAttribute; +use databend_common_profile::FilterAttribute; +use databend_common_profile::JoinAttribute; +use databend_common_profile::LimitAttribute; +use databend_common_profile::OperatorAttribute; +use databend_common_profile::OperatorProfile; +use databend_common_profile::OperatorType; +use databend_common_profile::ProcessorProfiles; +use databend_common_profile::ProjectSetAttribute; +use databend_common_profile::QueryProfile; +use databend_common_profile::SortAttribute; +use databend_common_profile::TableScanAttribute; +use databend_common_profile::UdfAttribute; +use databend_common_profile::WindowAttribute; use itertools::Itertools; use crate::executor::format::pretty_display_agg_desc; diff --git a/src/query/sql/src/executor/table_read_plan.rs b/src/query/sql/src/executor/table_read_plan.rs index 778182f3368c..ae26d7d1de6d 100644 --- a/src/query/sql/src/executor/table_read_plan.rs +++ b/src/query/sql/src/executor/table_read_plan.rs @@ -15,29 +15,29 @@ use std::collections::BTreeMap; use std::sync::Arc; -use common_ast::parser::parse_expr; -use common_ast::parser::tokenize_sql; -use common_base::base::ProgressValues; -use common_catalog::plan::DataSourceInfo; -use common_catalog::plan::DataSourcePlan; -use common_catalog::plan::Filters; -use common_catalog::plan::InternalColumn; -use common_catalog::plan::PartStatistics; -use common_catalog::plan::Partitions; -use common_catalog::plan::PushDownInfo; -use common_catalog::plan::StreamTablePart; -use common_catalog::table::Table; -use common_catalog::table_context::TableContext; -use common_exception::Result; -use common_expression::FieldIndex; -use common_expression::RemoteExpr; -use common_expression::Scalar; -use common_expression::TableField; -use common_license::license::Feature::DataMask; -use common_license::license_manager::get_license_manager; -use common_settings::Settings; -use common_users::UserApiProvider; -use data_mask_feature::get_datamask_handler; +use databend_common_ast::parser::parse_expr; +use databend_common_ast::parser::tokenize_sql; +use databend_common_base::base::ProgressValues; +use databend_common_catalog::plan::DataSourceInfo; +use databend_common_catalog::plan::DataSourcePlan; +use databend_common_catalog::plan::Filters; +use databend_common_catalog::plan::InternalColumn; +use databend_common_catalog::plan::PartStatistics; +use databend_common_catalog::plan::Partitions; +use databend_common_catalog::plan::PushDownInfo; +use databend_common_catalog::plan::StreamTablePart; +use databend_common_catalog::table::Table; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::Result; +use databend_common_expression::FieldIndex; +use databend_common_expression::RemoteExpr; +use databend_common_expression::Scalar; +use databend_common_expression::TableField; +use databend_common_license::license::Feature::DataMask; +use databend_common_license::license_manager::get_license_manager; +use databend_common_settings::Settings; +use databend_common_users::UserApiProvider; +use databend_enterprise_data_mask_feature::get_datamask_handler; use log::info; use parking_lot::RwLock; diff --git a/src/query/sql/src/executor/util.rs b/src/query/sql/src/executor/util.rs index c2ffb29dde54..749dd8d52730 100644 --- a/src/query/sql/src/executor/util.rs +++ b/src/query/sql/src/executor/util.rs @@ -14,13 +14,13 @@ use std::sync::LazyLock; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::type_check; -use common_expression::types::DataType; -use common_expression::ColumnIndex; -use common_expression::Expr; -use common_functions::BUILTIN_FUNCTIONS; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::type_check; +use databend_common_expression::types::DataType; +use databend_common_expression::ColumnIndex; +use databend_common_expression::Expr; +use databend_common_functions::BUILTIN_FUNCTIONS; use regex::Regex; use crate::IndexType; diff --git a/src/query/sql/src/planner/binder/aggregate.rs b/src/query/sql/src/planner/binder/aggregate.rs index f1e592feff5c..4bb10ad3c696 100644 --- a/src/query/sql/src/planner/binder/aggregate.rs +++ b/src/query/sql/src/planner/binder/aggregate.rs @@ -17,14 +17,14 @@ use std::collections::HashMap; use std::collections::HashSet; use std::sync::Arc; -use common_ast::ast::Expr; -use common_ast::ast::GroupBy; -use common_ast::ast::Literal; -use common_ast::ast::SelectTarget; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::types::DataType; -use common_expression::types::NumberDataType; +use databend_common_ast::ast::Expr; +use databend_common_ast::ast::GroupBy; +use databend_common_ast::ast::Literal; +use databend_common_ast::ast::SelectTarget; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::types::DataType; +use databend_common_expression::types::NumberDataType; use itertools::Itertools; use super::prune_by_children; diff --git a/src/query/sql/src/planner/binder/bind_context.rs b/src/query/sql/src/planner/binder/bind_context.rs index f6aef741a322..f225659676d9 100644 --- a/src/query/sql/src/planner/binder/bind_context.rs +++ b/src/query/sql/src/planner/binder/bind_context.rs @@ -17,20 +17,20 @@ use std::collections::BTreeMap; use std::hash::Hash; use std::sync::Arc; -use common_ast::ast::Identifier; -use common_ast::ast::Query; -use common_ast::ast::TableAlias; -use common_ast::ast::WindowSpec; -use common_catalog::plan::InternalColumn; -use common_exception::ErrorCode; -use common_exception::Result; -use common_exception::Span; -use common_expression::is_internal_stream_column_id; -use common_expression::ColumnId; -use common_expression::DataField; -use common_expression::DataSchemaRef; -use common_expression::DataSchemaRefExt; use dashmap::DashMap; +use databend_common_ast::ast::Identifier; +use databend_common_ast::ast::Query; +use databend_common_ast::ast::TableAlias; +use databend_common_ast::ast::WindowSpec; +use databend_common_catalog::plan::InternalColumn; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_exception::Span; +use databend_common_expression::is_internal_stream_column_id; +use databend_common_expression::ColumnId; +use databend_common_expression::DataField; +use databend_common_expression::DataSchemaRef; +use databend_common_expression::DataSchemaRefExt; use enum_as_inner::EnumAsInner; use indexmap::IndexMap; use itertools::Itertools; diff --git a/src/query/sql/src/planner/binder/binder.rs b/src/query/sql/src/planner/binder/binder.rs index 6442e6feb970..33eb94194cdc 100644 --- a/src/query/sql/src/planner/binder/binder.rs +++ b/src/query/sql/src/planner/binder/binder.rs @@ -17,23 +17,23 @@ use std::str::FromStr; use std::sync::Arc; use chrono_tz::Tz; -use common_ast::ast::format_statement; -use common_ast::ast::ExplainKind; -use common_ast::ast::Hint; -use common_ast::ast::Identifier; -use common_ast::ast::Statement; -use common_ast::parser::parse_sql; -use common_ast::parser::tokenize_sql; -use common_ast::Dialect; -use common_catalog::catalog::CatalogManager; -use common_catalog::table_context::TableContext; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::types::DataType; -use common_expression::ConstantFolder; -use common_expression::Expr; -use common_functions::BUILTIN_FUNCTIONS; -use common_meta_app::principal::StageFileFormatType; +use databend_common_ast::ast::format_statement; +use databend_common_ast::ast::ExplainKind; +use databend_common_ast::ast::Hint; +use databend_common_ast::ast::Identifier; +use databend_common_ast::ast::Statement; +use databend_common_ast::parser::parse_sql; +use databend_common_ast::parser::tokenize_sql; +use databend_common_ast::Dialect; +use databend_common_catalog::catalog::CatalogManager; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::types::DataType; +use databend_common_expression::ConstantFolder; +use databend_common_expression::Expr; +use databend_common_functions::BUILTIN_FUNCTIONS; +use databend_common_meta_app::principal::StageFileFormatType; use indexmap::IndexMap; use log::warn; diff --git a/src/query/sql/src/planner/binder/call.rs b/src/query/sql/src/planner/binder/call.rs index a74478824465..a044f6851acc 100644 --- a/src/query/sql/src/planner/binder/call.rs +++ b/src/query/sql/src/planner/binder/call.rs @@ -12,9 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_ast::ast::CallStmt; -use common_exception::ErrorCode; -use common_exception::Result; +use databend_common_ast::ast::CallStmt; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; use crate::binder::Binder; use crate::plans::Plan; diff --git a/src/query/sql/src/planner/binder/column_binding.rs b/src/query/sql/src/planner/binder/column_binding.rs index 9f14e125dc63..e4885aff4d5c 100644 --- a/src/query/sql/src/planner/binder/column_binding.rs +++ b/src/query/sql/src/planner/binder/column_binding.rs @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_expression::types::DataType; -use common_expression::ColumnIndex; +use databend_common_expression::types::DataType; +use databend_common_expression::ColumnIndex; use crate::IndexType; use crate::Visibility; diff --git a/src/query/sql/src/planner/binder/copy_into_location.rs b/src/query/sql/src/planner/binder/copy_into_location.rs index 3a77dc715fa4..04bc4bb9f3ef 100644 --- a/src/query/sql/src/planner/binder/copy_into_location.rs +++ b/src/query/sql/src/planner/binder/copy_into_location.rs @@ -12,14 +12,14 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_ast::ast::CopyIntoLocationSource; -use common_ast::ast::CopyIntoLocationStmt; -use common_ast::ast::Statement; -use common_ast::parser::parse_sql; -use common_ast::parser::tokenize_sql; -use common_exception::ErrorCode; -use common_exception::Result; -use common_meta_app::principal::StageInfo; +use databend_common_ast::ast::CopyIntoLocationSource; +use databend_common_ast::ast::CopyIntoLocationStmt; +use databend_common_ast::ast::Statement; +use databend_common_ast::parser::parse_sql; +use databend_common_ast::parser::tokenize_sql; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_meta_app::principal::StageInfo; use crate::binder::copy_into_table::resolve_file_location; use crate::binder::Binder; diff --git a/src/query/sql/src/planner/binder/copy_into_table.rs b/src/query/sql/src/planner/binder/copy_into_table.rs index 77dff6e32eb5..799ef1212961 100644 --- a/src/query/sql/src/planner/binder/copy_into_table.rs +++ b/src/query/sql/src/planner/binder/copy_into_table.rs @@ -16,40 +16,40 @@ use std::collections::HashMap; use std::str::FromStr; use std::sync::Arc; -use common_ast::ast::ColumnID as AstColumnID; -use common_ast::ast::CopyIntoTableSource; -use common_ast::ast::CopyIntoTableStmt; -use common_ast::ast::Expr; -use common_ast::ast::FileLocation; -use common_ast::ast::Identifier; -use common_ast::ast::Query; -use common_ast::ast::SelectTarget; -use common_ast::ast::SetExpr; -use common_ast::ast::TableAlias; -use common_ast::ast::TableReference; -use common_ast::ast::TypeName; -use common_ast::parser::parser_values_with_placeholder; -use common_ast::parser::tokenize_sql; -use common_ast::Visitor; -use common_catalog::plan::StageTableInfo; -use common_catalog::table_context::StageAttachment; -use common_catalog::table_context::TableContext; -use common_config::GlobalConfig; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::infer_table_schema; -use common_expression::types::DataType; -use common_expression::DataBlock; -use common_expression::DataSchema; -use common_expression::DataSchemaRef; -use common_expression::Evaluator; -use common_expression::Scalar; -use common_functions::BUILTIN_FUNCTIONS; -use common_meta_app::principal::FileFormatOptionsAst; -use common_meta_app::principal::FileFormatParams; -use common_meta_app::principal::StageInfo; -use common_storage::StageFilesInfo; -use common_users::UserApiProvider; +use databend_common_ast::ast::ColumnID as AstColumnID; +use databend_common_ast::ast::CopyIntoTableSource; +use databend_common_ast::ast::CopyIntoTableStmt; +use databend_common_ast::ast::Expr; +use databend_common_ast::ast::FileLocation; +use databend_common_ast::ast::Identifier; +use databend_common_ast::ast::Query; +use databend_common_ast::ast::SelectTarget; +use databend_common_ast::ast::SetExpr; +use databend_common_ast::ast::TableAlias; +use databend_common_ast::ast::TableReference; +use databend_common_ast::ast::TypeName; +use databend_common_ast::parser::parser_values_with_placeholder; +use databend_common_ast::parser::tokenize_sql; +use databend_common_ast::Visitor; +use databend_common_catalog::plan::StageTableInfo; +use databend_common_catalog::table_context::StageAttachment; +use databend_common_catalog::table_context::TableContext; +use databend_common_config::GlobalConfig; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::infer_table_schema; +use databend_common_expression::types::DataType; +use databend_common_expression::DataBlock; +use databend_common_expression::DataSchema; +use databend_common_expression::DataSchemaRef; +use databend_common_expression::Evaluator; +use databend_common_expression::Scalar; +use databend_common_functions::BUILTIN_FUNCTIONS; +use databend_common_meta_app::principal::FileFormatOptionsAst; +use databend_common_meta_app::principal::FileFormatParams; +use databend_common_meta_app::principal::StageInfo; +use databend_common_storage::StageFilesInfo; +use databend_common_users::UserApiProvider; use indexmap::IndexMap; use log::debug; use parking_lot::RwLock; diff --git a/src/query/sql/src/planner/binder/ddl/account.rs b/src/query/sql/src/planner/binder/ddl/account.rs index 97d13dfa79b0..25df651327c3 100644 --- a/src/query/sql/src/planner/binder/ddl/account.rs +++ b/src/query/sql/src/planner/binder/ddl/account.rs @@ -12,18 +12,18 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_ast::ast::AccountMgrLevel; -use common_ast::ast::AccountMgrSource; -use common_ast::ast::AlterUserStmt; -use common_ast::ast::CreateUserStmt; -use common_ast::ast::GrantStmt; -use common_ast::ast::RevokeStmt; -use common_exception::Result; -use common_meta_app::principal::AuthInfo; -use common_meta_app::principal::GrantObject; -use common_meta_app::principal::UserOption; -use common_meta_app::principal::UserPrivilegeSet; -use common_users::UserApiProvider; +use databend_common_ast::ast::AccountMgrLevel; +use databend_common_ast::ast::AccountMgrSource; +use databend_common_ast::ast::AlterUserStmt; +use databend_common_ast::ast::CreateUserStmt; +use databend_common_ast::ast::GrantStmt; +use databend_common_ast::ast::RevokeStmt; +use databend_common_exception::Result; +use databend_common_meta_app::principal::AuthInfo; +use databend_common_meta_app::principal::GrantObject; +use databend_common_meta_app::principal::UserOption; +use databend_common_meta_app::principal::UserPrivilegeSet; +use databend_common_users::UserApiProvider; use crate::plans::AlterUserPlan; use crate::plans::CreateUserPlan; diff --git a/src/query/sql/src/planner/binder/ddl/catalog.rs b/src/query/sql/src/planner/binder/ddl/catalog.rs index c0a0423503c9..f0451d62f9fd 100644 --- a/src/query/sql/src/planner/binder/ddl/catalog.rs +++ b/src/query/sql/src/planner/binder/ddl/catalog.rs @@ -17,24 +17,24 @@ use std::fmt::Write; use std::sync::Arc; use chrono::Utc; -use common_ast::ast::CreateCatalogStmt; -use common_ast::ast::DropCatalogStmt; -use common_ast::ast::ShowCatalogsStmt; -use common_ast::ast::ShowCreateCatalogStmt; -use common_ast::ast::ShowLimit; -use common_ast::ast::UriLocation; -use common_catalog::table_context::TableContext; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::types::DataType; -use common_expression::DataField; -use common_expression::DataSchemaRefExt; -use common_meta_app::schema::CatalogMeta; -use common_meta_app::schema::CatalogOption; -use common_meta_app::schema::CatalogType; -use common_meta_app::schema::HiveCatalogOption; -use common_meta_app::schema::IcebergCatalogOption; -use common_meta_app::storage::StorageParams; +use databend_common_ast::ast::CreateCatalogStmt; +use databend_common_ast::ast::DropCatalogStmt; +use databend_common_ast::ast::ShowCatalogsStmt; +use databend_common_ast::ast::ShowCreateCatalogStmt; +use databend_common_ast::ast::ShowLimit; +use databend_common_ast::ast::UriLocation; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::types::DataType; +use databend_common_expression::DataField; +use databend_common_expression::DataSchemaRefExt; +use databend_common_meta_app::schema::CatalogMeta; +use databend_common_meta_app::schema::CatalogOption; +use databend_common_meta_app::schema::CatalogType; +use databend_common_meta_app::schema::HiveCatalogOption; +use databend_common_meta_app::schema::IcebergCatalogOption; +use databend_common_meta_app::storage::StorageParams; use crate::binder::parse_uri_location; use crate::normalize_identifier; diff --git a/src/query/sql/src/planner/binder/ddl/column.rs b/src/query/sql/src/planner/binder/ddl/column.rs index e16a424cee53..e083c3fc31ff 100644 --- a/src/query/sql/src/planner/binder/ddl/column.rs +++ b/src/query/sql/src/planner/binder/ddl/column.rs @@ -12,9 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_ast::ast::ShowColumnsStmt; -use common_ast::ast::ShowLimit; -use common_exception::Result; +use databend_common_ast::ast::ShowColumnsStmt; +use databend_common_ast::ast::ShowLimit; +use databend_common_exception::Result; use log::debug; use crate::normalize_identifier; diff --git a/src/query/sql/src/planner/binder/ddl/connection.rs b/src/query/sql/src/planner/binder/ddl/connection.rs index e263ff05f658..d9d28396db58 100644 --- a/src/query/sql/src/planner/binder/ddl/connection.rs +++ b/src/query/sql/src/planner/binder/ddl/connection.rs @@ -12,9 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_ast::ast::CreateConnectionStmt; -use common_ast::ast::UriLocation; -use common_exception::Result; +use databend_common_ast::ast::CreateConnectionStmt; +use databend_common_ast::ast::UriLocation; +use databend_common_exception::Result; use crate::binder::parse_uri_location; use crate::plans::CreateConnectionPlan; diff --git a/src/query/sql/src/planner/binder/ddl/data_mask.rs b/src/query/sql/src/planner/binder/ddl/data_mask.rs index 6a4f4d0d6ce4..45a9d0d4ad5b 100644 --- a/src/query/sql/src/planner/binder/ddl/data_mask.rs +++ b/src/query/sql/src/planner/binder/ddl/data_mask.rs @@ -12,9 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_ast::ast::*; -use common_exception::ErrorCode; -use common_exception::Result; +use databend_common_ast::ast::*; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; use crate::binder::Binder; use crate::plans::CreateDatamaskPolicyPlan; diff --git a/src/query/sql/src/planner/binder/ddl/database.rs b/src/query/sql/src/planner/binder/ddl/database.rs index 89615f8e9880..c363414efa08 100644 --- a/src/query/sql/src/planner/binder/ddl/database.rs +++ b/src/query/sql/src/planner/binder/ddl/database.rs @@ -14,22 +14,22 @@ use std::collections::BTreeMap; -use common_ast::ast::AlterDatabaseAction; -use common_ast::ast::AlterDatabaseStmt; -use common_ast::ast::CreateDatabaseStmt; -use common_ast::ast::DatabaseEngine; -use common_ast::ast::DropDatabaseStmt; -use common_ast::ast::SQLProperty; -use common_ast::ast::ShowCreateDatabaseStmt; -use common_ast::ast::ShowDatabasesStmt; -use common_ast::ast::ShowLimit; -use common_ast::ast::UndropDatabaseStmt; -use common_exception::Result; -use common_expression::types::DataType; -use common_expression::DataField; -use common_expression::DataSchemaRefExt; -use common_meta_app::schema::DatabaseMeta; -use common_meta_app::share::ShareNameIdent; +use databend_common_ast::ast::AlterDatabaseAction; +use databend_common_ast::ast::AlterDatabaseStmt; +use databend_common_ast::ast::CreateDatabaseStmt; +use databend_common_ast::ast::DatabaseEngine; +use databend_common_ast::ast::DropDatabaseStmt; +use databend_common_ast::ast::SQLProperty; +use databend_common_ast::ast::ShowCreateDatabaseStmt; +use databend_common_ast::ast::ShowDatabasesStmt; +use databend_common_ast::ast::ShowLimit; +use databend_common_ast::ast::UndropDatabaseStmt; +use databend_common_exception::Result; +use databend_common_expression::types::DataType; +use databend_common_expression::DataField; +use databend_common_expression::DataSchemaRefExt; +use databend_common_meta_app::schema::DatabaseMeta; +use databend_common_meta_app::share::ShareNameIdent; use log::debug; use crate::binder::Binder; diff --git a/src/query/sql/src/planner/binder/ddl/index.rs b/src/query/sql/src/planner/binder/ddl/index.rs index 5a415f252143..7a66d3322e02 100644 --- a/src/query/sql/src/planner/binder/ddl/index.rs +++ b/src/query/sql/src/planner/binder/ddl/index.rs @@ -12,27 +12,27 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_ast::ast::CreateIndexStmt; -use common_ast::ast::DropIndexStmt; -use common_ast::ast::ExplainKind; -use common_ast::ast::Identifier; -use common_ast::ast::Query; -use common_ast::ast::RefreshIndexStmt; -use common_ast::ast::SetExpr; -use common_ast::ast::Statement; -use common_ast::ast::TableReference; -use common_ast::parser::parse_sql; -use common_ast::parser::tokenize_sql; -use common_ast::walk_statement_mut; -use common_ast::Visitor; -use common_exception::ErrorCode; -use common_exception::Result; -use common_license::license::Feature::AggregateIndex; -use common_license::license_manager::get_license_manager; -use common_meta_app::schema::GetIndexReq; -use common_meta_app::schema::IndexMeta; -use common_meta_app::schema::IndexNameIdent; -use storages_common_table_meta::meta::Location; +use databend_common_ast::ast::CreateIndexStmt; +use databend_common_ast::ast::DropIndexStmt; +use databend_common_ast::ast::ExplainKind; +use databend_common_ast::ast::Identifier; +use databend_common_ast::ast::Query; +use databend_common_ast::ast::RefreshIndexStmt; +use databend_common_ast::ast::SetExpr; +use databend_common_ast::ast::Statement; +use databend_common_ast::ast::TableReference; +use databend_common_ast::parser::parse_sql; +use databend_common_ast::parser::tokenize_sql; +use databend_common_ast::walk_statement_mut; +use databend_common_ast::Visitor; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_license::license::Feature::AggregateIndex; +use databend_common_license::license_manager::get_license_manager; +use databend_common_meta_app::schema::GetIndexReq; +use databend_common_meta_app::schema::IndexMeta; +use databend_common_meta_app::schema::IndexNameIdent; +use databend_storages_common_table_meta::meta::Location; use crate::binder::Binder; use crate::optimizer::optimize; diff --git a/src/query/sql/src/planner/binder/ddl/network_policy.rs b/src/query/sql/src/planner/binder/ddl/network_policy.rs index 2a86218d31b6..d481e7a479d5 100644 --- a/src/query/sql/src/planner/binder/ddl/network_policy.rs +++ b/src/query/sql/src/planner/binder/ddl/network_policy.rs @@ -13,9 +13,9 @@ // limitations under the License. use cidr::Ipv4Cidr; -use common_ast::ast::*; -use common_exception::ErrorCode; -use common_exception::Result; +use databend_common_ast::ast::*; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; use crate::binder::Binder; use crate::plans::AlterNetworkPolicyPlan; diff --git a/src/query/sql/src/planner/binder/ddl/role.rs b/src/query/sql/src/planner/binder/ddl/role.rs index f52b0680cf1f..7fa4d5affe77 100644 --- a/src/query/sql/src/planner/binder/ddl/role.rs +++ b/src/query/sql/src/planner/binder/ddl/role.rs @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_ast::ast::SecondaryRolesOption; -use common_exception::Result; +use databend_common_ast::ast::SecondaryRolesOption; +use databend_common_exception::Result; use crate::plans::Plan; use crate::plans::SetRolePlan; diff --git a/src/query/sql/src/planner/binder/ddl/share.rs b/src/query/sql/src/planner/binder/ddl/share.rs index e3f86dd48be6..c43344b07bdc 100644 --- a/src/query/sql/src/planner/binder/ddl/share.rs +++ b/src/query/sql/src/planner/binder/ddl/share.rs @@ -12,9 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_ast::ast::*; -use common_exception::Result; -use common_meta_app::share::ShareEndpointIdent; +use databend_common_ast::ast::*; +use databend_common_exception::Result; +use databend_common_meta_app::share::ShareEndpointIdent; use itertools::Itertools; use crate::binder::Binder; diff --git a/src/query/sql/src/planner/binder/ddl/stage.rs b/src/query/sql/src/planner/binder/ddl/stage.rs index b4d52923a0ad..5304029bed26 100644 --- a/src/query/sql/src/planner/binder/ddl/stage.rs +++ b/src/query/sql/src/planner/binder/ddl/stage.rs @@ -15,15 +15,15 @@ use std::collections::BTreeMap; use std::str::FromStr; -use common_ast::ast::CreateStageStmt; -use common_ast::ast::UriLocation; -use common_exception::ErrorCode; -use common_exception::Result; -use common_meta_app::principal::FileFormatOptionsAst; -use common_meta_app::principal::FileFormatParams; -use common_meta_app::principal::OnErrorMode; -use common_meta_app::principal::StageInfo; -use common_storage::init_operator; +use databend_common_ast::ast::CreateStageStmt; +use databend_common_ast::ast::UriLocation; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_meta_app::principal::FileFormatOptionsAst; +use databend_common_meta_app::principal::FileFormatParams; +use databend_common_meta_app::principal::OnErrorMode; +use databend_common_meta_app::principal::StageInfo; +use databend_common_storage::init_operator; use super::super::copy_into_table::resolve_stage_location; use crate::binder::location::parse_uri_location; diff --git a/src/query/sql/src/planner/binder/ddl/stream.rs b/src/query/sql/src/planner/binder/ddl/stream.rs index b8c7ca1d18a1..74ebb4617fe7 100644 --- a/src/query/sql/src/planner/binder/ddl/stream.rs +++ b/src/query/sql/src/planner/binder/ddl/stream.rs @@ -12,15 +12,15 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_ast::ast::CreateStreamStmt; -use common_ast::ast::DescribeStreamStmt; -use common_ast::ast::DropStreamStmt; -use common_ast::ast::ShowLimit; -use common_ast::ast::ShowStreamsStmt; -use common_ast::ast::StreamPoint; -use common_exception::Result; -use common_license::license::Feature; -use common_license::license_manager::get_license_manager; +use databend_common_ast::ast::CreateStreamStmt; +use databend_common_ast::ast::DescribeStreamStmt; +use databend_common_ast::ast::DropStreamStmt; +use databend_common_ast::ast::ShowLimit; +use databend_common_ast::ast::ShowStreamsStmt; +use databend_common_ast::ast::StreamPoint; +use databend_common_exception::Result; +use databend_common_license::license::Feature; +use databend_common_license::license_manager::get_license_manager; use log::debug; use crate::binder::Binder; diff --git a/src/query/sql/src/planner/binder/ddl/table.rs b/src/query/sql/src/planner/binder/ddl/table.rs index 343a5c3e1374..c220f3eaae08 100644 --- a/src/query/sql/src/planner/binder/ddl/table.rs +++ b/src/query/sql/src/planner/binder/ddl/table.rs @@ -16,71 +16,71 @@ use std::collections::BTreeMap; use std::collections::HashSet; use std::sync::Arc; -use common_ast::ast::AddColumnOption as AstAddColumnOption; -use common_ast::ast::AlterTableAction; -use common_ast::ast::AlterTableStmt; -use common_ast::ast::AnalyzeTableStmt; -use common_ast::ast::AttachTableStmt; -use common_ast::ast::ColumnDefinition; -use common_ast::ast::ColumnExpr; -use common_ast::ast::CompactTarget; -use common_ast::ast::CreateTableSource; -use common_ast::ast::CreateTableStmt; -use common_ast::ast::DescribeTableStmt; -use common_ast::ast::DropTableStmt; -use common_ast::ast::Engine; -use common_ast::ast::ExistsTableStmt; -use common_ast::ast::Expr; -use common_ast::ast::Identifier; -use common_ast::ast::Literal; -use common_ast::ast::ModifyColumnAction; -use common_ast::ast::NullableConstraint; -use common_ast::ast::OptimizeTableAction as AstOptimizeTableAction; -use common_ast::ast::OptimizeTableStmt; -use common_ast::ast::RenameTableStmt; -use common_ast::ast::ShowCreateTableStmt; -use common_ast::ast::ShowDropTablesStmt; -use common_ast::ast::ShowLimit; -use common_ast::ast::ShowTablesStatusStmt; -use common_ast::ast::ShowTablesStmt; -use common_ast::ast::Statement; -use common_ast::ast::TableReference; -use common_ast::ast::TruncateTableStmt; -use common_ast::ast::UndropTableStmt; -use common_ast::ast::UriLocation; -use common_ast::ast::VacuumDropTableStmt; -use common_ast::ast::VacuumTableStmt; -use common_ast::parser::parse_sql; -use common_ast::parser::tokenize_sql; -use common_ast::walk_expr_mut; -use common_config::GlobalConfig; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::infer_schema_type; -use common_expression::infer_table_schema; -use common_expression::types::DataType; -use common_expression::ComputedExpr; -use common_expression::DataField; -use common_expression::DataSchemaRefExt; -use common_expression::TableField; -use common_expression::TableSchema; -use common_expression::TableSchemaRef; -use common_expression::TableSchemaRefExt; -use common_functions::BUILTIN_FUNCTIONS; -use common_meta_app::storage::StorageParams; -use common_storage::DataOperator; -use common_storages_delta::DeltaTable; -use common_storages_iceberg::IcebergTable; -use common_storages_view::view_table::QUERY; -use common_storages_view::view_table::VIEW_ENGINE; +use databend_common_ast::ast::AddColumnOption as AstAddColumnOption; +use databend_common_ast::ast::AlterTableAction; +use databend_common_ast::ast::AlterTableStmt; +use databend_common_ast::ast::AnalyzeTableStmt; +use databend_common_ast::ast::AttachTableStmt; +use databend_common_ast::ast::ColumnDefinition; +use databend_common_ast::ast::ColumnExpr; +use databend_common_ast::ast::CompactTarget; +use databend_common_ast::ast::CreateTableSource; +use databend_common_ast::ast::CreateTableStmt; +use databend_common_ast::ast::DescribeTableStmt; +use databend_common_ast::ast::DropTableStmt; +use databend_common_ast::ast::Engine; +use databend_common_ast::ast::ExistsTableStmt; +use databend_common_ast::ast::Expr; +use databend_common_ast::ast::Identifier; +use databend_common_ast::ast::Literal; +use databend_common_ast::ast::ModifyColumnAction; +use databend_common_ast::ast::NullableConstraint; +use databend_common_ast::ast::OptimizeTableAction as AstOptimizeTableAction; +use databend_common_ast::ast::OptimizeTableStmt; +use databend_common_ast::ast::RenameTableStmt; +use databend_common_ast::ast::ShowCreateTableStmt; +use databend_common_ast::ast::ShowDropTablesStmt; +use databend_common_ast::ast::ShowLimit; +use databend_common_ast::ast::ShowTablesStatusStmt; +use databend_common_ast::ast::ShowTablesStmt; +use databend_common_ast::ast::Statement; +use databend_common_ast::ast::TableReference; +use databend_common_ast::ast::TruncateTableStmt; +use databend_common_ast::ast::UndropTableStmt; +use databend_common_ast::ast::UriLocation; +use databend_common_ast::ast::VacuumDropTableStmt; +use databend_common_ast::ast::VacuumTableStmt; +use databend_common_ast::parser::parse_sql; +use databend_common_ast::parser::tokenize_sql; +use databend_common_ast::walk_expr_mut; +use databend_common_config::GlobalConfig; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::infer_schema_type; +use databend_common_expression::infer_table_schema; +use databend_common_expression::types::DataType; +use databend_common_expression::ComputedExpr; +use databend_common_expression::DataField; +use databend_common_expression::DataSchemaRefExt; +use databend_common_expression::TableField; +use databend_common_expression::TableSchema; +use databend_common_expression::TableSchemaRef; +use databend_common_expression::TableSchemaRefExt; +use databend_common_functions::BUILTIN_FUNCTIONS; +use databend_common_meta_app::storage::StorageParams; +use databend_common_storage::DataOperator; +use databend_common_storages_delta::DeltaTable; +use databend_common_storages_iceberg::IcebergTable; +use databend_common_storages_view::view_table::QUERY; +use databend_common_storages_view::view_table::VIEW_ENGINE; +use databend_storages_common_table_meta::table::is_reserved_opt_key; +use databend_storages_common_table_meta::table::OPT_KEY_DATABASE_ID; +use databend_storages_common_table_meta::table::OPT_KEY_STORAGE_FORMAT; +use databend_storages_common_table_meta::table::OPT_KEY_STORAGE_PREFIX; +use databend_storages_common_table_meta::table::OPT_KEY_TABLE_ATTACHED_DATA_URI; +use databend_storages_common_table_meta::table::OPT_KEY_TABLE_COMPRESSION; use log::debug; use log::error; -use storages_common_table_meta::table::is_reserved_opt_key; -use storages_common_table_meta::table::OPT_KEY_DATABASE_ID; -use storages_common_table_meta::table::OPT_KEY_STORAGE_FORMAT; -use storages_common_table_meta::table::OPT_KEY_STORAGE_PREFIX; -use storages_common_table_meta::table::OPT_KEY_TABLE_ATTACHED_DATA_URI; -use storages_common_table_meta::table::OPT_KEY_TABLE_COMPRESSION; use crate::binder::get_storage_params_from_options; use crate::binder::parse_uri_location; diff --git a/src/query/sql/src/planner/binder/ddl/task.rs b/src/query/sql/src/planner/binder/ddl/task.rs index f3575ca3485b..29c5a3f019fb 100644 --- a/src/query/sql/src/planner/binder/ddl/task.rs +++ b/src/query/sql/src/planner/binder/ddl/task.rs @@ -15,17 +15,17 @@ use std::str::FromStr; use chrono_tz; -use common_ast::ast::AlterTaskOptions; -use common_ast::ast::AlterTaskStmt; -use common_ast::ast::CreateTaskStmt; -use common_ast::ast::DescribeTaskStmt; -use common_ast::ast::DropTaskStmt; -use common_ast::ast::ExecuteTaskStmt; -use common_ast::ast::ScheduleOptions; -use common_ast::ast::ShowTasksStmt; -use common_exception::ErrorCode; -use common_exception::Result; use cron; +use databend_common_ast::ast::AlterTaskOptions; +use databend_common_ast::ast::AlterTaskStmt; +use databend_common_ast::ast::CreateTaskStmt; +use databend_common_ast::ast::DescribeTaskStmt; +use databend_common_ast::ast::DropTaskStmt; +use databend_common_ast::ast::ExecuteTaskStmt; +use databend_common_ast::ast::ScheduleOptions; +use databend_common_ast::ast::ShowTasksStmt; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; use crate::plans::AlterTaskPlan; use crate::plans::CreateTaskPlan; @@ -37,7 +37,9 @@ use crate::plans::ShowTasksPlan; use crate::Binder; fn verify_scheduler_option(schedule_opts: &ScheduleOptions) -> Result<()> { - if let common_ast::ast::ScheduleOptions::CronExpression(cron_expr, time_zone) = schedule_opts { + if let databend_common_ast::ast::ScheduleOptions::CronExpression(cron_expr, time_zone) = + schedule_opts + { if cron::Schedule::from_str(cron_expr).is_err() { return Err(ErrorCode::SemanticError(format!( "invalid cron expression {}", diff --git a/src/query/sql/src/planner/binder/ddl/view.rs b/src/query/sql/src/planner/binder/ddl/view.rs index 577937737a2e..860f45503f94 100644 --- a/src/query/sql/src/planner/binder/ddl/view.rs +++ b/src/query/sql/src/planner/binder/ddl/view.rs @@ -12,11 +12,11 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_ast::ast::AlterViewStmt; -use common_ast::ast::CreateViewStmt; -use common_ast::ast::DropViewStmt; -use common_ast::VisitorMut; -use common_exception::Result; +use databend_common_ast::ast::AlterViewStmt; +use databend_common_ast::ast::CreateViewStmt; +use databend_common_ast::ast::DropViewStmt; +use databend_common_ast::VisitorMut; +use databend_common_exception::Result; use crate::binder::Binder; use crate::planner::semantic::normalize_identifier; diff --git a/src/query/sql/src/planner/binder/ddl/virtual_column.rs b/src/query/sql/src/planner/binder/ddl/virtual_column.rs index b30807d0b35b..a5c102a96508 100644 --- a/src/query/sql/src/planner/binder/ddl/virtual_column.rs +++ b/src/query/sql/src/planner/binder/ddl/virtual_column.rs @@ -15,17 +15,17 @@ use std::collections::HashSet; use std::collections::VecDeque; -use common_ast::ast::AlterVirtualColumnStmt; -use common_ast::ast::CreateVirtualColumnStmt; -use common_ast::ast::DropVirtualColumnStmt; -use common_ast::ast::Expr; -use common_ast::ast::Literal; -use common_ast::ast::MapAccessor; -use common_ast::ast::RefreshVirtualColumnStmt; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::TableDataType; -use common_expression::TableSchemaRef; +use databend_common_ast::ast::AlterVirtualColumnStmt; +use databend_common_ast::ast::CreateVirtualColumnStmt; +use databend_common_ast::ast::DropVirtualColumnStmt; +use databend_common_ast::ast::Expr; +use databend_common_ast::ast::Literal; +use databend_common_ast::ast::MapAccessor; +use databend_common_ast::ast::RefreshVirtualColumnStmt; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::TableDataType; +use databend_common_expression::TableSchemaRef; use crate::binder::Binder; use crate::plans::AlterVirtualColumnPlan; diff --git a/src/query/sql/src/planner/binder/delete.rs b/src/query/sql/src/planner/binder/delete.rs index 3a79ee652119..b3eae4aace50 100644 --- a/src/query/sql/src/planner/binder/delete.rs +++ b/src/query/sql/src/planner/binder/delete.rs @@ -14,13 +14,13 @@ use std::sync::Arc; -use common_ast::ast::DeleteStmt; -use common_ast::ast::Expr; -use common_ast::ast::TableReference; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::types::DataType; -use common_expression::ROW_ID_COL_NAME; +use databend_common_ast::ast::DeleteStmt; +use databend_common_ast::ast::Expr; +use databend_common_ast::ast::TableReference; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::types::DataType; +use databend_common_expression::ROW_ID_COL_NAME; use crate::binder::Binder; use crate::binder::ScalarBinder; diff --git a/src/query/sql/src/planner/binder/distinct.rs b/src/query/sql/src/planner/binder/distinct.rs index 482c00c0d40b..8f4b9aed7407 100644 --- a/src/query/sql/src/planner/binder/distinct.rs +++ b/src/query/sql/src/planner/binder/distinct.rs @@ -15,8 +15,8 @@ use std::collections::HashMap; use std::sync::Arc; -use common_exception::Result; -use common_exception::Span; +use databend_common_exception::Result; +use databend_common_exception::Span; use crate::binder::Binder; use crate::binder::ColumnBinding; diff --git a/src/query/sql/src/planner/binder/having.rs b/src/query/sql/src/planner/binder/having.rs index 4067147708ad..951370b7347c 100644 --- a/src/query/sql/src/planner/binder/having.rs +++ b/src/query/sql/src/planner/binder/having.rs @@ -14,9 +14,9 @@ use std::sync::Arc; -use common_ast::ast::Expr; -use common_exception::ErrorCode; -use common_exception::Result; +use databend_common_ast::ast::Expr; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; use super::Finder; use crate::binder::aggregate::AggregateRewriter; diff --git a/src/query/sql/src/planner/binder/insert.rs b/src/query/sql/src/planner/binder/insert.rs index 543cb7bcb22b..520ec923f489 100644 --- a/src/query/sql/src/planner/binder/insert.rs +++ b/src/query/sql/src/planner/binder/insert.rs @@ -15,16 +15,16 @@ use std::str::FromStr; use std::sync::Arc; -use common_ast::ast::Identifier; -use common_ast::ast::InsertSource; -use common_ast::ast::InsertStmt; -use common_ast::ast::Statement; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::TableSchema; -use common_expression::TableSchemaRefExt; -use common_meta_app::principal::FileFormatOptionsAst; -use common_meta_app::principal::OnErrorMode; +use databend_common_ast::ast::Identifier; +use databend_common_ast::ast::InsertSource; +use databend_common_ast::ast::InsertStmt; +use databend_common_ast::ast::Statement; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::TableSchema; +use databend_common_expression::TableSchemaRefExt; +use databend_common_meta_app::principal::FileFormatOptionsAst; +use databend_common_meta_app::principal::OnErrorMode; use crate::binder::Binder; use crate::normalize_identifier; diff --git a/src/query/sql/src/planner/binder/internal_column_factory.rs b/src/query/sql/src/planner/binder/internal_column_factory.rs index 87c97081d817..b388bb55de15 100644 --- a/src/query/sql/src/planner/binder/internal_column_factory.rs +++ b/src/query/sql/src/planner/binder/internal_column_factory.rs @@ -14,18 +14,18 @@ use std::collections::BTreeMap; -use common_catalog::plan::InternalColumn; -use common_catalog::plan::InternalColumnType; -use common_expression::BASE_BLOCK_IDS_COL_NAME; -use common_expression::BASE_ROW_ID_COL_NAME; -use common_expression::BLOCK_NAME_COL_NAME; -use common_expression::CHANGE_ACTION_COL_NAME; -use common_expression::CHANGE_IS_UPDATE_COL_NAME; -use common_expression::CHANGE_ROW_ID_COL_NAME; -use common_expression::ROW_ID_COL_NAME; -use common_expression::SEGMENT_NAME_COL_NAME; -use common_expression::SNAPSHOT_NAME_COL_NAME; use ctor::ctor; +use databend_common_catalog::plan::InternalColumn; +use databend_common_catalog::plan::InternalColumnType; +use databend_common_expression::BASE_BLOCK_IDS_COL_NAME; +use databend_common_expression::BASE_ROW_ID_COL_NAME; +use databend_common_expression::BLOCK_NAME_COL_NAME; +use databend_common_expression::CHANGE_ACTION_COL_NAME; +use databend_common_expression::CHANGE_IS_UPDATE_COL_NAME; +use databend_common_expression::CHANGE_ROW_ID_COL_NAME; +use databend_common_expression::ROW_ID_COL_NAME; +use databend_common_expression::SEGMENT_NAME_COL_NAME; +use databend_common_expression::SNAPSHOT_NAME_COL_NAME; #[ctor] pub static INTERNAL_COLUMN_FACTORY: InternalColumnFactory = InternalColumnFactory::init(); diff --git a/src/query/sql/src/planner/binder/join.rs b/src/query/sql/src/planner/binder/join.rs index aa6811a2b61b..336187445b43 100644 --- a/src/query/sql/src/planner/binder/join.rs +++ b/src/query/sql/src/planner/binder/join.rs @@ -16,15 +16,15 @@ use std::collections::HashMap; use std::sync::Arc; use async_recursion::async_recursion; -use common_ast::ast::split_conjunctions_expr; -use common_ast::ast::split_equivalent_predicate_expr; -use common_ast::ast::Expr; -use common_ast::ast::JoinCondition; -use common_ast::ast::JoinOperator; -use common_catalog::table_context::TableContext; -use common_exception::ErrorCode; -use common_exception::Result; -use common_exception::Span; +use databend_common_ast::ast::split_conjunctions_expr; +use databend_common_ast::ast::split_equivalent_predicate_expr; +use databend_common_ast::ast::Expr; +use databend_common_ast::ast::JoinCondition; +use databend_common_ast::ast::JoinOperator; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_exception::Span; use indexmap::IndexMap; use super::Finder; @@ -67,7 +67,7 @@ impl Binder { right_context: BindContext, left_child: SExpr, right_child: SExpr, - join: &common_ast::ast::Join, + join: &databend_common_ast::ast::Join, ) -> Result<(SExpr, BindContext)> { check_duplicate_join_tables(&left_context, &right_context)?; diff --git a/src/query/sql/src/planner/binder/kill.rs b/src/query/sql/src/planner/binder/kill.rs index 25d12a391a93..8cdbf97973f4 100644 --- a/src/query/sql/src/planner/binder/kill.rs +++ b/src/query/sql/src/planner/binder/kill.rs @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_ast::ast::KillTarget; -use common_exception::Result; +use databend_common_ast::ast::KillTarget; +use databend_common_exception::Result; use crate::planner::binder::BindContext; use crate::planner::binder::Binder; diff --git a/src/query/sql/src/planner/binder/limit.rs b/src/query/sql/src/planner/binder/limit.rs index de984949a349..b71654416d7c 100644 --- a/src/query/sql/src/planner/binder/limit.rs +++ b/src/query/sql/src/planner/binder/limit.rs @@ -14,10 +14,10 @@ use std::sync::Arc; -use common_ast::ast::Expr; -use common_ast::ast::Literal; -use common_exception::ErrorCode; -use common_exception::Result; +use databend_common_ast::ast::Expr; +use databend_common_ast::ast::Literal; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; use crate::binder::Binder; use crate::optimizer::SExpr; diff --git a/src/query/sql/src/planner/binder/location.rs b/src/query/sql/src/planner/binder/location.rs index b958281ba715..126dce1ef921 100644 --- a/src/query/sql/src/planner/binder/location.rs +++ b/src/query/sql/src/planner/binder/location.rs @@ -18,25 +18,25 @@ use std::io::ErrorKind; use std::io::Result; use anyhow::anyhow; -use common_ast::ast::Connection; -use common_ast::ast::UriLocation; -use common_catalog::table_context::TableContext; -use common_config::GlobalConfig; -use common_exception::ErrorCode; -use common_meta_app::storage::StorageAzblobConfig; -use common_meta_app::storage::StorageFsConfig; -use common_meta_app::storage::StorageGcsConfig; -use common_meta_app::storage::StorageHttpConfig; -use common_meta_app::storage::StorageIpfsConfig; -use common_meta_app::storage::StorageObsConfig; -use common_meta_app::storage::StorageOssConfig; -use common_meta_app::storage::StorageParams; -use common_meta_app::storage::StorageS3Config; -use common_meta_app::storage::StorageWebhdfsConfig; -use common_meta_app::storage::STORAGE_GCS_DEFAULT_ENDPOINT; -use common_meta_app::storage::STORAGE_IPFS_DEFAULT_ENDPOINT; -use common_meta_app::storage::STORAGE_S3_DEFAULT_ENDPOINT; -use common_storage::STDIN_FD; +use databend_common_ast::ast::Connection; +use databend_common_ast::ast::UriLocation; +use databend_common_catalog::table_context::TableContext; +use databend_common_config::GlobalConfig; +use databend_common_exception::ErrorCode; +use databend_common_meta_app::storage::StorageAzblobConfig; +use databend_common_meta_app::storage::StorageFsConfig; +use databend_common_meta_app::storage::StorageGcsConfig; +use databend_common_meta_app::storage::StorageHttpConfig; +use databend_common_meta_app::storage::StorageIpfsConfig; +use databend_common_meta_app::storage::StorageObsConfig; +use databend_common_meta_app::storage::StorageOssConfig; +use databend_common_meta_app::storage::StorageParams; +use databend_common_meta_app::storage::StorageS3Config; +use databend_common_meta_app::storage::StorageWebhdfsConfig; +use databend_common_meta_app::storage::STORAGE_GCS_DEFAULT_ENDPOINT; +use databend_common_meta_app::storage::STORAGE_IPFS_DEFAULT_ENDPOINT; +use databend_common_meta_app::storage::STORAGE_S3_DEFAULT_ENDPOINT; +use databend_common_storage::STDIN_FD; use opendal::Scheme; use percent_encoding::percent_decode_str; @@ -341,7 +341,7 @@ fn parse_hdfs_params(l: &mut UriLocation) -> Result { )); } }; - let sp = StorageParams::Hdfs(common_meta_app::storage::StorageHdfsConfig { + let sp = StorageParams::Hdfs(databend_common_meta_app::storage::StorageHdfsConfig { name_node, root: l.path.clone(), }); @@ -503,7 +503,7 @@ pub async fn parse_uri_location( pub async fn get_storage_params_from_options( ctx: &dyn TableContext, options: &BTreeMap, -) -> common_exception::Result { +) -> databend_common_exception::Result { let location = options .get("location") .ok_or_else(|| ErrorCode::BadArguments("missing option 'location'".to_string()))?; diff --git a/src/query/sql/src/planner/binder/merge_into.rs b/src/query/sql/src/planner/binder/merge_into.rs index f855005aefe6..f21cedf1fc2b 100644 --- a/src/query/sql/src/planner/binder/merge_into.rs +++ b/src/query/sql/src/planner/binder/merge_into.rs @@ -16,25 +16,25 @@ use std::collections::HashMap; use std::collections::HashSet; use std::sync::Arc; -use common_ast::ast::Join; -use common_ast::ast::JoinCondition; -use common_ast::ast::JoinOperator; -use common_ast::ast::JoinOperator::Inner; -use common_ast::ast::JoinOperator::RightAnti; -use common_ast::ast::JoinOperator::RightOuter; -use common_ast::ast::MatchOperation; -use common_ast::ast::MatchedClause; -use common_ast::ast::MergeIntoStmt; -use common_ast::ast::TableReference; -use common_ast::ast::UnmatchedClause; -use common_catalog::plan::InternalColumn; -use common_catalog::plan::InternalColumnType; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::types::DataType; -use common_expression::FieldIndex; -use common_expression::TableSchemaRef; -use common_expression::ROW_ID_COL_NAME; +use databend_common_ast::ast::Join; +use databend_common_ast::ast::JoinCondition; +use databend_common_ast::ast::JoinOperator; +use databend_common_ast::ast::JoinOperator::Inner; +use databend_common_ast::ast::JoinOperator::RightAnti; +use databend_common_ast::ast::JoinOperator::RightOuter; +use databend_common_ast::ast::MatchOperation; +use databend_common_ast::ast::MatchedClause; +use databend_common_ast::ast::MergeIntoStmt; +use databend_common_ast::ast::TableReference; +use databend_common_ast::ast::UnmatchedClause; +use databend_common_catalog::plan::InternalColumn; +use databend_common_catalog::plan::InternalColumnType; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::types::DataType; +use databend_common_expression::FieldIndex; +use databend_common_expression::TableSchemaRef; +use databend_common_expression::ROW_ID_COL_NAME; use indexmap::IndexMap; use parking_lot::RwLock; diff --git a/src/query/sql/src/planner/binder/presign.rs b/src/query/sql/src/planner/binder/presign.rs index bb7771ab6f93..73e9d954a4fe 100644 --- a/src/query/sql/src/planner/binder/presign.rs +++ b/src/query/sql/src/planner/binder/presign.rs @@ -12,10 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_ast::ast::PresignAction as AstPresignAction; -use common_ast::ast::PresignLocation; -use common_ast::ast::PresignStmt; -use common_exception::Result; +use databend_common_ast::ast::PresignAction as AstPresignAction; +use databend_common_ast::ast::PresignLocation; +use databend_common_ast::ast::PresignStmt; +use databend_common_exception::Result; use crate::binder::resolve_stage_location; use crate::binder::Binder; diff --git a/src/query/sql/src/planner/binder/project.rs b/src/query/sql/src/planner/binder/project.rs index 1f24648a8ab2..5c47110f1c5f 100644 --- a/src/query/sql/src/planner/binder/project.rs +++ b/src/query/sql/src/planner/binder/project.rs @@ -16,23 +16,23 @@ use std::collections::HashMap; use std::collections::HashSet; use std::sync::Arc; -use common_ast::ast::ColumnFilter; -use common_ast::ast::Expr; -use common_ast::ast::Identifier; -use common_ast::ast::Indirection; -use common_ast::ast::Literal; -use common_ast::ast::SelectTarget; -use common_ast::parser::parse_expr; -use common_ast::parser::tokenize_sql; -use common_ast::walk_expr_mut; -use common_ast::VisitorMut; -use common_exception::ErrorCode; -use common_exception::Result; -use common_exception::Span; -use common_expression::Column; -use common_expression::ConstantFolder; -use common_expression::Scalar; -use common_functions::BUILTIN_FUNCTIONS; +use databend_common_ast::ast::ColumnFilter; +use databend_common_ast::ast::Expr; +use databend_common_ast::ast::Identifier; +use databend_common_ast::ast::Indirection; +use databend_common_ast::ast::Literal; +use databend_common_ast::ast::SelectTarget; +use databend_common_ast::parser::parse_expr; +use databend_common_ast::parser::tokenize_sql; +use databend_common_ast::walk_expr_mut; +use databend_common_ast::VisitorMut; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_exception::Span; +use databend_common_expression::Column; +use databend_common_expression::ConstantFolder; +use databend_common_expression::Scalar; +use databend_common_functions::BUILTIN_FUNCTIONS; use itertools::Itertools; use super::AggregateInfo; @@ -487,7 +487,7 @@ impl Binder { ConstantFolder::fold(&expr, &self.ctx.get_function_context()?, &BUILTIN_FUNCTIONS); match new_expr { - common_expression::Expr::Constant { + databend_common_expression::Expr::Constant { scalar: Scalar::Array(Column::Boolean(bitmap)), .. } => { diff --git a/src/query/sql/src/planner/binder/project_set.rs b/src/query/sql/src/planner/binder/project_set.rs index 0d4d57c0f79e..36005fb75899 100644 --- a/src/query/sql/src/planner/binder/project_set.rs +++ b/src/query/sql/src/planner/binder/project_set.rs @@ -14,16 +14,16 @@ use std::sync::Arc; -use common_ast::ast::Expr; -use common_ast::ast::Identifier; -use common_ast::ast::Lambda; -use common_ast::ast::Literal; -use common_ast::ast::Window; -use common_ast::Visitor; -use common_exception::Result; -use common_exception::Span; -use common_expression::FunctionKind; -use common_functions::BUILTIN_FUNCTIONS; +use databend_common_ast::ast::Expr; +use databend_common_ast::ast::Identifier; +use databend_common_ast::ast::Lambda; +use databend_common_ast::ast::Literal; +use databend_common_ast::ast::Window; +use databend_common_ast::Visitor; +use databend_common_exception::Result; +use databend_common_exception::Span; +use databend_common_expression::FunctionKind; +use databend_common_functions::BUILTIN_FUNCTIONS; use crate::binder::ColumnBindingBuilder; use crate::binder::ExprContext; diff --git a/src/query/sql/src/planner/binder/qualify.rs b/src/query/sql/src/planner/binder/qualify.rs index 56977cc14f7a..2fbefcee8af2 100644 --- a/src/query/sql/src/planner/binder/qualify.rs +++ b/src/query/sql/src/planner/binder/qualify.rs @@ -14,9 +14,9 @@ use std::sync::Arc; -use common_ast::ast::Expr; -use common_exception::ErrorCode; -use common_exception::Result; +use databend_common_ast::ast::Expr; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; use super::Finder; use crate::binder::split_conjunctions; diff --git a/src/query/sql/src/planner/binder/replace.rs b/src/query/sql/src/planner/binder/replace.rs index 4a5444391b8b..53a6c882261b 100644 --- a/src/query/sql/src/planner/binder/replace.rs +++ b/src/query/sql/src/planner/binder/replace.rs @@ -15,13 +15,13 @@ use std::str::FromStr; use std::sync::Arc; -use common_ast::ast::InsertSource; -use common_ast::ast::ReplaceStmt; -use common_ast::ast::Statement; -use common_exception::ErrorCode; -use common_exception::Result; -use common_meta_app::principal::FileFormatOptionsAst; -use common_meta_app::principal::OnErrorMode; +use databend_common_ast::ast::InsertSource; +use databend_common_ast::ast::ReplaceStmt; +use databend_common_ast::ast::Statement; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_meta_app::principal::FileFormatOptionsAst; +use databend_common_meta_app::principal::OnErrorMode; use crate::binder::Binder; use crate::normalize_identifier; diff --git a/src/query/sql/src/planner/binder/scalar.rs b/src/query/sql/src/planner/binder/scalar.rs index aa4918c50edf..d55bab1732ef 100644 --- a/src/query/sql/src/planner/binder/scalar.rs +++ b/src/query/sql/src/planner/binder/scalar.rs @@ -15,17 +15,17 @@ use std::collections::HashMap; use std::sync::Arc; -use common_ast::ast::Expr; -use common_ast::parser::parse_expr; -use common_ast::parser::tokenize_sql; -use common_ast::Dialect; -use common_catalog::table_context::TableContext; -use common_exception::Result; -use common_expression::types::DataType; -use common_expression::DataField; -use common_expression::DataSchema; -use common_expression::FunctionContext; -use common_expression::Scalar; +use databend_common_ast::ast::Expr; +use databend_common_ast::parser::parse_expr; +use databend_common_ast::parser::tokenize_sql; +use databend_common_ast::Dialect; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::Result; +use databend_common_expression::types::DataType; +use databend_common_expression::DataField; +use databend_common_expression::DataSchema; +use databend_common_expression::FunctionContext; +use databend_common_expression::Scalar; use indexmap::IndexMap; use crate::binder::wrap_cast; @@ -102,7 +102,7 @@ impl<'a> ScalarBinder<'a> { &mut self, field: &DataField, schema: &DataSchema, - ) -> Result { + ) -> Result { if let Some(default_expr) = field.default_expr() { let tokens = tokenize_sql(default_expr)?; let ast = parse_expr(&tokens, self.dialect)?; @@ -116,7 +116,7 @@ impl<'a> ScalarBinder<'a> { } else { // If field data type is nullable, then we'll fill it with null. if field.data_type().is_nullable() { - let expr = common_expression::Expr::Constant { + let expr = databend_common_expression::Expr::Constant { span: None, scalar: Scalar::Null, data_type: field.data_type().clone(), @@ -125,7 +125,7 @@ impl<'a> ScalarBinder<'a> { } else { let data_type = field.data_type().clone(); let default_value = Scalar::default_value(&data_type); - let expr = common_expression::Expr::Constant { + let expr = databend_common_expression::Expr::Constant { span: None, scalar: default_value, data_type, diff --git a/src/query/sql/src/planner/binder/scalar_common.rs b/src/query/sql/src/planner/binder/scalar_common.rs index f017f4eb4407..695dc75f5c6b 100644 --- a/src/query/sql/src/planner/binder/scalar_common.rs +++ b/src/query/sql/src/planner/binder/scalar_common.rs @@ -14,9 +14,9 @@ use std::collections::HashSet; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::types::DataType; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::types::DataType; use crate::optimizer::RelationalProperty; use crate::plans::walk_expr; diff --git a/src/query/sql/src/planner/binder/select.rs b/src/query/sql/src/planner/binder/select.rs index 279364bf968a..abd5558f0196 100644 --- a/src/query/sql/src/planner/binder/select.rs +++ b/src/query/sql/src/planner/binder/select.rs @@ -17,32 +17,32 @@ use std::collections::HashSet; use std::sync::Arc; use async_recursion::async_recursion; -use common_ast::ast::BinaryOperator; -use common_ast::ast::ColumnID; -use common_ast::ast::ColumnPosition; -use common_ast::ast::Expr; -use common_ast::ast::Expr::Array; -use common_ast::ast::GroupBy; -use common_ast::ast::Identifier; -use common_ast::ast::Join; -use common_ast::ast::JoinCondition; -use common_ast::ast::JoinOperator; -use common_ast::ast::Literal; -use common_ast::ast::OrderByExpr; -use common_ast::ast::Query; -use common_ast::ast::SelectStmt; -use common_ast::ast::SelectTarget; -use common_ast::ast::SetExpr; -use common_ast::ast::SetOperator; -use common_ast::ast::TableReference; -use common_ast::Visitor; -use common_exception::ErrorCode; -use common_exception::Result; -use common_exception::Span; -use common_expression::type_check::common_super_type; -use common_expression::types::DataType; -use common_expression::ROW_ID_COL_NAME; -use common_functions::BUILTIN_FUNCTIONS; +use databend_common_ast::ast::BinaryOperator; +use databend_common_ast::ast::ColumnID; +use databend_common_ast::ast::ColumnPosition; +use databend_common_ast::ast::Expr; +use databend_common_ast::ast::Expr::Array; +use databend_common_ast::ast::GroupBy; +use databend_common_ast::ast::Identifier; +use databend_common_ast::ast::Join; +use databend_common_ast::ast::JoinCondition; +use databend_common_ast::ast::JoinOperator; +use databend_common_ast::ast::Literal; +use databend_common_ast::ast::OrderByExpr; +use databend_common_ast::ast::Query; +use databend_common_ast::ast::SelectStmt; +use databend_common_ast::ast::SelectTarget; +use databend_common_ast::ast::SetExpr; +use databend_common_ast::ast::SetOperator; +use databend_common_ast::ast::TableReference; +use databend_common_ast::Visitor; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_exception::Span; +use databend_common_expression::type_check::common_super_type; +use databend_common_expression::types::DataType; +use databend_common_expression::ROW_ID_COL_NAME; +use databend_common_functions::BUILTIN_FUNCTIONS; use log::warn; use super::sort::OrderItem; diff --git a/src/query/sql/src/planner/binder/setting.rs b/src/query/sql/src/planner/binder/setting.rs index 810d3ce190a7..d2a505b05944 100644 --- a/src/query/sql/src/planner/binder/setting.rs +++ b/src/query/sql/src/planner/binder/setting.rs @@ -12,15 +12,15 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_ast::ast::Expr; -use common_ast::ast::Identifier; -use common_ast::ast::UnSetSource; -use common_ast::ast::UnSetStmt; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::types::DataType; -use common_expression::ConstantFolder; -use common_functions::BUILTIN_FUNCTIONS; +use databend_common_ast::ast::Expr; +use databend_common_ast::ast::Identifier; +use databend_common_ast::ast::UnSetSource; +use databend_common_ast::ast::UnSetStmt; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::types::DataType; +use databend_common_expression::ConstantFolder; +use databend_common_functions::BUILTIN_FUNCTIONS; use super::wrap_cast; use super::BindContext; @@ -57,7 +57,7 @@ impl Binder { let (new_expr, _) = ConstantFolder::fold(&expr, &self.ctx.get_function_context()?, &BUILTIN_FUNCTIONS); match new_expr { - common_expression::Expr::Constant { scalar, .. } => { + databend_common_expression::Expr::Constant { scalar, .. } => { let value = String::from_utf8(scalar.into_string().unwrap())?; let vars = vec![VarValue { is_global, diff --git a/src/query/sql/src/planner/binder/show.rs b/src/query/sql/src/planner/binder/show.rs index 1adae26a64f0..f9bf2914b4fc 100644 --- a/src/query/sql/src/planner/binder/show.rs +++ b/src/query/sql/src/planner/binder/show.rs @@ -12,10 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_ast::ast::ShowLimit; -use common_ast::ast::ShowLocksStmt; -use common_ast::ast::ShowOptions; -use common_exception::Result; +use databend_common_ast::ast::ShowLimit; +use databend_common_ast::ast::ShowLocksStmt; +use databend_common_ast::ast::ShowOptions; +use databend_common_exception::Result; use log::debug; use crate::plans::Plan; diff --git a/src/query/sql/src/planner/binder/sort.rs b/src/query/sql/src/planner/binder/sort.rs index 39d4ac84a2af..2cad6dbdddc6 100644 --- a/src/query/sql/src/planner/binder/sort.rs +++ b/src/query/sql/src/planner/binder/sort.rs @@ -16,11 +16,11 @@ use std::collections::hash_map::Entry; use std::collections::HashMap; use std::sync::Arc; -use common_ast::ast::Expr; -use common_ast::ast::Literal; -use common_ast::ast::OrderByExpr; -use common_exception::ErrorCode; -use common_exception::Result; +use databend_common_ast::ast::Expr; +use databend_common_ast::ast::Literal; +use databend_common_ast::ast::OrderByExpr; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; use super::ExprContext; use crate::binder::aggregate::AggregateRewriter; diff --git a/src/query/sql/src/planner/binder/stage.rs b/src/query/sql/src/planner/binder/stage.rs index 80e6f5479d0d..48723db691de 100644 --- a/src/query/sql/src/planner/binder/stage.rs +++ b/src/query/sql/src/planner/binder/stage.rs @@ -15,19 +15,19 @@ use std::collections::HashMap; use std::sync::Arc; -use common_ast::ast::Expr as AExpr; -use common_catalog::table_context::TableContext; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::types::DataType; -use common_expression::types::NumberDataType; -use common_expression::types::NumberScalar; -use common_expression::BlockEntry; -use common_expression::DataBlock; -use common_expression::DataSchemaRef; -use common_expression::Scalar; -use common_expression::Value; -use common_pipeline_transforms::processors::Transform; +use databend_common_ast::ast::Expr as AExpr; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::types::DataType; +use databend_common_expression::types::NumberDataType; +use databend_common_expression::types::NumberScalar; +use databend_common_expression::BlockEntry; +use databend_common_expression::DataBlock; +use databend_common_expression::DataSchemaRef; +use databend_common_expression::Scalar; +use databend_common_expression::Value; +use databend_common_pipeline_transforms::processors::Transform; use indexmap::IndexMap; use crate::binder::wrap_cast_scalar; diff --git a/src/query/sql/src/planner/binder/stream_column_factory.rs b/src/query/sql/src/planner/binder/stream_column_factory.rs index b9418351dd6b..77f10a4480f4 100644 --- a/src/query/sql/src/planner/binder/stream_column_factory.rs +++ b/src/query/sql/src/planner/binder/stream_column_factory.rs @@ -14,12 +14,12 @@ use std::collections::BTreeMap; -use common_catalog::plan::StreamColumn; -use common_catalog::plan::StreamColumnType; -use common_expression::ORIGIN_BLOCK_ID_COL_NAME; -use common_expression::ORIGIN_BLOCK_ROW_NUM_COL_NAME; -use common_expression::ORIGIN_VERSION_COL_NAME; use ctor::ctor; +use databend_common_catalog::plan::StreamColumn; +use databend_common_catalog::plan::StreamColumnType; +use databend_common_expression::ORIGIN_BLOCK_ID_COL_NAME; +use databend_common_expression::ORIGIN_BLOCK_ROW_NUM_COL_NAME; +use databend_common_expression::ORIGIN_VERSION_COL_NAME; #[ctor] pub static STREAM_COLUMN_FACTORY: StreamColumnFactory = StreamColumnFactory::init(); diff --git a/src/query/sql/src/planner/binder/table.rs b/src/query/sql/src/planner/binder/table.rs index 02f20835b30c..bc56357f61d1 100644 --- a/src/query/sql/src/planner/binder/table.rs +++ b/src/query/sql/src/planner/binder/table.rs @@ -22,69 +22,69 @@ use std::sync::Arc; use async_recursion::async_recursion; use chrono::TimeZone; use chrono::Utc; -use common_ast::ast::Connection; -use common_ast::ast::Expr; -use common_ast::ast::FileLocation; -use common_ast::ast::Identifier; -use common_ast::ast::Indirection; -use common_ast::ast::Join; -use common_ast::ast::Literal; -use common_ast::ast::Query; -use common_ast::ast::SelectStageOptions; -use common_ast::ast::SelectStmt; -use common_ast::ast::SelectTarget; -use common_ast::ast::Statement; -use common_ast::ast::TableAlias; -use common_ast::ast::TableReference; -use common_ast::ast::TimeTravelPoint; -use common_ast::ast::UriLocation; -use common_ast::parser::parse_sql; -use common_ast::parser::tokenize_sql; -use common_catalog::catalog_kind::CATALOG_DEFAULT; -use common_catalog::plan::ParquetReadOptions; -use common_catalog::plan::StageTableInfo; -use common_catalog::statistics::BasicColumnStatistics; -use common_catalog::table::NavigationPoint; -use common_catalog::table::Table; -use common_catalog::table_args::TableArgs; -use common_catalog::table_context::TableContext; -use common_catalog::table_function::TableFunction; -use common_exception::ErrorCode; -use common_exception::Result; -use common_exception::Span; -use common_expression::is_stream_column; -use common_expression::types::DataType; -use common_expression::types::NumberScalar; -use common_expression::ColumnId; -use common_expression::ConstantFolder; -use common_expression::DataField; -use common_expression::FunctionKind; -use common_expression::Scalar; -use common_expression::TableDataType; -use common_expression::TableField; -use common_expression::TableSchema; -use common_expression::BASE_BLOCK_IDS_COL_NAME; -use common_expression::ORIGIN_BLOCK_ID_COL_NAME; -use common_expression::ORIGIN_VERSION_COL_NAME; -use common_functions::BUILTIN_FUNCTIONS; -use common_meta_app::principal::FileFormatParams; -use common_meta_app::principal::StageFileFormatType; -use common_meta_app::principal::StageInfo; -use common_meta_app::schema::IndexMeta; -use common_meta_app::schema::ListIndexesReq; -use common_meta_types::MetaId; -use common_storage::DataOperator; -use common_storage::StageFileInfo; -use common_storage::StageFilesInfo; -use common_storages_parquet::Parquet2Table; -use common_storages_parquet::ParquetRSTable; -use common_storages_result_cache::ResultCacheMetaManager; -use common_storages_result_cache::ResultCacheReader; -use common_storages_result_cache::ResultScan; -use common_storages_stage::StageTable; -use common_storages_view::view_table::QUERY; -use common_users::UserApiProvider; use dashmap::DashMap; +use databend_common_ast::ast::Connection; +use databend_common_ast::ast::Expr; +use databend_common_ast::ast::FileLocation; +use databend_common_ast::ast::Identifier; +use databend_common_ast::ast::Indirection; +use databend_common_ast::ast::Join; +use databend_common_ast::ast::Literal; +use databend_common_ast::ast::Query; +use databend_common_ast::ast::SelectStageOptions; +use databend_common_ast::ast::SelectStmt; +use databend_common_ast::ast::SelectTarget; +use databend_common_ast::ast::Statement; +use databend_common_ast::ast::TableAlias; +use databend_common_ast::ast::TableReference; +use databend_common_ast::ast::TimeTravelPoint; +use databend_common_ast::ast::UriLocation; +use databend_common_ast::parser::parse_sql; +use databend_common_ast::parser::tokenize_sql; +use databend_common_catalog::catalog_kind::CATALOG_DEFAULT; +use databend_common_catalog::plan::ParquetReadOptions; +use databend_common_catalog::plan::StageTableInfo; +use databend_common_catalog::statistics::BasicColumnStatistics; +use databend_common_catalog::table::NavigationPoint; +use databend_common_catalog::table::Table; +use databend_common_catalog::table_args::TableArgs; +use databend_common_catalog::table_context::TableContext; +use databend_common_catalog::table_function::TableFunction; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_exception::Span; +use databend_common_expression::is_stream_column; +use databend_common_expression::types::DataType; +use databend_common_expression::types::NumberScalar; +use databend_common_expression::ColumnId; +use databend_common_expression::ConstantFolder; +use databend_common_expression::DataField; +use databend_common_expression::FunctionKind; +use databend_common_expression::Scalar; +use databend_common_expression::TableDataType; +use databend_common_expression::TableField; +use databend_common_expression::TableSchema; +use databend_common_expression::BASE_BLOCK_IDS_COL_NAME; +use databend_common_expression::ORIGIN_BLOCK_ID_COL_NAME; +use databend_common_expression::ORIGIN_VERSION_COL_NAME; +use databend_common_functions::BUILTIN_FUNCTIONS; +use databend_common_meta_app::principal::FileFormatParams; +use databend_common_meta_app::principal::StageFileFormatType; +use databend_common_meta_app::principal::StageInfo; +use databend_common_meta_app::schema::IndexMeta; +use databend_common_meta_app::schema::ListIndexesReq; +use databend_common_meta_types::MetaId; +use databend_common_storage::DataOperator; +use databend_common_storage::StageFileInfo; +use databend_common_storage::StageFilesInfo; +use databend_common_storages_parquet::Parquet2Table; +use databend_common_storages_parquet::ParquetRSTable; +use databend_common_storages_result_cache::ResultCacheMetaManager; +use databend_common_storages_result_cache::ResultCacheReader; +use databend_common_storages_result_cache::ResultScan; +use databend_common_storages_stage::StageTable; +use databend_common_storages_view::view_table::QUERY; +use databend_common_users::UserApiProvider; use log::info; use parking_lot::RwLock; @@ -553,10 +553,10 @@ impl Binder { hints: None, distinct: false, select_list: vec![SelectTarget::AliasedExpr { - expr: Box::new(common_ast::ast::Expr::FunctionCall { + expr: Box::new(databend_common_ast::ast::Expr::FunctionCall { span: *span, distinct: false, - name: common_ast::ast::Identifier { + name: databend_common_ast::ast::Identifier { span: *span, name: func_name.name.clone(), quote: None, @@ -1439,7 +1439,7 @@ impl Binder { ); match new_expr { - common_expression::Expr::Constant { + databend_common_expression::Expr::Constant { scalar, data_type: DataType::Timestamp, .. diff --git a/src/query/sql/src/planner/binder/table_args.rs b/src/query/sql/src/planner/binder/table_args.rs index 032faeb87bc9..bd2de3d344b0 100644 --- a/src/query/sql/src/planner/binder/table_args.rs +++ b/src/query/sql/src/planner/binder/table_args.rs @@ -14,13 +14,13 @@ use std::collections::HashMap; -use common_ast::ast::Expr; -use common_catalog::table_args::TableArgs; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::ConstantFolder; -use common_expression::Scalar; -use common_functions::BUILTIN_FUNCTIONS; +use databend_common_ast::ast::Expr; +use databend_common_catalog::table_args::TableArgs; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::ConstantFolder; +use databend_common_expression::Scalar; +use databend_common_functions::BUILTIN_FUNCTIONS; use crate::plans::ConstantExpr; use crate::ScalarBinder; @@ -49,7 +49,7 @@ pub async fn bind_table_args( let (expr, _) = ConstantFolder::fold(&expr, &scalar_binder.get_func_ctx()?, &BUILTIN_FUNCTIONS); match expr { - common_expression::Expr::Constant { scalar, .. } => Ok(scalar), + databend_common_expression::Expr::Constant { scalar, .. } => Ok(scalar), _ => Err(ErrorCode::Unimplemented(format!( "Unsupported table argument type: {:?}", scalar diff --git a/src/query/sql/src/planner/binder/udf.rs b/src/query/sql/src/planner/binder/udf.rs index 1476ba49f008..544a8460479f 100644 --- a/src/query/sql/src/planner/binder/udf.rs +++ b/src/query/sql/src/planner/binder/udf.rs @@ -12,19 +12,19 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_ast::ast::AlterUDFStmt; -use common_ast::ast::CreateUDFStmt; -use common_ast::ast::Identifier; -use common_ast::ast::UDFDefinition; -use common_config::GlobalConfig; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::types::DataType; -use common_expression::udf_client::UDFFlightClient; -use common_meta_app::principal::LambdaUDF; -use common_meta_app::principal::UDFDefinition as PlanUDFDefinition; -use common_meta_app::principal::UDFServer; -use common_meta_app::principal::UserDefinedFunction; +use databend_common_ast::ast::AlterUDFStmt; +use databend_common_ast::ast::CreateUDFStmt; +use databend_common_ast::ast::Identifier; +use databend_common_ast::ast::UDFDefinition; +use databend_common_config::GlobalConfig; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::types::DataType; +use databend_common_expression::udf_client::UDFFlightClient; +use databend_common_meta_app::principal::LambdaUDF; +use databend_common_meta_app::principal::UDFDefinition as PlanUDFDefinition; +use databend_common_meta_app::principal::UDFServer; +use databend_common_meta_app::principal::UserDefinedFunction; use crate::planner::resolve_type_name; use crate::planner::udf_validator::UDFValidator; diff --git a/src/query/sql/src/planner/binder/update.rs b/src/query/sql/src/planner/binder/update.rs index 674cb4411572..e1aae25d6739 100644 --- a/src/query/sql/src/planner/binder/update.rs +++ b/src/query/sql/src/planner/binder/update.rs @@ -14,10 +14,10 @@ use std::collections::HashMap; -use common_ast::ast::TableReference; -use common_ast::ast::UpdateStmt; -use common_exception::ErrorCode; -use common_exception::Result; +use databend_common_ast::ast::TableReference; +use databend_common_ast::ast::UpdateStmt; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; use crate::binder::Binder; use crate::binder::ScalarBinder; diff --git a/src/query/sql/src/planner/binder/values.rs b/src/query/sql/src/planner/binder/values.rs index a3bd69b86185..0c4785336a4b 100644 --- a/src/query/sql/src/planner/binder/values.rs +++ b/src/query/sql/src/planner/binder/values.rs @@ -15,20 +15,20 @@ use std::collections::HashMap; use std::sync::Arc; -use common_ast::ast::Expr as AExpr; -use common_catalog::table_context::TableContext; -use common_exception::ErrorCode; -use common_exception::Result; -use common_exception::Span; -use common_expression::type_check::common_super_type; -use common_expression::types::DataType; -use common_expression::ColumnBuilder; -use common_expression::DataBlock; -use common_expression::DataField; -use common_expression::DataSchema; -use common_expression::DataSchemaRefExt; -use common_expression::Evaluator; -use common_functions::BUILTIN_FUNCTIONS; +use databend_common_ast::ast::Expr as AExpr; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_exception::Span; +use databend_common_expression::type_check::common_super_type; +use databend_common_expression::types::DataType; +use databend_common_expression::ColumnBuilder; +use databend_common_expression::DataBlock; +use databend_common_expression::DataField; +use databend_common_expression::DataSchema; +use databend_common_expression::DataSchemaRefExt; +use databend_common_expression::Evaluator; +use databend_common_functions::BUILTIN_FUNCTIONS; use indexmap::IndexMap; use crate::binder::wrap_cast_scalar; diff --git a/src/query/sql/src/planner/binder/window.rs b/src/query/sql/src/planner/binder/window.rs index 088596c5d4d8..304de507fc27 100644 --- a/src/query/sql/src/planner/binder/window.rs +++ b/src/query/sql/src/planner/binder/window.rs @@ -15,11 +15,11 @@ use std::collections::HashMap; use std::sync::Arc; -use common_ast::ast::WindowDefinition; -use common_ast::ast::WindowSpec; -use common_exception::ErrorCode; -use common_exception::Result; -use common_exception::Span; +use databend_common_ast::ast::WindowDefinition; +use databend_common_ast::ast::WindowSpec; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_exception::Span; use super::select::SelectList; use crate::binder::ColumnBinding; diff --git a/src/query/sql/src/planner/bloom_index.rs b/src/query/sql/src/planner/bloom_index.rs index 129d3525d303..1046e1c304ec 100644 --- a/src/query/sql/src/planner/bloom_index.rs +++ b/src/query/sql/src/planner/bloom_index.rs @@ -15,18 +15,18 @@ use std::collections::BTreeMap; use std::str::FromStr; -use common_ast::parser::parse_comma_separated_idents; -use common_ast::parser::tokenize_sql; -use common_ast::Dialect; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::is_stream_column_id; -use common_expression::ComputedExpr; -use common_expression::FieldIndex; -use common_expression::TableDataType; -use common_expression::TableField; -use common_expression::TableSchemaRef; -use common_settings::Settings; +use databend_common_ast::parser::parse_comma_separated_idents; +use databend_common_ast::parser::tokenize_sql; +use databend_common_ast::Dialect; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::is_stream_column_id; +use databend_common_expression::ComputedExpr; +use databend_common_expression::FieldIndex; +use databend_common_expression::TableDataType; +use databend_common_expression::TableField; +use databend_common_expression::TableSchemaRef; +use databend_common_settings::Settings; use crate::normalize_identifier; use crate::planner::semantic::NameResolutionContext; diff --git a/src/query/sql/src/planner/dataframe.rs b/src/query/sql/src/planner/dataframe.rs index ac64dd92225e..71dc908b9ebe 100644 --- a/src/query/sql/src/planner/dataframe.rs +++ b/src/query/sql/src/planner/dataframe.rs @@ -14,23 +14,23 @@ use std::sync::Arc; -use common_ast::ast::ColumnID; -use common_ast::ast::Expr; -use common_ast::ast::GroupBy; -use common_ast::ast::Identifier; -use common_ast::ast::Join; -use common_ast::ast::JoinCondition; -use common_ast::ast::JoinOperator; -use common_ast::ast::OrderByExpr; -use common_ast::ast::SelectTarget; -use common_ast::ast::TableReference; -use common_catalog::catalog::CatalogManager; -use common_catalog::catalog::CATALOG_DEFAULT; -use common_catalog::table::Table; -use common_catalog::table_context::TableContext; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::DataSchemaRef; +use databend_common_ast::ast::ColumnID; +use databend_common_ast::ast::Expr; +use databend_common_ast::ast::GroupBy; +use databend_common_ast::ast::Identifier; +use databend_common_ast::ast::Join; +use databend_common_ast::ast::JoinCondition; +use databend_common_ast::ast::JoinOperator; +use databend_common_ast::ast::OrderByExpr; +use databend_common_ast::ast::SelectTarget; +use databend_common_ast::ast::TableReference; +use databend_common_catalog::catalog::CatalogManager; +use databend_common_catalog::catalog::CATALOG_DEFAULT; +use databend_common_catalog::table::Table; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::DataSchemaRef; use parking_lot::RwLock; use crate::optimizer::optimize; diff --git a/src/query/sql/src/planner/expression_parser.rs b/src/query/sql/src/planner/expression_parser.rs index 48d3c5b5efd9..eeeb6123e22b 100644 --- a/src/query/sql/src/planner/expression_parser.rs +++ b/src/query/sql/src/planner/expression_parser.rs @@ -14,35 +14,35 @@ use std::sync::Arc; -use common_ast::ast::Expr as AExpr; -use common_ast::parser::parse_comma_separated_exprs; -use common_ast::parser::tokenize_sql; -use common_ast::walk_expr_mut; -use common_base::base::tokio::runtime::Handle; -use common_base::base::tokio::task::block_in_place; -use common_catalog::catalog::CATALOG_DEFAULT; -use common_catalog::plan::Filters; -use common_catalog::table::Table; -use common_catalog::table_context::TableContext; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::infer_schema_type; -use common_expression::infer_table_schema; -use common_expression::type_check::check_function; -use common_expression::types::DataType; -use common_expression::ConstantFolder; -use common_expression::DataBlock; -use common_expression::DataSchemaRef; -use common_expression::Evaluator; -use common_expression::Expr; -use common_expression::FunctionContext; -use common_expression::RemoteExpr; -use common_expression::Scalar; -use common_expression::TableField; -use common_expression::TableSchemaRef; -use common_functions::BUILTIN_FUNCTIONS; -use common_meta_app::schema::TableInfo; -use common_settings::Settings; +use databend_common_ast::ast::Expr as AExpr; +use databend_common_ast::parser::parse_comma_separated_exprs; +use databend_common_ast::parser::tokenize_sql; +use databend_common_ast::walk_expr_mut; +use databend_common_base::base::tokio::runtime::Handle; +use databend_common_base::base::tokio::task::block_in_place; +use databend_common_catalog::catalog::CATALOG_DEFAULT; +use databend_common_catalog::plan::Filters; +use databend_common_catalog::table::Table; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::infer_schema_type; +use databend_common_expression::infer_table_schema; +use databend_common_expression::type_check::check_function; +use databend_common_expression::types::DataType; +use databend_common_expression::ConstantFolder; +use databend_common_expression::DataBlock; +use databend_common_expression::DataSchemaRef; +use databend_common_expression::Evaluator; +use databend_common_expression::Expr; +use databend_common_expression::FunctionContext; +use databend_common_expression::RemoteExpr; +use databend_common_expression::Scalar; +use databend_common_expression::TableField; +use databend_common_expression::TableSchemaRef; +use databend_common_functions::BUILTIN_FUNCTIONS; +use databend_common_meta_app::schema::TableInfo; +use databend_common_settings::Settings; use parking_lot::RwLock; use crate::binder::ColumnBindingBuilder; @@ -409,7 +409,7 @@ impl Table for DummyTable { self } - fn get_table_info(&self) -> &common_meta_app::schema::TableInfo { + fn get_table_info(&self) -> &databend_common_meta_app::schema::TableInfo { &self.info } } @@ -439,8 +439,8 @@ pub fn field_default_value(ctx: Arc, field: &TableField) -> Re let result = evaluator.run(&expr)?; match result { - common_expression::Value::Scalar(s) => Ok(s), - common_expression::Value::Column(c) if c.len() == 1 => { + databend_common_expression::Value::Scalar(s) => Ok(s), + databend_common_expression::Value::Column(c) if c.len() == 1 => { let value = unsafe { c.index_unchecked(0) }; Ok(value.to_owned()) } diff --git a/src/query/sql/src/planner/format/display_plan.rs b/src/query/sql/src/planner/format/display_plan.rs index 28493a9069ce..4618bc929f84 100644 --- a/src/query/sql/src/planner/format/display_plan.rs +++ b/src/query/sql/src/planner/format/display_plan.rs @@ -14,12 +14,12 @@ use std::sync::Arc; -use common_ast::ast::FormatTreeNode; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::types::DataType; -use common_expression::types::NumberDataType; -use common_expression::ROW_ID_COL_NAME; +use databend_common_ast::ast::FormatTreeNode; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::types::DataType; +use databend_common_expression::types::NumberDataType; +use databend_common_expression::ROW_ID_COL_NAME; use itertools::Itertools; use crate::binder::ColumnBindingBuilder; diff --git a/src/query/sql/src/planner/format/display_rel_operator.rs b/src/query/sql/src/planner/format/display_rel_operator.rs index 47a0ae1ebec4..4c2cfe57fa6f 100644 --- a/src/query/sql/src/planner/format/display_rel_operator.rs +++ b/src/query/sql/src/planner/format/display_rel_operator.rs @@ -14,7 +14,7 @@ use std::fmt::Display; -use common_ast::ast::FormatTreeNode; +use databend_common_ast::ast::FormatTreeNode; use itertools::Itertools; use crate::optimizer::SExpr; diff --git a/src/query/sql/src/planner/metadata.rs b/src/query/sql/src/planner/metadata.rs index 62fabbafd35c..95ef86ab7ac9 100644 --- a/src/query/sql/src/planner/metadata.rs +++ b/src/query/sql/src/planner/metadata.rs @@ -19,15 +19,15 @@ use std::fmt::Formatter; use std::sync::Arc; use ahash::HashMap; -use common_ast::ast::Expr; -use common_ast::ast::Literal; -use common_catalog::plan::InternalColumn; -use common_catalog::table::Table; -use common_expression::types::DataType; -use common_expression::ComputedExpr; -use common_expression::Scalar; -use common_expression::TableDataType; -use common_expression::TableField; +use databend_common_ast::ast::Expr; +use databend_common_ast::ast::Literal; +use databend_common_catalog::plan::InternalColumn; +use databend_common_catalog::table::Table; +use databend_common_expression::types::DataType; +use databend_common_expression::ComputedExpr; +use databend_common_expression::Scalar; +use databend_common_expression::TableDataType; +use databend_common_expression::TableField; use parking_lot::RwLock; use crate::optimizer::SExpr; diff --git a/src/query/sql/src/planner/optimizer/cascades/cascade.rs b/src/query/sql/src/planner/optimizer/cascades/cascade.rs index 762d622f788a..38843605372e 100644 --- a/src/query/sql/src/planner/optimizer/cascades/cascade.rs +++ b/src/query/sql/src/planner/optimizer/cascades/cascade.rs @@ -15,9 +15,9 @@ use std::collections::HashMap; use std::sync::Arc; -use common_catalog::table_context::TableContext; -use common_exception::ErrorCode; -use common_exception::Result; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; use log::debug; use log::info; diff --git a/src/query/sql/src/planner/optimizer/cascades/scheduler.rs b/src/query/sql/src/planner/optimizer/cascades/scheduler.rs index 8ff063743181..bd478e6f9231 100644 --- a/src/query/sql/src/planner/optimizer/cascades/scheduler.rs +++ b/src/query/sql/src/planner/optimizer/cascades/scheduler.rs @@ -14,7 +14,7 @@ use std::collections::VecDeque; -use common_exception::Result; +use databend_common_exception::Result; use log::debug; use super::tasks::Task; diff --git a/src/query/sql/src/planner/optimizer/cascades/tasks/apply_rule.rs b/src/query/sql/src/planner/optimizer/cascades/tasks/apply_rule.rs index 833f4a92c000..5f7641c969db 100644 --- a/src/query/sql/src/planner/optimizer/cascades/tasks/apply_rule.rs +++ b/src/query/sql/src/planner/optimizer/cascades/tasks/apply_rule.rs @@ -15,8 +15,8 @@ use std::rc::Rc; use std::sync::Arc; -use common_catalog::table_context::TableContext; -use common_exception::Result; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::Result; use educe::Educe; use crate::optimizer::cascades::tasks::SharedCounter; diff --git a/src/query/sql/src/planner/optimizer/cascades/tasks/explore_expr.rs b/src/query/sql/src/planner/optimizer/cascades/tasks/explore_expr.rs index 8a18b23ca773..62a0ade0448a 100644 --- a/src/query/sql/src/planner/optimizer/cascades/tasks/explore_expr.rs +++ b/src/query/sql/src/planner/optimizer/cascades/tasks/explore_expr.rs @@ -15,8 +15,8 @@ use std::rc::Rc; use std::sync::Arc; -use common_catalog::table_context::TableContext; -use common_exception::Result; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::Result; use educe::Educe; use super::apply_rule::ApplyRuleTask; diff --git a/src/query/sql/src/planner/optimizer/cascades/tasks/explore_group.rs b/src/query/sql/src/planner/optimizer/cascades/tasks/explore_group.rs index d4f0f264c624..31da6a1ee0c0 100644 --- a/src/query/sql/src/planner/optimizer/cascades/tasks/explore_group.rs +++ b/src/query/sql/src/planner/optimizer/cascades/tasks/explore_group.rs @@ -15,8 +15,8 @@ use std::rc::Rc; use std::sync::Arc; -use common_catalog::table_context::TableContext; -use common_exception::Result; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::Result; use educe::Educe; use super::explore_expr::ExploreExprTask; diff --git a/src/query/sql/src/planner/optimizer/cascades/tasks/mod.rs b/src/query/sql/src/planner/optimizer/cascades/tasks/mod.rs index 29c2b7d3fb21..851577810be3 100644 --- a/src/query/sql/src/planner/optimizer/cascades/tasks/mod.rs +++ b/src/query/sql/src/planner/optimizer/cascades/tasks/mod.rs @@ -14,7 +14,7 @@ use std::cell::RefCell; -use common_exception::Result; +use databend_common_exception::Result; pub use self::apply_rule::ApplyRuleTask; pub use self::explore_expr::ExploreExprTask; diff --git a/src/query/sql/src/planner/optimizer/cascades/tasks/optimize_expr.rs b/src/query/sql/src/planner/optimizer/cascades/tasks/optimize_expr.rs index 8b2404a0002f..9945a12be223 100644 --- a/src/query/sql/src/planner/optimizer/cascades/tasks/optimize_expr.rs +++ b/src/query/sql/src/planner/optimizer/cascades/tasks/optimize_expr.rs @@ -16,9 +16,9 @@ use std::collections::hash_map::Entry; use std::rc::Rc; use std::sync::Arc; -use common_catalog::table_context::TableContext; -use common_exception::ErrorCode; -use common_exception::Result; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; use educe::Educe; use super::optimize_group::OptimizeGroupTask; diff --git a/src/query/sql/src/planner/optimizer/cascades/tasks/optimize_group.rs b/src/query/sql/src/planner/optimizer/cascades/tasks/optimize_group.rs index fe6d717ab381..bfbe9cd672a0 100644 --- a/src/query/sql/src/planner/optimizer/cascades/tasks/optimize_group.rs +++ b/src/query/sql/src/planner/optimizer/cascades/tasks/optimize_group.rs @@ -15,8 +15,8 @@ use std::rc::Rc; use std::sync::Arc; -use common_catalog::table_context::TableContext; -use common_exception::Result; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::Result; use educe::Educe; use super::optimize_expr::OptimizeExprTask; diff --git a/src/query/sql/src/planner/optimizer/cost/cost.rs b/src/query/sql/src/planner/optimizer/cost/cost.rs index e98e07d3c695..8cc342e2e05d 100644 --- a/src/query/sql/src/planner/optimizer/cost/cost.rs +++ b/src/query/sql/src/planner/optimizer/cost/cost.rs @@ -15,7 +15,7 @@ use std::fmt::Display; use std::ops::Add; -use common_exception::Result; +use databend_common_exception::Result; use crate::optimizer::MExpr; use crate::optimizer::Memo; diff --git a/src/query/sql/src/planner/optimizer/cost/cost_model.rs b/src/query/sql/src/planner/optimizer/cost/cost_model.rs index 7795f8ccf230..9ab53ece9f2a 100644 --- a/src/query/sql/src/planner/optimizer/cost/cost_model.rs +++ b/src/query/sql/src/planner/optimizer/cost/cost_model.rs @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_exception::ErrorCode; -use common_exception::Result; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; use super::Cost; use super::CostModel; diff --git a/src/query/sql/src/planner/optimizer/decorrelate/decorrelate.rs b/src/query/sql/src/planner/optimizer/decorrelate/decorrelate.rs index 28b012c6df8f..bf5d319d4db3 100644 --- a/src/query/sql/src/planner/optimizer/decorrelate/decorrelate.rs +++ b/src/query/sql/src/planner/optimizer/decorrelate/decorrelate.rs @@ -15,9 +15,9 @@ use std::collections::HashSet; use std::sync::Arc; -use common_exception::Result; -use common_exception::Span; -use common_expression::types::DataType; +use databend_common_exception::Result; +use databend_common_exception::Span; +use databend_common_expression::types::DataType; use crate::binder::ColumnBindingBuilder; use crate::binder::JoinPredicate; diff --git a/src/query/sql/src/planner/optimizer/decorrelate/flatten_plan.rs b/src/query/sql/src/planner/optimizer/decorrelate/flatten_plan.rs index eec0e1975f1b..9a3058ff7105 100644 --- a/src/query/sql/src/planner/optimizer/decorrelate/flatten_plan.rs +++ b/src/query/sql/src/planner/optimizer/decorrelate/flatten_plan.rs @@ -16,9 +16,9 @@ use std::collections::HashMap; use std::collections::HashSet; use std::sync::Arc; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::types::DataType; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::types::DataType; use crate::binder::ColumnBindingBuilder; use crate::binder::Visibility; diff --git a/src/query/sql/src/planner/optimizer/decorrelate/flatten_scalar.rs b/src/query/sql/src/planner/optimizer/decorrelate/flatten_scalar.rs index 49a561b1958c..a54857d7aeb0 100644 --- a/src/query/sql/src/planner/optimizer/decorrelate/flatten_scalar.rs +++ b/src/query/sql/src/planner/optimizer/decorrelate/flatten_scalar.rs @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_exception::ErrorCode; -use common_exception::Result; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; use crate::binder::ColumnBindingBuilder; use crate::optimizer::ColumnSet; diff --git a/src/query/sql/src/planner/optimizer/decorrelate/subquery_rewriter.rs b/src/query/sql/src/planner/optimizer/decorrelate/subquery_rewriter.rs index 25955475ec14..1410e915f120 100644 --- a/src/query/sql/src/planner/optimizer/decorrelate/subquery_rewriter.rs +++ b/src/query/sql/src/planner/optimizer/decorrelate/subquery_rewriter.rs @@ -16,13 +16,13 @@ use std::collections::HashMap; use std::sync::Arc; use std::vec; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::types::DataType; -use common_expression::types::NumberDataType; -use common_expression::types::NumberScalar; -use common_expression::Scalar; -use common_functions::aggregates::AggregateCountFunction; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::types::DataType; +use databend_common_expression::types::NumberDataType; +use databend_common_expression::types::NumberScalar; +use databend_common_expression::Scalar; +use databend_common_functions::aggregates::AggregateCountFunction; use crate::binder::wrap_cast; use crate::binder::ColumnBindingBuilder; diff --git a/src/query/sql/src/planner/optimizer/distributed/distributed.rs b/src/query/sql/src/planner/optimizer/distributed/distributed.rs index 71aad2ce6519..e56ee310f2e8 100644 --- a/src/query/sql/src/planner/optimizer/distributed/distributed.rs +++ b/src/query/sql/src/planner/optimizer/distributed/distributed.rs @@ -14,8 +14,8 @@ use std::sync::Arc; -use common_catalog::table_context::TableContext; -use common_exception::Result; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::Result; use super::sort_and_limit::SortAndLimitPushDownOptimizer; use crate::optimizer::property::require_property; diff --git a/src/query/sql/src/planner/optimizer/distributed/distributed_merge.rs b/src/query/sql/src/planner/optimizer/distributed/distributed_merge.rs index 5fbb3537ea2e..d9dfdf91fd76 100644 --- a/src/query/sql/src/planner/optimizer/distributed/distributed_merge.rs +++ b/src/query/sql/src/planner/optimizer/distributed/distributed_merge.rs @@ -14,7 +14,7 @@ use std::sync::Arc; -use common_exception::Result; +use databend_common_exception::Result; use crate::optimizer::SExpr; use crate::plans::AddRowNumber; diff --git a/src/query/sql/src/planner/optimizer/distributed/sort_and_limit.rs b/src/query/sql/src/planner/optimizer/distributed/sort_and_limit.rs index 85181d806c77..25b6fe44005b 100644 --- a/src/query/sql/src/planner/optimizer/distributed/sort_and_limit.rs +++ b/src/query/sql/src/planner/optimizer/distributed/sort_and_limit.rs @@ -14,7 +14,7 @@ use std::sync::Arc; -use common_exception::Result; +use databend_common_exception::Result; use crate::optimizer::SExpr; use crate::plans::Exchange; diff --git a/src/query/sql/src/planner/optimizer/format.rs b/src/query/sql/src/planner/optimizer/format.rs index 394ac755060f..70f8cfd5b420 100644 --- a/src/query/sql/src/planner/optimizer/format.rs +++ b/src/query/sql/src/planner/optimizer/format.rs @@ -14,8 +14,8 @@ use std::collections::HashMap; -use common_ast::ast::FormatTreeNode; -use common_exception::Result; +use databend_common_ast::ast::FormatTreeNode; +use databend_common_exception::Result; use super::cost::CostContext; use crate::optimizer::group::Group; diff --git a/src/query/sql/src/planner/optimizer/group.rs b/src/query/sql/src/planner/optimizer/group.rs index 16f072c52d3e..34fc950c7ed7 100644 --- a/src/query/sql/src/planner/optimizer/group.rs +++ b/src/query/sql/src/planner/optimizer/group.rs @@ -14,8 +14,8 @@ use std::sync::Arc; -use common_exception::ErrorCode; -use common_exception::Result; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; use crate::optimizer::m_expr::MExpr; use crate::optimizer::property::RelationalProperty; diff --git a/src/query/sql/src/planner/optimizer/heuristic/heuristic.rs b/src/query/sql/src/planner/optimizer/heuristic/heuristic.rs index 484905ad8ce8..6cfcd015fdb9 100644 --- a/src/query/sql/src/planner/optimizer/heuristic/heuristic.rs +++ b/src/query/sql/src/planner/optimizer/heuristic/heuristic.rs @@ -15,8 +15,8 @@ use std::sync::Arc; use std::sync::LazyLock; -use common_exception::Result; -use common_expression::FunctionContext; +use databend_common_exception::Result; +use databend_common_expression::FunctionContext; use crate::optimizer::heuristic::decorrelate::decorrelate_subquery; use crate::optimizer::rule::TransformResult; diff --git a/src/query/sql/src/planner/optimizer/hyper_dp/dphyp.rs b/src/query/sql/src/planner/optimizer/hyper_dp/dphyp.rs index 5474155aa4dc..7837091d12c1 100644 --- a/src/query/sql/src/planner/optimizer/hyper_dp/dphyp.rs +++ b/src/query/sql/src/planner/optimizer/hyper_dp/dphyp.rs @@ -16,9 +16,9 @@ use std::collections::HashMap; use std::collections::HashSet; use std::sync::Arc; -use common_base::runtime::Thread; -use common_catalog::table_context::TableContext; -use common_exception::Result; +use databend_common_base::runtime::Thread; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::Result; use crate::optimizer::hyper_dp::join_node::JoinNode; use crate::optimizer::hyper_dp::join_relation::JoinRelation; diff --git a/src/query/sql/src/planner/optimizer/hyper_dp/join_node.rs b/src/query/sql/src/planner/optimizer/hyper_dp/join_node.rs index 4731fb5bdd95..191910e23275 100644 --- a/src/query/sql/src/planner/optimizer/hyper_dp/join_node.rs +++ b/src/query/sql/src/planner/optimizer/hyper_dp/join_node.rs @@ -14,7 +14,7 @@ use std::sync::Arc; -use common_exception::Result; +use databend_common_exception::Result; use crate::optimizer::hyper_dp::join_relation::JoinRelation; use crate::optimizer::RelExpr; diff --git a/src/query/sql/src/planner/optimizer/hyper_dp/join_relation.rs b/src/query/sql/src/planner/optimizer/hyper_dp/join_relation.rs index ea02e52909b0..37e4b9fd0921 100644 --- a/src/query/sql/src/planner/optimizer/hyper_dp/join_relation.rs +++ b/src/query/sql/src/planner/optimizer/hyper_dp/join_relation.rs @@ -15,7 +15,7 @@ use std::collections::HashSet; use ahash::HashMap; -use common_exception::Result; +use databend_common_exception::Result; use crate::optimizer::RelExpr; use crate::optimizer::SExpr; diff --git a/src/query/sql/src/planner/optimizer/hyper_dp/query_graph.rs b/src/query/sql/src/planner/optimizer/hyper_dp/query_graph.rs index 22563be6556d..66365c449fc0 100644 --- a/src/query/sql/src/planner/optimizer/hyper_dp/query_graph.rs +++ b/src/query/sql/src/planner/optimizer/hyper_dp/query_graph.rs @@ -15,7 +15,7 @@ use std::collections::HashMap; use std::collections::HashSet; -use common_exception::Result; +use databend_common_exception::Result; use crate::optimizer::hyper_dp::util::is_subset; use crate::IndexType; diff --git a/src/query/sql/src/planner/optimizer/m_expr.rs b/src/query/sql/src/planner/optimizer/m_expr.rs index 2a8b8479e3b6..aef0c94fc011 100644 --- a/src/query/sql/src/planner/optimizer/m_expr.rs +++ b/src/query/sql/src/planner/optimizer/m_expr.rs @@ -14,8 +14,8 @@ use std::sync::Arc; -use common_exception::ErrorCode; -use common_exception::Result; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; use super::group::Group; use crate::optimizer::memo::Memo; diff --git a/src/query/sql/src/planner/optimizer/memo.rs b/src/query/sql/src/planner/optimizer/memo.rs index b0da24c32583..a3e4942e7fec 100644 --- a/src/query/sql/src/planner/optimizer/memo.rs +++ b/src/query/sql/src/planner/optimizer/memo.rs @@ -15,8 +15,8 @@ use std::collections::HashMap; use std::sync::Arc; -use common_exception::ErrorCode; -use common_exception::Result; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; use super::group::GroupState; use super::RelExpr; diff --git a/src/query/sql/src/planner/optimizer/optimizer.rs b/src/query/sql/src/planner/optimizer/optimizer.rs index acdcc1e407ca..936d3f5bd763 100644 --- a/src/query/sql/src/planner/optimizer/optimizer.rs +++ b/src/query/sql/src/planner/optimizer/optimizer.rs @@ -15,10 +15,10 @@ use std::collections::HashMap; use std::sync::Arc; -use common_ast::ast::ExplainKind; -use common_catalog::table_context::TableContext; -use common_exception::ErrorCode; -use common_exception::Result; +use databend_common_ast::ast::ExplainKind; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; use educe::Educe; use log::info; diff --git a/src/query/sql/src/planner/optimizer/pattern_extractor.rs b/src/query/sql/src/planner/optimizer/pattern_extractor.rs index ac7636b42126..ea3d4b8b418e 100644 --- a/src/query/sql/src/planner/optimizer/pattern_extractor.rs +++ b/src/query/sql/src/planner/optimizer/pattern_extractor.rs @@ -14,8 +14,8 @@ use std::sync::Arc; -use common_exception::ErrorCode; -use common_exception::Result; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; use crate::optimizer::group::Group; use crate::optimizer::m_expr::MExpr; diff --git a/src/query/sql/src/planner/optimizer/property/builder.rs b/src/query/sql/src/planner/optimizer/property/builder.rs index a186b5e80246..a92e83066339 100644 --- a/src/query/sql/src/planner/optimizer/property/builder.rs +++ b/src/query/sql/src/planner/optimizer/property/builder.rs @@ -14,9 +14,9 @@ use std::sync::Arc; -use common_catalog::table_context::TableContext; -use common_exception::ErrorCode; -use common_exception::Result; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; use crate::optimizer::MExpr; use crate::optimizer::Memo; diff --git a/src/query/sql/src/planner/optimizer/property/column_stat.rs b/src/query/sql/src/planner/optimizer/property/column_stat.rs index ce13b8382c4a..95ea85863017 100644 --- a/src/query/sql/src/planner/optimizer/property/column_stat.rs +++ b/src/query/sql/src/planner/optimizer/property/column_stat.rs @@ -14,7 +14,7 @@ use std::collections::HashMap; -use common_storage::Datum; +use databend_common_storage::Datum; use crate::optimizer::property::histogram::Histogram; use crate::IndexType; diff --git a/src/query/sql/src/planner/optimizer/property/constraint.rs b/src/query/sql/src/planner/optimizer/property/constraint.rs index 456f7c751291..5eba241b847a 100644 --- a/src/query/sql/src/planner/optimizer/property/constraint.rs +++ b/src/query/sql/src/planner/optimizer/property/constraint.rs @@ -12,18 +12,18 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_constraint::mir::MirBinaryOperator; -use common_constraint::mir::MirConstant; -use common_constraint::mir::MirDataType; -use common_constraint::mir::MirExpr; -use common_constraint::mir::MirUnaryOperator; -use common_constraint::problem::variable_must_not_null; -use common_expression::cast_scalar; -use common_expression::types::DataType; -use common_expression::types::NumberDataType; -use common_expression::types::NumberScalar; -use common_expression::Scalar; -use common_functions::BUILTIN_FUNCTIONS; +use databend_common_constraint::mir::MirBinaryOperator; +use databend_common_constraint::mir::MirConstant; +use databend_common_constraint::mir::MirDataType; +use databend_common_constraint::mir::MirExpr; +use databend_common_constraint::mir::MirUnaryOperator; +use databend_common_constraint::problem::variable_must_not_null; +use databend_common_expression::cast_scalar; +use databend_common_expression::types::DataType; +use databend_common_expression::types::NumberDataType; +use databend_common_expression::types::NumberScalar; +use databend_common_expression::Scalar; +use databend_common_functions::BUILTIN_FUNCTIONS; use crate::plans::FunctionCall; use crate::IndexType; diff --git a/src/query/sql/src/planner/optimizer/property/enforcer.rs b/src/query/sql/src/planner/optimizer/property/enforcer.rs index 8f4beaf40fb7..03ae228797b7 100644 --- a/src/query/sql/src/planner/optimizer/property/enforcer.rs +++ b/src/query/sql/src/planner/optimizer/property/enforcer.rs @@ -14,8 +14,8 @@ use std::sync::Arc; -use common_catalog::table_context::TableContext; -use common_exception::Result; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::Result; use crate::optimizer::property::Distribution; use crate::optimizer::RelExpr; diff --git a/src/query/sql/src/planner/optimizer/property/histogram.rs b/src/query/sql/src/planner/optimizer/property/histogram.rs index fd46564ec88c..6167607a88e4 100644 --- a/src/query/sql/src/planner/optimizer/property/histogram.rs +++ b/src/query/sql/src/planner/optimizer/property/histogram.rs @@ -16,9 +16,9 @@ use std::cmp::Ordering; use std::fmt; use std::fmt::Debug; -use common_exception::Result; -use common_expression::arithmetics_type::ResultTypeOfUnary; -use common_storage::Datum; +use databend_common_exception::Result; +use databend_common_expression::arithmetics_type::ResultTypeOfUnary; +use databend_common_storage::Datum; pub const DEFAULT_HISTOGRAM_BUCKETS: usize = 100; diff --git a/src/query/sql/src/planner/optimizer/property/selectivity.rs b/src/query/sql/src/planner/optimizer/property/selectivity.rs index 1162a9c28a34..a9ad340ca3b6 100644 --- a/src/query/sql/src/planner/optimizer/property/selectivity.rs +++ b/src/query/sql/src/planner/optimizer/property/selectivity.rs @@ -16,13 +16,13 @@ use std::cmp::max; use std::cmp::Ordering; use std::collections::HashSet; -use common_exception::Result; -use common_expression::types::DataType; -use common_expression::types::NumberDataType; -use common_expression::types::NumberScalar; -use common_expression::Scalar; -use common_storage::Datum; -use common_storage::F64; +use databend_common_exception::Result; +use databend_common_expression::types::DataType; +use databend_common_expression::types::NumberDataType; +use databend_common_expression::types::NumberScalar; +use databend_common_expression::Scalar; +use databend_common_storage::Datum; +use databend_common_storage::F64; use crate::optimizer::histogram_from_ndv; use crate::optimizer::ColumnStat; diff --git a/src/query/sql/src/planner/optimizer/rule/factory.rs b/src/query/sql/src/planner/optimizer/rule/factory.rs index 105265596145..8a5b178f5584 100644 --- a/src/query/sql/src/planner/optimizer/rule/factory.rs +++ b/src/query/sql/src/planner/optimizer/rule/factory.rs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_exception::Result; +use databend_common_exception::Result; use super::rewrite::RuleCommuteJoin; use super::rewrite::RuleEliminateEvalScalar; diff --git a/src/query/sql/src/planner/optimizer/rule/rewrite/agg_index/query_rewrite.rs b/src/query/sql/src/planner/optimizer/rule/rewrite/agg_index/query_rewrite.rs index 87ba3707ac1a..2bfbbf3d56f0 100644 --- a/src/query/sql/src/planner/optimizer/rule/rewrite/agg_index/query_rewrite.rs +++ b/src/query/sql/src/planner/optimizer/rule/rewrite/agg_index/query_rewrite.rs @@ -16,13 +16,13 @@ use std::collections::HashMap; use std::collections::HashSet; use std::sync::Arc; -use common_exception::Result; -use common_expression::infer_schema_type; -use common_expression::types::DataType; -use common_expression::Scalar; -use common_expression::TableDataType; -use common_expression::TableField; -use common_expression::TableSchemaRefExt; +use databend_common_exception::Result; +use databend_common_expression::infer_schema_type; +use databend_common_expression::types::DataType; +use databend_common_expression::Scalar; +use databend_common_expression::TableDataType; +use databend_common_expression::TableField; +use databend_common_expression::TableSchemaRefExt; use itertools::Itertools; use log::info; diff --git a/src/query/sql/src/planner/optimizer/rule/rewrite/filter_join/derive_filter.rs b/src/query/sql/src/planner/optimizer/rule/rewrite/filter_join/derive_filter.rs index cad8c9a85227..b2d448218888 100644 --- a/src/query/sql/src/planner/optimizer/rule/rewrite/filter_join/derive_filter.rs +++ b/src/query/sql/src/planner/optimizer/rule/rewrite/filter_join/derive_filter.rs @@ -15,7 +15,7 @@ use std::collections::HashMap; use std::sync::Arc; -use common_exception::Result; +use databend_common_exception::Result; use crate::optimizer::SExpr; use crate::plans::walk_expr_mut; diff --git a/src/query/sql/src/planner/optimizer/rule/rewrite/filter_join/extract_or_predicates.rs b/src/query/sql/src/planner/optimizer/rule/rewrite/filter_join/extract_or_predicates.rs index 69518970f5ab..b2240ed43848 100644 --- a/src/query/sql/src/planner/optimizer/rule/rewrite/filter_join/extract_or_predicates.rs +++ b/src/query/sql/src/planner/optimizer/rule/rewrite/filter_join/extract_or_predicates.rs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_exception::Result; +use databend_common_exception::Result; use itertools::Itertools; use crate::optimizer::RelExpr; diff --git a/src/query/sql/src/planner/optimizer/rule/rewrite/filter_join/mark_join_to_semi_join.rs b/src/query/sql/src/planner/optimizer/rule/rewrite/filter_join/mark_join_to_semi_join.rs index da67ffcb7216..028e4455666b 100644 --- a/src/query/sql/src/planner/optimizer/rule/rewrite/filter_join/mark_join_to_semi_join.rs +++ b/src/query/sql/src/planner/optimizer/rule/rewrite/filter_join/mark_join_to_semi_join.rs @@ -14,7 +14,7 @@ use std::sync::Arc; -use common_exception::Result; +use databend_common_exception::Result; use crate::optimizer::SExpr; use crate::plans::Filter; diff --git a/src/query/sql/src/planner/optimizer/rule/rewrite/filter_join/outer_join_to_inner_join.rs b/src/query/sql/src/planner/optimizer/rule/rewrite/filter_join/outer_join_to_inner_join.rs index d3b90e68bebc..3c02c76cb946 100644 --- a/src/query/sql/src/planner/optimizer/rule/rewrite/filter_join/outer_join_to_inner_join.rs +++ b/src/query/sql/src/planner/optimizer/rule/rewrite/filter_join/outer_join_to_inner_join.rs @@ -15,7 +15,7 @@ #[cfg(feature = "z3-prove")] use std::sync::Arc; -use common_exception::Result; +use databend_common_exception::Result; use crate::optimizer::SExpr; use crate::plans::Join; diff --git a/src/query/sql/src/planner/optimizer/rule/rewrite/rule_commute_join.rs b/src/query/sql/src/planner/optimizer/rule/rewrite/rule_commute_join.rs index 89e8440b027d..aec744bd1ce6 100644 --- a/src/query/sql/src/planner/optimizer/rule/rewrite/rule_commute_join.rs +++ b/src/query/sql/src/planner/optimizer/rule/rewrite/rule_commute_join.rs @@ -14,7 +14,7 @@ use std::sync::Arc; -use common_exception::Result; +use databend_common_exception::Result; use crate::optimizer::rule::Rule; use crate::optimizer::rule::TransformResult; diff --git a/src/query/sql/src/planner/optimizer/rule/rewrite/rule_eliminate_eval_scalar.rs b/src/query/sql/src/planner/optimizer/rule/rewrite/rule_eliminate_eval_scalar.rs index 418a3b17d28c..95c89f07871a 100644 --- a/src/query/sql/src/planner/optimizer/rule/rewrite/rule_eliminate_eval_scalar.rs +++ b/src/query/sql/src/planner/optimizer/rule/rewrite/rule_eliminate_eval_scalar.rs @@ -14,7 +14,7 @@ use std::sync::Arc; -use common_exception::Result; +use databend_common_exception::Result; use crate::optimizer::rule::Rule; use crate::optimizer::rule::RuleID; diff --git a/src/query/sql/src/planner/optimizer/rule/rewrite/rule_eliminate_filter.rs b/src/query/sql/src/planner/optimizer/rule/rewrite/rule_eliminate_filter.rs index 51ba5d45587d..f6c562c7fbd5 100644 --- a/src/query/sql/src/planner/optimizer/rule/rewrite/rule_eliminate_filter.rs +++ b/src/query/sql/src/planner/optimizer/rule/rewrite/rule_eliminate_filter.rs @@ -14,7 +14,7 @@ use std::sync::Arc; -use common_exception::Result; +use databend_common_exception::Result; use itertools::Itertools; use crate::optimizer::rule::Rule; diff --git a/src/query/sql/src/planner/optimizer/rule/rewrite/rule_eliminate_sort.rs b/src/query/sql/src/planner/optimizer/rule/rewrite/rule_eliminate_sort.rs index b8a122521304..61b4b1bbaed3 100644 --- a/src/query/sql/src/planner/optimizer/rule/rewrite/rule_eliminate_sort.rs +++ b/src/query/sql/src/planner/optimizer/rule/rewrite/rule_eliminate_sort.rs @@ -14,7 +14,7 @@ use std::sync::Arc; -use common_exception::Result; +use databend_common_exception::Result; use crate::optimizer::rule::Rule; use crate::optimizer::rule::RuleID; diff --git a/src/query/sql/src/planner/optimizer/rule/rewrite/rule_fold_count_aggregate.rs b/src/query/sql/src/planner/optimizer/rule/rewrite/rule_fold_count_aggregate.rs index c3d50aac4f62..8874c0f6a478 100644 --- a/src/query/sql/src/planner/optimizer/rule/rewrite/rule_fold_count_aggregate.rs +++ b/src/query/sql/src/planner/optimizer/rule/rewrite/rule_fold_count_aggregate.rs @@ -14,9 +14,9 @@ use std::sync::Arc; -use common_exception::Result; -use common_expression::types::NumberScalar; -use common_expression::Scalar; +use databend_common_exception::Result; +use databend_common_expression::types::NumberScalar; +use databend_common_expression::Scalar; use crate::optimizer::rule::Rule; use crate::optimizer::rule::RuleID; diff --git a/src/query/sql/src/planner/optimizer/rule/rewrite/rule_infer_filter.rs b/src/query/sql/src/planner/optimizer/rule/rewrite/rule_infer_filter.rs index 7770d8d4c9a0..de60d5c79e9f 100644 --- a/src/query/sql/src/planner/optimizer/rule/rewrite/rule_infer_filter.rs +++ b/src/query/sql/src/planner/optimizer/rule/rewrite/rule_infer_filter.rs @@ -15,11 +15,11 @@ use std::collections::HashMap; use std::sync::Arc; -use common_exception::Result; -use common_expression::types::DataType; -use common_expression::types::NumberDataType; -use common_expression::types::NumberScalar; -use common_expression::Scalar; +use databend_common_exception::Result; +use databend_common_expression::types::DataType; +use databend_common_expression::types::NumberDataType; +use databend_common_expression::types::NumberScalar; +use databend_common_expression::Scalar; use ordered_float::OrderedFloat; use crate::optimizer::rule::constant::check_float_range; diff --git a/src/query/sql/src/planner/optimizer/rule/rewrite/rule_merge_eval_scalar.rs b/src/query/sql/src/planner/optimizer/rule/rewrite/rule_merge_eval_scalar.rs index 0c03c04843fe..b624b737d4fa 100644 --- a/src/query/sql/src/planner/optimizer/rule/rewrite/rule_merge_eval_scalar.rs +++ b/src/query/sql/src/planner/optimizer/rule/rewrite/rule_merge_eval_scalar.rs @@ -14,7 +14,7 @@ use std::sync::Arc; -use common_exception::Result; +use databend_common_exception::Result; use crate::optimizer::rule::Rule; use crate::optimizer::rule::RuleID; diff --git a/src/query/sql/src/planner/optimizer/rule/rewrite/rule_merge_filter.rs b/src/query/sql/src/planner/optimizer/rule/rewrite/rule_merge_filter.rs index 8e6d06017b39..57c816ea863f 100644 --- a/src/query/sql/src/planner/optimizer/rule/rewrite/rule_merge_filter.rs +++ b/src/query/sql/src/planner/optimizer/rule/rewrite/rule_merge_filter.rs @@ -14,7 +14,7 @@ use std::sync::Arc; -use common_exception::Result; +use databend_common_exception::Result; use crate::optimizer::rule::Rule; use crate::optimizer::rule::RuleID; diff --git a/src/query/sql/src/planner/optimizer/rule/rewrite/rule_normalize_aggregate.rs b/src/query/sql/src/planner/optimizer/rule/rewrite/rule_normalize_aggregate.rs index 3cbdfb5a3eea..1e7eaf08c4a8 100644 --- a/src/query/sql/src/planner/optimizer/rule/rewrite/rule_normalize_aggregate.rs +++ b/src/query/sql/src/planner/optimizer/rule/rewrite/rule_normalize_aggregate.rs @@ -14,7 +14,7 @@ use std::sync::Arc; -use common_exception::Result; +use databend_common_exception::Result; use crate::optimizer::rule::Rule; use crate::optimizer::rule::TransformResult; diff --git a/src/query/sql/src/planner/optimizer/rule/rewrite/rule_normalize_disjunctive_filter.rs b/src/query/sql/src/planner/optimizer/rule/rewrite/rule_normalize_disjunctive_filter.rs index 6ec4d5e0fd53..cddcf2c0a43c 100644 --- a/src/query/sql/src/planner/optimizer/rule/rewrite/rule_normalize_disjunctive_filter.rs +++ b/src/query/sql/src/planner/optimizer/rule/rewrite/rule_normalize_disjunctive_filter.rs @@ -14,8 +14,8 @@ use std::sync::Arc; -use common_exception::Result; -use common_expression::Scalar; +use databend_common_exception::Result; +use databend_common_expression::Scalar; use itertools::Itertools; use crate::binder::split_conjunctions; diff --git a/src/query/sql/src/planner/optimizer/rule/rewrite/rule_normalize_scalar.rs b/src/query/sql/src/planner/optimizer/rule/rewrite/rule_normalize_scalar.rs index 9e454fa55fbf..ec29f7d55715 100644 --- a/src/query/sql/src/planner/optimizer/rule/rewrite/rule_normalize_scalar.rs +++ b/src/query/sql/src/planner/optimizer/rule/rewrite/rule_normalize_scalar.rs @@ -14,8 +14,8 @@ use std::sync::Arc; -use common_exception::Result; -use common_expression::Scalar; +use databend_common_exception::Result; +use databend_common_expression::Scalar; use crate::optimizer::rule::constant::is_falsy; use crate::optimizer::rule::constant::is_true; diff --git a/src/query/sql/src/planner/optimizer/rule/rewrite/rule_push_down_filter_aggregate.rs b/src/query/sql/src/planner/optimizer/rule/rewrite/rule_push_down_filter_aggregate.rs index 81e19a61ef91..258805a70598 100644 --- a/src/query/sql/src/planner/optimizer/rule/rewrite/rule_push_down_filter_aggregate.rs +++ b/src/query/sql/src/planner/optimizer/rule/rewrite/rule_push_down_filter_aggregate.rs @@ -83,7 +83,11 @@ impl Rule for RulePushDownFilterAggregate { self.id } - fn apply(&self, s_expr: &SExpr, state: &mut TransformResult) -> common_exception::Result<()> { + fn apply( + &self, + s_expr: &SExpr, + state: &mut TransformResult, + ) -> databend_common_exception::Result<()> { let filter: Filter = s_expr.plan().clone().try_into()?; let aggregate_expr = s_expr.child(0)?; let aggregate: Aggregate = aggregate_expr.plan().clone().try_into()?; diff --git a/src/query/sql/src/planner/optimizer/rule/rewrite/rule_push_down_filter_eval_scalar.rs b/src/query/sql/src/planner/optimizer/rule/rewrite/rule_push_down_filter_eval_scalar.rs index 02086609152b..996ea5be590a 100644 --- a/src/query/sql/src/planner/optimizer/rule/rewrite/rule_push_down_filter_eval_scalar.rs +++ b/src/query/sql/src/planner/optimizer/rule/rewrite/rule_push_down_filter_eval_scalar.rs @@ -14,7 +14,7 @@ use std::sync::Arc; -use common_exception::Result; +use databend_common_exception::Result; use crate::optimizer::rule::Rule; use crate::optimizer::rule::RuleID; diff --git a/src/query/sql/src/planner/optimizer/rule/rewrite/rule_push_down_filter_join.rs b/src/query/sql/src/planner/optimizer/rule/rewrite/rule_push_down_filter_join.rs index ed0f63b49627..6b4b56b86893 100644 --- a/src/query/sql/src/planner/optimizer/rule/rewrite/rule_push_down_filter_join.rs +++ b/src/query/sql/src/planner/optimizer/rule/rewrite/rule_push_down_filter_join.rs @@ -14,7 +14,7 @@ use std::sync::Arc; -use common_exception::Result; +use databend_common_exception::Result; use crate::binder::JoinPredicate; use crate::optimizer::rule::constant::false_constant; diff --git a/src/query/sql/src/planner/optimizer/rule/rewrite/rule_push_down_filter_project_set.rs b/src/query/sql/src/planner/optimizer/rule/rewrite/rule_push_down_filter_project_set.rs index 055270e90691..8c492d73df96 100644 --- a/src/query/sql/src/planner/optimizer/rule/rewrite/rule_push_down_filter_project_set.rs +++ b/src/query/sql/src/planner/optimizer/rule/rewrite/rule_push_down_filter_project_set.rs @@ -14,7 +14,7 @@ use std::sync::Arc; -use common_exception::Result; +use databend_common_exception::Result; use crate::optimizer::rule::Rule; use crate::optimizer::rule::TransformResult; diff --git a/src/query/sql/src/planner/optimizer/rule/rewrite/rule_push_down_filter_scan.rs b/src/query/sql/src/planner/optimizer/rule/rewrite/rule_push_down_filter_scan.rs index ba3e12e0bd63..019697a1119c 100644 --- a/src/query/sql/src/planner/optimizer/rule/rewrite/rule_push_down_filter_scan.rs +++ b/src/query/sql/src/planner/optimizer/rule/rewrite/rule_push_down_filter_scan.rs @@ -14,7 +14,7 @@ use std::sync::Arc; -use common_exception::Result; +use databend_common_exception::Result; use crate::binder::ColumnBindingBuilder; use crate::optimizer::rule::Rule; diff --git a/src/query/sql/src/planner/optimizer/rule/rewrite/rule_push_down_filter_sort.rs b/src/query/sql/src/planner/optimizer/rule/rewrite/rule_push_down_filter_sort.rs index aa0fc506db34..b1e03e266b38 100644 --- a/src/query/sql/src/planner/optimizer/rule/rewrite/rule_push_down_filter_sort.rs +++ b/src/query/sql/src/planner/optimizer/rule/rewrite/rule_push_down_filter_sort.rs @@ -14,7 +14,7 @@ use std::sync::Arc; -use common_exception::Result; +use databend_common_exception::Result; use crate::optimizer::rule::Rule; use crate::optimizer::rule::TransformResult; diff --git a/src/query/sql/src/planner/optimizer/rule/rewrite/rule_push_down_filter_union.rs b/src/query/sql/src/planner/optimizer/rule/rewrite/rule_push_down_filter_union.rs index f90746b3f752..afccc3e11ad8 100644 --- a/src/query/sql/src/planner/optimizer/rule/rewrite/rule_push_down_filter_union.rs +++ b/src/query/sql/src/planner/optimizer/rule/rewrite/rule_push_down_filter_union.rs @@ -15,7 +15,7 @@ use std::sync::Arc; use ahash::HashMap; -use common_exception::Result; +use databend_common_exception::Result; use crate::binder::ColumnBindingBuilder; use crate::optimizer::rule::Rule; diff --git a/src/query/sql/src/planner/optimizer/rule/rewrite/rule_push_down_limit_aggregate.rs b/src/query/sql/src/planner/optimizer/rule/rewrite/rule_push_down_limit_aggregate.rs index bf674483c89e..7cb786c6378b 100644 --- a/src/query/sql/src/planner/optimizer/rule/rewrite/rule_push_down_limit_aggregate.rs +++ b/src/query/sql/src/planner/optimizer/rule/rewrite/rule_push_down_limit_aggregate.rs @@ -75,7 +75,11 @@ impl Rule for RulePushDownLimitAggregate { self.id } - fn apply(&self, s_expr: &SExpr, state: &mut TransformResult) -> common_exception::Result<()> { + fn apply( + &self, + s_expr: &SExpr, + state: &mut TransformResult, + ) -> databend_common_exception::Result<()> { let limit: Limit = s_expr.plan().clone().try_into()?; if let Some(mut count) = limit.limit { count += limit.offset; diff --git a/src/query/sql/src/planner/optimizer/rule/rewrite/rule_push_down_limit_expression.rs b/src/query/sql/src/planner/optimizer/rule/rewrite/rule_push_down_limit_expression.rs index 12e4247fec1e..9b53d386bd1a 100644 --- a/src/query/sql/src/planner/optimizer/rule/rewrite/rule_push_down_limit_expression.rs +++ b/src/query/sql/src/planner/optimizer/rule/rewrite/rule_push_down_limit_expression.rs @@ -73,7 +73,11 @@ impl Rule for RulePushDownLimitExpression { self.id } - fn apply(&self, s_expr: &SExpr, state: &mut TransformResult) -> common_exception::Result<()> { + fn apply( + &self, + s_expr: &SExpr, + state: &mut TransformResult, + ) -> databend_common_exception::Result<()> { let limit: Limit = s_expr.plan().clone().try_into()?; let eval_plan = s_expr.child(0)?; let eval_scalar: EvalScalar = eval_plan.plan().clone().try_into()?; diff --git a/src/query/sql/src/planner/optimizer/rule/rewrite/rule_push_down_limit_join.rs b/src/query/sql/src/planner/optimizer/rule/rewrite/rule_push_down_limit_join.rs index 3e4496da5331..104ff48c1b1f 100644 --- a/src/query/sql/src/planner/optimizer/rule/rewrite/rule_push_down_limit_join.rs +++ b/src/query/sql/src/planner/optimizer/rule/rewrite/rule_push_down_limit_join.rs @@ -85,7 +85,11 @@ impl Rule for RulePushDownLimitOuterJoin { self.id } - fn apply(&self, s_expr: &SExpr, state: &mut TransformResult) -> common_exception::Result<()> { + fn apply( + &self, + s_expr: &SExpr, + state: &mut TransformResult, + ) -> databend_common_exception::Result<()> { let limit: Limit = s_expr.plan().clone().try_into()?; if limit.limit.is_some() { let child = s_expr.child(0)?; diff --git a/src/query/sql/src/planner/optimizer/rule/rewrite/rule_push_down_limit_scan.rs b/src/query/sql/src/planner/optimizer/rule/rewrite/rule_push_down_limit_scan.rs index 4d02eb313607..5b6705bcdd74 100644 --- a/src/query/sql/src/planner/optimizer/rule/rewrite/rule_push_down_limit_scan.rs +++ b/src/query/sql/src/planner/optimizer/rule/rewrite/rule_push_down_limit_scan.rs @@ -15,7 +15,7 @@ use std::cmp; use std::sync::Arc; -use common_exception::Result; +use databend_common_exception::Result; use crate::optimizer::rule::Rule; use crate::optimizer::rule::TransformResult; diff --git a/src/query/sql/src/planner/optimizer/rule/rewrite/rule_push_down_limit_sort.rs b/src/query/sql/src/planner/optimizer/rule/rewrite/rule_push_down_limit_sort.rs index 4bf9851c1474..03011eb1c053 100644 --- a/src/query/sql/src/planner/optimizer/rule/rewrite/rule_push_down_limit_sort.rs +++ b/src/query/sql/src/planner/optimizer/rule/rewrite/rule_push_down_limit_sort.rs @@ -70,7 +70,11 @@ impl Rule for RulePushDownLimitSort { self.id } - fn apply(&self, s_expr: &SExpr, state: &mut TransformResult) -> common_exception::Result<()> { + fn apply( + &self, + s_expr: &SExpr, + state: &mut TransformResult, + ) -> databend_common_exception::Result<()> { let limit: Limit = s_expr.plan().clone().try_into()?; if let Some(mut count) = limit.limit { count += limit.offset; diff --git a/src/query/sql/src/planner/optimizer/rule/rewrite/rule_push_down_limit_union.rs b/src/query/sql/src/planner/optimizer/rule/rewrite/rule_push_down_limit_union.rs index c7fccdb36733..d4a161c31bee 100644 --- a/src/query/sql/src/planner/optimizer/rule/rewrite/rule_push_down_limit_union.rs +++ b/src/query/sql/src/planner/optimizer/rule/rewrite/rule_push_down_limit_union.rs @@ -15,7 +15,7 @@ use std::cmp; use std::sync::Arc; -use common_exception::Result; +use databend_common_exception::Result; use crate::optimizer::rule::Rule; use crate::optimizer::rule::TransformResult; diff --git a/src/query/sql/src/planner/optimizer/rule/rewrite/rule_push_down_prewhere.rs b/src/query/sql/src/planner/optimizer/rule/rewrite/rule_push_down_prewhere.rs index accbed029a80..a6f80c599e21 100644 --- a/src/query/sql/src/planner/optimizer/rule/rewrite/rule_push_down_prewhere.rs +++ b/src/query/sql/src/planner/optimizer/rule/rewrite/rule_push_down_prewhere.rs @@ -14,9 +14,9 @@ use std::sync::Arc; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::TableSchemaRef; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::TableSchemaRef; use crate::optimizer::rule::Rule; use crate::optimizer::ColumnSet; diff --git a/src/query/sql/src/planner/optimizer/rule/rewrite/rule_push_down_sort_scan.rs b/src/query/sql/src/planner/optimizer/rule/rewrite/rule_push_down_sort_scan.rs index a8b3dd2a5a23..8348ce13979d 100644 --- a/src/query/sql/src/planner/optimizer/rule/rewrite/rule_push_down_sort_scan.rs +++ b/src/query/sql/src/planner/optimizer/rule/rewrite/rule_push_down_sort_scan.rs @@ -15,7 +15,7 @@ use std::cmp; use std::sync::Arc; -use common_exception::Result; +use databend_common_exception::Result; use crate::optimizer::rule::Rule; use crate::optimizer::rule::TransformResult; diff --git a/src/query/sql/src/planner/optimizer/rule/rewrite/rule_split_aggregate.rs b/src/query/sql/src/planner/optimizer/rule/rewrite/rule_split_aggregate.rs index a9187d804653..d29dfb7ad7f3 100644 --- a/src/query/sql/src/planner/optimizer/rule/rewrite/rule_split_aggregate.rs +++ b/src/query/sql/src/planner/optimizer/rule/rewrite/rule_split_aggregate.rs @@ -14,7 +14,7 @@ use std::sync::Arc; -use common_exception::Result; +use databend_common_exception::Result; use crate::optimizer::rule::Rule; use crate::optimizer::rule::RuleID; diff --git a/src/query/sql/src/planner/optimizer/rule/rewrite/rule_try_apply_agg_index.rs b/src/query/sql/src/planner/optimizer/rule/rewrite/rule_try_apply_agg_index.rs index 4ac4da7af241..b19afd257ab7 100644 --- a/src/query/sql/src/planner/optimizer/rule/rewrite/rule_try_apply_agg_index.rs +++ b/src/query/sql/src/planner/optimizer/rule/rewrite/rule_try_apply_agg_index.rs @@ -14,7 +14,7 @@ use std::sync::Arc; -use common_exception::Result; +use databend_common_exception::Result; use super::agg_index; use crate::optimizer::rule::Rule; diff --git a/src/query/sql/src/planner/optimizer/rule/rule.rs b/src/query/sql/src/planner/optimizer/rule/rule.rs index bdfd78785a90..3c36afb22c9d 100644 --- a/src/query/sql/src/planner/optimizer/rule/rule.rs +++ b/src/query/sql/src/planner/optimizer/rule/rule.rs @@ -16,7 +16,7 @@ use std::fmt::Display; use std::fmt::Formatter; use std::sync::LazyLock; -use common_exception::Result; +use databend_common_exception::Result; use num_derive::FromPrimitive; use num_derive::ToPrimitive; diff --git a/src/query/sql/src/planner/optimizer/rule/transform/rule_commute_join_base_table.rs b/src/query/sql/src/planner/optimizer/rule/transform/rule_commute_join_base_table.rs index 2fdc23d3ef79..2cc32b9b9e63 100644 --- a/src/query/sql/src/planner/optimizer/rule/transform/rule_commute_join_base_table.rs +++ b/src/query/sql/src/planner/optimizer/rule/transform/rule_commute_join_base_table.rs @@ -14,7 +14,7 @@ use std::sync::Arc; -use common_exception::Result; +use databend_common_exception::Result; use crate::optimizer::rule::Rule; use crate::optimizer::rule::TransformResult; diff --git a/src/query/sql/src/planner/optimizer/rule/transform/rule_eager_aggregation.rs b/src/query/sql/src/planner/optimizer/rule/transform/rule_eager_aggregation.rs index d813f05230a0..0e37c2c88ef1 100644 --- a/src/query/sql/src/planner/optimizer/rule/transform/rule_eager_aggregation.rs +++ b/src/query/sql/src/planner/optimizer/rule/transform/rule_eager_aggregation.rs @@ -16,9 +16,9 @@ use std::collections::HashMap; use std::collections::HashSet; use std::sync::Arc; -use common_expression::types::number::NumberDataType; -use common_expression::types::DataType; -use common_functions::aggregates::AggregateFunctionFactory; +use databend_common_expression::types::number::NumberDataType; +use databend_common_expression::types::DataType; +use databend_common_functions::aggregates::AggregateFunctionFactory; use crate::binder::wrap_cast; use crate::binder::ColumnBindingBuilder; @@ -366,7 +366,11 @@ impl Rule for RuleEagerAggregation { self.id } - fn apply(&self, a_expr: &SExpr, state: &mut TransformResult) -> common_exception::Result<()> { + fn apply( + &self, + a_expr: &SExpr, + state: &mut TransformResult, + ) -> databend_common_exception::Result<()> { let mut matched_idx = 0; for (idx, pattern) in self.patterns.iter().enumerate() { if a_expr.match_pattern(pattern) { @@ -1445,7 +1449,7 @@ fn decompose_avg( func_name: &mut String, metadata: MetadataRef, function_factory: &AggregateFunctionFactory, -) -> common_exception::Result<(usize, usize, usize)> { +) -> databend_common_exception::Result<(usize, usize, usize)> { *func_name = "sum".to_string(); // Add COUNT aggregate functions. final_agg @@ -1512,7 +1516,7 @@ fn update_aggregate_and_eval( eval_scalars: &mut Vec<&mut EvalScalar>, eval_scalar_items: &HashMap>, avg_components: &HashMap, -) -> common_exception::Result<(bool, usize, usize)> { +) -> databend_common_exception::Result<(bool, usize, usize)> { let final_aggregate_function = &mut final_agg.aggregate_functions[index]; let old_index = final_aggregate_function.index; @@ -1557,7 +1561,7 @@ fn create_eager_count_multiply_scalar_item( eager_count_index: IndexType, extra_eval_scalar: &EvalScalar, metadata: MetadataRef, -) -> common_exception::Result { +) -> databend_common_exception::Result { let new_index = metadata.write().add_derived_column( format!("{} * _eager_count", aggregate_function.display_name), aggregate_function.args[0].data_type()?, diff --git a/src/query/sql/src/planner/optimizer/rule/transform/rule_left_exchange_join.rs b/src/query/sql/src/planner/optimizer/rule/transform/rule_left_exchange_join.rs index 440ba8882f5d..78069e63e084 100644 --- a/src/query/sql/src/planner/optimizer/rule/transform/rule_left_exchange_join.rs +++ b/src/query/sql/src/planner/optimizer/rule/transform/rule_left_exchange_join.rs @@ -16,7 +16,7 @@ use std::ops::Deref; use std::sync::Arc; use std::vec; -use common_exception::Result; +use databend_common_exception::Result; use super::util::get_join_predicates; use crate::binder::JoinPredicate; diff --git a/src/query/sql/src/planner/optimizer/rule/transform/util.rs b/src/query/sql/src/planner/optimizer/rule/transform/util.rs index 3478721f3205..a9d3cb253370 100644 --- a/src/query/sql/src/planner/optimizer/rule/transform/util.rs +++ b/src/query/sql/src/planner/optimizer/rule/transform/util.rs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_exception::Result; +use databend_common_exception::Result; use crate::plans::FunctionCall; use crate::plans::Join; diff --git a/src/query/sql/src/planner/optimizer/rule/utils/constant.rs b/src/query/sql/src/planner/optimizer/rule/utils/constant.rs index f8eb99346355..2fdad26bac06 100644 --- a/src/query/sql/src/planner/optimizer/rule/utils/constant.rs +++ b/src/query/sql/src/planner/optimizer/rule/utils/constant.rs @@ -12,10 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_expression::types::DataType; -use common_expression::types::NumberDataType; -use common_expression::types::NumberScalar; -use common_expression::Scalar; +use databend_common_expression::types::DataType; +use databend_common_expression::types::NumberDataType; +use databend_common_expression::types::NumberScalar; +use databend_common_expression::Scalar; use ordered_float::OrderedFloat; use crate::plans::BoundColumnRef; diff --git a/src/query/sql/src/planner/optimizer/s_expr.rs b/src/query/sql/src/planner/optimizer/s_expr.rs index 0d3b88e2b191..5ee8e419ef4d 100644 --- a/src/query/sql/src/planner/optimizer/s_expr.rs +++ b/src/query/sql/src/planner/optimizer/s_expr.rs @@ -16,8 +16,8 @@ use std::collections::HashSet; use std::sync::Arc; use std::sync::Mutex; -use common_exception::ErrorCode; -use common_exception::Result; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; use educe::Educe; use super::RelationalProperty; diff --git a/src/query/sql/src/planner/planner.rs b/src/query/sql/src/planner/planner.rs index a4651adc988b..2878bf93b8ea 100644 --- a/src/query/sql/src/planner/planner.rs +++ b/src/query/sql/src/planner/planner.rs @@ -14,19 +14,19 @@ use std::sync::Arc; -use common_ast::ast::Expr; -use common_ast::ast::Literal; -use common_ast::ast::Statement; -use common_ast::parser::parse_sql; -use common_ast::parser::token::Token; -use common_ast::parser::token::TokenKind; -use common_ast::parser::token::Tokenizer; -use common_ast::walk_statement_mut; -use common_ast::Dialect; -use common_catalog::catalog::CatalogManager; -use common_catalog::query_kind::QueryKind; -use common_catalog::table_context::TableContext; -use common_exception::Result; +use databend_common_ast::ast::Expr; +use databend_common_ast::ast::Literal; +use databend_common_ast::ast::Statement; +use databend_common_ast::parser::parse_sql; +use databend_common_ast::parser::token::Token; +use databend_common_ast::parser::token::TokenKind; +use databend_common_ast::parser::token::Tokenizer; +use databend_common_ast::walk_statement_mut; +use databend_common_ast::Dialect; +use databend_common_catalog::catalog::CatalogManager; +use databend_common_catalog::query_kind::QueryKind; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::Result; use parking_lot::RwLock; use super::semantic::AggregateRewriter; diff --git a/src/query/sql/src/planner/plans/add_row_number.rs b/src/query/sql/src/planner/plans/add_row_number.rs index 21d0851365ef..a44b88ae3ef4 100644 --- a/src/query/sql/src/planner/plans/add_row_number.rs +++ b/src/query/sql/src/planner/plans/add_row_number.rs @@ -14,7 +14,7 @@ use std::sync::Arc; -use common_catalog::table_context::TableContext; +use databend_common_catalog::table_context::TableContext; use super::Operator; use super::RelOp; @@ -35,18 +35,21 @@ impl Operator for AddRowNumber { fn derive_relational_prop( &self, rel_expr: &RelExpr, - ) -> common_exception::Result> { + ) -> databend_common_exception::Result> { rel_expr.derive_relational_prop_child(0) } fn derive_physical_prop( &self, rel_expr: &RelExpr, - ) -> common_exception::Result { + ) -> databend_common_exception::Result { rel_expr.derive_physical_prop_child(0) } - fn derive_cardinality(&self, rel_expr: &RelExpr) -> common_exception::Result> { + fn derive_cardinality( + &self, + rel_expr: &RelExpr, + ) -> databend_common_exception::Result> { rel_expr.derive_cardinality_child(0) } @@ -56,7 +59,7 @@ impl Operator for AddRowNumber { _rel_expr: &RelExpr, _child_index: usize, required: &RequiredProperty, - ) -> common_exception::Result { + ) -> databend_common_exception::Result { Ok(required.clone()) } } diff --git a/src/query/sql/src/planner/plans/aggregate.rs b/src/query/sql/src/planner/plans/aggregate.rs index 91acb5562ca7..8df690a3d2ef 100644 --- a/src/query/sql/src/planner/plans/aggregate.rs +++ b/src/query/sql/src/planner/plans/aggregate.rs @@ -14,10 +14,10 @@ use std::sync::Arc; -use common_catalog::table_context::TableContext; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::types::DataType; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::types::DataType; use crate::optimizer::ColumnSet; use crate::optimizer::Distribution; diff --git a/src/query/sql/src/planner/plans/constant_table_scan.rs b/src/query/sql/src/planner/plans/constant_table_scan.rs index e5e364efac8c..4a5e5174da00 100644 --- a/src/query/sql/src/planner/plans/constant_table_scan.rs +++ b/src/query/sql/src/planner/plans/constant_table_scan.rs @@ -14,14 +14,14 @@ use std::sync::Arc; -use common_catalog::table_context::TableContext; -use common_exception::Result; -use common_expression::types::NumberType; -use common_expression::types::ValueType; -use common_expression::Column; -use common_expression::DataSchemaRef; -use common_functions::aggregates::eval_aggr; -use common_storage::Datum; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::Result; +use databend_common_expression::types::NumberType; +use databend_common_expression::types::ValueType; +use databend_common_expression::Column; +use databend_common_expression::DataSchemaRef; +use databend_common_functions::aggregates::eval_aggr; +use databend_common_storage::Datum; use itertools::Itertools; use crate::optimizer::histogram_from_ndv; diff --git a/src/query/sql/src/planner/plans/copy_into_location.rs b/src/query/sql/src/planner/plans/copy_into_location.rs index b4b1ef282036..9666cceca00c 100644 --- a/src/query/sql/src/planner/plans/copy_into_location.rs +++ b/src/query/sql/src/planner/plans/copy_into_location.rs @@ -15,7 +15,7 @@ use std::fmt::Debug; use std::fmt::Formatter; -use common_meta_app::principal::StageInfo; +use databend_common_meta_app::principal::StageInfo; use crate::plans::Plan; diff --git a/src/query/sql/src/planner/plans/copy_into_table.rs b/src/query/sql/src/planner/plans/copy_into_table.rs index be8a054444fa..f8456f7ccf95 100644 --- a/src/query/sql/src/planner/plans/copy_into_table.rs +++ b/src/query/sql/src/planner/plans/copy_into_table.rs @@ -18,23 +18,23 @@ use std::str::FromStr; use std::sync::Arc; use std::time::Instant; -use common_catalog::plan::StageTableInfo; -use common_catalog::table_context::TableContext; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::types::DataType; -use common_expression::types::NumberDataType; -use common_expression::DataField; -use common_expression::DataSchema; -use common_expression::DataSchemaRef; -use common_expression::DataSchemaRefExt; -use common_expression::Scalar; -use common_meta_app::principal::COPY_MAX_FILES_COMMIT_MSG; -use common_meta_app::principal::COPY_MAX_FILES_PER_COMMIT; -use common_meta_app::schema::CatalogInfo; -use common_metrics::storage::*; -use common_storage::init_stage_operator; -use common_storage::StageFileInfo; +use databend_common_catalog::plan::StageTableInfo; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::types::DataType; +use databend_common_expression::types::NumberDataType; +use databend_common_expression::DataField; +use databend_common_expression::DataSchema; +use databend_common_expression::DataSchemaRef; +use databend_common_expression::DataSchemaRefExt; +use databend_common_expression::Scalar; +use databend_common_meta_app::principal::COPY_MAX_FILES_COMMIT_MSG; +use databend_common_meta_app::principal::COPY_MAX_FILES_PER_COMMIT; +use databend_common_meta_app::schema::CatalogInfo; +use databend_common_metrics::storage::*; +use databend_common_storage::init_stage_operator; +use databend_common_storage::StageFileInfo; use log::info; use crate::plans::Plan; diff --git a/src/query/sql/src/planner/plans/cte_scan.rs b/src/query/sql/src/planner/plans/cte_scan.rs index a117e639a196..271291002ec5 100644 --- a/src/query/sql/src/planner/plans/cte_scan.rs +++ b/src/query/sql/src/planner/plans/cte_scan.rs @@ -15,9 +15,9 @@ use std::hash::Hash; use std::sync::Arc; -use common_catalog::table_context::TableContext; -use common_exception::Result; -use common_expression::DataField; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::Result; +use databend_common_expression::DataField; use crate::optimizer::ColumnSet; use crate::optimizer::Distribution; diff --git a/src/query/sql/src/planner/plans/data_mask.rs b/src/query/sql/src/planner/plans/data_mask.rs index b894399d09e8..84f2c7cf05ae 100644 --- a/src/query/sql/src/planner/plans/data_mask.rs +++ b/src/query/sql/src/planner/plans/data_mask.rs @@ -15,14 +15,14 @@ use std::sync::Arc; use chrono::Utc; -use common_ast::ast::DataMaskPolicy; -use common_expression::types::DataType; -use common_expression::DataField; -use common_expression::DataSchema; -use common_expression::DataSchemaRef; -use common_meta_app::data_mask::CreateDatamaskReq; -use common_meta_app::data_mask::DatamaskNameIdent; -use common_meta_app::data_mask::DropDatamaskReq; +use databend_common_ast::ast::DataMaskPolicy; +use databend_common_expression::types::DataType; +use databend_common_expression::DataField; +use databend_common_expression::DataSchema; +use databend_common_expression::DataSchemaRef; +use databend_common_meta_app::data_mask::CreateDatamaskReq; +use databend_common_meta_app::data_mask::DatamaskNameIdent; +use databend_common_meta_app::data_mask::DropDatamaskReq; #[derive(Clone, Debug, PartialEq)] pub struct CreateDatamaskPolicyPlan { diff --git a/src/query/sql/src/planner/plans/ddl/account.rs b/src/query/sql/src/planner/plans/ddl/account.rs index a17d1c5a3505..76c54d7404d6 100644 --- a/src/query/sql/src/planner/plans/ddl/account.rs +++ b/src/query/sql/src/planner/plans/ddl/account.rs @@ -12,17 +12,17 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_expression::types::DataType; -use common_expression::types::NumberDataType; -use common_expression::DataField; -use common_expression::DataSchemaRef; -use common_expression::DataSchemaRefExt; -use common_meta_app::principal::AuthInfo; -use common_meta_app::principal::GrantObject; -use common_meta_app::principal::PrincipalIdentity; -use common_meta_app::principal::UserIdentity; -use common_meta_app::principal::UserOption; -use common_meta_app::principal::UserPrivilegeSet; +use databend_common_expression::types::DataType; +use databend_common_expression::types::NumberDataType; +use databend_common_expression::DataField; +use databend_common_expression::DataSchemaRef; +use databend_common_expression::DataSchemaRefExt; +use databend_common_meta_app::principal::AuthInfo; +use databend_common_meta_app::principal::GrantObject; +use databend_common_meta_app::principal::PrincipalIdentity; +use databend_common_meta_app::principal::UserIdentity; +use databend_common_meta_app::principal::UserOption; +use databend_common_meta_app::principal::UserPrivilegeSet; #[derive(Clone, Debug, PartialEq, Eq)] pub struct CreateUserPlan { diff --git a/src/query/sql/src/planner/plans/ddl/catalog.rs b/src/query/sql/src/planner/plans/ddl/catalog.rs index 0f81dfba9f16..49ed0bb6c2a6 100644 --- a/src/query/sql/src/planner/plans/ddl/catalog.rs +++ b/src/query/sql/src/planner/plans/ddl/catalog.rs @@ -12,11 +12,11 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_expression::DataSchemaRef; -use common_meta_app::schema::CatalogMeta; -use common_meta_app::schema::CatalogNameIdent; -use common_meta_app::schema::CreateCatalogReq; -use common_meta_app::schema::DropCatalogReq; +use databend_common_expression::DataSchemaRef; +use databend_common_meta_app::schema::CatalogMeta; +use databend_common_meta_app::schema::CatalogNameIdent; +use databend_common_meta_app::schema::CreateCatalogReq; +use databend_common_meta_app::schema::DropCatalogReq; #[derive(Clone, Debug, PartialEq, Eq)] pub struct CreateCatalogPlan { diff --git a/src/query/sql/src/planner/plans/ddl/connection.rs b/src/query/sql/src/planner/plans/ddl/connection.rs index 65acfdc8c81d..c6a301fe63b1 100644 --- a/src/query/sql/src/planner/plans/ddl/connection.rs +++ b/src/query/sql/src/planner/plans/ddl/connection.rs @@ -15,10 +15,10 @@ use std::collections::BTreeMap; use std::fmt::Debug; -use common_expression::types::DataType; -use common_expression::DataField; -use common_expression::DataSchemaRef; -use common_expression::DataSchemaRefExt; +use databend_common_expression::types::DataType; +use databend_common_expression::DataField; +use databend_common_expression::DataSchemaRef; +use databend_common_expression::DataSchemaRefExt; #[derive(Clone, Debug, PartialEq, Eq)] pub struct CreateConnectionPlan { diff --git a/src/query/sql/src/planner/plans/ddl/database.rs b/src/query/sql/src/planner/plans/ddl/database.rs index ff8009a1976f..7ff2d990f0fe 100644 --- a/src/query/sql/src/planner/plans/ddl/database.rs +++ b/src/query/sql/src/planner/plans/ddl/database.rs @@ -12,12 +12,12 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_expression::DataSchemaRef; -use common_meta_app::schema::CreateDatabaseReq; -use common_meta_app::schema::DatabaseMeta; -use common_meta_app::schema::DatabaseNameIdent; -use common_meta_app::schema::DropDatabaseReq; -use common_meta_app::schema::UndropDatabaseReq; +use databend_common_expression::DataSchemaRef; +use databend_common_meta_app::schema::CreateDatabaseReq; +use databend_common_meta_app::schema::DatabaseMeta; +use databend_common_meta_app::schema::DatabaseNameIdent; +use databend_common_meta_app::schema::DropDatabaseReq; +use databend_common_meta_app::schema::UndropDatabaseReq; /// Create. #[derive(Clone, Debug, PartialEq, Eq)] diff --git a/src/query/sql/src/planner/plans/ddl/file_format.rs b/src/query/sql/src/planner/plans/ddl/file_format.rs index 49024f75a328..6230abc1b837 100644 --- a/src/query/sql/src/planner/plans/ddl/file_format.rs +++ b/src/query/sql/src/planner/plans/ddl/file_format.rs @@ -14,11 +14,11 @@ use std::fmt::Debug; -use common_expression::types::DataType; -use common_expression::DataField; -use common_expression::DataSchemaRef; -use common_expression::DataSchemaRefExt; -use common_meta_app::principal::FileFormatParams; +use databend_common_expression::types::DataType; +use databend_common_expression::DataField; +use databend_common_expression::DataSchemaRef; +use databend_common_expression::DataSchemaRefExt; +use databend_common_meta_app::principal::FileFormatParams; #[derive(Clone, Debug, PartialEq, Eq)] pub struct CreateFileFormatPlan { diff --git a/src/query/sql/src/planner/plans/ddl/index.rs b/src/query/sql/src/planner/plans/ddl/index.rs index 2d08048f1d1b..8a06c3fa6134 100644 --- a/src/query/sql/src/planner/plans/ddl/index.rs +++ b/src/query/sql/src/planner/plans/ddl/index.rs @@ -12,11 +12,11 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_ast::ast::TableIndexType; -use common_meta_app::schema::IndexMeta; -use common_meta_app::schema::TableInfo; -use common_meta_types::MetaId; -use storages_common_table_meta::meta::Location; +use databend_common_ast::ast::TableIndexType; +use databend_common_meta_app::schema::IndexMeta; +use databend_common_meta_app::schema::TableInfo; +use databend_common_meta_types::MetaId; +use databend_storages_common_table_meta::meta::Location; use crate::plans::Plan; diff --git a/src/query/sql/src/planner/plans/ddl/stage.rs b/src/query/sql/src/planner/plans/ddl/stage.rs index f371fe87e5d5..e19f51829614 100644 --- a/src/query/sql/src/planner/plans/ddl/stage.rs +++ b/src/query/sql/src/planner/plans/ddl/stage.rs @@ -14,7 +14,7 @@ use std::fmt::Debug; -use common_meta_app::principal::StageInfo; +use databend_common_meta_app::principal::StageInfo; #[derive(Clone, Debug, PartialEq, Eq)] pub struct CreateStagePlan { diff --git a/src/query/sql/src/planner/plans/ddl/table.rs b/src/query/sql/src/planner/plans/ddl/table.rs index c99869ab25a2..066f28a0d7c1 100644 --- a/src/query/sql/src/planner/plans/ddl/table.rs +++ b/src/query/sql/src/planner/plans/ddl/table.rs @@ -15,20 +15,20 @@ use std::collections::BTreeMap; use std::sync::Arc; -use common_ast::ast::Engine; -use common_catalog::table::NavigationPoint; -use common_expression::types::DataType; -use common_expression::types::NumberDataType; -use common_expression::DataField; -use common_expression::DataSchema; -use common_expression::DataSchemaRef; -use common_expression::DataSchemaRefExt; -use common_expression::TableField; -use common_expression::TableSchema; -use common_expression::TableSchemaRef; -use common_meta_app::schema::TableNameIdent; -use common_meta_app::schema::UndropTableReq; -use common_meta_app::storage::StorageParams; +use databend_common_ast::ast::Engine; +use databend_common_catalog::table::NavigationPoint; +use databend_common_expression::types::DataType; +use databend_common_expression::types::NumberDataType; +use databend_common_expression::DataField; +use databend_common_expression::DataSchema; +use databend_common_expression::DataSchemaRef; +use databend_common_expression::DataSchemaRefExt; +use databend_common_expression::TableField; +use databend_common_expression::TableSchema; +use databend_common_expression::TableSchemaRef; +use databend_common_meta_app::schema::TableNameIdent; +use databend_common_meta_app::schema::UndropTableReq; +use databend_common_meta_app::storage::StorageParams; use crate::plans::Plan; diff --git a/src/query/sql/src/planner/plans/ddl/task.rs b/src/query/sql/src/planner/plans/ddl/task.rs index 6aca5cab2b70..1fa4a134519a 100644 --- a/src/query/sql/src/planner/plans/ddl/task.rs +++ b/src/query/sql/src/planner/plans/ddl/task.rs @@ -14,18 +14,18 @@ use std::sync::Arc; -use common_ast::ast::AlterTaskOptions; -use common_ast::ast::ScheduleOptions; -use common_ast::ast::ShowLimit; -use common_ast::ast::WarehouseOptions; -use common_expression::types::DataType; -use common_expression::types::NumberDataType::Int32; -use common_expression::types::NumberDataType::Int64; -use common_expression::types::NumberDataType::UInt64; -use common_expression::DataField; -use common_expression::DataSchema; -use common_expression::DataSchemaRef; -use common_expression::DataSchemaRefExt; +use databend_common_ast::ast::AlterTaskOptions; +use databend_common_ast::ast::ScheduleOptions; +use databend_common_ast::ast::ShowLimit; +use databend_common_ast::ast::WarehouseOptions; +use databend_common_expression::types::DataType; +use databend_common_expression::types::NumberDataType::Int32; +use databend_common_expression::types::NumberDataType::Int64; +use databend_common_expression::types::NumberDataType::UInt64; +use databend_common_expression::DataField; +use databend_common_expression::DataSchema; +use databend_common_expression::DataSchemaRef; +use databend_common_expression::DataSchemaRefExt; pub fn task_schema() -> DataSchemaRef { Arc::new(DataSchema::new(vec![ diff --git a/src/query/sql/src/planner/plans/ddl/udf.rs b/src/query/sql/src/planner/plans/ddl/udf.rs index e3b3f11e831d..3c03e5f86932 100644 --- a/src/query/sql/src/planner/plans/ddl/udf.rs +++ b/src/query/sql/src/planner/plans/ddl/udf.rs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_meta_app::principal::UserDefinedFunction; +use databend_common_meta_app::principal::UserDefinedFunction; #[derive(Clone, Debug, PartialEq, Eq)] pub struct CreateUDFPlan { diff --git a/src/query/sql/src/planner/plans/ddl/virtual_column.rs b/src/query/sql/src/planner/plans/ddl/virtual_column.rs index eace72f356e8..2071858e6b85 100644 --- a/src/query/sql/src/planner/plans/ddl/virtual_column.rs +++ b/src/query/sql/src/planner/plans/ddl/virtual_column.rs @@ -14,9 +14,9 @@ use std::sync::Arc; -use common_expression::DataSchema; -use common_expression::DataSchemaRef; -use storages_common_table_meta::meta::Location; +use databend_common_expression::DataSchema; +use databend_common_expression::DataSchemaRef; +use databend_storages_common_table_meta::meta::Location; #[derive(Clone, Debug, PartialEq, Eq)] pub struct CreateVirtualColumnPlan { diff --git a/src/query/sql/src/planner/plans/dummy_table_scan.rs b/src/query/sql/src/planner/plans/dummy_table_scan.rs index f20c738916ff..0b9fe69638c0 100644 --- a/src/query/sql/src/planner/plans/dummy_table_scan.rs +++ b/src/query/sql/src/planner/plans/dummy_table_scan.rs @@ -14,8 +14,8 @@ use std::sync::Arc; -use common_catalog::table_context::TableContext; -use common_exception::Result; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::Result; use crate::optimizer::ColumnSet; use crate::optimizer::Distribution; diff --git a/src/query/sql/src/planner/plans/eval_scalar.rs b/src/query/sql/src/planner/plans/eval_scalar.rs index a8bc7fa99f14..2478de99393d 100644 --- a/src/query/sql/src/planner/plans/eval_scalar.rs +++ b/src/query/sql/src/planner/plans/eval_scalar.rs @@ -14,8 +14,8 @@ use std::sync::Arc; -use common_catalog::table_context::TableContext; -use common_exception::Result; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::Result; use crate::optimizer::ColumnSet; use crate::optimizer::PhysicalProperty; diff --git a/src/query/sql/src/planner/plans/exchange.rs b/src/query/sql/src/planner/plans/exchange.rs index 59a81cc261bc..ae156cc9a7f8 100644 --- a/src/query/sql/src/planner/plans/exchange.rs +++ b/src/query/sql/src/planner/plans/exchange.rs @@ -14,8 +14,8 @@ use std::sync::Arc; -use common_catalog::table_context::TableContext; -use common_exception::Result; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::Result; use crate::optimizer::Distribution; use crate::optimizer::PhysicalProperty; diff --git a/src/query/sql/src/planner/plans/filter.rs b/src/query/sql/src/planner/plans/filter.rs index 1fc12b331af7..1d412080de7b 100644 --- a/src/query/sql/src/planner/plans/filter.rs +++ b/src/query/sql/src/planner/plans/filter.rs @@ -16,8 +16,8 @@ use std::collections::HashMap; use std::collections::HashSet; use std::sync::Arc; -use common_catalog::table_context::TableContext; -use common_exception::Result; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::Result; use crate::optimizer::ColumnSet; use crate::optimizer::PhysicalProperty; diff --git a/src/query/sql/src/planner/plans/insert.rs b/src/query/sql/src/planner/plans/insert.rs index ed8a732d15ba..7a78c578b5b3 100644 --- a/src/query/sql/src/planner/plans/insert.rs +++ b/src/query/sql/src/planner/plans/insert.rs @@ -14,13 +14,13 @@ use std::sync::Arc; -use common_expression::DataBlock; -use common_expression::DataSchemaRef; -use common_expression::TableSchemaRef; -use common_meta_app::principal::FileFormatParams; -use common_meta_app::principal::OnErrorMode; -use common_meta_types::MetaId; -use common_pipeline_sources::input_formats::InputContext; +use databend_common_expression::DataBlock; +use databend_common_expression::DataSchemaRef; +use databend_common_expression::TableSchemaRef; +use databend_common_meta_app::principal::FileFormatParams; +use databend_common_meta_app::principal::OnErrorMode; +use databend_common_meta_types::MetaId; +use databend_common_pipeline_sources::input_formats::InputContext; use super::Plan; diff --git a/src/query/sql/src/planner/plans/join.rs b/src/query/sql/src/planner/plans/join.rs index be97586f1f58..d0896c90b706 100644 --- a/src/query/sql/src/planner/plans/join.rs +++ b/src/query/sql/src/planner/plans/join.rs @@ -18,10 +18,10 @@ use std::fmt::Display; use std::fmt::Formatter; use std::sync::Arc; -use common_catalog::table_context::TableContext; -use common_exception::Result; -use common_expression::types::F64; -use common_storage::Datum; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::Result; +use databend_common_expression::types::F64; +use databend_common_storage::Datum; use crate::optimizer::histogram_from_ndv; use crate::optimizer::ColumnSet; diff --git a/src/query/sql/src/planner/plans/limit.rs b/src/query/sql/src/planner/plans/limit.rs index 8146d706ef4a..f38a822733db 100644 --- a/src/query/sql/src/planner/plans/limit.rs +++ b/src/query/sql/src/planner/plans/limit.rs @@ -14,8 +14,8 @@ use std::sync::Arc; -use common_catalog::table_context::TableContext; -use common_exception::Result; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::Result; use crate::optimizer::Distribution; use crate::optimizer::PhysicalProperty; diff --git a/src/query/sql/src/planner/plans/materialized_cte.rs b/src/query/sql/src/planner/plans/materialized_cte.rs index a69d01ab29a2..00d4abb737d9 100644 --- a/src/query/sql/src/planner/plans/materialized_cte.rs +++ b/src/query/sql/src/planner/plans/materialized_cte.rs @@ -14,8 +14,8 @@ use std::sync::Arc; -use common_catalog::table_context::TableContext; -use common_exception::Result; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::Result; use crate::optimizer::Distribution; use crate::optimizer::PhysicalProperty; diff --git a/src/query/sql/src/planner/plans/merge_into.rs b/src/query/sql/src/planner/plans/merge_into.rs index a553dc9fd613..a2251eda6268 100644 --- a/src/query/sql/src/planner/plans/merge_into.rs +++ b/src/query/sql/src/planner/plans/merge_into.rs @@ -15,16 +15,16 @@ use std::collections::HashMap; use std::collections::HashSet; -use common_ast::ast::TableAlias; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::types::DataType; -use common_expression::types::NumberDataType; -use common_expression::DataField; -use common_expression::DataSchemaRef; -use common_expression::DataSchemaRefExt; -use common_expression::FieldIndex; -use common_meta_types::MetaId; +use databend_common_ast::ast::TableAlias; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::types::DataType; +use databend_common_expression::types::NumberDataType; +use databend_common_expression::DataField; +use databend_common_expression::DataSchemaRef; +use databend_common_expression::DataSchemaRefExt; +use databend_common_expression::FieldIndex; +use databend_common_meta_types::MetaId; use crate::binder::MergeIntoType; use crate::optimizer::SExpr; diff --git a/src/query/sql/src/planner/plans/operator.rs b/src/query/sql/src/planner/plans/operator.rs index aadfced70c0b..ef50ee7097f7 100644 --- a/src/query/sql/src/planner/plans/operator.rs +++ b/src/query/sql/src/planner/plans/operator.rs @@ -14,9 +14,9 @@ use std::sync::Arc; -use common_catalog::table_context::TableContext; -use common_exception::ErrorCode; -use common_exception::Result; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; use super::add_row_number::AddRowNumber; use super::aggregate::Aggregate; diff --git a/src/query/sql/src/planner/plans/pattern.rs b/src/query/sql/src/planner/plans/pattern.rs index eb4535cf8b40..6b3cb3f49b6e 100644 --- a/src/query/sql/src/planner/plans/pattern.rs +++ b/src/query/sql/src/planner/plans/pattern.rs @@ -14,8 +14,8 @@ use std::sync::Arc; -use common_catalog::table_context::TableContext; -use common_exception::ErrorCode; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::ErrorCode; use crate::optimizer::PhysicalProperty; use crate::optimizer::RelExpr; @@ -42,7 +42,7 @@ impl Operator for PatternPlan { fn derive_relational_prop( &self, _rel_expr: &RelExpr, - ) -> common_exception::Result> { + ) -> databend_common_exception::Result> { Err(ErrorCode::Internal( "Cannot derive relational property for pattern plan", )) @@ -51,13 +51,16 @@ impl Operator for PatternPlan { fn derive_physical_prop( &self, _rel_expr: &RelExpr, - ) -> common_exception::Result { + ) -> databend_common_exception::Result { Err(ErrorCode::Internal( "Cannot derive physical property for pattern plan", )) } - fn derive_cardinality(&self, _rel_expr: &RelExpr) -> common_exception::Result> { + fn derive_cardinality( + &self, + _rel_expr: &RelExpr, + ) -> databend_common_exception::Result> { Err(ErrorCode::Internal( "Cannot derive cardinality for pattern plan", )) @@ -69,7 +72,7 @@ impl Operator for PatternPlan { _rel_expr: &RelExpr, _child_index: usize, _required: &RequiredProperty, - ) -> common_exception::Result { + ) -> databend_common_exception::Result { unreachable!() } } diff --git a/src/query/sql/src/planner/plans/plan.rs b/src/query/sql/src/planner/plans/plan.rs index 4dc958c43dba..a0338c4b24ef 100644 --- a/src/query/sql/src/planner/plans/plan.rs +++ b/src/query/sql/src/planner/plans/plan.rs @@ -16,13 +16,13 @@ use std::fmt::Display; use std::fmt::Formatter; use std::sync::Arc; -use common_ast::ast::ExplainKind; -use common_catalog::query_kind::QueryKind; -use common_expression::types::DataType; -use common_expression::DataField; -use common_expression::DataSchema; -use common_expression::DataSchemaRef; -use common_expression::DataSchemaRefExt; +use databend_common_ast::ast::ExplainKind; +use databend_common_catalog::query_kind::QueryKind; +use databend_common_expression::types::DataType; +use databend_common_expression::DataField; +use databend_common_expression::DataSchema; +use databend_common_expression::DataSchemaRef; +use databend_common_expression::DataSchemaRefExt; use super::SetSecondaryRolesPlan; use crate::optimizer::SExpr; diff --git a/src/query/sql/src/planner/plans/presign.rs b/src/query/sql/src/planner/plans/presign.rs index 6af7385bf956..a147e5e9239c 100644 --- a/src/query/sql/src/planner/plans/presign.rs +++ b/src/query/sql/src/planner/plans/presign.rs @@ -14,11 +14,11 @@ use std::time::Duration; -use common_expression::types::DataType; -use common_expression::DataField; -use common_expression::DataSchemaRef; -use common_expression::DataSchemaRefExt; -use common_meta_app::principal::StageInfo; +use databend_common_expression::types::DataType; +use databend_common_expression::DataField; +use databend_common_expression::DataSchemaRef; +use databend_common_expression::DataSchemaRefExt; +use databend_common_meta_app::principal::StageInfo; #[derive(Debug, Clone, PartialEq, Eq)] pub enum PresignAction { diff --git a/src/query/sql/src/planner/plans/project_set.rs b/src/query/sql/src/planner/plans/project_set.rs index a85639eef3b9..2061044da3b4 100644 --- a/src/query/sql/src/planner/plans/project_set.rs +++ b/src/query/sql/src/planner/plans/project_set.rs @@ -15,7 +15,7 @@ use std::ops::Deref; use std::sync::Arc; -use common_catalog::table_context::TableContext; +use databend_common_catalog::table_context::TableContext; use crate::optimizer::PhysicalProperty; use crate::optimizer::RelExpr; @@ -51,7 +51,7 @@ impl Operator for ProjectSet { fn derive_relational_prop( &self, rel_expr: &RelExpr, - ) -> common_exception::Result> { + ) -> databend_common_exception::Result> { let child_prop = rel_expr.derive_relational_prop_child(0)?.as_ref().clone(); // Derive output columns @@ -91,11 +91,14 @@ impl Operator for ProjectSet { fn derive_physical_prop( &self, rel_expr: &RelExpr, - ) -> common_exception::Result { + ) -> databend_common_exception::Result { rel_expr.derive_physical_prop_child(0) } - fn derive_cardinality(&self, rel_expr: &RelExpr) -> common_exception::Result> { + fn derive_cardinality( + &self, + rel_expr: &RelExpr, + ) -> databend_common_exception::Result> { let mut input_stat = rel_expr.derive_cardinality_child(0)?.deref().clone(); // ProjectSet is set-returning functions, precise_cardinality set None input_stat.statistics.precise_cardinality = None; @@ -108,7 +111,7 @@ impl Operator for ProjectSet { _rel_expr: &RelExpr, _child_index: usize, required: &RequiredProperty, - ) -> common_exception::Result { + ) -> databend_common_exception::Result { Ok(required.clone()) } } diff --git a/src/query/sql/src/planner/plans/replace.rs b/src/query/sql/src/planner/plans/replace.rs index f64dea0b91c3..6976061d0029 100644 --- a/src/query/sql/src/planner/plans/replace.rs +++ b/src/query/sql/src/planner/plans/replace.rs @@ -14,11 +14,11 @@ use std::sync::Arc; -use common_ast::ast::Expr; -use common_expression::DataSchemaRef; -use common_expression::TableField; -use common_expression::TableSchemaRef; -use common_meta_types::MetaId; +use databend_common_ast::ast::Expr; +use databend_common_expression::DataSchemaRef; +use databend_common_expression::TableField; +use databend_common_expression::TableSchemaRef; +use databend_common_meta_types::MetaId; use crate::plans::InsertInputSource; diff --git a/src/query/sql/src/planner/plans/revert_table.rs b/src/query/sql/src/planner/plans/revert_table.rs index 59b960a491a2..a7c4dc2e1716 100644 --- a/src/query/sql/src/planner/plans/revert_table.rs +++ b/src/query/sql/src/planner/plans/revert_table.rs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_catalog::table::NavigationPoint; +use databend_common_catalog::table::NavigationPoint; #[derive(Clone, Debug)] pub struct RevertTablePlan { diff --git a/src/query/sql/src/planner/plans/scalar_expr.rs b/src/query/sql/src/planner/plans/scalar_expr.rs index fd0f1657699a..3c7ed84010c6 100644 --- a/src/query/sql/src/planner/plans/scalar_expr.rs +++ b/src/query/sql/src/planner/plans/scalar_expr.rs @@ -15,14 +15,14 @@ use std::hash::Hash; use std::hash::Hasher; -use common_ast::ast::BinaryOperator; -use common_exception::ErrorCode; -use common_exception::Range; -use common_exception::Result; -use common_exception::Span; -use common_expression::types::DataType; -use common_expression::RemoteExpr; -use common_expression::Scalar; +use databend_common_ast::ast::BinaryOperator; +use databend_common_exception::ErrorCode; +use databend_common_exception::Range; +use databend_common_exception::Result; +use databend_common_exception::Span; +use databend_common_expression::types::DataType; +use databend_common_expression::RemoteExpr; +use databend_common_expression::Scalar; use educe::Educe; use itertools::Itertools; diff --git a/src/query/sql/src/planner/plans/scan.rs b/src/query/sql/src/planner/plans/scan.rs index 905ccd651d5d..4002445a3f7b 100644 --- a/src/query/sql/src/planner/plans/scan.rs +++ b/src/query/sql/src/planner/plans/scan.rs @@ -16,11 +16,11 @@ use std::collections::HashMap; use std::collections::HashSet; use std::sync::Arc; -use common_catalog::statistics::BasicColumnStatistics; -use common_catalog::table::TableStatistics; -use common_catalog::table_context::TableContext; -use common_exception::Result; -use common_expression::TableSchemaRef; +use databend_common_catalog::statistics::BasicColumnStatistics; +use databend_common_catalog::table::TableStatistics; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::Result; +use databend_common_expression::TableSchemaRef; use itertools::Itertools; use super::ScalarItem; diff --git a/src/query/sql/src/planner/plans/share.rs b/src/query/sql/src/planner/plans/share.rs index 2a43a156656a..f459c7e21feb 100644 --- a/src/query/sql/src/planner/plans/share.rs +++ b/src/query/sql/src/planner/plans/share.rs @@ -16,19 +16,19 @@ use std::collections::BTreeMap; use std::sync::Arc; use chrono::Utc; -use common_expression::types::DataType; -use common_expression::DataField; -use common_expression::DataSchema; -use common_expression::DataSchemaRef; -use common_meta_app::share::CreateShareEndpointReq; -use common_meta_app::share::CreateShareReq; -use common_meta_app::share::DropShareEndpointReq; -use common_meta_app::share::DropShareReq; -use common_meta_app::share::GetShareEndpointReq; -use common_meta_app::share::ShareEndpointIdent; -use common_meta_app::share::ShareGrantObjectName; -use common_meta_app::share::ShareGrantObjectPrivilege; -use common_meta_app::share::ShareNameIdent; +use databend_common_expression::types::DataType; +use databend_common_expression::DataField; +use databend_common_expression::DataSchema; +use databend_common_expression::DataSchemaRef; +use databend_common_meta_app::share::CreateShareEndpointReq; +use databend_common_meta_app::share::CreateShareReq; +use databend_common_meta_app::share::DropShareEndpointReq; +use databend_common_meta_app::share::DropShareReq; +use databend_common_meta_app::share::GetShareEndpointReq; +use databend_common_meta_app::share::ShareEndpointIdent; +use databend_common_meta_app::share::ShareGrantObjectName; +use databend_common_meta_app::share::ShareGrantObjectPrivilege; +use databend_common_meta_app::share::ShareNameIdent; // Create Share endpoint Plan #[derive(Clone, Debug, PartialEq, Eq)] diff --git a/src/query/sql/src/planner/plans/sort.rs b/src/query/sql/src/planner/plans/sort.rs index b096c22dff56..28dbb6aaa286 100644 --- a/src/query/sql/src/planner/plans/sort.rs +++ b/src/query/sql/src/planner/plans/sort.rs @@ -14,8 +14,8 @@ use std::sync::Arc; -use common_catalog::table_context::TableContext; -use common_exception::Result; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::Result; use crate::optimizer::Distribution; use crate::optimizer::PhysicalProperty; diff --git a/src/query/sql/src/planner/plans/udf.rs b/src/query/sql/src/planner/plans/udf.rs index 0bf2cac57098..a8e9ca4561d0 100644 --- a/src/query/sql/src/planner/plans/udf.rs +++ b/src/query/sql/src/planner/plans/udf.rs @@ -14,8 +14,8 @@ use std::sync::Arc; -use common_catalog::table_context::TableContext; -use common_exception::Result; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::Result; use crate::optimizer::ColumnSet; use crate::optimizer::PhysicalProperty; diff --git a/src/query/sql/src/planner/plans/union_all.rs b/src/query/sql/src/planner/plans/union_all.rs index 979908dcd6d5..08c76152e2d3 100644 --- a/src/query/sql/src/planner/plans/union_all.rs +++ b/src/query/sql/src/planner/plans/union_all.rs @@ -14,8 +14,8 @@ use std::sync::Arc; -use common_catalog::table_context::TableContext; -use common_exception::Result; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::Result; use crate::optimizer::ColumnSet; use crate::optimizer::Distribution; diff --git a/src/query/sql/src/planner/plans/update.rs b/src/query/sql/src/planner/plans/update.rs index 9ffdd032d6bd..8ffbaaa88c50 100644 --- a/src/query/sql/src/planner/plans/update.rs +++ b/src/query/sql/src/planner/plans/update.rs @@ -16,19 +16,19 @@ use std::collections::BTreeMap; use std::collections::HashMap; use std::sync::Arc; -use common_catalog::table_context::TableContext; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::types::DataType; -use common_expression::ComputedExpr; -use common_expression::ConstantFolder; -use common_expression::DataSchema; -use common_expression::DataSchemaRef; -use common_expression::Expr; -use common_expression::FieldIndex; -use common_expression::RemoteExpr; -use common_expression::PREDICATE_COLUMN_NAME; -use common_functions::BUILTIN_FUNCTIONS; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::types::DataType; +use databend_common_expression::ComputedExpr; +use databend_common_expression::ConstantFolder; +use databend_common_expression::DataSchema; +use databend_common_expression::DataSchemaRef; +use databend_common_expression::Expr; +use databend_common_expression::FieldIndex; +use databend_common_expression::RemoteExpr; +use databend_common_expression::PREDICATE_COLUMN_NAME; +use databend_common_functions::BUILTIN_FUNCTIONS; use crate::binder::wrap_cast_scalar; use crate::binder::ColumnBindingBuilder; diff --git a/src/query/sql/src/planner/plans/window.rs b/src/query/sql/src/planner/plans/window.rs index df399687eee2..24f01e2e599d 100644 --- a/src/query/sql/src/planner/plans/window.rs +++ b/src/query/sql/src/planner/plans/window.rs @@ -16,13 +16,13 @@ use std::fmt::Display; use std::fmt::Formatter; use std::sync::Arc; -use common_catalog::table_context::TableContext; -use common_exception::ErrorCode; -use common_exception::Result; -use common_exception::Span; -use common_expression::types::DataType; -use common_expression::types::NumberDataType; -use common_expression::Scalar; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_exception::Span; +use databend_common_expression::types::DataType; +use databend_common_expression::types::NumberDataType; +use databend_common_expression::Scalar; use educe::Educe; use enum_as_inner::EnumAsInner; use serde::Deserialize; diff --git a/src/query/sql/src/planner/semantic/aggregate_rewriter.rs b/src/query/sql/src/planner/semantic/aggregate_rewriter.rs index 18cb6bf54975..ba64d2b45a7c 100644 --- a/src/query/sql/src/planner/semantic/aggregate_rewriter.rs +++ b/src/query/sql/src/planner/semantic/aggregate_rewriter.rs @@ -12,13 +12,13 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_ast::ast::BinaryOperator; -use common_ast::ast::Expr; -use common_ast::parser::parse_expr; -use common_ast::parser::tokenize_sql; -use common_ast::walk_expr_mut; -use common_ast::Dialect; -use common_ast::VisitorMut; +use databend_common_ast::ast::BinaryOperator; +use databend_common_ast::ast::Expr; +use databend_common_ast::parser::parse_expr; +use databend_common_ast::parser::tokenize_sql; +use databend_common_ast::walk_expr_mut; +use databend_common_ast::Dialect; +use databend_common_ast::VisitorMut; #[derive(Debug, Clone, Default)] pub struct AggregateRewriter { diff --git a/src/query/sql/src/planner/semantic/aggregating_index_visitor.rs b/src/query/sql/src/planner/semantic/aggregating_index_visitor.rs index 300560df7cd3..7f7ac59a25ed 100644 --- a/src/query/sql/src/planner/semantic/aggregating_index_visitor.rs +++ b/src/query/sql/src/planner/semantic/aggregating_index_visitor.rs @@ -12,27 +12,27 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_ast::ast::ColumnID; -use common_ast::ast::Expr; -use common_ast::ast::GroupBy; -use common_ast::ast::Identifier; -use common_ast::ast::Lambda; -use common_ast::ast::Literal; -use common_ast::ast::Query; -use common_ast::ast::SelectStmt; -use common_ast::ast::SelectTarget; -use common_ast::ast::SetExpr; -use common_ast::ast::TableReference; -use common_ast::ast::Window; -use common_ast::walk_expr; -use common_ast::walk_select_target; -use common_ast::walk_select_target_mut; -use common_ast::Visitor; -use common_ast::VisitorMut; -use common_exception::Span; -use common_expression::BLOCK_NAME_COL_NAME; -use common_functions::aggregates::AggregateFunctionFactory; -use common_functions::BUILTIN_FUNCTIONS; +use databend_common_ast::ast::ColumnID; +use databend_common_ast::ast::Expr; +use databend_common_ast::ast::GroupBy; +use databend_common_ast::ast::Identifier; +use databend_common_ast::ast::Lambda; +use databend_common_ast::ast::Literal; +use databend_common_ast::ast::Query; +use databend_common_ast::ast::SelectStmt; +use databend_common_ast::ast::SelectTarget; +use databend_common_ast::ast::SetExpr; +use databend_common_ast::ast::TableReference; +use databend_common_ast::ast::Window; +use databend_common_ast::walk_expr; +use databend_common_ast::walk_select_target; +use databend_common_ast::walk_select_target_mut; +use databend_common_ast::Visitor; +use databend_common_ast::VisitorMut; +use databend_common_exception::Span; +use databend_common_expression::BLOCK_NAME_COL_NAME; +use databend_common_functions::aggregates::AggregateFunctionFactory; +use databend_common_functions::BUILTIN_FUNCTIONS; use crate::planner::SUPPORTED_AGGREGATING_INDEX_FUNCTIONS; diff --git a/src/query/sql/src/planner/semantic/distinct_to_groupby.rs b/src/query/sql/src/planner/semantic/distinct_to_groupby.rs index 40ec105c67ea..1a2bb959dcab 100644 --- a/src/query/sql/src/planner/semantic/distinct_to_groupby.rs +++ b/src/query/sql/src/planner/semantic/distinct_to_groupby.rs @@ -12,17 +12,17 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_ast::ast::ColumnID; -use common_ast::ast::Expr; -use common_ast::ast::GroupBy; -use common_ast::ast::Identifier; -use common_ast::ast::Query; -use common_ast::ast::SelectStmt; -use common_ast::ast::SelectTarget; -use common_ast::ast::SetExpr; -use common_ast::ast::TableAlias; -use common_ast::ast::TableReference; -use common_ast::VisitorMut; +use databend_common_ast::ast::ColumnID; +use databend_common_ast::ast::Expr; +use databend_common_ast::ast::GroupBy; +use databend_common_ast::ast::Identifier; +use databend_common_ast::ast::Query; +use databend_common_ast::ast::SelectStmt; +use databend_common_ast::ast::SelectTarget; +use databend_common_ast::ast::SetExpr; +use databend_common_ast::ast::TableAlias; +use databend_common_ast::ast::TableReference; +use databend_common_ast::VisitorMut; #[derive(Debug, Clone, Default)] pub struct DistinctToGroupBy {} @@ -41,7 +41,7 @@ impl VisitorMut for DistinctToGroupBy { } = stmt; if group_by.is_none() && select_list.len() == 1 && from.len() == 1 { - if let common_ast::ast::SelectTarget::AliasedExpr { + if let databend_common_ast::ast::SelectTarget::AliasedExpr { expr: box Expr::FunctionCall { span, @@ -89,7 +89,7 @@ impl VisitorMut for DistinctToGroupBy { span: None, hints: None, distinct: false, - select_list: vec![common_ast::ast::SelectTarget::AliasedExpr { + select_list: vec![databend_common_ast::ast::SelectTarget::AliasedExpr { expr: Box::new(Expr::FunctionCall { span: None, distinct: false, diff --git a/src/query/sql/src/planner/semantic/grouping_check.rs b/src/query/sql/src/planner/semantic/grouping_check.rs index 39781ca2db1e..2e3ee6c7f8d9 100644 --- a/src/query/sql/src/planner/semantic/grouping_check.rs +++ b/src/query/sql/src/planner/semantic/grouping_check.rs @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_exception::ErrorCode; -use common_exception::Result; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; use crate::binder::ColumnBindingBuilder; use crate::binder::Visibility; diff --git a/src/query/sql/src/planner/semantic/lowering.rs b/src/query/sql/src/planner/semantic/lowering.rs index 2d935412e843..dfaad7b13512 100644 --- a/src/query/sql/src/planner/semantic/lowering.rs +++ b/src/query/sql/src/planner/semantic/lowering.rs @@ -14,15 +14,15 @@ use std::collections::HashMap; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::type_check; -use common_expression::types::DataType; -use common_expression::ColumnIndex; -use common_expression::DataSchema; -use common_expression::Expr; -use common_expression::RawExpr; -use common_functions::BUILTIN_FUNCTIONS; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::type_check; +use databend_common_expression::types::DataType; +use databend_common_expression::ColumnIndex; +use databend_common_expression::DataSchema; +use databend_common_expression::Expr; +use databend_common_expression::RawExpr; +use databend_common_functions::BUILTIN_FUNCTIONS; use crate::binder::ColumnBindingBuilder; use crate::plans::ScalarExpr; diff --git a/src/query/sql/src/planner/semantic/name_resolution.rs b/src/query/sql/src/planner/semantic/name_resolution.rs index 407428cd5455..f16a1a307417 100644 --- a/src/query/sql/src/planner/semantic/name_resolution.rs +++ b/src/query/sql/src/planner/semantic/name_resolution.rs @@ -12,9 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_ast::ast::Identifier; -use common_ast::VisitorMut; -use common_settings::Settings; +use databend_common_ast::ast::Identifier; +use databend_common_ast::VisitorMut; +use databend_common_settings::Settings; #[derive(Debug, Clone)] pub struct NameResolutionContext { @@ -34,9 +34,9 @@ impl Default for NameResolutionContext { } impl TryFrom<&Settings> for NameResolutionContext { - type Error = common_exception::ErrorCode; + type Error = databend_common_exception::ErrorCode; - fn try_from(settings: &Settings) -> common_exception::Result { + fn try_from(settings: &Settings) -> databend_common_exception::Result { let unquoted_ident_case_sensitive = settings.get_unquoted_ident_case_sensitive()?; let quoted_ident_case_sensitive = settings.get_quoted_ident_case_sensitive()?; diff --git a/src/query/sql/src/planner/semantic/type_check.rs b/src/query/sql/src/planner/semantic/type_check.rs index f9d603a7ed67..e47550676a06 100644 --- a/src/query/sql/src/planner/semantic/type_check.rs +++ b/src/query/sql/src/planner/semantic/type_check.rs @@ -17,61 +17,61 @@ use std::collections::VecDeque; use std::sync::Arc; use std::vec; -use common_ast::ast::BinaryOperator; -use common_ast::ast::ColumnID; -use common_ast::ast::Expr; -use common_ast::ast::Identifier; -use common_ast::ast::IntervalKind as ASTIntervalKind; -use common_ast::ast::Lambda; -use common_ast::ast::Literal; -use common_ast::ast::MapAccessor; -use common_ast::ast::Query; -use common_ast::ast::SubqueryModifier; -use common_ast::ast::TrimWhere; -use common_ast::ast::TypeName; -use common_ast::ast::UnaryOperator; -use common_ast::ast::Window; -use common_ast::ast::WindowFrame; -use common_ast::ast::WindowFrameBound; -use common_ast::ast::WindowFrameUnits; -use common_ast::parser::parse_expr; -use common_ast::parser::tokenize_sql; -use common_ast::Dialect; -use common_catalog::catalog::CatalogManager; -use common_catalog::table_context::TableContext; -use common_config::GlobalConfig; -use common_exception::ErrorCode; -use common_exception::Result; -use common_exception::Span; -use common_expression::infer_schema_type; -use common_expression::shrink_scalar; -use common_expression::type_check; -use common_expression::type_check::check_number; -use common_expression::types::decimal::DecimalDataType; -use common_expression::types::decimal::DecimalScalar; -use common_expression::types::decimal::DecimalSize; -use common_expression::types::DataType; -use common_expression::types::NumberDataType; -use common_expression::types::NumberScalar; -use common_expression::ColumnIndex; -use common_expression::ConstantFolder; -use common_expression::DataField; -use common_expression::DataSchema; -use common_expression::Expr as EExpr; -use common_expression::FunctionContext; -use common_expression::FunctionKind; -use common_expression::RawExpr; -use common_expression::Scalar; -use common_expression::TableDataType; -use common_functions::aggregates::AggregateFunctionFactory; -use common_functions::is_builtin_function; -use common_functions::BUILTIN_FUNCTIONS; -use common_functions::GENERAL_LAMBDA_FUNCTIONS; -use common_functions::GENERAL_WINDOW_FUNCTIONS; -use common_meta_app::principal::LambdaUDF; -use common_meta_app::principal::UDFDefinition; -use common_meta_app::principal::UDFServer; -use common_users::UserApiProvider; +use databend_common_ast::ast::BinaryOperator; +use databend_common_ast::ast::ColumnID; +use databend_common_ast::ast::Expr; +use databend_common_ast::ast::Identifier; +use databend_common_ast::ast::IntervalKind as ASTIntervalKind; +use databend_common_ast::ast::Lambda; +use databend_common_ast::ast::Literal; +use databend_common_ast::ast::MapAccessor; +use databend_common_ast::ast::Query; +use databend_common_ast::ast::SubqueryModifier; +use databend_common_ast::ast::TrimWhere; +use databend_common_ast::ast::TypeName; +use databend_common_ast::ast::UnaryOperator; +use databend_common_ast::ast::Window; +use databend_common_ast::ast::WindowFrame; +use databend_common_ast::ast::WindowFrameBound; +use databend_common_ast::ast::WindowFrameUnits; +use databend_common_ast::parser::parse_expr; +use databend_common_ast::parser::tokenize_sql; +use databend_common_ast::Dialect; +use databend_common_catalog::catalog::CatalogManager; +use databend_common_catalog::table_context::TableContext; +use databend_common_config::GlobalConfig; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_exception::Span; +use databend_common_expression::infer_schema_type; +use databend_common_expression::shrink_scalar; +use databend_common_expression::type_check; +use databend_common_expression::type_check::check_number; +use databend_common_expression::types::decimal::DecimalDataType; +use databend_common_expression::types::decimal::DecimalScalar; +use databend_common_expression::types::decimal::DecimalSize; +use databend_common_expression::types::DataType; +use databend_common_expression::types::NumberDataType; +use databend_common_expression::types::NumberScalar; +use databend_common_expression::ColumnIndex; +use databend_common_expression::ConstantFolder; +use databend_common_expression::DataField; +use databend_common_expression::DataSchema; +use databend_common_expression::Expr as EExpr; +use databend_common_expression::FunctionContext; +use databend_common_expression::FunctionKind; +use databend_common_expression::RawExpr; +use databend_common_expression::Scalar; +use databend_common_expression::TableDataType; +use databend_common_functions::aggregates::AggregateFunctionFactory; +use databend_common_functions::is_builtin_function; +use databend_common_functions::BUILTIN_FUNCTIONS; +use databend_common_functions::GENERAL_LAMBDA_FUNCTIONS; +use databend_common_functions::GENERAL_WINDOW_FUNCTIONS; +use databend_common_meta_app::principal::LambdaUDF; +use databend_common_meta_app::principal::UDFDefinition; +use databend_common_meta_app::principal::UDFServer; +use databend_common_users::UserApiProvider; use indexmap::IndexMap; use itertools::Itertools; use jsonb::keypath::KeyPath; @@ -1051,10 +1051,10 @@ impl<'a> TypeChecker<'a> { // TODO: remove this function fn rewrite_substring(args: &mut [ScalarExpr]) { if let ScalarExpr::ConstantExpr(expr) = &args[1] { - if let common_expression::Scalar::Number(NumberScalar::UInt8(0)) = expr.value { + if let databend_common_expression::Scalar::Number(NumberScalar::UInt8(0)) = expr.value { args[1] = ConstantExpr { span: expr.span, - value: common_expression::Scalar::Number(NumberScalar::Int64(1)), + value: databend_common_expression::Scalar::Number(NumberScalar::Int64(1)), } .into(); } @@ -1171,7 +1171,7 @@ impl<'a> TypeChecker<'a> { fn resolve_literal( &self, span: Span, - literal: &common_ast::ast::Literal, + literal: &databend_common_ast::ast::Literal, ) -> Result> { let box (value, data_type) = self.resolve_literal_scalar(literal)?; @@ -1234,7 +1234,7 @@ impl<'a> TypeChecker<'a> { let box (expr, _) = self.resolve(expr).await?; let (expr, _) = ConstantFolder::fold(&expr.as_expr()?, &self.func_ctx, &BUILTIN_FUNCTIONS); - if let common_expression::Expr::Constant { scalar, .. } = expr { + if let databend_common_expression::Expr::Constant { scalar, .. } = expr { Ok(Some(scalar)) } else { Err(ErrorCode::SemanticError( @@ -1903,7 +1903,7 @@ impl<'a> TypeChecker<'a> { // the implicitly casted literal values, e.g. `timestamp > '2001-01-01'` // will be folded from `timestamp > to_timestamp('2001-01-01')` to `timestamp > 978307200000000` let folded_args = match &expr { - common_expression::Expr::FunctionCall { + databend_common_expression::Expr::FunctionCall { args: checked_args, .. } => { let mut folded_args = Vec::with_capacity(args.len()); @@ -2606,7 +2606,7 @@ impl<'a> TypeChecker<'a> { } else { let trim_scalar = ConstantExpr { span, - value: common_expression::Scalar::String(" ".as_bytes().to_vec()), + value: databend_common_expression::Scalar::String(" ".as_bytes().to_vec()), } .into(); ("trim_both", trim_scalar, DataType::String) @@ -2621,7 +2621,7 @@ impl<'a> TypeChecker<'a> { /// Resolve literal values. pub fn resolve_literal_scalar( &self, - literal: &common_ast::ast::Literal, + literal: &databend_common_ast::ast::Literal, ) -> Result> { let value = match literal { Literal::UInt64(value) => Scalar::Number(NumberScalar::UInt64(*value)), @@ -3599,10 +3599,10 @@ impl<'a> TypeChecker<'a> { fn try_fold_constant( &self, - expr: &common_expression::Expr, + expr: &databend_common_expression::Expr, ) -> Option> { if expr.is_deterministic(&BUILTIN_FUNCTIONS) { - if let (common_expression::Expr::Constant { scalar, .. }, _) = + if let (databend_common_expression::Expr::Constant { scalar, .. }, _) = ConstantFolder::fold(expr, &self.func_ctx, &BUILTIN_FUNCTIONS) { let scalar = shrink_scalar(scalar); @@ -3623,11 +3623,11 @@ impl<'a> TypeChecker<'a> { } pub fn resolve_type_name_by_str(name: &str, not_null: bool) -> Result { - let sql_tokens = common_ast::parser::tokenize_sql(name)?; - let backtrace = common_ast::Backtrace::new(); - match common_ast::parser::expr::type_name(common_ast::Input( + let sql_tokens = databend_common_ast::parser::tokenize_sql(name)?; + let backtrace = databend_common_ast::Backtrace::new(); + match databend_common_ast::parser::expr::type_name(databend_common_ast::Input( &sql_tokens, - common_ast::Dialect::default(), + databend_common_ast::Dialect::default(), &backtrace, )) { Ok((_, typename)) => resolve_type_name(&typename, not_null), diff --git a/src/query/sql/src/planner/semantic/udf_rewriter.rs b/src/query/sql/src/planner/semantic/udf_rewriter.rs index f9bab37fb40a..ca3aacfc1782 100644 --- a/src/query/sql/src/planner/semantic/udf_rewriter.rs +++ b/src/query/sql/src/planner/semantic/udf_rewriter.rs @@ -16,8 +16,8 @@ use std::collections::HashMap; use std::mem; use std::sync::Arc; -use common_exception::ErrorCode; -use common_exception::Result; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; use crate::optimizer::SExpr; use crate::plans::walk_expr_mut; diff --git a/src/query/sql/src/planner/semantic/view_rewriter.rs b/src/query/sql/src/planner/semantic/view_rewriter.rs index 93633f9c8d29..43816aed957a 100644 --- a/src/query/sql/src/planner/semantic/view_rewriter.rs +++ b/src/query/sql/src/planner/semantic/view_rewriter.rs @@ -12,10 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_ast::ast::Identifier; -use common_ast::ast::TableReference; -use common_ast::walk_table_reference_mut; -use common_ast::VisitorMut; +use databend_common_ast::ast::Identifier; +use databend_common_ast::ast::TableReference; +use databend_common_ast::walk_table_reference_mut; +use databend_common_ast::VisitorMut; #[derive(Debug, Clone, Default)] pub struct ViewRewriter { diff --git a/src/query/sql/src/planner/semantic/virtual_column_rewriter.rs b/src/query/sql/src/planner/semantic/virtual_column_rewriter.rs index 5536ad07ba01..b2cc21e59f20 100644 --- a/src/query/sql/src/planner/semantic/virtual_column_rewriter.rs +++ b/src/query/sql/src/planner/semantic/virtual_column_rewriter.rs @@ -15,13 +15,13 @@ use std::collections::HashMap; use std::sync::Arc; -use common_catalog::table_context::TableContext; -use common_exception::Result; -use common_expression::types::DataType; -use common_expression::Scalar; -use common_expression::TableDataType; -use common_license::license::Feature::VirtualColumn; -use common_license::license_manager::get_license_manager; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::Result; +use databend_common_expression::types::DataType; +use databend_common_expression::Scalar; +use databend_common_expression::TableDataType; +use databend_common_license::license::Feature::VirtualColumn; +use databend_common_license::license_manager::get_license_manager; use jsonb::keypath::parse_key_paths; use jsonb::keypath::KeyPath; diff --git a/src/query/sql/src/planner/semantic/window_check.rs b/src/query/sql/src/planner/semantic/window_check.rs index 245a443cc0c9..803f02e7121d 100644 --- a/src/query/sql/src/planner/semantic/window_check.rs +++ b/src/query/sql/src/planner/semantic/window_check.rs @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_exception::ErrorCode; -use common_exception::Result; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; use crate::binder::ColumnBindingBuilder; use crate::plans::walk_expr_mut; diff --git a/src/query/sql/src/planner/stream_column.rs b/src/query/sql/src/planner/stream_column.rs index b740212ed466..f696c22edfe2 100644 --- a/src/query/sql/src/planner/stream_column.rs +++ b/src/query/sql/src/planner/stream_column.rs @@ -14,13 +14,13 @@ use std::sync::Arc; -use common_catalog::plan::StreamColumn; -use common_catalog::plan::StreamColumnType; -use common_exception::Result; -use common_expression::TableSchema; -use common_expression::ORIGIN_BLOCK_ID_COL_NAME; -use common_expression::ORIGIN_BLOCK_ROW_NUM_COL_NAME; -use common_expression::ORIGIN_VERSION_COL_NAME; +use databend_common_catalog::plan::StreamColumn; +use databend_common_catalog::plan::StreamColumnType; +use databend_common_exception::Result; +use databend_common_expression::TableSchema; +use databend_common_expression::ORIGIN_BLOCK_ID_COL_NAME; +use databend_common_expression::ORIGIN_BLOCK_ROW_NUM_COL_NAME; +use databend_common_expression::ORIGIN_VERSION_COL_NAME; use crate::evaluator::BlockOperator; use crate::plans::BoundColumnRef; diff --git a/src/query/sql/src/planner/udf_validator.rs b/src/query/sql/src/planner/udf_validator.rs index ff9941231fc4..7c1b2f94b732 100644 --- a/src/query/sql/src/planner/udf_validator.rs +++ b/src/query/sql/src/planner/udf_validator.rs @@ -14,18 +14,18 @@ use std::collections::HashSet; -use common_ast::ast::ColumnID; -use common_ast::ast::Expr; -use common_ast::ast::Identifier; -use common_ast::ast::Lambda; -use common_ast::ast::Literal; -use common_ast::ast::Window; -use common_ast::walk_expr; -use common_ast::Visitor; -use common_exception::ErrorCode; -use common_exception::Result; -use common_exception::Span; -use common_functions::is_builtin_function; +use databend_common_ast::ast::ColumnID; +use databend_common_ast::ast::Expr; +use databend_common_ast::ast::Identifier; +use databend_common_ast::ast::Lambda; +use databend_common_ast::ast::Literal; +use databend_common_ast::ast::Window; +use databend_common_ast::walk_expr; +use databend_common_ast::Visitor; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_exception::Span; +use databend_common_functions::is_builtin_function; #[derive(Default)] pub struct UDFValidator { diff --git a/src/query/sql/tests/block_operator.rs b/src/query/sql/tests/block_operator.rs index 36bb083d3fc8..e74d67e54687 100644 --- a/src/query/sql/tests/block_operator.rs +++ b/src/query/sql/tests/block_operator.rs @@ -12,19 +12,19 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_expression::type_check::check; -use common_expression::types::DataType; -use common_expression::types::NumberDataType; -use common_expression::types::NumberScalar; -use common_expression::DataField; -use common_expression::DataSchemaRefExt; -use common_expression::Expr; -use common_expression::RawExpr; -use common_expression::Scalar; -use common_functions::BUILTIN_FUNCTIONS; -use common_sql::evaluator::apply_cse; -use common_sql::evaluator::BlockOperator; -use common_sql::optimizer::ColumnSet; +use databend_common_expression::type_check::check; +use databend_common_expression::types::DataType; +use databend_common_expression::types::NumberDataType; +use databend_common_expression::types::NumberScalar; +use databend_common_expression::DataField; +use databend_common_expression::DataSchemaRefExt; +use databend_common_expression::Expr; +use databend_common_expression::RawExpr; +use databend_common_expression::Scalar; +use databend_common_functions::BUILTIN_FUNCTIONS; +use databend_common_sql::evaluator::apply_cse; +use databend_common_sql::evaluator::BlockOperator; +use databend_common_sql::optimizer::ColumnSet; use itertools::Itertools; #[test] diff --git a/src/query/sql/tests/location.rs b/src/query/sql/tests/location.rs index ab3355441370..0b6ee4f63730 100644 --- a/src/query/sql/tests/location.rs +++ b/src/query/sql/tests/location.rs @@ -19,24 +19,24 @@ mod optimizer; use std::collections::BTreeMap; use anyhow::Result; -use common_ast::ast::UriLocation; -use common_base::base::tokio; -use common_base::base::GlobalInstance; -use common_config::GlobalConfig; -use common_config::InnerConfig; -use common_meta_app::storage::StorageFsConfig; -// use common_storage::StorageFtpConfig; -use common_meta_app::storage::StorageGcsConfig; -use common_meta_app::storage::StorageHttpConfig; -use common_meta_app::storage::StorageIpfsConfig; -use common_meta_app::storage::StorageOssConfig; -use common_meta_app::storage::StorageParams; -use common_meta_app::storage::StorageS3Config; -use common_meta_app::storage::StorageWebhdfsConfig; -use common_meta_app::storage::STORAGE_GCS_DEFAULT_ENDPOINT; -use common_meta_app::storage::STORAGE_IPFS_DEFAULT_ENDPOINT; -use common_meta_app::storage::STORAGE_S3_DEFAULT_ENDPOINT; -use common_sql::planner::binder::parse_uri_location; +use databend_common_ast::ast::UriLocation; +use databend_common_base::base::tokio; +use databend_common_base::base::GlobalInstance; +use databend_common_config::GlobalConfig; +use databend_common_config::InnerConfig; +use databend_common_meta_app::storage::StorageFsConfig; +// use databend_common_storage::StorageFtpConfig; +use databend_common_meta_app::storage::StorageGcsConfig; +use databend_common_meta_app::storage::StorageHttpConfig; +use databend_common_meta_app::storage::StorageIpfsConfig; +use databend_common_meta_app::storage::StorageOssConfig; +use databend_common_meta_app::storage::StorageParams; +use databend_common_meta_app::storage::StorageS3Config; +use databend_common_meta_app::storage::StorageWebhdfsConfig; +use databend_common_meta_app::storage::STORAGE_GCS_DEFAULT_ENDPOINT; +use databend_common_meta_app::storage::STORAGE_IPFS_DEFAULT_ENDPOINT; +use databend_common_meta_app::storage::STORAGE_S3_DEFAULT_ENDPOINT; +use databend_common_sql::planner::binder::parse_uri_location; #[tokio::test] async fn test_parse_uri_location() -> Result<()> { diff --git a/src/query/sql/tests/optimizer/histogram.rs b/src/query/sql/tests/optimizer/histogram.rs index 8154e9f5ea69..76bc4ad0dabe 100644 --- a/src/query/sql/tests/optimizer/histogram.rs +++ b/src/query/sql/tests/optimizer/histogram.rs @@ -12,9 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_sql::optimizer::Histogram; -use common_sql::optimizer::HistogramBucket; -use common_storage::Datum; +use databend_common_sql::optimizer::Histogram; +use databend_common_sql::optimizer::HistogramBucket; +use databend_common_storage::Datum; #[test] fn test_histogram() { diff --git a/src/query/storages/common/blocks/Cargo.toml b/src/query/storages/common/blocks/Cargo.toml index 1c65a04863ce..d1402b832ebd 100644 --- a/src/query/storages/common/blocks/Cargo.toml +++ b/src/query/storages/common/blocks/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "storages-common-blocks" +name = "databend-storages-common-blocks" version = { workspace = true } authors = { workspace = true } license = { workspace = true } @@ -12,11 +12,11 @@ doctest = false test = false [dependencies] -common-arrow = { path = "../../../../common/arrow" } -common-config = { path = "../../../config" } -common-exception = { path = "../../../../common/exception" } -common-expression = { path = "../../../expression" } +databend-common-arrow = { path = "../../../../common/arrow" } +databend-common-config = { path = "../../../config" } +databend-common-exception = { path = "../../../../common/exception" } +databend-common-expression = { path = "../../../expression" } -storages-common-table-meta = { path = "../table_meta" } +databend-storages-common-table-meta = { path = "../table_meta" } [build-dependencies] diff --git a/src/query/storages/common/blocks/src/block.rs b/src/query/storages/common/blocks/src/block.rs index 7d5892fe5d81..ceb33e3c4bc6 100644 --- a/src/query/storages/common/blocks/src/block.rs +++ b/src/query/storages/common/blocks/src/block.rs @@ -12,21 +12,21 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_arrow::arrow::chunk::Chunk; -use common_arrow::arrow::datatypes::DataType as ArrowDataType; -use common_arrow::arrow::io::parquet::write::transverse; -use common_arrow::arrow::io::parquet::write::RowGroupIterator; -use common_arrow::arrow::io::parquet::write::WriteOptions; -use common_arrow::parquet::encoding::Encoding; -use common_arrow::parquet::metadata::ThriftFileMetaData; -use common_arrow::parquet::write::Version; -use common_arrow::write_parquet_file; -use common_config::DATABEND_COMMIT_VERSION; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::DataBlock; -use common_expression::TableSchema; -use storages_common_table_meta::table::TableCompression; +use databend_common_arrow::arrow::chunk::Chunk; +use databend_common_arrow::arrow::datatypes::DataType as ArrowDataType; +use databend_common_arrow::arrow::io::parquet::write::transverse; +use databend_common_arrow::arrow::io::parquet::write::RowGroupIterator; +use databend_common_arrow::arrow::io::parquet::write::WriteOptions; +use databend_common_arrow::parquet::encoding::Encoding; +use databend_common_arrow::parquet::metadata::ThriftFileMetaData; +use databend_common_arrow::parquet::write::Version; +use databend_common_arrow::write_parquet_file; +use databend_common_config::DATABEND_COMMIT_VERSION; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::DataBlock; +use databend_common_expression::TableSchema; +use databend_storages_common_table_meta::table::TableCompression; /// Serialize data blocks to parquet format. pub fn blocks_to_parquet( @@ -66,7 +66,7 @@ pub fn blocks_to_parquet( encodings, )?; - use common_arrow::parquet::write::WriteOptions as FileWriteOption; + use databend_common_arrow::parquet::write::WriteOptions as FileWriteOption; let options = FileWriteOption { write_statistics: false, version: Version::V2, diff --git a/src/query/storages/common/cache/Cargo.toml b/src/query/storages/common/cache/Cargo.toml index 8a0c01e4cf7a..a2a8c111587c 100644 --- a/src/query/storages/common/cache/Cargo.toml +++ b/src/query/storages/common/cache/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "storages-common-cache" +name = "databend-storages-common-cache" version = { workspace = true } authors = { workspace = true } license = { workspace = true } @@ -13,9 +13,9 @@ test = false [dependencies] bytes = { workspace = true } -common-cache = { path = "../../../../common/cache" } -common-exception = { path = "../../../../common/exception" } -common-metrics = { path = "../../../../common/metrics" } +databend-common-cache = { path = "../../../../common/cache" } +databend-common-exception = { path = "../../../../common/exception" } +databend-common-metrics = { path = "../../../../common/metrics" } async-backtrace = { workspace = true } async-trait = { workspace = true } diff --git a/src/query/storages/common/cache/src/cache.rs b/src/query/storages/common/cache/src/cache.rs index 71e50e40fb57..b3cd6620e8eb 100644 --- a/src/query/storages/common/cache/src/cache.rs +++ b/src/query/storages/common/cache/src/cache.rs @@ -16,10 +16,10 @@ use std::hash::BuildHasher; use std::hash::Hash; use std::sync::Arc; -use common_cache::Count; -use common_cache::CountableMeter; -use common_cache::DefaultHashBuilder; -use common_metrics::cache::*; +use databend_common_cache::Count; +use databend_common_cache::CountableMeter; +use databend_common_cache::DefaultHashBuilder; +use databend_common_metrics::cache::*; // The cache accessor, crate users usually working on this interface while manipulating caches pub trait CacheAccessor diff --git a/src/query/storages/common/cache/src/providers/disk_cache.rs b/src/query/storages/common/cache/src/providers/disk_cache.rs index 6e61ff12c00c..6426cefa12c1 100644 --- a/src/query/storages/common/cache/src/providers/disk_cache.rs +++ b/src/query/storages/common/cache/src/providers/disk_cache.rs @@ -23,13 +23,13 @@ use std::path::PathBuf; use std::sync::Arc; use bytes::Bytes; -use common_cache::Cache; -use common_cache::Count; -use common_cache::DefaultHashBuilder; -use common_cache::FileSize; -use common_cache::LruCache; -use common_exception::ErrorCode; -use common_exception::Result; +use databend_common_cache::Cache; +use databend_common_cache::Count; +use databend_common_cache::DefaultHashBuilder; +use databend_common_cache::FileSize; +use databend_common_cache::LruCache; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; use log::error; use log::warn; use parking_lot::RwLock; @@ -259,7 +259,9 @@ pub mod result { use result::*; -impl CacheAccessor for LruDiskCacheHolder { +impl CacheAccessor + for LruDiskCacheHolder +{ fn get>(&self, k: Q) -> Option> { let k = k.as_ref(); { diff --git a/src/query/storages/common/cache/src/providers/memory_cache.rs b/src/query/storages/common/cache/src/providers/memory_cache.rs index fcc3e119f3d3..ae846dc68106 100644 --- a/src/query/storages/common/cache/src/providers/memory_cache.rs +++ b/src/query/storages/common/cache/src/providers/memory_cache.rs @@ -16,12 +16,12 @@ use std::hash::BuildHasher; use std::sync::Arc; use bytes::Bytes; -use common_cache::BytesMeter; -use common_cache::Cache; -use common_cache::Count; -use common_cache::CountableMeter; -use common_cache::DefaultHashBuilder; -use common_cache::LruCache; +use databend_common_cache::BytesMeter; +use databend_common_cache::Cache; +use databend_common_cache::Count; +use databend_common_cache::CountableMeter; +use databend_common_cache::DefaultHashBuilder; +use databend_common_cache::LruCache; use parking_lot::RwLock; pub type InMemoryCache = LruCache, S, M>; diff --git a/src/query/storages/common/cache/src/providers/table_data_cache.rs b/src/query/storages/common/cache/src/providers/table_data_cache.rs index 2c6649f00748..50436b498d80 100644 --- a/src/query/storages/common/cache/src/providers/table_data_cache.rs +++ b/src/query/storages/common/cache/src/providers/table_data_cache.rs @@ -17,12 +17,12 @@ use std::sync::Arc; use std::thread::JoinHandle; use bytes::Bytes; -use common_cache::Count; -use common_cache::DefaultHashBuilder; -use common_exception::ErrorCode; -use common_exception::Result; -use common_metrics::cache::*; use crossbeam_channel::TrySendError; +use databend_common_cache::Count; +use databend_common_cache::DefaultHashBuilder; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_metrics::cache::*; use log::error; use log::info; diff --git a/src/query/storages/common/cache/src/read/cached_reader.rs b/src/query/storages/common/cache/src/read/cached_reader.rs index b24dbb28632f..b723c2d9385c 100644 --- a/src/query/storages/common/cache/src/read/cached_reader.rs +++ b/src/query/storages/common/cache/src/read/cached_reader.rs @@ -16,9 +16,9 @@ use std::hash::BuildHasher; use std::sync::Arc; use std::time::Instant; -use common_cache::CountableMeter; -use common_exception::Result; -use common_metrics::cache::*; +use databend_common_cache::CountableMeter; +use databend_common_exception::Result; +use databend_common_metrics::cache::*; use parking_lot::RwLock; use super::loader::LoadParams; diff --git a/src/query/storages/common/cache/src/read/loader.rs b/src/query/storages/common/cache/src/read/loader.rs index 9a70be30ff2f..cbc4b67e18ff 100644 --- a/src/query/storages/common/cache/src/read/loader.rs +++ b/src/query/storages/common/cache/src/read/loader.rs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_exception::Result; +use databend_common_exception::Result; pub struct LoadParams { pub location: String, diff --git a/src/query/storages/common/cache/src/read/readers.rs b/src/query/storages/common/cache/src/read/readers.rs index 554ed0ab1f29..1648b0fc105a 100644 --- a/src/query/storages/common/cache/src/read/readers.rs +++ b/src/query/storages/common/cache/src/read/readers.rs @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_cache::Count; -use common_cache::DefaultHashBuilder; +use databend_common_cache::Count; +use databend_common_cache::DefaultHashBuilder; use crate::read::cached_reader::CachedReader; use crate::InMemoryBytesCacheHolder; diff --git a/src/query/storages/common/cache/tests/it/providers/disk_cache.rs b/src/query/storages/common/cache/tests/it/providers/disk_cache.rs index e049725e723c..fdc29a7564ca 100644 --- a/src/query/storages/common/cache/tests/it/providers/disk_cache.rs +++ b/src/query/storages/common/cache/tests/it/providers/disk_cache.rs @@ -18,10 +18,10 @@ use std::io::Read; use std::path::Path; use std::path::PathBuf; -use storages_common_cache::DiskCacheError; -use storages_common_cache::DiskCacheKey; -use storages_common_cache::DiskCacheResult; -use storages_common_cache::LruDiskCache as DiskCache; +use databend_storages_common_cache::DiskCacheError; +use databend_storages_common_cache::DiskCacheKey; +use databend_storages_common_cache::DiskCacheResult; +use databend_storages_common_cache::LruDiskCache as DiskCache; use tempfile::TempDir; struct TestFixture { diff --git a/src/query/storages/common/cache_manager/Cargo.toml b/src/query/storages/common/cache_manager/Cargo.toml index 33384ad7ae34..c4195ff1b003 100644 --- a/src/query/storages/common/cache_manager/Cargo.toml +++ b/src/query/storages/common/cache_manager/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "storages-common-cache-manager" +name = "databend-storages-common-cache-manager" version = { workspace = true } authors = { workspace = true } license = { workspace = true } @@ -9,14 +9,14 @@ edition = { workspace = true } [features] [dependencies] -common-arrow = { path = "../../../../common/arrow" } -common-base = { path = "../../../../common/base" } -common-cache = { path = "../../../../common/cache" } -common-catalog = { path = "../../../catalog" } -common-config = { path = "../../../config" } -common-exception = { path = "../../../../common/exception" } -storages-common-cache = { path = "../../common/cache" } -storages-common-index = { path = "../../common/index" } -storages-common-table-meta = { path = "../table_meta" } +databend-common-arrow = { path = "../../../../common/arrow" } +databend-common-base = { path = "../../../../common/base" } +databend-common-cache = { path = "../../../../common/cache" } +databend-common-catalog = { path = "../../../catalog" } +databend-common-config = { path = "../../../config" } +databend-common-exception = { path = "../../../../common/exception" } +databend-storages-common-cache = { path = "../../common/cache" } +databend-storages-common-index = { path = "../../common/index" } +databend-storages-common-table-meta = { path = "../table_meta" } log = { workspace = true } diff --git a/src/query/storages/common/cache_manager/src/cache_manager.rs b/src/query/storages/common/cache_manager/src/cache_manager.rs index 57d887e0c7ae..758d4fbfa47e 100644 --- a/src/query/storages/common/cache_manager/src/cache_manager.rs +++ b/src/query/storages/common/cache_manager/src/cache_manager.rs @@ -15,19 +15,19 @@ use std::path::PathBuf; use std::sync::Arc; -use common_base::base::GlobalInstance; -use common_cache::CountableMeter; -use common_cache::DefaultHashBuilder; -use common_config::CacheConfig; -use common_config::CacheStorageTypeInnerConfig; -use common_exception::Result; +use databend_common_base::base::GlobalInstance; +use databend_common_cache::CountableMeter; +use databend_common_cache::DefaultHashBuilder; +use databend_common_config::CacheConfig; +use databend_common_config::CacheStorageTypeInnerConfig; +use databend_common_exception::Result; +use databend_storages_common_cache::InMemoryCacheBuilder; +use databend_storages_common_cache::InMemoryItemCacheHolder; +use databend_storages_common_cache::Named; +use databend_storages_common_cache::NamedCache; +use databend_storages_common_cache::TableDataCache; +use databend_storages_common_cache::TableDataCacheBuilder; use log::info; -use storages_common_cache::InMemoryCacheBuilder; -use storages_common_cache::InMemoryItemCacheHolder; -use storages_common_cache::Named; -use storages_common_cache::NamedCache; -use storages_common_cache::TableDataCache; -use storages_common_cache::TableDataCacheBuilder; use crate::caches::BloomIndexFilterCache; use crate::caches::BloomIndexMetaCache; diff --git a/src/query/storages/common/cache_manager/src/caches.rs b/src/query/storages/common/cache_manager/src/caches.rs index cdcfc7b9abe7..e3465b036ce3 100644 --- a/src/query/storages/common/cache_manager/src/caches.rs +++ b/src/query/storages/common/cache_manager/src/caches.rs @@ -16,22 +16,22 @@ use std::borrow::Borrow; use std::hash::BuildHasher; use std::sync::Arc; -use common_arrow::parquet::metadata::FileMetaData; -use common_cache::Count; -use common_cache::CountableMeter; -use common_cache::DefaultHashBuilder; -use common_cache::Meter; -use common_catalog::plan::PartStatistics; -use common_catalog::plan::Partitions; -use storages_common_cache::CacheAccessor; -use storages_common_cache::InMemoryItemCacheHolder; -use storages_common_cache::NamedCache; -use storages_common_index::filters::Xor8Filter; -use storages_common_index::BloomIndexMeta; -use storages_common_table_meta::meta::CompactSegmentInfo; -use storages_common_table_meta::meta::SegmentInfo; -use storages_common_table_meta::meta::TableSnapshot; -use storages_common_table_meta::meta::TableSnapshotStatistics; +use databend_common_arrow::parquet::metadata::FileMetaData; +use databend_common_cache::Count; +use databend_common_cache::CountableMeter; +use databend_common_cache::DefaultHashBuilder; +use databend_common_cache::Meter; +use databend_common_catalog::plan::PartStatistics; +use databend_common_catalog::plan::Partitions; +use databend_storages_common_cache::CacheAccessor; +use databend_storages_common_cache::InMemoryItemCacheHolder; +use databend_storages_common_cache::NamedCache; +use databend_storages_common_index::filters::Xor8Filter; +use databend_storages_common_index::BloomIndexMeta; +use databend_storages_common_table_meta::meta::CompactSegmentInfo; +use databend_storages_common_table_meta::meta::SegmentInfo; +use databend_storages_common_table_meta::meta::TableSnapshot; +use databend_storages_common_table_meta::meta::TableSnapshotStatistics; use crate::cache_manager::CacheManager; @@ -60,7 +60,7 @@ pub type ColumnArrayCache = NamedCache>; pub type ArrayRawDataUncompressedSize = usize; pub type SizedColumnArray = ( - Box, + Box, ArrayRawDataUncompressedSize, ); diff --git a/src/query/storages/common/index/Cargo.toml b/src/query/storages/common/index/Cargo.toml index 8d6d6f19f9d7..12f179b3d554 100644 --- a/src/query/storages/common/index/Cargo.toml +++ b/src/query/storages/common/index/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "storages-common-index" +name = "databend-storages-common-index" version = { workspace = true } authors = { workspace = true } license = { workspace = true } @@ -15,12 +15,12 @@ test = false ignored = ["xorfilter-rs", "match-template"] [dependencies] -common-arrow = { path = "../../../../common/arrow" } -common-exception = { path = "../../../../common/exception" } -common-expression = { path = "../../../expression" } -common-functions = { path = "../../../functions" } +databend-common-arrow = { path = "../../../../common/arrow" } +databend-common-exception = { path = "../../../../common/exception" } +databend-common-expression = { path = "../../../expression" } +databend-common-functions = { path = "../../../functions" } -storages-common-table-meta = { path = "../table_meta" } +databend-storages-common-table-meta = { path = "../table_meta" } anyerror = { workspace = true } cbordata = { version = "0.6.0" } @@ -34,8 +34,8 @@ xorfilter-rs = { git = "https://github.com/datafuse-extras/xorfilter", features ], tag = "databend-alpha.4" } [dev-dependencies] -common-arrow = { path = "../../../../common/arrow" } criterion = "0.4" +databend-common-arrow = { path = "../../../../common/arrow" } rand = { workspace = true } [[bench]] diff --git a/src/query/storages/common/index/benches/build_from_block.rs b/src/query/storages/common/index/benches/build_from_block.rs index ac20055d91c9..bb80b4a3f77d 100644 --- a/src/query/storages/common/index/benches/build_from_block.rs +++ b/src/query/storages/common/index/benches/build_from_block.rs @@ -19,23 +19,23 @@ extern crate criterion; use std::ops::Deref; -use common_expression::types::number::NumberColumn; -use common_expression::types::string::StringColumnBuilder; -use common_expression::types::DataType; -use common_expression::types::NumberDataType; -use common_expression::types::UInt64Type; -use common_expression::types::ValueType; -use common_expression::Column; -use common_expression::FunctionContext; use criterion::Criterion; +use databend_common_expression::types::number::NumberColumn; +use databend_common_expression::types::string::StringColumnBuilder; +use databend_common_expression::types::DataType; +use databend_common_expression::types::NumberDataType; +use databend_common_expression::types::UInt64Type; +use databend_common_expression::types::ValueType; +use databend_common_expression::Column; +use databend_common_expression::FunctionContext; +use databend_storages_common_index::filters::Filter; +use databend_storages_common_index::filters::FilterBuilder; +use databend_storages_common_index::filters::Xor8Builder; +use databend_storages_common_index::BloomIndex; use rand::prelude::random; use rand::rngs::StdRng; use rand::Rng; use rand::SeedableRng; -use storages_common_index::filters::Filter; -use storages_common_index::filters::FilterBuilder; -use storages_common_index::filters::Xor8Builder; -use storages_common_index::BloomIndex; /// Benchmark building BlockFilter from DataBlock. /// diff --git a/src/query/storages/common/index/src/bloom_index.rs b/src/query/storages/common/index/src/bloom_index.rs index a1b16fed7af4..f1952e8c3a11 100644 --- a/src/query/storages/common/index/src/bloom_index.rs +++ b/src/query/storages/common/index/src/bloom_index.rs @@ -17,38 +17,38 @@ use std::collections::HashMap; use std::ops::Deref; use std::sync::Arc; -use common_arrow::arrow::bitmap::Bitmap; -use common_arrow::arrow::buffer::Buffer; -use common_arrow::parquet::metadata::ThriftFileMetaData; -use common_exception::ErrorCode; -use common_exception::Result; -use common_exception::Span; -use common_expression::converts::scalar_to_datavalue; -use common_expression::eval_function; -use common_expression::types::AnyType; -use common_expression::types::DataType; -use common_expression::types::MapType; -use common_expression::types::NullableType; -use common_expression::types::Number; -use common_expression::types::NumberDataType; -use common_expression::types::UInt64Type; -use common_expression::types::ValueType; -use common_expression::BlockEntry; -use common_expression::Column; -use common_expression::ConstantFolder; -use common_expression::DataBlock; -use common_expression::Expr; -use common_expression::FieldIndex; -use common_expression::FunctionContext; -use common_expression::Scalar; -use common_expression::TableDataType; -use common_expression::TableField; -use common_expression::TableSchema; -use common_expression::TableSchemaRef; -use common_expression::Value; -use common_functions::BUILTIN_FUNCTIONS; -use storages_common_table_meta::meta::SingleColumnMeta; -use storages_common_table_meta::meta::Versioned; +use databend_common_arrow::arrow::bitmap::Bitmap; +use databend_common_arrow::arrow::buffer::Buffer; +use databend_common_arrow::parquet::metadata::ThriftFileMetaData; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_exception::Span; +use databend_common_expression::converts::scalar_to_datavalue; +use databend_common_expression::eval_function; +use databend_common_expression::types::AnyType; +use databend_common_expression::types::DataType; +use databend_common_expression::types::MapType; +use databend_common_expression::types::NullableType; +use databend_common_expression::types::Number; +use databend_common_expression::types::NumberDataType; +use databend_common_expression::types::UInt64Type; +use databend_common_expression::types::ValueType; +use databend_common_expression::BlockEntry; +use databend_common_expression::Column; +use databend_common_expression::ConstantFolder; +use databend_common_expression::DataBlock; +use databend_common_expression::Expr; +use databend_common_expression::FieldIndex; +use databend_common_expression::FunctionContext; +use databend_common_expression::Scalar; +use databend_common_expression::TableDataType; +use databend_common_expression::TableField; +use databend_common_expression::TableSchema; +use databend_common_expression::TableSchemaRef; +use databend_common_expression::Value; +use databend_common_functions::BUILTIN_FUNCTIONS; +use databend_storages_common_table_meta::meta::SingleColumnMeta; +use databend_storages_common_table_meta::meta::Versioned; use crate::filters::BlockBloomFilterIndexVersion; use crate::filters::Filter; @@ -64,7 +64,7 @@ pub struct BloomIndexMeta { } impl TryFrom for BloomIndexMeta { - type Error = common_exception::ErrorCode; + type Error = databend_common_exception::ErrorCode; fn try_from(mut meta: ThriftFileMetaData) -> std::result::Result { let rg = meta.row_groups.remove(0); diff --git a/src/query/storages/common/index/src/filters/xor8/block_filter.rs b/src/query/storages/common/index/src/filters/xor8/block_filter.rs index 69745e7164e5..637a53f3552b 100644 --- a/src/query/storages/common/index/src/filters/xor8/block_filter.rs +++ b/src/query/storages/common/index/src/filters/xor8/block_filter.rs @@ -14,7 +14,7 @@ use std::sync::Arc; -use common_expression::TableSchemaRef; +use databend_common_expression::TableSchemaRef; use crate::filters::xor8::xor8_filter::Xor8Filter; diff --git a/src/query/storages/common/index/src/filters/xor8/block_filter_versions.rs b/src/query/storages/common/index/src/filters/xor8/block_filter_versions.rs index a84f8df37330..8fb092dab089 100644 --- a/src/query/storages/common/index/src/filters/xor8/block_filter_versions.rs +++ b/src/query/storages/common/index/src/filters/xor8/block_filter_versions.rs @@ -14,9 +14,9 @@ use std::marker::PhantomData; -use common_exception::ErrorCode; -use storages_common_table_meta::meta::testify_version; -use storages_common_table_meta::meta::Versioned; +use databend_common_exception::ErrorCode; +use databend_storages_common_table_meta::meta::testify_version; +use databend_storages_common_table_meta::meta::Versioned; use crate::filters::BlockFilter; diff --git a/src/query/storages/common/index/src/filters/xor8/xor8_filter.rs b/src/query/storages/common/index/src/filters/xor8/xor8_filter.rs index 72cd86215ce2..bde37a821171 100644 --- a/src/query/storages/common/index/src/filters/xor8/xor8_filter.rs +++ b/src/query/storages/common/index/src/filters/xor8/xor8_filter.rs @@ -19,8 +19,8 @@ use anyerror::AnyError; use cbordata::Cbor; use cbordata::FromCbor; use cbordata::IntoCbor; -use common_exception::ErrorCode; -use common_expression::types::DataType; +use databend_common_exception::ErrorCode; +use databend_common_expression::types::DataType; use xorfilter::Xor8; use crate::filters::Filter; diff --git a/src/query/storages/common/index/src/index.rs b/src/query/storages/common/index/src/index.rs index 73021e1d4d5d..d33fff17f8fb 100644 --- a/src/query/storages/common/index/src/index.rs +++ b/src/query/storages/common/index/src/index.rs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_expression::types::DataType; +use databend_common_expression::types::DataType; pub trait Index { fn supported_type(data_type: &DataType) -> bool { diff --git a/src/query/storages/common/index/src/page_index.rs b/src/query/storages/common/index/src/page_index.rs index ab41c0ad2757..6177c3dbe78e 100644 --- a/src/query/storages/common/index/src/page_index.rs +++ b/src/query/storages/common/index/src/page_index.rs @@ -16,20 +16,20 @@ use std::collections::HashMap; use std::ops::Range; use std::sync::Arc; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::types::DataType; -use common_expression::ConstantFolder; -use common_expression::DataField; -use common_expression::DataSchemaRef; -use common_expression::Domain; -use common_expression::Expr; -use common_expression::FunctionContext; -use common_expression::Scalar; -use common_expression::TableSchemaRef; -use common_functions::BUILTIN_FUNCTIONS; -use storages_common_table_meta::meta::ClusterStatistics; -use storages_common_table_meta::meta::ColumnStatistics; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::types::DataType; +use databend_common_expression::ConstantFolder; +use databend_common_expression::DataField; +use databend_common_expression::DataSchemaRef; +use databend_common_expression::Domain; +use databend_common_expression::Expr; +use databend_common_expression::FunctionContext; +use databend_common_expression::Scalar; +use databend_common_expression::TableSchemaRef; +use databend_common_functions::BUILTIN_FUNCTIONS; +use databend_storages_common_table_meta::meta::ClusterStatistics; +use databend_storages_common_table_meta::meta::ColumnStatistics; use crate::range_index::statistics_to_domain; diff --git a/src/query/storages/common/index/src/range_index.rs b/src/query/storages/common/index/src/range_index.rs index c8e5a211ffc8..487572dee65d 100644 --- a/src/query/storages/common/index/src/range_index.rs +++ b/src/query/storages/common/index/src/range_index.rs @@ -12,34 +12,34 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_exception::Result; -use common_expression::is_internal_column; -use common_expression::is_stream_column; -use common_expression::types::decimal::Decimal128Type; -use common_expression::types::decimal::Decimal256Type; -use common_expression::types::decimal::DecimalDataType; -use common_expression::types::decimal::DecimalDomain; -use common_expression::types::nullable::NullableDomain; -use common_expression::types::number::SimpleDomain; -use common_expression::types::string::StringDomain; -use common_expression::types::DataType; -use common_expression::types::DateType; -use common_expression::types::NumberDataType; -use common_expression::types::NumberType; -use common_expression::types::StringType; -use common_expression::types::TimestampType; -use common_expression::types::ValueType; -use common_expression::with_number_mapped_type; -use common_expression::ColumnId; -use common_expression::ConstantFolder; -use common_expression::Domain; -use common_expression::Expr; -use common_expression::FunctionContext; -use common_expression::Scalar; -use common_expression::TableSchemaRef; -use common_functions::BUILTIN_FUNCTIONS; -use storages_common_table_meta::meta::ColumnStatistics; -use storages_common_table_meta::meta::StatisticsOfColumns; +use databend_common_exception::Result; +use databend_common_expression::is_internal_column; +use databend_common_expression::is_stream_column; +use databend_common_expression::types::decimal::Decimal128Type; +use databend_common_expression::types::decimal::Decimal256Type; +use databend_common_expression::types::decimal::DecimalDataType; +use databend_common_expression::types::decimal::DecimalDomain; +use databend_common_expression::types::nullable::NullableDomain; +use databend_common_expression::types::number::SimpleDomain; +use databend_common_expression::types::string::StringDomain; +use databend_common_expression::types::DataType; +use databend_common_expression::types::DateType; +use databend_common_expression::types::NumberDataType; +use databend_common_expression::types::NumberType; +use databend_common_expression::types::StringType; +use databend_common_expression::types::TimestampType; +use databend_common_expression::types::ValueType; +use databend_common_expression::with_number_mapped_type; +use databend_common_expression::ColumnId; +use databend_common_expression::ConstantFolder; +use databend_common_expression::Domain; +use databend_common_expression::Expr; +use databend_common_expression::FunctionContext; +use databend_common_expression::Scalar; +use databend_common_expression::TableSchemaRef; +use databend_common_functions::BUILTIN_FUNCTIONS; +use databend_storages_common_table_meta::meta::ColumnStatistics; +use databend_storages_common_table_meta::meta::StatisticsOfColumns; use crate::Index; diff --git a/src/query/storages/common/index/tests/it/filters/bloom_filter.rs b/src/query/storages/common/index/tests/it/filters/bloom_filter.rs index 28c45fdd763f..c6f5de7de357 100644 --- a/src/query/storages/common/index/tests/it/filters/bloom_filter.rs +++ b/src/query/storages/common/index/tests/it/filters/bloom_filter.rs @@ -16,39 +16,39 @@ use std::collections::BTreeMap; use std::collections::HashMap; use std::sync::Arc; -use common_arrow::arrow::buffer::Buffer; -use common_exception::Result; -use common_expression::type_check::check_function; -use common_expression::types::array::ArrayColumn; -use common_expression::types::map::KvColumn; -use common_expression::types::map::KvPair; -use common_expression::types::number::NumberScalar; -use common_expression::types::number::UInt8Type; -use common_expression::types::AnyType; -use common_expression::types::DataType; -use common_expression::types::NumberDataType; -use common_expression::types::StringType; -use common_expression::BlockEntry; -use common_expression::Column; -use common_expression::ConstantFolder; -use common_expression::DataBlock; -use common_expression::Expr; -use common_expression::FieldIndex; -use common_expression::FromData; -use common_expression::FunctionContext; -use common_expression::Scalar; -use common_expression::TableDataType; -use common_expression::TableField; -use common_expression::TableSchema; -use common_expression::TableSchemaRef; -use common_expression::Value; -use common_functions::BUILTIN_FUNCTIONS; -use storages_common_index::filters::BlockFilter as LatestBloom; -use storages_common_index::filters::Xor8Filter; -use storages_common_index::BloomIndex; -use storages_common_index::FilterEvalResult; -use storages_common_index::Index; -use storages_common_table_meta::meta::Versioned; +use databend_common_arrow::arrow::buffer::Buffer; +use databend_common_exception::Result; +use databend_common_expression::type_check::check_function; +use databend_common_expression::types::array::ArrayColumn; +use databend_common_expression::types::map::KvColumn; +use databend_common_expression::types::map::KvPair; +use databend_common_expression::types::number::NumberScalar; +use databend_common_expression::types::number::UInt8Type; +use databend_common_expression::types::AnyType; +use databend_common_expression::types::DataType; +use databend_common_expression::types::NumberDataType; +use databend_common_expression::types::StringType; +use databend_common_expression::BlockEntry; +use databend_common_expression::Column; +use databend_common_expression::ConstantFolder; +use databend_common_expression::DataBlock; +use databend_common_expression::Expr; +use databend_common_expression::FieldIndex; +use databend_common_expression::FromData; +use databend_common_expression::FunctionContext; +use databend_common_expression::Scalar; +use databend_common_expression::TableDataType; +use databend_common_expression::TableField; +use databend_common_expression::TableSchema; +use databend_common_expression::TableSchemaRef; +use databend_common_expression::Value; +use databend_common_functions::BUILTIN_FUNCTIONS; +use databend_storages_common_index::filters::BlockFilter as LatestBloom; +use databend_storages_common_index::filters::Xor8Filter; +use databend_storages_common_index::BloomIndex; +use databend_storages_common_index::FilterEvalResult; +use databend_storages_common_index::Index; +use databend_storages_common_table_meta::meta::Versioned; #[test] fn test_bloom_filter() -> Result<()> { diff --git a/src/query/storages/common/index/tests/it/filters/xor8.rs b/src/query/storages/common/index/tests/it/filters/xor8.rs index f6a44666c64e..d9774b52d905 100644 --- a/src/query/storages/common/index/tests/it/filters/xor8.rs +++ b/src/query/storages/common/index/tests/it/filters/xor8.rs @@ -12,17 +12,17 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_exception::Result; -use common_expression::types::number::NumberScalar; -use common_expression::ScalarRef; +use databend_common_exception::Result; +use databend_common_expression::types::number::NumberScalar; +use databend_common_expression::ScalarRef; +use databend_storages_common_index::filters::Filter; +use databend_storages_common_index::filters::FilterBuilder; +use databend_storages_common_index::filters::Xor8Builder; +use databend_storages_common_index::filters::Xor8Filter; use rand::prelude::random; use rand::rngs::StdRng; use rand::Rng; use rand::SeedableRng; -use storages_common_index::filters::Filter; -use storages_common_index::filters::FilterBuilder; -use storages_common_index::filters::Xor8Builder; -use storages_common_index::filters::Xor8Filter; #[test] fn test_xor_bitmap_u64() -> Result<()> { diff --git a/src/query/storages/common/pruner/Cargo.toml b/src/query/storages/common/pruner/Cargo.toml index cf8beeaa29fb..b8da129c275e 100644 --- a/src/query/storages/common/pruner/Cargo.toml +++ b/src/query/storages/common/pruner/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "storages-common-pruner" +name = "databend-storages-common-pruner" version = { workspace = true } authors = { workspace = true } license = { workspace = true } @@ -12,12 +12,12 @@ doctest = false test = false [dependencies] -common-exception = { path = "../../../../common/exception" } -common-expression = { path = "../../../expression" } -common-functions = { path = "../../../functions" } +databend-common-exception = { path = "../../../../common/exception" } +databend-common-expression = { path = "../../../expression" } +databend-common-functions = { path = "../../../functions" } -storages-common-index = { path = "../index" } -storages-common-table-meta = { path = "../table_meta" } +databend-storages-common-index = { path = "../index" } +databend-storages-common-table-meta = { path = "../table_meta" } log = { workspace = true } serde = { workspace = true } diff --git a/src/query/storages/common/pruner/src/block_meta.rs b/src/query/storages/common/pruner/src/block_meta.rs index 2e3d793236b6..901e743c2df7 100644 --- a/src/query/storages/common/pruner/src/block_meta.rs +++ b/src/query/storages/common/pruner/src/block_meta.rs @@ -14,11 +14,11 @@ use std::ops::Range; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::BlockMetaInfo; -use common_expression::BlockMetaInfoDowncast; -use common_expression::BlockMetaInfoPtr; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::BlockMetaInfo; +use databend_common_expression::BlockMetaInfoDowncast; +use databend_common_expression::BlockMetaInfoPtr; #[derive(serde::Serialize, serde::Deserialize, Clone, Debug, Default, PartialEq, Eq)] pub struct BlockMetaIndex { diff --git a/src/query/storages/common/pruner/src/internal_column_pruner.rs b/src/query/storages/common/pruner/src/internal_column_pruner.rs index bae570dff3e5..21d283a498e5 100644 --- a/src/query/storages/common/pruner/src/internal_column_pruner.rs +++ b/src/query/storages/common/pruner/src/internal_column_pruner.rs @@ -15,15 +15,15 @@ use std::collections::HashMap; use std::sync::Arc; -use common_expression::types::string::StringDomain; -use common_expression::ConstantFolder; -use common_expression::Domain; -use common_expression::Expr; -use common_expression::FunctionContext; -use common_expression::Scalar; -use common_expression::BLOCK_NAME_COL_NAME; -use common_expression::SEGMENT_NAME_COL_NAME; -use common_functions::BUILTIN_FUNCTIONS; +use databend_common_expression::types::string::StringDomain; +use databend_common_expression::ConstantFolder; +use databend_common_expression::Domain; +use databend_common_expression::Expr; +use databend_common_expression::FunctionContext; +use databend_common_expression::Scalar; +use databend_common_expression::BLOCK_NAME_COL_NAME; +use databend_common_expression::SEGMENT_NAME_COL_NAME; +use databend_common_functions::BUILTIN_FUNCTIONS; /// Only support `_segment_name` and `_block_name` now. pub struct InternalColumnPruner { diff --git a/src/query/storages/common/pruner/src/page_pruner.rs b/src/query/storages/common/pruner/src/page_pruner.rs index e56a29747913..2b93def4e827 100644 --- a/src/query/storages/common/pruner/src/page_pruner.rs +++ b/src/query/storages/common/pruner/src/page_pruner.rs @@ -15,15 +15,15 @@ use std::ops::Range; use std::sync::Arc; -use common_exception::Result; -use common_expression::Expr; -use common_expression::FunctionContext; -use common_expression::RemoteExpr; -use common_expression::TableSchemaRef; +use databend_common_exception::Result; +use databend_common_expression::Expr; +use databend_common_expression::FunctionContext; +use databend_common_expression::RemoteExpr; +use databend_common_expression::TableSchemaRef; +use databend_storages_common_index::PageIndex; +use databend_storages_common_table_meta::meta::ClusterKey; +use databend_storages_common_table_meta::meta::ClusterStatistics; use log::warn; -use storages_common_index::PageIndex; -use storages_common_table_meta::meta::ClusterKey; -use storages_common_table_meta::meta::ClusterStatistics; pub trait PagePruner { // returns true, if target should NOT be pruned (false positive allowed) diff --git a/src/query/storages/common/pruner/src/range_pruner.rs b/src/query/storages/common/pruner/src/range_pruner.rs index 21fbaf865693..a52e720af330 100644 --- a/src/query/storages/common/pruner/src/range_pruner.rs +++ b/src/query/storages/common/pruner/src/range_pruner.rs @@ -15,15 +15,15 @@ use std::collections::HashMap; use std::sync::Arc; -use common_exception::Result; -use common_expression::ColumnId; -use common_expression::Expr; -use common_expression::FunctionContext; -use common_expression::TableSchemaRef; +use databend_common_exception::Result; +use databend_common_expression::ColumnId; +use databend_common_expression::Expr; +use databend_common_expression::FunctionContext; +use databend_common_expression::TableSchemaRef; +use databend_storages_common_index::RangeIndex; +use databend_storages_common_table_meta::meta::ColumnMeta; +use databend_storages_common_table_meta::meta::StatisticsOfColumns; use log::warn; -use storages_common_index::RangeIndex; -use storages_common_table_meta::meta::ColumnMeta; -use storages_common_table_meta::meta::StatisticsOfColumns; pub trait RangePruner { // returns true, if target should NOT be pruned (false positive allowed) diff --git a/src/query/storages/common/pruner/src/topn_pruner.rs b/src/query/storages/common/pruner/src/topn_pruner.rs index 046883852fc8..e96abd84eacc 100644 --- a/src/query/storages/common/pruner/src/topn_pruner.rs +++ b/src/query/storages/common/pruner/src/topn_pruner.rs @@ -14,12 +14,12 @@ use std::sync::Arc; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::RemoteExpr; -use common_expression::TableDataType; -use common_expression::TableSchemaRef; -use storages_common_table_meta::meta::BlockMeta; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::RemoteExpr; +use databend_common_expression::TableDataType; +use databend_common_expression::TableSchemaRef; +use databend_storages_common_table_meta::meta::BlockMeta; use crate::BlockMetaIndex; diff --git a/src/query/storages/common/table_meta/Cargo.toml b/src/query/storages/common/table_meta/Cargo.toml index e3406a97170f..676b4d59f937 100644 --- a/src/query/storages/common/table_meta/Cargo.toml +++ b/src/query/storages/common/table_meta/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "storages-common-table-meta" +name = "databend-storages-common-table-meta" version = { workspace = true } authors = { workspace = true } license = { workspace = true } @@ -7,12 +7,12 @@ publish = { workspace = true } edition = { workspace = true } [dependencies] -common-arrow = { path = "../../../../common/arrow" } -common-base = { path = "../../../../common/base" } -common-datavalues = { path = "../../../datavalues" } -common-exception = { path = "../../../../common/exception" } -common-expression = { path = "../../../expression" } -common-io = { path = "../../../../common/io" } +databend-common-arrow = { path = "../../../../common/arrow" } +databend-common-base = { path = "../../../../common/base" } +databend-common-datavalues = { path = "../../../datavalues" } +databend-common-exception = { path = "../../../../common/exception" } +databend-common-expression = { path = "../../../expression" } +databend-common-io = { path = "../../../../common/io" } async-backtrace = { workspace = true } async-trait = { workspace = true } @@ -29,8 +29,8 @@ typetag = { workspace = true } zstd = "0.12.3" [dev-dependencies] -common-storages-fuse = { path = "../../fuse" } criterion = "0.4" +databend-common-storages-fuse = { path = "../../fuse" } pot = "2.0.0" [features] diff --git a/src/query/storages/common/table_meta/benches/bench.rs b/src/query/storages/common/table_meta/benches/bench.rs index 436d7ebcc8ed..697b88d1c741 100644 --- a/src/query/storages/common/table_meta/benches/bench.rs +++ b/src/query/storages/common/table_meta/benches/bench.rs @@ -19,22 +19,22 @@ use std::collections::HashMap; use std::sync::Arc; use chrono::Utc; -use common_expression::types::NumberScalar; -use common_expression::ColumnId; -use common_expression::Scalar; -use common_storages_fuse::io::TableMetaLocationGenerator; -use common_storages_fuse::statistics::STATS_STRING_PREFIX_LEN; use criterion::black_box; use criterion::Criterion; -use storages_common_table_meta::meta::testing::MetaEncoding; -use storages_common_table_meta::meta::BlockMeta; -use storages_common_table_meta::meta::ColumnMeta; -use storages_common_table_meta::meta::ColumnStatistics; -use storages_common_table_meta::meta::CompactSegmentInfo; -use storages_common_table_meta::meta::Compression; -use storages_common_table_meta::meta::SegmentInfo; -use storages_common_table_meta::meta::SingleColumnMeta; -use storages_common_table_meta::meta::Statistics; +use databend_common_expression::types::NumberScalar; +use databend_common_expression::ColumnId; +use databend_common_expression::Scalar; +use databend_common_storages_fuse::io::TableMetaLocationGenerator; +use databend_common_storages_fuse::statistics::STATS_STRING_PREFIX_LEN; +use databend_storages_common_table_meta::meta::testing::MetaEncoding; +use databend_storages_common_table_meta::meta::BlockMeta; +use databend_storages_common_table_meta::meta::ColumnMeta; +use databend_storages_common_table_meta::meta::ColumnStatistics; +use databend_storages_common_table_meta::meta::CompactSegmentInfo; +use databend_storages_common_table_meta::meta::Compression; +use databend_storages_common_table_meta::meta::SegmentInfo; +use databend_storages_common_table_meta::meta::SingleColumnMeta; +use databend_storages_common_table_meta::meta::Statistics; fn bench_encode(c: &mut Criterion) { let mut grp = c.benchmark_group("encoding"); @@ -147,7 +147,9 @@ fn bench_decode(c: &mut Criterion) { ); } -fn build_test_segment_info(num_blocks_per_seg: usize) -> common_exception::Result { +fn build_test_segment_info( + num_blocks_per_seg: usize, +) -> databend_common_exception::Result { let col_meta = ColumnMeta::Parquet(SingleColumnMeta { offset: 0, len: 0, diff --git a/src/query/storages/common/table_meta/src/meta/format.rs b/src/query/storages/common/table_meta/src/meta/format.rs index 913648e65aa3..4b927548171a 100644 --- a/src/query/storages/common/table_meta/src/meta/format.rs +++ b/src/query/storages/common/table_meta/src/meta/format.rs @@ -18,9 +18,9 @@ use std::io::Read; use std::io::Write; use std::marker::PhantomData; -use common_exception::ErrorCode; -use common_exception::Result; -use common_io::prelude::BinaryRead; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_io::prelude::BinaryRead; use serde::de::DeserializeOwned; use serde::Deserialize; use serde::Serialize; diff --git a/src/query/storages/common/table_meta/src/meta/statistics.rs b/src/query/storages/common/table_meta/src/meta/statistics.rs index 378c8a21c499..36a5db259e75 100644 --- a/src/query/storages/common/table_meta/src/meta/statistics.rs +++ b/src/query/storages/common/table_meta/src/meta/statistics.rs @@ -15,8 +15,8 @@ use std::cmp::Ordering; use std::collections::HashMap; -use common_base::base::uuid::Uuid; -use common_expression::ColumnId; +use databend_common_base::base::uuid::Uuid; +use databend_common_expression::ColumnId; use crate::meta::ColumnStatistics; @@ -93,9 +93,9 @@ impl MinMax { #[cfg(test)] mod tests { - use common_exception::Result; - use common_expression::types::NumberScalar; - use common_expression::Scalar; + use databend_common_exception::Result; + use databend_common_expression::types::NumberScalar; + use databend_common_expression::Scalar; use crate::meta::MinMax; diff --git a/src/query/storages/common/table_meta/src/meta/v0/common.rs b/src/query/storages/common/table_meta/src/meta/v0/common.rs index f70000afde11..c5541723eca1 100644 --- a/src/query/storages/common/table_meta/src/meta/v0/common.rs +++ b/src/query/storages/common/table_meta/src/meta/v0/common.rs @@ -14,8 +14,8 @@ use std::collections::HashMap; -use common_expression::ColumnId; -use common_expression::Scalar; +use databend_common_expression::ColumnId; +use databend_common_expression::Scalar; #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] pub struct ColumnStatistics { diff --git a/src/query/storages/common/table_meta/src/meta/v0/segment.rs b/src/query/storages/common/table_meta/src/meta/v0/segment.rs index d42230156e1a..c85f7d110f15 100644 --- a/src/query/storages/common/table_meta/src/meta/v0/segment.rs +++ b/src/query/storages/common/table_meta/src/meta/v0/segment.rs @@ -14,7 +14,7 @@ use std::collections::HashMap; -use common_expression::ColumnId; +use databend_common_expression::ColumnId; use super::statistics::*; diff --git a/src/query/storages/common/table_meta/src/meta/v0/snapshot.rs b/src/query/storages/common/table_meta/src/meta/v0/snapshot.rs index e0615653c90f..943512f51204 100644 --- a/src/query/storages/common/table_meta/src/meta/v0/snapshot.rs +++ b/src/query/storages/common/table_meta/src/meta/v0/snapshot.rs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_datavalues as dv; +use databend_common_datavalues as dv; use serde::Deserialize; use serde::Serialize; diff --git a/src/query/storages/common/table_meta/src/meta/v0/statistics.rs b/src/query/storages/common/table_meta/src/meta/v0/statistics.rs index 5c22160fc6f2..26004b3d8bc1 100644 --- a/src/query/storages/common/table_meta/src/meta/v0/statistics.rs +++ b/src/query/storages/common/table_meta/src/meta/v0/statistics.rs @@ -14,8 +14,8 @@ use std::collections::HashMap; -use common_datavalues as dv; -use common_expression::ColumnId; +use databend_common_datavalues as dv; +use databend_common_expression::ColumnId; #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] pub struct ColumnStatistics { diff --git a/src/query/storages/common/table_meta/src/meta/v1/segment.rs b/src/query/storages/common/table_meta/src/meta/v1/segment.rs index 6d909d2cb961..9923c410884b 100644 --- a/src/query/storages/common/table_meta/src/meta/v1/segment.rs +++ b/src/query/storages/common/table_meta/src/meta/v1/segment.rs @@ -15,7 +15,7 @@ use std::collections::HashMap; use std::sync::Arc; -use common_expression::ColumnId; +use databend_common_expression::ColumnId; use serde::Deserialize; use serde::Serialize; diff --git a/src/query/storages/common/table_meta/src/meta/v1/snapshot.rs b/src/query/storages/common/table_meta/src/meta/v1/snapshot.rs index ab40e4b3b0ee..4015b052ce7f 100644 --- a/src/query/storages/common/table_meta/src/meta/v1/snapshot.rs +++ b/src/query/storages/common/table_meta/src/meta/v1/snapshot.rs @@ -14,8 +14,8 @@ use chrono::DateTime; use chrono::Utc; -use common_base::base::uuid::Uuid; -use common_datavalues as dv; +use databend_common_base::base::uuid::Uuid; +use databend_common_datavalues as dv; use serde::Deserialize; use serde::Serialize; diff --git a/src/query/storages/common/table_meta/src/meta/v1/table_snapshot_statistics.rs b/src/query/storages/common/table_meta/src/meta/v1/table_snapshot_statistics.rs index d11fa88d0525..be247f33f31a 100644 --- a/src/query/storages/common/table_meta/src/meta/v1/table_snapshot_statistics.rs +++ b/src/query/storages/common/table_meta/src/meta/v1/table_snapshot_statistics.rs @@ -14,7 +14,7 @@ use std::collections::HashMap; -use common_expression::ColumnId; +use databend_common_expression::ColumnId; use serde::Deserialize; use serde::Serialize; diff --git a/src/query/storages/common/table_meta/src/meta/v2/segment.rs b/src/query/storages/common/table_meta/src/meta/v2/segment.rs index 72b8a8fa3d10..e88fd2f1792c 100644 --- a/src/query/storages/common/table_meta/src/meta/v2/segment.rs +++ b/src/query/storages/common/table_meta/src/meta/v2/segment.rs @@ -18,11 +18,11 @@ use std::sync::Arc; use chrono::DateTime; use chrono::Utc; -use common_arrow::native::ColumnMeta as NativeColumnMeta; -use common_expression::BlockMetaInfo; -use common_expression::BlockMetaInfoDowncast; -use common_expression::ColumnId; -use common_expression::TableField; +use databend_common_arrow::native::ColumnMeta as NativeColumnMeta; +use databend_common_expression::BlockMetaInfo; +use databend_common_expression::BlockMetaInfoDowncast; +use databend_common_expression::ColumnId; +use databend_common_expression::TableField; use enum_as_inner::EnumAsInner; use serde::Deserialize; use serde::Serialize; diff --git a/src/query/storages/common/table_meta/src/meta/v2/snapshot.rs b/src/query/storages/common/table_meta/src/meta/v2/snapshot.rs index 5bcd1affc5b2..8cd1b0f679ee 100644 --- a/src/query/storages/common/table_meta/src/meta/v2/snapshot.rs +++ b/src/query/storages/common/table_meta/src/meta/v2/snapshot.rs @@ -14,8 +14,8 @@ use chrono::DateTime; use chrono::Utc; -use common_expression::converts::from_schema; -use common_expression::TableSchema; +use databend_common_expression::converts::from_schema; +use databend_common_expression::TableSchema; use serde::Deserialize; use serde::Serialize; diff --git a/src/query/storages/common/table_meta/src/meta/v2/statistics.rs b/src/query/storages/common/table_meta/src/meta/v2/statistics.rs index ccdfcd1ffe96..87cecd2a8965 100644 --- a/src/query/storages/common/table_meta/src/meta/v2/statistics.rs +++ b/src/query/storages/common/table_meta/src/meta/v2/statistics.rs @@ -14,11 +14,11 @@ use std::collections::HashMap; -use common_expression::converts::from_scalar; -use common_expression::ColumnId; -use common_expression::Scalar; -use common_expression::TableDataType; -use common_expression::TableField; +use databend_common_expression::converts::from_scalar; +use databend_common_expression::ColumnId; +use databend_common_expression::Scalar; +use databend_common_expression::TableDataType; +use databend_common_expression::TableField; #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] pub struct ColumnStatistics { diff --git a/src/query/storages/common/table_meta/src/meta/v3/frozen/block_meta.rs b/src/query/storages/common/table_meta/src/meta/v3/frozen/block_meta.rs index 66ec026806e1..bc5103cfc287 100644 --- a/src/query/storages/common/table_meta/src/meta/v3/frozen/block_meta.rs +++ b/src/query/storages/common/table_meta/src/meta/v3/frozen/block_meta.rs @@ -14,8 +14,8 @@ use std::collections::HashMap; -use common_expression::ColumnId; -use common_expression::Scalar; +use databend_common_expression::ColumnId; +use databend_common_expression::Scalar; use serde::Deserialize; use serde::Serialize; @@ -103,7 +103,7 @@ pub struct NativeColumnMeta { pub pages: Vec, } -impl From for common_arrow::native::ColumnMeta { +impl From for databend_common_arrow::native::ColumnMeta { fn from(value: NativeColumnMeta) -> Self { Self { offset: value.offset, @@ -112,7 +112,7 @@ impl From for common_arrow::native::ColumnMeta { } } -impl From for common_arrow::native::PageMeta { +impl From for databend_common_arrow::native::PageMeta { fn from(value: PageMeta) -> Self { Self { length: value.length, diff --git a/src/query/storages/common/table_meta/src/meta/v3/frozen/statistics.rs b/src/query/storages/common/table_meta/src/meta/v3/frozen/statistics.rs index f42c725a21f3..c1c2803ebe16 100644 --- a/src/query/storages/common/table_meta/src/meta/v3/frozen/statistics.rs +++ b/src/query/storages/common/table_meta/src/meta/v3/frozen/statistics.rs @@ -14,8 +14,8 @@ use std::collections::HashMap; -use common_expression::ColumnId; -use common_expression::Scalar; +use databend_common_expression::ColumnId; +use databend_common_expression::Scalar; use crate::meta::MinMax; diff --git a/src/query/storages/common/table_meta/src/meta/v3/frozen/table_schema.rs b/src/query/storages/common/table_meta/src/meta/v3/frozen/table_schema.rs index 127ae64d0ef6..cb387007ae2f 100644 --- a/src/query/storages/common/table_meta/src/meta/v3/frozen/table_schema.rs +++ b/src/query/storages/common/table_meta/src/meta/v3/frozen/table_schema.rs @@ -14,7 +14,7 @@ use std::collections::BTreeMap; -use common_expression::ColumnId; +use databend_common_expression::ColumnId; use serde::Deserialize; use serde::Serialize; @@ -92,7 +92,7 @@ pub struct DecimalSize { mod converters { use super::*; - impl From for common_expression::TableField { + impl From for databend_common_expression::TableField { fn from(value: TableField) -> Self { Self { name: value.name, @@ -104,7 +104,7 @@ mod converters { } } - impl From for common_expression::TableDataType { + impl From for databend_common_expression::TableDataType { fn from(value: TableDataType) -> Self { match value { TableDataType::Null => Self::Null, @@ -141,24 +141,24 @@ mod converters { } } - impl From for NumberDataType { - fn from(value: common_expression::types::number::NumberDataType) -> Self { + impl From for NumberDataType { + fn from(value: databend_common_expression::types::number::NumberDataType) -> Self { match value { - common_expression::types::number::NumberDataType::UInt8 => Self::UInt8, - common_expression::types::number::NumberDataType::UInt16 => Self::UInt16, - common_expression::types::number::NumberDataType::UInt32 => Self::UInt32, - common_expression::types::number::NumberDataType::UInt64 => Self::UInt64, - common_expression::types::number::NumberDataType::Int8 => Self::Int8, - common_expression::types::number::NumberDataType::Int16 => Self::Int16, - common_expression::types::number::NumberDataType::Int32 => Self::Int32, - common_expression::types::number::NumberDataType::Int64 => Self::Int64, - common_expression::types::number::NumberDataType::Float32 => Self::Float32, - common_expression::types::number::NumberDataType::Float64 => Self::Float64, + databend_common_expression::types::number::NumberDataType::UInt8 => Self::UInt8, + databend_common_expression::types::number::NumberDataType::UInt16 => Self::UInt16, + databend_common_expression::types::number::NumberDataType::UInt32 => Self::UInt32, + databend_common_expression::types::number::NumberDataType::UInt64 => Self::UInt64, + databend_common_expression::types::number::NumberDataType::Int8 => Self::Int8, + databend_common_expression::types::number::NumberDataType::Int16 => Self::Int16, + databend_common_expression::types::number::NumberDataType::Int32 => Self::Int32, + databend_common_expression::types::number::NumberDataType::Int64 => Self::Int64, + databend_common_expression::types::number::NumberDataType::Float32 => Self::Float32, + databend_common_expression::types::number::NumberDataType::Float64 => Self::Float64, } } } - impl From for common_expression::types::number::NumberDataType { + impl From for databend_common_expression::types::number::NumberDataType { fn from(value: NumberDataType) -> Self { match value { NumberDataType::UInt8 => Self::UInt8, @@ -175,7 +175,7 @@ mod converters { } } - impl From for common_expression::types::DecimalDataType { + impl From for databend_common_expression::types::DecimalDataType { fn from(value: DecimalDataType) -> Self { match value { DecimalDataType::Decimal128(value) => Self::Decimal128(value.into()), @@ -184,7 +184,7 @@ mod converters { } } - impl From for common_expression::types::DecimalSize { + impl From for databend_common_expression::types::DecimalSize { fn from(value: DecimalSize) -> Self { Self { precision: value.precision, @@ -193,7 +193,7 @@ mod converters { } } - impl From for common_expression::TableSchema { + impl From for databend_common_expression::TableSchema { fn from(value: TableSchema) -> Self { Self { fields: value diff --git a/src/query/storages/common/table_meta/src/meta/v3/segment.rs b/src/query/storages/common/table_meta/src/meta/v3/segment.rs index aefb86eca241..3d8505b62c0d 100644 --- a/src/query/storages/common/table_meta/src/meta/v3/segment.rs +++ b/src/query/storages/common/table_meta/src/meta/v3/segment.rs @@ -14,7 +14,7 @@ use std::io::Cursor; -use common_exception::Result; +use databend_common_exception::Result; use serde::Deserialize; use serde::Serialize; diff --git a/src/query/storages/common/table_meta/src/meta/v3/snapshot.rs b/src/query/storages/common/table_meta/src/meta/v3/snapshot.rs index 7393af45eb9c..124ad7b2bb09 100644 --- a/src/query/storages/common/table_meta/src/meta/v3/snapshot.rs +++ b/src/query/storages/common/table_meta/src/meta/v3/snapshot.rs @@ -16,8 +16,8 @@ use std::io::Cursor; use chrono::DateTime; use chrono::Utc; -use common_exception::Result; -use common_io::prelude::BinaryRead; +use databend_common_exception::Result; +use databend_common_io::prelude::BinaryRead; use serde::Deserialize; use serde::Serialize; diff --git a/src/query/storages/common/table_meta/src/meta/v4/segment.rs b/src/query/storages/common/table_meta/src/meta/v4/segment.rs index 418c6c7677b0..6b47c949f670 100644 --- a/src/query/storages/common/table_meta/src/meta/v4/segment.rs +++ b/src/query/storages/common/table_meta/src/meta/v4/segment.rs @@ -16,8 +16,8 @@ use std::io::Cursor; use std::io::Read; use std::sync::Arc; -use common_exception::ErrorCode; -use common_exception::Result; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; use serde::Deserialize; use serde::Serialize; diff --git a/src/query/storages/common/table_meta/src/meta/v4/snapshot.rs b/src/query/storages/common/table_meta/src/meta/v4/snapshot.rs index ff1ea66eae7d..582032fe1ea6 100644 --- a/src/query/storages/common/table_meta/src/meta/v4/snapshot.rs +++ b/src/query/storages/common/table_meta/src/meta/v4/snapshot.rs @@ -16,10 +16,10 @@ use std::io::Cursor; use chrono::DateTime; use chrono::Utc; -use common_base::base::uuid::Uuid; -use common_exception::Result; -use common_expression::TableSchema; -use common_io::prelude::BinaryRead; +use databend_common_base::base::uuid::Uuid; +use databend_common_exception::Result; +use databend_common_expression::TableSchema; +use databend_common_io::prelude::BinaryRead; use serde::Deserialize; use serde::Serialize; diff --git a/src/query/storages/common/table_meta/src/meta/v5/segment.rs b/src/query/storages/common/table_meta/src/meta/v5/segment.rs index 823e3d7aa3ad..f838f9ead1e7 100644 --- a/src/query/storages/common/table_meta/src/meta/v5/segment.rs +++ b/src/query/storages/common/table_meta/src/meta/v5/segment.rs @@ -16,9 +16,9 @@ use std::io::Cursor; use std::io::Read; use std::sync::Arc; -use common_exception::ErrorCode; -use common_exception::Result; -use common_io::prelude::BinaryRead; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_io::prelude::BinaryRead; use serde::Deserialize; use serde::Serialize; diff --git a/src/query/storages/common/table_meta/src/meta/v5/snapshot.rs b/src/query/storages/common/table_meta/src/meta/v5/snapshot.rs index fcadab0a0c98..2832d152b583 100644 --- a/src/query/storages/common/table_meta/src/meta/v5/snapshot.rs +++ b/src/query/storages/common/table_meta/src/meta/v5/snapshot.rs @@ -16,10 +16,10 @@ use std::io::Cursor; use chrono::DateTime; use chrono::Utc; -use common_base::base::uuid::Uuid; -use common_exception::Result; -use common_expression::TableSchema; -use common_io::prelude::BinaryRead; +use databend_common_base::base::uuid::Uuid; +use databend_common_exception::Result; +use databend_common_expression::TableSchema; +use databend_common_io::prelude::BinaryRead; use serde::Deserialize; use serde::Serialize; diff --git a/src/query/storages/common/table_meta/src/meta/v5/statistics.rs b/src/query/storages/common/table_meta/src/meta/v5/statistics.rs index 1eeaa69d1769..6fc23a1cb79f 100644 --- a/src/query/storages/common/table_meta/src/meta/v5/statistics.rs +++ b/src/query/storages/common/table_meta/src/meta/v5/statistics.rs @@ -14,8 +14,8 @@ use std::collections::HashMap; -use common_expression::ColumnId; -use common_expression::Scalar; +use databend_common_expression::ColumnId; +use databend_common_expression::Scalar; use crate::meta::MinMax; diff --git a/src/query/storages/common/table_meta/src/meta/versions.rs b/src/query/storages/common/table_meta/src/meta/versions.rs index d3c4aad1a584..4b9450fb567d 100644 --- a/src/query/storages/common/table_meta/src/meta/versions.rs +++ b/src/query/storages/common/table_meta/src/meta/versions.rs @@ -14,8 +14,8 @@ use std::marker::PhantomData; -use common_exception::ErrorCode; -use common_expression::DataBlock; +use databend_common_exception::ErrorCode; +use databend_common_expression::DataBlock; use super::v2; use crate::meta::v0; diff --git a/src/query/storages/common/table_meta/src/readers/segment_reader.rs b/src/query/storages/common/table_meta/src/readers/segment_reader.rs index b79d29c4d944..00faec9917cf 100644 --- a/src/query/storages/common/table_meta/src/readers/segment_reader.rs +++ b/src/query/storages/common/table_meta/src/readers/segment_reader.rs @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_exception::Result; -use common_expression::TableSchemaRef; +use databend_common_exception::Result; +use databend_common_expression::TableSchemaRef; use futures::AsyncRead; use futures_util::AsyncReadExt; diff --git a/src/query/storages/common/table_meta/src/readers/snapshot_reader.rs b/src/query/storages/common/table_meta/src/readers/snapshot_reader.rs index ac169ff38bd4..8e0b3d68c37a 100644 --- a/src/query/storages/common/table_meta/src/readers/snapshot_reader.rs +++ b/src/query/storages/common/table_meta/src/readers/snapshot_reader.rs @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_exception::Result; -use common_expression::TableSchema; +use databend_common_exception::Result; +use databend_common_expression::TableSchema; use futures_util::AsyncRead; use futures_util::AsyncReadExt; diff --git a/src/query/storages/common/table_meta/src/readers/versioned_reader.rs b/src/query/storages/common/table_meta/src/readers/versioned_reader.rs index fa4ec679d531..1f5ffb150b00 100644 --- a/src/query/storages/common/table_meta/src/readers/versioned_reader.rs +++ b/src/query/storages/common/table_meta/src/readers/versioned_reader.rs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_exception::Result; +use databend_common_exception::Result; use futures::AsyncRead; use futures_util::AsyncReadExt; diff --git a/src/query/storages/common/table_meta/src/table/table_compression.rs b/src/query/storages/common/table_meta/src/table/table_compression.rs index 2a811c414ea8..b9ae07d6b495 100644 --- a/src/query/storages/common/table_meta/src/table/table_compression.rs +++ b/src/query/storages/common/table_meta/src/table/table_compression.rs @@ -12,9 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_arrow::native; -use common_arrow::parquet; -use common_exception::ErrorCode; +use databend_common_arrow::native; +use databend_common_arrow::parquet; +use databend_common_exception::ErrorCode; use crate::meta; diff --git a/src/query/storages/delta/Cargo.toml b/src/query/storages/delta/Cargo.toml index 975f43fa7b99..5346b29038a1 100644 --- a/src/query/storages/delta/Cargo.toml +++ b/src/query/storages/delta/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "common-storages-delta" +name = "databend-common-storages-delta" version = { workspace = true } edition = "2021" authors = ["Databend Authors "] @@ -9,15 +9,15 @@ publish = false # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -common-arrow = { path = "../../../common/arrow" } -common-base = { path = "../../../common/base" } -common-catalog = { path = "../../catalog" } -common-exception = { path = "../../../common/exception" } -common-expression = { path = "../../expression" } -common-meta-app = { path = "../../../meta/app" } -common-pipeline-core = { path = "../../pipeline/core" } -common-storage = { path = "../../../common/storage" } -common-storages-parquet = { path = "../parquet" } +databend-common-arrow = { path = "../../../common/arrow" } +databend-common-base = { path = "../../../common/base" } +databend-common-catalog = { path = "../../catalog" } +databend-common-exception = { path = "../../../common/exception" } +databend-common-expression = { path = "../../expression" } +databend-common-meta-app = { path = "../../../meta/app" } +databend-common-pipeline-core = { path = "../../pipeline/core" } +databend-common-storage = { path = "../../../common/storage" } +databend-common-storages-parquet = { path = "../parquet" } arrow-schema = { workspace = true } async-backtrace = { workspace = true } diff --git a/src/query/storages/delta/src/partition.rs b/src/query/storages/delta/src/partition.rs index c35a9daa9037..fc914daaa1b1 100644 --- a/src/query/storages/delta/src/partition.rs +++ b/src/query/storages/delta/src/partition.rs @@ -14,11 +14,11 @@ use std::any::Any; -use common_catalog::plan::PartInfo; -use common_catalog::plan::PartInfoPtr; -use common_exception::ErrorCode; -use common_exception::Result; -use common_storages_parquet::ParquetPart; +use databend_common_catalog::plan::PartInfo; +use databend_common_catalog::plan::PartInfoPtr; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_storages_parquet::ParquetPart; /// # TODO /// diff --git a/src/query/storages/delta/src/table.rs b/src/query/storages/delta/src/table.rs index 8eb43f194238..ff614ced5871 100644 --- a/src/query/storages/delta/src/table.rs +++ b/src/query/storages/delta/src/table.rs @@ -18,31 +18,31 @@ use std::sync::Arc; use arrow_schema::Schema as ArrowSchema; use async_trait::async_trait; -use common_arrow::arrow::datatypes::Field as Arrow2Field; -use common_arrow::arrow::datatypes::Schema as Arrow2Schema; -use common_catalog::catalog::StorageDescription; -use common_catalog::plan::DataSourcePlan; -use common_catalog::plan::ParquetReadOptions; -use common_catalog::plan::PartInfo; -use common_catalog::plan::PartStatistics; -use common_catalog::plan::Partitions; -use common_catalog::plan::PartitionsShuffleKind; -use common_catalog::plan::PushDownInfo; -use common_catalog::table::Table; -use common_catalog::table_args::TableArgs; -use common_catalog::table_context::TableContext; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::DataSchema; -use common_expression::TableSchema; -use common_meta_app::schema::TableInfo; -use common_meta_app::storage::StorageParams; -use common_pipeline_core::Pipeline; -use common_storage::init_operator; -use common_storages_parquet::ParquetFilesPart; -use common_storages_parquet::ParquetPart; -use common_storages_parquet::ParquetRSPruner; -use common_storages_parquet::ParquetRSReaderBuilder; +use databend_common_arrow::arrow::datatypes::Field as Arrow2Field; +use databend_common_arrow::arrow::datatypes::Schema as Arrow2Schema; +use databend_common_catalog::catalog::StorageDescription; +use databend_common_catalog::plan::DataSourcePlan; +use databend_common_catalog::plan::ParquetReadOptions; +use databend_common_catalog::plan::PartInfo; +use databend_common_catalog::plan::PartStatistics; +use databend_common_catalog::plan::Partitions; +use databend_common_catalog::plan::PartitionsShuffleKind; +use databend_common_catalog::plan::PushDownInfo; +use databend_common_catalog::table::Table; +use databend_common_catalog::table_args::TableArgs; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::DataSchema; +use databend_common_expression::TableSchema; +use databend_common_meta_app::schema::TableInfo; +use databend_common_meta_app::storage::StorageParams; +use databend_common_pipeline_core::Pipeline; +use databend_common_storage::init_operator; +use databend_common_storages_parquet::ParquetFilesPart; +use databend_common_storages_parquet::ParquetPart; +use databend_common_storages_parquet::ParquetRSPruner; +use databend_common_storages_parquet::ParquetRSReaderBuilder; use deltalake::kernel::Add; use deltalake::logstore::default_logstore::DefaultLogStore; use deltalake::logstore::LogStoreConfig; diff --git a/src/query/storages/delta/src/table_source.rs b/src/query/storages/delta/src/table_source.rs index 8d6c56bd0fe4..b9238293b28f 100644 --- a/src/query/storages/delta/src/table_source.rs +++ b/src/query/storages/delta/src/table_source.rs @@ -15,20 +15,20 @@ use std::any::Any; use std::sync::Arc; -use common_base::base::Progress; -use common_base::base::ProgressValues; -use common_catalog::table_context::TableContext; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::DataBlock; -use common_expression::DataSchema; -use common_expression::DataSchemaRef; -use common_pipeline_core::processors::Event; -use common_pipeline_core::processors::OutputPort; -use common_pipeline_core::processors::Processor; -use common_pipeline_core::processors::ProcessorPtr; -use common_storages_parquet::ParquetPart; -use common_storages_parquet::ParquetRSFullReader; +use databend_common_base::base::Progress; +use databend_common_base::base::ProgressValues; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::DataBlock; +use databend_common_expression::DataSchema; +use databend_common_expression::DataSchemaRef; +use databend_common_pipeline_core::processors::Event; +use databend_common_pipeline_core::processors::OutputPort; +use databend_common_pipeline_core::processors::Processor; +use databend_common_pipeline_core::processors::ProcessorPtr; +use databend_common_storages_parquet::ParquetPart; +use databend_common_storages_parquet::ParquetRSFullReader; use opendal::Reader; use parquet::arrow::async_reader::ParquetRecordBatchStream; diff --git a/src/query/storages/factory/Cargo.toml b/src/query/storages/factory/Cargo.toml index 59d5a6f122cd..6e6e7de6cbb9 100644 --- a/src/query/storages/factory/Cargo.toml +++ b/src/query/storages/factory/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "common-storages-factory" +name = "databend-common-storages-factory" version = "0.1.0" edition = "2021" authors = ["Databend Authors "] @@ -12,19 +12,19 @@ doctest = false test = false [dependencies] -common-catalog = { path = "../../catalog" } -common-config = { path = "../../config" } -common-exception = { path = "../../../common/exception" } -common-meta-app = { path = "../../../meta/app" } -common-storages-delta = { path = "../delta" } -common-storages-fuse = { path = "../fuse" } -common-storages-iceberg = { path = "../iceberg" } -common-storages-memory = { path = "../memory" } -common-storages-null = { path = "../null" } -common-storages-random = { path = "../random" } -common-storages-stream = { path = "../stream" } -common-storages-view = { path = "../view" } +databend-common-catalog = { path = "../../catalog" } +databend-common-config = { path = "../../config" } +databend-common-exception = { path = "../../../common/exception" } +databend-common-meta-app = { path = "../../../meta/app" } +databend-common-storages-delta = { path = "../delta" } +databend-common-storages-fuse = { path = "../fuse" } +databend-common-storages-iceberg = { path = "../iceberg" } +databend-common-storages-memory = { path = "../memory" } +databend-common-storages-null = { path = "../null" } +databend-common-storages-random = { path = "../random" } +databend-common-storages-stream = { path = "../stream" } +databend-common-storages-view = { path = "../view" } -storages-common-index = { path = "../common/index" } +databend-storages-common-index = { path = "../common/index" } dashmap = { workspace = true } diff --git a/src/query/storages/factory/src/lib.rs b/src/query/storages/factory/src/lib.rs index d6629fb12e79..fcda62ee216d 100644 --- a/src/query/storages/factory/src/lib.rs +++ b/src/query/storages/factory/src/lib.rs @@ -14,13 +14,13 @@ #![allow(clippy::uninlined_format_args)] -pub use common_storages_fuse as fuse; -pub use storages_common_index as index; +pub use databend_common_storages_fuse as fuse; +pub use databend_storages_common_index as index; mod storage_factory; -pub use common_catalog::table::NavigationPoint; -pub use common_catalog::table::Table; -pub use common_catalog::table::TableStatistics; +pub use databend_common_catalog::table::NavigationPoint; +pub use databend_common_catalog::table::Table; +pub use databend_common_catalog::table::TableStatistics; pub use storage_factory::StorageCreator; pub use storage_factory::StorageDescription; pub use storage_factory::StorageFactory; diff --git a/src/query/storages/factory/src/storage_factory.rs b/src/query/storages/factory/src/storage_factory.rs index 6ce3993b456b..549f64e454f1 100644 --- a/src/query/storages/factory/src/storage_factory.rs +++ b/src/query/storages/factory/src/storage_factory.rs @@ -14,19 +14,19 @@ use std::sync::Arc; -pub use common_catalog::catalog::StorageDescription; -use common_config::InnerConfig; -use common_exception::ErrorCode; -use common_exception::Result; -use common_meta_app::schema::TableInfo; -use common_storages_delta::DeltaTable; -use common_storages_iceberg::IcebergTable; -use common_storages_memory::MemoryTable; -use common_storages_null::NullTable; -use common_storages_random::RandomTable; -use common_storages_stream::stream_table::StreamTable; -use common_storages_view::view_table::ViewTable; use dashmap::DashMap; +pub use databend_common_catalog::catalog::StorageDescription; +use databend_common_config::InnerConfig; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_meta_app::schema::TableInfo; +use databend_common_storages_delta::DeltaTable; +use databend_common_storages_iceberg::IcebergTable; +use databend_common_storages_memory::MemoryTable; +use databend_common_storages_null::NullTable; +use databend_common_storages_random::RandomTable; +use databend_common_storages_stream::stream_table::StreamTable; +use databend_common_storages_view::view_table::ViewTable; use crate::fuse::FuseTable; use crate::Table; diff --git a/src/query/storages/fuse/Cargo.toml b/src/query/storages/fuse/Cargo.toml index c787809fb652..54a8fde43f7d 100644 --- a/src/query/storages/fuse/Cargo.toml +++ b/src/query/storages/fuse/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "common-storages-fuse" +name = "databend-common-storages-fuse" version = { workspace = true } authors = { workspace = true } license = { workspace = true } @@ -12,32 +12,32 @@ doctest = false test = false [dependencies] -common-arrow = { path = "../../../common/arrow" } -common-base = { path = "../../../common/base" } -common-cache = { path = "../../../common/cache" } -common-catalog = { path = "../../catalog" } -common-exception = { path = "../../../common/exception" } -common-expression = { path = "../../expression" } -common-functions = { path = "../../functions" } -common-io = { path = "../../../common/io" } -common-meta-app = { path = "../../../meta/app" } -common-meta-types = { path = "../../../meta/types" } -common-metrics = { path = "../../../common/metrics" } -common-pipeline-core = { path = "../../pipeline/core" } -common-pipeline-sinks = { path = "../../pipeline/sinks" } -common-pipeline-sources = { path = "../../pipeline/sources" } -common-pipeline-transforms = { path = "../../pipeline/transforms" } -common-sharing = { path = "../../sharing" } -common-sql = { path = "../../sql" } -common-storage = { path = "../../../common/storage" } +databend-common-arrow = { path = "../../../common/arrow" } +databend-common-base = { path = "../../../common/base" } +databend-common-cache = { path = "../../../common/cache" } +databend-common-catalog = { path = "../../catalog" } +databend-common-exception = { path = "../../../common/exception" } +databend-common-expression = { path = "../../expression" } +databend-common-functions = { path = "../../functions" } +databend-common-io = { path = "../../../common/io" } +databend-common-meta-app = { path = "../../../meta/app" } +databend-common-meta-types = { path = "../../../meta/types" } +databend-common-metrics = { path = "../../../common/metrics" } +databend-common-pipeline-core = { path = "../../pipeline/core" } +databend-common-pipeline-sinks = { path = "../../pipeline/sinks" } +databend-common-pipeline-sources = { path = "../../pipeline/sources" } +databend-common-pipeline-transforms = { path = "../../pipeline/transforms" } +databend-common-sharing = { path = "../../sharing" } +databend-common-sql = { path = "../../sql" } +databend-common-storage = { path = "../../../common/storage" } jsonb = { workspace = true } -storages-common-blocks = { path = "../common/blocks" } -storages-common-cache = { path = "../common/cache" } -storages-common-cache-manager = { path = "../common/cache_manager" } -storages-common-index = { path = "../common/index" } -storages-common-pruner = { path = "../common/pruner" } -storages-common-table-meta = { path = "../common/table_meta" } +databend-storages-common-blocks = { path = "../common/blocks" } +databend-storages-common-cache = { path = "../common/cache" } +databend-storages-common-cache-manager = { path = "../common/cache_manager" } +databend-storages-common-index = { path = "../common/index" } +databend-storages-common-pruner = { path = "../common/pruner" } +databend-storages-common-table-meta = { path = "../common/table_meta" } ahash = "0.8.3" async-backtrace = { workspace = true } diff --git a/src/query/storages/fuse/src/fuse_column.rs b/src/query/storages/fuse/src/fuse_column.rs index e99647e8fa5f..780663dcbdd2 100644 --- a/src/query/storages/fuse/src/fuse_column.rs +++ b/src/query/storages/fuse/src/fuse_column.rs @@ -14,11 +14,11 @@ use std::collections::HashMap; -use common_catalog::statistics::BasicColumnStatistics; -use common_catalog::table::ColumnStatisticsProvider; -use common_expression::ColumnId; -use common_storage::Datum; -use storages_common_table_meta::meta::ColumnStatistics as FuseColumnStatistics; +use databend_common_catalog::statistics::BasicColumnStatistics; +use databend_common_catalog::table::ColumnStatisticsProvider; +use databend_common_expression::ColumnId; +use databend_common_storage::Datum; +use databend_storages_common_table_meta::meta::ColumnStatistics as FuseColumnStatistics; /// A column statistics provider for fuse table. #[derive(Default)] diff --git a/src/query/storages/fuse/src/fuse_part.rs b/src/query/storages/fuse/src/fuse_part.rs index d99934284cf8..c2ab33115313 100644 --- a/src/query/storages/fuse/src/fuse_part.rs +++ b/src/query/storages/fuse/src/fuse_part.rs @@ -22,17 +22,17 @@ use std::sync::Arc; use chrono::DateTime; use chrono::Utc; -use common_catalog::plan::PartInfo; -use common_catalog::plan::PartInfoPtr; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::ColumnId; -use common_expression::Scalar; -use storages_common_pruner::BlockMetaIndex; -use storages_common_table_meta::meta::ColumnMeta; -use storages_common_table_meta::meta::ColumnStatistics; -use storages_common_table_meta::meta::Compression; -use storages_common_table_meta::meta::Location; +use databend_common_catalog::plan::PartInfo; +use databend_common_catalog::plan::PartInfoPtr; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::ColumnId; +use databend_common_expression::Scalar; +use databend_storages_common_pruner::BlockMetaIndex; +use databend_storages_common_table_meta::meta::ColumnMeta; +use databend_storages_common_table_meta::meta::ColumnStatistics; +use databend_storages_common_table_meta::meta::Compression; +use databend_storages_common_table_meta::meta::Location; /// Fuse table partition information. #[derive(serde::Serialize, serde::Deserialize, PartialEq, Debug)] diff --git a/src/query/storages/fuse/src/fuse_table.rs b/src/query/storages/fuse/src/fuse_table.rs index 1fd2ff7b9107..c26218e2aebd 100644 --- a/src/query/storages/fuse/src/fuse_table.rs +++ b/src/query/storages/fuse/src/fuse_table.rs @@ -18,62 +18,62 @@ use std::str; use std::str::FromStr; use std::sync::Arc; -use common_catalog::catalog::StorageDescription; -use common_catalog::lock::Lock; -use common_catalog::plan::DataSourcePlan; -use common_catalog::plan::PartStatistics; -use common_catalog::plan::Partitions; -use common_catalog::plan::PushDownInfo; -use common_catalog::plan::StreamColumn; -use common_catalog::table::AppendMode; -use common_catalog::table::ColumnStatisticsProvider; -use common_catalog::table::NavigationDescriptor; -use common_catalog::table_context::TableContext; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::BlockThresholds; -use common_expression::RemoteExpr; -use common_expression::ORIGIN_BLOCK_ID_COL_NAME; -use common_expression::ORIGIN_BLOCK_ROW_NUM_COL_NAME; -use common_expression::ORIGIN_VERSION_COL_NAME; -use common_io::constants::DEFAULT_BLOCK_BUFFER_SIZE; -use common_io::constants::DEFAULT_BLOCK_MAX_ROWS; -use common_meta_app::schema::DatabaseType; -use common_meta_app::schema::TableInfo; -use common_meta_app::schema::UpdateStreamMetaReq; -use common_meta_app::schema::UpsertTableCopiedFileReq; -use common_pipeline_core::Pipeline; -use common_sharing::create_share_table_operator; -use common_sql::binder::STREAM_COLUMN_FACTORY; -use common_sql::parse_exprs; -use common_sql::BloomIndexColumns; -use common_storage::init_operator; -use common_storage::DataOperator; -use common_storage::ShareTableConfig; -use common_storage::StorageMetrics; -use common_storage::StorageMetricsLayer; +use databend_common_catalog::catalog::StorageDescription; +use databend_common_catalog::lock::Lock; +use databend_common_catalog::plan::DataSourcePlan; +use databend_common_catalog::plan::PartStatistics; +use databend_common_catalog::plan::Partitions; +use databend_common_catalog::plan::PushDownInfo; +use databend_common_catalog::plan::StreamColumn; +use databend_common_catalog::table::AppendMode; +use databend_common_catalog::table::ColumnStatisticsProvider; +use databend_common_catalog::table::NavigationDescriptor; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::BlockThresholds; +use databend_common_expression::RemoteExpr; +use databend_common_expression::ORIGIN_BLOCK_ID_COL_NAME; +use databend_common_expression::ORIGIN_BLOCK_ROW_NUM_COL_NAME; +use databend_common_expression::ORIGIN_VERSION_COL_NAME; +use databend_common_io::constants::DEFAULT_BLOCK_BUFFER_SIZE; +use databend_common_io::constants::DEFAULT_BLOCK_MAX_ROWS; +use databend_common_meta_app::schema::DatabaseType; +use databend_common_meta_app::schema::TableInfo; +use databend_common_meta_app::schema::UpdateStreamMetaReq; +use databend_common_meta_app::schema::UpsertTableCopiedFileReq; +use databend_common_pipeline_core::Pipeline; +use databend_common_sharing::create_share_table_operator; +use databend_common_sql::binder::STREAM_COLUMN_FACTORY; +use databend_common_sql::parse_exprs; +use databend_common_sql::BloomIndexColumns; +use databend_common_storage::init_operator; +use databend_common_storage::DataOperator; +use databend_common_storage::ShareTableConfig; +use databend_common_storage::StorageMetrics; +use databend_common_storage::StorageMetricsLayer; +use databend_storages_common_cache::LoadParams; +use databend_storages_common_table_meta::meta::ClusterKey; +use databend_storages_common_table_meta::meta::SnapshotId; +use databend_storages_common_table_meta::meta::Statistics as FuseStatistics; +use databend_storages_common_table_meta::meta::TableSnapshot; +use databend_storages_common_table_meta::meta::TableSnapshotStatistics; +use databend_storages_common_table_meta::meta::Versioned; +use databend_storages_common_table_meta::table::table_storage_prefix; +use databend_storages_common_table_meta::table::TableCompression; +use databend_storages_common_table_meta::table::OPT_KEY_BLOOM_INDEX_COLUMNS; +use databend_storages_common_table_meta::table::OPT_KEY_CHANGE_TRACKING; +use databend_storages_common_table_meta::table::OPT_KEY_DATABASE_ID; +use databend_storages_common_table_meta::table::OPT_KEY_LEGACY_SNAPSHOT_LOC; +use databend_storages_common_table_meta::table::OPT_KEY_SNAPSHOT_LOCATION; +use databend_storages_common_table_meta::table::OPT_KEY_STORAGE_FORMAT; +use databend_storages_common_table_meta::table::OPT_KEY_STORAGE_PREFIX; +use databend_storages_common_table_meta::table::OPT_KEY_TABLE_ATTACHED_DATA_URI; +use databend_storages_common_table_meta::table::OPT_KEY_TABLE_ATTACHED_READ_ONLY; +use databend_storages_common_table_meta::table::OPT_KEY_TABLE_COMPRESSION; use log::error; use log::warn; use opendal::Operator; -use storages_common_cache::LoadParams; -use storages_common_table_meta::meta::ClusterKey; -use storages_common_table_meta::meta::SnapshotId; -use storages_common_table_meta::meta::Statistics as FuseStatistics; -use storages_common_table_meta::meta::TableSnapshot; -use storages_common_table_meta::meta::TableSnapshotStatistics; -use storages_common_table_meta::meta::Versioned; -use storages_common_table_meta::table::table_storage_prefix; -use storages_common_table_meta::table::TableCompression; -use storages_common_table_meta::table::OPT_KEY_BLOOM_INDEX_COLUMNS; -use storages_common_table_meta::table::OPT_KEY_CHANGE_TRACKING; -use storages_common_table_meta::table::OPT_KEY_DATABASE_ID; -use storages_common_table_meta::table::OPT_KEY_LEGACY_SNAPSHOT_LOC; -use storages_common_table_meta::table::OPT_KEY_SNAPSHOT_LOCATION; -use storages_common_table_meta::table::OPT_KEY_STORAGE_FORMAT; -use storages_common_table_meta::table::OPT_KEY_STORAGE_PREFIX; -use storages_common_table_meta::table::OPT_KEY_TABLE_ATTACHED_DATA_URI; -use storages_common_table_meta::table::OPT_KEY_TABLE_ATTACHED_READ_ONLY; -use storages_common_table_meta::table::OPT_KEY_TABLE_COMPRESSION; use uuid::Uuid; use crate::fuse_column::FuseTableColumnStatisticsProvider; diff --git a/src/query/storages/fuse/src/fuse_type.rs b/src/query/storages/fuse/src/fuse_type.rs index 5ff997af0de1..8eb0ca077d09 100644 --- a/src/query/storages/fuse/src/fuse_type.rs +++ b/src/query/storages/fuse/src/fuse_type.rs @@ -14,7 +14,7 @@ use std::str::FromStr; -use common_exception::ErrorCode; +use databend_common_exception::ErrorCode; /// Fuse engine table type. /// This is used to distinguish different table types. diff --git a/src/query/storages/fuse/src/io/files.rs b/src/query/storages/fuse/src/io/files.rs index 7a9f778c0dec..8fb2b897c7c4 100644 --- a/src/query/storages/fuse/src/io/files.rs +++ b/src/query/storages/fuse/src/io/files.rs @@ -14,9 +14,9 @@ use std::sync::Arc; -use common_base::runtime::execute_futures_in_parallel; -use common_catalog::table_context::TableContext; -use common_exception::Result; +use databend_common_base::runtime::execute_futures_in_parallel; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::Result; use log::info; use opendal::Operator; diff --git a/src/query/storages/fuse/src/io/locations.rs b/src/query/storages/fuse/src/io/locations.rs index fc81f0aeaed1..ec39814383c7 100644 --- a/src/query/storages/fuse/src/io/locations.rs +++ b/src/query/storages/fuse/src/io/locations.rs @@ -14,13 +14,13 @@ use std::marker::PhantomData; -use common_exception::Result; -use common_expression::DataBlock; -use storages_common_table_meta::meta::Location; -use storages_common_table_meta::meta::SegmentInfo; -use storages_common_table_meta::meta::SnapshotVersion; -use storages_common_table_meta::meta::TableSnapshotStatisticsVersion; -use storages_common_table_meta::meta::Versioned; +use databend_common_exception::Result; +use databend_common_expression::DataBlock; +use databend_storages_common_table_meta::meta::Location; +use databend_storages_common_table_meta::meta::SegmentInfo; +use databend_storages_common_table_meta::meta::SnapshotVersion; +use databend_storages_common_table_meta::meta::TableSnapshotStatisticsVersion; +use databend_storages_common_table_meta::meta::Versioned; use uuid::Uuid; use crate::constants::FUSE_TBL_BLOCK_PREFIX; diff --git a/src/query/storages/fuse/src/io/read/agg_index/agg_index_reader.rs b/src/query/storages/fuse/src/io/read/agg_index/agg_index_reader.rs index ee92bfdbf949..124b0d447849 100644 --- a/src/query/storages/fuse/src/io/read/agg_index/agg_index_reader.rs +++ b/src/query/storages/fuse/src/io/read/agg_index/agg_index_reader.rs @@ -14,22 +14,22 @@ use std::sync::Arc; -use common_catalog::plan::AggIndexInfo; -use common_catalog::plan::AggIndexMeta; -use common_catalog::table_context::TableContext; -use common_exception::Result; -use common_expression::types::BooleanType; -use common_expression::types::DataType; -use common_expression::BlockEntry; -use common_expression::DataBlock; -use common_expression::Evaluator; -use common_expression::Expr; -use common_expression::FunctionContext; -use common_expression::Scalar; -use common_expression::Value; -use common_functions::BUILTIN_FUNCTIONS; +use databend_common_catalog::plan::AggIndexInfo; +use databend_common_catalog::plan::AggIndexMeta; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::Result; +use databend_common_expression::types::BooleanType; +use databend_common_expression::types::DataType; +use databend_common_expression::BlockEntry; +use databend_common_expression::DataBlock; +use databend_common_expression::Evaluator; +use databend_common_expression::Expr; +use databend_common_expression::FunctionContext; +use databend_common_expression::Scalar; +use databend_common_expression::Value; +use databend_common_functions::BUILTIN_FUNCTIONS; +use databend_storages_common_table_meta::table::TableCompression; use opendal::Operator; -use storages_common_table_meta::table::TableCompression; use crate::io::BlockReader; diff --git a/src/query/storages/fuse/src/io/read/agg_index/agg_index_reader_native.rs b/src/query/storages/fuse/src/io/read/agg_index/agg_index_reader_native.rs index 63e0185e1b69..75bc5333b4df 100644 --- a/src/query/storages/fuse/src/io/read/agg_index/agg_index_reader_native.rs +++ b/src/query/storages/fuse/src/io/read/agg_index/agg_index_reader_native.rs @@ -14,12 +14,12 @@ use std::sync::Arc; -use common_arrow::arrow::chunk::Chunk; -use common_arrow::native::read as nread; -use common_exception::Result; -use common_expression::DataBlock; +use databend_common_arrow::arrow::chunk::Chunk; +use databend_common_arrow::native::read as nread; +use databend_common_exception::Result; +use databend_common_expression::DataBlock; +use databend_storages_common_table_meta::meta::ColumnMeta; use log::debug; -use storages_common_table_meta::meta::ColumnMeta; use super::AggIndexReader; use crate::io::BlockReader; diff --git a/src/query/storages/fuse/src/io/read/agg_index/agg_index_reader_parquet.rs b/src/query/storages/fuse/src/io/read/agg_index/agg_index_reader_parquet.rs index 8f21e8e9325c..e4fd82ba03b3 100644 --- a/src/query/storages/fuse/src/io/read/agg_index/agg_index_reader_parquet.rs +++ b/src/query/storages/fuse/src/io/read/agg_index/agg_index_reader_parquet.rs @@ -14,10 +14,10 @@ use std::sync::Arc; -use common_arrow::arrow::io::parquet::read as pread; -use common_catalog::plan::PartInfoPtr; -use common_exception::Result; -use common_expression::DataBlock; +use databend_common_arrow::arrow::io::parquet::read as pread; +use databend_common_catalog::plan::PartInfoPtr; +use databend_common_exception::Result; +use databend_common_expression::DataBlock; use log::debug; use super::AggIndexReader; diff --git a/src/query/storages/fuse/src/io/read/block/block_reader.rs b/src/query/storages/fuse/src/io/read/block/block_reader.rs index 4dc50a2f3953..6180bfb1e26f 100644 --- a/src/query/storages/fuse/src/io/read/block/block_reader.rs +++ b/src/query/storages/fuse/src/io/read/block/block_reader.rs @@ -15,24 +15,24 @@ use std::collections::BTreeMap; use std::sync::Arc; -use common_arrow::arrow::datatypes::Field; -use common_arrow::arrow::io::parquet::write::to_parquet_schema; -use common_arrow::parquet::metadata::SchemaDescriptor; -use common_catalog::plan::Projection; -use common_catalog::table_context::TableContext; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::types::DataType; -use common_expression::ColumnId; -use common_expression::DataField; -use common_expression::DataSchema; -use common_expression::FieldIndex; -use common_expression::Scalar; -use common_expression::TableField; -use common_expression::TableSchemaRef; -use common_sql::field_default_value; -use common_storage::ColumnNode; -use common_storage::ColumnNodes; +use databend_common_arrow::arrow::datatypes::Field; +use databend_common_arrow::arrow::io::parquet::write::to_parquet_schema; +use databend_common_arrow::parquet::metadata::SchemaDescriptor; +use databend_common_catalog::plan::Projection; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::types::DataType; +use databend_common_expression::ColumnId; +use databend_common_expression::DataField; +use databend_common_expression::DataSchema; +use databend_common_expression::FieldIndex; +use databend_common_expression::Scalar; +use databend_common_expression::TableField; +use databend_common_expression::TableSchemaRef; +use databend_common_sql::field_default_value; +use databend_common_storage::ColumnNode; +use databend_common_storage::ColumnNodes; use opendal::Operator; // TODO: make BlockReader as a trait. diff --git a/src/query/storages/fuse/src/io/read/block/block_reader_deserialize.rs b/src/query/storages/fuse/src/io/read/block/block_reader_deserialize.rs index 355664aaf870..0b526abe33d0 100644 --- a/src/query/storages/fuse/src/io/read/block/block_reader_deserialize.rs +++ b/src/query/storages/fuse/src/io/read/block/block_reader_deserialize.rs @@ -15,16 +15,16 @@ use std::collections::HashMap; use std::sync::Arc; -use common_arrow::arrow::array::Array; -use common_arrow::parquet::metadata::SchemaDescriptor; -use common_catalog::plan::PartInfoPtr; -use common_exception::Result; -use common_expression::ColumnId; -use common_expression::DataBlock; -use storages_common_cache_manager::SizedColumnArray; -use storages_common_table_meta::meta::BlockMeta; -use storages_common_table_meta::meta::ColumnMeta; -use storages_common_table_meta::meta::Compression; +use databend_common_arrow::arrow::array::Array; +use databend_common_arrow::parquet::metadata::SchemaDescriptor; +use databend_common_catalog::plan::PartInfoPtr; +use databend_common_exception::Result; +use databend_common_expression::ColumnId; +use databend_common_expression::DataBlock; +use databend_storages_common_cache_manager::SizedColumnArray; +use databend_storages_common_table_meta::meta::BlockMeta; +use databend_storages_common_table_meta::meta::ColumnMeta; +use databend_storages_common_table_meta::meta::Compression; use super::BlockReader; use crate::io::read::block::block_reader_merge_io::DataItem; diff --git a/src/query/storages/fuse/src/io/read/block/block_reader_merge_io.rs b/src/query/storages/fuse/src/io/read/block/block_reader_merge_io.rs index 83de3b7af913..925237e85c61 100644 --- a/src/query/storages/fuse/src/io/read/block/block_reader_merge_io.rs +++ b/src/query/storages/fuse/src/io/read/block/block_reader_merge_io.rs @@ -17,14 +17,14 @@ use std::ops::Range; use std::sync::Arc; use bytes::Bytes; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::ColumnId; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::ColumnId; +use databend_storages_common_cache::CacheAccessor; +use databend_storages_common_cache::TableDataCache; +use databend_storages_common_cache::TableDataCacheKey; +use databend_storages_common_cache_manager::SizedColumnArray; use enum_as_inner::EnumAsInner; -use storages_common_cache::CacheAccessor; -use storages_common_cache::TableDataCache; -use storages_common_cache::TableDataCacheKey; -use storages_common_cache_manager::SizedColumnArray; pub struct OwnerMemory { chunks: HashMap, diff --git a/src/query/storages/fuse/src/io/read/block/block_reader_merge_io_async.rs b/src/query/storages/fuse/src/io/read/block/block_reader_merge_io_async.rs index f864744f0397..0faac678bae4 100644 --- a/src/query/storages/fuse/src/io/read/block/block_reader_merge_io_async.rs +++ b/src/query/storages/fuse/src/io/read/block/block_reader_merge_io_async.rs @@ -17,18 +17,18 @@ use std::collections::HashSet; use std::ops::Range; use std::time::Instant; -use common_base::rangemap::RangeMerger; -use common_base::runtime::UnlimitedFuture; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::ColumnId; -use common_metrics::storage::*; +use databend_common_base::rangemap::RangeMerger; +use databend_common_base::runtime::UnlimitedFuture; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::ColumnId; +use databend_common_metrics::storage::*; +use databend_storages_common_cache::CacheAccessor; +use databend_storages_common_cache::TableDataCacheKey; +use databend_storages_common_cache_manager::CacheManager; +use databend_storages_common_table_meta::meta::ColumnMeta; use futures::future::try_join_all; use opendal::Operator; -use storages_common_cache::CacheAccessor; -use storages_common_cache::TableDataCacheKey; -use storages_common_cache_manager::CacheManager; -use storages_common_table_meta::meta::ColumnMeta; use crate::io::read::block::block_reader_merge_io::OwnerMemory; use crate::io::read::ReadSettings; diff --git a/src/query/storages/fuse/src/io/read/block/block_reader_merge_io_sync.rs b/src/query/storages/fuse/src/io/read/block/block_reader_merge_io_sync.rs index c3b33dcdff9b..3993c63f1495 100644 --- a/src/query/storages/fuse/src/io/read/block/block_reader_merge_io_sync.rs +++ b/src/query/storages/fuse/src/io/read/block/block_reader_merge_io_sync.rs @@ -15,18 +15,18 @@ use std::collections::HashSet; use std::ops::Range; -use common_arrow::arrow::datatypes::Schema as ArrowSchema; -use common_arrow::arrow::io::parquet::read::read_metadata; -use common_base::rangemap::RangeMerger; -use common_catalog::plan::PartInfoPtr; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::ColumnId; -use common_storage::infer_schema_with_extension; +use databend_common_arrow::arrow::datatypes::Schema as ArrowSchema; +use databend_common_arrow::arrow::io::parquet::read::read_metadata; +use databend_common_base::rangemap::RangeMerger; +use databend_common_catalog::plan::PartInfoPtr; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::ColumnId; +use databend_common_storage::infer_schema_with_extension; +use databend_storages_common_cache::CacheAccessor; +use databend_storages_common_cache::TableDataCacheKey; +use databend_storages_common_cache_manager::CacheManager; use opendal::Operator; -use storages_common_cache::CacheAccessor; -use storages_common_cache::TableDataCacheKey; -use storages_common_cache_manager::CacheManager; use crate::fuse_part::FusePartInfo; use crate::io::read::block::block_reader_merge_io::OwnerMemory; diff --git a/src/query/storages/fuse/src/io/read/block/block_reader_native.rs b/src/query/storages/fuse/src/io/read/block/block_reader_native.rs index 981ea25c134a..ba6455922457 100644 --- a/src/query/storages/fuse/src/io/read/block/block_reader_native.rs +++ b/src/query/storages/fuse/src/io/read/block/block_reader_native.rs @@ -18,23 +18,23 @@ use std::io::BufReader; use std::ops::Range; use std::sync::Arc; -use common_arrow::arrow::array::Array; -use common_arrow::arrow::datatypes::Schema as ArrowSchema; -use common_arrow::native::read::reader::infer_schema; -use common_arrow::native::read::reader::NativeReader; -use common_arrow::native::read::NativeReadBuf; -use common_catalog::plan::PartInfoPtr; -use common_catalog::table_context::TableContext; -use common_exception::Result; -use common_expression::types::DataType; -use common_expression::BlockEntry; -use common_expression::Column; -use common_expression::ColumnId; -use common_expression::DataBlock; -use common_expression::Value; -use common_metrics::storage::*; +use databend_common_arrow::arrow::array::Array; +use databend_common_arrow::arrow::datatypes::Schema as ArrowSchema; +use databend_common_arrow::native::read::reader::infer_schema; +use databend_common_arrow::native::read::reader::NativeReader; +use databend_common_arrow::native::read::NativeReadBuf; +use databend_common_catalog::plan::PartInfoPtr; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::Result; +use databend_common_expression::types::DataType; +use databend_common_expression::BlockEntry; +use databend_common_expression::Column; +use databend_common_expression::ColumnId; +use databend_common_expression::DataBlock; +use databend_common_expression::Value; +use databend_common_metrics::storage::*; +use databend_storages_common_table_meta::meta::ColumnMeta; use opendal::Operator; -use storages_common_table_meta::meta::ColumnMeta; use crate::fuse_part::FusePartInfo; use crate::io::BlockReader; diff --git a/src/query/storages/fuse/src/io/read/block/block_reader_native_deserialize.rs b/src/query/storages/fuse/src/io/read/block/block_reader_native_deserialize.rs index d3501545b668..a1e02f4e0d2d 100644 --- a/src/query/storages/fuse/src/io/read/block/block_reader_native_deserialize.rs +++ b/src/query/storages/fuse/src/io/read/block/block_reader_native_deserialize.rs @@ -16,34 +16,34 @@ use std::collections::HashMap; use std::sync::Arc; use std::time::Instant; -use common_arrow::arrow::array::Array; -use common_arrow::arrow::chunk::Chunk; -use common_arrow::arrow::datatypes::DataType as ArrowType; -use common_arrow::arrow::datatypes::Field; -use common_arrow::arrow::datatypes::Field as ArrowField; -use common_arrow::native::read::batch_read::batch_read_array; -use common_arrow::native::read::column_iter_to_arrays; -use common_arrow::native::read::reader::NativeReader; -use common_arrow::native::read::ArrayIter; -use common_arrow::parquet::metadata::ColumnDescriptor; -use common_arrow::parquet::metadata::Descriptor; -use common_arrow::parquet::metadata::SchemaDescriptor; -use common_arrow::parquet::schema::types::FieldInfo; -use common_arrow::parquet::schema::types::ParquetType; -use common_arrow::parquet::schema::types::PhysicalType; -use common_arrow::parquet::schema::types::PrimitiveType; -use common_arrow::parquet::schema::Repetition; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::ColumnId; -use common_expression::DataBlock; -use common_metrics::storage::*; -use common_storage::ColumnNode; -use storages_common_cache::CacheAccessor; -use storages_common_cache::TableDataCacheKey; -use storages_common_cache_manager::CacheManager; -use storages_common_table_meta::meta::ColumnMeta; -use storages_common_table_meta::meta::Compression; +use databend_common_arrow::arrow::array::Array; +use databend_common_arrow::arrow::chunk::Chunk; +use databend_common_arrow::arrow::datatypes::DataType as ArrowType; +use databend_common_arrow::arrow::datatypes::Field; +use databend_common_arrow::arrow::datatypes::Field as ArrowField; +use databend_common_arrow::native::read::batch_read::batch_read_array; +use databend_common_arrow::native::read::column_iter_to_arrays; +use databend_common_arrow::native::read::reader::NativeReader; +use databend_common_arrow::native::read::ArrayIter; +use databend_common_arrow::parquet::metadata::ColumnDescriptor; +use databend_common_arrow::parquet::metadata::Descriptor; +use databend_common_arrow::parquet::metadata::SchemaDescriptor; +use databend_common_arrow::parquet::schema::types::FieldInfo; +use databend_common_arrow::parquet::schema::types::ParquetType; +use databend_common_arrow::parquet::schema::types::PhysicalType; +use databend_common_arrow::parquet::schema::types::PrimitiveType; +use databend_common_arrow::parquet::schema::Repetition; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::ColumnId; +use databend_common_expression::DataBlock; +use databend_common_metrics::storage::*; +use databend_common_storage::ColumnNode; +use databend_storages_common_cache::CacheAccessor; +use databend_storages_common_cache::TableDataCacheKey; +use databend_storages_common_cache_manager::CacheManager; +use databend_storages_common_table_meta::meta::ColumnMeta; +use databend_storages_common_table_meta::meta::Compression; use super::block_reader_deserialize::DeserializedArray; use super::block_reader_deserialize::FieldDeserializationContext; diff --git a/src/query/storages/fuse/src/io/read/block/block_reader_parquet_deserialize.rs b/src/query/storages/fuse/src/io/read/block/block_reader_parquet_deserialize.rs index aee71a6a4f1d..e308f6585833 100644 --- a/src/query/storages/fuse/src/io/read/block/block_reader_parquet_deserialize.rs +++ b/src/query/storages/fuse/src/io/read/block/block_reader_parquet_deserialize.rs @@ -16,28 +16,28 @@ use std::collections::HashMap; use std::sync::Arc; use std::time::Instant; -use common_arrow::arrow::chunk::Chunk; -use common_arrow::arrow::datatypes::Field; -use common_arrow::arrow::io::parquet::read::column_iter_to_arrays; -use common_arrow::arrow::io::parquet::read::nested_column_iter_to_arrays; -use common_arrow::arrow::io::parquet::read::ArrayIter; -use common_arrow::arrow::io::parquet::read::InitNested; -use common_arrow::parquet::compression::Compression as ParquetCompression; -use common_arrow::parquet::metadata::ColumnDescriptor; -use common_arrow::parquet::metadata::SchemaDescriptor; -use common_arrow::parquet::read::PageMetaData; -use common_arrow::parquet::read::PageReader; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::ColumnId; -use common_expression::DataBlock; -use common_metrics::storage::*; -use common_storage::ColumnNode; -use storages_common_cache::CacheAccessor; -use storages_common_cache::TableDataCacheKey; -use storages_common_cache_manager::CacheManager; -use storages_common_table_meta::meta::ColumnMeta; -use storages_common_table_meta::meta::Compression; +use databend_common_arrow::arrow::chunk::Chunk; +use databend_common_arrow::arrow::datatypes::Field; +use databend_common_arrow::arrow::io::parquet::read::column_iter_to_arrays; +use databend_common_arrow::arrow::io::parquet::read::nested_column_iter_to_arrays; +use databend_common_arrow::arrow::io::parquet::read::ArrayIter; +use databend_common_arrow::arrow::io::parquet::read::InitNested; +use databend_common_arrow::parquet::compression::Compression as ParquetCompression; +use databend_common_arrow::parquet::metadata::ColumnDescriptor; +use databend_common_arrow::parquet::metadata::SchemaDescriptor; +use databend_common_arrow::parquet::read::PageMetaData; +use databend_common_arrow::parquet::read::PageReader; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::ColumnId; +use databend_common_expression::DataBlock; +use databend_common_metrics::storage::*; +use databend_common_storage::ColumnNode; +use databend_storages_common_cache::CacheAccessor; +use databend_storages_common_cache::TableDataCacheKey; +use databend_storages_common_cache_manager::CacheManager; +use databend_storages_common_table_meta::meta::ColumnMeta; +use databend_storages_common_table_meta::meta::Compression; use super::block_reader_deserialize::DeserializedArray; use super::block_reader_deserialize::FieldDeserializationContext; diff --git a/src/query/storages/fuse/src/io/read/block/decompressor.rs b/src/query/storages/fuse/src/io/read/block/decompressor.rs index b995d6842d1f..1c12e5ec9bc1 100644 --- a/src/query/storages/fuse/src/io/read/block/decompressor.rs +++ b/src/query/storages/fuse/src/io/read/block/decompressor.rs @@ -17,12 +17,12 @@ use std::sync::atomic::AtomicUsize; use std::sync::atomic::Ordering; use std::sync::Arc; -use common_arrow::parquet::error::Error; -use common_arrow::parquet::page::CompressedPage; -use common_arrow::parquet::page::Page; -use common_arrow::parquet::read::decompress; -use common_arrow::parquet::FallibleStreamingIterator; -use common_exception::Result; +use databend_common_arrow::parquet::error::Error; +use databend_common_arrow::parquet::page::CompressedPage; +use databend_common_arrow::parquet::page::Page; +use databend_common_arrow::parquet::read::decompress; +use databend_common_arrow::parquet::FallibleStreamingIterator; +use databend_common_exception::Result; use streaming_decompression::Compressed; use streaming_decompression::Decompressed; diff --git a/src/query/storages/fuse/src/io/read/bloom/block_filter_reader.rs b/src/query/storages/fuse/src/io/read/bloom/block_filter_reader.rs index a2bd20eab993..a2a0f8c5f38e 100644 --- a/src/query/storages/fuse/src/io/read/bloom/block_filter_reader.rs +++ b/src/query/storages/fuse/src/io/read/bloom/block_filter_reader.rs @@ -16,23 +16,23 @@ use std::collections::HashSet; use std::future::Future; use std::sync::Arc; -use common_base::runtime::GlobalIORuntime; -use common_base::runtime::Runtime; -use common_base::runtime::TrySpawn; -use common_base::GLOBAL_TASK; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::ColumnId; -use common_expression::TableDataType; -use common_expression::TableField; -use common_expression::TableSchema; +use databend_common_base::runtime::GlobalIORuntime; +use databend_common_base::runtime::Runtime; +use databend_common_base::runtime::TrySpawn; +use databend_common_base::GLOBAL_TASK; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::ColumnId; +use databend_common_expression::TableDataType; +use databend_common_expression::TableField; +use databend_common_expression::TableSchema; +use databend_storages_common_cache::LoadParams; +use databend_storages_common_index::filters::Xor8Filter; +use databend_storages_common_index::BloomIndexMeta; +use databend_storages_common_table_meta::meta::Location; +use databend_storages_common_table_meta::meta::SingleColumnMeta; use futures_util::future::try_join_all; use opendal::Operator; -use storages_common_cache::LoadParams; -use storages_common_index::filters::Xor8Filter; -use storages_common_index::BloomIndexMeta; -use storages_common_table_meta::meta::Location; -use storages_common_table_meta::meta::SingleColumnMeta; use crate::index::filters::BlockBloomFilterIndexVersion; use crate::index::filters::BlockFilter; diff --git a/src/query/storages/fuse/src/io/read/bloom/column_filter_reader.rs b/src/query/storages/fuse/src/io/read/bloom/column_filter_reader.rs index 34d4469f391f..ea86f7bac9bc 100644 --- a/src/query/storages/fuse/src/io/read/bloom/column_filter_reader.rs +++ b/src/query/storages/fuse/src/io/read/bloom/column_filter_reader.rs @@ -14,35 +14,35 @@ use std::sync::Arc; -use common_arrow::arrow::datatypes::DataType; -use common_arrow::arrow::datatypes::Field as ArrowField; -use common_arrow::arrow::io::parquet::read::column_iter_to_arrays; -use common_arrow::parquet::compression::Compression; -use common_arrow::parquet::metadata::ColumnDescriptor; -use common_arrow::parquet::metadata::Descriptor; -use common_arrow::parquet::read::BasicDecompressor; -use common_arrow::parquet::read::PageMetaData; -use common_arrow::parquet::read::PageReader; -use common_arrow::parquet::schema::types::FieldInfo; -use common_arrow::parquet::schema::types::ParquetType; -use common_arrow::parquet::schema::types::PhysicalType; -use common_arrow::parquet::schema::types::PrimitiveType; -use common_arrow::parquet::schema::Repetition; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::Column; -use common_expression::ColumnId; -use common_metrics::storage::*; +use databend_common_arrow::arrow::datatypes::DataType; +use databend_common_arrow::arrow::datatypes::Field as ArrowField; +use databend_common_arrow::arrow::io::parquet::read::column_iter_to_arrays; +use databend_common_arrow::parquet::compression::Compression; +use databend_common_arrow::parquet::metadata::ColumnDescriptor; +use databend_common_arrow::parquet::metadata::Descriptor; +use databend_common_arrow::parquet::read::BasicDecompressor; +use databend_common_arrow::parquet::read::PageMetaData; +use databend_common_arrow::parquet::read::PageReader; +use databend_common_arrow::parquet::schema::types::FieldInfo; +use databend_common_arrow::parquet::schema::types::ParquetType; +use databend_common_arrow::parquet::schema::types::PhysicalType; +use databend_common_arrow::parquet::schema::types::PrimitiveType; +use databend_common_arrow::parquet::schema::Repetition; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::Column; +use databend_common_expression::ColumnId; +use databend_common_metrics::storage::*; +use databend_storages_common_cache::CacheKey; +use databend_storages_common_cache::InMemoryCacheReader; +use databend_storages_common_cache::LoadParams; +use databend_storages_common_cache::Loader; +use databend_storages_common_cache_manager::BloomIndexFilterMeter; +use databend_storages_common_cache_manager::CachedObject; +use databend_storages_common_index::filters::Filter; +use databend_storages_common_index::filters::Xor8Filter; +use databend_storages_common_table_meta::meta::SingleColumnMeta; use opendal::Operator; -use storages_common_cache::CacheKey; -use storages_common_cache::InMemoryCacheReader; -use storages_common_cache::LoadParams; -use storages_common_cache::Loader; -use storages_common_cache_manager::BloomIndexFilterMeter; -use storages_common_cache_manager::CachedObject; -use storages_common_index::filters::Filter; -use storages_common_index::filters::Xor8Filter; -use storages_common_table_meta::meta::SingleColumnMeta; type CachedReader = InMemoryCacheReader; @@ -159,8 +159,10 @@ impl Loader for Xor8FilterLoader { column_iter_to_arrays(vec![decompressor], vec![&column_type], field, None, 1)?; if let Some(array) = array_iter.next() { let array = array?; - let col = - Column::from_arrow(array.as_ref(), &common_expression::types::DataType::String); + let col = Column::from_arrow( + array.as_ref(), + &databend_common_expression::types::DataType::String, + ); let filter_bytes = col .as_string() diff --git a/src/query/storages/fuse/src/io/read/meta/meta_readers.rs b/src/query/storages/fuse/src/io/read/meta/meta_readers.rs index f975391300c9..f51bc0bf1621 100644 --- a/src/query/storages/fuse/src/io/read/meta/meta_readers.rs +++ b/src/query/storages/fuse/src/io/read/meta/meta_readers.rs @@ -14,29 +14,29 @@ use std::io::SeekFrom; -use common_arrow::parquet::metadata::ThriftFileMetaData; -use common_cache::DefaultHashBuilder; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::TableSchemaRef; +use databend_common_arrow::parquet::metadata::ThriftFileMetaData; +use databend_common_cache::DefaultHashBuilder; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::TableSchemaRef; +use databend_storages_common_cache::InMemoryItemCacheReader; +use databend_storages_common_cache::LoadParams; +use databend_storages_common_cache::Loader; +use databend_storages_common_cache_manager::CacheManager; +use databend_storages_common_cache_manager::CompactSegmentInfoMeter; +use databend_storages_common_index::BloomIndexMeta; +use databend_storages_common_table_meta::meta::CompactSegmentInfo; +use databend_storages_common_table_meta::meta::SegmentInfoVersion; +use databend_storages_common_table_meta::meta::SnapshotVersion; +use databend_storages_common_table_meta::meta::TableSnapshot; +use databend_storages_common_table_meta::meta::TableSnapshotStatistics; +use databend_storages_common_table_meta::meta::TableSnapshotStatisticsVersion; +use databend_storages_common_table_meta::readers::VersionedReader; use futures::AsyncSeek; use futures_util::AsyncReadExt; use futures_util::AsyncSeekExt; use opendal::Operator; use opendal::Reader; -use storages_common_cache::InMemoryItemCacheReader; -use storages_common_cache::LoadParams; -use storages_common_cache::Loader; -use storages_common_cache_manager::CacheManager; -use storages_common_cache_manager::CompactSegmentInfoMeter; -use storages_common_index::BloomIndexMeta; -use storages_common_table_meta::meta::CompactSegmentInfo; -use storages_common_table_meta::meta::SegmentInfoVersion; -use storages_common_table_meta::meta::SnapshotVersion; -use storages_common_table_meta::meta::TableSnapshot; -use storages_common_table_meta::meta::TableSnapshotStatistics; -use storages_common_table_meta::meta::TableSnapshotStatisticsVersion; -use storages_common_table_meta::readers::VersionedReader; use self::thrift_file_meta_read::read_thrift_file_metadata; @@ -146,7 +146,7 @@ async fn bytes_reader(op: &Operator, path: &str, len_hint: Option) -> Resul } mod thrift_file_meta_read { - use common_arrow::parquet::error::Error; + use databend_common_arrow::parquet::error::Error; use parquet_format_safe::thrift::protocol::TCompactInputProtocol; use super::*; @@ -187,7 +187,7 @@ mod thrift_file_meta_read { op: Operator, path: &str, len_hint: Option, - ) -> common_arrow::parquet::error::Result { + ) -> databend_common_arrow::parquet::error::Result { let file_size = if let Some(len) = len_hint { len } else { diff --git a/src/query/storages/fuse/src/io/read/read_settings.rs b/src/query/storages/fuse/src/io/read/read_settings.rs index 156a5369e810..924085837a4b 100644 --- a/src/query/storages/fuse/src/io/read/read_settings.rs +++ b/src/query/storages/fuse/src/io/read/read_settings.rs @@ -14,8 +14,8 @@ use std::sync::Arc; -use common_catalog::table_context::TableContext; -use common_exception::Result; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::Result; #[derive(Clone, Copy)] pub struct ReadSettings { diff --git a/src/query/storages/fuse/src/io/read/snapshot_history_reader.rs b/src/query/storages/fuse/src/io/read/snapshot_history_reader.rs index d10e4fd4e389..5d3f415e228d 100644 --- a/src/query/storages/fuse/src/io/read/snapshot_history_reader.rs +++ b/src/query/storages/fuse/src/io/read/snapshot_history_reader.rs @@ -15,19 +15,20 @@ use std::pin::Pin; use std::sync::Arc; -use common_exception::ErrorCode; +use databend_common_exception::ErrorCode; +use databend_storages_common_cache::LoadParams; +use databend_storages_common_table_meta::meta::FormatVersion; +use databend_storages_common_table_meta::meta::TableSnapshot; use futures_util::stream; -use storages_common_cache::LoadParams; -use storages_common_table_meta::meta::FormatVersion; -use storages_common_table_meta::meta::TableSnapshot; use crate::io::TableMetaLocationGenerator; use crate::io::TableSnapshotReader; pub type TableSnapshotStream = Pin< Box< - dyn stream::Stream, FormatVersion)>> - + Send, + dyn stream::Stream< + Item = databend_common_exception::Result<(Arc, FormatVersion)>, + > + Send, >, >; diff --git a/src/query/storages/fuse/src/io/read/utils.rs b/src/query/storages/fuse/src/io/read/utils.rs index 6739b33f9294..2d794926a8c5 100644 --- a/src/query/storages/fuse/src/io/read/utils.rs +++ b/src/query/storages/fuse/src/io/read/utils.rs @@ -14,9 +14,9 @@ use std::collections::HashMap; -use common_arrow::parquet::metadata::RowGroupMetaData; -use storages_common_table_meta::meta::ColumnMeta; -use storages_common_table_meta::meta::SingleColumnMeta; +use databend_common_arrow::parquet::metadata::RowGroupMetaData; +use databend_storages_common_table_meta::meta::ColumnMeta; +use databend_storages_common_table_meta::meta::SingleColumnMeta; pub(crate) fn build_columns_meta(row_group: &RowGroupMetaData) -> HashMap { let mut columns_meta = HashMap::with_capacity(row_group.columns().len()); diff --git a/src/query/storages/fuse/src/io/read/virtual_column/virtual_column_reader.rs b/src/query/storages/fuse/src/io/read/virtual_column/virtual_column_reader.rs index 9c2c8238d89b..7b8348d4c437 100644 --- a/src/query/storages/fuse/src/io/read/virtual_column/virtual_column_reader.rs +++ b/src/query/storages/fuse/src/io/read/virtual_column/virtual_column_reader.rs @@ -16,17 +16,17 @@ use std::collections::HashMap; use std::collections::HashSet; use std::sync::Arc; -use common_catalog::plan::DataSourcePlan; -use common_catalog::plan::Projection; -use common_catalog::plan::PushDownInfo; -use common_catalog::plan::VirtualColumnInfo; -use common_catalog::table_context::TableContext; -use common_exception::Result; -use common_expression::ColumnId; -use common_expression::TableSchemaRef; -use common_expression::TableSchemaRefExt; +use databend_common_catalog::plan::DataSourcePlan; +use databend_common_catalog::plan::Projection; +use databend_common_catalog::plan::PushDownInfo; +use databend_common_catalog::plan::VirtualColumnInfo; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::Result; +use databend_common_expression::ColumnId; +use databend_common_expression::TableSchemaRef; +use databend_common_expression::TableSchemaRefExt; +use databend_storages_common_table_meta::table::TableCompression; use opendal::Operator; -use storages_common_table_meta::table::TableCompression; use crate::io::BlockReader; diff --git a/src/query/storages/fuse/src/io/read/virtual_column/virtual_column_reader_native.rs b/src/query/storages/fuse/src/io/read/virtual_column/virtual_column_reader_native.rs index cb926b52d56a..3f0dea03bc00 100644 --- a/src/query/storages/fuse/src/io/read/virtual_column/virtual_column_reader_native.rs +++ b/src/query/storages/fuse/src/io/read/virtual_column/virtual_column_reader_native.rs @@ -14,9 +14,9 @@ use std::collections::HashSet; -use common_arrow::native::read as nread; -use common_expression::ColumnId; -use storages_common_table_meta::meta::ColumnMeta; +use databend_common_arrow::native::read as nread; +use databend_common_expression::ColumnId; +use databend_storages_common_table_meta::meta::ColumnMeta; use super::VirtualColumnReader; use crate::io::BlockReader; diff --git a/src/query/storages/fuse/src/io/read/virtual_column/virtual_column_reader_parquet.rs b/src/query/storages/fuse/src/io/read/virtual_column/virtual_column_reader_parquet.rs index f6ffa114c634..4c1db5b13438 100644 --- a/src/query/storages/fuse/src/io/read/virtual_column/virtual_column_reader_parquet.rs +++ b/src/query/storages/fuse/src/io/read/virtual_column/virtual_column_reader_parquet.rs @@ -17,23 +17,23 @@ use std::collections::HashSet; use std::ops::Range; use std::sync::Arc; -use common_arrow::arrow::datatypes::Schema as ArrowSchema; -use common_arrow::arrow::io::parquet::read as pread; -use common_arrow::arrow::io::parquet::write::to_parquet_schema; -use common_catalog::plan::PartInfoPtr; -use common_exception::Result; -use common_expression::eval_function; -use common_expression::types::DataType; -use common_expression::BlockEntry; -use common_expression::Column; -use common_expression::ColumnId; -use common_expression::DataBlock; -use common_expression::TableSchema; -use common_expression::Value; -use common_functions::BUILTIN_FUNCTIONS; -use common_storage::infer_schema_with_extension; -use common_storage::ColumnNodes; -use storages_common_table_meta::meta::ColumnMeta; +use databend_common_arrow::arrow::datatypes::Schema as ArrowSchema; +use databend_common_arrow::arrow::io::parquet::read as pread; +use databend_common_arrow::arrow::io::parquet::write::to_parquet_schema; +use databend_common_catalog::plan::PartInfoPtr; +use databend_common_exception::Result; +use databend_common_expression::eval_function; +use databend_common_expression::types::DataType; +use databend_common_expression::BlockEntry; +use databend_common_expression::Column; +use databend_common_expression::ColumnId; +use databend_common_expression::DataBlock; +use databend_common_expression::TableSchema; +use databend_common_expression::Value; +use databend_common_functions::BUILTIN_FUNCTIONS; +use databend_common_storage::infer_schema_with_extension; +use databend_common_storage::ColumnNodes; +use databend_storages_common_table_meta::meta::ColumnMeta; use super::VirtualColumnReader; use crate::io::read::block::DeserializedArray; diff --git a/src/query/storages/fuse/src/io/segments.rs b/src/query/storages/fuse/src/io/segments.rs index 7948f1d0ff3a..1378a475daf0 100644 --- a/src/query/storages/fuse/src/io/segments.rs +++ b/src/query/storages/fuse/src/io/segments.rs @@ -14,21 +14,21 @@ use std::sync::Arc; -use common_base::runtime::execute_futures_in_parallel; -use common_catalog::table_context::TableContext; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::TableSchemaRef; +use databend_common_base::runtime::execute_futures_in_parallel; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::TableSchemaRef; +use databend_storages_common_cache::CacheAccessor; +use databend_storages_common_cache::LoadParams; +use databend_storages_common_cache_manager::CacheManager; +use databend_storages_common_table_meta::meta::CompactSegmentInfo; +use databend_storages_common_table_meta::meta::Location; +use databend_storages_common_table_meta::meta::SegmentInfo; +use databend_storages_common_table_meta::meta::Versioned; use minitrace::full_name; use minitrace::prelude::*; use opendal::Operator; -use storages_common_cache::CacheAccessor; -use storages_common_cache::LoadParams; -use storages_common_cache_manager::CacheManager; -use storages_common_table_meta::meta::CompactSegmentInfo; -use storages_common_table_meta::meta::Location; -use storages_common_table_meta::meta::SegmentInfo; -use storages_common_table_meta::meta::Versioned; use crate::io::MetaReaders; diff --git a/src/query/storages/fuse/src/io/snapshots.rs b/src/query/storages/fuse/src/io/snapshots.rs index 7a6e09f184be..9c187020643a 100644 --- a/src/query/storages/fuse/src/io/snapshots.rs +++ b/src/query/storages/fuse/src/io/snapshots.rs @@ -20,10 +20,16 @@ use std::time::Instant; use chrono::DateTime; use chrono::Utc; -use common_base::runtime::execute_futures_in_parallel; -use common_catalog::table_context::TableContext; -use common_exception::ErrorCode; -use common_exception::Result; +use databend_common_base::runtime::execute_futures_in_parallel; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_storages_common_cache::LoadParams; +use databend_storages_common_table_meta::meta::FormatVersion; +use databend_storages_common_table_meta::meta::Location; +use databend_storages_common_table_meta::meta::SnapshotId; +use databend_storages_common_table_meta::meta::TableSnapshot; +use databend_storages_common_table_meta::meta::TableSnapshotLite; use futures::stream::StreamExt; use futures_util::TryStreamExt; use log::info; @@ -33,12 +39,6 @@ use minitrace::prelude::*; use opendal::EntryMode; use opendal::Metakey; use opendal::Operator; -use storages_common_cache::LoadParams; -use storages_common_table_meta::meta::FormatVersion; -use storages_common_table_meta::meta::Location; -use storages_common_table_meta::meta::SnapshotId; -use storages_common_table_meta::meta::TableSnapshot; -use storages_common_table_meta::meta::TableSnapshotLite; use crate::io::MetaReaders; use crate::io::SnapshotHistoryReader; diff --git a/src/query/storages/fuse/src/io/write/block_writer.rs b/src/query/storages/fuse/src/io/write/block_writer.rs index 44efd083777a..1ff53ea9ee08 100644 --- a/src/query/storages/fuse/src/io/write/block_writer.rs +++ b/src/query/storages/fuse/src/io/write/block_writer.rs @@ -17,25 +17,25 @@ use std::collections::HashMap; use std::sync::Arc; use chrono::Utc; -use common_arrow::arrow::chunk::Chunk as ArrowChunk; -use common_arrow::native::write::NativeWriter; -use common_catalog::table_context::TableContext; -use common_exception::Result; -use common_expression::ColumnId; -use common_expression::DataBlock; -use common_expression::FieldIndex; -use common_expression::TableField; -use common_expression::TableSchemaRef; -use common_io::constants::DEFAULT_BLOCK_BUFFER_SIZE; -use common_io::constants::DEFAULT_BLOCK_INDEX_BUFFER_SIZE; +use databend_common_arrow::arrow::chunk::Chunk as ArrowChunk; +use databend_common_arrow::native::write::NativeWriter; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::Result; +use databend_common_expression::ColumnId; +use databend_common_expression::DataBlock; +use databend_common_expression::FieldIndex; +use databend_common_expression::TableField; +use databend_common_expression::TableSchemaRef; +use databend_common_io::constants::DEFAULT_BLOCK_BUFFER_SIZE; +use databend_common_io::constants::DEFAULT_BLOCK_INDEX_BUFFER_SIZE; +use databend_storages_common_blocks::blocks_to_parquet; +use databend_storages_common_index::BloomIndex; +use databend_storages_common_table_meta::meta::BlockMeta; +use databend_storages_common_table_meta::meta::ClusterStatistics; +use databend_storages_common_table_meta::meta::ColumnMeta; +use databend_storages_common_table_meta::meta::Location; +use databend_storages_common_table_meta::table::TableCompression; use opendal::Operator; -use storages_common_blocks::blocks_to_parquet; -use storages_common_index::BloomIndex; -use storages_common_table_meta::meta::BlockMeta; -use storages_common_table_meta::meta::ClusterStatistics; -use storages_common_table_meta::meta::ColumnMeta; -use storages_common_table_meta::meta::Location; -use storages_common_table_meta::table::TableCompression; use crate::io::write::WriteSettings; use crate::io::TableMetaLocationGenerator; @@ -71,7 +71,7 @@ pub fn serialize_block( let mut writer = NativeWriter::new( buf, arrow_schema, - common_arrow::native::write::WriteOptions { + databend_common_arrow::native::write::WriteOptions { default_compression: write_settings.table_compression.into(), max_page_size: Some(write_settings.max_page_size), default_compress_ratio, diff --git a/src/query/storages/fuse/src/io/write/meta_writer.rs b/src/query/storages/fuse/src/io/write/meta_writer.rs index 2cc8d96df09f..99d4c3ae927b 100644 --- a/src/query/storages/fuse/src/io/write/meta_writer.rs +++ b/src/query/storages/fuse/src/io/write/meta_writer.rs @@ -14,15 +14,15 @@ use std::sync::Arc; -use common_exception::Result; +use databend_common_exception::Result; +use databend_storages_common_cache::CacheAccessor; +use databend_storages_common_cache_manager::CachedObject; +use databend_storages_common_table_meta::meta::CompactSegmentInfo; +use databend_storages_common_table_meta::meta::SegmentInfo; +use databend_storages_common_table_meta::meta::TableSnapshot; +use databend_storages_common_table_meta::meta::TableSnapshotStatistics; +use databend_storages_common_table_meta::meta::Versioned; use opendal::Operator; -use storages_common_cache::CacheAccessor; -use storages_common_cache_manager::CachedObject; -use storages_common_table_meta::meta::CompactSegmentInfo; -use storages_common_table_meta::meta::SegmentInfo; -use storages_common_table_meta::meta::TableSnapshot; -use storages_common_table_meta::meta::TableSnapshotStatistics; -use storages_common_table_meta::meta::Versioned; #[async_trait::async_trait] pub trait MetaWriter { @@ -106,10 +106,10 @@ impl Marshal for TableSnapshotStatistics { mod tests { use std::collections::HashMap; - use common_base::runtime::catch_unwind; - use common_expression::TableSchema; - use storages_common_table_meta::meta::SnapshotId; - use storages_common_table_meta::meta::Statistics; + use databend_common_base::runtime::catch_unwind; + use databend_common_expression::TableSchema; + use databend_storages_common_table_meta::meta::SnapshotId; + use databend_storages_common_table_meta::meta::Statistics; use super::*; diff --git a/src/query/storages/fuse/src/io/write/segment_writer.rs b/src/query/storages/fuse/src/io/write/segment_writer.rs index 9ce04f084a9e..6dae2c3e610b 100644 --- a/src/query/storages/fuse/src/io/write/segment_writer.rs +++ b/src/query/storages/fuse/src/io/write/segment_writer.rs @@ -12,11 +12,11 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_exception::Result; +use databend_common_exception::Result; +use databend_storages_common_table_meta::meta::Location; +use databend_storages_common_table_meta::meta::SegmentInfo; +use databend_storages_common_table_meta::meta::Versioned; use opendal::Operator; -use storages_common_table_meta::meta::Location; -use storages_common_table_meta::meta::SegmentInfo; -use storages_common_table_meta::meta::Versioned; use super::meta_writer::MetaWriter; use crate::io::CachedMetaWriter; diff --git a/src/query/storages/fuse/src/io/write/write_settings.rs b/src/query/storages/fuse/src/io/write/write_settings.rs index 2babe3e5ea20..8e034e9334a2 100644 --- a/src/query/storages/fuse/src/io/write/write_settings.rs +++ b/src/query/storages/fuse/src/io/write/write_settings.rs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -use storages_common_table_meta::table::TableCompression; +use databend_storages_common_table_meta::table::TableCompression; use crate::FuseStorageFormat; use crate::DEFAULT_BLOCK_PER_SEGMENT; diff --git a/src/query/storages/fuse/src/lib.rs b/src/query/storages/fuse/src/lib.rs index 58fac2dbcaaf..ce4ccc2f3b91 100644 --- a/src/query/storages/fuse/src/lib.rs +++ b/src/query/storages/fuse/src/lib.rs @@ -33,11 +33,11 @@ pub mod pruning; pub mod statistics; pub mod table_functions; -use common_catalog::table::NavigationPoint; -use common_catalog::table::Table; -use common_catalog::table::TableStatistics; -pub use common_catalog::table_context::TableContext; pub use constants::*; +use databend_common_catalog::table::NavigationPoint; +use databend_common_catalog::table::Table; +use databend_common_catalog::table::TableStatistics; +pub use databend_common_catalog::table_context::TableContext; pub use fuse_column::FuseTableColumnStatisticsProvider; pub use fuse_part::FuseLazyPartInfo; pub use fuse_part::FusePartInfo; @@ -48,6 +48,6 @@ pub use io::MergeIOReadResult; pub use pruning::SegmentLocation; mod sessions { - pub use common_catalog::table_context::TableContext; + pub use databend_common_catalog::table_context::TableContext; } -pub use storages_common_index as index; +pub use databend_storages_common_index as index; diff --git a/src/query/storages/fuse/src/operations/agg_index_sink.rs b/src/query/storages/fuse/src/operations/agg_index_sink.rs index 1a5845055f46..2c902e81e763 100644 --- a/src/query/storages/fuse/src/operations/agg_index_sink.rs +++ b/src/query/storages/fuse/src/operations/agg_index_sink.rs @@ -18,18 +18,18 @@ use std::time::Instant; use async_trait::async_trait; use async_trait::unboxed_simple; -use common_catalog::table_context::TableContext; -use common_exception::Result; -use common_expression::types::StringType; -use common_expression::types::ValueType; -use common_expression::BlockRowIndex; -use common_expression::DataBlock; -use common_expression::TableSchemaRef; -use common_metrics::storage::*; -use common_pipeline_core::processors::InputPort; -use common_pipeline_core::processors::ProcessorPtr; -use common_pipeline_sinks::AsyncSink; -use common_pipeline_sinks::AsyncSinker; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::Result; +use databend_common_expression::types::StringType; +use databend_common_expression::types::ValueType; +use databend_common_expression::BlockRowIndex; +use databend_common_expression::DataBlock; +use databend_common_expression::TableSchemaRef; +use databend_common_metrics::storage::*; +use databend_common_pipeline_core::processors::InputPort; +use databend_common_pipeline_core::processors::ProcessorPtr; +use databend_common_pipeline_sinks::AsyncSink; +use databend_common_pipeline_sinks::AsyncSinker; use opendal::Operator; use crate::io; diff --git a/src/query/storages/fuse/src/operations/analyze.rs b/src/query/storages/fuse/src/operations/analyze.rs index 3af95ecc3429..71c24c7f7421 100644 --- a/src/query/storages/fuse/src/operations/analyze.rs +++ b/src/query/storages/fuse/src/operations/analyze.rs @@ -16,14 +16,14 @@ use std::collections::HashMap; use std::sync::Arc; use std::time::Instant; -use common_catalog::table::Table; -use common_catalog::table_context::TableContext; -use common_exception::ErrorCode; -use common_exception::Result; +use databend_common_catalog::table::Table; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_storages_common_table_meta::meta::SegmentInfo; +use databend_storages_common_table_meta::meta::TableSnapshot; +use databend_storages_common_table_meta::meta::TableSnapshotStatistics; use log::warn; -use storages_common_table_meta::meta::SegmentInfo; -use storages_common_table_meta::meta::TableSnapshot; -use storages_common_table_meta::meta::TableSnapshotStatistics; use crate::io::SegmentsIO; use crate::statistics::reduce_block_statistics; diff --git a/src/query/storages/fuse/src/operations/append.rs b/src/query/storages/fuse/src/operations/append.rs index 447b174a4157..ad8963b12781 100644 --- a/src/query/storages/fuse/src/operations/append.rs +++ b/src/query/storages/fuse/src/operations/append.rs @@ -15,26 +15,26 @@ use std::str::FromStr; use std::sync::Arc; -use common_catalog::table::AppendMode; -use common_catalog::table::Table; -use common_catalog::table_context::TableContext; -use common_exception::Result; -use common_expression::BlockThresholds; -use common_expression::DataField; -use common_expression::DataSchema; -use common_expression::Expr; -use common_expression::SortColumnDescription; -use common_functions::BUILTIN_FUNCTIONS; -use common_pipeline_core::processors::ProcessorPtr; -use common_pipeline_core::Pipeline; -use common_pipeline_transforms::processors::create_dummy_items; -use common_pipeline_transforms::processors::BlockCompactor; -use common_pipeline_transforms::processors::BlockCompactorForCopy; -use common_pipeline_transforms::processors::TransformCompact; -use common_pipeline_transforms::processors::TransformSortPartial; -use common_sql::evaluator::BlockOperator; -use common_sql::evaluator::CompoundBlockOperator; -use common_sql::executor::physical_plans::MutationKind; +use databend_common_catalog::table::AppendMode; +use databend_common_catalog::table::Table; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::Result; +use databend_common_expression::BlockThresholds; +use databend_common_expression::DataField; +use databend_common_expression::DataSchema; +use databend_common_expression::Expr; +use databend_common_expression::SortColumnDescription; +use databend_common_functions::BUILTIN_FUNCTIONS; +use databend_common_pipeline_core::processors::ProcessorPtr; +use databend_common_pipeline_core::Pipeline; +use databend_common_pipeline_transforms::processors::create_dummy_items; +use databend_common_pipeline_transforms::processors::BlockCompactor; +use databend_common_pipeline_transforms::processors::BlockCompactorForCopy; +use databend_common_pipeline_transforms::processors::TransformCompact; +use databend_common_pipeline_transforms::processors::TransformSortPartial; +use databend_common_sql::evaluator::BlockOperator; +use databend_common_sql::evaluator::CompoundBlockOperator; +use databend_common_sql::executor::physical_plans::MutationKind; use crate::operations::common::TransformSerializeBlock; use crate::statistics::ClusterStatsGenerator; diff --git a/src/query/storages/fuse/src/operations/commit.rs b/src/query/storages/fuse/src/operations/commit.rs index 22d6e42f935f..c22981c1d0eb 100644 --- a/src/query/storages/fuse/src/operations/commit.rs +++ b/src/query/storages/fuse/src/operations/commit.rs @@ -18,38 +18,38 @@ use std::time::Duration; use backoff::backoff::Backoff; use chrono::Utc; -use common_catalog::table::Table; -use common_catalog::table::TableExt; -use common_catalog::table_context::TableContext; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::TableSchemaRef; -use common_meta_app::schema::TableInfo; -use common_meta_app::schema::TableStatistics; -use common_meta_app::schema::UpdateStreamMetaReq; -use common_meta_app::schema::UpdateTableMetaReq; -use common_meta_app::schema::UpsertTableCopiedFileReq; -use common_meta_types::MatchSeq; -use common_metrics::storage::*; -use common_pipeline_core::processors::ProcessorPtr; -use common_pipeline_core::Pipeline; -use common_pipeline_transforms::processors::AsyncAccumulatingTransformer; -use common_sql::executor::physical_plans::MutationKind; +use databend_common_catalog::table::Table; +use databend_common_catalog::table::TableExt; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::TableSchemaRef; +use databend_common_meta_app::schema::TableInfo; +use databend_common_meta_app::schema::TableStatistics; +use databend_common_meta_app::schema::UpdateStreamMetaReq; +use databend_common_meta_app::schema::UpdateTableMetaReq; +use databend_common_meta_app::schema::UpsertTableCopiedFileReq; +use databend_common_meta_types::MatchSeq; +use databend_common_metrics::storage::*; +use databend_common_pipeline_core::processors::ProcessorPtr; +use databend_common_pipeline_core::Pipeline; +use databend_common_pipeline_transforms::processors::AsyncAccumulatingTransformer; +use databend_common_sql::executor::physical_plans::MutationKind; +use databend_storages_common_cache::CacheAccessor; +use databend_storages_common_cache_manager::CachedObject; +use databend_storages_common_table_meta::meta::Location; +use databend_storages_common_table_meta::meta::SegmentInfo; +use databend_storages_common_table_meta::meta::SnapshotId; +use databend_storages_common_table_meta::meta::Statistics; +use databend_storages_common_table_meta::meta::TableSnapshot; +use databend_storages_common_table_meta::meta::TableSnapshotStatistics; +use databend_storages_common_table_meta::meta::Versioned; +use databend_storages_common_table_meta::table::OPT_KEY_LEGACY_SNAPSHOT_LOC; +use databend_storages_common_table_meta::table::OPT_KEY_SNAPSHOT_LOCATION; use log::debug; use log::info; use log::warn; use opendal::Operator; -use storages_common_cache::CacheAccessor; -use storages_common_cache_manager::CachedObject; -use storages_common_table_meta::meta::Location; -use storages_common_table_meta::meta::SegmentInfo; -use storages_common_table_meta::meta::SnapshotId; -use storages_common_table_meta::meta::Statistics; -use storages_common_table_meta::meta::TableSnapshot; -use storages_common_table_meta::meta::TableSnapshotStatistics; -use storages_common_table_meta::meta::Versioned; -use storages_common_table_meta::table::OPT_KEY_LEGACY_SNAPSHOT_LOC; -use storages_common_table_meta::table::OPT_KEY_SNAPSHOT_LOCATION; use crate::io::MetaWriter; use crate::io::SegmentsIO; @@ -344,7 +344,7 @@ impl FuseTable { self.table_info.ident ); - common_base::base::tokio::time::sleep(d).await; + databend_common_base::base::tokio::time::sleep(d).await; latest_table_ref = self.refresh(ctx.as_ref()).await?; let latest_fuse_table = FuseTable::try_from_table(latest_table_ref.as_ref())?; diff --git a/src/query/storages/fuse/src/operations/common/abort_operation.rs b/src/query/storages/fuse/src/operations/common/abort_operation.rs index c524420f03a0..e534d7d549a1 100644 --- a/src/query/storages/fuse/src/operations/common/abort_operation.rs +++ b/src/query/storages/fuse/src/operations/common/abort_operation.rs @@ -14,12 +14,12 @@ use std::sync::Arc; -use common_catalog::table_context::TableContext; -use common_exception::Result; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::Result; +use databend_storages_common_cache::CacheAccessor; +use databend_storages_common_cache_manager::CacheManager; +use databend_storages_common_table_meta::meta::BlockMeta; use opendal::Operator; -use storages_common_cache::CacheAccessor; -use storages_common_cache_manager::CacheManager; -use storages_common_table_meta::meta::BlockMeta; use crate::io::Files; diff --git a/src/query/storages/fuse/src/operations/common/mutation_log.rs b/src/query/storages/fuse/src/operations/common/mutation_log.rs index 02ea54b979de..c0abe13f993d 100644 --- a/src/query/storages/fuse/src/operations/common/mutation_log.rs +++ b/src/query/storages/fuse/src/operations/common/mutation_log.rs @@ -14,15 +14,15 @@ use std::sync::Arc; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::BlockMetaInfo; -use common_expression::BlockMetaInfoDowncast; -use common_expression::DataBlock; -use common_pipeline_transforms::processors::AccumulatingTransform; -use storages_common_table_meta::meta::BlockMeta; -use storages_common_table_meta::meta::FormatVersion; -use storages_common_table_meta::meta::Statistics; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::BlockMetaInfo; +use databend_common_expression::BlockMetaInfoDowncast; +use databend_common_expression::DataBlock; +use databend_common_pipeline_transforms::processors::AccumulatingTransform; +use databend_storages_common_table_meta::meta::BlockMeta; +use databend_storages_common_table_meta::meta::FormatVersion; +use databend_storages_common_table_meta::meta::Statistics; use crate::operations::common::AbortOperation; use crate::operations::common::ConflictResolveContext; @@ -262,8 +262,8 @@ impl AccumulatingTransform for TransformMergeCommitMeta { fn transform( &mut self, - data: common_expression::DataBlock, - ) -> common_exception::Result> { + data: databend_common_expression::DataBlock, + ) -> databend_common_exception::Result> { let commit_meta = CommitMeta::try_from(data)?; self.to_merged.push(commit_meta); Ok(vec![]) diff --git a/src/query/storages/fuse/src/operations/common/processors/sink_commit.rs b/src/query/storages/fuse/src/operations/common/processors/sink_commit.rs index 71e7de27c15a..c431c34a949d 100644 --- a/src/query/storages/fuse/src/operations/common/processors/sink_commit.rs +++ b/src/query/storages/fuse/src/operations/common/processors/sink_commit.rs @@ -19,32 +19,32 @@ use std::time::Instant; use backoff::backoff::Backoff; use backoff::ExponentialBackoff; -use common_catalog::lock::Lock; -use common_catalog::table::Table; -use common_catalog::table::TableExt; -use common_catalog::table_context::TableContext; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::BlockMetaInfoDowncast; -use common_meta_app::schema::TableInfo; -use common_meta_app::schema::UpdateStreamMetaReq; -use common_meta_app::schema::UpsertTableCopiedFileReq; -use common_metrics::storage::*; -use common_pipeline_core::processors::Event; -use common_pipeline_core::processors::InputPort; -use common_pipeline_core::processors::Processor; -use common_pipeline_core::processors::ProcessorPtr; -use common_pipeline_core::LockGuard; +use databend_common_catalog::lock::Lock; +use databend_common_catalog::table::Table; +use databend_common_catalog::table::TableExt; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::BlockMetaInfoDowncast; +use databend_common_meta_app::schema::TableInfo; +use databend_common_meta_app::schema::UpdateStreamMetaReq; +use databend_common_meta_app::schema::UpsertTableCopiedFileReq; +use databend_common_metrics::storage::*; +use databend_common_pipeline_core::processors::Event; +use databend_common_pipeline_core::processors::InputPort; +use databend_common_pipeline_core::processors::Processor; +use databend_common_pipeline_core::processors::ProcessorPtr; +use databend_common_pipeline_core::LockGuard; +use databend_storages_common_table_meta::meta::ClusterKey; +use databend_storages_common_table_meta::meta::SegmentInfo; +use databend_storages_common_table_meta::meta::SnapshotId; +use databend_storages_common_table_meta::meta::TableSnapshot; +use databend_storages_common_table_meta::meta::Versioned; use log::debug; use log::error; use log::info; use log::warn; use opendal::Operator; -use storages_common_table_meta::meta::ClusterKey; -use storages_common_table_meta::meta::SegmentInfo; -use storages_common_table_meta::meta::SnapshotId; -use storages_common_table_meta::meta::TableSnapshot; -use storages_common_table_meta::meta::Versioned; use crate::io::TableMetaLocationGenerator; use crate::operations::common::AbortOperation; @@ -401,7 +401,7 @@ where F: SnapshotGenerator + Send + 'static name.as_str(), table_info.ident ); - common_base::base::tokio::time::sleep(d).await; + databend_common_base::base::tokio::time::sleep(d).await; self.retries += 1; self.state = State::RefreshTable; } diff --git a/src/query/storages/fuse/src/operations/common/processors/transform_mutation_aggregator.rs b/src/query/storages/fuse/src/operations/common/processors/transform_mutation_aggregator.rs index 7072a2b360fb..bd1ed03e776d 100644 --- a/src/query/storages/fuse/src/operations/common/processors/transform_mutation_aggregator.rs +++ b/src/query/storages/fuse/src/operations/common/processors/transform_mutation_aggregator.rs @@ -18,26 +18,26 @@ use std::collections::HashMap; use std::sync::Arc; use std::time::Instant; -use common_base::runtime::execute_futures_in_parallel; -use common_catalog::table::Table; -use common_catalog::table_context::TableContext; -use common_exception::Result; -use common_expression::BlockMetaInfoPtr; -use common_expression::BlockThresholds; -use common_expression::DataBlock; -use common_expression::TableSchemaRef; -use common_pipeline_transforms::processors::AsyncAccumulatingTransform; -use common_sql::executor::physical_plans::MutationKind; +use databend_common_base::runtime::execute_futures_in_parallel; +use databend_common_catalog::table::Table; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::Result; +use databend_common_expression::BlockMetaInfoPtr; +use databend_common_expression::BlockThresholds; +use databend_common_expression::DataBlock; +use databend_common_expression::TableSchemaRef; +use databend_common_pipeline_transforms::processors::AsyncAccumulatingTransform; +use databend_common_sql::executor::physical_plans::MutationKind; +use databend_storages_common_table_meta::meta::BlockMeta; +use databend_storages_common_table_meta::meta::Location; +use databend_storages_common_table_meta::meta::SegmentInfo; +use databend_storages_common_table_meta::meta::Statistics; +use databend_storages_common_table_meta::meta::Versioned; use itertools::Itertools; use log::debug; use log::info; use log::warn; use opendal::Operator; -use storages_common_table_meta::meta::BlockMeta; -use storages_common_table_meta::meta::Location; -use storages_common_table_meta::meta::SegmentInfo; -use storages_common_table_meta::meta::Statistics; -use storages_common_table_meta::meta::Versioned; use crate::io::SegmentsIO; use crate::io::SerializedSegment; diff --git a/src/query/storages/fuse/src/operations/common/processors/transform_serialize_block.rs b/src/query/storages/fuse/src/operations/common/processors/transform_serialize_block.rs index c9fa04ab6f70..94665ff8b049 100644 --- a/src/query/storages/fuse/src/operations/common/processors/transform_serialize_block.rs +++ b/src/query/storages/fuse/src/operations/common/processors/transform_serialize_block.rs @@ -16,25 +16,25 @@ use std::any::Any; use std::sync::Arc; use std::time::Instant; -use common_base::base::ProgressValues; -use common_catalog::table::Table; -use common_catalog::table_context::TableContext; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::BlockMetaInfoDowncast; -use common_expression::ComputedExpr; -use common_expression::DataBlock; -use common_expression::TableSchema; -use common_metrics::storage::*; -use common_pipeline_core::processors::Event; -use common_pipeline_core::processors::InputPort; -use common_pipeline_core::processors::OutputPort; -use common_pipeline_core::processors::Processor; -use common_pipeline_core::processors::ProcessorPtr; -use common_pipeline_core::PipeItem; -use common_sql::executor::physical_plans::MutationKind; +use databend_common_base::base::ProgressValues; +use databend_common_catalog::table::Table; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::BlockMetaInfoDowncast; +use databend_common_expression::ComputedExpr; +use databend_common_expression::DataBlock; +use databend_common_expression::TableSchema; +use databend_common_metrics::storage::*; +use databend_common_pipeline_core::processors::Event; +use databend_common_pipeline_core::processors::InputPort; +use databend_common_pipeline_core::processors::OutputPort; +use databend_common_pipeline_core::processors::Processor; +use databend_common_pipeline_core::processors::ProcessorPtr; +use databend_common_pipeline_core::PipeItem; +use databend_common_sql::executor::physical_plans::MutationKind; +use databend_storages_common_index::BloomIndex; use opendal::Operator; -use storages_common_index::BloomIndex; use crate::io::write_data; use crate::io::BlockBuilder; diff --git a/src/query/storages/fuse/src/operations/common/processors/transform_serialize_segment.rs b/src/query/storages/fuse/src/operations/common/processors/transform_serialize_segment.rs index f4a78e000e33..3a28e7c9ecfc 100644 --- a/src/query/storages/fuse/src/operations/common/processors/transform_serialize_segment.rs +++ b/src/query/storages/fuse/src/operations/common/processors/transform_serialize_segment.rs @@ -16,25 +16,25 @@ use std::any::Any; use std::sync::Arc; use async_trait::async_trait; -use common_catalog::table_context::TableContext; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::BlockMetaInfoDowncast; -use common_expression::BlockThresholds; -use common_expression::DataBlock; -use common_pipeline_core::processors::Event; -use common_pipeline_core::processors::InputPort; -use common_pipeline_core::processors::OutputPort; -use common_pipeline_core::processors::Processor; -use common_pipeline_core::processors::ProcessorPtr; -use common_pipeline_core::PipeItem; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::BlockMetaInfoDowncast; +use databend_common_expression::BlockThresholds; +use databend_common_expression::DataBlock; +use databend_common_pipeline_core::processors::Event; +use databend_common_pipeline_core::processors::InputPort; +use databend_common_pipeline_core::processors::OutputPort; +use databend_common_pipeline_core::processors::Processor; +use databend_common_pipeline_core::processors::ProcessorPtr; +use databend_common_pipeline_core::PipeItem; +use databend_storages_common_cache::CacheAccessor; +use databend_storages_common_cache_manager::CachedObject; +use databend_storages_common_table_meta::meta::BlockMeta; +use databend_storages_common_table_meta::meta::SegmentInfo; +use databend_storages_common_table_meta::meta::Versioned; use log::info; use opendal::Operator; -use storages_common_cache::CacheAccessor; -use storages_common_cache_manager::CachedObject; -use storages_common_table_meta::meta::BlockMeta; -use storages_common_table_meta::meta::SegmentInfo; -use storages_common_table_meta::meta::Versioned; use crate::io::TableMetaLocationGenerator; use crate::operations::common::AbortOperation; diff --git a/src/query/storages/fuse/src/operations/common/snapshot_generator.rs b/src/query/storages/fuse/src/operations/common/snapshot_generator.rs index b24fb24996c7..d83334dc2609 100644 --- a/src/query/storages/fuse/src/operations/common/snapshot_generator.rs +++ b/src/query/storages/fuse/src/operations/common/snapshot_generator.rs @@ -17,21 +17,21 @@ use std::collections::HashSet; use std::ops::Range; use std::sync::Arc; -use common_catalog::table_context::TableContext; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::ColumnId; -use common_expression::Scalar; -use common_expression::TableSchema; -use common_expression::TableSchemaRef; -use common_metrics::storage::*; -use common_sql::field_default_value; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::ColumnId; +use databend_common_expression::Scalar; +use databend_common_expression::TableSchema; +use databend_common_expression::TableSchemaRef; +use databend_common_metrics::storage::*; +use databend_common_sql::field_default_value; +use databend_storages_common_table_meta::meta::ClusterKey; +use databend_storages_common_table_meta::meta::ColumnStatistics; +use databend_storages_common_table_meta::meta::Location; +use databend_storages_common_table_meta::meta::Statistics; +use databend_storages_common_table_meta::meta::TableSnapshot; use log::info; -use storages_common_table_meta::meta::ClusterKey; -use storages_common_table_meta::meta::ColumnStatistics; -use storages_common_table_meta::meta::Location; -use storages_common_table_meta::meta::Statistics; -use storages_common_table_meta::meta::TableSnapshot; use uuid::Uuid; use crate::statistics::merge_statistics; diff --git a/src/query/storages/fuse/src/operations/compact.rs b/src/query/storages/fuse/src/operations/compact.rs index c2a0ee0556a3..e720496a6e6c 100644 --- a/src/query/storages/fuse/src/operations/compact.rs +++ b/src/query/storages/fuse/src/operations/compact.rs @@ -15,20 +15,20 @@ use std::collections::HashSet; use std::sync::Arc; -use common_base::runtime::Runtime; -use common_catalog::lock::Lock; -use common_catalog::plan::Partitions; -use common_catalog::plan::PartitionsShuffleKind; -use common_catalog::plan::Projection; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::ColumnId; -use common_pipeline_core::processors::ProcessorPtr; -use common_pipeline_core::Pipeline; -use common_pipeline_transforms::processors::AsyncAccumulatingTransformer; -use common_sql::executor::physical_plans::MutationKind; -use common_sql::gen_mutation_stream_operator; -use storages_common_table_meta::meta::TableSnapshot; +use databend_common_base::runtime::Runtime; +use databend_common_catalog::lock::Lock; +use databend_common_catalog::plan::Partitions; +use databend_common_catalog::plan::PartitionsShuffleKind; +use databend_common_catalog::plan::Projection; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::ColumnId; +use databend_common_pipeline_core::processors::ProcessorPtr; +use databend_common_pipeline_core::Pipeline; +use databend_common_pipeline_transforms::processors::AsyncAccumulatingTransformer; +use databend_common_sql::executor::physical_plans::MutationKind; +use databend_common_sql::gen_mutation_stream_operator; +use databend_storages_common_table_meta::meta::TableSnapshot; use crate::operations::common::TableMutationAggregator; use crate::operations::common::TransformSerializeBlock; @@ -198,7 +198,7 @@ impl FuseTable { let cluster_stats_gen = self.cluster_gen_for_append(ctx.clone(), pipeline, thresholds, None)?; pipeline.add_transform( - |input: Arc, output| { + |input: Arc, output| { let proc = TransformSerializeBlock::try_create( ctx.clone(), input, diff --git a/src/query/storages/fuse/src/operations/delete.rs b/src/query/storages/fuse/src/operations/delete.rs index 837f75540206..b4a2372e8def 100644 --- a/src/query/storages/fuse/src/operations/delete.rs +++ b/src/query/storages/fuse/src/operations/delete.rs @@ -14,41 +14,41 @@ use std::sync::Arc; -use common_base::base::ProgressValues; -use common_catalog::plan::Filters; -use common_catalog::plan::PartInfoPtr; -use common_catalog::plan::Partitions; -use common_catalog::plan::PartitionsShuffleKind; -use common_catalog::plan::Projection; -use common_catalog::plan::PruningStatistics; -use common_catalog::plan::PushDownInfo; -use common_catalog::table::Table; -use common_catalog::table_context::TableContext; -use common_exception::Result; -use common_expression::types::BooleanType; -use common_expression::types::DataType; -use common_expression::types::NumberDataType; -use common_expression::BlockEntry; -use common_expression::Column; -use common_expression::ComputedExpr; -use common_expression::DataBlock; -use common_expression::DataField; -use common_expression::DataSchema; -use common_expression::Evaluator; -use common_expression::FieldIndex; -use common_expression::RemoteExpr; -use common_expression::TableDataType; -use common_expression::TableSchema; -use common_expression::Value; -use common_expression::ROW_ID_COL_NAME; -use common_functions::BUILTIN_FUNCTIONS; -use common_metrics::storage::*; -use common_pipeline_core::Pipeline; -use common_sql::evaluator::BlockOperator; -use storages_common_index::RangeIndex; -use storages_common_pruner::RangePruner; -use storages_common_table_meta::meta::StatisticsOfColumns; -use storages_common_table_meta::meta::TableSnapshot; +use databend_common_base::base::ProgressValues; +use databend_common_catalog::plan::Filters; +use databend_common_catalog::plan::PartInfoPtr; +use databend_common_catalog::plan::Partitions; +use databend_common_catalog::plan::PartitionsShuffleKind; +use databend_common_catalog::plan::Projection; +use databend_common_catalog::plan::PruningStatistics; +use databend_common_catalog::plan::PushDownInfo; +use databend_common_catalog::table::Table; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::Result; +use databend_common_expression::types::BooleanType; +use databend_common_expression::types::DataType; +use databend_common_expression::types::NumberDataType; +use databend_common_expression::BlockEntry; +use databend_common_expression::Column; +use databend_common_expression::ComputedExpr; +use databend_common_expression::DataBlock; +use databend_common_expression::DataField; +use databend_common_expression::DataSchema; +use databend_common_expression::Evaluator; +use databend_common_expression::FieldIndex; +use databend_common_expression::RemoteExpr; +use databend_common_expression::TableDataType; +use databend_common_expression::TableSchema; +use databend_common_expression::Value; +use databend_common_expression::ROW_ID_COL_NAME; +use databend_common_functions::BUILTIN_FUNCTIONS; +use databend_common_metrics::storage::*; +use databend_common_pipeline_core::Pipeline; +use databend_common_sql::evaluator::BlockOperator; +use databend_storages_common_index::RangeIndex; +use databend_storages_common_pruner::RangePruner; +use databend_storages_common_table_meta::meta::StatisticsOfColumns; +use databend_storages_common_table_meta::meta::TableSnapshot; use crate::operations::mutation::Mutation; use crate::operations::mutation::MutationAction; diff --git a/src/query/storages/fuse/src/operations/gc.rs b/src/query/storages/fuse/src/operations/gc.rs index c15195f14841..0be42a6d9586 100644 --- a/src/query/storages/fuse/src/operations/gc.rs +++ b/src/query/storages/fuse/src/operations/gc.rs @@ -17,22 +17,22 @@ use std::hash::BuildHasher; use std::sync::Arc; use std::time::Instant; -use common_cache::CountableMeter; -use common_catalog::table::Table; -use common_catalog::table_context::TableContext; -use common_exception::ErrorCode; -use common_exception::Result; -use common_meta_app::schema::ListIndexesByIdReq; +use databend_common_cache::CountableMeter; +use databend_common_catalog::table::Table; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_meta_app::schema::ListIndexesByIdReq; +use databend_storages_common_cache::CacheAccessor; +use databend_storages_common_cache::LoadParams; +use databend_storages_common_cache_manager::CachedObject; +use databend_storages_common_index::BloomIndexMeta; +use databend_storages_common_table_meta::meta::CompactSegmentInfo; +use databend_storages_common_table_meta::meta::Location; +use databend_storages_common_table_meta::meta::TableSnapshot; +use databend_storages_common_table_meta::meta::TableSnapshotStatistics; use log::error; use log::warn; -use storages_common_cache::CacheAccessor; -use storages_common_cache::LoadParams; -use storages_common_cache_manager::CachedObject; -use storages_common_index::BloomIndexMeta; -use storages_common_table_meta::meta::CompactSegmentInfo; -use storages_common_table_meta::meta::Location; -use storages_common_table_meta::meta::TableSnapshot; -use storages_common_table_meta::meta::TableSnapshotStatistics; use crate::io::Files; use crate::io::MetaReaders; diff --git a/src/query/storages/fuse/src/operations/merge.rs b/src/query/storages/fuse/src/operations/merge.rs index 40b936ee6285..450a3b96c286 100644 --- a/src/query/storages/fuse/src/operations/merge.rs +++ b/src/query/storages/fuse/src/operations/merge.rs @@ -14,11 +14,11 @@ use std::sync::Arc; -use common_base::base::tokio::sync::Semaphore; -use common_catalog::table_context::TableContext; -use common_exception::Result; -use common_pipeline_core::PipeItem; -use storages_common_table_meta::meta::Location; +use databend_common_base::base::tokio::sync::Semaphore; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::Result; +use databend_common_pipeline_core::PipeItem; +use databend_storages_common_table_meta::meta::Location; use super::merge_into::MatchedAggregator; use super::mutation::SegmentIndex; diff --git a/src/query/storages/fuse/src/operations/merge_into/mutator/delete_by_expr_mutator.rs b/src/query/storages/fuse/src/operations/merge_into/mutator/delete_by_expr_mutator.rs index e37577b85d98..e66c6c73d508 100644 --- a/src/query/storages/fuse/src/operations/merge_into/mutator/delete_by_expr_mutator.rs +++ b/src/query/storages/fuse/src/operations/merge_into/mutator/delete_by_expr_mutator.rs @@ -12,17 +12,17 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_exception::Result; -use common_expression::types::BooleanType; -use common_expression::types::DataType; -use common_expression::BlockEntry; -use common_expression::DataBlock; -use common_expression::Evaluator; -use common_expression::Expr; -use common_expression::FunctionContext; -use common_expression::Value; -use common_functions::BUILTIN_FUNCTIONS; -use common_sql::executor::cast_expr_to_non_null_boolean; +use databend_common_exception::Result; +use databend_common_expression::types::BooleanType; +use databend_common_expression::types::DataType; +use databend_common_expression::BlockEntry; +use databend_common_expression::DataBlock; +use databend_common_expression::Evaluator; +use databend_common_expression::Expr; +use databend_common_expression::FunctionContext; +use databend_common_expression::Value; +use databend_common_functions::BUILTIN_FUNCTIONS; +use databend_common_sql::executor::cast_expr_to_non_null_boolean; use super::utils::get_not; use crate::operations::merge_into::mutator::utils::expr2prdicate; @@ -137,7 +137,7 @@ impl DeleteByExprMutator { let const_expr = Expr::Constant { span: None, - scalar: common_expression::Scalar::Boolean(false), + scalar: databend_common_expression::Scalar::Boolean(false), data_type: DataType::Boolean, }; diff --git a/src/query/storages/fuse/src/operations/merge_into/mutator/matched_mutator.rs b/src/query/storages/fuse/src/operations/merge_into/mutator/matched_mutator.rs index 9bf252f341bd..035095a0e7d4 100644 --- a/src/query/storages/fuse/src/operations/merge_into/mutator/matched_mutator.rs +++ b/src/query/storages/fuse/src/operations/merge_into/mutator/matched_mutator.rs @@ -19,32 +19,32 @@ use std::sync::Arc; use std::time::Instant; use ahash::AHashMap; -use common_arrow::arrow::bitmap::MutableBitmap; -use common_arrow::arrow::buffer::Buffer; -use common_base::base::tokio::sync::Semaphore; -use common_base::base::ProgressValues; -use common_base::runtime::GlobalIORuntime; -use common_base::runtime::TrySpawn; -use common_catalog::plan::split_prefix; -use common_catalog::plan::split_row_id; -use common_catalog::plan::Projection; -use common_catalog::table_context::TableContext; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::types::NumberColumn; -use common_expression::BlockMetaInfoDowncast; -use common_expression::Column; -use common_expression::DataBlock; -use common_expression::TableSchemaRef; -use common_metrics::storage::*; -use common_storage::MergeStatus; +use databend_common_arrow::arrow::bitmap::MutableBitmap; +use databend_common_arrow::arrow::buffer::Buffer; +use databend_common_base::base::tokio::sync::Semaphore; +use databend_common_base::base::ProgressValues; +use databend_common_base::runtime::GlobalIORuntime; +use databend_common_base::runtime::TrySpawn; +use databend_common_catalog::plan::split_prefix; +use databend_common_catalog::plan::split_row_id; +use databend_common_catalog::plan::Projection; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::types::NumberColumn; +use databend_common_expression::BlockMetaInfoDowncast; +use databend_common_expression::Column; +use databend_common_expression::DataBlock; +use databend_common_expression::TableSchemaRef; +use databend_common_metrics::storage::*; +use databend_common_storage::MergeStatus; +use databend_storages_common_cache::LoadParams; +use databend_storages_common_table_meta::meta::BlockMeta; +use databend_storages_common_table_meta::meta::Location; +use databend_storages_common_table_meta::meta::SegmentInfo; use itertools::Itertools; use log::info; use opendal::Operator; -use storages_common_cache::LoadParams; -use storages_common_table_meta::meta::BlockMeta; -use storages_common_table_meta::meta::Location; -use storages_common_table_meta::meta::SegmentInfo; use crate::io::write_data; use crate::io::BlockBuilder; diff --git a/src/query/storages/fuse/src/operations/merge_into/mutator/merge_into_split_mutator.rs b/src/query/storages/fuse/src/operations/merge_into/mutator/merge_into_split_mutator.rs index 0c3481881d80..929c1d05c330 100644 --- a/src/query/storages/fuse/src/operations/merge_into/mutator/merge_into_split_mutator.rs +++ b/src/query/storages/fuse/src/operations/merge_into/mutator/merge_into_split_mutator.rs @@ -14,12 +14,12 @@ use std::ops::Not; -use common_arrow::arrow::bitmap::Bitmap; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::types::DataType; -use common_expression::types::NumberDataType; -use common_expression::DataBlock; +use databend_common_arrow::arrow::bitmap::Bitmap; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::types::DataType; +use databend_common_expression::types::NumberDataType; +use databend_common_expression::DataBlock; pub struct MergeIntoSplitMutator { pub row_id_idx: u32, @@ -41,7 +41,7 @@ impl MergeIntoSplitMutator { // get row_id do check duplicate and get filter let filter: Bitmap = match &row_id_column.value { - common_expression::Value::Scalar(scalar) => { + databend_common_expression::Value::Scalar(scalar) => { // fast judge if scalar.is_null() { return Ok((DataBlock::empty(), block.clone())); @@ -49,8 +49,8 @@ impl MergeIntoSplitMutator { return Ok((block.clone(), DataBlock::empty())); } } - common_expression::Value::Column(column) => match column { - common_expression::Column::Nullable(nullable_column) => { + databend_common_expression::Value::Column(column) => match column { + databend_common_expression::Column::Nullable(nullable_column) => { nullable_column.validity.clone() } _ => { diff --git a/src/query/storages/fuse/src/operations/merge_into/mutator/split_by_expr_mutator.rs b/src/query/storages/fuse/src/operations/merge_into/mutator/split_by_expr_mutator.rs index ac99b258b8c2..92a95b595d19 100644 --- a/src/query/storages/fuse/src/operations/merge_into/mutator/split_by_expr_mutator.rs +++ b/src/query/storages/fuse/src/operations/merge_into/mutator/split_by_expr_mutator.rs @@ -12,16 +12,16 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_exception::Result; -use common_expression::eval_function; -use common_expression::types::BooleanType; -use common_expression::types::DataType; -use common_expression::DataBlock; -use common_expression::Evaluator; -use common_expression::Expr; -use common_expression::FunctionContext; -use common_functions::BUILTIN_FUNCTIONS; -use common_sql::executor::cast_expr_to_non_null_boolean; +use databend_common_exception::Result; +use databend_common_expression::eval_function; +use databend_common_expression::types::BooleanType; +use databend_common_expression::types::DataType; +use databend_common_expression::DataBlock; +use databend_common_expression::Evaluator; +use databend_common_expression::Expr; +use databend_common_expression::FunctionContext; +use databend_common_functions::BUILTIN_FUNCTIONS; +use databend_common_sql::executor::cast_expr_to_non_null_boolean; pub struct SplitByExprMutator { expr: Option, diff --git a/src/query/storages/fuse/src/operations/merge_into/mutator/update_by_expr_mutator.rs b/src/query/storages/fuse/src/operations/merge_into/mutator/update_by_expr_mutator.rs index 4e067ae5d133..abebc423d2c9 100644 --- a/src/query/storages/fuse/src/operations/merge_into/mutator/update_by_expr_mutator.rs +++ b/src/query/storages/fuse/src/operations/merge_into/mutator/update_by_expr_mutator.rs @@ -14,20 +14,20 @@ use std::collections::HashMap; -use common_exception::Result; -use common_expression::types::BooleanType; -use common_expression::types::DataType; -use common_expression::BlockEntry; -use common_expression::DataBlock; -use common_expression::Evaluator; -use common_expression::Expr; -use common_expression::FieldIndex; -use common_expression::FunctionContext; -use common_expression::RemoteExpr; -use common_expression::Value; -use common_functions::BUILTIN_FUNCTIONS; -use common_sql::evaluator::BlockOperator; -use common_sql::executor::cast_expr_to_non_null_boolean; +use databend_common_exception::Result; +use databend_common_expression::types::BooleanType; +use databend_common_expression::types::DataType; +use databend_common_expression::BlockEntry; +use databend_common_expression::DataBlock; +use databend_common_expression::Evaluator; +use databend_common_expression::Expr; +use databend_common_expression::FieldIndex; +use databend_common_expression::FunctionContext; +use databend_common_expression::RemoteExpr; +use databend_common_expression::Value; +use databend_common_functions::BUILTIN_FUNCTIONS; +use databend_common_sql::evaluator::BlockOperator; +use databend_common_sql::executor::cast_expr_to_non_null_boolean; use super::utils::expr2prdicate; use super::utils::get_and; @@ -65,7 +65,7 @@ impl UpdateByExprMutator { pub fn update_by_expr(&self, data_block: DataBlock) -> Result { let const_expr = Expr::Constant { span: None, - scalar: common_expression::Scalar::Boolean(true), + scalar: databend_common_expression::Scalar::Boolean(true), data_type: DataType::Boolean, }; let mut expr = if self.expr.is_none() { diff --git a/src/query/storages/fuse/src/operations/merge_into/mutator/utils.rs b/src/query/storages/fuse/src/operations/merge_into/mutator/utils.rs index 6e446c5cee79..e92d9db436fd 100644 --- a/src/query/storages/fuse/src/operations/merge_into/mutator/utils.rs +++ b/src/query/storages/fuse/src/operations/merge_into/mutator/utils.rs @@ -12,16 +12,16 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_exception::Result; -use common_expression::eval_function; -use common_expression::types::AnyType; -use common_expression::types::BooleanType; -use common_expression::types::DataType; -use common_expression::Evaluator; -use common_expression::Expr; -use common_expression::FunctionContext; -use common_expression::Value; -use common_functions::BUILTIN_FUNCTIONS; +use databend_common_exception::Result; +use databend_common_expression::eval_function; +use databend_common_expression::types::AnyType; +use databend_common_expression::types::BooleanType; +use databend_common_expression::types::DataType; +use databend_common_expression::Evaluator; +use databend_common_expression::Expr; +use databend_common_expression::FunctionContext; +use databend_common_expression::Value; +use databend_common_functions::BUILTIN_FUNCTIONS; pub(crate) fn get_and( filter1: Value, diff --git a/src/query/storages/fuse/src/operations/merge_into/processors/processor_distributed_merge_into_block_deserialize.rs b/src/query/storages/fuse/src/operations/merge_into/processors/processor_distributed_merge_into_block_deserialize.rs index 4c1a56e72e5d..e6cb88f1a39c 100644 --- a/src/query/storages/fuse/src/operations/merge_into/processors/processor_distributed_merge_into_block_deserialize.rs +++ b/src/query/storages/fuse/src/operations/merge_into/processors/processor_distributed_merge_into_block_deserialize.rs @@ -14,17 +14,17 @@ use std::sync::Arc; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::BlockMetaInfoDowncast; -use common_expression::DataBlock; -use common_pipeline_core::processors::InputPort; -use common_pipeline_core::processors::OutputPort; -use common_pipeline_core::processors::ProcessorPtr; -use common_pipeline_core::Pipe; -use common_pipeline_core::PipeItem; -use common_pipeline_transforms::processors::Transform; -use common_pipeline_transforms::processors::Transformer; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::BlockMetaInfoDowncast; +use databend_common_expression::DataBlock; +use databend_common_pipeline_core::processors::InputPort; +use databend_common_pipeline_core::processors::OutputPort; +use databend_common_pipeline_core::processors::ProcessorPtr; +use databend_common_pipeline_core::Pipe; +use databend_common_pipeline_core::PipeItem; +use databend_common_pipeline_transforms::processors::Transform; +use databend_common_pipeline_transforms::processors::Transformer; use super::processor_merge_into_matched_and_split::MixRowNumberKindAndLog; use super::RowIdKind; diff --git a/src/query/storages/fuse/src/operations/merge_into/processors/processor_distributed_merge_into_block_serialize.rs b/src/query/storages/fuse/src/operations/merge_into/processors/processor_distributed_merge_into_block_serialize.rs index 42a21d512d82..659c01924a5b 100644 --- a/src/query/storages/fuse/src/operations/merge_into/processors/processor_distributed_merge_into_block_serialize.rs +++ b/src/query/storages/fuse/src/operations/merge_into/processors/processor_distributed_merge_into_block_serialize.rs @@ -14,21 +14,21 @@ use std::sync::Arc; -use common_exception::Result; -use common_expression::types::DataType; -use common_expression::types::NumberDataType::UInt64; -use common_expression::types::NumberType; -use common_expression::BlockEntry; -use common_expression::BlockMetaInfoDowncast; -use common_expression::DataBlock; -use common_expression::Value; -use common_pipeline_core::processors::InputPort; -use common_pipeline_core::processors::OutputPort; -use common_pipeline_core::processors::ProcessorPtr; -use common_pipeline_core::Pipe; -use common_pipeline_core::PipeItem; -use common_pipeline_transforms::processors::Transform; -use common_pipeline_transforms::processors::Transformer; +use databend_common_exception::Result; +use databend_common_expression::types::DataType; +use databend_common_expression::types::NumberDataType::UInt64; +use databend_common_expression::types::NumberType; +use databend_common_expression::BlockEntry; +use databend_common_expression::BlockMetaInfoDowncast; +use databend_common_expression::DataBlock; +use databend_common_expression::Value; +use databend_common_pipeline_core::processors::InputPort; +use databend_common_pipeline_core::processors::OutputPort; +use databend_common_pipeline_core::processors::ProcessorPtr; +use databend_common_pipeline_core::Pipe; +use databend_common_pipeline_core::PipeItem; +use databend_common_pipeline_transforms::processors::Transform; +use databend_common_pipeline_transforms::processors::Transformer; use super::processor_merge_into_matched_and_split::MixRowNumberKindAndLog; use super::RowIdKind; diff --git a/src/query/storages/fuse/src/operations/merge_into/processors/processor_merge_into_matched_and_split.rs b/src/query/storages/fuse/src/operations/merge_into/processors/processor_merge_into_matched_and_split.rs index c8b99c6a2dd4..8b2c62b4e6fa 100644 --- a/src/query/storages/fuse/src/operations/merge_into/processors/processor_merge_into_matched_and_split.rs +++ b/src/query/storages/fuse/src/operations/merge_into/processors/processor_merge_into_matched_and_split.rs @@ -17,27 +17,27 @@ use std::collections::HashMap; use std::sync::Arc; use std::time::Instant; -use common_catalog::table_context::TableContext; -use common_exception::Result; -use common_expression::types::BooleanType; -use common_expression::BlockMetaInfo; -use common_expression::BlockMetaInfoDowncast; -use common_expression::DataBlock; -use common_expression::DataSchemaRef; -use common_expression::Expr; -use common_expression::FieldIndex; -use common_expression::Value; -use common_functions::BUILTIN_FUNCTIONS; -use common_metrics::storage::*; -use common_pipeline_core::processors::Event; -use common_pipeline_core::processors::InputPort; -use common_pipeline_core::processors::OutputPort; -use common_pipeline_core::processors::Processor; -use common_pipeline_core::processors::ProcessorPtr; -use common_pipeline_core::PipeItem; -use common_sql::evaluator::BlockOperator; -use common_sql::executor::physical_plans::MatchExpr; -use common_storage::MergeStatus; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::Result; +use databend_common_expression::types::BooleanType; +use databend_common_expression::BlockMetaInfo; +use databend_common_expression::BlockMetaInfoDowncast; +use databend_common_expression::DataBlock; +use databend_common_expression::DataSchemaRef; +use databend_common_expression::Expr; +use databend_common_expression::FieldIndex; +use databend_common_expression::Value; +use databend_common_functions::BUILTIN_FUNCTIONS; +use databend_common_metrics::storage::*; +use databend_common_pipeline_core::processors::Event; +use databend_common_pipeline_core::processors::InputPort; +use databend_common_pipeline_core::processors::OutputPort; +use databend_common_pipeline_core::processors::Processor; +use databend_common_pipeline_core::processors::ProcessorPtr; +use databend_common_pipeline_core::PipeItem; +use databend_common_sql::evaluator::BlockOperator; +use databend_common_sql::executor::physical_plans::MatchExpr; +use databend_common_storage::MergeStatus; use crate::operations::common::MutationLogs; use crate::operations::merge_into::mutator::DeleteByExprMutator; diff --git a/src/query/storages/fuse/src/operations/merge_into/processors/processor_merge_into_not_matched.rs b/src/query/storages/fuse/src/operations/merge_into/processors/processor_merge_into_not_matched.rs index 3dc3d44c6c79..17a8958353e5 100644 --- a/src/query/storages/fuse/src/operations/merge_into/processors/processor_merge_into_not_matched.rs +++ b/src/query/storages/fuse/src/operations/merge_into/processors/processor_merge_into_not_matched.rs @@ -18,22 +18,22 @@ use std::collections::HashSet; use std::sync::Arc; use std::time::Instant; -use common_catalog::table_context::TableContext; -use common_exception::Result; -use common_expression::DataBlock; -use common_expression::DataSchemaRef; -use common_expression::FunctionContext; -use common_expression::RemoteExpr; -use common_functions::BUILTIN_FUNCTIONS; -use common_metrics::storage::*; -use common_pipeline_core::processors::Event; -use common_pipeline_core::processors::InputPort; -use common_pipeline_core::processors::OutputPort; -use common_pipeline_core::processors::Processor; -use common_pipeline_core::processors::ProcessorPtr; -use common_pipeline_core::PipeItem; -use common_sql::evaluator::BlockOperator; -use common_storage::MergeStatus; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::Result; +use databend_common_expression::DataBlock; +use databend_common_expression::DataSchemaRef; +use databend_common_expression::FunctionContext; +use databend_common_expression::RemoteExpr; +use databend_common_functions::BUILTIN_FUNCTIONS; +use databend_common_metrics::storage::*; +use databend_common_pipeline_core::processors::Event; +use databend_common_pipeline_core::processors::InputPort; +use databend_common_pipeline_core::processors::OutputPort; +use databend_common_pipeline_core::processors::Processor; +use databend_common_pipeline_core::processors::ProcessorPtr; +use databend_common_pipeline_core::PipeItem; +use databend_common_sql::evaluator::BlockOperator; +use databend_common_storage::MergeStatus; use itertools::Itertools; use crate::operations::merge_into::mutator::SplitByExprMutator; diff --git a/src/query/storages/fuse/src/operations/merge_into/processors/processor_merge_into_split.rs b/src/query/storages/fuse/src/operations/merge_into/processors/processor_merge_into_split.rs index ca49cc0aae51..ab3c5fa03d38 100644 --- a/src/query/storages/fuse/src/operations/merge_into/processors/processor_merge_into_split.rs +++ b/src/query/storages/fuse/src/operations/merge_into/processors/processor_merge_into_split.rs @@ -16,16 +16,16 @@ use std::any::Any; use std::sync::Arc; use std::time::Instant; -use common_exception::Result; -use common_expression::DataBlock; -use common_metrics::storage::*; -use common_pipeline_core::processors::Event; -use common_pipeline_core::processors::InputPort; -use common_pipeline_core::processors::OutputPort; -use common_pipeline_core::processors::Processor; -use common_pipeline_core::processors::ProcessorPtr; -use common_pipeline_core::Pipe; -use common_pipeline_core::PipeItem; +use databend_common_exception::Result; +use databend_common_expression::DataBlock; +use databend_common_metrics::storage::*; +use databend_common_pipeline_core::processors::Event; +use databend_common_pipeline_core::processors::InputPort; +use databend_common_pipeline_core::processors::OutputPort; +use databend_common_pipeline_core::processors::Processor; +use databend_common_pipeline_core::processors::ProcessorPtr; +use databend_common_pipeline_core::Pipe; +use databend_common_pipeline_core::PipeItem; use super::processor_merge_into_matched_and_split::SourceFullMatched; use crate::operations::merge_into::mutator::MergeIntoSplitMutator; diff --git a/src/query/storages/fuse/src/operations/merge_into/processors/processor_merge_into_split_row_number_and_log.rs b/src/query/storages/fuse/src/operations/merge_into/processors/processor_merge_into_split_row_number_and_log.rs index 53e260a4af9d..1c53de57e691 100644 --- a/src/query/storages/fuse/src/operations/merge_into/processors/processor_merge_into_split_row_number_and_log.rs +++ b/src/query/storages/fuse/src/operations/merge_into/processors/processor_merge_into_split_row_number_and_log.rs @@ -15,16 +15,16 @@ use std::any::Any; use std::sync::Arc; -use common_exception::Result; -use common_expression::BlockMetaInfoDowncast; -use common_expression::DataBlock; -use common_pipeline_core::processors::Event; -use common_pipeline_core::processors::InputPort; -use common_pipeline_core::processors::OutputPort; -use common_pipeline_core::processors::Processor; -use common_pipeline_core::processors::ProcessorPtr; -use common_pipeline_core::Pipe; -use common_pipeline_core::PipeItem; +use databend_common_exception::Result; +use databend_common_expression::BlockMetaInfoDowncast; +use databend_common_expression::DataBlock; +use databend_common_pipeline_core::processors::Event; +use databend_common_pipeline_core::processors::InputPort; +use databend_common_pipeline_core::processors::OutputPort; +use databend_common_pipeline_core::processors::Processor; +use databend_common_pipeline_core::processors::ProcessorPtr; +use databend_common_pipeline_core::Pipe; +use databend_common_pipeline_core::PipeItem; use super::processor_merge_into_matched_and_split::SourceFullMatched; diff --git a/src/query/storages/fuse/src/operations/merge_into/processors/transform_add_rownumber_column.rs b/src/query/storages/fuse/src/operations/merge_into/processors/transform_add_rownumber_column.rs index 756e246d82d2..b5f3b5c5f4db 100644 --- a/src/query/storages/fuse/src/operations/merge_into/processors/transform_add_rownumber_column.rs +++ b/src/query/storages/fuse/src/operations/merge_into/processors/transform_add_rownumber_column.rs @@ -16,20 +16,20 @@ use std::sync::atomic::AtomicU64; use std::sync::atomic::Ordering; use std::sync::Arc; -use common_exception::Result; -use common_expression::types::DataType; -use common_expression::types::NumberDataType; -use common_expression::types::UInt64Type; -use common_expression::BlockEntry; -use common_expression::DataBlock; -use common_expression::FromData; -use common_expression::Value; -use common_metrics::storage::*; -use common_pipeline_core::processors::InputPort; -use common_pipeline_core::processors::OutputPort; -use common_pipeline_core::processors::ProcessorPtr; -use common_pipeline_transforms::processors::Transform; -use common_pipeline_transforms::processors::Transformer; +use databend_common_exception::Result; +use databend_common_expression::types::DataType; +use databend_common_expression::types::NumberDataType; +use databend_common_expression::types::UInt64Type; +use databend_common_expression::BlockEntry; +use databend_common_expression::DataBlock; +use databend_common_expression::FromData; +use databend_common_expression::Value; +use databend_common_metrics::storage::*; +use databend_common_pipeline_core::processors::InputPort; +use databend_common_pipeline_core::processors::OutputPort; +use databend_common_pipeline_core::processors::ProcessorPtr; +use databend_common_pipeline_transforms::processors::Transform; +use databend_common_pipeline_transforms::processors::Transformer; const PREFIX_OFFSET: usize = 48; diff --git a/src/query/storages/fuse/src/operations/merge_into/processors/transform_matched_mutation_aggregator.rs b/src/query/storages/fuse/src/operations/merge_into/processors/transform_matched_mutation_aggregator.rs index b4ece20e63f6..2a9ff0962d43 100644 --- a/src/query/storages/fuse/src/operations/merge_into/processors/transform_matched_mutation_aggregator.rs +++ b/src/query/storages/fuse/src/operations/merge_into/processors/transform_matched_mutation_aggregator.rs @@ -12,14 +12,14 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_exception::Result; -use common_expression::DataBlock; -use common_pipeline_core::processors::InputPort; -use common_pipeline_core::processors::OutputPort; -use common_pipeline_core::processors::ProcessorPtr; -use common_pipeline_core::PipeItem; -use common_pipeline_transforms::processors::AsyncAccumulatingTransform; -use common_pipeline_transforms::processors::AsyncAccumulatingTransformer; +use databend_common_exception::Result; +use databend_common_expression::DataBlock; +use databend_common_pipeline_core::processors::InputPort; +use databend_common_pipeline_core::processors::OutputPort; +use databend_common_pipeline_core::processors::ProcessorPtr; +use databend_common_pipeline_core::PipeItem; +use databend_common_pipeline_transforms::processors::AsyncAccumulatingTransform; +use databend_common_pipeline_transforms::processors::AsyncAccumulatingTransformer; use crate::operations::merge_into::mutator::MatchedAggregator; diff --git a/src/query/storages/fuse/src/operations/mutation/compact/block_compact_mutator.rs b/src/query/storages/fuse/src/operations/mutation/compact/block_compact_mutator.rs index a7de400275e7..bac9dca18fce 100644 --- a/src/query/storages/fuse/src/operations/mutation/compact/block_compact_mutator.rs +++ b/src/query/storages/fuse/src/operations/mutation/compact/block_compact_mutator.rs @@ -18,21 +18,21 @@ use std::sync::Arc; use std::time::Instant; use std::vec; -use common_base::base::tokio::sync::Semaphore; -use common_base::runtime::GlobalIORuntime; -use common_base::runtime::TrySpawn; -use common_catalog::plan::PartInfoPtr; -use common_catalog::plan::Partitions; -use common_catalog::plan::PartitionsShuffleKind; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::BlockThresholds; -use common_expression::ColumnId; -use common_metrics::storage::*; +use databend_common_base::base::tokio::sync::Semaphore; +use databend_common_base::runtime::GlobalIORuntime; +use databend_common_base::runtime::TrySpawn; +use databend_common_catalog::plan::PartInfoPtr; +use databend_common_catalog::plan::Partitions; +use databend_common_catalog::plan::PartitionsShuffleKind; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::BlockThresholds; +use databend_common_expression::ColumnId; +use databend_common_metrics::storage::*; +use databend_storages_common_table_meta::meta::BlockMeta; +use databend_storages_common_table_meta::meta::CompactSegmentInfo; +use databend_storages_common_table_meta::meta::Statistics; use opendal::Operator; -use storages_common_table_meta::meta::BlockMeta; -use storages_common_table_meta::meta::CompactSegmentInfo; -use storages_common_table_meta::meta::Statistics; use crate::io::SegmentsIO; use crate::operations::acquire_task_permit; diff --git a/src/query/storages/fuse/src/operations/mutation/compact/compact_part.rs b/src/query/storages/fuse/src/operations/mutation/compact/compact_part.rs index 7a4893a1169e..03302b1a8816 100644 --- a/src/query/storages/fuse/src/operations/mutation/compact/compact_part.rs +++ b/src/query/storages/fuse/src/operations/mutation/compact/compact_part.rs @@ -18,13 +18,13 @@ use std::hash::Hash; use std::hash::Hasher; use std::sync::Arc; -use common_catalog::plan::PartInfo; -use common_catalog::plan::PartInfoPtr; -use common_exception::ErrorCode; -use common_exception::Result; -use storages_common_table_meta::meta::BlockMeta; -use storages_common_table_meta::meta::CompactSegmentInfo; -use storages_common_table_meta::meta::Statistics; +use databend_common_catalog::plan::PartInfo; +use databend_common_catalog::plan::PartInfoPtr; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_storages_common_table_meta::meta::BlockMeta; +use databend_storages_common_table_meta::meta::CompactSegmentInfo; +use databend_storages_common_table_meta::meta::Statistics; use crate::operations::common::BlockMetaIndex; use crate::operations::mutation::BlockIndex; diff --git a/src/query/storages/fuse/src/operations/mutation/compact/compact_source.rs b/src/query/storages/fuse/src/operations/mutation/compact/compact_source.rs index e4fff89a7a25..78061258e15d 100644 --- a/src/query/storages/fuse/src/operations/mutation/compact/compact_source.rs +++ b/src/query/storages/fuse/src/operations/mutation/compact/compact_source.rs @@ -16,22 +16,22 @@ use std::any::Any; use std::sync::Arc; use std::time::Instant; -use common_base::base::ProgressValues; -use common_catalog::plan::gen_mutation_stream_meta; -use common_catalog::plan::PartInfoPtr; -use common_catalog::plan::StreamColumn; -use common_catalog::table_context::TableContext; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::DataBlock; -use common_expression::FunctionContext; -use common_metrics::storage::*; -use common_pipeline_core::processors::Event; -use common_pipeline_core::processors::OutputPort; -use common_pipeline_core::processors::Processor; -use common_pipeline_core::processors::ProcessorPtr; -use common_sql::evaluator::BlockOperator; -use storages_common_table_meta::meta::BlockMeta; +use databend_common_base::base::ProgressValues; +use databend_common_catalog::plan::gen_mutation_stream_meta; +use databend_common_catalog::plan::PartInfoPtr; +use databend_common_catalog::plan::StreamColumn; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::DataBlock; +use databend_common_expression::FunctionContext; +use databend_common_metrics::storage::*; +use databend_common_pipeline_core::processors::Event; +use databend_common_pipeline_core::processors::OutputPort; +use databend_common_pipeline_core::processors::Processor; +use databend_common_pipeline_core::processors::ProcessorPtr; +use databend_common_sql::evaluator::BlockOperator; +use databend_storages_common_table_meta::meta::BlockMeta; use crate::io::BlockReader; use crate::io::ReadSettings; diff --git a/src/query/storages/fuse/src/operations/mutation/compact/segment_compact_mutator.rs b/src/query/storages/fuse/src/operations/mutation/compact/segment_compact_mutator.rs index cf73574ba5ca..a9a959b27852 100644 --- a/src/query/storages/fuse/src/operations/mutation/compact/segment_compact_mutator.rs +++ b/src/query/storages/fuse/src/operations/mutation/compact/segment_compact_mutator.rs @@ -15,15 +15,15 @@ use std::sync::Arc; use std::time::Instant; -use common_catalog::lock::Lock; -use common_catalog::table::Table; -use common_exception::Result; +use databend_common_catalog::lock::Lock; +use databend_common_catalog::table::Table; +use databend_common_exception::Result; +use databend_storages_common_table_meta::meta::Location; +use databend_storages_common_table_meta::meta::SegmentInfo; +use databend_storages_common_table_meta::meta::Statistics; use log::info; use metrics::gauge; use opendal::Operator; -use storages_common_table_meta::meta::Location; -use storages_common_table_meta::meta::SegmentInfo; -use storages_common_table_meta::meta::Statistics; use crate::io::SegmentWriter; use crate::io::SegmentsIO; diff --git a/src/query/storages/fuse/src/operations/mutation/mutation_meta.rs b/src/query/storages/fuse/src/operations/mutation/mutation_meta.rs index 22dbe1b1cb05..84bc11ab84fb 100644 --- a/src/query/storages/fuse/src/operations/mutation/mutation_meta.rs +++ b/src/query/storages/fuse/src/operations/mutation/mutation_meta.rs @@ -12,9 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_expression::BlockMetaInfo; -use common_expression::BlockMetaInfoDowncast; -use storages_common_table_meta::meta::ClusterStatistics; +use databend_common_expression::BlockMetaInfo; +use databend_common_expression::BlockMetaInfoDowncast; +use databend_storages_common_table_meta::meta::ClusterStatistics; use crate::operations::common::BlockMetaIndex; use crate::operations::mutation::compact::CompactExtraInfo; diff --git a/src/query/storages/fuse/src/operations/mutation/mutation_part.rs b/src/query/storages/fuse/src/operations/mutation/mutation_part.rs index 68680c78fcf4..5a8d2564c905 100644 --- a/src/query/storages/fuse/src/operations/mutation/mutation_part.rs +++ b/src/query/storages/fuse/src/operations/mutation/mutation_part.rs @@ -17,13 +17,13 @@ use std::collections::hash_map::DefaultHasher; use std::hash::Hash; use std::hash::Hasher; -use common_catalog::plan::PartInfo; -use common_catalog::plan::PartInfoPtr; -use common_exception::ErrorCode; -use common_exception::Result; -use storages_common_pruner::BlockMetaIndex; -use storages_common_table_meta::meta::ClusterStatistics; -use storages_common_table_meta::meta::Statistics; +use databend_common_catalog::plan::PartInfo; +use databend_common_catalog::plan::PartInfoPtr; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_storages_common_pruner::BlockMetaIndex; +use databend_storages_common_table_meta::meta::ClusterStatistics; +use databend_storages_common_table_meta::meta::Statistics; use crate::operations::mutation::SegmentIndex; diff --git a/src/query/storages/fuse/src/operations/mutation/mutation_source.rs b/src/query/storages/fuse/src/operations/mutation/mutation_source.rs index 599d24d9a6f4..3f57d1bd5402 100644 --- a/src/query/storages/fuse/src/operations/mutation/mutation_source.rs +++ b/src/query/storages/fuse/src/operations/mutation/mutation_source.rs @@ -16,30 +16,30 @@ use std::any::Any; use std::ops::Not; use std::sync::Arc; -use common_base::base::ProgressValues; -use common_catalog::plan::gen_mutation_stream_meta; -use common_catalog::plan::InternalColumn; -use common_catalog::plan::InternalColumnMeta; -use common_catalog::plan::InternalColumnType; -use common_catalog::plan::PartInfoPtr; -use common_catalog::table_context::TableContext; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::types::BooleanType; -use common_expression::types::DataType; -use common_expression::BlockEntry; -use common_expression::BlockMetaInfoPtr; -use common_expression::DataBlock; -use common_expression::Evaluator; -use common_expression::Expr; -use common_expression::Value; -use common_expression::ROW_ID_COL_NAME; -use common_functions::BUILTIN_FUNCTIONS; -use common_pipeline_core::processors::Event; -use common_pipeline_core::processors::OutputPort; -use common_pipeline_core::processors::Processor; -use common_pipeline_core::processors::ProcessorPtr; -use common_sql::evaluator::BlockOperator; +use databend_common_base::base::ProgressValues; +use databend_common_catalog::plan::gen_mutation_stream_meta; +use databend_common_catalog::plan::InternalColumn; +use databend_common_catalog::plan::InternalColumnMeta; +use databend_common_catalog::plan::InternalColumnType; +use databend_common_catalog::plan::PartInfoPtr; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::types::BooleanType; +use databend_common_expression::types::DataType; +use databend_common_expression::BlockEntry; +use databend_common_expression::BlockMetaInfoPtr; +use databend_common_expression::DataBlock; +use databend_common_expression::Evaluator; +use databend_common_expression::Expr; +use databend_common_expression::Value; +use databend_common_expression::ROW_ID_COL_NAME; +use databend_common_functions::BUILTIN_FUNCTIONS; +use databend_common_pipeline_core::processors::Event; +use databend_common_pipeline_core::processors::OutputPort; +use databend_common_pipeline_core::processors::Processor; +use databend_common_pipeline_core::processors::ProcessorPtr; +use databend_common_sql::evaluator::BlockOperator; use super::mutation_meta::SerializeBlock; use crate::fuse_part::FusePartInfo; diff --git a/src/query/storages/fuse/src/operations/mutation/recluster_aggregator.rs b/src/query/storages/fuse/src/operations/mutation/recluster_aggregator.rs index e94843ded474..d512127924fa 100644 --- a/src/query/storages/fuse/src/operations/mutation/recluster_aggregator.rs +++ b/src/query/storages/fuse/src/operations/mutation/recluster_aggregator.rs @@ -16,23 +16,23 @@ use std::collections::HashMap; use std::sync::Arc; use std::time::Instant; -use common_base::runtime::execute_futures_in_parallel; -use common_catalog::table::Table; -use common_catalog::table_context::TableContext; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::BlockMetaInfoDowncast; -use common_expression::BlockMetaInfoPtr; -use common_expression::BlockThresholds; -use common_expression::DataBlock; -use common_metrics::storage::metrics_inc_recluster_write_block_nums; -use common_pipeline_transforms::processors::AsyncAccumulatingTransform; +use databend_common_base::runtime::execute_futures_in_parallel; +use databend_common_catalog::table::Table; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::BlockMetaInfoDowncast; +use databend_common_expression::BlockMetaInfoPtr; +use databend_common_expression::BlockThresholds; +use databend_common_expression::DataBlock; +use databend_common_metrics::storage::metrics_inc_recluster_write_block_nums; +use databend_common_pipeline_transforms::processors::AsyncAccumulatingTransform; +use databend_storages_common_table_meta::meta::BlockMeta; +use databend_storages_common_table_meta::meta::SegmentInfo; +use databend_storages_common_table_meta::meta::Statistics; +use databend_storages_common_table_meta::meta::Versioned; use itertools::Itertools; use opendal::Operator; -use storages_common_table_meta::meta::BlockMeta; -use storages_common_table_meta::meta::SegmentInfo; -use storages_common_table_meta::meta::Statistics; -use storages_common_table_meta::meta::Versioned; use crate::io::SegmentsIO; use crate::io::SerializedSegment; diff --git a/src/query/storages/fuse/src/operations/mutation/recluster_mutator.rs b/src/query/storages/fuse/src/operations/mutation/recluster_mutator.rs index 40e223113cb5..e4e7a517b15b 100644 --- a/src/query/storages/fuse/src/operations/mutation/recluster_mutator.rs +++ b/src/query/storages/fuse/src/operations/mutation/recluster_mutator.rs @@ -18,26 +18,26 @@ use std::collections::HashMap; use std::collections::HashSet; use std::sync::Arc; -use common_base::runtime::execute_futures_in_parallel; -use common_catalog::table_context::TableContext; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::BlockThresholds; -use common_expression::Scalar; -use common_expression::TableSchemaRef; -use common_sql::executor::physical_plans::ReclusterTask; -use common_storage::ColumnNodes; +use databend_common_base::runtime::execute_futures_in_parallel; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::BlockThresholds; +use databend_common_expression::Scalar; +use databend_common_expression::TableSchemaRef; +use databend_common_sql::executor::physical_plans::ReclusterTask; +use databend_common_storage::ColumnNodes; +use databend_storages_common_pruner::BlockMetaIndex; +use databend_storages_common_table_meta::meta::BlockMeta; +use databend_storages_common_table_meta::meta::CompactSegmentInfo; +use databend_storages_common_table_meta::meta::Statistics; +use databend_storages_common_table_meta::meta::TableSnapshot; use indexmap::IndexSet; use itertools::Itertools; use log::error; use minitrace::full_name; use minitrace::future::FutureExt; use minitrace::Span; -use storages_common_pruner::BlockMetaIndex; -use storages_common_table_meta::meta::BlockMeta; -use storages_common_table_meta::meta::CompactSegmentInfo; -use storages_common_table_meta::meta::Statistics; -use storages_common_table_meta::meta::TableSnapshot; use crate::statistics::reducers::merge_statistics_mut; use crate::table_functions::cmp_with_null; diff --git a/src/query/storages/fuse/src/operations/navigate.rs b/src/query/storages/fuse/src/operations/navigate.rs index f16e66d24314..f33f2d9c8c58 100644 --- a/src/query/storages/fuse/src/operations/navigate.rs +++ b/src/query/storages/fuse/src/operations/navigate.rs @@ -17,18 +17,18 @@ use std::sync::Arc; use chrono::DateTime; use chrono::Duration; use chrono::Utc; -use common_catalog::table::NavigationPoint; -use common_catalog::table_context::TableContext; -use common_exception::ErrorCode; -use common_exception::Result; -use common_meta_app::schema::TableStatistics; +use databend_common_catalog::table::NavigationPoint; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_meta_app::schema::TableStatistics; +use databend_storages_common_cache::LoadParams; +use databend_storages_common_table_meta::meta::TableSnapshot; +use databend_storages_common_table_meta::table::OPT_KEY_SNAPSHOT_LOCATION; use futures::TryStreamExt; use log::warn; use opendal::EntryMode; use opendal::Metakey; -use storages_common_cache::LoadParams; -use storages_common_table_meta::meta::TableSnapshot; -use storages_common_table_meta::table::OPT_KEY_SNAPSHOT_LOCATION; use crate::io::MetaReaders; use crate::io::SnapshotHistoryReader; diff --git a/src/query/storages/fuse/src/operations/read/fuse_rows_fetcher.rs b/src/query/storages/fuse/src/operations/read/fuse_rows_fetcher.rs index ab1cac6b1525..b4510c142a9a 100644 --- a/src/query/storages/fuse/src/operations/read/fuse_rows_fetcher.rs +++ b/src/query/storages/fuse/src/operations/read/fuse_rows_fetcher.rs @@ -14,25 +14,25 @@ use std::sync::Arc; -use common_arrow::parquet::metadata::ColumnDescriptor; -use common_catalog::plan::DataSourcePlan; -use common_catalog::plan::Projection; -use common_catalog::table_context::TableContext; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::types::DataType; -use common_expression::types::NumberDataType; -use common_expression::BlockEntry; -use common_expression::ColumnBuilder; -use common_expression::DataBlock; -use common_expression::DataSchema; -use common_expression::Value; -use common_pipeline_core::processors::InputPort; -use common_pipeline_core::processors::OutputPort; -use common_pipeline_core::processors::ProcessorPtr; -use common_pipeline_core::Pipeline; -use common_pipeline_transforms::processors::AsyncTransform; -use common_pipeline_transforms::processors::AsyncTransformer; +use databend_common_arrow::parquet::metadata::ColumnDescriptor; +use databend_common_catalog::plan::DataSourcePlan; +use databend_common_catalog::plan::Projection; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::types::DataType; +use databend_common_expression::types::NumberDataType; +use databend_common_expression::BlockEntry; +use databend_common_expression::ColumnBuilder; +use databend_common_expression::DataBlock; +use databend_common_expression::DataSchema; +use databend_common_expression::Value; +use databend_common_pipeline_core::processors::InputPort; +use databend_common_pipeline_core::processors::OutputPort; +use databend_common_pipeline_core::processors::ProcessorPtr; +use databend_common_pipeline_core::Pipeline; +use databend_common_pipeline_transforms::processors::AsyncTransform; +use databend_common_pipeline_transforms::processors::AsyncTransformer; use super::native_rows_fetcher::NativeRowsFetcher; use super::parquet_rows_fetcher::ParquetRowsFetcher; diff --git a/src/query/storages/fuse/src/operations/read/fuse_source.rs b/src/query/storages/fuse/src/operations/read/fuse_source.rs index dd7d20ae6d15..6b2b780b361f 100644 --- a/src/query/storages/fuse/src/operations/read/fuse_source.rs +++ b/src/query/storages/fuse/src/operations/read/fuse_source.rs @@ -15,20 +15,20 @@ use std::collections::VecDeque; use std::sync::Arc; -use common_catalog::plan::DataSourcePlan; -use common_catalog::plan::InternalColumnMeta; -use common_catalog::plan::PartInfoPtr; -use common_catalog::plan::StealablePartitions; -use common_catalog::plan::TopK; -use common_catalog::table_context::TableContext; -use common_exception::Result; -use common_expression::BlockMetaInfoPtr; -use common_expression::DataBlock; -use common_expression::Scalar; -use common_expression::TableSchema; -use common_pipeline_core::processors::OutputPort; -use common_pipeline_core::Pipeline; -use common_pipeline_core::SourcePipeBuilder; +use databend_common_catalog::plan::DataSourcePlan; +use databend_common_catalog::plan::InternalColumnMeta; +use databend_common_catalog::plan::PartInfoPtr; +use databend_common_catalog::plan::StealablePartitions; +use databend_common_catalog::plan::TopK; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::Result; +use databend_common_expression::BlockMetaInfoPtr; +use databend_common_expression::DataBlock; +use databend_common_expression::Scalar; +use databend_common_expression::TableSchema; +use databend_common_pipeline_core::processors::OutputPort; +use databend_common_pipeline_core::Pipeline; +use databend_common_pipeline_core::SourcePipeBuilder; use log::info; use crate::fuse_part::FusePartInfo; diff --git a/src/query/storages/fuse/src/operations/read/native_data_source.rs b/src/query/storages/fuse/src/operations/read/native_data_source.rs index 9c4233583090..60a4f67b6879 100644 --- a/src/query/storages/fuse/src/operations/read/native_data_source.rs +++ b/src/query/storages/fuse/src/operations/read/native_data_source.rs @@ -15,9 +15,9 @@ use std::fmt::Debug; use std::fmt::Formatter; -use common_catalog::plan::PartInfoPtr; -use common_expression::BlockMetaInfo; -use common_expression::BlockMetaInfoPtr; +use databend_common_catalog::plan::PartInfoPtr; +use databend_common_expression::BlockMetaInfo; +use databend_common_expression::BlockMetaInfoPtr; use serde::Deserializer; use serde::Serializer; @@ -48,14 +48,14 @@ impl Debug for NativeDataSourceMeta { } impl serde::Serialize for NativeDataSourceMeta { - fn serialize(&self, _: S) -> common_exception::Result + fn serialize(&self, _: S) -> databend_common_exception::Result where S: Serializer { unimplemented!("Unimplemented serialize NativeDataSourceMeta") } } impl<'de> serde::Deserialize<'de> for NativeDataSourceMeta { - fn deserialize(_: D) -> common_exception::Result + fn deserialize(_: D) -> databend_common_exception::Result where D: Deserializer<'de> { unimplemented!("Unimplemented deserialize NativeDataSourceMeta") } diff --git a/src/query/storages/fuse/src/operations/read/native_data_source_deserializer.rs b/src/query/storages/fuse/src/operations/read/native_data_source_deserializer.rs index e04f6a92c1c8..f708528fa1bc 100644 --- a/src/query/storages/fuse/src/operations/read/native_data_source_deserializer.rs +++ b/src/query/storages/fuse/src/operations/read/native_data_source_deserializer.rs @@ -18,44 +18,44 @@ use std::collections::HashSet; use std::collections::VecDeque; use std::sync::Arc; -use common_arrow::arrow::array::Array; -use common_arrow::arrow::bitmap::MutableBitmap; -use common_arrow::native::read::ArrayIter; -use common_arrow::parquet::metadata::ColumnDescriptor; -use common_base::base::Progress; -use common_base::base::ProgressValues; -use common_catalog::plan::gen_mutation_stream_meta; -use common_catalog::plan::DataSourcePlan; -use common_catalog::plan::PartInfoPtr; -use common_catalog::plan::PushDownInfo; -use common_catalog::plan::TopK; -use common_catalog::plan::VirtualColumnInfo; -use common_catalog::table_context::TableContext; -use common_exception::Result; -use common_expression::eval_function; -use common_expression::filter_helper::FilterHelpers; -use common_expression::types::BooleanType; -use common_expression::types::DataType; -use common_expression::BlockEntry; -use common_expression::BlockMetaInfoDowncast; -use common_expression::Column; -use common_expression::ColumnId; -use common_expression::DataBlock; -use common_expression::DataField; -use common_expression::DataSchema; -use common_expression::Evaluator; -use common_expression::Expr; -use common_expression::FunctionContext; -use common_expression::Scalar; -use common_expression::TopKSorter; -use common_expression::Value; -use common_functions::BUILTIN_FUNCTIONS; -use common_metrics::storage::*; -use common_pipeline_core::processors::Event; -use common_pipeline_core::processors::InputPort; -use common_pipeline_core::processors::OutputPort; -use common_pipeline_core::processors::Processor; -use common_pipeline_core::processors::ProcessorPtr; +use databend_common_arrow::arrow::array::Array; +use databend_common_arrow::arrow::bitmap::MutableBitmap; +use databend_common_arrow::native::read::ArrayIter; +use databend_common_arrow::parquet::metadata::ColumnDescriptor; +use databend_common_base::base::Progress; +use databend_common_base::base::ProgressValues; +use databend_common_catalog::plan::gen_mutation_stream_meta; +use databend_common_catalog::plan::DataSourcePlan; +use databend_common_catalog::plan::PartInfoPtr; +use databend_common_catalog::plan::PushDownInfo; +use databend_common_catalog::plan::TopK; +use databend_common_catalog::plan::VirtualColumnInfo; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::Result; +use databend_common_expression::eval_function; +use databend_common_expression::filter_helper::FilterHelpers; +use databend_common_expression::types::BooleanType; +use databend_common_expression::types::DataType; +use databend_common_expression::BlockEntry; +use databend_common_expression::BlockMetaInfoDowncast; +use databend_common_expression::Column; +use databend_common_expression::ColumnId; +use databend_common_expression::DataBlock; +use databend_common_expression::DataField; +use databend_common_expression::DataSchema; +use databend_common_expression::Evaluator; +use databend_common_expression::Expr; +use databend_common_expression::FunctionContext; +use databend_common_expression::Scalar; +use databend_common_expression::TopKSorter; +use databend_common_expression::Value; +use databend_common_functions::BUILTIN_FUNCTIONS; +use databend_common_metrics::storage::*; +use databend_common_pipeline_core::processors::Event; +use databend_common_pipeline_core::processors::InputPort; +use databend_common_pipeline_core::processors::OutputPort; +use databend_common_pipeline_core::processors::Processor; +use databend_common_pipeline_core::processors::ProcessorPtr; use super::fuse_source::fill_internal_column_meta; use super::native_data_source::DataSource; diff --git a/src/query/storages/fuse/src/operations/read/native_data_source_reader.rs b/src/query/storages/fuse/src/operations/read/native_data_source_reader.rs index 25e6d963ecaf..500124a78db2 100644 --- a/src/query/storages/fuse/src/operations/read/native_data_source_reader.rs +++ b/src/query/storages/fuse/src/operations/read/native_data_source_reader.rs @@ -15,22 +15,22 @@ use std::any::Any; use std::sync::Arc; -use common_base::base::tokio; -use common_catalog::plan::PartInfoPtr; -use common_catalog::plan::StealablePartitions; -use common_catalog::table_context::TableContext; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::DataBlock; -use common_expression::FunctionContext; -use common_expression::TableSchema; -use common_pipeline_core::processors::Event; -use common_pipeline_core::processors::OutputPort; -use common_pipeline_core::processors::Processor; -use common_pipeline_core::processors::ProcessorPtr; -use common_pipeline_sources::SyncSource; -use common_pipeline_sources::SyncSourcer; -use common_sql::IndexType; +use databend_common_base::base::tokio; +use databend_common_catalog::plan::PartInfoPtr; +use databend_common_catalog::plan::StealablePartitions; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::DataBlock; +use databend_common_expression::FunctionContext; +use databend_common_expression::TableSchema; +use databend_common_pipeline_core::processors::Event; +use databend_common_pipeline_core::processors::OutputPort; +use databend_common_pipeline_core::processors::Processor; +use databend_common_pipeline_core::processors::ProcessorPtr; +use databend_common_pipeline_sources::SyncSource; +use databend_common_pipeline_sources::SyncSourcer; +use databend_common_sql::IndexType; use super::native_data_source::DataSource; use crate::io::AggIndexReader; diff --git a/src/query/storages/fuse/src/operations/read/native_rows_fetcher.rs b/src/query/storages/fuse/src/operations/read/native_rows_fetcher.rs index cc2aabb9340b..21379ca1726b 100644 --- a/src/query/storages/fuse/src/operations/read/native_rows_fetcher.rs +++ b/src/query/storages/fuse/src/operations/read/native_rows_fetcher.rs @@ -17,22 +17,22 @@ use std::collections::HashMap; use std::collections::HashSet; use std::sync::Arc; -use common_arrow::parquet::metadata::ColumnDescriptor; -use common_base::runtime::execute_futures_in_parallel; -use common_catalog::plan::block_idx_in_segment; -use common_catalog::plan::split_prefix; -use common_catalog::plan::split_row_id; -use common_catalog::plan::PartInfoPtr; -use common_catalog::plan::Projection; -use common_catalog::table::Table; -use common_exception::Result; -use common_expression::DataBlock; -use common_expression::DataSchema; -use common_expression::TableSchemaRef; -use common_storage::ColumnNodes; +use databend_common_arrow::parquet::metadata::ColumnDescriptor; +use databend_common_base::runtime::execute_futures_in_parallel; +use databend_common_catalog::plan::block_idx_in_segment; +use databend_common_catalog::plan::split_prefix; +use databend_common_catalog::plan::split_row_id; +use databend_common_catalog::plan::PartInfoPtr; +use databend_common_catalog::plan::Projection; +use databend_common_catalog::table::Table; +use databend_common_exception::Result; +use databend_common_expression::DataBlock; +use databend_common_expression::DataSchema; +use databend_common_expression::TableSchemaRef; +use databend_common_storage::ColumnNodes; +use databend_storages_common_cache::LoadParams; +use databend_storages_common_table_meta::meta::TableSnapshot; use itertools::Itertools; -use storages_common_cache::LoadParams; -use storages_common_table_meta::meta::TableSnapshot; use super::fuse_rows_fetcher::RowsFetcher; use crate::io::BlockReader; diff --git a/src/query/storages/fuse/src/operations/read/parquet_data_source.rs b/src/query/storages/fuse/src/operations/read/parquet_data_source.rs index b1149a58426f..49fbdad2dc57 100644 --- a/src/query/storages/fuse/src/operations/read/parquet_data_source.rs +++ b/src/query/storages/fuse/src/operations/read/parquet_data_source.rs @@ -15,10 +15,10 @@ use std::fmt::Debug; use std::fmt::Formatter; -use common_catalog::plan::PartInfoPtr; -use common_exception::Result; -use common_expression::BlockMetaInfo; -use common_expression::BlockMetaInfoPtr; +use databend_common_catalog::plan::PartInfoPtr; +use databend_common_exception::Result; +use databend_common_expression::BlockMetaInfo; +use databend_common_expression::BlockMetaInfoPtr; use serde::Deserializer; use serde::Serializer; diff --git a/src/query/storages/fuse/src/operations/read/parquet_data_source_deserializer.rs b/src/query/storages/fuse/src/operations/read/parquet_data_source_deserializer.rs index aa5331b77685..78c27ed1c4a5 100644 --- a/src/query/storages/fuse/src/operations/read/parquet_data_source_deserializer.rs +++ b/src/query/storages/fuse/src/operations/read/parquet_data_source_deserializer.rs @@ -16,25 +16,25 @@ use std::any::Any; use std::sync::Arc; use std::time::Instant; -use common_base::base::Progress; -use common_base::base::ProgressValues; -use common_catalog::plan::gen_mutation_stream_meta; -use common_catalog::plan::DataSourcePlan; -use common_catalog::plan::PartInfoPtr; -use common_catalog::table_context::TableContext; -use common_exception::Result; -use common_expression::types::DataType; -use common_expression::BlockMetaInfoDowncast; -use common_expression::DataBlock; -use common_expression::DataField; -use common_expression::DataSchema; -use common_expression::Scalar; -use common_metrics::storage::*; -use common_pipeline_core::processors::Event; -use common_pipeline_core::processors::InputPort; -use common_pipeline_core::processors::OutputPort; -use common_pipeline_core::processors::Processor; -use common_pipeline_core::processors::ProcessorPtr; +use databend_common_base::base::Progress; +use databend_common_base::base::ProgressValues; +use databend_common_catalog::plan::gen_mutation_stream_meta; +use databend_common_catalog::plan::DataSourcePlan; +use databend_common_catalog::plan::PartInfoPtr; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::Result; +use databend_common_expression::types::DataType; +use databend_common_expression::BlockMetaInfoDowncast; +use databend_common_expression::DataBlock; +use databend_common_expression::DataField; +use databend_common_expression::DataSchema; +use databend_common_expression::Scalar; +use databend_common_metrics::storage::*; +use databend_common_pipeline_core::processors::Event; +use databend_common_pipeline_core::processors::InputPort; +use databend_common_pipeline_core::processors::OutputPort; +use databend_common_pipeline_core::processors::Processor; +use databend_common_pipeline_core::processors::ProcessorPtr; use super::fuse_source::fill_internal_column_meta; use super::parquet_data_source::DataSource; diff --git a/src/query/storages/fuse/src/operations/read/parquet_data_source_reader.rs b/src/query/storages/fuse/src/operations/read/parquet_data_source_reader.rs index 9fbf7c6b7f4f..a78d0f70bc23 100644 --- a/src/query/storages/fuse/src/operations/read/parquet_data_source_reader.rs +++ b/src/query/storages/fuse/src/operations/read/parquet_data_source_reader.rs @@ -15,22 +15,22 @@ use std::any::Any; use std::sync::Arc; -use common_base::base::tokio; -use common_catalog::plan::PartInfoPtr; -use common_catalog::plan::StealablePartitions; -use common_catalog::table_context::TableContext; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::DataBlock; -use common_expression::FunctionContext; -use common_expression::TableSchema; -use common_pipeline_core::processors::Event; -use common_pipeline_core::processors::OutputPort; -use common_pipeline_core::processors::Processor; -use common_pipeline_core::processors::ProcessorPtr; -use common_pipeline_sources::SyncSource; -use common_pipeline_sources::SyncSourcer; -use common_sql::IndexType; +use databend_common_base::base::tokio; +use databend_common_catalog::plan::PartInfoPtr; +use databend_common_catalog::plan::StealablePartitions; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::DataBlock; +use databend_common_expression::FunctionContext; +use databend_common_expression::TableSchema; +use databend_common_pipeline_core::processors::Event; +use databend_common_pipeline_core::processors::OutputPort; +use databend_common_pipeline_core::processors::Processor; +use databend_common_pipeline_core::processors::ProcessorPtr; +use databend_common_pipeline_sources::SyncSource; +use databend_common_pipeline_sources::SyncSourcer; +use databend_common_sql::IndexType; use super::parquet_data_source::DataSource; use crate::fuse_part::FusePartInfo; diff --git a/src/query/storages/fuse/src/operations/read/parquet_rows_fetcher.rs b/src/query/storages/fuse/src/operations/read/parquet_rows_fetcher.rs index 4418f4f97dce..f6a298ab980e 100644 --- a/src/query/storages/fuse/src/operations/read/parquet_rows_fetcher.rs +++ b/src/query/storages/fuse/src/operations/read/parquet_rows_fetcher.rs @@ -16,21 +16,21 @@ use std::collections::HashMap; use std::collections::HashSet; use std::sync::Arc; -use common_base::runtime::execute_futures_in_parallel; -use common_catalog::plan::block_idx_in_segment; -use common_catalog::plan::split_prefix; -use common_catalog::plan::split_row_id; -use common_catalog::plan::PartInfoPtr; -use common_catalog::plan::Projection; -use common_catalog::table::Table; -use common_exception::Result; -use common_expression::DataBlock; -use common_expression::DataSchema; -use common_expression::TableSchemaRef; -use common_storage::ColumnNodes; +use databend_common_base::runtime::execute_futures_in_parallel; +use databend_common_catalog::plan::block_idx_in_segment; +use databend_common_catalog::plan::split_prefix; +use databend_common_catalog::plan::split_row_id; +use databend_common_catalog::plan::PartInfoPtr; +use databend_common_catalog::plan::Projection; +use databend_common_catalog::table::Table; +use databend_common_exception::Result; +use databend_common_expression::DataBlock; +use databend_common_expression::DataSchema; +use databend_common_expression::TableSchemaRef; +use databend_common_storage::ColumnNodes; +use databend_storages_common_cache::LoadParams; +use databend_storages_common_table_meta::meta::TableSnapshot; use itertools::Itertools; -use storages_common_cache::LoadParams; -use storages_common_table_meta::meta::TableSnapshot; use super::fuse_rows_fetcher::RowsFetcher; use crate::io::BlockReader; diff --git a/src/query/storages/fuse/src/operations/read/runtime_filter_prunner.rs b/src/query/storages/fuse/src/operations/read/runtime_filter_prunner.rs index b2a427dfbf95..58f479961206 100644 --- a/src/query/storages/fuse/src/operations/read/runtime_filter_prunner.rs +++ b/src/query/storages/fuse/src/operations/read/runtime_filter_prunner.rs @@ -15,16 +15,16 @@ use std::collections::HashMap; use std::sync::Arc; -use common_catalog::plan::PartInfoPtr; -use common_exception::Result; -use common_expression::ConstantFolder; -use common_expression::Expr; -use common_expression::FunctionContext; -use common_expression::Scalar; -use common_expression::TableSchema; -use common_functions::BUILTIN_FUNCTIONS; +use databend_common_catalog::plan::PartInfoPtr; +use databend_common_exception::Result; +use databend_common_expression::ConstantFolder; +use databend_common_expression::Expr; +use databend_common_expression::FunctionContext; +use databend_common_expression::Scalar; +use databend_common_expression::TableSchema; +use databend_common_functions::BUILTIN_FUNCTIONS; +use databend_storages_common_index::statistics_to_domain; use log::info; -use storages_common_index::statistics_to_domain; use crate::FusePartInfo; diff --git a/src/query/storages/fuse/src/operations/read_data.rs b/src/query/storages/fuse/src/operations/read_data.rs index 52ae5bb05e4e..a1434b22a3e6 100644 --- a/src/query/storages/fuse/src/operations/read_data.rs +++ b/src/query/storages/fuse/src/operations/read_data.rs @@ -14,22 +14,22 @@ use std::sync::Arc; -use common_base::runtime::Runtime; -use common_catalog::plan::DataSourcePlan; -use common_catalog::plan::Projection; -use common_catalog::plan::PushDownInfo; -use common_catalog::plan::TopK; -use common_catalog::table::Table; -use common_catalog::table_context::TableContext; -use common_exception::ErrorCode; -use common_exception::Result; -use common_functions::BUILTIN_FUNCTIONS; -use common_pipeline_core::processors::ProcessorPtr; -use common_pipeline_core::Pipeline; -use common_sql::evaluator::BlockOperator; -use common_sql::evaluator::CompoundBlockOperator; -use storages_common_index::Index; -use storages_common_index::RangeIndex; +use databend_common_base::runtime::Runtime; +use databend_common_catalog::plan::DataSourcePlan; +use databend_common_catalog::plan::Projection; +use databend_common_catalog::plan::PushDownInfo; +use databend_common_catalog::plan::TopK; +use databend_common_catalog::table::Table; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_functions::BUILTIN_FUNCTIONS; +use databend_common_pipeline_core::processors::ProcessorPtr; +use databend_common_pipeline_core::Pipeline; +use databend_common_sql::evaluator::BlockOperator; +use databend_common_sql::evaluator::CompoundBlockOperator; +use databend_storages_common_index::Index; +use databend_storages_common_index::RangeIndex; use crate::io::AggIndexReader; use crate::io::BlockReader; diff --git a/src/query/storages/fuse/src/operations/read_partitions.rs b/src/query/storages/fuse/src/operations/read_partitions.rs index 108552ae712e..21cbf38b38c7 100644 --- a/src/query/storages/fuse/src/operations/read_partitions.rs +++ b/src/query/storages/fuse/src/operations/read_partitions.rs @@ -16,33 +16,33 @@ use std::collections::HashMap; use std::sync::Arc; use std::time::Instant; -use common_catalog::plan::PartInfoPtr; -use common_catalog::plan::PartStatistics; -use common_catalog::plan::Partitions; -use common_catalog::plan::PartitionsShuffleKind; -use common_catalog::plan::Projection; -use common_catalog::plan::PruningStatistics; -use common_catalog::plan::PushDownInfo; -use common_catalog::plan::TopK; -use common_catalog::table::Table; -use common_catalog::table_context::TableContext; -use common_exception::Result; -use common_expression::Scalar; -use common_expression::TableSchemaRef; -use common_sql::field_default_value; -use common_storage::ColumnNodes; +use databend_common_catalog::plan::PartInfoPtr; +use databend_common_catalog::plan::PartStatistics; +use databend_common_catalog::plan::Partitions; +use databend_common_catalog::plan::PartitionsShuffleKind; +use databend_common_catalog::plan::Projection; +use databend_common_catalog::plan::PruningStatistics; +use databend_common_catalog::plan::PushDownInfo; +use databend_common_catalog::plan::TopK; +use databend_common_catalog::table::Table; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::Result; +use databend_common_expression::Scalar; +use databend_common_expression::TableSchemaRef; +use databend_common_sql::field_default_value; +use databend_common_storage::ColumnNodes; +use databend_storages_common_cache::CacheAccessor; +use databend_storages_common_cache_manager::CachedObject; +use databend_storages_common_index::Index; +use databend_storages_common_index::RangeIndex; +use databend_storages_common_pruner::BlockMetaIndex; +use databend_storages_common_table_meta::meta::BlockMeta; +use databend_storages_common_table_meta::meta::ColumnStatistics; use log::debug; use log::info; use opendal::Operator; use sha2::Digest; use sha2::Sha256; -use storages_common_cache::CacheAccessor; -use storages_common_cache_manager::CachedObject; -use storages_common_index::Index; -use storages_common_index::RangeIndex; -use storages_common_pruner::BlockMetaIndex; -use storages_common_table_meta::meta::BlockMeta; -use storages_common_table_meta::meta::ColumnStatistics; use crate::fuse_part::FusePartInfo; use crate::pruning::FusePruner; diff --git a/src/query/storages/fuse/src/operations/recluster.rs b/src/query/storages/fuse/src/operations/recluster.rs index c254d81dfd6f..f5959d5bbcda 100644 --- a/src/query/storages/fuse/src/operations/recluster.rs +++ b/src/query/storages/fuse/src/operations/recluster.rs @@ -14,18 +14,18 @@ use std::sync::Arc; -use common_base::runtime::TrySpawn; -use common_base::GLOBAL_TASK; -use common_catalog::plan::PushDownInfo; -use common_catalog::table::Table; -use common_catalog::table_context::TableContext; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::TableSchemaRef; -use common_sql::BloomIndexColumns; +use databend_common_base::runtime::TrySpawn; +use databend_common_base::GLOBAL_TASK; +use databend_common_catalog::plan::PushDownInfo; +use databend_common_catalog::table::Table; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::TableSchemaRef; +use databend_common_sql::BloomIndexColumns; +use databend_storages_common_table_meta::meta::CompactSegmentInfo; use log::warn; use opendal::Operator; -use storages_common_table_meta::meta::CompactSegmentInfo; use crate::operations::ReclusterMutator; use crate::pruning::create_segment_location_vector; diff --git a/src/query/storages/fuse/src/operations/replace.rs b/src/query/storages/fuse/src/operations/replace.rs index c01856414cab..87a5142b2d68 100644 --- a/src/query/storages/fuse/src/operations/replace.rs +++ b/src/query/storages/fuse/src/operations/replace.rs @@ -14,22 +14,22 @@ use std::sync::Arc; -use common_base::base::tokio::sync::Semaphore; -use common_catalog::table::Table; -use common_catalog::table_context::TableContext; -use common_exception::Result; -use common_expression::FieldIndex; -use common_pipeline_core::processors::ProcessorPtr; -use common_pipeline_core::PipeItem; -use common_pipeline_core::Pipeline; -use common_pipeline_transforms::processors::AsyncAccumulatingTransformer; -use common_sql::executor::physical_plans::MutationKind; -use common_sql::executor::physical_plans::OnConflictField; +use databend_common_base::base::tokio::sync::Semaphore; +use databend_common_catalog::table::Table; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::Result; +use databend_common_expression::FieldIndex; +use databend_common_pipeline_core::processors::ProcessorPtr; +use databend_common_pipeline_core::PipeItem; +use databend_common_pipeline_core::Pipeline; +use databend_common_pipeline_transforms::processors::AsyncAccumulatingTransformer; +use databend_common_sql::executor::physical_plans::MutationKind; +use databend_common_sql::executor::physical_plans::OnConflictField; +use databend_storages_common_index::BloomIndex; +use databend_storages_common_table_meta::meta::BlockSlotDescription; +use databend_storages_common_table_meta::meta::Location; +use databend_storages_common_table_meta::meta::TableSnapshot; use rand::prelude::SliceRandom; -use storages_common_index::BloomIndex; -use storages_common_table_meta::meta::BlockSlotDescription; -use storages_common_table_meta::meta::Location; -use storages_common_table_meta::meta::TableSnapshot; use crate::io::BlockBuilder; use crate::io::ReadSettings; diff --git a/src/query/storages/fuse/src/operations/replace_into/meta/merge_into_operation_meta.rs b/src/query/storages/fuse/src/operations/replace_into/meta/merge_into_operation_meta.rs index 2acb16c57af3..080db8f882f6 100644 --- a/src/query/storages/fuse/src/operations/replace_into/meta/merge_into_operation_meta.rs +++ b/src/query/storages/fuse/src/operations/replace_into/meta/merge_into_operation_meta.rs @@ -13,11 +13,11 @@ // limitations under the License. use ahash::HashSet; -use common_exception::ErrorCode; -use common_expression::BlockMetaInfo; -use common_expression::BlockMetaInfoDowncast; -use common_expression::DataBlock; -use common_expression::Scalar; +use databend_common_exception::ErrorCode; +use databend_common_expression::BlockMetaInfo; +use databend_common_expression::BlockMetaInfoDowncast; +use databend_common_expression::DataBlock; +use databend_common_expression::Scalar; // This mod need to be refactored, since it not longer aiming to be // used in the implementation of `MERGE INTO` statement in the future. diff --git a/src/query/storages/fuse/src/operations/replace_into/mutator/column_hash.rs b/src/query/storages/fuse/src/operations/replace_into/mutator/column_hash.rs index 87f3c9c93198..7518ac607a34 100644 --- a/src/query/storages/fuse/src/operations/replace_into/mutator/column_hash.rs +++ b/src/query/storages/fuse/src/operations/replace_into/mutator/column_hash.rs @@ -14,14 +14,14 @@ use std::hash::Hasher; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::types::decimal::DecimalScalar; -use common_expression::types::AnyType; -use common_expression::types::DecimalSize; -use common_expression::types::NumberScalar; -use common_expression::ScalarRef; -use common_expression::Value; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::types::decimal::DecimalScalar; +use databend_common_expression::types::AnyType; +use databend_common_expression::types::DecimalSize; +use databend_common_expression::types::NumberScalar; +use databend_common_expression::ScalarRef; +use databend_common_expression::Value; use siphasher::sip128; use siphasher::sip128::Hasher128; diff --git a/src/query/storages/fuse/src/operations/replace_into/mutator/merge_into_mutator.rs b/src/query/storages/fuse/src/operations/replace_into/mutator/merge_into_mutator.rs index cd8bca70c0d2..7e162b2a14a4 100644 --- a/src/query/storages/fuse/src/operations/replace_into/mutator/merge_into_mutator.rs +++ b/src/query/storages/fuse/src/operations/replace_into/mutator/merge_into_mutator.rs @@ -17,36 +17,36 @@ use std::sync::Arc; use std::time::Instant; use ahash::AHashMap; -use common_arrow::arrow::bitmap::MutableBitmap; -use common_base::base::tokio::sync::Semaphore; -use common_base::base::ProgressValues; -use common_base::runtime::GlobalIORuntime; -use common_base::runtime::TrySpawn; -use common_catalog::plan::Projection; -use common_catalog::table_context::TableContext; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::ColumnId; -use common_expression::ComputedExpr; -use common_expression::DataBlock; -use common_expression::FieldIndex; -use common_expression::Scalar; -use common_expression::TableSchema; -use common_metrics::storage::*; -use common_sql::evaluator::BlockOperator; -use common_sql::executor::physical_plans::OnConflictField; +use databend_common_arrow::arrow::bitmap::MutableBitmap; +use databend_common_base::base::tokio::sync::Semaphore; +use databend_common_base::base::ProgressValues; +use databend_common_base::runtime::GlobalIORuntime; +use databend_common_base::runtime::TrySpawn; +use databend_common_catalog::plan::Projection; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::ColumnId; +use databend_common_expression::ComputedExpr; +use databend_common_expression::DataBlock; +use databend_common_expression::FieldIndex; +use databend_common_expression::Scalar; +use databend_common_expression::TableSchema; +use databend_common_metrics::storage::*; +use databend_common_sql::evaluator::BlockOperator; +use databend_common_sql::executor::physical_plans::OnConflictField; +use databend_storages_common_cache::LoadParams; +use databend_storages_common_index::filters::Filter; +use databend_storages_common_index::filters::Xor8Filter; +use databend_storages_common_index::BloomIndex; +use databend_storages_common_table_meta::meta::BlockMeta; +use databend_storages_common_table_meta::meta::BlockSlotDescription; +use databend_storages_common_table_meta::meta::ColumnStatistics; +use databend_storages_common_table_meta::meta::Location; +use databend_storages_common_table_meta::meta::SegmentInfo; use log::info; use log::warn; use opendal::Operator; -use storages_common_cache::LoadParams; -use storages_common_index::filters::Filter; -use storages_common_index::filters::Xor8Filter; -use storages_common_index::BloomIndex; -use storages_common_table_meta::meta::BlockMeta; -use storages_common_table_meta::meta::BlockSlotDescription; -use storages_common_table_meta::meta::ColumnStatistics; -use storages_common_table_meta::meta::Location; -use storages_common_table_meta::meta::SegmentInfo; use crate::io::read::bloom::block_filter_reader::BloomBlockFilterReader; use crate::io::write_data; @@ -728,10 +728,10 @@ impl AggregationContext { #[cfg(test)] mod tests { - use common_expression::types::NumberDataType; - use common_expression::types::NumberScalar; - use common_expression::TableDataType; - use common_expression::TableField; + use databend_common_expression::types::NumberDataType; + use databend_common_expression::types::NumberScalar; + use databend_common_expression::TableDataType; + use databend_common_expression::TableField; use super::*; diff --git a/src/query/storages/fuse/src/operations/replace_into/mutator/mutator_replace_into.rs b/src/query/storages/fuse/src/operations/replace_into/mutator/mutator_replace_into.rs index 7eb16b951af3..6c6ab26e69a7 100644 --- a/src/query/storages/fuse/src/operations/replace_into/mutator/mutator_replace_into.rs +++ b/src/query/storages/fuse/src/operations/replace_into/mutator/mutator_replace_into.rs @@ -18,32 +18,32 @@ use std::iter::once; use ahash::HashSet; use ahash::HashSetExt; -use common_arrow::arrow::bitmap::MutableBitmap; -use common_catalog::table_context::TableContext; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::types::AnyType; -use common_expression::types::DataType; -use common_expression::Column; -use common_expression::ColumnId; -use common_expression::DataBlock; -use common_expression::Evaluator; -use common_expression::Expr; -use common_expression::FieldIndex; -use common_expression::FunctionContext; -use common_expression::RemoteExpr; -use common_expression::Scalar; -use common_expression::ScalarRef; -use common_expression::TableSchema; -use common_expression::Value; -use common_functions::aggregates::eval_aggr; -use common_functions::BUILTIN_FUNCTIONS; -use common_metrics::storage::*; -use common_sql::executor::physical_plans::OnConflictField; +use databend_common_arrow::arrow::bitmap::MutableBitmap; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::types::AnyType; +use databend_common_expression::types::DataType; +use databend_common_expression::Column; +use databend_common_expression::ColumnId; +use databend_common_expression::DataBlock; +use databend_common_expression::Evaluator; +use databend_common_expression::Expr; +use databend_common_expression::FieldIndex; +use databend_common_expression::FunctionContext; +use databend_common_expression::RemoteExpr; +use databend_common_expression::Scalar; +use databend_common_expression::ScalarRef; +use databend_common_expression::TableSchema; +use databend_common_expression::Value; +use databend_common_functions::aggregates::eval_aggr; +use databend_common_functions::BUILTIN_FUNCTIONS; +use databend_common_metrics::storage::*; +use databend_common_sql::executor::physical_plans::OnConflictField; +use databend_storages_common_index::BloomIndex; +use databend_storages_common_table_meta::meta::ColumnStatistics; +use databend_storages_common_table_meta::meta::MinMax; use log::info; -use storages_common_index::BloomIndex; -use storages_common_table_meta::meta::ColumnStatistics; -use storages_common_table_meta::meta::MinMax; use crate::operations::replace_into::meta::DeletionByColumn; use crate::operations::replace_into::meta::MergeIntoOperation; @@ -458,9 +458,9 @@ fn on_conflict_key_column_values<'a>( #[cfg(test)] mod tests { - use common_expression::types::NumberType; - use common_expression::types::StringType; - use common_expression::FromData; + use databend_common_expression::types::NumberType; + use databend_common_expression::types::StringType; + use databend_common_expression::FromData; use super::*; diff --git a/src/query/storages/fuse/src/operations/replace_into/processors/processor_broadcast.rs b/src/query/storages/fuse/src/operations/replace_into/processors/processor_broadcast.rs index 5c6e04703d16..2f8922ec3815 100644 --- a/src/query/storages/fuse/src/operations/replace_into/processors/processor_broadcast.rs +++ b/src/query/storages/fuse/src/operations/replace_into/processors/processor_broadcast.rs @@ -15,14 +15,14 @@ use std::any::Any; use std::sync::Arc; -use common_exception::Result; -use common_expression::DataBlock; -use common_pipeline_core::processors::Event; -use common_pipeline_core::processors::InputPort; -use common_pipeline_core::processors::OutputPort; -use common_pipeline_core::processors::Processor; -use common_pipeline_core::processors::ProcessorPtr; -use common_pipeline_core::PipeItem; +use databend_common_exception::Result; +use databend_common_expression::DataBlock; +use databend_common_pipeline_core::processors::Event; +use databend_common_pipeline_core::processors::InputPort; +use databend_common_pipeline_core::processors::OutputPort; +use databend_common_pipeline_core::processors::Processor; +use databend_common_pipeline_core::processors::ProcessorPtr; +use databend_common_pipeline_core::PipeItem; // TODO Shuffle? pub struct BroadcastProcessor { input_port: Arc, diff --git a/src/query/storages/fuse/src/operations/replace_into/processors/processor_replace_into.rs b/src/query/storages/fuse/src/operations/replace_into/processors/processor_replace_into.rs index 57ab126e63a1..bb6e1ae700c7 100644 --- a/src/query/storages/fuse/src/operations/replace_into/processors/processor_replace_into.rs +++ b/src/query/storages/fuse/src/operations/replace_into/processors/processor_replace_into.rs @@ -19,28 +19,28 @@ use std::ops::Not; use std::sync::Arc; use std::time::Instant; -use common_catalog::table_context::TableContext; -use common_exception::Result; -use common_expression::types::BooleanType; -use common_expression::ColumnId; -use common_expression::DataBlock; -use common_expression::Evaluator; -use common_expression::Expr; -use common_expression::FieldIndex; -use common_expression::RemoteExpr; -use common_expression::TableSchema; -use common_expression::Value; -use common_functions::BUILTIN_FUNCTIONS; -use common_metrics::storage::*; -use common_pipeline_core::processors::Event; -use common_pipeline_core::processors::InputPort; -use common_pipeline_core::processors::OutputPort; -use common_pipeline_core::processors::Processor; -use common_pipeline_core::processors::ProcessorPtr; -use common_pipeline_core::Pipe; -use common_pipeline_core::PipeItem; -use common_sql::executor::physical_plans::OnConflictField; -use storages_common_table_meta::meta::ColumnStatistics; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::Result; +use databend_common_expression::types::BooleanType; +use databend_common_expression::ColumnId; +use databend_common_expression::DataBlock; +use databend_common_expression::Evaluator; +use databend_common_expression::Expr; +use databend_common_expression::FieldIndex; +use databend_common_expression::RemoteExpr; +use databend_common_expression::TableSchema; +use databend_common_expression::Value; +use databend_common_functions::BUILTIN_FUNCTIONS; +use databend_common_metrics::storage::*; +use databend_common_pipeline_core::processors::Event; +use databend_common_pipeline_core::processors::InputPort; +use databend_common_pipeline_core::processors::OutputPort; +use databend_common_pipeline_core::processors::Processor; +use databend_common_pipeline_core::processors::ProcessorPtr; +use databend_common_pipeline_core::Pipe; +use databend_common_pipeline_core::PipeItem; +use databend_common_sql::executor::physical_plans::OnConflictField; +use databend_storages_common_table_meta::meta::ColumnStatistics; use crate::operations::replace_into::mutator::ReplaceIntoMutator; diff --git a/src/query/storages/fuse/src/operations/replace_into/processors/processor_unbranched_replace_into.rs b/src/query/storages/fuse/src/operations/replace_into/processors/processor_unbranched_replace_into.rs index 9c04d19f958d..3037d649af7d 100644 --- a/src/query/storages/fuse/src/operations/replace_into/processors/processor_unbranched_replace_into.rs +++ b/src/query/storages/fuse/src/operations/replace_into/processors/processor_unbranched_replace_into.rs @@ -18,23 +18,23 @@ use std::collections::HashSet; use std::sync::Arc; use std::time::Instant; -use common_catalog::table_context::TableContext; -use common_exception::Result; -use common_expression::ColumnId; -use common_expression::DataBlock; -use common_expression::FieldIndex; -use common_expression::RemoteExpr; -use common_expression::TableSchema; -use common_metrics::storage::*; -use common_pipeline_core::processors::Event; -use common_pipeline_core::processors::InputPort; -use common_pipeline_core::processors::OutputPort; -use common_pipeline_core::processors::Processor; -use common_pipeline_core::processors::ProcessorPtr; -use common_pipeline_core::Pipe; -use common_pipeline_core::PipeItem; -use common_sql::executor::physical_plans::OnConflictField; -use storages_common_table_meta::meta::ColumnStatistics; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::Result; +use databend_common_expression::ColumnId; +use databend_common_expression::DataBlock; +use databend_common_expression::FieldIndex; +use databend_common_expression::RemoteExpr; +use databend_common_expression::TableSchema; +use databend_common_metrics::storage::*; +use databend_common_pipeline_core::processors::Event; +use databend_common_pipeline_core::processors::InputPort; +use databend_common_pipeline_core::processors::OutputPort; +use databend_common_pipeline_core::processors::Processor; +use databend_common_pipeline_core::processors::ProcessorPtr; +use databend_common_pipeline_core::Pipe; +use databend_common_pipeline_core::PipeItem; +use databend_common_sql::executor::physical_plans::OnConflictField; +use databend_storages_common_table_meta::meta::ColumnStatistics; use crate::operations::replace_into::mutator::ReplaceIntoMutator; diff --git a/src/query/storages/fuse/src/operations/replace_into/processors/transform_merge_into_mutation_aggregator.rs b/src/query/storages/fuse/src/operations/replace_into/processors/transform_merge_into_mutation_aggregator.rs index bd3bc843be61..be014c6ddee7 100644 --- a/src/query/storages/fuse/src/operations/replace_into/processors/transform_merge_into_mutation_aggregator.rs +++ b/src/query/storages/fuse/src/operations/replace_into/processors/transform_merge_into_mutation_aggregator.rs @@ -12,14 +12,14 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_exception::Result; -use common_expression::DataBlock; -use common_pipeline_core::processors::InputPort; -use common_pipeline_core::processors::OutputPort; -use common_pipeline_core::processors::ProcessorPtr; -use common_pipeline_core::PipeItem; -use common_pipeline_transforms::processors::AsyncAccumulatingTransform; -use common_pipeline_transforms::processors::AsyncAccumulatingTransformer; +use databend_common_exception::Result; +use databend_common_expression::DataBlock; +use databend_common_pipeline_core::processors::InputPort; +use databend_common_pipeline_core::processors::OutputPort; +use databend_common_pipeline_core::processors::ProcessorPtr; +use databend_common_pipeline_core::PipeItem; +use databend_common_pipeline_transforms::processors::AsyncAccumulatingTransform; +use databend_common_pipeline_transforms::processors::AsyncAccumulatingTransformer; use crate::operations::replace_into::meta::MergeIntoOperation; use crate::operations::replace_into::mutator::MergeIntoOperationAggregator; diff --git a/src/query/storages/fuse/src/operations/revert.rs b/src/query/storages/fuse/src/operations/revert.rs index 9bf18199a684..39ab2d733377 100644 --- a/src/query/storages/fuse/src/operations/revert.rs +++ b/src/query/storages/fuse/src/operations/revert.rs @@ -12,13 +12,13 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_catalog::table::NavigationDescriptor; -use common_catalog::table::Table; -use common_catalog::table_context::TableContext; -use common_exception::ErrorCode; -use common_exception::Result; -use common_meta_app::schema::UpdateTableMetaReq; -use common_meta_types::MatchSeq; +use databend_common_catalog::table::NavigationDescriptor; +use databend_common_catalog::table::Table; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_meta_app::schema::UpdateTableMetaReq; +use databend_common_meta_types::MatchSeq; use crate::FuseTable; diff --git a/src/query/storages/fuse/src/operations/truncate.rs b/src/query/storages/fuse/src/operations/truncate.rs index b70b0267d5e3..9b0a2c2e4071 100644 --- a/src/query/storages/fuse/src/operations/truncate.rs +++ b/src/query/storages/fuse/src/operations/truncate.rs @@ -14,15 +14,15 @@ use std::sync::Arc; -use common_catalog::table_context::TableContext; -use common_exception::Result; -use common_meta_app::schema::TableStatistics; -use common_meta_app::schema::TruncateTableReq; -use common_meta_app::schema::UpdateTableMetaReq; -use common_meta_types::MatchSeq; -use storages_common_table_meta::meta::TableSnapshot; -use storages_common_table_meta::meta::Versioned; -use storages_common_table_meta::table::OPT_KEY_SNAPSHOT_LOCATION; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::Result; +use databend_common_meta_app::schema::TableStatistics; +use databend_common_meta_app::schema::TruncateTableReq; +use databend_common_meta_app::schema::UpdateTableMetaReq; +use databend_common_meta_types::MatchSeq; +use databend_storages_common_table_meta::meta::TableSnapshot; +use databend_storages_common_table_meta::meta::Versioned; +use databend_storages_common_table_meta::table::OPT_KEY_SNAPSHOT_LOCATION; use uuid::Uuid; use crate::FuseTable; diff --git a/src/query/storages/fuse/src/operations/update.rs b/src/query/storages/fuse/src/operations/update.rs index d621576e570c..a764f9f6c1a6 100644 --- a/src/query/storages/fuse/src/operations/update.rs +++ b/src/query/storages/fuse/src/operations/update.rs @@ -15,23 +15,23 @@ use std::collections::BTreeMap; use std::sync::Arc; -use common_catalog::plan::Filters; -use common_catalog::plan::Projection; -use common_catalog::table::Table; -use common_catalog::table_context::TableContext; -use common_exception::Result; -use common_expression::types::NumberDataType; -use common_expression::FieldIndex; -use common_expression::RemoteExpr; -use common_expression::TableDataType; -use common_expression::TableField; -use common_expression::TableSchema; -use common_expression::PREDICATE_COLUMN_NAME; -use common_expression::ROW_ID_COL_NAME; -use common_functions::BUILTIN_FUNCTIONS; -use common_pipeline_core::Pipeline; -use common_sql::evaluator::BlockOperator; -use storages_common_table_meta::meta::TableSnapshot; +use databend_common_catalog::plan::Filters; +use databend_common_catalog::plan::Projection; +use databend_common_catalog::table::Table; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::Result; +use databend_common_expression::types::NumberDataType; +use databend_common_expression::FieldIndex; +use databend_common_expression::RemoteExpr; +use databend_common_expression::TableDataType; +use databend_common_expression::TableField; +use databend_common_expression::TableSchema; +use databend_common_expression::PREDICATE_COLUMN_NAME; +use databend_common_expression::ROW_ID_COL_NAME; +use databend_common_functions::BUILTIN_FUNCTIONS; +use databend_common_pipeline_core::Pipeline; +use databend_common_sql::evaluator::BlockOperator; +use databend_storages_common_table_meta::meta::TableSnapshot; use crate::operations::mutation::MutationAction; use crate::operations::mutation::MutationSource; diff --git a/src/query/storages/fuse/src/operations/util.rs b/src/query/storages/fuse/src/operations/util.rs index 3e97a99faf8d..ee4150ef667f 100644 --- a/src/query/storages/fuse/src/operations/util.rs +++ b/src/query/storages/fuse/src/operations/util.rs @@ -18,18 +18,18 @@ use std::time::Duration; use backoff::ExponentialBackoff; use backoff::ExponentialBackoffBuilder; -use common_arrow::parquet::metadata::ThriftFileMetaData; -use common_base::base::tokio::sync::OwnedSemaphorePermit; -use common_base::base::tokio::sync::Semaphore; -use common_base::runtime::GlobalIORuntime; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::ColumnId; -use common_expression::DataBlock; -use common_expression::TableSchemaRef; -use storages_common_table_meta::meta::BlockMeta; -use storages_common_table_meta::meta::ColumnMeta; -use storages_common_table_meta::meta::SingleColumnMeta; +use databend_common_arrow::parquet::metadata::ThriftFileMetaData; +use databend_common_base::base::tokio::sync::OwnedSemaphorePermit; +use databend_common_base::base::tokio::sync::Semaphore; +use databend_common_base::runtime::GlobalIORuntime; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::ColumnId; +use databend_common_expression::DataBlock; +use databend_common_expression::TableSchemaRef; +use databend_storages_common_table_meta::meta::BlockMeta; +use databend_storages_common_table_meta::meta::ColumnMeta; +use databend_storages_common_table_meta::meta::SingleColumnMeta; use crate::io::BlockReader; use crate::io::ReadSettings; diff --git a/src/query/storages/fuse/src/pruning/block_pruner.rs b/src/query/storages/fuse/src/pruning/block_pruner.rs index 632488e2d98c..4fdf7bc487bb 100644 --- a/src/query/storages/fuse/src/pruning/block_pruner.rs +++ b/src/query/storages/fuse/src/pruning/block_pruner.rs @@ -18,16 +18,16 @@ use std::pin::Pin; use std::sync::Arc; use std::time::Instant; -use common_base::base::tokio::sync::OwnedSemaphorePermit; -use common_catalog::plan::block_id_in_segment; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::BLOCK_NAME_COL_NAME; -use common_metrics::storage::*; +use databend_common_base::base::tokio::sync::OwnedSemaphorePermit; +use databend_common_catalog::plan::block_id_in_segment; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::BLOCK_NAME_COL_NAME; +use databend_common_metrics::storage::*; +use databend_storages_common_pruner::BlockMetaIndex; +use databend_storages_common_table_meta::meta::BlockMeta; +use databend_storages_common_table_meta::meta::CompactSegmentInfo; use futures_util::future; -use storages_common_pruner::BlockMetaIndex; -use storages_common_table_meta::meta::BlockMeta; -use storages_common_table_meta::meta::CompactSegmentInfo; use super::SegmentLocation; use crate::pruning::BloomPruner; diff --git a/src/query/storages/fuse/src/pruning/bloom_pruner.rs b/src/query/storages/fuse/src/pruning/bloom_pruner.rs index fb299a6cb486..2cc20a229ec1 100644 --- a/src/query/storages/fuse/src/pruning/bloom_pruner.rs +++ b/src/query/storages/fuse/src/pruning/bloom_pruner.rs @@ -16,20 +16,20 @@ use std::collections::hash_map::Entry; use std::collections::HashMap; use std::sync::Arc; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::ColumnId; -use common_expression::Expr; -use common_expression::FunctionContext; -use common_expression::Scalar; -use common_expression::TableField; -use common_expression::TableSchemaRef; -use common_sql::BloomIndexColumns; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::ColumnId; +use databend_common_expression::Expr; +use databend_common_expression::FunctionContext; +use databend_common_expression::Scalar; +use databend_common_expression::TableField; +use databend_common_expression::TableSchemaRef; +use databend_common_sql::BloomIndexColumns; +use databend_storages_common_index::BloomIndex; +use databend_storages_common_index::FilterEvalResult; +use databend_storages_common_table_meta::meta::Location; use log::warn; use opendal::Operator; -use storages_common_index::BloomIndex; -use storages_common_index::FilterEvalResult; -use storages_common_table_meta::meta::Location; use crate::io::BloomBlockFilterReader; diff --git a/src/query/storages/fuse/src/pruning/fuse_pruner.rs b/src/query/storages/fuse/src/pruning/fuse_pruner.rs index bce59d52c4e6..5a023e68827b 100644 --- a/src/query/storages/fuse/src/pruning/fuse_pruner.rs +++ b/src/query/storages/fuse/src/pruning/fuse_pruner.rs @@ -14,35 +14,35 @@ use std::sync::Arc; -use common_base::base::tokio::sync::Semaphore; -use common_base::runtime::Runtime; -use common_base::runtime::TrySpawn; -use common_catalog::plan::PushDownInfo; -use common_catalog::table_context::TableContext; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::RemoteExpr; -use common_expression::TableSchemaRef; -use common_expression::SEGMENT_NAME_COL_NAME; -use common_functions::BUILTIN_FUNCTIONS; -use common_sql::field_default_value; -use common_sql::BloomIndexColumns; +use databend_common_base::base::tokio::sync::Semaphore; +use databend_common_base::runtime::Runtime; +use databend_common_base::runtime::TrySpawn; +use databend_common_catalog::plan::PushDownInfo; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::RemoteExpr; +use databend_common_expression::TableSchemaRef; +use databend_common_expression::SEGMENT_NAME_COL_NAME; +use databend_common_functions::BUILTIN_FUNCTIONS; +use databend_common_sql::field_default_value; +use databend_common_sql::BloomIndexColumns; +use databend_storages_common_index::RangeIndex; +use databend_storages_common_pruner::BlockMetaIndex; +use databend_storages_common_pruner::InternalColumnPruner; +use databend_storages_common_pruner::Limiter; +use databend_storages_common_pruner::LimiterPrunerCreator; +use databend_storages_common_pruner::PagePruner; +use databend_storages_common_pruner::PagePrunerCreator; +use databend_storages_common_pruner::RangePruner; +use databend_storages_common_pruner::RangePrunerCreator; +use databend_storages_common_pruner::TopNPrunner; +use databend_storages_common_table_meta::meta::BlockMeta; +use databend_storages_common_table_meta::meta::ClusterKey; +use databend_storages_common_table_meta::meta::ColumnStatistics; +use databend_storages_common_table_meta::meta::StatisticsOfColumns; use log::warn; use opendal::Operator; -use storages_common_index::RangeIndex; -use storages_common_pruner::BlockMetaIndex; -use storages_common_pruner::InternalColumnPruner; -use storages_common_pruner::Limiter; -use storages_common_pruner::LimiterPrunerCreator; -use storages_common_pruner::PagePruner; -use storages_common_pruner::PagePrunerCreator; -use storages_common_pruner::RangePruner; -use storages_common_pruner::RangePrunerCreator; -use storages_common_pruner::TopNPrunner; -use storages_common_table_meta::meta::BlockMeta; -use storages_common_table_meta::meta::ClusterKey; -use storages_common_table_meta::meta::ColumnStatistics; -use storages_common_table_meta::meta::StatisticsOfColumns; use crate::operations::DeletedSegmentInfo; use crate::pruning::segment_pruner::SegmentPruner; @@ -405,7 +405,7 @@ impl FusePruner { } // Pruning stats. - pub fn pruning_stats(&self) -> common_catalog::plan::PruningStatistics { + pub fn pruning_stats(&self) -> databend_common_catalog::plan::PruningStatistics { let stats = self.pruning_ctx.pruning_stats.clone(); let segments_range_pruning_before = stats.get_segments_range_pruning_before() as usize; @@ -417,7 +417,7 @@ impl FusePruner { let blocks_bloom_pruning_before = stats.get_blocks_bloom_pruning_before() as usize; let blocks_bloom_pruning_after = stats.get_blocks_bloom_pruning_after() as usize; - common_catalog::plan::PruningStatistics { + databend_common_catalog::plan::PruningStatistics { segments_range_pruning_before, segments_range_pruning_after, blocks_range_pruning_before, diff --git a/src/query/storages/fuse/src/pruning/pruner_location.rs b/src/query/storages/fuse/src/pruning/pruner_location.rs index da921f851080..df0b72e7807b 100644 --- a/src/query/storages/fuse/src/pruning/pruner_location.rs +++ b/src/query/storages/fuse/src/pruning/pruner_location.rs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -use storages_common_table_meta::meta::Location; +use databend_storages_common_table_meta::meta::Location; #[derive(Debug, Clone)] pub struct SegmentLocation { diff --git a/src/query/storages/fuse/src/pruning/segment_pruner.rs b/src/query/storages/fuse/src/pruning/segment_pruner.rs index 4136745ee8ca..d8701a9a8821 100644 --- a/src/query/storages/fuse/src/pruning/segment_pruner.rs +++ b/src/query/storages/fuse/src/pruning/segment_pruner.rs @@ -14,10 +14,10 @@ use std::sync::Arc; -use common_exception::Result; -use common_expression::TableSchemaRef; -use common_metrics::storage::*; -use storages_common_table_meta::meta::CompactSegmentInfo; +use databend_common_exception::Result; +use databend_common_expression::TableSchemaRef; +use databend_common_metrics::storage::*; +use databend_storages_common_table_meta::meta::CompactSegmentInfo; use crate::io::SegmentsIO; use crate::pruning::PruningContext; diff --git a/src/query/storages/fuse/src/statistics/accumulator.rs b/src/query/storages/fuse/src/statistics/accumulator.rs index 5042b5fc327c..4b5286ba13e3 100644 --- a/src/query/storages/fuse/src/statistics/accumulator.rs +++ b/src/query/storages/fuse/src/statistics/accumulator.rs @@ -14,9 +14,9 @@ use std::sync::Arc; -use common_expression::BlockThresholds; -use storages_common_table_meta::meta::BlockMeta; -use storages_common_table_meta::meta::Statistics; +use databend_common_expression::BlockThresholds; +use databend_storages_common_table_meta::meta::BlockMeta; +use databend_storages_common_table_meta::meta::Statistics; #[derive(Default)] pub struct StatisticsAccumulator { diff --git a/src/query/storages/fuse/src/statistics/block_statistics.rs b/src/query/storages/fuse/src/statistics/block_statistics.rs index 3434d809ad25..cb8f8585cef5 100644 --- a/src/query/storages/fuse/src/statistics/block_statistics.rs +++ b/src/query/storages/fuse/src/statistics/block_statistics.rs @@ -14,11 +14,11 @@ use std::collections::HashMap; -use common_expression::ColumnId; -use common_expression::DataBlock; -use common_expression::TableSchemaRef; -use storages_common_table_meta::meta::ClusterStatistics; -use storages_common_table_meta::meta::ColumnStatistics; +use databend_common_expression::ColumnId; +use databend_common_expression::DataBlock; +use databend_common_expression::TableSchemaRef; +use databend_storages_common_table_meta::meta::ClusterStatistics; +use databend_storages_common_table_meta::meta::ColumnStatistics; use crate::statistics::column_statistic; @@ -38,7 +38,7 @@ impl BlockStatistics { cluster_stats: Option, column_distinct_count: Option>, schema: &TableSchemaRef, - ) -> common_exception::Result { + ) -> databend_common_exception::Result { Ok(BlockStatistics { block_file_location: location, block_rows_size: data_block.num_rows() as u64, diff --git a/src/query/storages/fuse/src/statistics/cluster_statistics.rs b/src/query/storages/fuse/src/statistics/cluster_statistics.rs index 4986d8c8d2f5..bf0fd6e5b4cb 100644 --- a/src/query/storages/fuse/src/statistics/cluster_statistics.rs +++ b/src/query/storages/fuse/src/statistics/cluster_statistics.rs @@ -14,14 +14,14 @@ use std::cmp::Ordering; -use common_exception::Result; -use common_expression::BlockThresholds; -use common_expression::DataBlock; -use common_expression::DataField; -use common_expression::FunctionContext; -use common_expression::Scalar; -use common_sql::evaluator::BlockOperator; -use storages_common_table_meta::meta::ClusterStatistics; +use databend_common_exception::Result; +use databend_common_expression::BlockThresholds; +use databend_common_expression::DataBlock; +use databend_common_expression::DataField; +use databend_common_expression::FunctionContext; +use databend_common_expression::Scalar; +use databend_common_sql::evaluator::BlockOperator; +use databend_storages_common_table_meta::meta::ClusterStatistics; use crate::statistics::column_statistic::Trim; use crate::table_functions::cmp_with_null; diff --git a/src/query/storages/fuse/src/statistics/column_statistic.rs b/src/query/storages/fuse/src/statistics/column_statistic.rs index 3c1b062948c0..ebc00004470c 100644 --- a/src/query/storages/fuse/src/statistics/column_statistic.rs +++ b/src/query/storages/fuse/src/statistics/column_statistic.rs @@ -14,20 +14,20 @@ use std::collections::HashMap; -use common_exception::Result; -use common_expression::types::NumberType; -use common_expression::types::ValueType; -use common_expression::Column; -use common_expression::DataBlock; -use common_expression::FieldIndex; -use common_expression::Scalar; -use common_expression::TableSchemaRef; -use common_expression::ORIGIN_BLOCK_ROW_NUM_COLUMN_ID; -use common_functions::aggregates::eval_aggr; -use storages_common_index::Index; -use storages_common_index::RangeIndex; -use storages_common_table_meta::meta::ColumnStatistics; -use storages_common_table_meta::meta::StatisticsOfColumns; +use databend_common_exception::Result; +use databend_common_expression::types::NumberType; +use databend_common_expression::types::ValueType; +use databend_common_expression::Column; +use databend_common_expression::DataBlock; +use databend_common_expression::FieldIndex; +use databend_common_expression::Scalar; +use databend_common_expression::TableSchemaRef; +use databend_common_expression::ORIGIN_BLOCK_ROW_NUM_COLUMN_ID; +use databend_common_functions::aggregates::eval_aggr; +use databend_storages_common_index::Index; +use databend_storages_common_index::RangeIndex; +use databend_storages_common_table_meta::meta::ColumnStatistics; +use databend_storages_common_table_meta::meta::StatisticsOfColumns; pub fn calc_column_distinct_of_values(column: &Column, rows: usize) -> Result { let distinct_values = eval_aggr("approx_count_distinct", vec![], &[column.clone()], rows)?; @@ -131,11 +131,11 @@ pub fn gen_columns_statistics( } pub mod traverse { - use common_expression::types::map::KvPair; - use common_expression::types::AnyType; - use common_expression::types::DataType; - use common_expression::BlockEntry; - use common_expression::Column; + use databend_common_expression::types::map::KvPair; + use databend_common_expression::types::AnyType; + use databend_common_expression::types::DataType; + use databend_common_expression::BlockEntry; + use databend_common_expression::Column; use super::*; diff --git a/src/query/storages/fuse/src/statistics/reducers.rs b/src/query/storages/fuse/src/statistics/reducers.rs index f21b1c6a3b71..80880e060782 100644 --- a/src/query/storages/fuse/src/statistics/reducers.rs +++ b/src/query/storages/fuse/src/statistics/reducers.rs @@ -15,14 +15,14 @@ use std::borrow::Borrow; use std::collections::HashMap; -use common_expression::BlockThresholds; -use common_expression::ColumnId; -use common_expression::Scalar; -use storages_common_table_meta::meta::BlockMeta; -use storages_common_table_meta::meta::ClusterStatistics; -use storages_common_table_meta::meta::ColumnStatistics; -use storages_common_table_meta::meta::Statistics; -use storages_common_table_meta::meta::StatisticsOfColumns; +use databend_common_expression::BlockThresholds; +use databend_common_expression::ColumnId; +use databend_common_expression::Scalar; +use databend_storages_common_table_meta::meta::BlockMeta; +use databend_storages_common_table_meta::meta::ClusterStatistics; +use databend_storages_common_table_meta::meta::ColumnStatistics; +use databend_storages_common_table_meta::meta::Statistics; +use databend_storages_common_table_meta::meta::StatisticsOfColumns; use crate::table_functions::cmp_with_null; diff --git a/src/query/storages/fuse/src/table_functions/clustering_information/clustering_information.rs b/src/query/storages/fuse/src/table_functions/clustering_information/clustering_information.rs index 6d8a7abe5def..9fe14417f126 100644 --- a/src/query/storages/fuse/src/table_functions/clustering_information/clustering_information.rs +++ b/src/query/storages/fuse/src/table_functions/clustering_information/clustering_information.rs @@ -17,25 +17,25 @@ use std::collections::BTreeMap; use std::collections::HashMap; use std::sync::Arc; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::types::number::NumberScalar; -use common_expression::types::DataType; -use common_expression::types::NumberDataType; -use common_expression::BlockEntry; -use common_expression::DataBlock; -use common_expression::Scalar; -use common_expression::TableDataType; -use common_expression::TableField; -use common_expression::TableSchema; -use common_expression::TableSchemaRefExt; -use common_expression::Value; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::types::number::NumberScalar; +use databend_common_expression::types::DataType; +use databend_common_expression::types::NumberDataType; +use databend_common_expression::BlockEntry; +use databend_common_expression::DataBlock; +use databend_common_expression::Scalar; +use databend_common_expression::TableDataType; +use databend_common_expression::TableField; +use databend_common_expression::TableSchema; +use databend_common_expression::TableSchemaRefExt; +use databend_common_expression::Value; +use databend_storages_common_table_meta::meta::SegmentInfo; use itertools::Itertools; use jsonb::Value as JsonbValue; use log::warn; use serde_json::json; use serde_json::Value as JsonValue; -use storages_common_table_meta::meta::SegmentInfo; use crate::io::SegmentsIO; use crate::sessions::TableContext; diff --git a/src/query/storages/fuse/src/table_functions/clustering_information/clustering_information_table.rs b/src/query/storages/fuse/src/table_functions/clustering_information/clustering_information_table.rs index 95a2a24fa701..b16eb6216621 100644 --- a/src/query/storages/fuse/src/table_functions/clustering_information/clustering_information_table.rs +++ b/src/query/storages/fuse/src/table_functions/clustering_information/clustering_information_table.rs @@ -15,21 +15,21 @@ use std::any::Any; use std::sync::Arc; -use common_catalog::catalog_kind::CATALOG_DEFAULT; -use common_catalog::plan::DataSourcePlan; -use common_catalog::plan::PartStatistics; -use common_catalog::plan::Partitions; -use common_catalog::plan::PushDownInfo; -use common_exception::Result; -use common_expression::DataBlock; -use common_meta_app::schema::TableIdent; -use common_meta_app::schema::TableInfo; -use common_meta_app::schema::TableMeta; -use common_pipeline_core::processors::OutputPort; -use common_pipeline_core::processors::ProcessorPtr; -use common_pipeline_core::Pipeline; -use common_pipeline_sources::AsyncSource; -use common_pipeline_sources::AsyncSourcer; +use databend_common_catalog::catalog_kind::CATALOG_DEFAULT; +use databend_common_catalog::plan::DataSourcePlan; +use databend_common_catalog::plan::PartStatistics; +use databend_common_catalog::plan::Partitions; +use databend_common_catalog::plan::PushDownInfo; +use databend_common_exception::Result; +use databend_common_expression::DataBlock; +use databend_common_meta_app::schema::TableIdent; +use databend_common_meta_app::schema::TableInfo; +use databend_common_meta_app::schema::TableMeta; +use databend_common_pipeline_core::processors::OutputPort; +use databend_common_pipeline_core::processors::ProcessorPtr; +use databend_common_pipeline_core::Pipeline; +use databend_common_pipeline_sources::AsyncSource; +use databend_common_pipeline_sources::AsyncSourcer; use super::clustering_information::ClusteringInformation; use crate::sessions::TableContext; diff --git a/src/query/storages/fuse/src/table_functions/fuse_blocks/fuse_block.rs b/src/query/storages/fuse/src/table_functions/fuse_blocks/fuse_block.rs index 47349103dd3f..7eac11930553 100644 --- a/src/query/storages/fuse/src/table_functions/fuse_blocks/fuse_block.rs +++ b/src/query/storages/fuse/src/table_functions/fuse_blocks/fuse_block.rs @@ -14,26 +14,26 @@ use std::sync::Arc; -use common_catalog::table::Table; -use common_exception::Result; -use common_expression::types::string::StringColumnBuilder; -use common_expression::types::DataType; -use common_expression::types::NumberDataType; -use common_expression::types::StringType; -use common_expression::types::UInt64Type; -use common_expression::BlockEntry; -use common_expression::Column; -use common_expression::DataBlock; -use common_expression::FromData; -use common_expression::Scalar; -use common_expression::TableDataType; -use common_expression::TableField; -use common_expression::TableSchema; -use common_expression::TableSchemaRefExt; -use common_expression::Value; +use databend_common_catalog::table::Table; +use databend_common_exception::Result; +use databend_common_expression::types::string::StringColumnBuilder; +use databend_common_expression::types::DataType; +use databend_common_expression::types::NumberDataType; +use databend_common_expression::types::StringType; +use databend_common_expression::types::UInt64Type; +use databend_common_expression::BlockEntry; +use databend_common_expression::Column; +use databend_common_expression::DataBlock; +use databend_common_expression::FromData; +use databend_common_expression::Scalar; +use databend_common_expression::TableDataType; +use databend_common_expression::TableField; +use databend_common_expression::TableSchema; +use databend_common_expression::TableSchemaRefExt; +use databend_common_expression::Value; +use databend_storages_common_table_meta::meta::SegmentInfo; +use databend_storages_common_table_meta::meta::TableSnapshot; use futures_util::TryStreamExt; -use storages_common_table_meta::meta::SegmentInfo; -use storages_common_table_meta::meta::TableSnapshot; use crate::io::MetaReaders; use crate::io::SegmentsIO; diff --git a/src/query/storages/fuse/src/table_functions/fuse_blocks/fuse_block_table.rs b/src/query/storages/fuse/src/table_functions/fuse_blocks/fuse_block_table.rs index 307c16513470..43037c4f933a 100644 --- a/src/query/storages/fuse/src/table_functions/fuse_blocks/fuse_block_table.rs +++ b/src/query/storages/fuse/src/table_functions/fuse_blocks/fuse_block_table.rs @@ -15,21 +15,21 @@ use std::any::Any; use std::sync::Arc; -use common_catalog::catalog_kind::CATALOG_DEFAULT; -use common_catalog::plan::DataSourcePlan; -use common_catalog::plan::PartStatistics; -use common_catalog::plan::Partitions; -use common_catalog::plan::PushDownInfo; -use common_exception::Result; -use common_expression::DataBlock; -use common_meta_app::schema::TableIdent; -use common_meta_app::schema::TableInfo; -use common_meta_app::schema::TableMeta; -use common_pipeline_core::processors::OutputPort; -use common_pipeline_core::processors::ProcessorPtr; -use common_pipeline_core::Pipeline; -use common_pipeline_sources::AsyncSource; -use common_pipeline_sources::AsyncSourcer; +use databend_common_catalog::catalog_kind::CATALOG_DEFAULT; +use databend_common_catalog::plan::DataSourcePlan; +use databend_common_catalog::plan::PartStatistics; +use databend_common_catalog::plan::Partitions; +use databend_common_catalog::plan::PushDownInfo; +use databend_common_exception::Result; +use databend_common_expression::DataBlock; +use databend_common_meta_app::schema::TableIdent; +use databend_common_meta_app::schema::TableInfo; +use databend_common_meta_app::schema::TableMeta; +use databend_common_pipeline_core::processors::OutputPort; +use databend_common_pipeline_core::processors::ProcessorPtr; +use databend_common_pipeline_core::Pipeline; +use databend_common_pipeline_sources::AsyncSource; +use databend_common_pipeline_sources::AsyncSourcer; use crate::sessions::TableContext; use crate::table_functions::parse_db_tb_ssid_args; diff --git a/src/query/storages/fuse/src/table_functions/fuse_columns/fuse_column.rs b/src/query/storages/fuse/src/table_functions/fuse_columns/fuse_column.rs index 650b333d5cd7..6df0a169e8e0 100644 --- a/src/query/storages/fuse/src/table_functions/fuse_columns/fuse_column.rs +++ b/src/query/storages/fuse/src/table_functions/fuse_columns/fuse_column.rs @@ -14,26 +14,26 @@ use std::sync::Arc; -use common_catalog::table::Table; -use common_exception::Result; -use common_expression::types::string::StringColumnBuilder; -use common_expression::types::DataType; -use common_expression::types::NumberDataType; -use common_expression::types::UInt32Type; -use common_expression::types::UInt64Type; -use common_expression::BlockEntry; -use common_expression::Column; -use common_expression::DataBlock; -use common_expression::FromData; -use common_expression::Scalar; -use common_expression::TableDataType; -use common_expression::TableField; -use common_expression::TableSchema; -use common_expression::TableSchemaRefExt; -use common_expression::Value; +use databend_common_catalog::table::Table; +use databend_common_exception::Result; +use databend_common_expression::types::string::StringColumnBuilder; +use databend_common_expression::types::DataType; +use databend_common_expression::types::NumberDataType; +use databend_common_expression::types::UInt32Type; +use databend_common_expression::types::UInt64Type; +use databend_common_expression::BlockEntry; +use databend_common_expression::Column; +use databend_common_expression::DataBlock; +use databend_common_expression::FromData; +use databend_common_expression::Scalar; +use databend_common_expression::TableDataType; +use databend_common_expression::TableField; +use databend_common_expression::TableSchema; +use databend_common_expression::TableSchemaRefExt; +use databend_common_expression::Value; +use databend_storages_common_table_meta::meta::SegmentInfo; +use databend_storages_common_table_meta::meta::TableSnapshot; use futures_util::TryStreamExt; -use storages_common_table_meta::meta::SegmentInfo; -use storages_common_table_meta::meta::TableSnapshot; use crate::io::MetaReaders; use crate::io::SegmentsIO; diff --git a/src/query/storages/fuse/src/table_functions/fuse_columns/fuse_column_table.rs b/src/query/storages/fuse/src/table_functions/fuse_columns/fuse_column_table.rs index 4cc76f0649a2..3cdf87840bd0 100644 --- a/src/query/storages/fuse/src/table_functions/fuse_columns/fuse_column_table.rs +++ b/src/query/storages/fuse/src/table_functions/fuse_columns/fuse_column_table.rs @@ -15,21 +15,21 @@ use std::any::Any; use std::sync::Arc; -use common_catalog::catalog_kind::CATALOG_DEFAULT; -use common_catalog::plan::DataSourcePlan; -use common_catalog::plan::PartStatistics; -use common_catalog::plan::Partitions; -use common_catalog::plan::PushDownInfo; -use common_exception::Result; -use common_expression::DataBlock; -use common_meta_app::schema::TableIdent; -use common_meta_app::schema::TableInfo; -use common_meta_app::schema::TableMeta; -use common_pipeline_core::processors::OutputPort; -use common_pipeline_core::processors::ProcessorPtr; -use common_pipeline_core::Pipeline; -use common_pipeline_sources::AsyncSource; -use common_pipeline_sources::AsyncSourcer; +use databend_common_catalog::catalog_kind::CATALOG_DEFAULT; +use databend_common_catalog::plan::DataSourcePlan; +use databend_common_catalog::plan::PartStatistics; +use databend_common_catalog::plan::Partitions; +use databend_common_catalog::plan::PushDownInfo; +use databend_common_exception::Result; +use databend_common_expression::DataBlock; +use databend_common_meta_app::schema::TableIdent; +use databend_common_meta_app::schema::TableInfo; +use databend_common_meta_app::schema::TableMeta; +use databend_common_pipeline_core::processors::OutputPort; +use databend_common_pipeline_core::processors::ProcessorPtr; +use databend_common_pipeline_core::Pipeline; +use databend_common_pipeline_sources::AsyncSource; +use databend_common_pipeline_sources::AsyncSourcer; use crate::sessions::TableContext; use crate::table_functions::parse_db_tb_ssid_args; diff --git a/src/query/storages/fuse/src/table_functions/fuse_encodings/fuse_encoding.rs b/src/query/storages/fuse/src/table_functions/fuse_encodings/fuse_encoding.rs index c56a27bdaef6..8aff5e299dc7 100644 --- a/src/query/storages/fuse/src/table_functions/fuse_encodings/fuse_encoding.rs +++ b/src/query/storages/fuse/src/table_functions/fuse_encodings/fuse_encoding.rs @@ -14,37 +14,37 @@ use std::sync::Arc; -use common_arrow::arrow::datatypes::Field; -use common_arrow::native::read::reader::NativeReader; -use common_arrow::native::stat::stat_simple; -use common_arrow::native::stat::ColumnInfo; -use common_arrow::native::stat::PageBody; -use common_catalog::plan::Filters; -use common_catalog::table::Table; -use common_exception::Result; -use common_expression::types::nullable::NullableColumnBuilder; -use common_expression::types::string::StringColumnBuilder; -use common_expression::types::BooleanType; -use common_expression::types::DataType; -use common_expression::types::NumberDataType; -use common_expression::types::StringType; -use common_expression::types::UInt32Type; -use common_expression::BlockEntry; -use common_expression::Column; -use common_expression::DataBlock; -use common_expression::Evaluator; -use common_expression::Expr; -use common_expression::FromData; -use common_expression::FunctionContext; -use common_expression::FunctionRegistry; -use common_expression::RemoteExpr; -use common_expression::TableDataType; -use common_expression::TableField; -use common_expression::TableSchema; -use common_expression::TableSchemaRefExt; -use common_expression::Value; -use common_functions::BUILTIN_FUNCTIONS; -use storages_common_table_meta::meta::SegmentInfo; +use databend_common_arrow::arrow::datatypes::Field; +use databend_common_arrow::native::read::reader::NativeReader; +use databend_common_arrow::native::stat::stat_simple; +use databend_common_arrow::native::stat::ColumnInfo; +use databend_common_arrow::native::stat::PageBody; +use databend_common_catalog::plan::Filters; +use databend_common_catalog::table::Table; +use databend_common_exception::Result; +use databend_common_expression::types::nullable::NullableColumnBuilder; +use databend_common_expression::types::string::StringColumnBuilder; +use databend_common_expression::types::BooleanType; +use databend_common_expression::types::DataType; +use databend_common_expression::types::NumberDataType; +use databend_common_expression::types::StringType; +use databend_common_expression::types::UInt32Type; +use databend_common_expression::BlockEntry; +use databend_common_expression::Column; +use databend_common_expression::DataBlock; +use databend_common_expression::Evaluator; +use databend_common_expression::Expr; +use databend_common_expression::FromData; +use databend_common_expression::FunctionContext; +use databend_common_expression::FunctionRegistry; +use databend_common_expression::RemoteExpr; +use databend_common_expression::TableDataType; +use databend_common_expression::TableField; +use databend_common_expression::TableSchema; +use databend_common_expression::TableSchemaRefExt; +use databend_common_expression::Value; +use databend_common_functions::BUILTIN_FUNCTIONS; +use databend_storages_common_table_meta::meta::SegmentInfo; use crate::io::BlockReader; use crate::io::ReadSettings; diff --git a/src/query/storages/fuse/src/table_functions/fuse_encodings/fuse_encoding_table.rs b/src/query/storages/fuse/src/table_functions/fuse_encodings/fuse_encoding_table.rs index 02177d486257..359f62730caa 100644 --- a/src/query/storages/fuse/src/table_functions/fuse_encodings/fuse_encoding_table.rs +++ b/src/query/storages/fuse/src/table_functions/fuse_encodings/fuse_encoding_table.rs @@ -15,22 +15,22 @@ use std::any::Any; use std::sync::Arc; -use common_catalog::catalog_kind::CATALOG_DEFAULT; -use common_catalog::plan::DataSourcePlan; -use common_catalog::plan::Filters; -use common_catalog::plan::PartStatistics; -use common_catalog::plan::Partitions; -use common_catalog::plan::PushDownInfo; -use common_exception::Result; -use common_expression::DataBlock; -use common_meta_app::schema::TableIdent; -use common_meta_app::schema::TableInfo; -use common_meta_app::schema::TableMeta; -use common_pipeline_core::processors::OutputPort; -use common_pipeline_core::processors::ProcessorPtr; -use common_pipeline_core::Pipeline; -use common_pipeline_sources::AsyncSource; -use common_pipeline_sources::AsyncSourcer; +use databend_common_catalog::catalog_kind::CATALOG_DEFAULT; +use databend_common_catalog::plan::DataSourcePlan; +use databend_common_catalog::plan::Filters; +use databend_common_catalog::plan::PartStatistics; +use databend_common_catalog::plan::Partitions; +use databend_common_catalog::plan::PushDownInfo; +use databend_common_exception::Result; +use databend_common_expression::DataBlock; +use databend_common_meta_app::schema::TableIdent; +use databend_common_meta_app::schema::TableInfo; +use databend_common_meta_app::schema::TableMeta; +use databend_common_pipeline_core::processors::OutputPort; +use databend_common_pipeline_core::processors::ProcessorPtr; +use databend_common_pipeline_core::Pipeline; +use databend_common_pipeline_sources::AsyncSource; +use databend_common_pipeline_sources::AsyncSourcer; use super::FuseEncoding; use crate::sessions::TableContext; diff --git a/src/query/storages/fuse/src/table_functions/fuse_segments/fuse_segment.rs b/src/query/storages/fuse/src/table_functions/fuse_segments/fuse_segment.rs index c1a78567f3a4..75d1cff25898 100644 --- a/src/query/storages/fuse/src/table_functions/fuse_segments/fuse_segment.rs +++ b/src/query/storages/fuse/src/table_functions/fuse_segments/fuse_segment.rs @@ -14,20 +14,20 @@ use std::sync::Arc; -use common_catalog::table::Table; -use common_exception::Result; -use common_expression::types::NumberDataType; -use common_expression::types::StringType; -use common_expression::types::UInt64Type; -use common_expression::DataBlock; -use common_expression::FromData; -use common_expression::TableDataType; -use common_expression::TableField; -use common_expression::TableSchema; -use common_expression::TableSchemaRefExt; +use databend_common_catalog::table::Table; +use databend_common_exception::Result; +use databend_common_expression::types::NumberDataType; +use databend_common_expression::types::StringType; +use databend_common_expression::types::UInt64Type; +use databend_common_expression::DataBlock; +use databend_common_expression::FromData; +use databend_common_expression::TableDataType; +use databend_common_expression::TableField; +use databend_common_expression::TableSchema; +use databend_common_expression::TableSchemaRefExt; +use databend_storages_common_table_meta::meta::Location; +use databend_storages_common_table_meta::meta::SegmentInfo; use futures_util::TryStreamExt; -use storages_common_table_meta::meta::Location; -use storages_common_table_meta::meta::SegmentInfo; use crate::io::MetaReaders; use crate::io::SegmentsIO; diff --git a/src/query/storages/fuse/src/table_functions/fuse_segments/fuse_segment_table.rs b/src/query/storages/fuse/src/table_functions/fuse_segments/fuse_segment_table.rs index c3b57552633d..77c8ed570c17 100644 --- a/src/query/storages/fuse/src/table_functions/fuse_segments/fuse_segment_table.rs +++ b/src/query/storages/fuse/src/table_functions/fuse_segments/fuse_segment_table.rs @@ -15,21 +15,21 @@ use std::any::Any; use std::sync::Arc; -use common_catalog::catalog_kind::CATALOG_DEFAULT; -use common_catalog::plan::DataSourcePlan; -use common_catalog::plan::PartStatistics; -use common_catalog::plan::Partitions; -use common_catalog::plan::PushDownInfo; -use common_exception::Result; -use common_expression::DataBlock; -use common_meta_app::schema::TableIdent; -use common_meta_app::schema::TableInfo; -use common_meta_app::schema::TableMeta; -use common_pipeline_core::processors::OutputPort; -use common_pipeline_core::processors::ProcessorPtr; -use common_pipeline_core::Pipeline; -use common_pipeline_sources::AsyncSource; -use common_pipeline_sources::AsyncSourcer; +use databend_common_catalog::catalog_kind::CATALOG_DEFAULT; +use databend_common_catalog::plan::DataSourcePlan; +use databend_common_catalog::plan::PartStatistics; +use databend_common_catalog::plan::Partitions; +use databend_common_catalog::plan::PushDownInfo; +use databend_common_exception::Result; +use databend_common_expression::DataBlock; +use databend_common_meta_app::schema::TableIdent; +use databend_common_meta_app::schema::TableInfo; +use databend_common_meta_app::schema::TableMeta; +use databend_common_pipeline_core::processors::OutputPort; +use databend_common_pipeline_core::processors::ProcessorPtr; +use databend_common_pipeline_core::Pipeline; +use databend_common_pipeline_sources::AsyncSource; +use databend_common_pipeline_sources::AsyncSourcer; use super::fuse_segment::FuseSegment; use crate::sessions::TableContext; diff --git a/src/query/storages/fuse/src/table_functions/fuse_snapshots/fuse_snapshot.rs b/src/query/storages/fuse/src/table_functions/fuse_snapshots/fuse_snapshot.rs index 729042ae3e03..406386f7245f 100644 --- a/src/query/storages/fuse/src/table_functions/fuse_snapshots/fuse_snapshot.rs +++ b/src/query/storages/fuse/src/table_functions/fuse_snapshots/fuse_snapshot.rs @@ -14,18 +14,18 @@ use std::sync::Arc; -use common_exception::Result; -use common_expression::types::number::UInt64Type; -use common_expression::types::NumberDataType; -use common_expression::types::StringType; -use common_expression::types::TimestampType; -use common_expression::DataBlock; -use common_expression::FromData; -use common_expression::TableDataType; -use common_expression::TableField; -use common_expression::TableSchema; -use common_expression::TableSchemaRefExt; -use storages_common_table_meta::meta::TableSnapshotLite; +use databend_common_exception::Result; +use databend_common_expression::types::number::UInt64Type; +use databend_common_expression::types::NumberDataType; +use databend_common_expression::types::StringType; +use databend_common_expression::types::TimestampType; +use databend_common_expression::DataBlock; +use databend_common_expression::FromData; +use databend_common_expression::TableDataType; +use databend_common_expression::TableField; +use databend_common_expression::TableSchema; +use databend_common_expression::TableSchemaRefExt; +use databend_storages_common_table_meta::meta::TableSnapshotLite; use crate::io::SnapshotsIO; use crate::io::TableMetaLocationGenerator; diff --git a/src/query/storages/fuse/src/table_functions/fuse_snapshots/fuse_snapshot_table.rs b/src/query/storages/fuse/src/table_functions/fuse_snapshots/fuse_snapshot_table.rs index 80a201d4dc16..43462b34ab71 100644 --- a/src/query/storages/fuse/src/table_functions/fuse_snapshots/fuse_snapshot_table.rs +++ b/src/query/storages/fuse/src/table_functions/fuse_snapshots/fuse_snapshot_table.rs @@ -15,21 +15,21 @@ use std::any::Any; use std::sync::Arc; -use common_catalog::catalog_kind::CATALOG_DEFAULT; -use common_catalog::plan::DataSourcePlan; -use common_catalog::plan::PartStatistics; -use common_catalog::plan::Partitions; -use common_catalog::plan::PushDownInfo; -use common_exception::Result; -use common_expression::DataBlock; -use common_meta_app::schema::TableIdent; -use common_meta_app::schema::TableInfo; -use common_meta_app::schema::TableMeta; -use common_pipeline_core::processors::OutputPort; -use common_pipeline_core::processors::ProcessorPtr; -use common_pipeline_core::Pipeline; -use common_pipeline_sources::AsyncSource; -use common_pipeline_sources::AsyncSourcer; +use databend_common_catalog::catalog_kind::CATALOG_DEFAULT; +use databend_common_catalog::plan::DataSourcePlan; +use databend_common_catalog::plan::PartStatistics; +use databend_common_catalog::plan::Partitions; +use databend_common_catalog::plan::PushDownInfo; +use databend_common_exception::Result; +use databend_common_expression::DataBlock; +use databend_common_meta_app::schema::TableIdent; +use databend_common_meta_app::schema::TableInfo; +use databend_common_meta_app::schema::TableMeta; +use databend_common_pipeline_core::processors::OutputPort; +use databend_common_pipeline_core::processors::ProcessorPtr; +use databend_common_pipeline_core::Pipeline; +use databend_common_pipeline_sources::AsyncSource; +use databend_common_pipeline_sources::AsyncSourcer; use super::fuse_snapshot::FuseSnapshot; use crate::sessions::TableContext; diff --git a/src/query/storages/fuse/src/table_functions/fuse_statistics/fuse_statistic.rs b/src/query/storages/fuse/src/table_functions/fuse_statistics/fuse_statistic.rs index 210526e164d0..960e106acd75 100644 --- a/src/query/storages/fuse/src/table_functions/fuse_statistics/fuse_statistic.rs +++ b/src/query/storages/fuse/src/table_functions/fuse_statistics/fuse_statistic.rs @@ -14,16 +14,16 @@ use std::sync::Arc; -use common_exception::Result; -use common_expression::types::StringType; -use common_expression::DataBlock; -use common_expression::FromData; -use common_expression::TableDataType; -use common_expression::TableField; -use common_expression::TableSchema; -use common_expression::TableSchemaRefExt; -use storages_common_table_meta::meta::Statistics; -use storages_common_table_meta::meta::TableSnapshotStatistics; +use databend_common_exception::Result; +use databend_common_expression::types::StringType; +use databend_common_expression::DataBlock; +use databend_common_expression::FromData; +use databend_common_expression::TableDataType; +use databend_common_expression::TableField; +use databend_common_expression::TableSchema; +use databend_common_expression::TableSchemaRefExt; +use databend_storages_common_table_meta::meta::Statistics; +use databend_storages_common_table_meta::meta::TableSnapshotStatistics; use crate::sessions::TableContext; use crate::FuseTable; diff --git a/src/query/storages/fuse/src/table_functions/fuse_statistics/fuse_statistic_table.rs b/src/query/storages/fuse/src/table_functions/fuse_statistics/fuse_statistic_table.rs index 422eb26040e0..e767bea884de 100644 --- a/src/query/storages/fuse/src/table_functions/fuse_statistics/fuse_statistic_table.rs +++ b/src/query/storages/fuse/src/table_functions/fuse_statistics/fuse_statistic_table.rs @@ -15,21 +15,21 @@ use std::any::Any; use std::sync::Arc; -use common_catalog::catalog_kind::CATALOG_DEFAULT; -use common_catalog::plan::DataSourcePlan; -use common_catalog::plan::PartStatistics; -use common_catalog::plan::Partitions; -use common_catalog::plan::PushDownInfo; -use common_exception::Result; -use common_expression::DataBlock; -use common_meta_app::schema::TableIdent; -use common_meta_app::schema::TableInfo; -use common_meta_app::schema::TableMeta; -use common_pipeline_core::processors::OutputPort; -use common_pipeline_core::processors::ProcessorPtr; -use common_pipeline_core::Pipeline; -use common_pipeline_sources::AsyncSource; -use common_pipeline_sources::AsyncSourcer; +use databend_common_catalog::catalog_kind::CATALOG_DEFAULT; +use databend_common_catalog::plan::DataSourcePlan; +use databend_common_catalog::plan::PartStatistics; +use databend_common_catalog::plan::Partitions; +use databend_common_catalog::plan::PushDownInfo; +use databend_common_exception::Result; +use databend_common_expression::DataBlock; +use databend_common_meta_app::schema::TableIdent; +use databend_common_meta_app::schema::TableInfo; +use databend_common_meta_app::schema::TableMeta; +use databend_common_pipeline_core::processors::OutputPort; +use databend_common_pipeline_core::processors::ProcessorPtr; +use databend_common_pipeline_core::Pipeline; +use databend_common_pipeline_sources::AsyncSource; +use databend_common_pipeline_sources::AsyncSourcer; use super::fuse_statistic::FuseStatistic; use crate::sessions::TableContext; diff --git a/src/query/storages/fuse/src/table_functions/mod.rs b/src/query/storages/fuse/src/table_functions/mod.rs index 56e5f6b1ef9d..31cac6c0e2d4 100644 --- a/src/query/storages/fuse/src/table_functions/mod.rs +++ b/src/query/storages/fuse/src/table_functions/mod.rs @@ -23,8 +23,8 @@ mod table_args; pub use clustering_information::ClusteringInformation; pub use clustering_information::ClusteringInformationTable; -use common_catalog::table_args::TableArgs; -use common_catalog::table_function::TableFunction; +use databend_common_catalog::table_args::TableArgs; +use databend_common_catalog::table_function::TableFunction; pub use fuse_blocks::FuseBlock; pub use fuse_blocks::FuseBlockTable; pub use fuse_columns::FuseColumn; diff --git a/src/query/storages/fuse/src/table_functions/table_args.rs b/src/query/storages/fuse/src/table_functions/table_args.rs index 1b8f137c8a5f..47d083636e0b 100644 --- a/src/query/storages/fuse/src/table_functions/table_args.rs +++ b/src/query/storages/fuse/src/table_functions/table_args.rs @@ -14,10 +14,10 @@ use std::cmp::Ordering; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::Expr; -use common_expression::Scalar; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::Expr; +use databend_common_expression::Scalar; use crate::table_functions::TableArgs; diff --git a/src/query/storages/hive/hive/Cargo.toml b/src/query/storages/hive/hive/Cargo.toml index a78ae093ffe0..024fcee228bb 100644 --- a/src/query/storages/hive/hive/Cargo.toml +++ b/src/query/storages/hive/hive/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "common-storages-hive" +name = "databend-common-storages-hive" version = "0.1.0" edition = "2021" authors = ["Databend Authors "] @@ -12,23 +12,23 @@ doctest = false test = false [dependencies] -common-arrow = { path = "../../../../common/arrow" } -common-base = { path = "../../../../common/base" } -common-catalog = { path = "../../../catalog" } -common-exception = { path = "../../../../common/exception" } -common-expression = { path = "../../../expression" } -common-functions = { path = "../../../functions" } -common-meta-app = { path = "../../../../meta/app" } -common-meta-types = { path = "../../../../meta/types" } -common-pipeline-core = { path = "../../../pipeline/core" } -common-pipeline-sources = { path = "../../../pipeline/sources" } -common-sql = { path = "../../../sql" } -common-storage = { path = "../../../../common/storage" } +databend-common-arrow = { path = "../../../../common/arrow" } +databend-common-base = { path = "../../../../common/base" } +databend-common-catalog = { path = "../../../catalog" } +databend-common-exception = { path = "../../../../common/exception" } +databend-common-expression = { path = "../../../expression" } +databend-common-functions = { path = "../../../functions" } +databend-common-meta-app = { path = "../../../../meta/app" } +databend-common-meta-types = { path = "../../../../meta/types" } +databend-common-pipeline-core = { path = "../../../pipeline/core" } +databend-common-pipeline-sources = { path = "../../../pipeline/sources" } +databend-common-sql = { path = "../../../sql" } +databend-common-storage = { path = "../../../../common/storage" } -storages-common-cache = { path = "../../common/cache" } -storages-common-cache-manager = { path = "../../common/cache_manager" } -storages-common-index = { path = "../../common/index" } -storages-common-table-meta = { path = "../../common/table_meta" } +databend-storages-common-cache = { path = "../../common/cache" } +databend-storages-common-cache-manager = { path = "../../common/cache_manager" } +databend-storages-common-index = { path = "../../common/index" } +databend-storages-common-table-meta = { path = "../../common/table_meta" } async-backtrace = { workspace = true } async-recursion = "1.0.0" diff --git a/src/query/storages/hive/hive/src/converters.rs b/src/query/storages/hive/hive/src/converters.rs index cfa20a7f40a3..681202fb9d74 100644 --- a/src/query/storages/hive/hive/src/converters.rs +++ b/src/query/storages/hive/hive/src/converters.rs @@ -15,21 +15,21 @@ use std::sync::Arc; use chrono::Utc; -use common_exception::Result; -use common_expression::types::decimal::DecimalSize; -use common_expression::types::DecimalDataType; -use common_expression::TableDataType; -use common_expression::TableField; -use common_expression::TableSchema; -use common_meta_app::schema::DatabaseIdent; -use common_meta_app::schema::DatabaseInfo; -use common_meta_app::schema::DatabaseMeta; -use common_meta_app::schema::DatabaseNameIdent; -use common_meta_app::schema::TableIdent; -use common_meta_app::schema::TableInfo; -use common_meta_app::schema::TableMeta; -use common_meta_app::storage::StorageParams; -use common_sql::resolve_type_name_by_str; +use databend_common_exception::Result; +use databend_common_expression::types::decimal::DecimalSize; +use databend_common_expression::types::DecimalDataType; +use databend_common_expression::TableDataType; +use databend_common_expression::TableField; +use databend_common_expression::TableSchema; +use databend_common_meta_app::schema::DatabaseIdent; +use databend_common_meta_app::schema::DatabaseInfo; +use databend_common_meta_app::schema::DatabaseMeta; +use databend_common_meta_app::schema::DatabaseNameIdent; +use databend_common_meta_app::schema::TableIdent; +use databend_common_meta_app::schema::TableInfo; +use databend_common_meta_app::schema::TableMeta; +use databend_common_meta_app::storage::StorageParams; +use databend_common_sql::resolve_type_name_by_str; use hive_metastore as hms; use crate::hive_catalog::HIVE_CATALOG; diff --git a/src/query/storages/hive/hive/src/hive_block_filter.rs b/src/query/storages/hive/hive/src/hive_block_filter.rs index 7e1a1f9a44dd..8df4764e8dbb 100644 --- a/src/query/storages/hive/hive/src/hive_block_filter.rs +++ b/src/query/storages/hive/hive/src/hive_block_filter.rs @@ -15,25 +15,25 @@ use std::collections::HashMap; use std::sync::Arc; -use common_arrow::parquet::metadata::RowGroupMetaData; -use common_arrow::parquet::statistics::BinaryStatistics; -use common_arrow::parquet::statistics::BooleanStatistics; -use common_arrow::parquet::statistics::PrimitiveStatistics; -use common_arrow::parquet::statistics::Statistics; -use common_expression::types::number::F32; -use common_expression::types::number::F64; -use common_expression::types::BooleanType; -use common_expression::types::NumberDataType; -use common_expression::types::NumberType; -use common_expression::types::StringType; -use common_expression::types::ValueType; -use common_expression::Scalar; -use common_expression::TableDataType; -use common_expression::TableField; -use common_expression::TableSchema; -use storages_common_index::RangeIndex; -use storages_common_table_meta::meta::ColumnStatistics; -use storages_common_table_meta::meta::StatisticsOfColumns; +use databend_common_arrow::parquet::metadata::RowGroupMetaData; +use databend_common_arrow::parquet::statistics::BinaryStatistics; +use databend_common_arrow::parquet::statistics::BooleanStatistics; +use databend_common_arrow::parquet::statistics::PrimitiveStatistics; +use databend_common_arrow::parquet::statistics::Statistics; +use databend_common_expression::types::number::F32; +use databend_common_expression::types::number::F64; +use databend_common_expression::types::BooleanType; +use databend_common_expression::types::NumberDataType; +use databend_common_expression::types::NumberType; +use databend_common_expression::types::StringType; +use databend_common_expression::types::ValueType; +use databend_common_expression::Scalar; +use databend_common_expression::TableDataType; +use databend_common_expression::TableField; +use databend_common_expression::TableSchema; +use databend_storages_common_index::RangeIndex; +use databend_storages_common_table_meta::meta::ColumnStatistics; +use databend_storages_common_table_meta::meta::StatisticsOfColumns; use crate::hive_parquet_block_reader::HiveBlockReader; use crate::hive_table::HIVE_DEFAULT_PARTITION; diff --git a/src/query/storages/hive/hive/src/hive_blocks.rs b/src/query/storages/hive/hive/src/hive_blocks.rs index 2d690a4b27c1..d21d426bdf86 100644 --- a/src/query/storages/hive/hive/src/hive_blocks.rs +++ b/src/query/storages/hive/hive/src/hive_blocks.rs @@ -14,8 +14,8 @@ use std::sync::Arc; -use common_arrow::parquet::metadata::FileMetaData; -use common_arrow::parquet::metadata::RowGroupMetaData; +use databend_common_arrow::parquet::metadata::FileMetaData; +use databend_common_arrow::parquet::metadata::RowGroupMetaData; use log::debug; use crate::HiveBlockFilter; diff --git a/src/query/storages/hive/hive/src/hive_catalog.rs b/src/query/storages/hive/hive/src/hive_catalog.rs index 4c958cc66707..df3a6f2374c5 100644 --- a/src/query/storages/hive/hive/src/hive_catalog.rs +++ b/src/query/storages/hive/hive/src/hive_catalog.rs @@ -18,77 +18,77 @@ use std::net::ToSocketAddrs; use std::sync::Arc; use std::time::Duration; -use common_catalog::catalog::Catalog; -use common_catalog::catalog::CatalogCreator; -use common_catalog::catalog::StorageDescription; -use common_catalog::database::Database; -use common_catalog::table::Table; -use common_catalog::table_args::TableArgs; -use common_catalog::table_function::TableFunction; -use common_exception::ErrorCode; -use common_exception::Result; -use common_meta_app::schema::CatalogInfo; -use common_meta_app::schema::CatalogOption; -use common_meta_app::schema::CountTablesReply; -use common_meta_app::schema::CountTablesReq; -use common_meta_app::schema::CreateDatabaseReply; -use common_meta_app::schema::CreateDatabaseReq; -use common_meta_app::schema::CreateIndexReply; -use common_meta_app::schema::CreateIndexReq; -use common_meta_app::schema::CreateLockRevReply; -use common_meta_app::schema::CreateLockRevReq; -use common_meta_app::schema::CreateTableReply; -use common_meta_app::schema::CreateTableReq; -use common_meta_app::schema::CreateVirtualColumnReply; -use common_meta_app::schema::CreateVirtualColumnReq; -use common_meta_app::schema::DeleteLockRevReq; -use common_meta_app::schema::DropDatabaseReply; -use common_meta_app::schema::DropDatabaseReq; -use common_meta_app::schema::DropIndexReply; -use common_meta_app::schema::DropIndexReq; -use common_meta_app::schema::DropTableByIdReq; -use common_meta_app::schema::DropTableReply; -use common_meta_app::schema::DropVirtualColumnReply; -use common_meta_app::schema::DropVirtualColumnReq; -use common_meta_app::schema::ExtendLockRevReq; -use common_meta_app::schema::GetIndexReply; -use common_meta_app::schema::GetIndexReq; -use common_meta_app::schema::GetTableCopiedFileReply; -use common_meta_app::schema::GetTableCopiedFileReq; -use common_meta_app::schema::IndexMeta; -use common_meta_app::schema::ListIndexesByIdReq; -use common_meta_app::schema::ListIndexesReq; -use common_meta_app::schema::ListLockRevReq; -use common_meta_app::schema::ListLocksReq; -use common_meta_app::schema::ListVirtualColumnsReq; -use common_meta_app::schema::LockInfo; -use common_meta_app::schema::LockMeta; -use common_meta_app::schema::RenameDatabaseReply; -use common_meta_app::schema::RenameDatabaseReq; -use common_meta_app::schema::RenameTableReply; -use common_meta_app::schema::RenameTableReq; -use common_meta_app::schema::SetTableColumnMaskPolicyReply; -use common_meta_app::schema::SetTableColumnMaskPolicyReq; -use common_meta_app::schema::TableIdent; -use common_meta_app::schema::TableInfo; -use common_meta_app::schema::TableMeta; -use common_meta_app::schema::TruncateTableReply; -use common_meta_app::schema::TruncateTableReq; -use common_meta_app::schema::UndropDatabaseReply; -use common_meta_app::schema::UndropDatabaseReq; -use common_meta_app::schema::UndropTableReply; -use common_meta_app::schema::UndropTableReq; -use common_meta_app::schema::UpdateIndexReply; -use common_meta_app::schema::UpdateIndexReq; -use common_meta_app::schema::UpdateTableMetaReply; -use common_meta_app::schema::UpdateTableMetaReq; -use common_meta_app::schema::UpdateVirtualColumnReply; -use common_meta_app::schema::UpdateVirtualColumnReq; -use common_meta_app::schema::UpsertTableOptionReply; -use common_meta_app::schema::UpsertTableOptionReq; -use common_meta_app::schema::VirtualColumnMeta; -use common_meta_app::storage::StorageParams; -use common_meta_types::*; +use databend_common_catalog::catalog::Catalog; +use databend_common_catalog::catalog::CatalogCreator; +use databend_common_catalog::catalog::StorageDescription; +use databend_common_catalog::database::Database; +use databend_common_catalog::table::Table; +use databend_common_catalog::table_args::TableArgs; +use databend_common_catalog::table_function::TableFunction; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_meta_app::schema::CatalogInfo; +use databend_common_meta_app::schema::CatalogOption; +use databend_common_meta_app::schema::CountTablesReply; +use databend_common_meta_app::schema::CountTablesReq; +use databend_common_meta_app::schema::CreateDatabaseReply; +use databend_common_meta_app::schema::CreateDatabaseReq; +use databend_common_meta_app::schema::CreateIndexReply; +use databend_common_meta_app::schema::CreateIndexReq; +use databend_common_meta_app::schema::CreateLockRevReply; +use databend_common_meta_app::schema::CreateLockRevReq; +use databend_common_meta_app::schema::CreateTableReply; +use databend_common_meta_app::schema::CreateTableReq; +use databend_common_meta_app::schema::CreateVirtualColumnReply; +use databend_common_meta_app::schema::CreateVirtualColumnReq; +use databend_common_meta_app::schema::DeleteLockRevReq; +use databend_common_meta_app::schema::DropDatabaseReply; +use databend_common_meta_app::schema::DropDatabaseReq; +use databend_common_meta_app::schema::DropIndexReply; +use databend_common_meta_app::schema::DropIndexReq; +use databend_common_meta_app::schema::DropTableByIdReq; +use databend_common_meta_app::schema::DropTableReply; +use databend_common_meta_app::schema::DropVirtualColumnReply; +use databend_common_meta_app::schema::DropVirtualColumnReq; +use databend_common_meta_app::schema::ExtendLockRevReq; +use databend_common_meta_app::schema::GetIndexReply; +use databend_common_meta_app::schema::GetIndexReq; +use databend_common_meta_app::schema::GetTableCopiedFileReply; +use databend_common_meta_app::schema::GetTableCopiedFileReq; +use databend_common_meta_app::schema::IndexMeta; +use databend_common_meta_app::schema::ListIndexesByIdReq; +use databend_common_meta_app::schema::ListIndexesReq; +use databend_common_meta_app::schema::ListLockRevReq; +use databend_common_meta_app::schema::ListLocksReq; +use databend_common_meta_app::schema::ListVirtualColumnsReq; +use databend_common_meta_app::schema::LockInfo; +use databend_common_meta_app::schema::LockMeta; +use databend_common_meta_app::schema::RenameDatabaseReply; +use databend_common_meta_app::schema::RenameDatabaseReq; +use databend_common_meta_app::schema::RenameTableReply; +use databend_common_meta_app::schema::RenameTableReq; +use databend_common_meta_app::schema::SetTableColumnMaskPolicyReply; +use databend_common_meta_app::schema::SetTableColumnMaskPolicyReq; +use databend_common_meta_app::schema::TableIdent; +use databend_common_meta_app::schema::TableInfo; +use databend_common_meta_app::schema::TableMeta; +use databend_common_meta_app::schema::TruncateTableReply; +use databend_common_meta_app::schema::TruncateTableReq; +use databend_common_meta_app::schema::UndropDatabaseReply; +use databend_common_meta_app::schema::UndropDatabaseReq; +use databend_common_meta_app::schema::UndropTableReply; +use databend_common_meta_app::schema::UndropTableReq; +use databend_common_meta_app::schema::UpdateIndexReply; +use databend_common_meta_app::schema::UpdateIndexReq; +use databend_common_meta_app::schema::UpdateTableMetaReply; +use databend_common_meta_app::schema::UpdateTableMetaReq; +use databend_common_meta_app::schema::UpdateVirtualColumnReply; +use databend_common_meta_app::schema::UpdateVirtualColumnReq; +use databend_common_meta_app::schema::UpsertTableOptionReply; +use databend_common_meta_app::schema::UpsertTableOptionReq; +use databend_common_meta_app::schema::VirtualColumnMeta; +use databend_common_meta_app::storage::StorageParams; +use databend_common_meta_types::*; use faststr::FastStr; use hive_metastore::Partition; use hive_metastore::ThriftHiveMetastoreClient; diff --git a/src/query/storages/hive/hive/src/hive_database.rs b/src/query/storages/hive/hive/src/hive_database.rs index 2e5a9b0e7b5a..760bd96dc2aa 100644 --- a/src/query/storages/hive/hive/src/hive_database.rs +++ b/src/query/storages/hive/hive/src/hive_database.rs @@ -12,10 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_meta_app::schema::DatabaseInfo; +use databend_common_meta_app::schema::DatabaseInfo; pub const HIVE_DATABASE_ENGINE: &str = "hive"; -use common_catalog::database::Database; +use databend_common_catalog::database::Database; #[derive(Clone)] pub struct HiveDatabase { diff --git a/src/query/storages/hive/hive/src/hive_file_splitter.rs b/src/query/storages/hive/hive/src/hive_file_splitter.rs index e88bbfaa1f06..466d660ec6a8 100644 --- a/src/query/storages/hive/hive/src/hive_file_splitter.rs +++ b/src/query/storages/hive/hive/src/hive_file_splitter.rs @@ -15,7 +15,7 @@ use std::ops::Range; use std::sync::Arc; -use common_catalog::plan::PartInfo; +use databend_common_catalog::plan::PartInfo; use crate::HiveFileInfo; use crate::HivePartInfo; diff --git a/src/query/storages/hive/hive/src/hive_meta_data_reader.rs b/src/query/storages/hive/hive/src/hive_meta_data_reader.rs index 9e82c258b4c7..5d354bda3bb5 100644 --- a/src/query/storages/hive/hive/src/hive_meta_data_reader.rs +++ b/src/query/storages/hive/hive/src/hive_meta_data_reader.rs @@ -12,15 +12,15 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_arrow::parquet::metadata::FileMetaData; -use common_arrow::parquet::read::read_metadata_async; -use common_exception::ErrorCode; -use common_exception::Result; +use databend_common_arrow::parquet::metadata::FileMetaData; +use databend_common_arrow::parquet::read::read_metadata_async; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_storages_common_cache::InMemoryItemCacheReader; +use databend_storages_common_cache::LoadParams; +use databend_storages_common_cache::Loader; +use databend_storages_common_cache_manager::CacheManager; use opendal::Operator; -use storages_common_cache::InMemoryItemCacheReader; -use storages_common_cache::LoadParams; -use storages_common_cache::Loader; -use storages_common_cache_manager::CacheManager; pub struct LoaderWrapper(T); pub type FileMetaDataReader = InMemoryItemCacheReader>; diff --git a/src/query/storages/hive/hive/src/hive_parquet_block_reader.rs b/src/query/storages/hive/hive/src/hive_parquet_block_reader.rs index dbad4baae1ae..990db90b06bc 100644 --- a/src/query/storages/hive/hive/src/hive_parquet_block_reader.rs +++ b/src/query/storages/hive/hive/src/hive_parquet_block_reader.rs @@ -14,27 +14,27 @@ use std::sync::Arc; -use common_arrow::arrow::datatypes::Field; -use common_arrow::arrow::datatypes::Schema; -use common_arrow::arrow::io::parquet::read::column_iter_to_arrays; -use common_arrow::arrow::io::parquet::read::ArrayIter; -use common_arrow::arrow::io::parquet::read::RowGroupDeserializer; -use common_arrow::parquet::metadata::ColumnChunkMetaData; -use common_arrow::parquet::metadata::FileMetaData; -use common_arrow::parquet::metadata::RowGroupMetaData; -use common_arrow::parquet::read::BasicDecompressor; -use common_arrow::parquet::read::PageReader; -use common_base::base::tokio::sync::Semaphore; -use common_catalog::plan::Projection; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::DataBlock; -use common_expression::DataSchema; -use common_expression::DataSchemaRef; -use common_expression::TableField; -use common_expression::TableSchemaRef; +use databend_common_arrow::arrow::datatypes::Field; +use databend_common_arrow::arrow::datatypes::Schema; +use databend_common_arrow::arrow::io::parquet::read::column_iter_to_arrays; +use databend_common_arrow::arrow::io::parquet::read::ArrayIter; +use databend_common_arrow::arrow::io::parquet::read::RowGroupDeserializer; +use databend_common_arrow::parquet::metadata::ColumnChunkMetaData; +use databend_common_arrow::parquet::metadata::FileMetaData; +use databend_common_arrow::parquet::metadata::RowGroupMetaData; +use databend_common_arrow::parquet::read::BasicDecompressor; +use databend_common_arrow::parquet::read::PageReader; +use databend_common_base::base::tokio::sync::Semaphore; +use databend_common_catalog::plan::Projection; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::DataBlock; +use databend_common_expression::DataSchema; +use databend_common_expression::DataSchemaRef; +use databend_common_expression::TableField; +use databend_common_expression::TableSchemaRef; +use databend_storages_common_cache::LoadParams; use opendal::Operator; -use storages_common_cache::LoadParams; use crate::hive_partition::HivePartInfo; use crate::HivePartitionFiller; @@ -208,13 +208,14 @@ impl HiveBlockReader { length: u64, semaphore: Arc, ) -> Result> { - let handler = - common_base::base::tokio::spawn(async_backtrace::location!().frame(async move { + let handler = databend_common_base::base::tokio::spawn(async_backtrace::location!().frame( + async move { let chunk = op.read_with(&path).range(offset..offset + length).await?; let _semaphore_permit = semaphore.acquire().await.unwrap(); Ok(chunk) - })); + }, + )); match handler.await { Ok(Ok(data)) => Ok(data), diff --git a/src/query/storages/hive/hive/src/hive_partition.rs b/src/query/storages/hive/hive/src/hive_partition.rs index 7888396ecda3..e9cd1a597d84 100644 --- a/src/query/storages/hive/hive/src/hive_partition.rs +++ b/src/query/storages/hive/hive/src/hive_partition.rs @@ -20,10 +20,10 @@ use std::hash::Hasher; use std::ops::Range; use std::sync::Arc; -use common_catalog::plan::PartInfo; -use common_catalog::plan::PartInfoPtr; -use common_exception::ErrorCode; -use common_exception::Result; +use databend_common_catalog::plan::PartInfo; +use databend_common_catalog::plan::PartInfoPtr; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; #[derive(serde::Serialize, serde::Deserialize, PartialEq, Eq, Debug, Clone)] pub struct HivePartInfo { diff --git a/src/query/storages/hive/hive/src/hive_partition_filler.rs b/src/query/storages/hive/hive/src/hive_partition_filler.rs index 49351311e79a..41e1c51bfacd 100644 --- a/src/query/storages/hive/hive/src/hive_partition_filler.rs +++ b/src/query/storages/hive/hive/src/hive_partition_filler.rs @@ -12,14 +12,14 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::types::AnyType; -use common_expression::BlockEntry; -use common_expression::DataBlock; -use common_expression::TableField; -use common_expression::TableSchemaRef; -use common_expression::Value; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::types::AnyType; +use databend_common_expression::BlockEntry; +use databend_common_expression::DataBlock; +use databend_common_expression::TableField; +use databend_common_expression::TableSchemaRef; +use databend_common_expression::Value; use crate::hive_partition::HivePartInfo; use crate::utils::str_field_to_scalar; diff --git a/src/query/storages/hive/hive/src/hive_partition_pruner.rs b/src/query/storages/hive/hive/src/hive_partition_pruner.rs index 269a3433bfad..4b75dfbb868a 100644 --- a/src/query/storages/hive/hive/src/hive_partition_pruner.rs +++ b/src/query/storages/hive/hive/src/hive_partition_pruner.rs @@ -16,14 +16,14 @@ use std::collections::HashMap; use std::sync::Arc; use std::vec; -use common_catalog::table_context::TableContext; -use common_exception::Result; -use common_expression::Expr; -use common_expression::TableSchema; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::Result; +use databend_common_expression::Expr; +use databend_common_expression::TableSchema; +use databend_storages_common_index::RangeIndex; +use databend_storages_common_table_meta::meta::ColumnStatistics; +use databend_storages_common_table_meta::meta::StatisticsOfColumns; use log::debug; -use storages_common_index::RangeIndex; -use storages_common_table_meta::meta::ColumnStatistics; -use storages_common_table_meta::meta::StatisticsOfColumns; use crate::utils::str_field_to_scalar; diff --git a/src/query/storages/hive/hive/src/hive_table.rs b/src/query/storages/hive/hive/src/hive_table.rs index 45cc656e7811..0afd842bfb06 100644 --- a/src/query/storages/hive/hive/src/hive_table.rs +++ b/src/query/storages/hive/hive/src/hive_table.rs @@ -17,50 +17,50 @@ use std::sync::Arc; use std::time::Instant; use async_recursion::async_recursion; -use common_base::base::tokio; -use common_base::base::tokio::sync::Semaphore; -use common_catalog::catalog_kind::CATALOG_HIVE; -use common_catalog::plan::DataSourcePlan; -use common_catalog::plan::PartStatistics; -use common_catalog::plan::Partitions; -use common_catalog::plan::PartitionsShuffleKind; -use common_catalog::plan::Projection; -use common_catalog::plan::PushDownInfo; -use common_catalog::table::NavigationPoint; -use common_catalog::table::Table; -use common_catalog::table::TableStatistics; -use common_catalog::table_args::TableArgs; -use common_catalog::table_context::TableContext; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::DataBlock; -use common_expression::DataSchema; -use common_expression::DataSchemaRef; -use common_expression::DataSchemaRefExt; -use common_expression::Expr; -use common_expression::TableSchema; -use common_expression::TableSchemaRef; -use common_functions::BUILTIN_FUNCTIONS; -use common_meta_app::schema::TableInfo; -use common_meta_app::schema::UpdateStreamMetaReq; -use common_meta_app::schema::UpsertTableCopiedFileReq; -use common_pipeline_core::processors::OutputPort; -use common_pipeline_core::processors::ProcessorPtr; -use common_pipeline_core::Pipeline; -use common_pipeline_core::SourcePipeBuilder; -use common_pipeline_sources::SyncSource; -use common_pipeline_sources::SyncSourcer; -use common_storage::init_operator; -use common_storage::DataOperator; +use databend_common_base::base::tokio; +use databend_common_base::base::tokio::sync::Semaphore; +use databend_common_catalog::catalog_kind::CATALOG_HIVE; +use databend_common_catalog::plan::DataSourcePlan; +use databend_common_catalog::plan::PartStatistics; +use databend_common_catalog::plan::Partitions; +use databend_common_catalog::plan::PartitionsShuffleKind; +use databend_common_catalog::plan::Projection; +use databend_common_catalog::plan::PushDownInfo; +use databend_common_catalog::table::NavigationPoint; +use databend_common_catalog::table::Table; +use databend_common_catalog::table::TableStatistics; +use databend_common_catalog::table_args::TableArgs; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::DataBlock; +use databend_common_expression::DataSchema; +use databend_common_expression::DataSchemaRef; +use databend_common_expression::DataSchemaRefExt; +use databend_common_expression::Expr; +use databend_common_expression::TableSchema; +use databend_common_expression::TableSchemaRef; +use databend_common_functions::BUILTIN_FUNCTIONS; +use databend_common_meta_app::schema::TableInfo; +use databend_common_meta_app::schema::UpdateStreamMetaReq; +use databend_common_meta_app::schema::UpsertTableCopiedFileReq; +use databend_common_pipeline_core::processors::OutputPort; +use databend_common_pipeline_core::processors::ProcessorPtr; +use databend_common_pipeline_core::Pipeline; +use databend_common_pipeline_core::SourcePipeBuilder; +use databend_common_pipeline_sources::SyncSource; +use databend_common_pipeline_sources::SyncSourcer; +use databend_common_storage::init_operator; +use databend_common_storage::DataOperator; +use databend_storages_common_index::RangeIndex; +use databend_storages_common_table_meta::meta::SnapshotId; +use databend_storages_common_table_meta::meta::StatisticsOfColumns; use futures::TryStreamExt; use log::info; use log::trace; use opendal::EntryMode; use opendal::Metakey; use opendal::Operator; -use storages_common_index::RangeIndex; -use storages_common_table_meta::meta::SnapshotId; -use storages_common_table_meta::meta::StatisticsOfColumns; use super::hive_catalog::HiveCatalog; use super::hive_partition_pruner::HivePartitionPruner; diff --git a/src/query/storages/hive/hive/src/hive_table_options.rs b/src/query/storages/hive/hive/src/hive_table_options.rs index 610fb82ee47b..09c4c665d54b 100644 --- a/src/query/storages/hive/hive/src/hive_table_options.rs +++ b/src/query/storages/hive/hive/src/hive_table_options.rs @@ -15,8 +15,8 @@ use std::collections::BTreeMap; use std::convert::TryFrom; -use common_exception::ErrorCode; -use common_exception::Result; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; pub const PARTITION_KEYS: &str = "partition_keys"; pub const LOCATION: &str = "location"; diff --git a/src/query/storages/hive/hive/src/hive_table_source.rs b/src/query/storages/hive/hive/src/hive_table_source.rs index 26e77c7ea926..51ebb86d388f 100644 --- a/src/query/storages/hive/hive/src/hive_table_source.rs +++ b/src/query/storages/hive/hive/src/hive_table_source.rs @@ -16,27 +16,27 @@ use std::any::Any; use std::sync::Arc; use std::vec; -use common_base::base::tokio::time::sleep; -use common_base::base::tokio::time::Duration; -use common_base::base::Progress; -use common_base::base::ProgressValues; -use common_catalog::plan::PartInfoPtr; -use common_catalog::table_context::TableContext; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::filter_helper::FilterHelpers; -use common_expression::types::BooleanType; -use common_expression::types::DataType; -use common_expression::DataBlock; -use common_expression::DataSchemaRef; -use common_expression::Evaluator; -use common_expression::Expr; -use common_expression::Value; -use common_functions::BUILTIN_FUNCTIONS; -use common_pipeline_core::processors::Event; -use common_pipeline_core::processors::OutputPort; -use common_pipeline_core::processors::Processor; -use common_pipeline_core::processors::ProcessorPtr; +use databend_common_base::base::tokio::time::sleep; +use databend_common_base::base::tokio::time::Duration; +use databend_common_base::base::Progress; +use databend_common_base::base::ProgressValues; +use databend_common_catalog::plan::PartInfoPtr; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::filter_helper::FilterHelpers; +use databend_common_expression::types::BooleanType; +use databend_common_expression::types::DataType; +use databend_common_expression::DataBlock; +use databend_common_expression::DataSchemaRef; +use databend_common_expression::Evaluator; +use databend_common_expression::Expr; +use databend_common_expression::Value; +use databend_common_functions::BUILTIN_FUNCTIONS; +use databend_common_pipeline_core::processors::Event; +use databend_common_pipeline_core::processors::OutputPort; +use databend_common_pipeline_core::processors::Processor; +use databend_common_pipeline_core::processors::ProcessorPtr; use log::debug; use opendal::Operator; diff --git a/src/query/storages/hive/hive/src/utils.rs b/src/query/storages/hive/hive/src/utils.rs index cc4d0e167f8a..c2b96cf1146e 100644 --- a/src/query/storages/hive/hive/src/utils.rs +++ b/src/query/storages/hive/hive/src/utils.rs @@ -12,12 +12,12 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::types::number::NumberScalar; -use common_expression::types::DataType; -use common_expression::types::NumberDataType; -use common_expression::Scalar; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::types::number::NumberScalar; +use databend_common_expression::types::DataType; +use databend_common_expression::types::NumberDataType; +use databend_common_expression::Scalar; use ordered_float::OrderedFloat; use crate::hive_table::HIVE_DEFAULT_PARTITION; diff --git a/src/query/storages/hive/hive/tests/it/hive_file_splitter.rs b/src/query/storages/hive/hive/tests/it/hive_file_splitter.rs index 98d912a2fe3c..e1363039aaff 100644 --- a/src/query/storages/hive/hive/tests/it/hive_file_splitter.rs +++ b/src/query/storages/hive/hive/tests/it/hive_file_splitter.rs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_storages_hive::HiveFileSplitter; +use databend_common_storages_hive::HiveFileSplitter; #[test] fn test_splitter() { diff --git a/src/query/storages/iceberg/Cargo.toml b/src/query/storages/iceberg/Cargo.toml index 6bcdfbdf1098..00954cd51afb 100644 --- a/src/query/storages/iceberg/Cargo.toml +++ b/src/query/storages/iceberg/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "common-storages-iceberg" +name = "databend-common-storages-iceberg" version = { workspace = true } edition = "2021" authors = ["Databend Authors "] @@ -9,19 +9,19 @@ publish = false # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -common-arrow = { path = "../../../common/arrow" } -common-base = { path = "../../../common/base" } -common-catalog = { path = "../../catalog" } -common-exception = { path = "../../../common/exception" } -common-expression = { path = "../../expression" } -common-functions = { path = "../../functions" } -common-meta-app = { path = "../../../meta/app" } -common-meta-types = { path = "../../../meta/types" } -common-pipeline-core = { path = "../../pipeline/core" } -common-storage = { path = "../../../common/storage" } -common-storages-parquet = { path = "../parquet" } -storages-common-pruner = { path = "../common/pruner" } -storages-common-table-meta = { path = "../common/table_meta" } +databend-common-arrow = { path = "../../../common/arrow" } +databend-common-base = { path = "../../../common/base" } +databend-common-catalog = { path = "../../catalog" } +databend-common-exception = { path = "../../../common/exception" } +databend-common-expression = { path = "../../expression" } +databend-common-functions = { path = "../../functions" } +databend-common-meta-app = { path = "../../../meta/app" } +databend-common-meta-types = { path = "../../../meta/types" } +databend-common-pipeline-core = { path = "../../pipeline/core" } +databend-common-storage = { path = "../../../common/storage" } +databend-common-storages-parquet = { path = "../parquet" } +databend-storages-common-pruner = { path = "../common/pruner" } +databend-storages-common-table-meta = { path = "../common/table_meta" } arrow-schema = { workspace = true } async-backtrace = { workspace = true } diff --git a/src/query/storages/iceberg/src/catalog.rs b/src/query/storages/iceberg/src/catalog.rs index fedadf5ae376..b1ac549eb3a4 100644 --- a/src/query/storages/iceberg/src/catalog.rs +++ b/src/query/storages/iceberg/src/catalog.rs @@ -16,77 +16,77 @@ use std::any::Any; use std::sync::Arc; use async_trait::async_trait; -use common_catalog::catalog::Catalog; -use common_catalog::catalog::CatalogCreator; -use common_catalog::catalog::StorageDescription; -use common_catalog::database::Database; -use common_catalog::table::Table; -use common_catalog::table_args::TableArgs; -use common_catalog::table_function::TableFunction; -use common_exception::ErrorCode; -use common_exception::Result; -use common_meta_app::schema::CatalogInfo; -use common_meta_app::schema::CatalogOption; -use common_meta_app::schema::CountTablesReply; -use common_meta_app::schema::CountTablesReq; -use common_meta_app::schema::CreateDatabaseReply; -use common_meta_app::schema::CreateDatabaseReq; -use common_meta_app::schema::CreateIndexReply; -use common_meta_app::schema::CreateIndexReq; -use common_meta_app::schema::CreateLockRevReply; -use common_meta_app::schema::CreateLockRevReq; -use common_meta_app::schema::CreateTableReply; -use common_meta_app::schema::CreateTableReq; -use common_meta_app::schema::CreateVirtualColumnReply; -use common_meta_app::schema::CreateVirtualColumnReq; -use common_meta_app::schema::DeleteLockRevReq; -use common_meta_app::schema::DropDatabaseReply; -use common_meta_app::schema::DropDatabaseReq; -use common_meta_app::schema::DropIndexReply; -use common_meta_app::schema::DropIndexReq; -use common_meta_app::schema::DropTableByIdReq; -use common_meta_app::schema::DropTableReply; -use common_meta_app::schema::DropVirtualColumnReply; -use common_meta_app::schema::DropVirtualColumnReq; -use common_meta_app::schema::ExtendLockRevReq; -use common_meta_app::schema::GetIndexReply; -use common_meta_app::schema::GetIndexReq; -use common_meta_app::schema::GetTableCopiedFileReply; -use common_meta_app::schema::GetTableCopiedFileReq; -use common_meta_app::schema::IndexMeta; -use common_meta_app::schema::ListIndexesByIdReq; -use common_meta_app::schema::ListIndexesReq; -use common_meta_app::schema::ListLockRevReq; -use common_meta_app::schema::ListLocksReq; -use common_meta_app::schema::ListVirtualColumnsReq; -use common_meta_app::schema::LockInfo; -use common_meta_app::schema::LockMeta; -use common_meta_app::schema::RenameDatabaseReply; -use common_meta_app::schema::RenameDatabaseReq; -use common_meta_app::schema::RenameTableReply; -use common_meta_app::schema::RenameTableReq; -use common_meta_app::schema::SetTableColumnMaskPolicyReply; -use common_meta_app::schema::SetTableColumnMaskPolicyReq; -use common_meta_app::schema::TableIdent; -use common_meta_app::schema::TableInfo; -use common_meta_app::schema::TableMeta; -use common_meta_app::schema::TruncateTableReply; -use common_meta_app::schema::TruncateTableReq; -use common_meta_app::schema::UndropDatabaseReply; -use common_meta_app::schema::UndropDatabaseReq; -use common_meta_app::schema::UndropTableReply; -use common_meta_app::schema::UndropTableReq; -use common_meta_app::schema::UpdateIndexReply; -use common_meta_app::schema::UpdateIndexReq; -use common_meta_app::schema::UpdateTableMetaReply; -use common_meta_app::schema::UpdateTableMetaReq; -use common_meta_app::schema::UpdateVirtualColumnReply; -use common_meta_app::schema::UpdateVirtualColumnReq; -use common_meta_app::schema::UpsertTableOptionReply; -use common_meta_app::schema::UpsertTableOptionReq; -use common_meta_app::schema::VirtualColumnMeta; -use common_meta_types::MetaId; -use common_storage::DataOperator; +use databend_common_catalog::catalog::Catalog; +use databend_common_catalog::catalog::CatalogCreator; +use databend_common_catalog::catalog::StorageDescription; +use databend_common_catalog::database::Database; +use databend_common_catalog::table::Table; +use databend_common_catalog::table_args::TableArgs; +use databend_common_catalog::table_function::TableFunction; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_meta_app::schema::CatalogInfo; +use databend_common_meta_app::schema::CatalogOption; +use databend_common_meta_app::schema::CountTablesReply; +use databend_common_meta_app::schema::CountTablesReq; +use databend_common_meta_app::schema::CreateDatabaseReply; +use databend_common_meta_app::schema::CreateDatabaseReq; +use databend_common_meta_app::schema::CreateIndexReply; +use databend_common_meta_app::schema::CreateIndexReq; +use databend_common_meta_app::schema::CreateLockRevReply; +use databend_common_meta_app::schema::CreateLockRevReq; +use databend_common_meta_app::schema::CreateTableReply; +use databend_common_meta_app::schema::CreateTableReq; +use databend_common_meta_app::schema::CreateVirtualColumnReply; +use databend_common_meta_app::schema::CreateVirtualColumnReq; +use databend_common_meta_app::schema::DeleteLockRevReq; +use databend_common_meta_app::schema::DropDatabaseReply; +use databend_common_meta_app::schema::DropDatabaseReq; +use databend_common_meta_app::schema::DropIndexReply; +use databend_common_meta_app::schema::DropIndexReq; +use databend_common_meta_app::schema::DropTableByIdReq; +use databend_common_meta_app::schema::DropTableReply; +use databend_common_meta_app::schema::DropVirtualColumnReply; +use databend_common_meta_app::schema::DropVirtualColumnReq; +use databend_common_meta_app::schema::ExtendLockRevReq; +use databend_common_meta_app::schema::GetIndexReply; +use databend_common_meta_app::schema::GetIndexReq; +use databend_common_meta_app::schema::GetTableCopiedFileReply; +use databend_common_meta_app::schema::GetTableCopiedFileReq; +use databend_common_meta_app::schema::IndexMeta; +use databend_common_meta_app::schema::ListIndexesByIdReq; +use databend_common_meta_app::schema::ListIndexesReq; +use databend_common_meta_app::schema::ListLockRevReq; +use databend_common_meta_app::schema::ListLocksReq; +use databend_common_meta_app::schema::ListVirtualColumnsReq; +use databend_common_meta_app::schema::LockInfo; +use databend_common_meta_app::schema::LockMeta; +use databend_common_meta_app::schema::RenameDatabaseReply; +use databend_common_meta_app::schema::RenameDatabaseReq; +use databend_common_meta_app::schema::RenameTableReply; +use databend_common_meta_app::schema::RenameTableReq; +use databend_common_meta_app::schema::SetTableColumnMaskPolicyReply; +use databend_common_meta_app::schema::SetTableColumnMaskPolicyReq; +use databend_common_meta_app::schema::TableIdent; +use databend_common_meta_app::schema::TableInfo; +use databend_common_meta_app::schema::TableMeta; +use databend_common_meta_app::schema::TruncateTableReply; +use databend_common_meta_app::schema::TruncateTableReq; +use databend_common_meta_app::schema::UndropDatabaseReply; +use databend_common_meta_app::schema::UndropDatabaseReq; +use databend_common_meta_app::schema::UndropTableReply; +use databend_common_meta_app::schema::UndropTableReq; +use databend_common_meta_app::schema::UpdateIndexReply; +use databend_common_meta_app::schema::UpdateIndexReq; +use databend_common_meta_app::schema::UpdateTableMetaReply; +use databend_common_meta_app::schema::UpdateTableMetaReq; +use databend_common_meta_app::schema::UpdateVirtualColumnReply; +use databend_common_meta_app::schema::UpdateVirtualColumnReq; +use databend_common_meta_app::schema::UpsertTableOptionReply; +use databend_common_meta_app::schema::UpsertTableOptionReq; +use databend_common_meta_app::schema::VirtualColumnMeta; +use databend_common_meta_types::MetaId; +use databend_common_storage::DataOperator; use futures::TryStreamExt; use opendal::Metakey; diff --git a/src/query/storages/iceberg/src/database.rs b/src/query/storages/iceberg/src/database.rs index f5c1fc726730..a782931bf611 100644 --- a/src/query/storages/iceberg/src/database.rs +++ b/src/query/storages/iceberg/src/database.rs @@ -17,15 +17,15 @@ use std::sync::Arc; use async_trait::async_trait; -use common_catalog::database::Database; -use common_catalog::table::Table; -use common_exception::ErrorCode; -use common_exception::Result; -use common_meta_app::schema::DatabaseIdent; -use common_meta_app::schema::DatabaseInfo; -use common_meta_app::schema::DatabaseMeta; -use common_meta_app::schema::DatabaseNameIdent; -use common_storage::DataOperator; +use databend_common_catalog::database::Database; +use databend_common_catalog::table::Table; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_meta_app::schema::DatabaseIdent; +use databend_common_meta_app::schema::DatabaseInfo; +use databend_common_meta_app::schema::DatabaseMeta; +use databend_common_meta_app::schema::DatabaseNameIdent; +use databend_common_storage::DataOperator; use futures::StreamExt; use opendal::EntryMode; use opendal::Metakey; diff --git a/src/query/storages/iceberg/src/partition.rs b/src/query/storages/iceberg/src/partition.rs index 4824bac3be6c..4a4076260374 100644 --- a/src/query/storages/iceberg/src/partition.rs +++ b/src/query/storages/iceberg/src/partition.rs @@ -14,11 +14,11 @@ use std::any::Any; -use common_catalog::plan::PartInfo; -use common_catalog::plan::PartInfoPtr; -use common_exception::ErrorCode; -use common_exception::Result; -use common_storages_parquet::ParquetPart; +use databend_common_catalog::plan::PartInfo; +use databend_common_catalog::plan::PartInfoPtr; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_storages_parquet::ParquetPart; /// # TODO /// diff --git a/src/query/storages/iceberg/src/stats.rs b/src/query/storages/iceberg/src/stats.rs index dcbf2bc84194..4a53e2ba88c7 100644 --- a/src/query/storages/iceberg/src/stats.rs +++ b/src/query/storages/iceberg/src/stats.rs @@ -14,18 +14,18 @@ use std::collections::HashMap; -use common_expression::types::Number; -use common_expression::types::NumberDataType; -use common_expression::types::F32; -use common_expression::types::F64; -use common_expression::with_integer_mapped_type; -use common_expression::Scalar; -use common_expression::TableDataType; -use common_expression::TableField; -use common_expression::TableSchema; +use databend_common_expression::types::Number; +use databend_common_expression::types::NumberDataType; +use databend_common_expression::types::F32; +use databend_common_expression::types::F64; +use databend_common_expression::with_integer_mapped_type; +use databend_common_expression::Scalar; +use databend_common_expression::TableDataType; +use databend_common_expression::TableField; +use databend_common_expression::TableSchema; +use databend_storages_common_table_meta::meta::ColumnStatistics; +use databend_storages_common_table_meta::meta::StatisticsOfColumns; use icelake::types::DataFile; -use storages_common_table_meta::meta::ColumnStatistics; -use storages_common_table_meta::meta::StatisticsOfColumns; /// Try to convert statistics in [`DataFile`] to [`StatisticsOfColumns`]. pub fn get_stats_of_data_file(schema: &TableSchema, df: &DataFile) -> Option { diff --git a/src/query/storages/iceberg/src/table.rs b/src/query/storages/iceberg/src/table.rs index 9227c43ea87a..c27d64852e46 100644 --- a/src/query/storages/iceberg/src/table.rs +++ b/src/query/storages/iceberg/src/table.rs @@ -18,38 +18,38 @@ use std::sync::Arc; use arrow_schema::Schema as ArrowSchema; use async_trait::async_trait; use chrono::Utc; -use common_arrow::arrow::datatypes::Field as Arrow2Field; -use common_arrow::arrow::datatypes::Schema as Arrow2Schema; -use common_catalog::catalog::StorageDescription; -use common_catalog::plan::DataSourcePlan; -use common_catalog::plan::ParquetReadOptions; -use common_catalog::plan::PartInfo; -use common_catalog::plan::PartStatistics; -use common_catalog::plan::Partitions; -use common_catalog::plan::PartitionsShuffleKind; -use common_catalog::plan::PushDownInfo; -use common_catalog::table::Table; -use common_catalog::table_args::TableArgs; -use common_catalog::table_context::TableContext; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::DataSchema; -use common_expression::TableSchema; -use common_functions::BUILTIN_FUNCTIONS; -use common_meta_app::schema::TableIdent; -use common_meta_app::schema::TableInfo; -use common_meta_app::schema::TableMeta; -use common_meta_app::storage::StorageParams; -use common_pipeline_core::Pipeline; -use common_storage::init_operator; -use common_storage::DataOperator; -use common_storages_parquet::ParquetFilesPart; -use common_storages_parquet::ParquetPart; -use common_storages_parquet::ParquetRSPruner; -use common_storages_parquet::ParquetRSReaderBuilder; +use databend_common_arrow::arrow::datatypes::Field as Arrow2Field; +use databend_common_arrow::arrow::datatypes::Schema as Arrow2Schema; +use databend_common_catalog::catalog::StorageDescription; +use databend_common_catalog::plan::DataSourcePlan; +use databend_common_catalog::plan::ParquetReadOptions; +use databend_common_catalog::plan::PartInfo; +use databend_common_catalog::plan::PartStatistics; +use databend_common_catalog::plan::Partitions; +use databend_common_catalog::plan::PartitionsShuffleKind; +use databend_common_catalog::plan::PushDownInfo; +use databend_common_catalog::table::Table; +use databend_common_catalog::table_args::TableArgs; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::DataSchema; +use databend_common_expression::TableSchema; +use databend_common_functions::BUILTIN_FUNCTIONS; +use databend_common_meta_app::schema::TableIdent; +use databend_common_meta_app::schema::TableInfo; +use databend_common_meta_app::schema::TableMeta; +use databend_common_meta_app::storage::StorageParams; +use databend_common_pipeline_core::Pipeline; +use databend_common_storage::init_operator; +use databend_common_storage::DataOperator; +use databend_common_storages_parquet::ParquetFilesPart; +use databend_common_storages_parquet::ParquetPart; +use databend_common_storages_parquet::ParquetRSPruner; +use databend_common_storages_parquet::ParquetRSReaderBuilder; +use databend_storages_common_pruner::RangePrunerCreator; use icelake::catalog::Catalog; use opendal::Operator; -use storages_common_pruner::RangePrunerCreator; use tokio::sync::OnceCell; use crate::partition::IcebergPartInfo; diff --git a/src/query/storages/iceberg/src/table_source.rs b/src/query/storages/iceberg/src/table_source.rs index c05baef56519..0c410ff68f41 100644 --- a/src/query/storages/iceberg/src/table_source.rs +++ b/src/query/storages/iceberg/src/table_source.rs @@ -15,20 +15,20 @@ use std::any::Any; use std::sync::Arc; -use common_base::base::Progress; -use common_base::base::ProgressValues; -use common_catalog::table_context::TableContext; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::DataBlock; -use common_expression::DataSchema; -use common_expression::DataSchemaRef; -use common_pipeline_core::processors::Event; -use common_pipeline_core::processors::OutputPort; -use common_pipeline_core::processors::Processor; -use common_pipeline_core::processors::ProcessorPtr; -use common_storages_parquet::ParquetPart; -use common_storages_parquet::ParquetRSFullReader; +use databend_common_base::base::Progress; +use databend_common_base::base::ProgressValues; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::DataBlock; +use databend_common_expression::DataSchema; +use databend_common_expression::DataSchemaRef; +use databend_common_pipeline_core::processors::Event; +use databend_common_pipeline_core::processors::OutputPort; +use databend_common_pipeline_core::processors::Processor; +use databend_common_pipeline_core::processors::ProcessorPtr; +use databend_common_storages_parquet::ParquetPart; +use databend_common_storages_parquet::ParquetRSFullReader; use opendal::Reader; use parquet::arrow::async_reader::ParquetRecordBatchStream; diff --git a/src/query/storages/information_schema/Cargo.toml b/src/query/storages/information_schema/Cargo.toml index 4a77fd53f906..446b7ae28de7 100644 --- a/src/query/storages/information_schema/Cargo.toml +++ b/src/query/storages/information_schema/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "common-storages-information-schema" +name = "databend-common-storages-information-schema" version = { workspace = true } authors = { workspace = true } license = { workspace = true } @@ -12,10 +12,10 @@ doctest = false test = false [dependencies] -common-ast = { path = "../../../query/ast" } -common-catalog = { path = "../../catalog" } -common-meta-app = { path = "../../../meta/app" } -common-storages-view = { path = "../view" } +databend-common-ast = { path = "../../../query/ast" } +databend-common-catalog = { path = "../../catalog" } +databend-common-meta-app = { path = "../../../meta/app" } +databend-common-storages-view = { path = "../view" } [build-dependencies] -common-building = { path = "../../../common/building" } +databend-common-building = { path = "../../../common/building" } diff --git a/src/query/storages/information_schema/src/columns_table.rs b/src/query/storages/information_schema/src/columns_table.rs index 3ab32877d727..1d58aa230ec5 100644 --- a/src/query/storages/information_schema/src/columns_table.rs +++ b/src/query/storages/information_schema/src/columns_table.rs @@ -15,12 +15,12 @@ use std::collections::BTreeMap; use std::sync::Arc; -use common_catalog::table::Table; -use common_meta_app::schema::TableIdent; -use common_meta_app::schema::TableInfo; -use common_meta_app::schema::TableMeta; -use common_storages_view::view_table::ViewTable; -use common_storages_view::view_table::QUERY; +use databend_common_catalog::table::Table; +use databend_common_meta_app::schema::TableIdent; +use databend_common_meta_app::schema::TableInfo; +use databend_common_meta_app::schema::TableMeta; +use databend_common_storages_view::view_table::ViewTable; +use databend_common_storages_view::view_table::QUERY; pub struct ColumnsTable {} diff --git a/src/query/storages/information_schema/src/key_column_usage_table.rs b/src/query/storages/information_schema/src/key_column_usage_table.rs index 8a9ca7d6fd9b..ff0750cafec0 100644 --- a/src/query/storages/information_schema/src/key_column_usage_table.rs +++ b/src/query/storages/information_schema/src/key_column_usage_table.rs @@ -15,12 +15,12 @@ use std::collections::BTreeMap; use std::sync::Arc; -use common_catalog::table::Table; -use common_meta_app::schema::TableIdent; -use common_meta_app::schema::TableInfo; -use common_meta_app::schema::TableMeta; -use common_storages_view::view_table::ViewTable; -use common_storages_view::view_table::QUERY; +use databend_common_catalog::table::Table; +use databend_common_meta_app::schema::TableIdent; +use databend_common_meta_app::schema::TableInfo; +use databend_common_meta_app::schema::TableMeta; +use databend_common_storages_view::view_table::ViewTable; +use databend_common_storages_view::view_table::QUERY; pub struct KeyColumnUsageTable {} diff --git a/src/query/storages/information_schema/src/keywords_table.rs b/src/query/storages/information_schema/src/keywords_table.rs index c675bbc1b8b3..b28d97396c0b 100644 --- a/src/query/storages/information_schema/src/keywords_table.rs +++ b/src/query/storages/information_schema/src/keywords_table.rs @@ -15,13 +15,13 @@ use std::collections::BTreeMap; use std::sync::Arc; -use common_ast::parser::token::all_reserved_keywords; -use common_catalog::table::Table; -use common_meta_app::schema::TableIdent; -use common_meta_app::schema::TableInfo; -use common_meta_app::schema::TableMeta; -use common_storages_view::view_table::ViewTable; -use common_storages_view::view_table::QUERY; +use databend_common_ast::parser::token::all_reserved_keywords; +use databend_common_catalog::table::Table; +use databend_common_meta_app::schema::TableIdent; +use databend_common_meta_app::schema::TableInfo; +use databend_common_meta_app::schema::TableMeta; +use databend_common_storages_view::view_table::ViewTable; +use databend_common_storages_view::view_table::QUERY; pub struct KeywordsTable {} diff --git a/src/query/storages/information_schema/src/schemata_table.rs b/src/query/storages/information_schema/src/schemata_table.rs index ecf7cb006944..f3fa577c3fca 100644 --- a/src/query/storages/information_schema/src/schemata_table.rs +++ b/src/query/storages/information_schema/src/schemata_table.rs @@ -15,12 +15,12 @@ use std::collections::BTreeMap; use std::sync::Arc; -use common_catalog::table::Table; -use common_meta_app::schema::TableIdent; -use common_meta_app::schema::TableInfo; -use common_meta_app::schema::TableMeta; -use common_storages_view::view_table::ViewTable; -use common_storages_view::view_table::QUERY; +use databend_common_catalog::table::Table; +use databend_common_meta_app::schema::TableIdent; +use databend_common_meta_app::schema::TableInfo; +use databend_common_meta_app::schema::TableMeta; +use databend_common_storages_view::view_table::ViewTable; +use databend_common_storages_view::view_table::QUERY; pub struct SchemataTable {} diff --git a/src/query/storages/information_schema/src/statistics_table.rs b/src/query/storages/information_schema/src/statistics_table.rs index 26f4b2db8208..628a3b5c8e5f 100644 --- a/src/query/storages/information_schema/src/statistics_table.rs +++ b/src/query/storages/information_schema/src/statistics_table.rs @@ -15,12 +15,12 @@ use std::collections::BTreeMap; use std::sync::Arc; -use common_catalog::table::Table; -use common_meta_app::schema::TableIdent; -use common_meta_app::schema::TableInfo; -use common_meta_app::schema::TableMeta; -use common_storages_view::view_table::ViewTable; -use common_storages_view::view_table::QUERY; +use databend_common_catalog::table::Table; +use databend_common_meta_app::schema::TableIdent; +use databend_common_meta_app::schema::TableInfo; +use databend_common_meta_app::schema::TableMeta; +use databend_common_storages_view::view_table::ViewTable; +use databend_common_storages_view::view_table::QUERY; pub struct StatisticsTable {} diff --git a/src/query/storages/information_schema/src/tables_table.rs b/src/query/storages/information_schema/src/tables_table.rs index f8d4fe64bad4..96c95f6dec50 100644 --- a/src/query/storages/information_schema/src/tables_table.rs +++ b/src/query/storages/information_schema/src/tables_table.rs @@ -15,12 +15,12 @@ use std::collections::BTreeMap; use std::sync::Arc; -use common_catalog::table::Table; -use common_meta_app::schema::TableIdent; -use common_meta_app::schema::TableInfo; -use common_meta_app::schema::TableMeta; -use common_storages_view::view_table::ViewTable; -use common_storages_view::view_table::QUERY; +use databend_common_catalog::table::Table; +use databend_common_meta_app::schema::TableIdent; +use databend_common_meta_app::schema::TableInfo; +use databend_common_meta_app::schema::TableMeta; +use databend_common_storages_view::view_table::ViewTable; +use databend_common_storages_view::view_table::QUERY; pub struct TablesTable {} diff --git a/src/query/storages/information_schema/src/views_table.rs b/src/query/storages/information_schema/src/views_table.rs index 33329cbf2869..78ff127d24cb 100644 --- a/src/query/storages/information_schema/src/views_table.rs +++ b/src/query/storages/information_schema/src/views_table.rs @@ -15,12 +15,12 @@ use std::collections::BTreeMap; use std::sync::Arc; -use common_catalog::table::Table; -use common_meta_app::schema::TableIdent; -use common_meta_app::schema::TableInfo; -use common_meta_app::schema::TableMeta; -use common_storages_view::view_table::ViewTable; -use common_storages_view::view_table::QUERY; +use databend_common_catalog::table::Table; +use databend_common_meta_app::schema::TableIdent; +use databend_common_meta_app::schema::TableInfo; +use databend_common_meta_app::schema::TableMeta; +use databend_common_storages_view::view_table::ViewTable; +use databend_common_storages_view::view_table::QUERY; pub struct ViewsTable {} diff --git a/src/query/storages/memory/Cargo.toml b/src/query/storages/memory/Cargo.toml index 9f930ed10028..62384b7585f2 100644 --- a/src/query/storages/memory/Cargo.toml +++ b/src/query/storages/memory/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "common-storages-memory" +name = "databend-common-storages-memory" version = { workspace = true } authors = { workspace = true } license = { workspace = true } @@ -12,16 +12,16 @@ doctest = false test = false [dependencies] -common-base = { path = "../../../common/base" } -common-catalog = { path = "../../catalog" } -common-exception = { path = "../../../common/exception" } -common-expression = { path = "../../expression" } -common-meta-app = { path = "../../../meta/app" } -common-pipeline-core = { path = "../../pipeline/core" } -common-pipeline-sinks = { path = "../../pipeline/sinks" } -common-pipeline-sources = { path = "../../pipeline/sources" } -common-storage = { path = "../../../common/storage" } -storages-common-table-meta = { path = "../common/table_meta" } +databend-common-base = { path = "../../../common/base" } +databend-common-catalog = { path = "../../catalog" } +databend-common-exception = { path = "../../../common/exception" } +databend-common-expression = { path = "../../expression" } +databend-common-meta-app = { path = "../../../meta/app" } +databend-common-pipeline-core = { path = "../../pipeline/core" } +databend-common-pipeline-sinks = { path = "../../pipeline/sinks" } +databend-common-pipeline-sources = { path = "../../pipeline/sources" } +databend-common-storage = { path = "../../../common/storage" } +databend-storages-common-table-meta = { path = "../common/table_meta" } async-backtrace = { workspace = true } async-trait = { workspace = true } @@ -30,4 +30,4 @@ serde = { workspace = true } typetag = { workspace = true } [build-dependencies] -common-building = { path = "../../../common/building" } +databend-common-building = { path = "../../../common/building" } diff --git a/src/query/storages/memory/src/memory_part.rs b/src/query/storages/memory/src/memory_part.rs index e7db7c04e48d..bd52eb3469e6 100644 --- a/src/query/storages/memory/src/memory_part.rs +++ b/src/query/storages/memory/src/memory_part.rs @@ -15,7 +15,7 @@ use std::any::Any; use std::sync::Arc; -use common_catalog::plan::PartInfo; +use databend_common_catalog::plan::PartInfo; #[derive(serde::Serialize, serde::Deserialize, PartialEq, Eq)] pub struct MemoryPartInfo { diff --git a/src/query/storages/memory/src/memory_table.rs b/src/query/storages/memory/src/memory_table.rs index 6ba9ea29d773..86a93ccbd124 100644 --- a/src/query/storages/memory/src/memory_table.rs +++ b/src/query/storages/memory/src/memory_table.rs @@ -19,40 +19,40 @@ use std::collections::VecDeque; use std::sync::Arc; use std::sync::LazyLock; -use common_base::base::Progress; -use common_base::base::ProgressValues; -use common_catalog::catalog::StorageDescription; -use common_catalog::plan::DataSourcePlan; -use common_catalog::plan::PartStatistics; -use common_catalog::plan::Partitions; -use common_catalog::plan::PartitionsShuffleKind; -use common_catalog::plan::Projection; -use common_catalog::plan::PushDownInfo; -use common_catalog::table::AppendMode; -use common_catalog::table::Table; -use common_catalog::table_context::TableContext; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::types::DataType; -use common_expression::BlockEntry; -use common_expression::DataBlock; -use common_expression::Value; -use common_meta_app::schema::TableInfo; -use common_meta_app::schema::UpdateStreamMetaReq; -use common_meta_app::schema::UpsertTableCopiedFileReq; -use common_pipeline_core::processors::InputPort; -use common_pipeline_core::processors::OutputPort; -use common_pipeline_core::processors::Processor; -use common_pipeline_core::processors::ProcessorPtr; -use common_pipeline_core::Pipeline; -use common_pipeline_sinks::Sink; -use common_pipeline_sinks::Sinker; -use common_pipeline_sources::SyncSource; -use common_pipeline_sources::SyncSourcer; -use common_storage::StorageMetrics; +use databend_common_base::base::Progress; +use databend_common_base::base::ProgressValues; +use databend_common_catalog::catalog::StorageDescription; +use databend_common_catalog::plan::DataSourcePlan; +use databend_common_catalog::plan::PartStatistics; +use databend_common_catalog::plan::Partitions; +use databend_common_catalog::plan::PartitionsShuffleKind; +use databend_common_catalog::plan::Projection; +use databend_common_catalog::plan::PushDownInfo; +use databend_common_catalog::table::AppendMode; +use databend_common_catalog::table::Table; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::types::DataType; +use databend_common_expression::BlockEntry; +use databend_common_expression::DataBlock; +use databend_common_expression::Value; +use databend_common_meta_app::schema::TableInfo; +use databend_common_meta_app::schema::UpdateStreamMetaReq; +use databend_common_meta_app::schema::UpsertTableCopiedFileReq; +use databend_common_pipeline_core::processors::InputPort; +use databend_common_pipeline_core::processors::OutputPort; +use databend_common_pipeline_core::processors::Processor; +use databend_common_pipeline_core::processors::ProcessorPtr; +use databend_common_pipeline_core::Pipeline; +use databend_common_pipeline_sinks::Sink; +use databend_common_pipeline_sinks::Sinker; +use databend_common_pipeline_sources::SyncSource; +use databend_common_pipeline_sources::SyncSourcer; +use databend_common_storage::StorageMetrics; +use databend_storages_common_table_meta::meta::SnapshotId; use parking_lot::Mutex; use parking_lot::RwLock; -use storages_common_table_meta::meta::SnapshotId; use crate::memory_part::MemoryPartInfo; diff --git a/src/query/storages/null/Cargo.toml b/src/query/storages/null/Cargo.toml index 84013a39ff53..5ebf57c402bd 100644 --- a/src/query/storages/null/Cargo.toml +++ b/src/query/storages/null/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "common-storages-null" +name = "databend-common-storages-null" version = { workspace = true } authors = { workspace = true } license = { workspace = true } @@ -12,16 +12,16 @@ doctest = false test = false [dependencies] -common-catalog = { path = "../../catalog" } -common-exception = { path = "../../../common/exception" } -common-expression = { path = "../../expression" } -common-meta-app = { path = "../../../meta/app" } -common-pipeline-core = { path = "../../pipeline/core" } -common-pipeline-sinks = { path = "../../pipeline/sinks" } -common-pipeline-sources = { path = "../../pipeline/sources" } +databend-common-catalog = { path = "../../catalog" } +databend-common-exception = { path = "../../../common/exception" } +databend-common-expression = { path = "../../expression" } +databend-common-meta-app = { path = "../../../meta/app" } +databend-common-pipeline-core = { path = "../../pipeline/core" } +databend-common-pipeline-sinks = { path = "../../pipeline/sinks" } +databend-common-pipeline-sources = { path = "../../pipeline/sources" } async-backtrace = { workspace = true } async-trait = { workspace = true } [build-dependencies] -common-building = { path = "../../../common/building" } +databend-common-building = { path = "../../../common/building" } diff --git a/src/query/storages/null/src/null_table.rs b/src/query/storages/null/src/null_table.rs index 11743008ddcb..28ce9071d1e3 100644 --- a/src/query/storages/null/src/null_table.rs +++ b/src/query/storages/null/src/null_table.rs @@ -15,24 +15,24 @@ use std::any::Any; use std::sync::Arc; -use common_catalog::catalog::StorageDescription; -use common_catalog::plan::DataSourcePlan; -use common_catalog::plan::PartStatistics; -use common_catalog::plan::Partitions; -use common_catalog::plan::PushDownInfo; -use common_catalog::table::AppendMode; -use common_catalog::table::Table; -use common_catalog::table_context::TableContext; -use common_exception::Result; -use common_expression::DataBlock; -use common_expression::DataSchemaRef; -use common_meta_app::schema::TableInfo; -use common_pipeline_core::processors::OutputPort; -use common_pipeline_core::processors::ProcessorPtr; -use common_pipeline_core::Pipeline; -use common_pipeline_sinks::EmptySink; -use common_pipeline_sources::SyncSource; -use common_pipeline_sources::SyncSourcer; +use databend_common_catalog::catalog::StorageDescription; +use databend_common_catalog::plan::DataSourcePlan; +use databend_common_catalog::plan::PartStatistics; +use databend_common_catalog::plan::Partitions; +use databend_common_catalog::plan::PushDownInfo; +use databend_common_catalog::table::AppendMode; +use databend_common_catalog::table::Table; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::Result; +use databend_common_expression::DataBlock; +use databend_common_expression::DataSchemaRef; +use databend_common_meta_app::schema::TableInfo; +use databend_common_pipeline_core::processors::OutputPort; +use databend_common_pipeline_core::processors::ProcessorPtr; +use databend_common_pipeline_core::Pipeline; +use databend_common_pipeline_sinks::EmptySink; +use databend_common_pipeline_sources::SyncSource; +use databend_common_pipeline_sources::SyncSourcer; pub struct NullTable { table_info: TableInfo, diff --git a/src/query/storages/parquet/Cargo.toml b/src/query/storages/parquet/Cargo.toml index 200ef05adc9b..a3bfa9b7122c 100644 --- a/src/query/storages/parquet/Cargo.toml +++ b/src/query/storages/parquet/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "common-storages-parquet" +name = "databend-common-storages-parquet" version = { workspace = true } authors = { workspace = true } license = { workspace = true } @@ -12,20 +12,20 @@ doctest = false test = false [dependencies] -common-arrow = { path = "../../../common/arrow" } -common-base = { path = "../../../common/base" } -common-catalog = { path = "../../catalog" } -common-exception = { path = "../../../common/exception" } -common-expression = { path = "../../expression" } -common-functions = { path = "../../functions" } -common-meta-app = { path = "../../../meta/app" } -common-metrics = { path = "../../../common/metrics" } -common-pipeline-core = { path = "../../pipeline/core" } -common-pipeline-sources = { path = "../../pipeline/sources" } -common-storage = { path = "../../../common/storage" } -storages-common-index = { path = "../common/index" } -storages-common-pruner = { path = "../common/pruner" } -storages-common-table-meta = { path = "../common/table_meta" } +databend-common-arrow = { path = "../../../common/arrow" } +databend-common-base = { path = "../../../common/base" } +databend-common-catalog = { path = "../../catalog" } +databend-common-exception = { path = "../../../common/exception" } +databend-common-expression = { path = "../../expression" } +databend-common-functions = { path = "../../functions" } +databend-common-meta-app = { path = "../../../meta/app" } +databend-common-metrics = { path = "../../../common/metrics" } +databend-common-pipeline-core = { path = "../../pipeline/core" } +databend-common-pipeline-sources = { path = "../../pipeline/sources" } +databend-common-storage = { path = "../../../common/storage" } +databend-storages-common-index = { path = "../common/index" } +databend-storages-common-pruner = { path = "../common/pruner" } +databend-storages-common-table-meta = { path = "../common/table_meta" } arrow-array = { workspace = true } arrow-buffer = { workspace = true } @@ -45,5 +45,5 @@ thrift = "0.17.0" typetag = { workspace = true } [dev-dependencies] -common-sql = { path = "../../sql" } +databend-common-sql = { path = "../../sql" } tempfile = "3.4.0" diff --git a/src/query/storages/parquet/src/parquet2/parquet_reader/data.rs b/src/query/storages/parquet/src/parquet2/parquet_reader/data.rs index 2156051700ea..0cdb4e326d1a 100644 --- a/src/query/storages/parquet/src/parquet2/parquet_reader/data.rs +++ b/src/query/storages/parquet/src/parquet2/parquet_reader/data.rs @@ -15,9 +15,9 @@ use std::collections::HashMap; use bytes::Bytes; -use common_exception::Result; -use common_expression::DataBlock; -use common_expression::FieldIndex; +use databend_common_exception::Result; +use databend_common_expression::DataBlock; +use databend_common_expression::FieldIndex; pub trait BlockIterator: Iterator> + Send { /// checking has_next() after next can avoid processor from entering SYNC for nothing. diff --git a/src/query/storages/parquet/src/parquet2/parquet_reader/deserialize.rs b/src/query/storages/parquet/src/parquet2/parquet_reader/deserialize.rs index a7996277b794..3d13f911c316 100644 --- a/src/query/storages/parquet/src/parquet2/parquet_reader/deserialize.rs +++ b/src/query/storages/parquet/src/parquet2/parquet_reader/deserialize.rs @@ -17,24 +17,24 @@ use std::collections::HashMap; use std::sync::Arc; use std::sync::Mutex; -use common_arrow::arrow::bitmap::Bitmap; -use common_arrow::arrow::datatypes::Field; -use common_arrow::arrow::io::parquet::read::column_iter_to_arrays; -use common_arrow::arrow::io::parquet::read::nested_column_iter_to_arrays; -use common_arrow::arrow::io::parquet::read::ArrayIter; -use common_arrow::arrow::io::parquet::read::InitNested; -use common_arrow::arrow::io::parquet::read::RowGroupDeserializer; -use common_arrow::parquet::metadata::ColumnDescriptor; -use common_arrow::parquet::page::CompressedPage; -use common_arrow::parquet::read::BasicDecompressor; -use common_arrow::parquet::read::PageMetaData; -use common_arrow::parquet::read::PageReader; -use common_base::runtime::GLOBAL_MEM_STAT; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::DataBlock; -use common_expression::DataSchema; -use common_storage::ColumnNode; +use databend_common_arrow::arrow::bitmap::Bitmap; +use databend_common_arrow::arrow::datatypes::Field; +use databend_common_arrow::arrow::io::parquet::read::column_iter_to_arrays; +use databend_common_arrow::arrow::io::parquet::read::nested_column_iter_to_arrays; +use databend_common_arrow::arrow::io::parquet::read::ArrayIter; +use databend_common_arrow::arrow::io::parquet::read::InitNested; +use databend_common_arrow::arrow::io::parquet::read::RowGroupDeserializer; +use databend_common_arrow::parquet::metadata::ColumnDescriptor; +use databend_common_arrow::parquet::page::CompressedPage; +use databend_common_arrow::parquet::read::BasicDecompressor; +use databend_common_arrow::parquet::read::PageMetaData; +use databend_common_arrow::parquet::read::PageReader; +use databend_common_base::runtime::GLOBAL_MEM_STAT; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::DataBlock; +use databend_common_expression::DataSchema; +use databend_common_storage::ColumnNode; use log::debug; use super::filter::FilterState; diff --git a/src/query/storages/parquet/src/parquet2/parquet_reader/filter.rs b/src/query/storages/parquet/src/parquet2/parquet_reader/filter.rs index d35d59337aff..8f455d6511bc 100644 --- a/src/query/storages/parquet/src/parquet2/parquet_reader/filter.rs +++ b/src/query/storages/parquet/src/parquet2/parquet_reader/filter.rs @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_arrow::arrow::bitmap::Bitmap; -use common_arrow::parquet::indexes::Interval; +use databend_common_arrow::arrow::bitmap::Bitmap; +use databend_common_arrow::parquet::indexes::Interval; /// A wrapper of [`Bitmap`] with a position mark. It is used to filter rows when reading a parquet file. /// diff --git a/src/query/storages/parquet/src/parquet2/parquet_reader/reader.rs b/src/query/storages/parquet/src/parquet2/parquet_reader/reader.rs index 44e6ccc6c69f..4e0a8f02715f 100644 --- a/src/query/storages/parquet/src/parquet2/parquet_reader/reader.rs +++ b/src/query/storages/parquet/src/parquet2/parquet_reader/reader.rs @@ -17,21 +17,21 @@ use std::collections::HashSet; use std::sync::Arc; use std::time::Instant; -use common_arrow::arrow::bitmap::Bitmap; -use common_arrow::arrow::datatypes::Schema as ArrowSchema; -use common_arrow::arrow::io::parquet::read::RowGroupDeserializer; -use common_arrow::parquet::metadata::ColumnDescriptor; -use common_arrow::parquet::metadata::SchemaDescriptor; -use common_catalog::plan::PartInfoPtr; -use common_catalog::plan::Projection; -use common_catalog::table_context::TableContext; -use common_exception::Result; -use common_expression::DataBlock; -use common_expression::DataSchema; -use common_expression::DataSchemaRef; -use common_expression::FieldIndex; -use common_metrics::storage::*; -use common_storage::ColumnNodes; +use databend_common_arrow::arrow::bitmap::Bitmap; +use databend_common_arrow::arrow::datatypes::Schema as ArrowSchema; +use databend_common_arrow::arrow::io::parquet::read::RowGroupDeserializer; +use databend_common_arrow::parquet::metadata::ColumnDescriptor; +use databend_common_arrow::parquet::metadata::SchemaDescriptor; +use databend_common_catalog::plan::PartInfoPtr; +use databend_common_catalog::plan::Projection; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::Result; +use databend_common_expression::DataBlock; +use databend_common_expression::DataSchema; +use databend_common_expression::DataSchemaRef; +use databend_common_expression::FieldIndex; +use databend_common_metrics::storage::*; +use databend_common_storage::ColumnNodes; use opendal::Operator; use super::data::OneBlock; diff --git a/src/query/storages/parquet/src/parquet2/parquet_reader/reader_merge_io.rs b/src/query/storages/parquet/src/parquet2/parquet_reader/reader_merge_io.rs index 63d97d114177..c74335e4c4b9 100644 --- a/src/query/storages/parquet/src/parquet2/parquet_reader/reader_merge_io.rs +++ b/src/query/storages/parquet/src/parquet2/parquet_reader/reader_merge_io.rs @@ -16,9 +16,9 @@ use std::collections::HashMap; use std::ops::Range; use bytes::Bytes; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::FieldIndex; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::FieldIndex; pub struct OwnerMemory { chunks: HashMap, diff --git a/src/query/storages/parquet/src/parquet2/parquet_reader/reader_merge_io_async.rs b/src/query/storages/parquet/src/parquet2/parquet_reader/reader_merge_io_async.rs index 9e42f389d08d..0c55aa663540 100644 --- a/src/query/storages/parquet/src/parquet2/parquet_reader/reader_merge_io_async.rs +++ b/src/query/storages/parquet/src/parquet2/parquet_reader/reader_merge_io_async.rs @@ -15,12 +15,12 @@ use std::ops::Range; use std::time::Instant; -use common_base::rangemap::RangeMerger; -use common_base::runtime::UnlimitedFuture; -use common_exception::ErrorCode; -use common_exception::Result; -use common_metrics::storage::metrics_inc_copy_read_part_cost_milliseconds; -use common_metrics::storage::metrics_inc_copy_read_size_bytes; +use databend_common_base::rangemap::RangeMerger; +use databend_common_base::runtime::UnlimitedFuture; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_metrics::storage::metrics_inc_copy_read_part_cost_milliseconds; +use databend_common_metrics::storage::metrics_inc_copy_read_size_bytes; use futures::future::try_join_all; use opendal::Operator; diff --git a/src/query/storages/parquet/src/parquet2/parquet_reader/reader_merge_io_sync.rs b/src/query/storages/parquet/src/parquet2/parquet_reader/reader_merge_io_sync.rs index 25a7f7c99e24..147efdfb2d01 100644 --- a/src/query/storages/parquet/src/parquet2/parquet_reader/reader_merge_io_sync.rs +++ b/src/query/storages/parquet/src/parquet2/parquet_reader/reader_merge_io_sync.rs @@ -14,10 +14,10 @@ use std::ops::Range; -use common_base::rangemap::RangeMerger; -use common_exception::ErrorCode; -use common_exception::Result; -use common_metrics::storage::metrics_inc_copy_read_size_bytes; +use databend_common_base::rangemap::RangeMerger; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_metrics::storage::metrics_inc_copy_read_size_bytes; use opendal::BlockingOperator; use crate::parquet2::parquet_reader::MergeIOReadResult; diff --git a/src/query/storages/parquet/src/parquet2/parquet_table/create.rs b/src/query/storages/parquet/src/parquet2/parquet_table/create.rs index 2b2bcb365934..7302ce402a33 100644 --- a/src/query/storages/parquet/src/parquet2/parquet_table/create.rs +++ b/src/query/storages/parquet/src/parquet2/parquet_table/create.rs @@ -15,23 +15,23 @@ use std::collections::HashMap; use std::sync::Arc; -use common_arrow::arrow::datatypes::Schema as ArrowSchema; -use common_arrow::arrow::io::parquet::read as pread; -use common_arrow::parquet::metadata::FileMetaData; -use common_arrow::parquet::metadata::SchemaDescriptor; -use common_catalog::plan::ParquetReadOptions; -use common_catalog::query_kind::QueryKind; -use common_catalog::table::Parquet2TableColumnStatisticsProvider; -use common_catalog::table::Table; -use common_catalog::table_context::TableContext; -use common_exception::ErrorCode; -use common_exception::Result; -use common_meta_app::principal::StageInfo; -use common_storage::infer_schema_with_extension; -use common_storage::init_stage_operator; -use common_storage::read_parquet_metas_in_parallel; -use common_storage::StageFileInfo; -use common_storage::StageFilesInfo; +use databend_common_arrow::arrow::datatypes::Schema as ArrowSchema; +use databend_common_arrow::arrow::io::parquet::read as pread; +use databend_common_arrow::parquet::metadata::FileMetaData; +use databend_common_arrow::parquet::metadata::SchemaDescriptor; +use databend_common_catalog::plan::ParquetReadOptions; +use databend_common_catalog::query_kind::QueryKind; +use databend_common_catalog::table::Parquet2TableColumnStatisticsProvider; +use databend_common_catalog::table::Table; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_meta_app::principal::StageInfo; +use databend_common_storage::infer_schema_with_extension; +use databend_common_storage::init_stage_operator; +use databend_common_storage::read_parquet_metas_in_parallel; +use databend_common_storage::StageFileInfo; +use databend_common_storage::StageFilesInfo; use opendal::Operator; use super::table::create_parquet_table_info; diff --git a/src/query/storages/parquet/src/parquet2/parquet_table/partition.rs b/src/query/storages/parquet/src/parquet2/parquet_table/partition.rs index ddf90eae055f..12e8e9223297 100644 --- a/src/query/storages/parquet/src/parquet2/parquet_table/partition.rs +++ b/src/query/storages/parquet/src/parquet2/parquet_table/partition.rs @@ -14,17 +14,17 @@ use std::sync::Arc; -use common_catalog::plan::PartStatistics; -use common_catalog::plan::Partitions; -use common_catalog::plan::Projection; -use common_catalog::plan::PushDownInfo; -use common_catalog::query_kind::QueryKind; -use common_catalog::table_context::TableContext; -use common_exception::Result; -use common_functions::BUILTIN_FUNCTIONS; -use storages_common_index::Index; -use storages_common_index::RangeIndex; -use storages_common_pruner::RangePrunerCreator; +use databend_common_catalog::plan::PartStatistics; +use databend_common_catalog::plan::Partitions; +use databend_common_catalog::plan::Projection; +use databend_common_catalog::plan::PushDownInfo; +use databend_common_catalog::query_kind::QueryKind; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::Result; +use databend_common_functions::BUILTIN_FUNCTIONS; +use databend_storages_common_index::Index; +use databend_storages_common_index::RangeIndex; +use databend_storages_common_pruner::RangePrunerCreator; use super::table::arrow_to_table_schema; use super::Parquet2Table; diff --git a/src/query/storages/parquet/src/parquet2/parquet_table/read.rs b/src/query/storages/parquet/src/parquet2/parquet_table/read.rs index fba814f7a763..35e203fbcd01 100644 --- a/src/query/storages/parquet/src/parquet2/parquet_table/read.rs +++ b/src/query/storages/parquet/src/parquet2/parquet_table/read.rs @@ -14,22 +14,22 @@ use std::sync::Arc; -use common_catalog::plan::DataSourcePlan; -use common_catalog::plan::PushDownInfo; -use common_catalog::table_context::TableContext; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::DataSchema; -use common_expression::DataSchemaRefExt; -use common_expression::Expr; -use common_expression::FunctionContext; -use common_expression::RemoteExpr; -use common_expression::TableSchemaRef; -use common_expression::TopKSorter; -use common_functions::BUILTIN_FUNCTIONS; -use common_pipeline_core::Pipeline; -use storages_common_index::Index; -use storages_common_index::RangeIndex; +use databend_common_catalog::plan::DataSourcePlan; +use databend_common_catalog::plan::PushDownInfo; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::DataSchema; +use databend_common_expression::DataSchemaRefExt; +use databend_common_expression::Expr; +use databend_common_expression::FunctionContext; +use databend_common_expression::RemoteExpr; +use databend_common_expression::TableSchemaRef; +use databend_common_expression::TopKSorter; +use databend_common_functions::BUILTIN_FUNCTIONS; +use databend_common_pipeline_core::Pipeline; +use databend_storages_common_index::Index; +use databend_storages_common_index::RangeIndex; use super::Parquet2Table; use crate::parquet2::parquet_reader::Parquet2Reader; diff --git a/src/query/storages/parquet/src/parquet2/parquet_table/table.rs b/src/query/storages/parquet/src/parquet2/parquet_table/table.rs index 1f9f9f814a91..cadde022be7e 100644 --- a/src/query/storages/parquet/src/parquet2/parquet_table/table.rs +++ b/src/query/storages/parquet/src/parquet2/parquet_table/table.rs @@ -19,35 +19,35 @@ use std::sync::Arc; use chrono::NaiveDateTime; use chrono::TimeZone; use chrono::Utc; -use common_arrow::arrow::datatypes::DataType as ArrowDataType; -use common_arrow::arrow::datatypes::Field as ArrowField; -use common_arrow::arrow::datatypes::Schema as ArrowSchema; -use common_arrow::arrow::io::parquet::read as pread; -use common_arrow::parquet::metadata::SchemaDescriptor; -use common_catalog::plan::DataSourceInfo; -use common_catalog::plan::DataSourcePlan; -use common_catalog::plan::Parquet2TableInfo; -use common_catalog::plan::ParquetReadOptions; -use common_catalog::plan::PartStatistics; -use common_catalog::plan::Partitions; -use common_catalog::plan::PushDownInfo; -use common_catalog::statistics::BasicColumnStatistics; -use common_catalog::table::ColumnStatisticsProvider; -use common_catalog::table::Parquet2TableColumnStatisticsProvider; -use common_catalog::table::Table; -use common_catalog::table::TableStatistics; -use common_catalog::table_context::TableContext; -use common_exception::Result; -use common_expression::TableSchema; -use common_meta_app::principal::StageInfo; -use common_meta_app::schema::TableIdent; -use common_meta_app::schema::TableInfo; -use common_meta_app::schema::TableMeta; -use common_pipeline_core::Pipeline; -use common_storage::init_stage_operator; -use common_storage::ColumnNodes; -use common_storage::StageFileInfo; -use common_storage::StageFilesInfo; +use databend_common_arrow::arrow::datatypes::DataType as ArrowDataType; +use databend_common_arrow::arrow::datatypes::Field as ArrowField; +use databend_common_arrow::arrow::datatypes::Schema as ArrowSchema; +use databend_common_arrow::arrow::io::parquet::read as pread; +use databend_common_arrow::parquet::metadata::SchemaDescriptor; +use databend_common_catalog::plan::DataSourceInfo; +use databend_common_catalog::plan::DataSourcePlan; +use databend_common_catalog::plan::Parquet2TableInfo; +use databend_common_catalog::plan::ParquetReadOptions; +use databend_common_catalog::plan::PartStatistics; +use databend_common_catalog::plan::Partitions; +use databend_common_catalog::plan::PushDownInfo; +use databend_common_catalog::statistics::BasicColumnStatistics; +use databend_common_catalog::table::ColumnStatisticsProvider; +use databend_common_catalog::table::Parquet2TableColumnStatisticsProvider; +use databend_common_catalog::table::Table; +use databend_common_catalog::table::TableStatistics; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::Result; +use databend_common_expression::TableSchema; +use databend_common_meta_app::principal::StageInfo; +use databend_common_meta_app::schema::TableIdent; +use databend_common_meta_app::schema::TableInfo; +use databend_common_meta_app::schema::TableMeta; +use databend_common_pipeline_core::Pipeline; +use databend_common_storage::init_stage_operator; +use databend_common_storage::ColumnNodes; +use databend_common_storage::StageFileInfo; +use databend_common_storage::StageFilesInfo; use opendal::Operator; use crate::parquet2::parquet_table::table::pread::FileMetaData; diff --git a/src/query/storages/parquet/src/parquet2/partition.rs b/src/query/storages/parquet/src/parquet2/partition.rs index 41a648b3a0f5..936315abf3c3 100644 --- a/src/query/storages/parquet/src/parquet2/partition.rs +++ b/src/query/storages/parquet/src/parquet2/partition.rs @@ -14,10 +14,10 @@ use std::collections::HashMap; -use common_arrow::parquet::compression::Compression; -use common_arrow::parquet::indexes::Interval; -use common_expression::FieldIndex; -use common_expression::Scalar; +use databend_common_arrow::parquet::compression::Compression; +use databend_common_arrow::parquet::indexes::Interval; +use databend_common_expression::FieldIndex; +use databend_common_expression::Scalar; #[derive(serde::Serialize, serde::Deserialize, PartialEq, Eq, Clone, Debug)] pub struct ColumnMeta { diff --git a/src/query/storages/parquet/src/parquet2/processors/deserialize_transform.rs b/src/query/storages/parquet/src/parquet2/processors/deserialize_transform.rs index c9b07065e3f2..7d5694eed485 100644 --- a/src/query/storages/parquet/src/parquet2/processors/deserialize_transform.rs +++ b/src/query/storages/parquet/src/parquet2/processors/deserialize_transform.rs @@ -17,33 +17,33 @@ use std::collections::VecDeque; use std::sync::Arc; use std::vec; -use common_arrow::arrow::bitmap::Bitmap; -use common_arrow::arrow::bitmap::MutableBitmap; -use common_arrow::parquet::indexes::Interval; -use common_base::base::Progress; -use common_base::base::ProgressValues; -use common_catalog::plan::PartInfoPtr; -use common_catalog::query_kind::QueryKind; -use common_catalog::table_context::TableContext; -use common_exception::Result; -use common_expression::filter_helper::FilterHelpers; -use common_expression::types::BooleanType; -use common_expression::types::DataType; -use common_expression::BlockEntry; -use common_expression::BlockMetaInfoDowncast; -use common_expression::DataBlock; -use common_expression::DataSchemaRef; -use common_expression::Evaluator; -use common_expression::Scalar; -use common_expression::Value; -use common_functions::BUILTIN_FUNCTIONS; -use common_pipeline_core::processors::Event; -use common_pipeline_core::processors::InputPort; -use common_pipeline_core::processors::OutputPort; -use common_pipeline_core::processors::Processor; -use common_pipeline_core::processors::ProcessorPtr; -use common_storage::CopyStatus; -use common_storage::FileStatus; +use databend_common_arrow::arrow::bitmap::Bitmap; +use databend_common_arrow::arrow::bitmap::MutableBitmap; +use databend_common_arrow::parquet::indexes::Interval; +use databend_common_base::base::Progress; +use databend_common_base::base::ProgressValues; +use databend_common_catalog::plan::PartInfoPtr; +use databend_common_catalog::query_kind::QueryKind; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::Result; +use databend_common_expression::filter_helper::FilterHelpers; +use databend_common_expression::types::BooleanType; +use databend_common_expression::types::DataType; +use databend_common_expression::BlockEntry; +use databend_common_expression::BlockMetaInfoDowncast; +use databend_common_expression::DataBlock; +use databend_common_expression::DataSchemaRef; +use databend_common_expression::Evaluator; +use databend_common_expression::Scalar; +use databend_common_expression::Value; +use databend_common_functions::BUILTIN_FUNCTIONS; +use databend_common_pipeline_core::processors::Event; +use databend_common_pipeline_core::processors::InputPort; +use databend_common_pipeline_core::processors::OutputPort; +use databend_common_pipeline_core::processors::Processor; +use databend_common_pipeline_core::processors::ProcessorPtr; +use databend_common_storage::CopyStatus; +use databend_common_storage::FileStatus; use opendal::services::Memory; use opendal::Operator; diff --git a/src/query/storages/parquet/src/parquet2/processors/source.rs b/src/query/storages/parquet/src/parquet2/processors/source.rs index aa3cd3af1125..3b6cb9296c75 100644 --- a/src/query/storages/parquet/src/parquet2/processors/source.rs +++ b/src/query/storages/parquet/src/parquet2/processors/source.rs @@ -17,18 +17,18 @@ use std::fmt::Debug; use std::fmt::Formatter; use std::sync::Arc; -use common_catalog::plan::PartInfoPtr; -use common_catalog::table_context::TableContext; -use common_exception::Result; -use common_expression::BlockMetaInfo; -use common_expression::DataBlock; -use common_metrics::storage::*; -use common_pipeline_core::processors::Event; -use common_pipeline_core::processors::OutputPort; -use common_pipeline_core::processors::Processor; -use common_pipeline_core::processors::ProcessorPtr; -use common_pipeline_sources::SyncSource; -use common_pipeline_sources::SyncSourcer; +use databend_common_catalog::plan::PartInfoPtr; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::Result; +use databend_common_expression::BlockMetaInfo; +use databend_common_expression::DataBlock; +use databend_common_metrics::storage::*; +use databend_common_pipeline_core::processors::Event; +use databend_common_pipeline_core::processors::OutputPort; +use databend_common_pipeline_core::processors::Processor; +use databend_common_pipeline_core::processors::ProcessorPtr; +use databend_common_pipeline_sources::SyncSource; +use databend_common_pipeline_sources::SyncSourcer; use serde::Deserializer; use serde::Serializer; @@ -52,14 +52,14 @@ impl Debug for Parquet2SourceMeta { } impl serde::Serialize for Parquet2SourceMeta { - fn serialize(&self, _: S) -> common_exception::Result + fn serialize(&self, _: S) -> databend_common_exception::Result where S: Serializer { unimplemented!("Unimplemented serialize ParquetSourceMeta") } } impl<'de> serde::Deserialize<'de> for Parquet2SourceMeta { - fn deserialize(_: D) -> common_exception::Result + fn deserialize(_: D) -> databend_common_exception::Result where D: Deserializer<'de> { unimplemented!("Unimplemented deserialize ParquetSourceMeta") } diff --git a/src/query/storages/parquet/src/parquet2/projection.rs b/src/query/storages/parquet/src/parquet2/projection.rs index 71ae41cae87f..434f58eebcac 100644 --- a/src/query/storages/parquet/src/parquet2/projection.rs +++ b/src/query/storages/parquet/src/parquet2/projection.rs @@ -15,14 +15,14 @@ use std::collections::HashMap; use std::collections::HashSet; -use common_arrow::arrow::datatypes::Schema as ArrowSchema; -use common_arrow::parquet::metadata::ColumnDescriptor; -use common_arrow::parquet::metadata::SchemaDescriptor; -use common_arrow::schema_projection as ap; -use common_catalog::plan::Projection; -use common_exception::Result; -use common_expression::FieldIndex; -use common_storage::ColumnNodes; +use databend_common_arrow::arrow::datatypes::Schema as ArrowSchema; +use databend_common_arrow::parquet::metadata::ColumnDescriptor; +use databend_common_arrow::parquet::metadata::SchemaDescriptor; +use databend_common_arrow::schema_projection as ap; +use databend_common_catalog::plan::Projection; +use databend_common_exception::Result; +use databend_common_expression::FieldIndex; +use databend_common_storage::ColumnNodes; #[allow(clippy::type_complexity)] pub fn project_parquet_schema( diff --git a/src/query/storages/parquet/src/parquet2/pruning.rs b/src/query/storages/parquet/src/parquet2/pruning.rs index 6ede2dc98a26..a5cccc2281fb 100644 --- a/src/query/storages/parquet/src/parquet2/pruning.rs +++ b/src/query/storages/parquet/src/parquet2/pruning.rs @@ -18,36 +18,36 @@ use std::io::Read; use std::io::Seek; use std::sync::Arc; -use common_arrow::arrow::datatypes::Field as ArrowField; -use common_arrow::arrow::io::parquet::read::get_field_pages; -use common_arrow::arrow::io::parquet::read::indexes::compute_page_row_intervals; -use common_arrow::arrow::io::parquet::read::indexes::read_columns_indexes; -use common_arrow::arrow::io::parquet::read::indexes::FieldPageStatistics; -use common_arrow::parquet::indexes::Interval; -use common_arrow::parquet::metadata::FileMetaData; -use common_arrow::parquet::metadata::RowGroupMetaData; -use common_arrow::parquet::metadata::SchemaDescriptor; -use common_arrow::parquet::read::read_metadata_with_size; -use common_arrow::parquet::read::read_pages_locations; -use common_catalog::plan::PartInfo; -use common_catalog::plan::PartStatistics; -use common_catalog::plan::Partitions; -use common_catalog::plan::PartitionsShuffleKind; -use common_catalog::plan::TopK; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::Expr; -use common_expression::FieldIndex; -use common_expression::FunctionContext; -use common_expression::TableSchemaRef; -use common_storage::read_parquet_metas_in_parallel; -use common_storage::ColumnNodes; -use common_storage::CopyStatus; -use common_storage::FileStatus; +use databend_common_arrow::arrow::datatypes::Field as ArrowField; +use databend_common_arrow::arrow::io::parquet::read::get_field_pages; +use databend_common_arrow::arrow::io::parquet::read::indexes::compute_page_row_intervals; +use databend_common_arrow::arrow::io::parquet::read::indexes::read_columns_indexes; +use databend_common_arrow::arrow::io::parquet::read::indexes::FieldPageStatistics; +use databend_common_arrow::parquet::indexes::Interval; +use databend_common_arrow::parquet::metadata::FileMetaData; +use databend_common_arrow::parquet::metadata::RowGroupMetaData; +use databend_common_arrow::parquet::metadata::SchemaDescriptor; +use databend_common_arrow::parquet::read::read_metadata_with_size; +use databend_common_arrow::parquet::read::read_pages_locations; +use databend_common_catalog::plan::PartInfo; +use databend_common_catalog::plan::PartStatistics; +use databend_common_catalog::plan::Partitions; +use databend_common_catalog::plan::PartitionsShuffleKind; +use databend_common_catalog::plan::TopK; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::Expr; +use databend_common_expression::FieldIndex; +use databend_common_expression::FunctionContext; +use databend_common_expression::TableSchemaRef; +use databend_common_storage::read_parquet_metas_in_parallel; +use databend_common_storage::ColumnNodes; +use databend_common_storage::CopyStatus; +use databend_common_storage::FileStatus; +use databend_storages_common_pruner::RangePruner; +use databend_storages_common_pruner::RangePrunerCreator; use log::info; use opendal::Operator; -use storages_common_pruner::RangePruner; -use storages_common_pruner::RangePrunerCreator; use super::partition::ColumnMeta; use super::Parquet2RowGroupPart; @@ -451,47 +451,47 @@ fn is_in(probe: Interval, intervals: &[Interval]) -> Vec { mod tests { use std::io::Cursor; - use common_arrow::parquet::compression::CompressionOptions; - use common_arrow::parquet::encoding::hybrid_rle::encode_bool; - use common_arrow::parquet::encoding::Encoding; - use common_arrow::parquet::indexes::Interval; - use common_arrow::parquet::metadata::Descriptor; - use common_arrow::parquet::metadata::SchemaDescriptor; - use common_arrow::parquet::page::DataPage; - use common_arrow::parquet::page::DataPageHeader; - use common_arrow::parquet::page::DataPageHeaderV1; - use common_arrow::parquet::page::Page; - use common_arrow::parquet::read::read_metadata; - use common_arrow::parquet::schema::types::ParquetType; - use common_arrow::parquet::schema::types::PhysicalType; - use common_arrow::parquet::statistics::serialize_statistics; - use common_arrow::parquet::statistics::PrimitiveStatistics; - use common_arrow::parquet::statistics::Statistics; - use common_arrow::parquet::types::NativeType; - use common_arrow::parquet::write::Compressor; - use common_arrow::parquet::write::DynIter; - use common_arrow::parquet::write::DynStreamingIterator; - use common_arrow::parquet::write::FileWriter; - use common_arrow::parquet::write::Version; - use common_arrow::parquet::write::WriteOptions; - use common_exception::Result; - use common_expression::types::DataType; - use common_expression::types::NumberDataType; - use common_expression::types::NumberScalar; - use common_expression::FunctionContext; - use common_expression::Scalar; - use common_expression::TableDataType; - use common_expression::TableField; - use common_expression::TableSchemaRef; - use common_expression::TableSchemaRefExt; - use common_sql::plans::BoundColumnRef; - use common_sql::plans::ConstantExpr; - use common_sql::plans::FunctionCall; - use common_sql::plans::ScalarExpr; - use common_sql::ColumnBindingBuilder; - use common_sql::Visibility; - use common_storage::ColumnNodes; - use storages_common_pruner::RangePrunerCreator; + use databend_common_arrow::parquet::compression::CompressionOptions; + use databend_common_arrow::parquet::encoding::hybrid_rle::encode_bool; + use databend_common_arrow::parquet::encoding::Encoding; + use databend_common_arrow::parquet::indexes::Interval; + use databend_common_arrow::parquet::metadata::Descriptor; + use databend_common_arrow::parquet::metadata::SchemaDescriptor; + use databend_common_arrow::parquet::page::DataPage; + use databend_common_arrow::parquet::page::DataPageHeader; + use databend_common_arrow::parquet::page::DataPageHeaderV1; + use databend_common_arrow::parquet::page::Page; + use databend_common_arrow::parquet::read::read_metadata; + use databend_common_arrow::parquet::schema::types::ParquetType; + use databend_common_arrow::parquet::schema::types::PhysicalType; + use databend_common_arrow::parquet::statistics::serialize_statistics; + use databend_common_arrow::parquet::statistics::PrimitiveStatistics; + use databend_common_arrow::parquet::statistics::Statistics; + use databend_common_arrow::parquet::types::NativeType; + use databend_common_arrow::parquet::write::Compressor; + use databend_common_arrow::parquet::write::DynIter; + use databend_common_arrow::parquet::write::DynStreamingIterator; + use databend_common_arrow::parquet::write::FileWriter; + use databend_common_arrow::parquet::write::Version; + use databend_common_arrow::parquet::write::WriteOptions; + use databend_common_exception::Result; + use databend_common_expression::types::DataType; + use databend_common_expression::types::NumberDataType; + use databend_common_expression::types::NumberScalar; + use databend_common_expression::FunctionContext; + use databend_common_expression::Scalar; + use databend_common_expression::TableDataType; + use databend_common_expression::TableField; + use databend_common_expression::TableSchemaRef; + use databend_common_expression::TableSchemaRefExt; + use databend_common_sql::plans::BoundColumnRef; + use databend_common_sql::plans::ConstantExpr; + use databend_common_sql::plans::FunctionCall; + use databend_common_sql::plans::ScalarExpr; + use databend_common_sql::ColumnBindingBuilder; + use databend_common_sql::Visibility; + use databend_common_storage::ColumnNodes; + use databend_storages_common_pruner::RangePrunerCreator; use crate::parquet2::pruning::and_intervals; use crate::parquet2::pruning::build_column_page_pruners; @@ -572,7 +572,7 @@ mod tests { fn unzip_option( array: &[Option], - ) -> common_arrow::parquet::error::Result<(Vec, Vec)> { + ) -> databend_common_arrow::parquet::error::Result<(Vec, Vec)> { // leave the first 4 bytes announcing the length of the def level // this will be overwritten at the end, once the length is known. // This is unknown at this point because of the uleb128 encoding, @@ -608,7 +608,7 @@ mod tests { array: &[Option], options: &WriteOptions, descriptor: &Descriptor, - ) -> common_arrow::parquet::error::Result { + ) -> databend_common_arrow::parquet::error::Result { let (values, mut buffer) = unzip_option(array)?; buffer.extend_from_slice(&values); diff --git a/src/query/storages/parquet/src/parquet2/statistics.rs b/src/query/storages/parquet/src/parquet2/statistics.rs index 9959329753b7..a125c4f32a4c 100644 --- a/src/query/storages/parquet/src/parquet2/statistics.rs +++ b/src/query/storages/parquet/src/parquet2/statistics.rs @@ -14,19 +14,19 @@ use std::collections::HashMap; -use common_arrow::arrow::array::UInt64Array; -use common_arrow::arrow::buffer::Buffer; -use common_arrow::arrow::io::parquet::read as pread; -use common_arrow::parquet::metadata::RowGroupMetaData; -use common_catalog::statistics::BasicColumnStatistics; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::types::DataType; -use common_expression::Column; -use common_expression::TableDataType; -use common_storage::ColumnNodes; -use storages_common_table_meta::meta::ColumnStatistics; -use storages_common_table_meta::meta::StatisticsOfColumns; +use databend_common_arrow::arrow::array::UInt64Array; +use databend_common_arrow::arrow::buffer::Buffer; +use databend_common_arrow::arrow::io::parquet::read as pread; +use databend_common_arrow::parquet::metadata::RowGroupMetaData; +use databend_common_catalog::statistics::BasicColumnStatistics; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::types::DataType; +use databend_common_expression::Column; +use databend_common_expression::TableDataType; +use databend_common_storage::ColumnNodes; +use databend_storages_common_table_meta::meta::ColumnStatistics; +use databend_storages_common_table_meta::meta::StatisticsOfColumns; /// Collect statistics of a batch of row groups of the specified columns. /// diff --git a/src/query/storages/parquet/src/parquet_part.rs b/src/query/storages/parquet/src/parquet_part.rs index 86dd968b65f4..a8618596fc84 100644 --- a/src/query/storages/parquet/src/parquet_part.rs +++ b/src/query/storages/parquet/src/parquet_part.rs @@ -19,12 +19,12 @@ use std::hash::Hasher; use std::mem; use std::sync::Arc; -use common_catalog::plan::PartInfo; -use common_catalog::plan::PartInfoPtr; -use common_catalog::plan::PartStatistics; -use common_catalog::plan::Partitions; -use common_exception::ErrorCode; -use common_exception::Result; +use databend_common_catalog::plan::PartInfo; +use databend_common_catalog::plan::PartInfoPtr; +use databend_common_catalog::plan::PartStatistics; +use databend_common_catalog::plan::Partitions; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; use crate::parquet2::Parquet2RowGroupPart; use crate::parquet_rs::ParquetRSRowGroupPart; diff --git a/src/query/storages/parquet/src/parquet_rs/parquet_reader/predicate.rs b/src/query/storages/parquet/src/parquet_rs/parquet_reader/predicate.rs index b6134665bcea..1a26efb3595e 100644 --- a/src/query/storages/parquet/src/parquet_rs/parquet_reader/predicate.rs +++ b/src/query/storages/parquet/src/parquet_rs/parquet_reader/predicate.rs @@ -16,18 +16,18 @@ use std::sync::Arc; use arrow_array::BooleanArray; use arrow_array::RecordBatch; -use common_arrow::arrow::bitmap::Bitmap; -use common_catalog::plan::PrewhereInfo; -use common_catalog::plan::Projection; -use common_exception::Result; -use common_expression::types::DataType; -use common_expression::DataBlock; -use common_expression::DataSchema; -use common_expression::Evaluator; -use common_expression::Expr; -use common_expression::FunctionContext; -use common_expression::TableSchema; -use common_functions::BUILTIN_FUNCTIONS; +use databend_common_arrow::arrow::bitmap::Bitmap; +use databend_common_catalog::plan::PrewhereInfo; +use databend_common_catalog::plan::Projection; +use databend_common_exception::Result; +use databend_common_expression::types::DataType; +use databend_common_expression::DataBlock; +use databend_common_expression::DataSchema; +use databend_common_expression::Evaluator; +use databend_common_expression::Expr; +use databend_common_expression::FunctionContext; +use databend_common_expression::TableSchema; +use databend_common_functions::BUILTIN_FUNCTIONS; use parquet::arrow::parquet_to_arrow_field_levels; use parquet::arrow::FieldLevels; use parquet::arrow::ProjectionMask; diff --git a/src/query/storages/parquet/src/parquet_rs/parquet_reader/read_policy/no_prefetch.rs b/src/query/storages/parquet/src/parquet_rs/parquet_reader/read_policy/no_prefetch.rs index e4f8ec6a3374..938617bdb1fe 100644 --- a/src/query/storages/parquet/src/parquet_rs/parquet_reader/read_policy/no_prefetch.rs +++ b/src/query/storages/parquet/src/parquet_rs/parquet_reader/read_policy/no_prefetch.rs @@ -14,10 +14,10 @@ use std::sync::Arc; -use common_exception::Result; -use common_expression::DataBlock; -use common_expression::DataSchema; -use common_expression::TopKSorter; +use databend_common_exception::Result; +use databend_common_expression::DataBlock; +use databend_common_expression::DataSchema; +use databend_common_expression::TopKSorter; use parquet::arrow::arrow_reader::ParquetRecordBatchReader; use parquet::arrow::arrow_reader::RowSelection; use parquet::arrow::parquet_to_arrow_field_levels; diff --git a/src/query/storages/parquet/src/parquet_rs/parquet_reader/read_policy/policy.rs b/src/query/storages/parquet/src/parquet_rs/parquet_reader/read_policy/policy.rs index 50b7224b97c0..0c7f9b862ae9 100644 --- a/src/query/storages/parquet/src/parquet_rs/parquet_reader/read_policy/policy.rs +++ b/src/query/storages/parquet/src/parquet_rs/parquet_reader/read_policy/policy.rs @@ -12,9 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_exception::Result; -use common_expression::DataBlock; -use common_expression::TopKSorter; +use databend_common_exception::Result; +use databend_common_expression::DataBlock; +use databend_common_expression::TopKSorter; use parquet::arrow::arrow_reader::RowSelection; use crate::parquet_rs::parquet_reader::row_group::InMemoryRowGroup; diff --git a/src/query/storages/parquet/src/parquet_rs/parquet_reader/read_policy/predicate_and_topk.rs b/src/query/storages/parquet/src/parquet_rs/parquet_reader/read_policy/predicate_and_topk.rs index e4326966fc6e..a5c1c57b225a 100644 --- a/src/query/storages/parquet/src/parquet_rs/parquet_reader/read_policy/predicate_and_topk.rs +++ b/src/query/storages/parquet/src/parquet_rs/parquet_reader/read_policy/predicate_and_topk.rs @@ -16,12 +16,12 @@ use std::collections::HashSet; use std::collections::VecDeque; use std::sync::Arc; -use common_exception::Result; -use common_expression::DataBlock; -use common_expression::DataSchema; -use common_expression::DataSchemaRef; -use common_expression::TableSchema; -use common_expression::TopKSorter; +use databend_common_exception::Result; +use databend_common_expression::DataBlock; +use databend_common_expression::DataSchema; +use databend_common_expression::DataSchemaRef; +use databend_common_expression::TableSchema; +use databend_common_expression::TopKSorter; use parquet::arrow::arrow_reader::ParquetRecordBatchReader; use parquet::arrow::arrow_reader::RowSelection; use parquet::arrow::parquet_to_arrow_field_levels; diff --git a/src/query/storages/parquet/src/parquet_rs/parquet_reader/read_policy/topk_only.rs b/src/query/storages/parquet/src/parquet_rs/parquet_reader/read_policy/topk_only.rs index 6b63a14ed494..09e6f3f45a00 100644 --- a/src/query/storages/parquet/src/parquet_rs/parquet_reader/read_policy/topk_only.rs +++ b/src/query/storages/parquet/src/parquet_rs/parquet_reader/read_policy/topk_only.rs @@ -15,13 +15,13 @@ use std::collections::VecDeque; use std::sync::Arc; -use common_exception::Result; -use common_expression::BlockEntry; -use common_expression::DataBlock; -use common_expression::DataSchema; -use common_expression::DataSchemaRef; -use common_expression::TableSchema; -use common_expression::TopKSorter; +use databend_common_exception::Result; +use databend_common_expression::BlockEntry; +use databend_common_expression::DataBlock; +use databend_common_expression::DataSchema; +use databend_common_expression::DataSchemaRef; +use databend_common_expression::TableSchema; +use databend_common_expression::TopKSorter; use parquet::arrow::arrow_reader::ParquetRecordBatchReader; use parquet::arrow::arrow_reader::RowSelection; use parquet::arrow::parquet_to_arrow_field_levels; diff --git a/src/query/storages/parquet/src/parquet_rs/parquet_reader/read_policy/utils.rs b/src/query/storages/parquet/src/parquet_rs/parquet_reader/read_policy/utils.rs index b0473e60a09a..3ca6fa891370 100644 --- a/src/query/storages/parquet/src/parquet_rs/parquet_reader/read_policy/utils.rs +++ b/src/query/storages/parquet/src/parquet_rs/parquet_reader/read_policy/utils.rs @@ -12,10 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_exception::Result; -use common_expression::DataBlock; -use common_expression::DataSchema; -use common_expression::TopKSorter; +use databend_common_exception::Result; +use databend_common_expression::DataBlock; +use databend_common_expression::DataSchema; +use databend_common_expression::TopKSorter; use parquet::arrow::arrow_reader::ParquetRecordBatchReader; use parquet::arrow::arrow_reader::RowSelection; use parquet::arrow::FieldLevels; diff --git a/src/query/storages/parquet/src/parquet_rs/parquet_reader/reader/builder.rs b/src/query/storages/parquet/src/parquet_rs/parquet_reader/reader/builder.rs index 2548dfd27469..29021edf3869 100644 --- a/src/query/storages/parquet/src/parquet_rs/parquet_reader/reader/builder.rs +++ b/src/query/storages/parquet/src/parquet_rs/parquet_reader/reader/builder.rs @@ -14,14 +14,14 @@ use std::sync::Arc; -use common_catalog::plan::ParquetReadOptions; -use common_catalog::plan::Projection; -use common_catalog::plan::PushDownInfo; -use common_catalog::plan::TopK; -use common_catalog::table_context::TableContext; -use common_exception::Result; -use common_expression::DataSchema; -use common_expression::TableSchemaRef; +use databend_common_catalog::plan::ParquetReadOptions; +use databend_common_catalog::plan::Projection; +use databend_common_catalog::plan::PushDownInfo; +use databend_common_catalog::plan::TopK; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::Result; +use databend_common_expression::DataSchema; +use databend_common_expression::TableSchemaRef; use opendal::Operator; use parquet::arrow::arrow_to_parquet_schema; use parquet::arrow::ProjectionMask; diff --git a/src/query/storages/parquet/src/parquet_rs/parquet_reader/reader/full_reader.rs b/src/query/storages/parquet/src/parquet_rs/parquet_reader/reader/full_reader.rs index be891e082bd9..1cc1e911b45f 100644 --- a/src/query/storages/parquet/src/parquet_rs/parquet_reader/reader/full_reader.rs +++ b/src/query/storages/parquet/src/parquet_rs/parquet_reader/reader/full_reader.rs @@ -16,11 +16,11 @@ use std::sync::Arc; use arrow_schema::ArrowError; use bytes::Bytes; -use common_exception::Result; -use common_expression::DataBlock; -use common_expression::DataSchemaRef; -use common_metrics::storage::metrics_inc_omit_filter_rowgroups; -use common_metrics::storage::metrics_inc_omit_filter_rows; +use databend_common_exception::Result; +use databend_common_expression::DataBlock; +use databend_common_expression::DataSchemaRef; +use databend_common_metrics::storage::metrics_inc_omit_filter_rowgroups; +use databend_common_metrics::storage::metrics_inc_omit_filter_rows; use futures::StreamExt; use opendal::Operator; use opendal::Reader; diff --git a/src/query/storages/parquet/src/parquet_rs/parquet_reader/reader/row_group_reader.rs b/src/query/storages/parquet/src/parquet_rs/parquet_reader/reader/row_group_reader.rs index 4cff2db96f64..82cbe66caa25 100644 --- a/src/query/storages/parquet/src/parquet_rs/parquet_reader/reader/row_group_reader.rs +++ b/src/query/storages/parquet/src/parquet_rs/parquet_reader/reader/row_group_reader.rs @@ -12,10 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_exception::Result; -use common_expression::TopKSorter; -use common_metrics::storage::metrics_inc_omit_filter_rowgroups; -use common_metrics::storage::metrics_inc_omit_filter_rows; +use databend_common_exception::Result; +use databend_common_expression::TopKSorter; +use databend_common_metrics::storage::metrics_inc_omit_filter_rowgroups; +use databend_common_metrics::storage::metrics_inc_omit_filter_rows; use opendal::Operator; use parquet::arrow::arrow_reader::RowSelection; use parquet::arrow::arrow_reader::RowSelector; diff --git a/src/query/storages/parquet/src/parquet_rs/parquet_reader/row_group.rs b/src/query/storages/parquet/src/parquet_rs/parquet_reader/row_group.rs index 5a0d2fda02e0..c308f6158901 100644 --- a/src/query/storages/parquet/src/parquet_rs/parquet_reader/row_group.rs +++ b/src/query/storages/parquet/src/parquet_rs/parquet_reader/row_group.rs @@ -18,10 +18,10 @@ use std::sync::Arc; use bytes::Buf; use bytes::Bytes; -use common_base::base::tokio; -use common_base::rangemap::RangeMerger; -use common_exception::ErrorCode; -use common_exception::Result; +use databend_common_base::base::tokio; +use databend_common_base::rangemap::RangeMerger; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; use opendal::Operator; use parquet::arrow::arrow_reader::RowGroups; use parquet::arrow::arrow_reader::RowSelection; diff --git a/src/query/storages/parquet/src/parquet_rs/parquet_reader/topk.rs b/src/query/storages/parquet/src/parquet_rs/parquet_reader/topk.rs index dd65d061df88..673666037d80 100644 --- a/src/query/storages/parquet/src/parquet_rs/parquet_reader/topk.rs +++ b/src/query/storages/parquet/src/parquet_rs/parquet_reader/topk.rs @@ -14,13 +14,13 @@ use std::sync::Arc; -use common_arrow::arrow::bitmap::Bitmap; -use common_catalog::plan::TopK; -use common_exception::Result; -use common_expression::Column; -use common_expression::TableField; -use common_expression::TableSchema; -use common_expression::TopKSorter; +use databend_common_arrow::arrow::bitmap::Bitmap; +use databend_common_catalog::plan::TopK; +use databend_common_exception::Result; +use databend_common_expression::Column; +use databend_common_expression::TableField; +use databend_common_expression::TableSchema; +use databend_common_expression::TopKSorter; use parquet::arrow::parquet_to_arrow_field_levels; use parquet::arrow::FieldLevels; use parquet::arrow::ProjectionMask; diff --git a/src/query/storages/parquet/src/parquet_rs/parquet_reader/utils.rs b/src/query/storages/parquet/src/parquet_rs/parquet_reader/utils.rs index 63e9d68959e0..35bebec4f72c 100644 --- a/src/query/storages/parquet/src/parquet_rs/parquet_reader/utils.rs +++ b/src/query/storages/parquet/src/parquet_rs/parquet_reader/utils.rs @@ -15,16 +15,16 @@ use arrow_array::BooleanArray; use arrow_array::RecordBatch; use arrow_array::StructArray; -use common_arrow::arrow::array::Arrow2Arrow; -use common_arrow::arrow::bitmap::Bitmap; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::Column; -use common_expression::DataBlock; -use common_expression::DataField; -use common_expression::DataSchema; -use common_expression::FieldIndex; -use common_expression::TableSchema; +use databend_common_arrow::arrow::array::Arrow2Arrow; +use databend_common_arrow::arrow::bitmap::Bitmap; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::Column; +use databend_common_expression::DataBlock; +use databend_common_expression::DataField; +use databend_common_expression::DataSchema; +use databend_common_expression::FieldIndex; +use databend_common_expression::TableSchema; use parquet::arrow::arrow_to_parquet_schema; use parquet::arrow::parquet_to_arrow_schema_by_columns; use parquet::arrow::ProjectionMask; @@ -96,8 +96,8 @@ pub fn transform_record_batch_by_field_paths( pub fn bitmap_to_boolean_array(bitmap: Bitmap) -> BooleanArray { let res = Box::new( - common_arrow::arrow::array::BooleanArray::try_new( - common_arrow::arrow::datatypes::DataType::Boolean, + databend_common_arrow::arrow::array::BooleanArray::try_new( + databend_common_arrow::arrow::datatypes::DataType::Boolean, bitmap, None, ) diff --git a/src/query/storages/parquet/src/parquet_rs/parquet_table/meta.rs b/src/query/storages/parquet/src/parquet_rs/parquet_table/meta.rs index 13b6fee3d45d..0c769ba64e1c 100644 --- a/src/query/storages/parquet/src/parquet_rs/parquet_table/meta.rs +++ b/src/query/storages/parquet/src/parquet_rs/parquet_table/meta.rs @@ -15,12 +15,12 @@ use std::intrinsics::unlikely; use std::sync::Arc; -use common_base::runtime::execute_futures_in_parallel; -use common_base::runtime::GLOBAL_MEM_STAT; -use common_catalog::plan::FullParquetMeta; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::TableField; +use databend_common_base::runtime::execute_futures_in_parallel; +use databend_common_base::runtime::GLOBAL_MEM_STAT; +use databend_common_catalog::plan::FullParquetMeta; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::TableField; use opendal::Operator; use parquet::file::metadata::ParquetMetaData; use parquet::schema::types::SchemaDescPtr; @@ -106,7 +106,8 @@ async fn load_and_check_parquet_meta( expect: &SchemaDescriptor, schema_from: &str, ) -> Result> { - let metadata = common_storage::parquet_rs::read_metadata_async(file, &op, Some(size)).await?; + let metadata = + databend_common_storage::parquet_rs::read_metadata_async(file, &op, Some(size)).await?; check_parquet_schema( expect, metadata.file_metadata().schema_descr(), diff --git a/src/query/storages/parquet/src/parquet_rs/parquet_table/partition.rs b/src/query/storages/parquet/src/parquet_rs/parquet_table/partition.rs index ab8d4d36c113..d21a15dd3e77 100644 --- a/src/query/storages/parquet/src/parquet_rs/parquet_table/partition.rs +++ b/src/query/storages/parquet/src/parquet_rs/parquet_table/partition.rs @@ -15,23 +15,23 @@ use std::collections::HashSet; use std::sync::Arc; -use common_base::runtime::execute_futures_in_parallel; -use common_catalog::plan::FullParquetMeta; -use common_catalog::plan::PartInfo; -use common_catalog::plan::PartStatistics; -use common_catalog::plan::Partitions; -use common_catalog::plan::PartitionsShuffleKind; -use common_catalog::plan::PushDownInfo; -use common_catalog::plan::TopK; -use common_catalog::query_kind::QueryKind; -use common_catalog::table::Table; -use common_catalog::table_context::TableContext; -use common_exception::Result; -use common_storage::CopyStatus; -use common_storage::FileStatus; +use databend_common_base::runtime::execute_futures_in_parallel; +use databend_common_catalog::plan::FullParquetMeta; +use databend_common_catalog::plan::PartInfo; +use databend_common_catalog::plan::PartStatistics; +use databend_common_catalog::plan::Partitions; +use databend_common_catalog::plan::PartitionsShuffleKind; +use databend_common_catalog::plan::PushDownInfo; +use databend_common_catalog::plan::TopK; +use databend_common_catalog::query_kind::QueryKind; +use databend_common_catalog::table::Table; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::Result; +use databend_common_storage::CopyStatus; +use databend_common_storage::FileStatus; +use databend_storages_common_index::Index; +use databend_storages_common_index::RangeIndex; use parquet::arrow::arrow_reader::RowSelector; -use storages_common_index::Index; -use storages_common_index::RangeIndex; use super::meta::read_parquet_metas_batch; use super::table::ParquetRSTable; diff --git a/src/query/storages/parquet/src/parquet_rs/parquet_table/read.rs b/src/query/storages/parquet/src/parquet_rs/parquet_table/read.rs index ce426fbe594d..c228bc8288f6 100644 --- a/src/query/storages/parquet/src/parquet_rs/parquet_table/read.rs +++ b/src/query/storages/parquet/src/parquet_rs/parquet_table/read.rs @@ -14,14 +14,14 @@ use std::sync::Arc; -use common_catalog::plan::DataSourcePlan; -use common_catalog::table::Table; -use common_catalog::table_context::TableContext; -use common_exception::Result; -use common_expression::TableSchemaRef; -use common_pipeline_core::Pipeline; -use storages_common_index::Index; -use storages_common_index::RangeIndex; +use databend_common_catalog::plan::DataSourcePlan; +use databend_common_catalog::table::Table; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::Result; +use databend_common_expression::TableSchemaRef; +use databend_common_pipeline_core::Pipeline; +use databend_storages_common_index::Index; +use databend_storages_common_index::RangeIndex; use super::ParquetRSTable; use crate::parquet_rs::source::ParquetSource; diff --git a/src/query/storages/parquet/src/parquet_rs/parquet_table/stats.rs b/src/query/storages/parquet/src/parquet_rs/parquet_table/stats.rs index 19e692df9e1b..e8da43d00670 100644 --- a/src/query/storages/parquet/src/parquet_rs/parquet_table/stats.rs +++ b/src/query/storages/parquet/src/parquet_rs/parquet_table/stats.rs @@ -15,9 +15,9 @@ use std::collections::HashMap; use std::sync::Arc; -use common_catalog::plan::FullParquetMeta; -use common_catalog::statistics::BasicColumnStatistics; -use common_catalog::table::ParquetTableColumnStatisticsProvider; +use databend_common_catalog::plan::FullParquetMeta; +use databend_common_catalog::statistics::BasicColumnStatistics; +use databend_common_catalog::table::ParquetTableColumnStatisticsProvider; pub fn create_stats_provider( metas: &[Arc], diff --git a/src/query/storages/parquet/src/parquet_rs/parquet_table/table.rs b/src/query/storages/parquet/src/parquet_rs/parquet_table/table.rs index 8067b363a8c8..aaeca9c14278 100644 --- a/src/query/storages/parquet/src/parquet_rs/parquet_table/table.rs +++ b/src/query/storages/parquet/src/parquet_rs/parquet_table/table.rs @@ -22,35 +22,35 @@ use arrow_schema::Schema as ArrowSchema; use chrono::NaiveDateTime; use chrono::TimeZone; use chrono::Utc; -use common_base::base::tokio::sync::Mutex; -use common_catalog::plan::DataSourceInfo; -use common_catalog::plan::DataSourcePlan; -use common_catalog::plan::FullParquetMeta; -use common_catalog::plan::ParquetReadOptions; -use common_catalog::plan::ParquetTableInfo; -use common_catalog::plan::PartStatistics; -use common_catalog::plan::Partitions; -use common_catalog::plan::PushDownInfo; -use common_catalog::query_kind::QueryKind; -use common_catalog::table::ColumnStatisticsProvider; -use common_catalog::table::DummyColumnStatisticsProvider; -use common_catalog::table::Table; -use common_catalog::table::TableStatistics; -use common_catalog::table_context::TableContext; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::TableField; -use common_expression::TableSchema; -use common_meta_app::principal::StageInfo; -use common_meta_app::schema::TableIdent; -use common_meta_app::schema::TableInfo; -use common_meta_app::schema::TableMeta; -use common_pipeline_core::Pipeline; -use common_storage::init_stage_operator; -use common_storage::parquet_rs::infer_schema_with_extension; -use common_storage::parquet_rs::read_metadata_async; -use common_storage::StageFileInfo; -use common_storage::StageFilesInfo; +use databend_common_base::base::tokio::sync::Mutex; +use databend_common_catalog::plan::DataSourceInfo; +use databend_common_catalog::plan::DataSourcePlan; +use databend_common_catalog::plan::FullParquetMeta; +use databend_common_catalog::plan::ParquetReadOptions; +use databend_common_catalog::plan::ParquetTableInfo; +use databend_common_catalog::plan::PartStatistics; +use databend_common_catalog::plan::Partitions; +use databend_common_catalog::plan::PushDownInfo; +use databend_common_catalog::query_kind::QueryKind; +use databend_common_catalog::table::ColumnStatisticsProvider; +use databend_common_catalog::table::DummyColumnStatisticsProvider; +use databend_common_catalog::table::Table; +use databend_common_catalog::table::TableStatistics; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::TableField; +use databend_common_expression::TableSchema; +use databend_common_meta_app::principal::StageInfo; +use databend_common_meta_app::schema::TableIdent; +use databend_common_meta_app::schema::TableInfo; +use databend_common_meta_app::schema::TableMeta; +use databend_common_pipeline_core::Pipeline; +use databend_common_storage::init_stage_operator; +use databend_common_storage::parquet_rs::infer_schema_with_extension; +use databend_common_storage::parquet_rs::read_metadata_async; +use databend_common_storage::StageFileInfo; +use databend_common_storage::StageFilesInfo; use opendal::Operator; use parquet::file::metadata::ParquetMetaData; use parquet::schema::types::SchemaDescPtr; diff --git a/src/query/storages/parquet/src/parquet_rs/partition.rs b/src/query/storages/parquet/src/parquet_rs/partition.rs index 517398585d83..797a415d9d0b 100644 --- a/src/query/storages/parquet/src/parquet_rs/partition.rs +++ b/src/query/storages/parquet/src/parquet_rs/partition.rs @@ -15,7 +15,7 @@ use std::io::Cursor; use std::sync::Arc; -use common_expression::Scalar; +use databend_common_expression::Scalar; use parquet::arrow::arrow_reader::RowSelector; use parquet::file::metadata::RowGroupMetaData; use parquet::format::PageLocation; diff --git a/src/query/storages/parquet/src/parquet_rs/pruning.rs b/src/query/storages/parquet/src/parquet_rs/pruning.rs index a6c74082b820..c4bfbdc07840 100644 --- a/src/query/storages/parquet/src/parquet_rs/pruning.rs +++ b/src/query/storages/parquet/src/parquet_rs/pruning.rs @@ -15,20 +15,20 @@ use std::collections::HashMap; use std::sync::Arc; -use common_catalog::plan::ParquetReadOptions; -use common_catalog::plan::PushDownInfo; -use common_exception::Result; -use common_expression::FunctionContext; -use common_expression::TableField; -use common_expression::TableSchemaRef; -use common_functions::BUILTIN_FUNCTIONS; +use databend_common_catalog::plan::ParquetReadOptions; +use databend_common_catalog::plan::PushDownInfo; +use databend_common_exception::Result; +use databend_common_expression::FunctionContext; +use databend_common_expression::TableField; +use databend_common_expression::TableSchemaRef; +use databend_common_functions::BUILTIN_FUNCTIONS; +use databend_storages_common_pruner::RangePruner; +use databend_storages_common_pruner::RangePrunerCreator; +use databend_storages_common_table_meta::meta::StatisticsOfColumns; use parquet::arrow::arrow_reader::RowSelection; use parquet::arrow::arrow_reader::RowSelector; use parquet::file::metadata::ParquetMetaData; use parquet::format::PageLocation; -use storages_common_pruner::RangePruner; -use storages_common_pruner::RangePrunerCreator; -use storages_common_table_meta::meta::StatisticsOfColumns; use super::statistics::collect_row_group_stats; use crate::parquet_rs::statistics::convert_index_to_column_statistics; diff --git a/src/query/storages/parquet/src/parquet_rs/source.rs b/src/query/storages/parquet/src/parquet_rs/source.rs index 7644fa7fa9f0..2fb717009483 100644 --- a/src/query/storages/parquet/src/parquet_rs/source.rs +++ b/src/query/storages/parquet/src/parquet_rs/source.rs @@ -15,21 +15,21 @@ use std::any::Any; use std::sync::Arc; -use common_base::base::Progress; -use common_base::base::ProgressValues; -use common_catalog::plan::TopK; -use common_catalog::query_kind::QueryKind; -use common_catalog::table_context::TableContext; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::DataBlock; -use common_expression::TopKSorter; -use common_pipeline_core::processors::Event; -use common_pipeline_core::processors::OutputPort; -use common_pipeline_core::processors::Processor; -use common_pipeline_core::processors::ProcessorPtr; -use common_storage::CopyStatus; -use common_storage::FileStatus; +use databend_common_base::base::Progress; +use databend_common_base::base::ProgressValues; +use databend_common_catalog::plan::TopK; +use databend_common_catalog::query_kind::QueryKind; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::DataBlock; +use databend_common_expression::TopKSorter; +use databend_common_pipeline_core::processors::Event; +use databend_common_pipeline_core::processors::OutputPort; +use databend_common_pipeline_core::processors::Processor; +use databend_common_pipeline_core::processors::ProcessorPtr; +use databend_common_storage::CopyStatus; +use databend_common_storage::FileStatus; use super::parquet_reader::policy::ReadPolicyImpl; use crate::ParquetPart; diff --git a/src/query/storages/parquet/src/parquet_rs/statistics/column.rs b/src/query/storages/parquet/src/parquet_rs/statistics/column.rs index ebae644b76c9..da2f92fca7b5 100644 --- a/src/query/storages/parquet/src/parquet_rs/statistics/column.rs +++ b/src/query/storages/parquet/src/parquet_rs/statistics/column.rs @@ -12,16 +12,16 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_expression::types::decimal::Decimal; -use common_expression::types::decimal::DecimalScalar; -use common_expression::types::DecimalDataType; -use common_expression::types::NumberDataType; -use common_expression::Scalar; -use common_expression::TableDataType; +use databend_common_expression::types::decimal::Decimal; +use databend_common_expression::types::decimal::DecimalScalar; +use databend_common_expression::types::DecimalDataType; +use databend_common_expression::types::NumberDataType; +use databend_common_expression::Scalar; +use databend_common_expression::TableDataType; +use databend_storages_common_table_meta::meta::ColumnStatistics; use ethnum::I256; use parquet::data_type::AsBytes; use parquet::file::statistics::Statistics; -use storages_common_table_meta::meta::ColumnStatistics; use super::utils::decode_decimal128_from_bytes; use super::utils::decode_decimal256_from_bytes; diff --git a/src/query/storages/parquet/src/parquet_rs/statistics/page.rs b/src/query/storages/parquet/src/parquet_rs/statistics/page.rs index 3cb56bb3bdf5..27186c6ab0f0 100644 --- a/src/query/storages/parquet/src/parquet_rs/statistics/page.rs +++ b/src/query/storages/parquet/src/parquet_rs/statistics/page.rs @@ -12,12 +12,13 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_expression::types::decimal::Decimal; -use common_expression::types::decimal::DecimalScalar; -use common_expression::types::DecimalDataType; -use common_expression::types::NumberDataType; -use common_expression::Scalar; -use common_expression::TableDataType; +use databend_common_expression::types::decimal::Decimal; +use databend_common_expression::types::decimal::DecimalScalar; +use databend_common_expression::types::DecimalDataType; +use databend_common_expression::types::NumberDataType; +use databend_common_expression::Scalar; +use databend_common_expression::TableDataType; +use databend_storages_common_table_meta::meta::ColumnStatistics; use ethnum::I256; use parquet::data_type::AsBytes; use parquet::data_type::ByteArray; @@ -25,7 +26,6 @@ use parquet::data_type::FixedLenByteArray; use parquet::data_type::Int96; use parquet::file::page_index::index::Index; use parquet::file::page_index::index::PageIndex; -use storages_common_table_meta::meta::ColumnStatistics; use super::utils::decode_decimal128_from_bytes; use super::utils::decode_decimal256_from_bytes; diff --git a/src/query/storages/parquet/src/parquet_rs/statistics/row_group.rs b/src/query/storages/parquet/src/parquet_rs/statistics/row_group.rs index c36176009617..e9ab006dd48e 100644 --- a/src/query/storages/parquet/src/parquet_rs/statistics/row_group.rs +++ b/src/query/storages/parquet/src/parquet_rs/statistics/row_group.rs @@ -14,9 +14,9 @@ use std::collections::HashMap; -use common_expression::TableField; +use databend_common_expression::TableField; +use databend_storages_common_table_meta::meta::StatisticsOfColumns; use parquet::file::metadata::RowGroupMetaData; -use storages_common_table_meta::meta::StatisticsOfColumns; use crate::parquet_rs::statistics::column::convert_column_statistics; diff --git a/src/query/storages/parquet/src/parquet_rs/statistics/utils.rs b/src/query/storages/parquet/src/parquet_rs/statistics/utils.rs index 830d08e9b9c7..c155ca5d8930 100644 --- a/src/query/storages/parquet/src/parquet_rs/statistics/utils.rs +++ b/src/query/storages/parquet/src/parquet_rs/statistics/utils.rs @@ -13,9 +13,9 @@ // limitations under the License. use arrow_buffer::i256; -use common_expression::types::decimal::DecimalScalar; -use common_expression::types::DecimalSize; -use common_expression::Scalar; +use databend_common_expression::types::decimal::DecimalScalar; +use databend_common_expression::types::DecimalSize; +use databend_common_expression::Scalar; use ethnum::I256; use parquet::data_type::AsBytes; use parquet::data_type::FixedLenByteArray; diff --git a/src/query/storages/parquet/src/read_settings.rs b/src/query/storages/parquet/src/read_settings.rs index f299d7af887b..cb58899c4b4f 100644 --- a/src/query/storages/parquet/src/read_settings.rs +++ b/src/query/storages/parquet/src/read_settings.rs @@ -14,8 +14,8 @@ use std::sync::Arc; -use common_catalog::table_context::TableContext; -use common_exception::Result; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::Result; #[derive(Clone, Copy)] pub struct ReadSettings { diff --git a/src/query/storages/parquet/src/utils.rs b/src/query/storages/parquet/src/utils.rs index 688939877234..6bdc52d9ddbe 100644 --- a/src/query/storages/parquet/src/utils.rs +++ b/src/query/storages/parquet/src/utils.rs @@ -14,11 +14,11 @@ use std::sync::Arc; -use common_base::runtime::GLOBAL_MEM_STAT; -use common_catalog::plan::DataSourcePlan; -use common_catalog::table_context::TableContext; -use common_exception::ErrorCode; -use common_exception::Result; +use databend_common_base::runtime::GLOBAL_MEM_STAT; +use databend_common_catalog::plan::DataSourcePlan; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; use crate::ParquetPart; diff --git a/src/query/storages/parquet/tests/it/merge_io.rs b/src/query/storages/parquet/tests/it/merge_io.rs index 1af07af4b80f..209ae5447b1f 100644 --- a/src/query/storages/parquet/tests/it/merge_io.rs +++ b/src/query/storages/parquet/tests/it/merge_io.rs @@ -21,8 +21,8 @@ use arrow_schema::DataType; use arrow_schema::Field; use arrow_schema::Schema; use bytes::Bytes; -use common_base::base::tokio; -use common_storages_parquet::InMemoryRowGroup; +use databend_common_base::base::tokio; +use databend_common_storages_parquet::InMemoryRowGroup; use opendal::services::Memory; use opendal::Operator; use parquet::arrow::ArrowWriter; diff --git a/src/query/storages/random/Cargo.toml b/src/query/storages/random/Cargo.toml index 7ded85654904..2a1f155242ff 100644 --- a/src/query/storages/random/Cargo.toml +++ b/src/query/storages/random/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "common-storages-random" +name = "databend-common-storages-random" version = { workspace = true } authors = { workspace = true } license = { workspace = true } @@ -12,12 +12,12 @@ doctest = false test = false [dependencies] -common-catalog = { path = "../../catalog" } -common-exception = { path = "../../../common/exception" } -common-expression = { path = "../../expression" } -common-meta-app = { path = "../../../meta/app" } -common-pipeline-core = { path = "../../pipeline/core" } -common-pipeline-sources = { path = "../../pipeline/sources" } +databend-common-catalog = { path = "../../catalog" } +databend-common-exception = { path = "../../../common/exception" } +databend-common-expression = { path = "../../expression" } +databend-common-meta-app = { path = "../../../meta/app" } +databend-common-pipeline-core = { path = "../../pipeline/core" } +databend-common-pipeline-sources = { path = "../../pipeline/sources" } async-backtrace = { workspace = true } async-trait = { workspace = true } @@ -25,4 +25,4 @@ serde = { workspace = true } typetag = { workspace = true } [build-dependencies] -common-building = { path = "../../../common/building" } +databend-common-building = { path = "../../../common/building" } diff --git a/src/query/storages/random/src/random_parts.rs b/src/query/storages/random/src/random_parts.rs index 830f9a1c7c31..bc8195d35aed 100644 --- a/src/query/storages/random/src/random_parts.rs +++ b/src/query/storages/random/src/random_parts.rs @@ -15,10 +15,10 @@ use std::any::Any; use std::sync::Arc; -use common_catalog::plan::PartInfo; -use common_catalog::plan::PartInfoPtr; -use common_exception::ErrorCode; -use common_exception::Result; +use databend_common_catalog::plan::PartInfo; +use databend_common_catalog::plan::PartInfoPtr; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; #[derive(serde::Serialize, serde::Deserialize, PartialEq, Eq)] pub struct RandomPartInfo { diff --git a/src/query/storages/random/src/random_table.rs b/src/query/storages/random/src/random_table.rs index d79b547e258f..8aa876aedda4 100644 --- a/src/query/storages/random/src/random_table.rs +++ b/src/query/storages/random/src/random_table.rs @@ -15,29 +15,29 @@ use std::any::Any; use std::sync::Arc; -use common_catalog::catalog::StorageDescription; -use common_catalog::plan::DataSourcePlan; -use common_catalog::plan::PartStatistics; -use common_catalog::plan::Partitions; -use common_catalog::plan::PartitionsShuffleKind; -use common_catalog::plan::Projection; -use common_catalog::plan::PushDownInfo; -use common_catalog::table::Table; -use common_catalog::table_context::TableContext; -use common_exception::Result; -use common_expression::types::DataType; -use common_expression::BlockEntry; -use common_expression::Column; -use common_expression::DataBlock; -use common_expression::TableSchemaRef; -use common_expression::Value; -use common_meta_app::schema::TableInfo; -use common_pipeline_core::processors::OutputPort; -use common_pipeline_core::processors::ProcessorPtr; -use common_pipeline_core::Pipeline; -use common_pipeline_core::SourcePipeBuilder; -use common_pipeline_sources::SyncSource; -use common_pipeline_sources::SyncSourcer; +use databend_common_catalog::catalog::StorageDescription; +use databend_common_catalog::plan::DataSourcePlan; +use databend_common_catalog::plan::PartStatistics; +use databend_common_catalog::plan::Partitions; +use databend_common_catalog::plan::PartitionsShuffleKind; +use databend_common_catalog::plan::Projection; +use databend_common_catalog::plan::PushDownInfo; +use databend_common_catalog::table::Table; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::Result; +use databend_common_expression::types::DataType; +use databend_common_expression::BlockEntry; +use databend_common_expression::Column; +use databend_common_expression::DataBlock; +use databend_common_expression::TableSchemaRef; +use databend_common_expression::Value; +use databend_common_meta_app::schema::TableInfo; +use databend_common_pipeline_core::processors::OutputPort; +use databend_common_pipeline_core::processors::ProcessorPtr; +use databend_common_pipeline_core::Pipeline; +use databend_common_pipeline_core::SourcePipeBuilder; +use databend_common_pipeline_sources::SyncSource; +use databend_common_pipeline_sources::SyncSourcer; use crate::RandomPartInfo; diff --git a/src/query/storages/result_cache/Cargo.toml b/src/query/storages/result_cache/Cargo.toml index 46ed7e9a2e84..333fc97cac0b 100644 --- a/src/query/storages/result_cache/Cargo.toml +++ b/src/query/storages/result_cache/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "common-storages-result-cache" +name = "databend-common-storages-result-cache" version = "0.1.0" edition = "2021" @@ -9,20 +9,20 @@ doctest = false test = false [dependencies] -common-arrow = { path = "../../../common/arrow" } -common-catalog = { path = "../../catalog" } -common-exception = { path = "../../../common/exception" } -common-expression = { path = "../../expression" } -common-meta-app = { path = "../../../meta/app" } -common-meta-kvapi = { path = "../../../meta/kvapi" } -common-meta-store = { path = "../../../meta/store" } -common-meta-types = { path = "../../../meta/types" } -common-pipeline-core = { path = "../../pipeline/core" } -common-pipeline-sinks = { path = "../../pipeline/sinks" } -common-pipeline-sources = { path = "../../pipeline/sources" } -common-storage = { path = "../../../common/storage" } -storages-common-blocks = { path = "../common/blocks" } -storages-common-table-meta = { path = "../common/table_meta" } +databend-common-arrow = { path = "../../../common/arrow" } +databend-common-catalog = { path = "../../catalog" } +databend-common-exception = { path = "../../../common/exception" } +databend-common-expression = { path = "../../expression" } +databend-common-meta-app = { path = "../../../meta/app" } +databend-common-meta-kvapi = { path = "../../../meta/kvapi" } +databend-common-meta-store = { path = "../../../meta/store" } +databend-common-meta-types = { path = "../../../meta/types" } +databend-common-pipeline-core = { path = "../../pipeline/core" } +databend-common-pipeline-sinks = { path = "../../pipeline/sinks" } +databend-common-pipeline-sources = { path = "../../pipeline/sources" } +databend-common-storage = { path = "../../../common/storage" } +databend-storages-common-blocks = { path = "../common/blocks" } +databend-storages-common-table-meta = { path = "../common/table_meta" } async-backtrace = { workspace = true } async-trait = { workspace = true } diff --git a/src/query/storages/result_cache/src/meta_manager.rs b/src/query/storages/result_cache/src/meta_manager.rs index 762c9ea6c018..40cf4eecb0b9 100644 --- a/src/query/storages/result_cache/src/meta_manager.rs +++ b/src/query/storages/result_cache/src/meta_manager.rs @@ -14,14 +14,14 @@ use std::sync::Arc; -use common_exception::Result; -use common_meta_kvapi::kvapi::KVApi; -use common_meta_store::MetaStore; -use common_meta_types::KVMeta; -use common_meta_types::MatchSeq; -use common_meta_types::Operation; -use common_meta_types::SeqV; -use common_meta_types::UpsertKV; +use databend_common_exception::Result; +use databend_common_meta_kvapi::kvapi::KVApi; +use databend_common_meta_store::MetaStore; +use databend_common_meta_types::KVMeta; +use databend_common_meta_types::MatchSeq; +use databend_common_meta_types::Operation; +use databend_common_meta_types::SeqV; +use databend_common_meta_types::UpsertKV; use crate::common::ResultCacheValue; diff --git a/src/query/storages/result_cache/src/read/reader.rs b/src/query/storages/result_cache/src/read/reader.rs index c0c83885853f..e0b95ef3ba33 100644 --- a/src/query/storages/result_cache/src/read/reader.rs +++ b/src/query/storages/result_cache/src/read/reader.rs @@ -15,16 +15,16 @@ use std::io::Cursor; use std::sync::Arc; -use common_arrow::arrow::io::parquet::read::infer_schema; -use common_arrow::arrow::io::parquet::read::{self as pread}; -use common_arrow::parquet::read::read_metadata; -use common_catalog::table_context::TableContext; -use common_exception::Result; -use common_expression::DataBlock; -use common_expression::DataSchema; -use common_expression::TableSchema; -use common_meta_store::MetaStore; -use common_storage::DataOperator; +use databend_common_arrow::arrow::io::parquet::read::infer_schema; +use databend_common_arrow::arrow::io::parquet::read::{self as pread}; +use databend_common_arrow::parquet::read::read_metadata; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::Result; +use databend_common_expression::DataBlock; +use databend_common_expression::DataSchema; +use databend_common_expression::TableSchema; +use databend_common_meta_store::MetaStore; +use databend_common_storage::DataOperator; use opendal::Operator; use crate::common::gen_result_cache_meta_key; diff --git a/src/query/storages/result_cache/src/table_function/table.rs b/src/query/storages/result_cache/src/table_function/table.rs index f679257432de..364919698a7a 100644 --- a/src/query/storages/result_cache/src/table_function/table.rs +++ b/src/query/storages/result_cache/src/table_function/table.rs @@ -16,29 +16,29 @@ use std::any::Any; use std::io::Cursor; use std::sync::Arc; -use common_arrow::arrow::io::parquet::read::infer_schema; -use common_arrow::arrow::io::parquet::read::{self as pread}; -use common_arrow::parquet::read::read_metadata; -use common_catalog::plan::DataSourceInfo; -use common_catalog::plan::DataSourcePlan; -use common_catalog::plan::PartStatistics; -use common_catalog::plan::Partitions; -use common_catalog::plan::PushDownInfo; -use common_catalog::plan::ResultScanTableInfo; -use common_catalog::table::Table; -use common_catalog::table_args::TableArgs; -use common_catalog::table_context::TableContext; -use common_exception::Result; -use common_expression::DataBlock; -use common_expression::DataSchema; -use common_expression::Scalar; -use common_expression::TableSchema; -use common_meta_app::schema::TableIdent; -use common_meta_app::schema::TableInfo; -use common_meta_app::schema::TableMeta; -use common_pipeline_core::Pipeline; -use common_pipeline_sources::EmptySource; -use common_pipeline_sources::OneBlockSource; +use databend_common_arrow::arrow::io::parquet::read::infer_schema; +use databend_common_arrow::arrow::io::parquet::read::{self as pread}; +use databend_common_arrow::parquet::read::read_metadata; +use databend_common_catalog::plan::DataSourceInfo; +use databend_common_catalog::plan::DataSourcePlan; +use databend_common_catalog::plan::PartStatistics; +use databend_common_catalog::plan::Partitions; +use databend_common_catalog::plan::PushDownInfo; +use databend_common_catalog::plan::ResultScanTableInfo; +use databend_common_catalog::table::Table; +use databend_common_catalog::table_args::TableArgs; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::Result; +use databend_common_expression::DataBlock; +use databend_common_expression::DataSchema; +use databend_common_expression::Scalar; +use databend_common_expression::TableSchema; +use databend_common_meta_app::schema::TableIdent; +use databend_common_meta_app::schema::TableInfo; +use databend_common_meta_app::schema::TableMeta; +use databend_common_pipeline_core::Pipeline; +use databend_common_pipeline_sources::EmptySource; +use databend_common_pipeline_sources::OneBlockSource; const RESULT_SCAN: &str = "result_scan"; diff --git a/src/query/storages/result_cache/src/write/sink.rs b/src/query/storages/result_cache/src/write/sink.rs index 258acf8c994d..60f210750ad1 100644 --- a/src/query/storages/result_cache/src/write/sink.rs +++ b/src/query/storages/result_cache/src/write/sink.rs @@ -14,18 +14,18 @@ use std::sync::Arc; -use common_catalog::table_context::TableContext; -use common_exception::Result; -use common_expression::DataBlock; -use common_expression::TableSchemaRef; -use common_meta_store::MetaStore; -use common_meta_types::MatchSeq; -use common_meta_types::SeqV; -use common_pipeline_core::processors::InputPort; -use common_pipeline_core::processors::ProcessorPtr; -use common_pipeline_sinks::AsyncMpscSink; -use common_pipeline_sinks::AsyncMpscSinker; -use common_storage::DataOperator; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::Result; +use databend_common_expression::DataBlock; +use databend_common_expression::TableSchemaRef; +use databend_common_meta_store::MetaStore; +use databend_common_meta_types::MatchSeq; +use databend_common_meta_types::SeqV; +use databend_common_pipeline_core::processors::InputPort; +use databend_common_pipeline_core::processors::ProcessorPtr; +use databend_common_pipeline_sinks::AsyncMpscSink; +use databend_common_pipeline_sinks::AsyncMpscSinker; +use databend_common_storage::DataOperator; use super::writer::ResultCacheWriter; use crate::common::gen_result_cache_dir; diff --git a/src/query/storages/result_cache/src/write/writer.rs b/src/query/storages/result_cache/src/write/writer.rs index 599aa5b05f6f..cf24866f97ed 100644 --- a/src/query/storages/result_cache/src/write/writer.rs +++ b/src/query/storages/result_cache/src/write/writer.rs @@ -12,12 +12,12 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_exception::Result; -use common_expression::DataBlock; -use common_expression::TableSchemaRef; +use databend_common_exception::Result; +use databend_common_expression::DataBlock; +use databend_common_expression::TableSchemaRef; +use databend_storages_common_blocks::blocks_to_parquet; +use databend_storages_common_table_meta::table::TableCompression; use opendal::Operator; -use storages_common_blocks::blocks_to_parquet; -use storages_common_table_meta::table::TableCompression; use uuid::Uuid; pub(super) struct ResultCacheWriter { diff --git a/src/query/storages/share/Cargo.toml b/src/query/storages/share/Cargo.toml index 1b02d51a497d..e8687b117c19 100644 --- a/src/query/storages/share/Cargo.toml +++ b/src/query/storages/share/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "common-storages-share" +name = "databend-common-storages-share" version = { workspace = true } authors = { workspace = true } license = { workspace = true } @@ -13,11 +13,11 @@ test = false [dependencies] chrono = { workspace = true } -common-exception = { path = "../../../common/exception" } -common-meta-app = { path = "../../../meta/app" } +databend-common-exception = { path = "../../../common/exception" } +databend-common-meta-app = { path = "../../../meta/app" } enumflags2 = { workspace = true } -storages-common-table-meta = { path = "../common/table_meta" } +databend-storages-common-table-meta = { path = "../common/table_meta" } async-backtrace = { workspace = true } opendal = { workspace = true } diff --git a/src/query/storages/share/src/share.rs b/src/query/storages/share/src/share.rs index 1de81cbd245f..1b3b6ffb1268 100644 --- a/src/query/storages/share/src/share.rs +++ b/src/query/storages/share/src/share.rs @@ -16,11 +16,11 @@ use std::collections::BTreeMap; use chrono::DateTime; use chrono::Utc; -use common_exception::Result; -use common_meta_app::share::ShareDatabaseSpec; -use common_meta_app::share::ShareSpec; -use common_meta_app::share::ShareTableInfoMap; -use common_meta_app::share::ShareTableSpec; +use databend_common_exception::Result; +use databend_common_meta_app::share::ShareDatabaseSpec; +use databend_common_meta_app::share::ShareSpec; +use databend_common_meta_app::share::ShareTableInfoMap; +use databend_common_meta_app::share::ShareTableSpec; use opendal::Operator; const SHARE_CONFIG_PREFIX: &str = "_share_config"; @@ -96,10 +96,10 @@ pub async fn save_share_spec( } mod ext { - use common_meta_app::share::ShareGrantObjectPrivilege; + use databend_common_meta_app::share::ShareGrantObjectPrivilege; + use databend_storages_common_table_meta::table::database_storage_prefix; + use databend_storages_common_table_meta::table::table_storage_prefix; use enumflags2::BitFlags; - use storages_common_table_meta::table::database_storage_prefix; - use storages_common_table_meta::table::table_storage_prefix; use super::*; diff --git a/src/query/storages/stage/Cargo.toml b/src/query/storages/stage/Cargo.toml index c2588de84419..8a09b3d4b374 100644 --- a/src/query/storages/stage/Cargo.toml +++ b/src/query/storages/stage/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "common-storages-stage" +name = "databend-common-storages-stage" version = { workspace = true } authors = { workspace = true } license = { workspace = true } @@ -12,17 +12,17 @@ doctest = false test = false [dependencies] -common-base = { path = "../../../common/base" } -common-catalog = { path = "../../catalog" } -common-compress = { path = "../../../common/compress" } -common-exception = { path = "../../../common/exception" } -common-expression = { path = "../../expression" } -common-formats = { path = "../../formats" } -common-meta-app = { path = "../../../meta/app" } -common-pipeline-core = { path = "../../pipeline/core" } -common-pipeline-sources = { path = "../../pipeline/sources" } -common-pipeline-transforms = { path = "../../pipeline/transforms" } -common-storage = { path = "../../../common/storage" } +databend-common-base = { path = "../../../common/base" } +databend-common-catalog = { path = "../../catalog" } +databend-common-compress = { path = "../../../common/compress" } +databend-common-exception = { path = "../../../common/exception" } +databend-common-expression = { path = "../../expression" } +databend-common-formats = { path = "../../formats" } +databend-common-meta-app = { path = "../../../meta/app" } +databend-common-pipeline-core = { path = "../../pipeline/core" } +databend-common-pipeline-sources = { path = "../../pipeline/sources" } +databend-common-pipeline-transforms = { path = "../../pipeline/transforms" } +databend-common-storage = { path = "../../../common/storage" } async-backtrace = { workspace = true } async-trait = { workspace = true } @@ -36,4 +36,4 @@ typetag = { workspace = true } uuid = { workspace = true } [build-dependencies] -common-building = { path = "../../../common/building" } +databend-common-building = { path = "../../../common/building" } diff --git a/src/query/storages/stage/src/parquet_file/block_batch.rs b/src/query/storages/stage/src/parquet_file/block_batch.rs index 3781492a89b9..39acf267405a 100644 --- a/src/query/storages/stage/src/parquet_file/block_batch.rs +++ b/src/query/storages/stage/src/parquet_file/block_batch.rs @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_expression::BlockMetaInfo; -use common_expression::DataBlock; +use databend_common_expression::BlockMetaInfo; +use databend_common_expression::DataBlock; #[derive(Debug)] pub struct BlockBatch { diff --git a/src/query/storages/stage/src/parquet_file/limit_file_size_processor.rs b/src/query/storages/stage/src/parquet_file/limit_file_size_processor.rs index a497c9352074..eb88848edbea 100644 --- a/src/query/storages/stage/src/parquet_file/limit_file_size_processor.rs +++ b/src/query/storages/stage/src/parquet_file/limit_file_size_processor.rs @@ -15,13 +15,13 @@ use std::any::Any; use std::sync::Arc; -use common_exception::Result; -use common_expression::DataBlock; -use common_pipeline_core::processors::Event; -use common_pipeline_core::processors::InputPort; -use common_pipeline_core::processors::OutputPort; -use common_pipeline_core::processors::Processor; -use common_pipeline_core::processors::ProcessorPtr; +use databend_common_exception::Result; +use databend_common_expression::DataBlock; +use databend_common_pipeline_core::processors::Event; +use databend_common_pipeline_core::processors::InputPort; +use databend_common_pipeline_core::processors::OutputPort; +use databend_common_pipeline_core::processors::Processor; +use databend_common_pipeline_core::processors::ProcessorPtr; use super::block_batch::BlockBatch; diff --git a/src/query/storages/stage/src/parquet_file/pipeline.rs b/src/query/storages/stage/src/parquet_file/pipeline.rs index ae2f31ad2f56..db0f6c29b2b5 100644 --- a/src/query/storages/stage/src/parquet_file/pipeline.rs +++ b/src/query/storages/stage/src/parquet_file/pipeline.rs @@ -14,11 +14,11 @@ use std::sync::Arc; -use common_catalog::plan::StageTableInfo; -use common_catalog::table_context::TableContext; -use common_exception::Result; -use common_formats::FileFormatOptionsExt; -use common_pipeline_core::Pipeline; +use databend_common_catalog::plan::StageTableInfo; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::Result; +use databend_common_formats::FileFormatOptionsExt; +use databend_common_pipeline_core::Pipeline; use opendal::Operator; use crate::parquet_file::limit_file_size_processor::LimitFileSizeProcessor; diff --git a/src/query/storages/stage/src/parquet_file/sink_processor.rs b/src/query/storages/stage/src/parquet_file/sink_processor.rs index a80846b4bd0c..7b9e53b1b4aa 100644 --- a/src/query/storages/stage/src/parquet_file/sink_processor.rs +++ b/src/query/storages/stage/src/parquet_file/sink_processor.rs @@ -17,15 +17,15 @@ use std::mem; use std::sync::Arc; use async_trait::async_trait; -use common_catalog::plan::StageTableInfo; -use common_exception::Result; -use common_expression::BlockMetaInfoDowncast; -use common_expression::DataBlock; -use common_formats::output_format::OutputFormat; -use common_pipeline_core::processors::Event; -use common_pipeline_core::processors::InputPort; -use common_pipeline_core::processors::Processor; -use common_pipeline_core::processors::ProcessorPtr; +use databend_common_catalog::plan::StageTableInfo; +use databend_common_exception::Result; +use databend_common_expression::BlockMetaInfoDowncast; +use databend_common_expression::DataBlock; +use databend_common_formats::output_format::OutputFormat; +use databend_common_pipeline_core::processors::Event; +use databend_common_pipeline_core::processors::InputPort; +use databend_common_pipeline_core::processors::Processor; +use databend_common_pipeline_core::processors::ProcessorPtr; use opendal::Operator; use crate::parquet_file::block_batch::BlockBatch; diff --git a/src/query/storages/stage/src/row_based_file/buffers.rs b/src/query/storages/stage/src/row_based_file/buffers.rs index dfd26cec5d01..b6698c2ccd30 100644 --- a/src/query/storages/stage/src/row_based_file/buffers.rs +++ b/src/query/storages/stage/src/row_based_file/buffers.rs @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_expression::BlockMetaInfo; -use common_expression::DataBlock; +use databend_common_expression::BlockMetaInfo; +use databend_common_expression::DataBlock; #[derive(Debug)] pub struct FileOutputBuffers { diff --git a/src/query/storages/stage/src/row_based_file/limit_file_size_processor.rs b/src/query/storages/stage/src/row_based_file/limit_file_size_processor.rs index 974ec8061887..728af21140b6 100644 --- a/src/query/storages/stage/src/row_based_file/limit_file_size_processor.rs +++ b/src/query/storages/stage/src/row_based_file/limit_file_size_processor.rs @@ -16,14 +16,14 @@ use std::any::Any; use std::mem; use std::sync::Arc; -use common_exception::Result; -use common_expression::BlockMetaInfoDowncast; -use common_expression::DataBlock; -use common_pipeline_core::processors::Event; -use common_pipeline_core::processors::InputPort; -use common_pipeline_core::processors::OutputPort; -use common_pipeline_core::processors::Processor; -use common_pipeline_core::processors::ProcessorPtr; +use databend_common_exception::Result; +use databend_common_expression::BlockMetaInfoDowncast; +use databend_common_expression::DataBlock; +use databend_common_pipeline_core::processors::Event; +use databend_common_pipeline_core::processors::InputPort; +use databend_common_pipeline_core::processors::OutputPort; +use databend_common_pipeline_core::processors::Processor; +use databend_common_pipeline_core::processors::ProcessorPtr; use crate::row_based_file::buffers::FileOutputBuffers; @@ -64,7 +64,7 @@ impl Processor for LimitFileSizeProcessor { self } - fn event(&mut self) -> common_exception::Result { + fn event(&mut self) -> databend_common_exception::Result { if self.output.is_finished() { self.input.finish(); Ok(Event::Finished) @@ -102,7 +102,7 @@ impl Processor for LimitFileSizeProcessor { } } - fn process(&mut self) -> common_exception::Result<()> { + fn process(&mut self) -> databend_common_exception::Result<()> { assert!(self.output_data.is_none()); assert!(self.input_data.is_some()); diff --git a/src/query/storages/stage/src/row_based_file/pipeline.rs b/src/query/storages/stage/src/row_based_file/pipeline.rs index 885ff71a37ed..8a480ad73baa 100644 --- a/src/query/storages/stage/src/row_based_file/pipeline.rs +++ b/src/query/storages/stage/src/row_based_file/pipeline.rs @@ -14,12 +14,12 @@ use std::sync::Arc; -use common_catalog::plan::StageTableInfo; -use common_catalog::table_context::TableContext; -use common_exception::Result; -use common_formats::FileFormatOptionsExt; -use common_pipeline_core::Pipeline; -use common_pipeline_sources::input_formats::InputContext; +use databend_common_catalog::plan::StageTableInfo; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::Result; +use databend_common_formats::FileFormatOptionsExt; +use databend_common_pipeline_core::Pipeline; +use databend_common_pipeline_sources::input_formats::InputContext; use opendal::Operator; use crate::row_based_file::limit_file_size_processor::LimitFileSizeProcessor; diff --git a/src/query/storages/stage/src/row_based_file/serialize_processor.rs b/src/query/storages/stage/src/row_based_file/serialize_processor.rs index a87b97d78f97..3d1eb7ab5fb4 100644 --- a/src/query/storages/stage/src/row_based_file/serialize_processor.rs +++ b/src/query/storages/stage/src/row_based_file/serialize_processor.rs @@ -14,16 +14,16 @@ use std::sync::Arc; -use common_base::base::ProgressValues; -use common_catalog::table_context::TableContext; -use common_exception::Result; -use common_expression::DataBlock; -use common_formats::output_format::OutputFormat; -use common_pipeline_core::processors::InputPort; -use common_pipeline_core::processors::OutputPort; -use common_pipeline_core::processors::ProcessorPtr; -use common_pipeline_transforms::processors::Transform; -use common_pipeline_transforms::processors::Transformer; +use databend_common_base::base::ProgressValues; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::Result; +use databend_common_expression::DataBlock; +use databend_common_formats::output_format::OutputFormat; +use databend_common_pipeline_core::processors::InputPort; +use databend_common_pipeline_core::processors::OutputPort; +use databend_common_pipeline_core::processors::ProcessorPtr; +use databend_common_pipeline_transforms::processors::Transform; +use databend_common_pipeline_transforms::processors::Transformer; use crate::row_based_file::buffers::FileOutputBuffers; diff --git a/src/query/storages/stage/src/row_based_file/sink_processor.rs b/src/query/storages/stage/src/row_based_file/sink_processor.rs index 260fc013e529..046201b301a7 100644 --- a/src/query/storages/stage/src/row_based_file/sink_processor.rs +++ b/src/query/storages/stage/src/row_based_file/sink_processor.rs @@ -17,16 +17,16 @@ use std::mem; use std::sync::Arc; use async_trait::async_trait; -use common_catalog::plan::StageTableInfo; -use common_compress::CompressAlgorithm; -use common_compress::CompressCodec; -use common_exception::Result; -use common_expression::BlockMetaInfoDowncast; -use common_expression::DataBlock; -use common_pipeline_core::processors::Event; -use common_pipeline_core::processors::InputPort; -use common_pipeline_core::processors::Processor; -use common_pipeline_core::processors::ProcessorPtr; +use databend_common_catalog::plan::StageTableInfo; +use databend_common_compress::CompressAlgorithm; +use databend_common_compress::CompressCodec; +use databend_common_exception::Result; +use databend_common_expression::BlockMetaInfoDowncast; +use databend_common_expression::DataBlock; +use databend_common_pipeline_core::processors::Event; +use databend_common_pipeline_core::processors::InputPort; +use databend_common_pipeline_core::processors::Processor; +use databend_common_pipeline_core::processors::ProcessorPtr; use opendal::Operator; use crate::row_based_file::buffers::FileOutputBuffers; diff --git a/src/query/storages/stage/src/stage_table.rs b/src/query/storages/stage/src/stage_table.rs index 3ef83ee5ff76..0f34046e108b 100644 --- a/src/query/storages/stage/src/stage_table.rs +++ b/src/query/storages/stage/src/stage_table.rs @@ -18,34 +18,34 @@ use std::ops::Deref; use std::sync::atomic::AtomicUsize; use std::sync::Arc; -use common_base::base::uuid; -use common_catalog::plan::DataSourceInfo; -use common_catalog::plan::DataSourcePlan; -use common_catalog::plan::PartInfo; -use common_catalog::plan::PartStatistics; -use common_catalog::plan::Partitions; -use common_catalog::plan::PartitionsShuffleKind; -use common_catalog::plan::Projection; -use common_catalog::plan::PushDownInfo; -use common_catalog::plan::StageTableInfo; -use common_catalog::table::AppendMode; -use common_catalog::table::Table; -use common_catalog::table_context::TableContext; -use common_compress::CompressAlgorithm; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::BlockThresholds; -use common_expression::TableSchemaRefExt; -use common_meta_app::principal::FileFormatParams; -use common_meta_app::principal::StageInfo; -use common_meta_app::schema::TableInfo; -use common_pipeline_core::Pipeline; -use common_pipeline_sources::input_formats::InputContext; -use common_pipeline_sources::input_formats::SplitInfo; -use common_storage::init_stage_operator; -use common_storage::StageFileInfo; -use common_storage::STDIN_FD; use dashmap::DashMap; +use databend_common_base::base::uuid; +use databend_common_catalog::plan::DataSourceInfo; +use databend_common_catalog::plan::DataSourcePlan; +use databend_common_catalog::plan::PartInfo; +use databend_common_catalog::plan::PartStatistics; +use databend_common_catalog::plan::Partitions; +use databend_common_catalog::plan::PartitionsShuffleKind; +use databend_common_catalog::plan::Projection; +use databend_common_catalog::plan::PushDownInfo; +use databend_common_catalog::plan::StageTableInfo; +use databend_common_catalog::table::AppendMode; +use databend_common_catalog::table::Table; +use databend_common_catalog::table_context::TableContext; +use databend_common_compress::CompressAlgorithm; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::BlockThresholds; +use databend_common_expression::TableSchemaRefExt; +use databend_common_meta_app::principal::FileFormatParams; +use databend_common_meta_app::principal::StageInfo; +use databend_common_meta_app::schema::TableInfo; +use databend_common_pipeline_core::Pipeline; +use databend_common_pipeline_sources::input_formats::InputContext; +use databend_common_pipeline_sources::input_formats::SplitInfo; +use databend_common_storage::init_stage_operator; +use databend_common_storage::StageFileInfo; +use databend_common_storage::STDIN_FD; use log::debug; use opendal::Operator; use opendal::Scheme; diff --git a/src/query/storages/stream/Cargo.toml b/src/query/storages/stream/Cargo.toml index df56316fe0fa..6abcaa1b0833 100644 --- a/src/query/storages/stream/Cargo.toml +++ b/src/query/storages/stream/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "common-storages-stream" +name = "databend-common-storages-stream" version = { workspace = true } authors = { workspace = true } license = { workspace = true } @@ -12,19 +12,19 @@ doctest = false test = false [dependencies] -common-base = { path = "../../../common/base" } -common-catalog = { path = "../../catalog" } -common-exception = { path = "../../../common/exception" } -common-expression = { path = "../../expression" } -common-meta-app = { path = "../../../meta/app" } -common-metrics = { path = "../../../common/metrics" } -common-pipeline-core = { path = "../../pipeline/core" } -common-pipeline-sources = { path = "../../pipeline/sources" } -common-sql = { path = "../../sql" } -common-storages-fuse = { path = "../fuse" } +databend-common-base = { path = "../../../common/base" } +databend-common-catalog = { path = "../../catalog" } +databend-common-exception = { path = "../../../common/exception" } +databend-common-expression = { path = "../../expression" } +databend-common-meta-app = { path = "../../../meta/app" } +databend-common-metrics = { path = "../../../common/metrics" } +databend-common-pipeline-core = { path = "../../pipeline/core" } +databend-common-pipeline-sources = { path = "../../pipeline/sources" } +databend-common-sql = { path = "../../sql" } +databend-common-storages-fuse = { path = "../fuse" } -storages-common-pruner = { path = "../common/pruner" } -storages-common-table-meta = { path = "../common/table_meta" } +databend-storages-common-pruner = { path = "../common/pruner" } +databend-storages-common-table-meta = { path = "../common/table_meta" } async-backtrace = { workspace = true } async-trait = { workspace = true } diff --git a/src/query/storages/stream/src/stream_pruner.rs b/src/query/storages/stream/src/stream_pruner.rs index d2c8515b1053..c6163ed7be53 100644 --- a/src/query/storages/stream/src/stream_pruner.rs +++ b/src/query/storages/stream/src/stream_pruner.rs @@ -18,25 +18,25 @@ use std::pin::Pin; use std::sync::Arc; use std::time::Instant; -use common_base::base::tokio::sync::OwnedSemaphorePermit; -use common_base::runtime::TrySpawn; -use common_catalog::plan::PushDownInfo; -use common_catalog::table_context::TableContext; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::RemoteExpr; -use common_expression::TableSchemaRef; -use common_metrics::storage::*; -use common_sql::BloomIndexColumns; -use common_storages_fuse::pruning::BloomPruner; -use common_storages_fuse::pruning::PruningContext; +use databend_common_base::base::tokio::sync::OwnedSemaphorePermit; +use databend_common_base::runtime::TrySpawn; +use databend_common_catalog::plan::PushDownInfo; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::RemoteExpr; +use databend_common_expression::TableSchemaRef; +use databend_common_metrics::storage::*; +use databend_common_sql::BloomIndexColumns; +use databend_common_storages_fuse::pruning::BloomPruner; +use databend_common_storages_fuse::pruning::PruningContext; +use databend_storages_common_pruner::BlockMetaIndex; +use databend_storages_common_pruner::TopNPrunner; +use databend_storages_common_table_meta::meta::BlockMeta; +use databend_storages_common_table_meta::meta::ClusterKey; use futures_util::future; use log::warn; use opendal::Operator; -use storages_common_pruner::BlockMetaIndex; -use storages_common_pruner::TopNPrunner; -use storages_common_table_meta::meta::BlockMeta; -use storages_common_table_meta::meta::ClusterKey; pub struct StreamPruner { max_concurrency: usize, @@ -167,7 +167,7 @@ impl StreamPruner { } // Pruning stats. - pub fn pruning_stats(&self) -> common_catalog::plan::PruningStatistics { + pub fn pruning_stats(&self) -> databend_common_catalog::plan::PruningStatistics { let stats = self.pruning_ctx.pruning_stats.clone(); let segments_range_pruning_before = stats.get_segments_range_pruning_before() as usize; @@ -179,7 +179,7 @@ impl StreamPruner { let blocks_bloom_pruning_before = stats.get_blocks_bloom_pruning_before() as usize; let blocks_bloom_pruning_after = stats.get_blocks_bloom_pruning_after() as usize; - common_catalog::plan::PruningStatistics { + databend_common_catalog::plan::PruningStatistics { segments_range_pruning_before, segments_range_pruning_after, blocks_range_pruning_before, diff --git a/src/query/storages/stream/src/stream_status_table_func.rs b/src/query/storages/stream/src/stream_status_table_func.rs index 0f401fe47f58..e90559fcd59f 100644 --- a/src/query/storages/stream/src/stream_status_table_func.rs +++ b/src/query/storages/stream/src/stream_status_table_func.rs @@ -15,33 +15,33 @@ use std::any::Any; use std::sync::Arc; -use common_catalog::plan::DataSourcePlan; -use common_catalog::plan::PartStatistics; -use common_catalog::plan::Partitions; -use common_catalog::plan::PushDownInfo; -use common_catalog::table::Table; -use common_catalog::table_args::TableArgs; -use common_catalog::table_context::TableContext; -use common_catalog::table_function::TableFunction; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::types::BooleanType; -use common_expression::DataBlock; -use common_expression::FromData; -use common_expression::TableDataType; -use common_expression::TableField; -use common_expression::TableSchema; -use common_expression::TableSchemaRefExt; -use common_meta_app::schema::TableIdent; -use common_meta_app::schema::TableInfo; -use common_meta_app::schema::TableMeta; -use common_pipeline_core::processors::OutputPort; -use common_pipeline_core::processors::ProcessorPtr; -use common_pipeline_core::Pipeline; -use common_pipeline_sources::AsyncSource; -use common_pipeline_sources::AsyncSourcer; -use common_storages_fuse::table_functions::string_literal; -use common_storages_fuse::table_functions::string_value; +use databend_common_catalog::plan::DataSourcePlan; +use databend_common_catalog::plan::PartStatistics; +use databend_common_catalog::plan::Partitions; +use databend_common_catalog::plan::PushDownInfo; +use databend_common_catalog::table::Table; +use databend_common_catalog::table_args::TableArgs; +use databend_common_catalog::table_context::TableContext; +use databend_common_catalog::table_function::TableFunction; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::types::BooleanType; +use databend_common_expression::DataBlock; +use databend_common_expression::FromData; +use databend_common_expression::TableDataType; +use databend_common_expression::TableField; +use databend_common_expression::TableSchema; +use databend_common_expression::TableSchemaRefExt; +use databend_common_meta_app::schema::TableIdent; +use databend_common_meta_app::schema::TableInfo; +use databend_common_meta_app::schema::TableMeta; +use databend_common_pipeline_core::processors::OutputPort; +use databend_common_pipeline_core::processors::ProcessorPtr; +use databend_common_pipeline_core::Pipeline; +use databend_common_pipeline_sources::AsyncSource; +use databend_common_pipeline_sources::AsyncSourcer; +use databend_common_storages_fuse::table_functions::string_literal; +use databend_common_storages_fuse::table_functions::string_value; use crate::stream_table::StreamStatus; use crate::stream_table::StreamTable; diff --git a/src/query/storages/stream/src/stream_table.rs b/src/query/storages/stream/src/stream_table.rs index 6dc8d578abe0..16bc7ba85004 100644 --- a/src/query/storages/stream/src/stream_table.rs +++ b/src/query/storages/stream/src/stream_table.rs @@ -19,37 +19,37 @@ use std::str::FromStr; use std::sync::Arc; use std::time::Instant; -use common_base::base::tokio::runtime::Handle; -use common_base::base::tokio::task::block_in_place; -use common_catalog::catalog::StorageDescription; -use common_catalog::plan::block_id_from_location; -use common_catalog::plan::DataSourcePlan; -use common_catalog::plan::PartStatistics; -use common_catalog::plan::Partitions; -use common_catalog::plan::PartitionsShuffleKind; -use common_catalog::plan::PushDownInfo; -use common_catalog::plan::StreamColumn; -use common_catalog::plan::StreamTablePart; -use common_catalog::table::Table; -use common_catalog::table_context::TableContext; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::types::decimal::Decimal128Type; -use common_expression::FromData; -use common_expression::RemoteExpr; -use common_expression::Scalar; -use common_expression::BASE_BLOCK_IDS_COL_NAME; -use common_expression::ORIGIN_BLOCK_ID_COL_NAME; -use common_expression::ORIGIN_BLOCK_ROW_NUM_COL_NAME; -use common_expression::ORIGIN_VERSION_COL_NAME; -use common_meta_app::schema::TableInfo; -use common_pipeline_core::Pipeline; -use common_sql::binder::STREAM_COLUMN_FACTORY; -use common_storages_fuse::io::SegmentsIO; -use common_storages_fuse::io::SnapshotsIO; -use common_storages_fuse::FuseTable; -use storages_common_table_meta::meta::SegmentInfo; -use storages_common_table_meta::table::OPT_KEY_SNAPSHOT_LOCATION; +use databend_common_base::base::tokio::runtime::Handle; +use databend_common_base::base::tokio::task::block_in_place; +use databend_common_catalog::catalog::StorageDescription; +use databend_common_catalog::plan::block_id_from_location; +use databend_common_catalog::plan::DataSourcePlan; +use databend_common_catalog::plan::PartStatistics; +use databend_common_catalog::plan::Partitions; +use databend_common_catalog::plan::PartitionsShuffleKind; +use databend_common_catalog::plan::PushDownInfo; +use databend_common_catalog::plan::StreamColumn; +use databend_common_catalog::plan::StreamTablePart; +use databend_common_catalog::table::Table; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::types::decimal::Decimal128Type; +use databend_common_expression::FromData; +use databend_common_expression::RemoteExpr; +use databend_common_expression::Scalar; +use databend_common_expression::BASE_BLOCK_IDS_COL_NAME; +use databend_common_expression::ORIGIN_BLOCK_ID_COL_NAME; +use databend_common_expression::ORIGIN_BLOCK_ROW_NUM_COL_NAME; +use databend_common_expression::ORIGIN_VERSION_COL_NAME; +use databend_common_meta_app::schema::TableInfo; +use databend_common_pipeline_core::Pipeline; +use databend_common_sql::binder::STREAM_COLUMN_FACTORY; +use databend_common_storages_fuse::io::SegmentsIO; +use databend_common_storages_fuse::io::SnapshotsIO; +use databend_common_storages_fuse::FuseTable; +use databend_storages_common_table_meta::meta::SegmentInfo; +use databend_storages_common_table_meta::table::OPT_KEY_SNAPSHOT_LOCATION; use crate::stream_pruner::StreamPruner; diff --git a/src/query/storages/system/Cargo.toml b/src/query/storages/system/Cargo.toml index ed812b0be770..9963edfbe10c 100644 --- a/src/query/storages/system/Cargo.toml +++ b/src/query/storages/system/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "common-storages-system" +name = "databend-common-storages-system" version = { workspace = true } authors = { workspace = true } license = { workspace = true } @@ -12,30 +12,30 @@ doctest = false test = false [dependencies] -common-ast = { path = "../../ast" } -common-base = { path = "../../../common/base" } -common-catalog = { path = "../../catalog" } -common-cloud-control = { path = "../../../common/cloud_control" } -common-config = { path = "../../config" } -common-exception = { path = "../../../common/exception" } -common-expression = { path = "../../expression" } -common-functions = { path = "../../functions" } -common-meta-api = { path = "../../../meta/api" } -common-meta-app = { path = "../../../meta/app" } -common-metrics = { path = "../../../common/metrics" } -common-pipeline-core = { path = "../../pipeline/core" } -common-pipeline-sources = { path = "../../pipeline/sources" } -common-profile = { path = "../../profile" } -common-sql = { path = "../../sql" } -common-storage = { path = "../../../common/storage" } -common-storages-fuse = { path = "../fuse" } -common-storages-result-cache = { path = "../result_cache" } -common-storages-stream = { path = "../stream" } -common-storages-view = { path = "../view" } -common-users = { path = "../../users" } +databend-common-ast = { path = "../../ast" } +databend-common-base = { path = "../../../common/base" } +databend-common-catalog = { path = "../../catalog" } +databend-common-cloud-control = { path = "../../../common/cloud_control" } +databend-common-config = { path = "../../config" } +databend-common-exception = { path = "../../../common/exception" } +databend-common-expression = { path = "../../expression" } +databend-common-functions = { path = "../../functions" } +databend-common-meta-api = { path = "../../../meta/api" } +databend-common-meta-app = { path = "../../../meta/app" } +databend-common-metrics = { path = "../../../common/metrics" } +databend-common-pipeline-core = { path = "../../pipeline/core" } +databend-common-pipeline-sources = { path = "../../pipeline/sources" } +databend-common-profile = { path = "../../profile" } +databend-common-sql = { path = "../../sql" } +databend-common-storage = { path = "../../../common/storage" } +databend-common-storages-fuse = { path = "../fuse" } +databend-common-storages-result-cache = { path = "../result_cache" } +databend-common-storages-stream = { path = "../stream" } +databend-common-storages-view = { path = "../view" } +databend-common-users = { path = "../../users" } +databend-storages-common-cache = { path = "../common/cache" } +databend-storages-common-cache-manager = { path = "../common/cache_manager" } jsonb = { workspace = true } -storages-common-cache = { path = "../common/cache" } -storages-common-cache-manager = { path = "../common/cache_manager" } async-backtrace = { workspace = true } async-trait = { workspace = true } @@ -57,4 +57,4 @@ typetag = { workspace = true } walkdir = { workspace = true } [build-dependencies] -common-building = { path = "../../../common/building" } +databend-common-building = { path = "../../../common/building" } diff --git a/src/query/storages/system/build.rs b/src/query/storages/system/build.rs index af2d49268050..81b1350245e3 100644 --- a/src/query/storages/system/build.rs +++ b/src/query/storages/system/build.rs @@ -15,6 +15,6 @@ #![allow(clippy::uninlined_format_args)] fn main() { - common_building::setup(); - common_building::setup_commit_authors(); + databend_common_building::setup(); + databend_common_building::setup_commit_authors(); } diff --git a/src/query/storages/system/src/background_jobs_table.rs b/src/query/storages/system/src/background_jobs_table.rs index c7eec182fcb7..1d708850dc7e 100644 --- a/src/query/storages/system/src/background_jobs_table.rs +++ b/src/query/storages/system/src/background_jobs_table.rs @@ -14,26 +14,26 @@ use std::sync::Arc; -use common_catalog::plan::PushDownInfo; -use common_catalog::table::Table; -use common_catalog::table_context::TableContext; -use common_exception::Result; -use common_expression::types::NumberDataType; -use common_expression::types::NumberType; -use common_expression::types::StringType; -use common_expression::types::TimestampType; -use common_expression::DataBlock; -use common_expression::FromData; -use common_expression::TableDataType; -use common_expression::TableField; -use common_expression::TableSchemaRefExt; -use common_meta_api::BackgroundApi; -use common_meta_app::background::BackgroundJobType; -use common_meta_app::background::ListBackgroundJobsReq; -use common_meta_app::schema::TableIdent; -use common_meta_app::schema::TableInfo; -use common_meta_app::schema::TableMeta; -use common_users::UserApiProvider; +use databend_common_catalog::plan::PushDownInfo; +use databend_common_catalog::table::Table; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::Result; +use databend_common_expression::types::NumberDataType; +use databend_common_expression::types::NumberType; +use databend_common_expression::types::StringType; +use databend_common_expression::types::TimestampType; +use databend_common_expression::DataBlock; +use databend_common_expression::FromData; +use databend_common_expression::TableDataType; +use databend_common_expression::TableField; +use databend_common_expression::TableSchemaRefExt; +use databend_common_meta_api::BackgroundApi; +use databend_common_meta_app::background::BackgroundJobType; +use databend_common_meta_app::background::ListBackgroundJobsReq; +use databend_common_meta_app::schema::TableIdent; +use databend_common_meta_app::schema::TableInfo; +use databend_common_meta_app::schema::TableMeta; +use databend_common_users::UserApiProvider; use crate::table::AsyncOneBlockSystemTable; use crate::table::AsyncSystemTable; diff --git a/src/query/storages/system/src/background_tasks_table.rs b/src/query/storages/system/src/background_tasks_table.rs index 90929e97e6ac..0b006941931a 100644 --- a/src/query/storages/system/src/background_tasks_table.rs +++ b/src/query/storages/system/src/background_tasks_table.rs @@ -14,26 +14,26 @@ use std::sync::Arc; -use common_catalog::plan::PushDownInfo; -use common_catalog::table::Table; -use common_catalog::table_context::TableContext; -use common_exception::Result; -use common_expression::types::NumberDataType; -use common_expression::types::NumberType; -use common_expression::types::StringType; -use common_expression::types::TimestampType; -use common_expression::types::VariantType; -use common_expression::DataBlock; -use common_expression::FromData; -use common_expression::TableDataType; -use common_expression::TableField; -use common_expression::TableSchemaRefExt; -use common_meta_api::BackgroundApi; -use common_meta_app::background::ListBackgroundTasksReq; -use common_meta_app::schema::TableIdent; -use common_meta_app::schema::TableInfo; -use common_meta_app::schema::TableMeta; -use common_users::UserApiProvider; +use databend_common_catalog::plan::PushDownInfo; +use databend_common_catalog::table::Table; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::Result; +use databend_common_expression::types::NumberDataType; +use databend_common_expression::types::NumberType; +use databend_common_expression::types::StringType; +use databend_common_expression::types::TimestampType; +use databend_common_expression::types::VariantType; +use databend_common_expression::DataBlock; +use databend_common_expression::FromData; +use databend_common_expression::TableDataType; +use databend_common_expression::TableField; +use databend_common_expression::TableSchemaRefExt; +use databend_common_meta_api::BackgroundApi; +use databend_common_meta_app::background::ListBackgroundTasksReq; +use databend_common_meta_app::schema::TableIdent; +use databend_common_meta_app::schema::TableInfo; +use databend_common_meta_app::schema::TableMeta; +use databend_common_users::UserApiProvider; use crate::table::AsyncOneBlockSystemTable; use crate::table::AsyncSystemTable; diff --git a/src/query/storages/system/src/backtrace_table.rs b/src/query/storages/system/src/backtrace_table.rs index 861fb317a840..6ec64a5b82d9 100644 --- a/src/query/storages/system/src/backtrace_table.rs +++ b/src/query/storages/system/src/backtrace_table.rs @@ -16,20 +16,20 @@ use std::any::type_name; use std::fmt::Write; use std::sync::Arc; -use common_base::get_all_tasks; -use common_base::runtime::Runtime; -use common_catalog::table::Table; -use common_catalog::table_context::TableContext; -use common_exception::Result; -use common_expression::types::StringType; -use common_expression::DataBlock; -use common_expression::FromData; -use common_expression::TableDataType; -use common_expression::TableField; -use common_expression::TableSchemaRefExt; -use common_meta_app::schema::TableIdent; -use common_meta_app::schema::TableInfo; -use common_meta_app::schema::TableMeta; +use databend_common_base::get_all_tasks; +use databend_common_base::runtime::Runtime; +use databend_common_catalog::table::Table; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::Result; +use databend_common_expression::types::StringType; +use databend_common_expression::DataBlock; +use databend_common_expression::FromData; +use databend_common_expression::TableDataType; +use databend_common_expression::TableField; +use databend_common_expression::TableSchemaRefExt; +use databend_common_meta_app::schema::TableIdent; +use databend_common_meta_app::schema::TableInfo; +use databend_common_meta_app::schema::TableMeta; use regex::Captures; use crate::SyncOneBlockSystemTable; diff --git a/src/query/storages/system/src/build_options_table.rs b/src/query/storages/system/src/build_options_table.rs index f671df5b64ac..0de2cb47fda3 100644 --- a/src/query/storages/system/src/build_options_table.rs +++ b/src/query/storages/system/src/build_options_table.rs @@ -15,18 +15,18 @@ use std::cmp::max; use std::sync::Arc; -use common_catalog::table::Table; -use common_catalog::table_context::TableContext; -use common_exception::Result; -use common_expression::types::StringType; -use common_expression::utils::FromData; -use common_expression::DataBlock; -use common_expression::TableDataType; -use common_expression::TableField; -use common_expression::TableSchemaRefExt; -use common_meta_app::schema::TableIdent; -use common_meta_app::schema::TableInfo; -use common_meta_app::schema::TableMeta; +use databend_common_catalog::table::Table; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::Result; +use databend_common_expression::types::StringType; +use databend_common_expression::utils::FromData; +use databend_common_expression::DataBlock; +use databend_common_expression::TableDataType; +use databend_common_expression::TableField; +use databend_common_expression::TableSchemaRefExt; +use databend_common_meta_app::schema::TableIdent; +use databend_common_meta_app::schema::TableInfo; +use databend_common_meta_app::schema::TableMeta; use crate::SyncOneBlockSystemTable; use crate::SyncSystemTable; diff --git a/src/query/storages/system/src/caches_table.rs b/src/query/storages/system/src/caches_table.rs index 08746f695614..aebb0ea006cb 100644 --- a/src/query/storages/system/src/caches_table.rs +++ b/src/query/storages/system/src/caches_table.rs @@ -14,22 +14,22 @@ use std::sync::Arc; -use common_catalog::table::Table; -use common_exception::Result; -use common_expression::types::NumberDataType; -use common_expression::types::StringType; -use common_expression::types::UInt64Type; -use common_expression::DataBlock; -use common_expression::FromData; -use common_expression::TableDataType; -use common_expression::TableField; -use common_expression::TableSchemaRefExt; -use common_meta_app::schema::TableIdent; -use common_meta_app::schema::TableInfo; -use common_meta_app::schema::TableMeta; -use common_storages_fuse::TableContext; -use storages_common_cache::CacheAccessor; -use storages_common_cache_manager::CacheManager; +use databend_common_catalog::table::Table; +use databend_common_exception::Result; +use databend_common_expression::types::NumberDataType; +use databend_common_expression::types::StringType; +use databend_common_expression::types::UInt64Type; +use databend_common_expression::DataBlock; +use databend_common_expression::FromData; +use databend_common_expression::TableDataType; +use databend_common_expression::TableField; +use databend_common_expression::TableSchemaRefExt; +use databend_common_meta_app::schema::TableIdent; +use databend_common_meta_app::schema::TableInfo; +use databend_common_meta_app::schema::TableMeta; +use databend_common_storages_fuse::TableContext; +use databend_storages_common_cache::CacheAccessor; +use databend_storages_common_cache_manager::CacheManager; use crate::SyncOneBlockSystemTable; use crate::SyncSystemTable; diff --git a/src/query/storages/system/src/catalogs_table.rs b/src/query/storages/system/src/catalogs_table.rs index 56d42e9f9c34..dbd94dfe4e58 100644 --- a/src/query/storages/system/src/catalogs_table.rs +++ b/src/query/storages/system/src/catalogs_table.rs @@ -14,20 +14,20 @@ use std::sync::Arc; -use common_catalog::catalog::CatalogManager; -use common_catalog::plan::PushDownInfo; -use common_catalog::table::Table; -use common_catalog::table_context::TableContext; -use common_exception::Result; -use common_expression::types::StringType; -use common_expression::utils::FromData; -use common_expression::DataBlock; -use common_expression::TableDataType; -use common_expression::TableField; -use common_expression::TableSchemaRefExt; -use common_meta_app::schema::TableIdent; -use common_meta_app::schema::TableInfo; -use common_meta_app::schema::TableMeta; +use databend_common_catalog::catalog::CatalogManager; +use databend_common_catalog::plan::PushDownInfo; +use databend_common_catalog::table::Table; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::Result; +use databend_common_expression::types::StringType; +use databend_common_expression::utils::FromData; +use databend_common_expression::DataBlock; +use databend_common_expression::TableDataType; +use databend_common_expression::TableField; +use databend_common_expression::TableSchemaRefExt; +use databend_common_meta_app::schema::TableIdent; +use databend_common_meta_app::schema::TableInfo; +use databend_common_meta_app::schema::TableMeta; use super::table::AsyncOneBlockSystemTable; use super::table::AsyncSystemTable; diff --git a/src/query/storages/system/src/clustering_history_table.rs b/src/query/storages/system/src/clustering_history_table.rs index 1e8fa2ab319a..9831126eb8fd 100644 --- a/src/query/storages/system/src/clustering_history_table.rs +++ b/src/query/storages/system/src/clustering_history_table.rs @@ -12,15 +12,15 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_exception::Result; -use common_expression::types::number::NumberScalar; -use common_expression::types::NumberDataType; -use common_expression::ColumnBuilder; -use common_expression::Scalar; -use common_expression::TableDataType; -use common_expression::TableField; -use common_expression::TableSchemaRef; -use common_expression::TableSchemaRefExt; +use databend_common_exception::Result; +use databend_common_expression::types::number::NumberScalar; +use databend_common_expression::types::NumberDataType; +use databend_common_expression::ColumnBuilder; +use databend_common_expression::Scalar; +use databend_common_expression::TableDataType; +use databend_common_expression::TableField; +use databend_common_expression::TableSchemaRef; +use databend_common_expression::TableSchemaRefExt; use crate::SystemLogElement; use crate::SystemLogQueue; diff --git a/src/query/storages/system/src/clusters_table.rs b/src/query/storages/system/src/clusters_table.rs index 3126d643a020..f050035131c2 100644 --- a/src/query/storages/system/src/clusters_table.rs +++ b/src/query/storages/system/src/clusters_table.rs @@ -14,21 +14,21 @@ use std::sync::Arc; -use common_catalog::table::Table; -use common_catalog::table_context::TableContext; -use common_exception::Result; -use common_expression::types::number::NumberScalar; -use common_expression::types::DataType; -use common_expression::types::NumberDataType; -use common_expression::ColumnBuilder; -use common_expression::DataBlock; -use common_expression::Scalar; -use common_expression::TableDataType; -use common_expression::TableField; -use common_expression::TableSchemaRefExt; -use common_meta_app::schema::TableIdent; -use common_meta_app::schema::TableInfo; -use common_meta_app::schema::TableMeta; +use databend_common_catalog::table::Table; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::Result; +use databend_common_expression::types::number::NumberScalar; +use databend_common_expression::types::DataType; +use databend_common_expression::types::NumberDataType; +use databend_common_expression::ColumnBuilder; +use databend_common_expression::DataBlock; +use databend_common_expression::Scalar; +use databend_common_expression::TableDataType; +use databend_common_expression::TableField; +use databend_common_expression::TableSchemaRefExt; +use databend_common_meta_app::schema::TableIdent; +use databend_common_meta_app::schema::TableInfo; +use databend_common_meta_app::schema::TableMeta; use crate::SyncOneBlockSystemTable; use crate::SyncSystemTable; diff --git a/src/query/storages/system/src/columns_table.rs b/src/query/storages/system/src/columns_table.rs index ab3dd7de2e15..35f09c8a84e3 100644 --- a/src/query/storages/system/src/columns_table.rs +++ b/src/query/storages/system/src/columns_table.rs @@ -14,26 +14,26 @@ use std::sync::Arc; -use common_catalog::catalog_kind::CATALOG_DEFAULT; -use common_catalog::plan::PushDownInfo; -use common_catalog::table::Table; -use common_catalog::table_context::TableContext; -use common_exception::Result; -use common_expression::infer_table_schema; -use common_expression::types::StringType; -use common_expression::utils::FromData; -use common_expression::DataBlock; -use common_expression::Scalar; -use common_expression::TableDataType; -use common_expression::TableField; -use common_expression::TableSchemaRefExt; -use common_functions::BUILTIN_FUNCTIONS; -use common_meta_app::schema::TableIdent; -use common_meta_app::schema::TableInfo; -use common_meta_app::schema::TableMeta; -use common_sql::Planner; -use common_storages_view::view_table::QUERY; -use common_storages_view::view_table::VIEW_ENGINE; +use databend_common_catalog::catalog_kind::CATALOG_DEFAULT; +use databend_common_catalog::plan::PushDownInfo; +use databend_common_catalog::table::Table; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::Result; +use databend_common_expression::infer_table_schema; +use databend_common_expression::types::StringType; +use databend_common_expression::utils::FromData; +use databend_common_expression::DataBlock; +use databend_common_expression::Scalar; +use databend_common_expression::TableDataType; +use databend_common_expression::TableField; +use databend_common_expression::TableSchemaRefExt; +use databend_common_functions::BUILTIN_FUNCTIONS; +use databend_common_meta_app::schema::TableIdent; +use databend_common_meta_app::schema::TableInfo; +use databend_common_meta_app::schema::TableMeta; +use databend_common_sql::Planner; +use databend_common_storages_view::view_table::QUERY; +use databend_common_storages_view::view_table::VIEW_ENGINE; use crate::table::AsyncOneBlockSystemTable; use crate::table::AsyncSystemTable; diff --git a/src/query/storages/system/src/configs_table.rs b/src/query/storages/system/src/configs_table.rs index 3080ea932e3e..ee64b5b7609b 100644 --- a/src/query/storages/system/src/configs_table.rs +++ b/src/query/storages/system/src/configs_table.rs @@ -14,21 +14,21 @@ use std::sync::Arc; -use common_base::base::mask_string; -use common_catalog::table::Table; -use common_catalog::table_context::TableContext; -use common_config::Config; -use common_config::GlobalConfig; -use common_exception::Result; -use common_expression::types::StringType; -use common_expression::utils::FromData; -use common_expression::DataBlock; -use common_expression::TableDataType; -use common_expression::TableField; -use common_expression::TableSchemaRefExt; -use common_meta_app::schema::TableIdent; -use common_meta_app::schema::TableInfo; -use common_meta_app::schema::TableMeta; +use databend_common_base::base::mask_string; +use databend_common_catalog::table::Table; +use databend_common_catalog::table_context::TableContext; +use databend_common_config::Config; +use databend_common_config::GlobalConfig; +use databend_common_exception::Result; +use databend_common_expression::types::StringType; +use databend_common_expression::utils::FromData; +use databend_common_expression::DataBlock; +use databend_common_expression::TableDataType; +use databend_common_expression::TableField; +use databend_common_expression::TableSchemaRefExt; +use databend_common_meta_app::schema::TableIdent; +use databend_common_meta_app::schema::TableInfo; +use databend_common_meta_app::schema::TableMeta; use itertools::Itertools; use serde_json::Value as JsonValue; use serde_json::Value; diff --git a/src/query/storages/system/src/contributors_table.rs b/src/query/storages/system/src/contributors_table.rs index 3de696e8f233..5d1216e16689 100644 --- a/src/query/storages/system/src/contributors_table.rs +++ b/src/query/storages/system/src/contributors_table.rs @@ -14,18 +14,18 @@ use std::sync::Arc; -use common_catalog::table::Table; -use common_catalog::table_context::TableContext; -use common_exception::Result; -use common_expression::types::StringType; -use common_expression::utils::FromData; -use common_expression::DataBlock; -use common_expression::TableDataType; -use common_expression::TableField; -use common_expression::TableSchemaRefExt; -use common_meta_app::schema::TableIdent; -use common_meta_app::schema::TableInfo; -use common_meta_app::schema::TableMeta; +use databend_common_catalog::table::Table; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::Result; +use databend_common_expression::types::StringType; +use databend_common_expression::utils::FromData; +use databend_common_expression::DataBlock; +use databend_common_expression::TableDataType; +use databend_common_expression::TableField; +use databend_common_expression::TableSchemaRefExt; +use databend_common_meta_app::schema::TableIdent; +use databend_common_meta_app::schema::TableInfo; +use databend_common_meta_app::schema::TableMeta; use crate::SyncOneBlockSystemTable; use crate::SyncSystemTable; diff --git a/src/query/storages/system/src/credits_table.rs b/src/query/storages/system/src/credits_table.rs index 2539624186d5..0b14b38847bb 100644 --- a/src/query/storages/system/src/credits_table.rs +++ b/src/query/storages/system/src/credits_table.rs @@ -14,18 +14,18 @@ use std::sync::Arc; -use common_catalog::table::Table; -use common_catalog::table_context::TableContext; -use common_exception::Result; -use common_expression::types::StringType; -use common_expression::utils::FromData; -use common_expression::DataBlock; -use common_expression::TableDataType; -use common_expression::TableField; -use common_expression::TableSchemaRefExt; -use common_meta_app::schema::TableIdent; -use common_meta_app::schema::TableInfo; -use common_meta_app::schema::TableMeta; +use databend_common_catalog::table::Table; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::Result; +use databend_common_expression::types::StringType; +use databend_common_expression::utils::FromData; +use databend_common_expression::DataBlock; +use databend_common_expression::TableDataType; +use databend_common_expression::TableField; +use databend_common_expression::TableSchemaRefExt; +use databend_common_meta_app::schema::TableIdent; +use databend_common_meta_app::schema::TableInfo; +use databend_common_meta_app::schema::TableMeta; use crate::SyncOneBlockSystemTable; use crate::SyncSystemTable; diff --git a/src/query/storages/system/src/databases_table.rs b/src/query/storages/system/src/databases_table.rs index 3533993343b3..8a5b8e00e66d 100644 --- a/src/query/storages/system/src/databases_table.rs +++ b/src/query/storages/system/src/databases_table.rs @@ -14,23 +14,23 @@ use std::sync::Arc; -use common_catalog::catalog::Catalog; -use common_catalog::catalog::CatalogManager; -use common_catalog::plan::PushDownInfo; -use common_catalog::table::Table; -use common_catalog::table_context::TableContext; -use common_exception::Result; -use common_expression::types::NumberDataType; -use common_expression::types::StringType; -use common_expression::types::UInt64Type; -use common_expression::utils::FromData; -use common_expression::DataBlock; -use common_expression::TableDataType; -use common_expression::TableField; -use common_expression::TableSchemaRefExt; -use common_meta_app::schema::TableIdent; -use common_meta_app::schema::TableInfo; -use common_meta_app::schema::TableMeta; +use databend_common_catalog::catalog::Catalog; +use databend_common_catalog::catalog::CatalogManager; +use databend_common_catalog::plan::PushDownInfo; +use databend_common_catalog::table::Table; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::Result; +use databend_common_expression::types::NumberDataType; +use databend_common_expression::types::StringType; +use databend_common_expression::types::UInt64Type; +use databend_common_expression::utils::FromData; +use databend_common_expression::DataBlock; +use databend_common_expression::TableDataType; +use databend_common_expression::TableField; +use databend_common_expression::TableSchemaRefExt; +use databend_common_meta_app::schema::TableIdent; +use databend_common_meta_app::schema::TableInfo; +use databend_common_meta_app::schema::TableMeta; use crate::table::AsyncOneBlockSystemTable; use crate::table::AsyncSystemTable; diff --git a/src/query/storages/system/src/engines_table.rs b/src/query/storages/system/src/engines_table.rs index 31422124eae8..91aea753bf8a 100644 --- a/src/query/storages/system/src/engines_table.rs +++ b/src/query/storages/system/src/engines_table.rs @@ -14,20 +14,20 @@ use std::sync::Arc; -use common_catalog::catalog_kind::CATALOG_DEFAULT; -use common_catalog::plan::PushDownInfo; -use common_catalog::table::Table; -use common_catalog::table_context::TableContext; -use common_exception::Result; -use common_expression::types::StringType; -use common_expression::utils::FromData; -use common_expression::DataBlock; -use common_expression::TableDataType; -use common_expression::TableField; -use common_expression::TableSchemaRefExt; -use common_meta_app::schema::TableIdent; -use common_meta_app::schema::TableInfo; -use common_meta_app::schema::TableMeta; +use databend_common_catalog::catalog_kind::CATALOG_DEFAULT; +use databend_common_catalog::plan::PushDownInfo; +use databend_common_catalog::table::Table; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::Result; +use databend_common_expression::types::StringType; +use databend_common_expression::utils::FromData; +use databend_common_expression::DataBlock; +use databend_common_expression::TableDataType; +use databend_common_expression::TableField; +use databend_common_expression::TableSchemaRefExt; +use databend_common_meta_app::schema::TableIdent; +use databend_common_meta_app::schema::TableInfo; +use databend_common_meta_app::schema::TableMeta; use crate::table::AsyncOneBlockSystemTable; use crate::table::AsyncSystemTable; diff --git a/src/query/storages/system/src/functions_table.rs b/src/query/storages/system/src/functions_table.rs index 474928ae38b4..90cc15bf93f1 100644 --- a/src/query/storages/system/src/functions_table.rs +++ b/src/query/storages/system/src/functions_table.rs @@ -14,25 +14,25 @@ use std::sync::Arc; -use common_catalog::plan::PushDownInfo; -use common_catalog::table::Table; -use common_catalog::table_context::TableContext; -use common_exception::Result; -use common_expression::types::BooleanType; -use common_expression::types::StringType; -use common_expression::utils::FromData; -use common_expression::DataBlock; -use common_expression::TableDataType; -use common_expression::TableField; -use common_expression::TableSchemaRefExt; -use common_functions::aggregates::AggregateFunctionFactory; -use common_functions::BUILTIN_FUNCTIONS; -use common_meta_app::principal::UserDefinedFunction; -use common_meta_app::schema::TableIdent; -use common_meta_app::schema::TableInfo; -use common_meta_app::schema::TableMeta; -use common_sql::TypeChecker; -use common_users::UserApiProvider; +use databend_common_catalog::plan::PushDownInfo; +use databend_common_catalog::table::Table; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::Result; +use databend_common_expression::types::BooleanType; +use databend_common_expression::types::StringType; +use databend_common_expression::utils::FromData; +use databend_common_expression::DataBlock; +use databend_common_expression::TableDataType; +use databend_common_expression::TableField; +use databend_common_expression::TableSchemaRefExt; +use databend_common_functions::aggregates::AggregateFunctionFactory; +use databend_common_functions::BUILTIN_FUNCTIONS; +use databend_common_meta_app::principal::UserDefinedFunction; +use databend_common_meta_app::schema::TableIdent; +use databend_common_meta_app::schema::TableInfo; +use databend_common_meta_app::schema::TableMeta; +use databend_common_sql::TypeChecker; +use databend_common_users::UserApiProvider; use crate::table::AsyncOneBlockSystemTable; use crate::table::AsyncSystemTable; @@ -62,7 +62,7 @@ impl AsyncSystemTable for FunctionsTable { .map(|name| name.to_string()), ); scalar_func_names.extend( - common_ast::ast::Expr::all_function_like_syntaxes() + databend_common_ast::ast::Expr::all_function_like_syntaxes() .iter() .map(|name| name.to_lowercase()), ); diff --git a/src/query/storages/system/src/indexes_table.rs b/src/query/storages/system/src/indexes_table.rs index a45d1f45415f..925cda01dab6 100644 --- a/src/query/storages/system/src/indexes_table.rs +++ b/src/query/storages/system/src/indexes_table.rs @@ -14,22 +14,22 @@ use std::sync::Arc; -use common_catalog::catalog::CATALOG_DEFAULT; -use common_catalog::plan::PushDownInfo; -use common_catalog::table::Table; -use common_exception::Result; -use common_expression::types::StringType; -use common_expression::types::TimestampType; -use common_expression::DataBlock; -use common_expression::FromData; -use common_expression::TableDataType; -use common_expression::TableField; -use common_expression::TableSchemaRefExt; -use common_meta_app::schema::ListIndexesReq; -use common_meta_app::schema::TableIdent; -use common_meta_app::schema::TableInfo; -use common_meta_app::schema::TableMeta; -use common_storages_fuse::TableContext; +use databend_common_catalog::catalog::CATALOG_DEFAULT; +use databend_common_catalog::plan::PushDownInfo; +use databend_common_catalog::table::Table; +use databend_common_exception::Result; +use databend_common_expression::types::StringType; +use databend_common_expression::types::TimestampType; +use databend_common_expression::DataBlock; +use databend_common_expression::FromData; +use databend_common_expression::TableDataType; +use databend_common_expression::TableField; +use databend_common_expression::TableSchemaRefExt; +use databend_common_meta_app::schema::ListIndexesReq; +use databend_common_meta_app::schema::TableIdent; +use databend_common_meta_app::schema::TableInfo; +use databend_common_meta_app::schema::TableMeta; +use databend_common_storages_fuse::TableContext; use crate::table::AsyncOneBlockSystemTable; use crate::table::AsyncSystemTable; diff --git a/src/query/storages/system/src/locks_table.rs b/src/query/storages/system/src/locks_table.rs index 817378720e23..cd9f14e30b2c 100644 --- a/src/query/storages/system/src/locks_table.rs +++ b/src/query/storages/system/src/locks_table.rs @@ -14,27 +14,27 @@ use std::sync::Arc; -use common_catalog::catalog::CatalogManager; -use common_catalog::plan::PushDownInfo; -use common_catalog::table::Table; -use common_catalog::table_context::TableContext; -use common_exception::Result; -use common_expression::types::number::UInt64Type; -use common_expression::types::NumberDataType; -use common_expression::types::StringType; -use common_expression::types::TimestampType; -use common_expression::utils::FromData; -use common_expression::DataBlock; -use common_expression::Scalar; -use common_expression::TableDataType; -use common_expression::TableField; -use common_expression::TableSchemaRef; -use common_expression::TableSchemaRefExt; -use common_functions::BUILTIN_FUNCTIONS; -use common_meta_app::schema::ListLocksReq; -use common_meta_app::schema::TableIdent; -use common_meta_app::schema::TableInfo; -use common_meta_app::schema::TableMeta; +use databend_common_catalog::catalog::CatalogManager; +use databend_common_catalog::plan::PushDownInfo; +use databend_common_catalog::table::Table; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::Result; +use databend_common_expression::types::number::UInt64Type; +use databend_common_expression::types::NumberDataType; +use databend_common_expression::types::StringType; +use databend_common_expression::types::TimestampType; +use databend_common_expression::utils::FromData; +use databend_common_expression::DataBlock; +use databend_common_expression::Scalar; +use databend_common_expression::TableDataType; +use databend_common_expression::TableField; +use databend_common_expression::TableSchemaRef; +use databend_common_expression::TableSchemaRefExt; +use databend_common_functions::BUILTIN_FUNCTIONS; +use databend_common_meta_app::schema::ListLocksReq; +use databend_common_meta_app::schema::TableIdent; +use databend_common_meta_app::schema::TableInfo; +use databend_common_meta_app::schema::TableMeta; use crate::table::AsyncOneBlockSystemTable; use crate::table::AsyncSystemTable; diff --git a/src/query/storages/system/src/log_queue.rs b/src/query/storages/system/src/log_queue.rs index d68ca9a9734d..1b12f9ab2c69 100644 --- a/src/query/storages/system/src/log_queue.rs +++ b/src/query/storages/system/src/log_queue.rs @@ -18,27 +18,27 @@ use std::collections::HashMap; use std::marker::PhantomData; use std::sync::Arc; -use common_catalog::plan::DataSourcePlan; -use common_catalog::plan::PartStatistics; -use common_catalog::plan::Partitions; -use common_catalog::plan::PartitionsShuffleKind; -use common_catalog::plan::PushDownInfo; -use common_catalog::table::Table; -use common_catalog::table_context::TableContext; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::types::DataType; -use common_expression::ColumnBuilder; -use common_expression::DataBlock; -use common_expression::TableSchemaRef; -use common_meta_app::schema::TableIdent; -use common_meta_app::schema::TableInfo; -use common_meta_app::schema::TableMeta; -use common_pipeline_core::processors::OutputPort; -use common_pipeline_core::processors::ProcessorPtr; -use common_pipeline_core::Pipeline; -use common_pipeline_sources::SyncSource; -use common_pipeline_sources::SyncSourcer; +use databend_common_catalog::plan::DataSourcePlan; +use databend_common_catalog::plan::PartStatistics; +use databend_common_catalog::plan::Partitions; +use databend_common_catalog::plan::PartitionsShuffleKind; +use databend_common_catalog::plan::PushDownInfo; +use databend_common_catalog::table::Table; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::types::DataType; +use databend_common_expression::ColumnBuilder; +use databend_common_expression::DataBlock; +use databend_common_expression::TableSchemaRef; +use databend_common_meta_app::schema::TableIdent; +use databend_common_meta_app::schema::TableInfo; +use databend_common_meta_app::schema::TableMeta; +use databend_common_pipeline_core::processors::OutputPort; +use databend_common_pipeline_core::processors::ProcessorPtr; +use databend_common_pipeline_core::Pipeline; +use databend_common_pipeline_sources::SyncSource; +use databend_common_pipeline_sources::SyncSourcer; use once_cell::sync::OnceCell; use parking_lot::RwLock; diff --git a/src/query/storages/system/src/malloc_stats_table.rs b/src/query/storages/system/src/malloc_stats_table.rs index ddfb891e9f98..e24d9e10d3ac 100644 --- a/src/query/storages/system/src/malloc_stats_table.rs +++ b/src/query/storages/system/src/malloc_stats_table.rs @@ -15,21 +15,21 @@ use std::default::Default; use std::sync::Arc; -use common_catalog::table::Table; -use common_catalog::table_context::TableContext; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::types::DataType; -use common_expression::BlockEntry; -use common_expression::DataBlock; -use common_expression::Scalar; -use common_expression::TableDataType; -use common_expression::TableField; -use common_expression::TableSchemaRefExt; -use common_expression::Value; -use common_meta_app::schema::TableIdent; -use common_meta_app::schema::TableInfo; -use common_meta_app::schema::TableMeta; +use databend_common_catalog::table::Table; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::types::DataType; +use databend_common_expression::BlockEntry; +use databend_common_expression::DataBlock; +use databend_common_expression::Scalar; +use databend_common_expression::TableDataType; +use databend_common_expression::TableField; +use databend_common_expression::TableSchemaRefExt; +use databend_common_expression::Value; +use databend_common_meta_app::schema::TableIdent; +use databend_common_meta_app::schema::TableInfo; +use databend_common_meta_app::schema::TableMeta; use crate::SyncOneBlockSystemTable; use crate::SyncSystemTable; diff --git a/src/query/storages/system/src/malloc_stats_totals_table.rs b/src/query/storages/system/src/malloc_stats_totals_table.rs index 96c489e769c9..a0992029e2ab 100644 --- a/src/query/storages/system/src/malloc_stats_totals_table.rs +++ b/src/query/storages/system/src/malloc_stats_totals_table.rs @@ -15,23 +15,23 @@ use std::default::Default; use std::sync::Arc; -use common_catalog::table::Table; -use common_catalog::table_context::TableContext; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::types::string::StringColumnBuilder; -use common_expression::types::NumberDataType; -use common_expression::types::NumberType; -use common_expression::types::StringType; -use common_expression::types::ValueType; -use common_expression::Column; -use common_expression::DataBlock; -use common_expression::TableDataType; -use common_expression::TableField; -use common_expression::TableSchemaRefExt; -use common_meta_app::schema::TableIdent; -use common_meta_app::schema::TableInfo; -use common_meta_app::schema::TableMeta; +use databend_common_catalog::table::Table; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::types::string::StringColumnBuilder; +use databend_common_expression::types::NumberDataType; +use databend_common_expression::types::NumberType; +use databend_common_expression::types::StringType; +use databend_common_expression::types::ValueType; +use databend_common_expression::Column; +use databend_common_expression::DataBlock; +use databend_common_expression::TableDataType; +use databend_common_expression::TableField; +use databend_common_expression::TableSchemaRefExt; +use databend_common_meta_app::schema::TableIdent; +use databend_common_meta_app::schema::TableInfo; +use databend_common_meta_app::schema::TableMeta; use tikv_jemalloc_ctl::epoch; use crate::SyncOneBlockSystemTable; diff --git a/src/query/storages/system/src/metrics_table.rs b/src/query/storages/system/src/metrics_table.rs index d46558275e14..2ade31eeea47 100644 --- a/src/query/storages/system/src/metrics_table.rs +++ b/src/query/storages/system/src/metrics_table.rs @@ -15,23 +15,23 @@ use std::collections::HashMap; use std::sync::Arc; -use common_base::runtime::GLOBAL_MEM_STAT; -use common_catalog::table::Table; -use common_catalog::table_context::TableContext; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::types::StringType; -use common_expression::utils::FromData; -use common_expression::DataBlock; -use common_expression::TableDataType; -use common_expression::TableField; -use common_expression::TableSchemaRefExt; -use common_meta_app::schema::TableIdent; -use common_meta_app::schema::TableInfo; -use common_meta_app::schema::TableMeta; -use common_metrics::reset_global_prometheus_registry; -use common_metrics::MetricSample; -use common_metrics::MetricValue; +use databend_common_base::runtime::GLOBAL_MEM_STAT; +use databend_common_catalog::table::Table; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::types::StringType; +use databend_common_expression::utils::FromData; +use databend_common_expression::DataBlock; +use databend_common_expression::TableDataType; +use databend_common_expression::TableField; +use databend_common_expression::TableSchemaRefExt; +use databend_common_meta_app::schema::TableIdent; +use databend_common_meta_app::schema::TableInfo; +use databend_common_meta_app::schema::TableMeta; +use databend_common_metrics::reset_global_prometheus_registry; +use databend_common_metrics::MetricSample; +use databend_common_metrics::MetricValue; use crate::SyncOneBlockSystemTable; use crate::SyncSystemTable; @@ -54,8 +54,8 @@ impl SyncSystemTable for MetricsTable { let local_id = ctx.get_cluster().local_id.clone(); let mut samples = { - let registry = common_metrics::load_global_prometheus_registry(); - common_metrics::dump_metric_samples(®istry)? + let registry = databend_common_metrics::load_global_prometheus_registry(); + databend_common_metrics::dump_metric_samples(®istry)? }; samples.extend(self.custom_metric_samples()?); diff --git a/src/query/storages/system/src/one_table.rs b/src/query/storages/system/src/one_table.rs index 01c16ba06e83..7d0a3690035b 100644 --- a/src/query/storages/system/src/one_table.rs +++ b/src/query/storages/system/src/one_table.rs @@ -14,23 +14,23 @@ use std::sync::Arc; -use common_catalog::plan::PartStatistics; -use common_catalog::plan::Partitions; -use common_catalog::plan::PartitionsShuffleKind; -use common_catalog::plan::PushDownInfo; -use common_catalog::table::Table; -use common_catalog::table_context::TableContext; -use common_exception::Result; -use common_expression::types::number::UInt8Type; -use common_expression::types::NumberDataType; -use common_expression::utils::FromData; -use common_expression::DataBlock; -use common_expression::TableDataType; -use common_expression::TableField; -use common_expression::TableSchemaRefExt; -use common_meta_app::schema::TableIdent; -use common_meta_app::schema::TableInfo; -use common_meta_app::schema::TableMeta; +use databend_common_catalog::plan::PartStatistics; +use databend_common_catalog::plan::Partitions; +use databend_common_catalog::plan::PartitionsShuffleKind; +use databend_common_catalog::plan::PushDownInfo; +use databend_common_catalog::table::Table; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::Result; +use databend_common_expression::types::number::UInt8Type; +use databend_common_expression::types::NumberDataType; +use databend_common_expression::utils::FromData; +use databend_common_expression::DataBlock; +use databend_common_expression::TableDataType; +use databend_common_expression::TableField; +use databend_common_expression::TableSchemaRefExt; +use databend_common_meta_app::schema::TableIdent; +use databend_common_meta_app::schema::TableInfo; +use databend_common_meta_app::schema::TableMeta; use crate::table::SystemTablePart; use crate::SyncOneBlockSystemTable; diff --git a/src/query/storages/system/src/processes_table.rs b/src/query/storages/system/src/processes_table.rs index a710ea26c071..b608ed91cf59 100644 --- a/src/query/storages/system/src/processes_table.rs +++ b/src/query/storages/system/src/processes_table.rs @@ -16,22 +16,22 @@ use std::net::SocketAddr; use std::sync::Arc; use std::time::Duration; -use common_catalog::table::Table; -use common_catalog::table_context::TableContext; -use common_exception::Result; -use common_expression::types::number::Int64Type; -use common_expression::types::number::UInt32Type; -use common_expression::types::number::UInt64Type; -use common_expression::types::NumberDataType; -use common_expression::types::StringType; -use common_expression::utils::FromData; -use common_expression::DataBlock; -use common_expression::TableDataType; -use common_expression::TableField; -use common_expression::TableSchemaRefExt; -use common_meta_app::schema::TableIdent; -use common_meta_app::schema::TableInfo; -use common_meta_app::schema::TableMeta; +use databend_common_catalog::table::Table; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::Result; +use databend_common_expression::types::number::Int64Type; +use databend_common_expression::types::number::UInt32Type; +use databend_common_expression::types::number::UInt64Type; +use databend_common_expression::types::NumberDataType; +use databend_common_expression::types::StringType; +use databend_common_expression::utils::FromData; +use databend_common_expression::DataBlock; +use databend_common_expression::TableDataType; +use databend_common_expression::TableField; +use databend_common_expression::TableSchemaRefExt; +use databend_common_meta_app::schema::TableIdent; +use databend_common_meta_app::schema::TableInfo; +use databend_common_meta_app::schema::TableMeta; use crate::SyncOneBlockSystemTable; use crate::SyncSystemTable; diff --git a/src/query/storages/system/src/processor_profile_table.rs b/src/query/storages/system/src/processor_profile_table.rs index f4abceb5a2f3..fb4a9576cd9f 100644 --- a/src/query/storages/system/src/processor_profile_table.rs +++ b/src/query/storages/system/src/processor_profile_table.rs @@ -15,21 +15,21 @@ use std::sync::atomic::Ordering; use std::sync::Arc; -use common_catalog::table::Table; -use common_catalog::table_context::TableContext; -use common_exception::Result; -use common_expression::types::NumberDataType; -use common_expression::types::StringType; -use common_expression::types::UInt32Type; -use common_expression::types::UInt64Type; -use common_expression::DataBlock; -use common_expression::FromData; -use common_expression::TableDataType; -use common_expression::TableField; -use common_expression::TableSchemaRefExt; -use common_meta_app::schema::TableIdent; -use common_meta_app::schema::TableInfo; -use common_meta_app::schema::TableMeta; +use databend_common_catalog::table::Table; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::Result; +use databend_common_expression::types::NumberDataType; +use databend_common_expression::types::StringType; +use databend_common_expression::types::UInt32Type; +use databend_common_expression::types::UInt64Type; +use databend_common_expression::DataBlock; +use databend_common_expression::FromData; +use databend_common_expression::TableDataType; +use databend_common_expression::TableField; +use databend_common_expression::TableSchemaRefExt; +use databend_common_meta_app::schema::TableIdent; +use databend_common_meta_app::schema::TableInfo; +use databend_common_meta_app::schema::TableMeta; use crate::SyncOneBlockSystemTable; use crate::SyncSystemTable; diff --git a/src/query/storages/system/src/query_cache_table.rs b/src/query/storages/system/src/query_cache_table.rs index 91ffa03de46b..e88f2d313ff6 100644 --- a/src/query/storages/system/src/query_cache_table.rs +++ b/src/query/storages/system/src/query_cache_table.rs @@ -14,25 +14,25 @@ use std::sync::Arc; -use common_catalog::plan::PushDownInfo; -use common_catalog::table::Table; -use common_catalog::table_context::TableContext; -use common_exception::Result; -use common_expression::types::BooleanType; -use common_expression::types::NumberDataType; -use common_expression::types::StringType; -use common_expression::types::UInt64Type; -use common_expression::DataBlock; -use common_expression::FromData; -use common_expression::TableDataType; -use common_expression::TableField; -use common_expression::TableSchemaRefExt; -use common_meta_app::schema::TableIdent; -use common_meta_app::schema::TableInfo; -use common_meta_app::schema::TableMeta; -use common_storages_result_cache::gen_result_cache_prefix; -use common_storages_result_cache::ResultCacheMetaManager; -use common_users::UserApiProvider; +use databend_common_catalog::plan::PushDownInfo; +use databend_common_catalog::table::Table; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::Result; +use databend_common_expression::types::BooleanType; +use databend_common_expression::types::NumberDataType; +use databend_common_expression::types::StringType; +use databend_common_expression::types::UInt64Type; +use databend_common_expression::DataBlock; +use databend_common_expression::FromData; +use databend_common_expression::TableDataType; +use databend_common_expression::TableField; +use databend_common_expression::TableSchemaRefExt; +use databend_common_meta_app::schema::TableIdent; +use databend_common_meta_app::schema::TableInfo; +use databend_common_meta_app::schema::TableMeta; +use databend_common_storages_result_cache::gen_result_cache_prefix; +use databend_common_storages_result_cache::ResultCacheMetaManager; +use databend_common_users::UserApiProvider; use itertools::Itertools; use crate::table::AsyncOneBlockSystemTable; diff --git a/src/query/storages/system/src/query_log_table.rs b/src/query/storages/system/src/query_log_table.rs index 853ef8b2973a..f9b72f665aa9 100644 --- a/src/query/storages/system/src/query_log_table.rs +++ b/src/query/storages/system/src/query_log_table.rs @@ -13,15 +13,15 @@ // limitations under the License. use chrono::NaiveDateTime; -use common_exception::Result; -use common_expression::types::number::NumberScalar; -use common_expression::types::NumberDataType; -use common_expression::ColumnBuilder; -use common_expression::Scalar; -use common_expression::TableDataType; -use common_expression::TableField; -use common_expression::TableSchemaRef; -use common_expression::TableSchemaRefExt; +use databend_common_exception::Result; +use databend_common_expression::types::number::NumberScalar; +use databend_common_expression::types::NumberDataType; +use databend_common_expression::ColumnBuilder; +use databend_common_expression::Scalar; +use databend_common_expression::TableDataType; +use databend_common_expression::TableField; +use databend_common_expression::TableSchemaRef; +use databend_common_expression::TableSchemaRefExt; use serde::Serialize; use serde::Serializer; use serde_repr::Serialize_repr; diff --git a/src/query/storages/system/src/query_profile_table.rs b/src/query/storages/system/src/query_profile_table.rs index ca11a2d52abb..59904014c339 100644 --- a/src/query/storages/system/src/query_profile_table.rs +++ b/src/query/storages/system/src/query_profile_table.rs @@ -14,22 +14,22 @@ use std::sync::Arc; -use common_catalog::table::Table; -use common_catalog::table_context::TableContext; -use common_expression::types::NumberDataType; -use common_expression::types::StringType; -use common_expression::types::UInt32Type; -use common_expression::types::VariantType; -use common_expression::DataBlock; -use common_expression::FromData; -use common_expression::TableDataType; -use common_expression::TableField; -use common_expression::TableSchemaRefExt; -use common_meta_app::schema::TableIdent; -use common_meta_app::schema::TableInfo; -use common_meta_app::schema::TableMeta; -use common_profile::OperatorExecutionInfo; -use common_profile::QueryProfileManager; +use databend_common_catalog::table::Table; +use databend_common_catalog::table_context::TableContext; +use databend_common_expression::types::NumberDataType; +use databend_common_expression::types::StringType; +use databend_common_expression::types::UInt32Type; +use databend_common_expression::types::VariantType; +use databend_common_expression::DataBlock; +use databend_common_expression::FromData; +use databend_common_expression::TableDataType; +use databend_common_expression::TableField; +use databend_common_expression::TableSchemaRefExt; +use databend_common_meta_app::schema::TableIdent; +use databend_common_meta_app::schema::TableInfo; +use databend_common_meta_app::schema::TableMeta; +use databend_common_profile::OperatorExecutionInfo; +use databend_common_profile::QueryProfileManager; use crate::SyncOneBlockSystemTable; use crate::SyncSystemTable; @@ -82,7 +82,10 @@ impl SyncSystemTable for QueryProfileTable { &self.table_info } - fn get_full_data(&self, _ctx: Arc) -> common_exception::Result { + fn get_full_data( + &self, + _ctx: Arc, + ) -> databend_common_exception::Result { let profile_mgr = QueryProfileManager::instance(); let query_profs = profile_mgr.list_all(); diff --git a/src/query/storages/system/src/query_summary_table.rs b/src/query/storages/system/src/query_summary_table.rs index 90c2ef7b813b..734b44df8ec0 100644 --- a/src/query/storages/system/src/query_summary_table.rs +++ b/src/query/storages/system/src/query_summary_table.rs @@ -14,25 +14,25 @@ use std::sync::Arc; -use common_catalog::table::Table; -use common_catalog::table_context::TableContext; -use common_expression::types::ArgType; -use common_expression::types::ArrayType; -use common_expression::types::NumberDataType; -use common_expression::types::StringType; -use common_expression::types::UInt32Type; -use common_expression::types::ValueType; -use common_expression::types::VariantType; -use common_expression::DataBlock; -use common_expression::FromData; -use common_expression::TableDataType; -use common_expression::TableField; -use common_expression::TableSchemaRefExt; -use common_meta_app::schema::TableIdent; -use common_meta_app::schema::TableInfo; -use common_meta_app::schema::TableMeta; -use common_profile::OperatorAttribute; -use common_profile::QueryProfileManager; +use databend_common_catalog::table::Table; +use databend_common_catalog::table_context::TableContext; +use databend_common_expression::types::ArgType; +use databend_common_expression::types::ArrayType; +use databend_common_expression::types::NumberDataType; +use databend_common_expression::types::StringType; +use databend_common_expression::types::UInt32Type; +use databend_common_expression::types::ValueType; +use databend_common_expression::types::VariantType; +use databend_common_expression::DataBlock; +use databend_common_expression::FromData; +use databend_common_expression::TableDataType; +use databend_common_expression::TableField; +use databend_common_expression::TableSchemaRefExt; +use databend_common_meta_app::schema::TableIdent; +use databend_common_meta_app::schema::TableInfo; +use databend_common_meta_app::schema::TableMeta; +use databend_common_profile::OperatorAttribute; +use databend_common_profile::QueryProfileManager; use crate::SyncOneBlockSystemTable; use crate::SyncSystemTable; @@ -132,7 +132,10 @@ impl SyncSystemTable for QuerySummaryTable { &self.table_info } - fn get_full_data(&self, _ctx: Arc) -> common_exception::Result { + fn get_full_data( + &self, + _ctx: Arc, + ) -> databend_common_exception::Result { let profile_mgr = QueryProfileManager::instance(); let query_profs = profile_mgr.list_all(); diff --git a/src/query/storages/system/src/roles_table.rs b/src/query/storages/system/src/roles_table.rs index 07cca89e53b3..c04272f3992b 100644 --- a/src/query/storages/system/src/roles_table.rs +++ b/src/query/storages/system/src/roles_table.rs @@ -14,22 +14,22 @@ use std::sync::Arc; -use common_catalog::plan::PushDownInfo; -use common_catalog::table::Table; -use common_catalog::table_context::TableContext; -use common_exception::Result; -use common_expression::types::number::UInt64Type; -use common_expression::types::NumberDataType; -use common_expression::types::StringType; -use common_expression::utils::FromData; -use common_expression::DataBlock; -use common_expression::TableDataType; -use common_expression::TableField; -use common_expression::TableSchemaRefExt; -use common_meta_app::schema::TableIdent; -use common_meta_app::schema::TableInfo; -use common_meta_app::schema::TableMeta; -use common_users::UserApiProvider; +use databend_common_catalog::plan::PushDownInfo; +use databend_common_catalog::table::Table; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::Result; +use databend_common_expression::types::number::UInt64Type; +use databend_common_expression::types::NumberDataType; +use databend_common_expression::types::StringType; +use databend_common_expression::utils::FromData; +use databend_common_expression::DataBlock; +use databend_common_expression::TableDataType; +use databend_common_expression::TableField; +use databend_common_expression::TableSchemaRefExt; +use databend_common_meta_app::schema::TableIdent; +use databend_common_meta_app::schema::TableInfo; +use databend_common_meta_app::schema::TableMeta; +use databend_common_users::UserApiProvider; use crate::table::AsyncOneBlockSystemTable; use crate::table::AsyncSystemTable; diff --git a/src/query/storages/system/src/settings_table.rs b/src/query/storages/system/src/settings_table.rs index f70bc41e3750..ed5c3d145856 100644 --- a/src/query/storages/system/src/settings_table.rs +++ b/src/query/storages/system/src/settings_table.rs @@ -14,19 +14,19 @@ use std::sync::Arc; -use common_catalog::table::Table; -use common_catalog::table_context::TableContext; -use common_exception::Result; -use common_expression::types::StringType; -use common_expression::utils::FromData; -use common_expression::DataBlock; -use common_expression::TableDataType; -use common_expression::TableField; -use common_expression::TableSchemaRefExt; -use common_meta_app::principal::UserSettingValue; -use common_meta_app::schema::TableIdent; -use common_meta_app::schema::TableInfo; -use common_meta_app::schema::TableMeta; +use databend_common_catalog::table::Table; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::Result; +use databend_common_expression::types::StringType; +use databend_common_expression::utils::FromData; +use databend_common_expression::DataBlock; +use databend_common_expression::TableDataType; +use databend_common_expression::TableField; +use databend_common_expression::TableSchemaRefExt; +use databend_common_meta_app::principal::UserSettingValue; +use databend_common_meta_app::schema::TableIdent; +use databend_common_meta_app::schema::TableInfo; +use databend_common_meta_app::schema::TableMeta; use snailquote::escape; use crate::SyncOneBlockSystemTable; diff --git a/src/query/storages/system/src/stages_table.rs b/src/query/storages/system/src/stages_table.rs index 9e83096d0b28..f73cc217ee31 100644 --- a/src/query/storages/system/src/stages_table.rs +++ b/src/query/storages/system/src/stages_table.rs @@ -15,24 +15,24 @@ use std::sync::Arc; use std::vec; -use common_catalog::plan::PushDownInfo; -use common_catalog::table::Table; -use common_catalog::table_context::TableContext; -use common_exception::Result; -use common_expression::types::number::UInt64Type; -use common_expression::types::NumberDataType; -use common_expression::types::StringType; -use common_expression::types::TimestampType; -use common_expression::utils::FromData; -use common_expression::DataBlock; -use common_expression::TableDataType; -use common_expression::TableField; -use common_expression::TableSchemaRefExt; -use common_meta_app::principal::StageType; -use common_meta_app::schema::TableIdent; -use common_meta_app::schema::TableInfo; -use common_meta_app::schema::TableMeta; -use common_users::UserApiProvider; +use databend_common_catalog::plan::PushDownInfo; +use databend_common_catalog::table::Table; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::Result; +use databend_common_expression::types::number::UInt64Type; +use databend_common_expression::types::NumberDataType; +use databend_common_expression::types::StringType; +use databend_common_expression::types::TimestampType; +use databend_common_expression::utils::FromData; +use databend_common_expression::DataBlock; +use databend_common_expression::TableDataType; +use databend_common_expression::TableField; +use databend_common_expression::TableSchemaRefExt; +use databend_common_meta_app::principal::StageType; +use databend_common_meta_app::schema::TableIdent; +use databend_common_meta_app::schema::TableInfo; +use databend_common_meta_app::schema::TableMeta; +use databend_common_users::UserApiProvider; use crate::table::AsyncOneBlockSystemTable; use crate::table::AsyncSystemTable; diff --git a/src/query/storages/system/src/streams_table.rs b/src/query/storages/system/src/streams_table.rs index 9b7f64008a0c..cfd00abb4233 100644 --- a/src/query/storages/system/src/streams_table.rs +++ b/src/query/storages/system/src/streams_table.rs @@ -14,31 +14,31 @@ use std::sync::Arc; -use common_catalog::catalog::Catalog; -use common_catalog::catalog::CatalogManager; -use common_catalog::plan::PushDownInfo; -use common_catalog::table::Table; -use common_catalog::table_context::TableContext; -use common_exception::Result; -use common_expression::types::number::UInt64Type; -use common_expression::types::NumberDataType; -use common_expression::types::StringType; -use common_expression::types::TimestampType; -use common_expression::utils::FromData; -use common_expression::DataBlock; -use common_expression::Scalar; -use common_expression::TableDataType; -use common_expression::TableField; -use common_expression::TableSchemaRef; -use common_expression::TableSchemaRefExt; -use common_functions::BUILTIN_FUNCTIONS; -use common_meta_app::schema::TableIdent; -use common_meta_app::schema::TableInfo; -use common_meta_app::schema::TableMeta; -use common_storages_fuse::io::SnapshotsIO; -use common_storages_fuse::FuseTable; -use common_storages_stream::stream_table::StreamTable; -use common_storages_stream::stream_table::STREAM_ENGINE; +use databend_common_catalog::catalog::Catalog; +use databend_common_catalog::catalog::CatalogManager; +use databend_common_catalog::plan::PushDownInfo; +use databend_common_catalog::table::Table; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::Result; +use databend_common_expression::types::number::UInt64Type; +use databend_common_expression::types::NumberDataType; +use databend_common_expression::types::StringType; +use databend_common_expression::types::TimestampType; +use databend_common_expression::utils::FromData; +use databend_common_expression::DataBlock; +use databend_common_expression::Scalar; +use databend_common_expression::TableDataType; +use databend_common_expression::TableField; +use databend_common_expression::TableSchemaRef; +use databend_common_expression::TableSchemaRefExt; +use databend_common_functions::BUILTIN_FUNCTIONS; +use databend_common_meta_app::schema::TableIdent; +use databend_common_meta_app::schema::TableInfo; +use databend_common_meta_app::schema::TableMeta; +use databend_common_storages_fuse::io::SnapshotsIO; +use databend_common_storages_fuse::FuseTable; +use databend_common_storages_stream::stream_table::StreamTable; +use databend_common_storages_stream::stream_table::STREAM_ENGINE; use log::warn; use crate::table::AsyncOneBlockSystemTable; diff --git a/src/query/storages/system/src/table.rs b/src/query/storages/system/src/table.rs index 041bc7d457d2..8f1f3b5e4ca2 100644 --- a/src/query/storages/system/src/table.rs +++ b/src/query/storages/system/src/table.rs @@ -15,25 +15,25 @@ use std::any::Any; use std::sync::Arc; -use common_catalog::plan::DataSourcePlan; -use common_catalog::plan::PartInfo; -use common_catalog::plan::PartStatistics; -use common_catalog::plan::Partitions; -use common_catalog::plan::PartitionsShuffleKind; -use common_catalog::plan::PushDownInfo; -use common_catalog::table::Table; -use common_catalog::table_context::TableContext; -use common_exception::Result; -use common_expression::DataBlock; -use common_meta_app::schema::TableInfo; -use common_pipeline_core::processors::OutputPort; -use common_pipeline_core::processors::ProcessorPtr; -use common_pipeline_core::Pipeline; -use common_pipeline_sources::AsyncSource; -use common_pipeline_sources::AsyncSourcer; -use common_pipeline_sources::EmptySource; -use common_pipeline_sources::SyncSource; -use common_pipeline_sources::SyncSourcer; +use databend_common_catalog::plan::DataSourcePlan; +use databend_common_catalog::plan::PartInfo; +use databend_common_catalog::plan::PartStatistics; +use databend_common_catalog::plan::Partitions; +use databend_common_catalog::plan::PartitionsShuffleKind; +use databend_common_catalog::plan::PushDownInfo; +use databend_common_catalog::table::Table; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::Result; +use databend_common_expression::DataBlock; +use databend_common_meta_app::schema::TableInfo; +use databend_common_pipeline_core::processors::OutputPort; +use databend_common_pipeline_core::processors::ProcessorPtr; +use databend_common_pipeline_core::Pipeline; +use databend_common_pipeline_sources::AsyncSource; +use databend_common_pipeline_sources::AsyncSourcer; +use databend_common_pipeline_sources::EmptySource; +use databend_common_pipeline_sources::SyncSource; +use databend_common_pipeline_sources::SyncSourcer; #[derive(serde::Serialize, serde::Deserialize, PartialEq, Eq)] pub struct SystemTablePart; @@ -336,7 +336,7 @@ impl AsyncSource for SystemTableAsyncSource< #[cfg(debug_assertions)] { - use common_expression::types::DataType; + use databend_common_expression::types::DataType; let table_info = self.inner.get_table_info(); let data_types: Vec = block .columns() diff --git a/src/query/storages/system/src/table_functions_table.rs b/src/query/storages/system/src/table_functions_table.rs index 50d7851e6d27..15c7ba1e0cee 100644 --- a/src/query/storages/system/src/table_functions_table.rs +++ b/src/query/storages/system/src/table_functions_table.rs @@ -14,20 +14,20 @@ use std::sync::Arc; -use common_catalog::table::Table; -use common_catalog::table_context::TableContext; -use common_exception::Result; -use common_expression::types::StringType; -use common_expression::utils::FromData; -use common_expression::DataBlock; -use common_expression::FunctionKind; -use common_expression::TableDataType; -use common_expression::TableField; -use common_expression::TableSchemaRefExt; -use common_functions::BUILTIN_FUNCTIONS; -use common_meta_app::schema::TableIdent; -use common_meta_app::schema::TableInfo; -use common_meta_app::schema::TableMeta; +use databend_common_catalog::table::Table; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::Result; +use databend_common_expression::types::StringType; +use databend_common_expression::utils::FromData; +use databend_common_expression::DataBlock; +use databend_common_expression::FunctionKind; +use databend_common_expression::TableDataType; +use databend_common_expression::TableField; +use databend_common_expression::TableSchemaRefExt; +use databend_common_functions::BUILTIN_FUNCTIONS; +use databend_common_meta_app::schema::TableIdent; +use databend_common_meta_app::schema::TableInfo; +use databend_common_meta_app::schema::TableMeta; use crate::SyncOneBlockSystemTable; use crate::SyncSystemTable; diff --git a/src/query/storages/system/src/tables_table.rs b/src/query/storages/system/src/tables_table.rs index 0f2ab4339671..49ef1ef8dd77 100644 --- a/src/query/storages/system/src/tables_table.rs +++ b/src/query/storages/system/src/tables_table.rs @@ -14,28 +14,28 @@ use std::sync::Arc; -use common_catalog::catalog::Catalog; -use common_catalog::catalog::CatalogManager; -use common_catalog::plan::PushDownInfo; -use common_catalog::table::Table; -use common_catalog::table_context::TableContext; -use common_exception::Result; -use common_expression::types::number::UInt64Type; -use common_expression::types::NumberDataType; -use common_expression::types::StringType; -use common_expression::types::TimestampType; -use common_expression::utils::FromData; -use common_expression::DataBlock; -use common_expression::Scalar; -use common_expression::TableDataType; -use common_expression::TableField; -use common_expression::TableSchemaRef; -use common_expression::TableSchemaRefExt; -use common_functions::BUILTIN_FUNCTIONS; -use common_meta_app::schema::TableIdent; -use common_meta_app::schema::TableInfo; -use common_meta_app::schema::TableMeta; -use common_users::GrantObjectVisibilityChecker; +use databend_common_catalog::catalog::Catalog; +use databend_common_catalog::catalog::CatalogManager; +use databend_common_catalog::plan::PushDownInfo; +use databend_common_catalog::table::Table; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::Result; +use databend_common_expression::types::number::UInt64Type; +use databend_common_expression::types::NumberDataType; +use databend_common_expression::types::StringType; +use databend_common_expression::types::TimestampType; +use databend_common_expression::utils::FromData; +use databend_common_expression::DataBlock; +use databend_common_expression::Scalar; +use databend_common_expression::TableDataType; +use databend_common_expression::TableField; +use databend_common_expression::TableSchemaRef; +use databend_common_expression::TableSchemaRefExt; +use databend_common_functions::BUILTIN_FUNCTIONS; +use databend_common_meta_app::schema::TableIdent; +use databend_common_meta_app::schema::TableInfo; +use databend_common_meta_app::schema::TableMeta; +use databend_common_users::GrantObjectVisibilityChecker; use crate::table::AsyncOneBlockSystemTable; use crate::table::AsyncSystemTable; diff --git a/src/query/storages/system/src/task_history_table.rs b/src/query/storages/system/src/task_history_table.rs index dd0b7b95aa09..f1d733778b65 100644 --- a/src/query/storages/system/src/task_history_table.rs +++ b/src/query/storages/system/src/task_history_table.rs @@ -14,29 +14,29 @@ use std::sync::Arc; -use common_catalog::plan::PushDownInfo; -use common_catalog::table::Table; -use common_catalog::table_context::TableContext; -use common_cloud_control::client_config::build_client_config; -use common_cloud_control::cloud_api::CloudControlApiProvider; -use common_cloud_control::pb::ShowTaskRunsRequest; -use common_cloud_control::pb::TaskRun; -use common_cloud_control::task_client::make_request; -use common_config::GlobalConfig; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::infer_table_schema; -use common_expression::types::Int32Type; -use common_expression::types::Int64Type; -use common_expression::types::StringType; -use common_expression::types::TimestampType; -use common_expression::types::UInt64Type; -use common_expression::DataBlock; -use common_expression::FromData; -use common_meta_app::schema::TableIdent; -use common_meta_app::schema::TableInfo; -use common_meta_app::schema::TableMeta; -use common_sql::plans::task_run_schema; +use databend_common_catalog::plan::PushDownInfo; +use databend_common_catalog::table::Table; +use databend_common_catalog::table_context::TableContext; +use databend_common_cloud_control::client_config::build_client_config; +use databend_common_cloud_control::cloud_api::CloudControlApiProvider; +use databend_common_cloud_control::pb::ShowTaskRunsRequest; +use databend_common_cloud_control::pb::TaskRun; +use databend_common_cloud_control::task_client::make_request; +use databend_common_config::GlobalConfig; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::infer_table_schema; +use databend_common_expression::types::Int32Type; +use databend_common_expression::types::Int64Type; +use databend_common_expression::types::StringType; +use databend_common_expression::types::TimestampType; +use databend_common_expression::types::UInt64Type; +use databend_common_expression::DataBlock; +use databend_common_expression::FromData; +use databend_common_meta_app::schema::TableIdent; +use databend_common_meta_app::schema::TableInfo; +use databend_common_meta_app::schema::TableMeta; +use databend_common_sql::plans::task_run_schema; use crate::table::AsyncOneBlockSystemTable; use crate::table::AsyncSystemTable; @@ -59,7 +59,7 @@ pub fn parse_task_runs_to_datablock(task_runs: Vec) -> Result> = Vec::with_capacity(task_runs.len()); for task_run in task_runs { - let tr: common_cloud_control::task_utils::TaskRun = task_run.try_into()?; + let tr: databend_common_cloud_control::task_utils::TaskRun = task_run.try_into()?; name.push(tr.task_name.into_bytes()); id.push(tr.task_id); owner.push(tr.owner.into_bytes()); diff --git a/src/query/storages/system/src/tasks_table.rs b/src/query/storages/system/src/tasks_table.rs index ec5add7e7e9b..21494c38e6dd 100644 --- a/src/query/storages/system/src/tasks_table.rs +++ b/src/query/storages/system/src/tasks_table.rs @@ -14,27 +14,27 @@ use std::sync::Arc; -use common_catalog::plan::PushDownInfo; -use common_catalog::table::Table; -use common_catalog::table_context::TableContext; -use common_cloud_control::client_config::build_client_config; -use common_cloud_control::cloud_api::CloudControlApiProvider; -use common_cloud_control::pb::ShowTasksRequest; -use common_cloud_control::pb::Task; -use common_cloud_control::task_client::make_request; -use common_config::GlobalConfig; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::infer_table_schema; -use common_expression::types::StringType; -use common_expression::types::TimestampType; -use common_expression::types::UInt64Type; -use common_expression::DataBlock; -use common_expression::FromData; -use common_meta_app::schema::TableIdent; -use common_meta_app::schema::TableInfo; -use common_meta_app::schema::TableMeta; -use common_sql::plans::task_schema; +use databend_common_catalog::plan::PushDownInfo; +use databend_common_catalog::table::Table; +use databend_common_catalog::table_context::TableContext; +use databend_common_cloud_control::client_config::build_client_config; +use databend_common_cloud_control::cloud_api::CloudControlApiProvider; +use databend_common_cloud_control::pb::ShowTasksRequest; +use databend_common_cloud_control::pb::Task; +use databend_common_cloud_control::task_client::make_request; +use databend_common_config::GlobalConfig; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::infer_table_schema; +use databend_common_expression::types::StringType; +use databend_common_expression::types::TimestampType; +use databend_common_expression::types::UInt64Type; +use databend_common_expression::DataBlock; +use databend_common_expression::FromData; +use databend_common_meta_app::schema::TableIdent; +use databend_common_meta_app::schema::TableInfo; +use databend_common_meta_app::schema::TableMeta; +use databend_common_sql::plans::task_schema; use crate::table::AsyncOneBlockSystemTable; use crate::table::AsyncSystemTable; @@ -55,7 +55,7 @@ pub fn parse_tasks_to_datablock(tasks: Vec) -> Result { let mut last_suspended_on: Vec> = Vec::with_capacity(tasks.len()); for task in tasks { - let tsk: common_cloud_control::task_utils::Task = task.try_into()?; + let tsk: databend_common_cloud_control::task_utils::Task = task.try_into()?; created_on.push(tsk.created_at.timestamp_micros()); name.push(tsk.task_name.into_bytes()); id.push(tsk.task_id); diff --git a/src/query/storages/system/src/temp_files_table.rs b/src/query/storages/system/src/temp_files_table.rs index b75fae324a9e..acb2afcd833a 100644 --- a/src/query/storages/system/src/temp_files_table.rs +++ b/src/query/storages/system/src/temp_files_table.rs @@ -14,28 +14,28 @@ use std::sync::Arc; -use common_catalog::plan::PushDownInfo; -use common_catalog::table::Table; -use common_catalog::table_context::TableContext; -use common_exception::Result; -use common_expression::types::DataType; -use common_expression::types::NumberDataType; -use common_expression::types::NumberType; -use common_expression::types::StringType; -use common_expression::types::TimestampType; -use common_expression::BlockEntry; -use common_expression::DataBlock; -use common_expression::FromData; -use common_expression::Scalar; -use common_expression::TableDataType; -use common_expression::TableField; -use common_expression::TableSchemaRefExt; -use common_expression::Value; -use common_meta_app::schema::TableIdent; -use common_meta_app::schema::TableInfo; -use common_meta_app::schema::TableMeta; -use common_pipeline_core::query_spill_prefix; -use common_storage::DataOperator; +use databend_common_catalog::plan::PushDownInfo; +use databend_common_catalog::table::Table; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::Result; +use databend_common_expression::types::DataType; +use databend_common_expression::types::NumberDataType; +use databend_common_expression::types::NumberType; +use databend_common_expression::types::StringType; +use databend_common_expression::types::TimestampType; +use databend_common_expression::BlockEntry; +use databend_common_expression::DataBlock; +use databend_common_expression::FromData; +use databend_common_expression::Scalar; +use databend_common_expression::TableDataType; +use databend_common_expression::TableField; +use databend_common_expression::TableSchemaRefExt; +use databend_common_expression::Value; +use databend_common_meta_app::schema::TableIdent; +use databend_common_meta_app::schema::TableInfo; +use databend_common_meta_app::schema::TableMeta; +use databend_common_pipeline_core::query_spill_prefix; +use databend_common_storage::DataOperator; use futures::StreamExt; use futures::TryStreamExt; use opendal::Metakey; diff --git a/src/query/storages/system/src/tracing_table.rs b/src/query/storages/system/src/tracing_table.rs index 09f13408c2bf..13d06de9fd7a 100644 --- a/src/query/storages/system/src/tracing_table.rs +++ b/src/query/storages/system/src/tracing_table.rs @@ -19,30 +19,30 @@ use std::io::BufRead; use std::io::BufReader; use std::sync::Arc; -use common_catalog::plan::DataSourcePlan; -use common_catalog::plan::PartStatistics; -use common_catalog::plan::Partitions; -use common_catalog::plan::PushDownInfo; -use common_catalog::table::Table; -use common_catalog::table_context::TableContext; -use common_config::GlobalConfig; -use common_exception::ErrorCode; -use common_exception::Result; -use common_expression::types::DataType; -use common_expression::ColumnBuilder; -use common_expression::DataBlock; -use common_expression::Scalar; -use common_expression::TableDataType; -use common_expression::TableField; -use common_expression::TableSchemaRefExt; -use common_meta_app::schema::TableIdent; -use common_meta_app::schema::TableInfo; -use common_meta_app::schema::TableMeta; -use common_pipeline_core::processors::OutputPort; -use common_pipeline_core::processors::ProcessorPtr; -use common_pipeline_core::Pipeline; -use common_pipeline_sources::SyncSource; -use common_pipeline_sources::SyncSourcer; +use databend_common_catalog::plan::DataSourcePlan; +use databend_common_catalog::plan::PartStatistics; +use databend_common_catalog::plan::Partitions; +use databend_common_catalog::plan::PushDownInfo; +use databend_common_catalog::table::Table; +use databend_common_catalog::table_context::TableContext; +use databend_common_config::GlobalConfig; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_expression::types::DataType; +use databend_common_expression::ColumnBuilder; +use databend_common_expression::DataBlock; +use databend_common_expression::Scalar; +use databend_common_expression::TableDataType; +use databend_common_expression::TableField; +use databend_common_expression::TableSchemaRefExt; +use databend_common_meta_app::schema::TableIdent; +use databend_common_meta_app::schema::TableInfo; +use databend_common_meta_app::schema::TableMeta; +use databend_common_pipeline_core::processors::OutputPort; +use databend_common_pipeline_core::processors::ProcessorPtr; +use databend_common_pipeline_core::Pipeline; +use databend_common_pipeline_sources::SyncSource; +use databend_common_pipeline_sources::SyncSourcer; use log::debug; use walkdir::WalkDir; diff --git a/src/query/storages/system/src/users_table.rs b/src/query/storages/system/src/users_table.rs index c20f2077328c..90578915620f 100644 --- a/src/query/storages/system/src/users_table.rs +++ b/src/query/storages/system/src/users_table.rs @@ -14,21 +14,21 @@ use std::sync::Arc; -use common_catalog::plan::PushDownInfo; -use common_catalog::table::Table; -use common_catalog::table_context::TableContext; -use common_exception::Result; -use common_expression::types::StringType; -use common_expression::utils::FromData; -use common_expression::DataBlock; -use common_expression::TableDataType; -use common_expression::TableField; -use common_expression::TableSchemaRefExt; -use common_meta_app::schema::TableIdent; -use common_meta_app::schema::TableInfo; -use common_meta_app::schema::TableMeta; -use common_users::UserApiProvider; -use common_users::BUILTIN_ROLE_ACCOUNT_ADMIN; +use databend_common_catalog::plan::PushDownInfo; +use databend_common_catalog::table::Table; +use databend_common_catalog::table_context::TableContext; +use databend_common_exception::Result; +use databend_common_expression::types::StringType; +use databend_common_expression::utils::FromData; +use databend_common_expression::DataBlock; +use databend_common_expression::TableDataType; +use databend_common_expression::TableField; +use databend_common_expression::TableSchemaRefExt; +use databend_common_meta_app::schema::TableIdent; +use databend_common_meta_app::schema::TableInfo; +use databend_common_meta_app::schema::TableMeta; +use databend_common_users::UserApiProvider; +use databend_common_users::BUILTIN_ROLE_ACCOUNT_ADMIN; use crate::table::AsyncOneBlockSystemTable; use crate::table::AsyncSystemTable; diff --git a/src/query/storages/system/src/util.rs b/src/query/storages/system/src/util.rs index 9ce227f36055..864656ad3017 100644 --- a/src/query/storages/system/src/util.rs +++ b/src/query/storages/system/src/util.rs @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_expression::Expr; -use common_expression::Scalar; +use databend_common_expression::Expr; +use databend_common_expression::Scalar; pub fn find_eq_filter(expr: &Expr, visitor: &mut impl FnMut(&str, &Scalar)) { match expr { diff --git a/src/query/storages/view/Cargo.toml b/src/query/storages/view/Cargo.toml index 4f65a32258f3..ae4702f4885d 100644 --- a/src/query/storages/view/Cargo.toml +++ b/src/query/storages/view/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "common-storages-view" +name = "databend-common-storages-view" version = { workspace = true } authors = { workspace = true } license = { workspace = true } @@ -12,9 +12,9 @@ doctest = false test = false [dependencies] -common-catalog = { path = "../../catalog" } -common-exception = { path = "../../../common/exception" } -common-meta-app = { path = "../../../meta/app" } +databend-common-catalog = { path = "../../catalog" } +databend-common-exception = { path = "../../../common/exception" } +databend-common-meta-app = { path = "../../../meta/app" } async-trait = { workspace = true } diff --git a/src/query/storages/view/src/view_table.rs b/src/query/storages/view/src/view_table.rs index 2f62214bbc90..eb4793b8a493 100644 --- a/src/query/storages/view/src/view_table.rs +++ b/src/query/storages/view/src/view_table.rs @@ -15,11 +15,11 @@ use std::any::Any; use std::sync::Arc; -use common_catalog::catalog::StorageDescription; -use common_catalog::table::Table; -use common_exception::ErrorCode; -use common_exception::Result; -use common_meta_app::schema::TableInfo; +use databend_common_catalog::catalog::StorageDescription; +use databend_common_catalog::table::Table; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_meta_app::schema::TableInfo; pub struct ViewTable { table_info: TableInfo, diff --git a/src/query/users/Cargo.toml b/src/query/users/Cargo.toml index c7adb3040586..dbd0c627bf34 100644 --- a/src/query/users/Cargo.toml +++ b/src/query/users/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "common-users" +name = "databend-common-users" version = { workspace = true } authors = { workspace = true } license = { workspace = true } @@ -11,18 +11,18 @@ doctest = false test = false [features] -io-uring = ["common-meta-store/io-uring"] +io-uring = ["databend-common-meta-store/io-uring"] [dependencies] # In alphabetical order # Workspace dependencies -common-base = { path = "../../common/base" } -common-exception = { path = "../../common/exception" } -common-grpc = { path = "../../common/grpc" } -common-management = { path = "../management" } -common-meta-app = { path = "../../meta/app" } -common-meta-kvapi = { path = "../../meta/kvapi" } -common-meta-store = { path = "../../meta/store" } -common-meta-types = { path = "../../meta/types" } +databend-common-base = { path = "../../common/base" } +databend-common-exception = { path = "../../common/exception" } +databend-common-grpc = { path = "../../common/grpc" } +databend-common-management = { path = "../management" } +databend-common-meta-app = { path = "../../meta/app" } +databend-common-meta-kvapi = { path = "../../meta/kvapi" } +databend-common-meta-store = { path = "../../meta/store" } +databend-common-meta-types = { path = "../../meta/types" } # GitHub dependencies @@ -41,6 +41,6 @@ serde = { workspace = true } serde_json = { workspace = true } [dev-dependencies] -common-expression = { path = "../expression" } +databend-common-expression = { path = "../expression" } pretty_assertions = "1.3.0" wiremock = "0.5.14" diff --git a/src/query/users/src/connection.rs b/src/query/users/src/connection.rs index 645b9d097a59..416a835d3471 100644 --- a/src/query/users/src/connection.rs +++ b/src/query/users/src/connection.rs @@ -12,10 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_exception::ErrorCode; -use common_exception::Result; -use common_meta_app::principal::UserDefinedConnection; -use common_meta_types::MatchSeq; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_meta_app::principal::UserDefinedConnection; +use databend_common_meta_types::MatchSeq; use crate::UserApiProvider; diff --git a/src/query/users/src/file_format.rs b/src/query/users/src/file_format.rs index 7ca6b4d7329a..6cbcc2229d81 100644 --- a/src/query/users/src/file_format.rs +++ b/src/query/users/src/file_format.rs @@ -12,10 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_exception::ErrorCode; -use common_exception::Result; -use common_meta_app::principal::UserDefinedFileFormat; -use common_meta_types::MatchSeq; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_meta_app::principal::UserDefinedFileFormat; +use databend_common_meta_types::MatchSeq; use crate::UserApiProvider; diff --git a/src/query/users/src/idm_config.rs b/src/query/users/src/idm_config.rs index 9a3379e78139..0eac019f7181 100644 --- a/src/query/users/src/idm_config.rs +++ b/src/query/users/src/idm_config.rs @@ -14,7 +14,7 @@ use std::collections::HashMap; -use common_meta_app::principal::AuthInfo; +use databend_common_meta_app::principal::AuthInfo; #[derive(Clone, Debug, Default, PartialEq, Eq)] pub struct IDMConfig { diff --git a/src/query/users/src/jwt/authenticator.rs b/src/query/users/src/jwt/authenticator.rs index 7197cd03d4e4..dfc1abea9931 100644 --- a/src/query/users/src/jwt/authenticator.rs +++ b/src/query/users/src/jwt/authenticator.rs @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_exception::ErrorCode; -use common_exception::Result; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; use jwt_simple::algorithms::ECDSAP256PublicKeyLike; use jwt_simple::algorithms::ES256PublicKey; use jwt_simple::algorithms::RS256PublicKey; diff --git a/src/query/users/src/jwt/jwk.rs b/src/query/users/src/jwt/jwk.rs index b72a0544c904..09f64a57ee81 100644 --- a/src/query/users/src/jwt/jwk.rs +++ b/src/query/users/src/jwt/jwk.rs @@ -19,8 +19,8 @@ use std::time::Instant; use base64::engine::general_purpose; use base64::prelude::*; -use common_exception::ErrorCode; -use common_exception::Result; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; use jwt_simple::prelude::ES256PublicKey; use jwt_simple::prelude::RS256PublicKey; use p256::EncodedPoint; diff --git a/src/query/users/src/network_policy.rs b/src/query/users/src/network_policy.rs index bceebb3c5935..aaf96e4e9d03 100644 --- a/src/query/users/src/network_policy.rs +++ b/src/query/users/src/network_policy.rs @@ -13,11 +13,11 @@ // limitations under the License. use chrono::Utc; -use common_exception::ErrorCode; -use common_exception::Result; -use common_management::NetworkPolicyApi; -use common_meta_app::principal::NetworkPolicy; -use common_meta_types::MatchSeq; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_management::NetworkPolicyApi; +use databend_common_meta_app::principal::NetworkPolicy; +use databend_common_meta_types::MatchSeq; use crate::UserApiProvider; diff --git a/src/query/users/src/role_cache_mgr.rs b/src/query/users/src/role_cache_mgr.rs index 4b5e3fcede33..756efb5f6d16 100644 --- a/src/query/users/src/role_cache_mgr.rs +++ b/src/query/users/src/role_cache_mgr.rs @@ -17,12 +17,12 @@ use std::sync::Arc; use std::time::Duration; use std::time::Instant; -use common_base::base::tokio; -use common_base::base::tokio::task::JoinHandle; -use common_base::base::GlobalInstance; -use common_exception::Result; -use common_meta_app::principal::GrantObjectByID; -use common_meta_app::principal::RoleInfo; +use databend_common_base::base::tokio; +use databend_common_base::base::tokio::task::JoinHandle; +use databend_common_base::base::GlobalInstance; +use databend_common_exception::Result; +use databend_common_meta_app::principal::GrantObjectByID; +use databend_common_meta_app::principal::RoleInfo; use log::warn; use parking_lot::RwLock; diff --git a/src/query/users/src/role_mgr.rs b/src/query/users/src/role_mgr.rs index 57def141eb3b..a6e787cd9780 100644 --- a/src/query/users/src/role_mgr.rs +++ b/src/query/users/src/role_mgr.rs @@ -14,16 +14,16 @@ use std::collections::HashMap; -use common_exception::ErrorCode; -use common_exception::Result; -use common_management::RoleApi; -use common_meta_app::principal::GrantObject; -use common_meta_app::principal::GrantObjectByID; -use common_meta_app::principal::OwnershipInfo; -use common_meta_app::principal::RoleInfo; -use common_meta_app::principal::UserPrivilegeSet; -use common_meta_app::principal::UserPrivilegeType; -use common_meta_types::MatchSeq; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_management::RoleApi; +use databend_common_meta_app::principal::GrantObject; +use databend_common_meta_app::principal::GrantObjectByID; +use databend_common_meta_app::principal::OwnershipInfo; +use databend_common_meta_app::principal::RoleInfo; +use databend_common_meta_app::principal::UserPrivilegeSet; +use databend_common_meta_app::principal::UserPrivilegeType; +use databend_common_meta_types::MatchSeq; use crate::role_util::find_all_related_roles; use crate::UserApiProvider; diff --git a/src/query/users/src/role_util.rs b/src/query/users/src/role_util.rs index be0350dabec8..ec1ff26c61c9 100644 --- a/src/query/users/src/role_util.rs +++ b/src/query/users/src/role_util.rs @@ -16,7 +16,7 @@ use std::collections::HashMap; use std::collections::HashSet; use std::collections::VecDeque; -use common_meta_app::principal::RoleInfo; +use databend_common_meta_app::principal::RoleInfo; use crate::role_mgr::BUILTIN_ROLE_ACCOUNT_ADMIN; use crate::role_mgr::BUILTIN_ROLE_PUBLIC; diff --git a/src/query/users/src/user_api.rs b/src/query/users/src/user_api.rs index f41d61d3c57f..9e73a401b3ac 100644 --- a/src/query/users/src/user_api.rs +++ b/src/query/users/src/user_api.rs @@ -15,34 +15,34 @@ use std::collections::HashMap; use std::sync::Arc; -use common_base::base::GlobalInstance; -use common_exception::Result; -use common_grpc::RpcClientConf; -use common_management::ConnectionApi; -use common_management::ConnectionMgr; -use common_management::FileFormatApi; -use common_management::FileFormatMgr; -use common_management::NetworkPolicyApi; -use common_management::NetworkPolicyMgr; -use common_management::QuotaApi; -use common_management::QuotaMgr; -use common_management::RoleApi; -use common_management::RoleMgr; -use common_management::SettingApi; -use common_management::SettingMgr; -use common_management::StageApi; -use common_management::StageMgr; -use common_management::UdfApi; -use common_management::UdfMgr; -use common_management::UserApi; -use common_management::UserMgr; -use common_meta_app::principal::AuthInfo; -use common_meta_app::tenant::TenantQuota; -use common_meta_kvapi::kvapi; -use common_meta_store::MetaStore; -use common_meta_store::MetaStoreProvider; -use common_meta_types::MatchSeq; -use common_meta_types::MetaError; +use databend_common_base::base::GlobalInstance; +use databend_common_exception::Result; +use databend_common_grpc::RpcClientConf; +use databend_common_management::ConnectionApi; +use databend_common_management::ConnectionMgr; +use databend_common_management::FileFormatApi; +use databend_common_management::FileFormatMgr; +use databend_common_management::NetworkPolicyApi; +use databend_common_management::NetworkPolicyMgr; +use databend_common_management::QuotaApi; +use databend_common_management::QuotaMgr; +use databend_common_management::RoleApi; +use databend_common_management::RoleMgr; +use databend_common_management::SettingApi; +use databend_common_management::SettingMgr; +use databend_common_management::StageApi; +use databend_common_management::StageMgr; +use databend_common_management::UdfApi; +use databend_common_management::UdfMgr; +use databend_common_management::UserApi; +use databend_common_management::UserMgr; +use databend_common_meta_app::principal::AuthInfo; +use databend_common_meta_app::tenant::TenantQuota; +use databend_common_meta_kvapi::kvapi; +use databend_common_meta_store::MetaStore; +use databend_common_meta_store::MetaStoreProvider; +use databend_common_meta_types::MatchSeq; +use databend_common_meta_types::MetaError; use crate::idm_config::IDMConfig; diff --git a/src/query/users/src/user_mgr.rs b/src/query/users/src/user_mgr.rs index ddbf02ac834c..77eb4ab6118a 100644 --- a/src/query/users/src/user_mgr.rs +++ b/src/query/users/src/user_mgr.rs @@ -15,16 +15,16 @@ use core::net::Ipv4Addr; use cidr::Ipv4Cidr; -use common_exception::ErrorCode; -use common_exception::Result; -use common_management::UserApi; -use common_meta_app::principal::AuthInfo; -use common_meta_app::principal::GrantObject; -use common_meta_app::principal::UserIdentity; -use common_meta_app::principal::UserInfo; -use common_meta_app::principal::UserOption; -use common_meta_app::principal::UserPrivilegeSet; -use common_meta_types::MatchSeq; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_management::UserApi; +use databend_common_meta_app::principal::AuthInfo; +use databend_common_meta_app::principal::GrantObject; +use databend_common_meta_app::principal::UserIdentity; +use databend_common_meta_app::principal::UserInfo; +use databend_common_meta_app::principal::UserOption; +use databend_common_meta_app::principal::UserPrivilegeSet; +use databend_common_meta_types::MatchSeq; use crate::role_mgr::BUILTIN_ROLE_ACCOUNT_ADMIN; use crate::UserApiProvider; diff --git a/src/query/users/src/user_setting.rs b/src/query/users/src/user_setting.rs index 3f0ec8d8155e..fe23e7c1b79c 100644 --- a/src/query/users/src/user_setting.rs +++ b/src/query/users/src/user_setting.rs @@ -12,9 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_exception::Result; -use common_meta_app::principal::UserSetting; -use common_meta_types::MatchSeq; +use databend_common_exception::Result; +use databend_common_meta_app::principal::UserSetting; +use databend_common_meta_types::MatchSeq; use crate::UserApiProvider; diff --git a/src/query/users/src/user_stage.rs b/src/query/users/src/user_stage.rs index 13c062240c61..8b5b18c5a906 100644 --- a/src/query/users/src/user_stage.rs +++ b/src/query/users/src/user_stage.rs @@ -12,10 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_exception::ErrorCode; -use common_exception::Result; -use common_meta_app::principal::StageInfo; -use common_meta_types::MatchSeq; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_meta_app::principal::StageInfo; +use databend_common_meta_types::MatchSeq; use crate::UserApiProvider; diff --git a/src/query/users/src/user_udf.rs b/src/query/users/src/user_udf.rs index 9620a5a91ec3..81289ba581df 100644 --- a/src/query/users/src/user_udf.rs +++ b/src/query/users/src/user_udf.rs @@ -12,10 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_exception::ErrorCode; -use common_exception::Result; -use common_meta_app::principal::UserDefinedFunction; -use common_meta_types::MatchSeq; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_meta_app::principal::UserDefinedFunction; +use databend_common_meta_types::MatchSeq; use crate::UserApiProvider; diff --git a/src/query/users/src/visibility_checker.rs b/src/query/users/src/visibility_checker.rs index 02e4f6e666c5..33f97ad5e1c0 100644 --- a/src/query/users/src/visibility_checker.rs +++ b/src/query/users/src/visibility_checker.rs @@ -14,11 +14,11 @@ use std::collections::HashSet; -use common_meta_app::principal::GrantObject; -use common_meta_app::principal::RoleInfo; -use common_meta_app::principal::UserGrantSet; -use common_meta_app::principal::UserInfo; -use common_meta_app::principal::UserPrivilegeType; +use databend_common_meta_app::principal::GrantObject; +use databend_common_meta_app::principal::RoleInfo; +use databend_common_meta_app::principal::UserGrantSet; +use databend_common_meta_app::principal::UserInfo; +use databend_common_meta_app::principal::UserPrivilegeType; use enumflags2::BitFlags; /// GrantObjectVisibilityChecker is used to check whether a user has the privilege to access a diff --git a/src/query/users/tests/it/jwt/authenticator.rs b/src/query/users/tests/it/jwt/authenticator.rs index aad8322c8f3a..1d08707636a0 100644 --- a/src/query/users/tests/it/jwt/authenticator.rs +++ b/src/query/users/tests/it/jwt/authenticator.rs @@ -14,9 +14,9 @@ use base64::engine::general_purpose; use base64::prelude::*; -use common_base::base::tokio; -use common_exception::Result; -use common_users::JwtAuthenticator; +use databend_common_base::base::tokio; +use databend_common_exception::Result; +use databend_common_users::JwtAuthenticator; use jwt_simple::prelude::*; use wiremock::matchers::method; use wiremock::matchers::path; diff --git a/src/query/users/tests/it/network_policy.rs b/src/query/users/tests/it/network_policy.rs index 8846a8df4d72..346dcc722731 100644 --- a/src/query/users/tests/it/network_policy.rs +++ b/src/query/users/tests/it/network_policy.rs @@ -12,15 +12,15 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_base::base::tokio; -use common_exception::ErrorCode; -use common_exception::Result; -use common_grpc::RpcClientConf; -use common_meta_app::principal::AuthInfo; -use common_meta_app::principal::NetworkPolicy; -use common_meta_app::principal::UserIdentity; -use common_meta_app::principal::UserInfo; -use common_users::UserApiProvider; +use databend_common_base::base::tokio; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_grpc::RpcClientConf; +use databend_common_meta_app::principal::AuthInfo; +use databend_common_meta_app::principal::NetworkPolicy; +use databend_common_meta_app::principal::UserIdentity; +use databend_common_meta_app::principal::UserInfo; +use databend_common_users::UserApiProvider; use pretty_assertions::assert_eq; #[tokio::test(flavor = "multi_thread", worker_threads = 1)] diff --git a/src/query/users/tests/it/role_cache_mgr.rs b/src/query/users/tests/it/role_cache_mgr.rs index f1ff6584b823..69610816dee9 100644 --- a/src/query/users/tests/it/role_cache_mgr.rs +++ b/src/query/users/tests/it/role_cache_mgr.rs @@ -15,15 +15,15 @@ use std::collections::HashMap; use std::collections::HashSet; -use common_base::base::tokio; -use common_exception::Result; -use common_grpc::RpcClientConf; -use common_meta_app::principal::GrantObject; -use common_meta_app::principal::RoleInfo; -use common_meta_app::principal::UserPrivilegeSet; -use common_users::role_util::find_all_related_roles; -use common_users::RoleCacheManager; -use common_users::UserApiProvider; +use databend_common_base::base::tokio; +use databend_common_exception::Result; +use databend_common_grpc::RpcClientConf; +use databend_common_meta_app::principal::GrantObject; +use databend_common_meta_app::principal::RoleInfo; +use databend_common_meta_app::principal::UserPrivilegeSet; +use databend_common_users::role_util::find_all_related_roles; +use databend_common_users::RoleCacheManager; +use databend_common_users::UserApiProvider; pub const CATALOG_DEFAULT: &str = "default"; diff --git a/src/query/users/tests/it/role_mgr.rs b/src/query/users/tests/it/role_mgr.rs index 05dac78820b7..edcd238e1e9f 100644 --- a/src/query/users/tests/it/role_mgr.rs +++ b/src/query/users/tests/it/role_mgr.rs @@ -12,15 +12,15 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_base::base::tokio; -use common_exception::ErrorCode; -use common_exception::Result; -use common_grpc::RpcClientConf; -use common_meta_app::principal::GrantObject; -use common_meta_app::principal::RoleInfo; -use common_meta_app::principal::UserPrivilegeSet; -use common_meta_app::principal::UserPrivilegeType; -use common_users::UserApiProvider; +use databend_common_base::base::tokio; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_grpc::RpcClientConf; +use databend_common_meta_app::principal::GrantObject; +use databend_common_meta_app::principal::RoleInfo; +use databend_common_meta_app::principal::UserPrivilegeSet; +use databend_common_meta_app::principal::UserPrivilegeType; +use databend_common_users::UserApiProvider; use pretty_assertions::assert_eq; #[tokio::test(flavor = "multi_thread", worker_threads = 1)] diff --git a/src/query/users/tests/it/role_util.rs b/src/query/users/tests/it/role_util.rs index e47fd05c84e6..3faaaf2e65b1 100644 --- a/src/query/users/tests/it/role_util.rs +++ b/src/query/users/tests/it/role_util.rs @@ -14,9 +14,9 @@ use std::collections::HashMap; -use common_meta_app::principal::RoleInfo; -use common_users::role_util::find_all_related_roles; -use common_users::BUILTIN_ROLE_ACCOUNT_ADMIN; +use databend_common_meta_app::principal::RoleInfo; +use databend_common_users::role_util::find_all_related_roles; +use databend_common_users::BUILTIN_ROLE_ACCOUNT_ADMIN; #[test] fn test_find_all_related_roles() { diff --git a/src/query/users/tests/it/user_mgr.rs b/src/query/users/tests/it/user_mgr.rs index 24098bf6aeb3..ca63a187a08a 100644 --- a/src/query/users/tests/it/user_mgr.rs +++ b/src/query/users/tests/it/user_mgr.rs @@ -12,19 +12,19 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_base::base::tokio; -use common_exception::ErrorCode; -use common_exception::Result; -use common_grpc::RpcClientConf; -use common_meta_app::principal::AuthInfo; -use common_meta_app::principal::GrantObject; -use common_meta_app::principal::PasswordHashMethod; -use common_meta_app::principal::UserGrantSet; -use common_meta_app::principal::UserIdentity; -use common_meta_app::principal::UserInfo; -use common_meta_app::principal::UserPrivilegeSet; -use common_meta_app::principal::UserPrivilegeType; -use common_users::UserApiProvider; +use databend_common_base::base::tokio; +use databend_common_exception::ErrorCode; +use databend_common_exception::Result; +use databend_common_grpc::RpcClientConf; +use databend_common_meta_app::principal::AuthInfo; +use databend_common_meta_app::principal::GrantObject; +use databend_common_meta_app::principal::PasswordHashMethod; +use databend_common_meta_app::principal::UserGrantSet; +use databend_common_meta_app::principal::UserIdentity; +use databend_common_meta_app::principal::UserInfo; +use databend_common_meta_app::principal::UserPrivilegeSet; +use databend_common_meta_app::principal::UserPrivilegeType; +use databend_common_users::UserApiProvider; use pretty_assertions::assert_eq; #[tokio::test(flavor = "multi_thread", worker_threads = 1)] diff --git a/src/query/users/tests/it/user_udf.rs b/src/query/users/tests/it/user_udf.rs index 70fc93670d1e..efca38c1a987 100644 --- a/src/query/users/tests/it/user_udf.rs +++ b/src/query/users/tests/it/user_udf.rs @@ -12,12 +12,12 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_base::base::tokio; -use common_exception::Result; -use common_expression::types::DataType; -use common_grpc::RpcClientConf; -use common_meta_app::principal::UserDefinedFunction; -use common_users::UserApiProvider; +use databend_common_base::base::tokio; +use databend_common_exception::Result; +use databend_common_expression::types::DataType; +use databend_common_grpc::RpcClientConf; +use databend_common_meta_app::principal::UserDefinedFunction; +use databend_common_users::UserApiProvider; use pretty_assertions::assert_eq; #[tokio::test(flavor = "multi_thread", worker_threads = 1)] diff --git a/src/tests/sqlsmith/Cargo.toml b/src/tests/sqlsmith/Cargo.toml index 790700079ecd..06f4e8823b90 100644 --- a/src/tests/sqlsmith/Cargo.toml +++ b/src/tests/sqlsmith/Cargo.toml @@ -22,13 +22,13 @@ tokio-stream = { workspace = true } tracing = "0.1.37" tracing-subscriber = "0.3.17" -common-ast = { path = "../../query/ast" } -common-exception = { path = "../../common/exception" } -common-expression = { path = "../../query/expression" } -common-formats = { path = "../../query/formats" } -common-functions = { path = "../../query/functions" } -common-io = { path = "../../common/io" } -common-sql = { path = "../../query/sql" } +databend-common-ast = { path = "../../query/ast" } +databend-common-exception = { path = "../../common/exception" } +databend-common-expression = { path = "../../query/expression" } +databend-common-formats = { path = "../../query/formats" } +databend-common-functions = { path = "../../query/functions" } +databend-common-io = { path = "../../common/io" } +databend-common-sql = { path = "../../query/sql" } [[bin]] name = "databend-sqlsmith" diff --git a/src/tests/sqlsmith/src/reducer.rs b/src/tests/sqlsmith/src/reducer.rs index 0220a6a4d3d4..0dbd65e342be 100644 --- a/src/tests/sqlsmith/src/reducer.rs +++ b/src/tests/sqlsmith/src/reducer.rs @@ -12,9 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_ast::ast::Query; -use common_ast::ast::SetExpr; use databend_client::error::Error as ClientError; +use databend_common_ast::ast::Query; +use databend_common_ast::ast::SetExpr; use databend_driver::Connection; use databend_driver::Error; diff --git a/src/tests/sqlsmith/src/runner.rs b/src/tests/sqlsmith/src/runner.rs index e4185ea9cbc1..d0a92c05e2f7 100644 --- a/src/tests/sqlsmith/src/runner.rs +++ b/src/tests/sqlsmith/src/runner.rs @@ -15,16 +15,16 @@ use std::future::Future; use std::time::Duration; -use common_ast::ast::CreateTableSource; -use common_ast::ast::CreateTableStmt; -use common_ast::ast::DropTableStmt; -use common_ast::ast::NullableConstraint; -use common_expression::types::DataType; -use common_expression::types::NumberDataType; -use common_expression::TableField; -use common_expression::TableSchemaRefExt; -use common_sql::resolve_type_name; use databend_client::error::Error as ClientError; +use databend_common_ast::ast::CreateTableSource; +use databend_common_ast::ast::CreateTableStmt; +use databend_common_ast::ast::DropTableStmt; +use databend_common_ast::ast::NullableConstraint; +use databend_common_expression::types::DataType; +use databend_common_expression::types::NumberDataType; +use databend_common_expression::TableField; +use databend_common_expression::TableSchemaRefExt; +use databend_common_sql::resolve_type_name; use databend_driver::Client; use databend_driver::Connection; use databend_driver::Error; diff --git a/src/tests/sqlsmith/src/sql_gen/ddl.rs b/src/tests/sqlsmith/src/sql_gen/ddl.rs index 4b28e738f4c2..6c15bb70148c 100644 --- a/src/tests/sqlsmith/src/sql_gen/ddl.rs +++ b/src/tests/sqlsmith/src/sql_gen/ddl.rs @@ -14,14 +14,14 @@ use std::collections::BTreeMap; -use common_ast::ast::ColumnDefinition; -use common_ast::ast::CreateTableSource; -use common_ast::ast::CreateTableStmt; -use common_ast::ast::DropTableStmt; -use common_ast::ast::Engine; -use common_ast::ast::Identifier; -use common_ast::ast::NullableConstraint; -use common_ast::ast::TypeName; +use databend_common_ast::ast::ColumnDefinition; +use databend_common_ast::ast::CreateTableSource; +use databend_common_ast::ast::CreateTableStmt; +use databend_common_ast::ast::DropTableStmt; +use databend_common_ast::ast::Engine; +use databend_common_ast::ast::Identifier; +use databend_common_ast::ast::NullableConstraint; +use databend_common_ast::ast::TypeName; use rand::distributions::Alphanumeric; use rand::Rng; diff --git a/src/tests/sqlsmith/src/sql_gen/dml.rs b/src/tests/sqlsmith/src/sql_gen/dml.rs index a7800bda4fdc..d332deaa0f93 100644 --- a/src/tests/sqlsmith/src/sql_gen/dml.rs +++ b/src/tests/sqlsmith/src/sql_gen/dml.rs @@ -15,42 +15,42 @@ use std::sync::Arc; use chrono_tz::Tz; -use common_ast::ast::AddColumnOption; -use common_ast::ast::AlterTableAction; -use common_ast::ast::AlterTableStmt; -use common_ast::ast::ColumnDefinition; -use common_ast::ast::DeleteStmt; -use common_ast::ast::Hint; -use common_ast::ast::HintItem; -use common_ast::ast::Identifier; -use common_ast::ast::InsertOperation; -use common_ast::ast::InsertSource; -use common_ast::ast::InsertStmt; -use common_ast::ast::MatchOperation; -use common_ast::ast::MatchedClause; -use common_ast::ast::MergeIntoStmt; -use common_ast::ast::MergeOption; -use common_ast::ast::MergeSource; -use common_ast::ast::MergeUpdateExpr; -use common_ast::ast::NullableConstraint; -use common_ast::ast::ReplaceStmt; -use common_ast::ast::TableReference; -use common_ast::ast::UnmatchedClause; -use common_ast::ast::UpdateExpr; -use common_ast::ast::UpdateStmt; -use common_exception::Span; -use common_expression::types::DataType; -use common_expression::Column; -use common_expression::ScalarRef; -use common_expression::TableField; -use common_formats::field_encoder::FieldEncoderValues; -use common_formats::OutputCommonSettings; -use common_io::constants::FALSE_BYTES_LOWER; -use common_io::constants::INF_BYTES_LOWER; -use common_io::constants::NAN_BYTES_LOWER; -use common_io::constants::NULL_BYTES_UPPER; -use common_io::constants::TRUE_BYTES_LOWER; -use common_sql::resolve_type_name; +use databend_common_ast::ast::AddColumnOption; +use databend_common_ast::ast::AlterTableAction; +use databend_common_ast::ast::AlterTableStmt; +use databend_common_ast::ast::ColumnDefinition; +use databend_common_ast::ast::DeleteStmt; +use databend_common_ast::ast::Hint; +use databend_common_ast::ast::HintItem; +use databend_common_ast::ast::Identifier; +use databend_common_ast::ast::InsertOperation; +use databend_common_ast::ast::InsertSource; +use databend_common_ast::ast::InsertStmt; +use databend_common_ast::ast::MatchOperation; +use databend_common_ast::ast::MatchedClause; +use databend_common_ast::ast::MergeIntoStmt; +use databend_common_ast::ast::MergeOption; +use databend_common_ast::ast::MergeSource; +use databend_common_ast::ast::MergeUpdateExpr; +use databend_common_ast::ast::NullableConstraint; +use databend_common_ast::ast::ReplaceStmt; +use databend_common_ast::ast::TableReference; +use databend_common_ast::ast::UnmatchedClause; +use databend_common_ast::ast::UpdateExpr; +use databend_common_ast::ast::UpdateStmt; +use databend_common_exception::Span; +use databend_common_expression::types::DataType; +use databend_common_expression::Column; +use databend_common_expression::ScalarRef; +use databend_common_expression::TableField; +use databend_common_formats::field_encoder::FieldEncoderValues; +use databend_common_formats::OutputCommonSettings; +use databend_common_io::constants::FALSE_BYTES_LOWER; +use databend_common_io::constants::INF_BYTES_LOWER; +use databend_common_io::constants::NAN_BYTES_LOWER; +use databend_common_io::constants::NULL_BYTES_UPPER; +use databend_common_io::constants::TRUE_BYTES_LOWER; +use databend_common_sql::resolve_type_name; use itertools::join; use rand::Rng; use roaring::RoaringTreemap; @@ -456,7 +456,7 @@ impl<'a, R: Rng + 'a> SqlGenerator<'a, R> { }; ( AlterTableAction::ModifyColumn { - action: common_ast::ast::ModifyColumnAction::SetDataType(vec![ + action: databend_common_ast::ast::ModifyColumnAction::SetDataType(vec![ new_column.clone(), ]), }, diff --git a/src/tests/sqlsmith/src/sql_gen/expr.rs b/src/tests/sqlsmith/src/sql_gen/expr.rs index ab1653c3a250..910d79cc1dc8 100644 --- a/src/tests/sqlsmith/src/sql_gen/expr.rs +++ b/src/tests/sqlsmith/src/sql_gen/expr.rs @@ -12,21 +12,21 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_ast::ast::BinaryOperator; -use common_ast::ast::ColumnID; -use common_ast::ast::ColumnPosition; -use common_ast::ast::Expr; -use common_ast::ast::Identifier; -use common_ast::ast::IntervalKind; -use common_ast::ast::Literal; -use common_ast::ast::MapAccessor; -use common_ast::ast::SubqueryModifier; -use common_ast::ast::TrimWhere; -use common_ast::ast::TypeName; -use common_ast::ast::UnaryOperator; -use common_expression::types::DataType; -use common_expression::types::DecimalDataType; -use common_expression::types::NumberDataType; +use databend_common_ast::ast::BinaryOperator; +use databend_common_ast::ast::ColumnID; +use databend_common_ast::ast::ColumnPosition; +use databend_common_ast::ast::Expr; +use databend_common_ast::ast::Identifier; +use databend_common_ast::ast::IntervalKind; +use databend_common_ast::ast::Literal; +use databend_common_ast::ast::MapAccessor; +use databend_common_ast::ast::SubqueryModifier; +use databend_common_ast::ast::TrimWhere; +use databend_common_ast::ast::TypeName; +use databend_common_ast::ast::UnaryOperator; +use databend_common_expression::types::DataType; +use databend_common_expression::types::DecimalDataType; +use databend_common_expression::types::NumberDataType; use ethnum::I256; use rand::distributions::Alphanumeric; use rand::Rng; diff --git a/src/tests/sqlsmith/src/sql_gen/func.rs b/src/tests/sqlsmith/src/sql_gen/func.rs index aa8d4ee3cd15..9e867e86d8c3 100644 --- a/src/tests/sqlsmith/src/sql_gen/func.rs +++ b/src/tests/sqlsmith/src/sql_gen/func.rs @@ -14,24 +14,24 @@ use std::mem; -use common_ast::ast::Expr; -use common_ast::ast::Identifier; -use common_ast::ast::Lambda; -use common_ast::ast::Literal; -use common_ast::ast::OrderByExpr; -use common_ast::ast::Window; -use common_ast::ast::WindowFrame; -use common_ast::ast::WindowFrameBound; -use common_ast::ast::WindowFrameUnits; -use common_ast::ast::WindowRef; -use common_ast::ast::WindowSpec; -use common_expression::types::DataType; -use common_expression::types::DecimalDataType::Decimal128; -use common_expression::types::DecimalDataType::Decimal256; -use common_expression::types::DecimalSize; -use common_expression::types::NumberDataType; -use common_expression::types::ALL_FLOAT_TYPES; -use common_expression::types::ALL_INTEGER_TYPES; +use databend_common_ast::ast::Expr; +use databend_common_ast::ast::Identifier; +use databend_common_ast::ast::Lambda; +use databend_common_ast::ast::Literal; +use databend_common_ast::ast::OrderByExpr; +use databend_common_ast::ast::Window; +use databend_common_ast::ast::WindowFrame; +use databend_common_ast::ast::WindowFrameBound; +use databend_common_ast::ast::WindowFrameUnits; +use databend_common_ast::ast::WindowRef; +use databend_common_ast::ast::WindowSpec; +use databend_common_expression::types::DataType; +use databend_common_expression::types::DecimalDataType::Decimal128; +use databend_common_expression::types::DecimalDataType::Decimal256; +use databend_common_expression::types::DecimalSize; +use databend_common_expression::types::NumberDataType; +use databend_common_expression::types::ALL_FLOAT_TYPES; +use databend_common_expression::types::ALL_INTEGER_TYPES; use rand::Rng; use crate::sql_gen::Column; diff --git a/src/tests/sqlsmith/src/sql_gen/query.rs b/src/tests/sqlsmith/src/sql_gen/query.rs index 68419545d217..40b7449da351 100644 --- a/src/tests/sqlsmith/src/sql_gen/query.rs +++ b/src/tests/sqlsmith/src/sql_gen/query.rs @@ -14,30 +14,30 @@ use std::mem; -use common_ast::ast::Expr; -use common_ast::ast::GroupBy; -use common_ast::ast::Identifier; -use common_ast::ast::Join; -use common_ast::ast::JoinCondition; -use common_ast::ast::JoinOperator; -use common_ast::ast::Literal; -use common_ast::ast::OrderByExpr; -use common_ast::ast::Query; -use common_ast::ast::SelectStmt; -use common_ast::ast::SelectTarget; -use common_ast::ast::SetExpr; -use common_ast::ast::TableAlias; -use common_ast::ast::TableReference; -use common_ast::ast::WindowDefinition; -use common_ast::ast::With; -use common_ast::ast::CTE; -use common_expression::infer_schema_type; -use common_expression::types::DataType; -use common_expression::types::NumberDataType; -use common_expression::TableDataType; -use common_expression::TableField; -use common_expression::TableSchemaRef; -use common_expression::TableSchemaRefExt; +use databend_common_ast::ast::Expr; +use databend_common_ast::ast::GroupBy; +use databend_common_ast::ast::Identifier; +use databend_common_ast::ast::Join; +use databend_common_ast::ast::JoinCondition; +use databend_common_ast::ast::JoinOperator; +use databend_common_ast::ast::Literal; +use databend_common_ast::ast::OrderByExpr; +use databend_common_ast::ast::Query; +use databend_common_ast::ast::SelectStmt; +use databend_common_ast::ast::SelectTarget; +use databend_common_ast::ast::SetExpr; +use databend_common_ast::ast::TableAlias; +use databend_common_ast::ast::TableReference; +use databend_common_ast::ast::WindowDefinition; +use databend_common_ast::ast::With; +use databend_common_ast::ast::CTE; +use databend_common_expression::infer_schema_type; +use databend_common_expression::types::DataType; +use databend_common_expression::types::NumberDataType; +use databend_common_expression::TableDataType; +use databend_common_expression::TableField; +use databend_common_expression::TableSchemaRef; +use databend_common_expression::TableSchemaRefExt; use rand::Rng; use crate::sql_gen::Column; diff --git a/src/tests/sqlsmith/src/sql_gen/sql_generator.rs b/src/tests/sqlsmith/src/sql_gen/sql_generator.rs index 560daa94c6f6..3fe85f1c17aa 100644 --- a/src/tests/sqlsmith/src/sql_gen/sql_generator.rs +++ b/src/tests/sqlsmith/src/sql_gen/sql_generator.rs @@ -12,11 +12,11 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_ast::ast::GroupBy; -use common_expression::types::DataType; -use common_expression::FunctionSignature; -use common_expression::TableSchemaRef; -use common_functions::BUILTIN_FUNCTIONS; +use databend_common_ast::ast::GroupBy; +use databend_common_expression::types::DataType; +use databend_common_expression::FunctionSignature; +use databend_common_expression::TableSchemaRef; +use databend_common_functions::BUILTIN_FUNCTIONS; use rand::Rng; #[derive(Clone, Debug)] diff --git a/src/tests/sqlsmith/src/sql_gen/types.rs b/src/tests/sqlsmith/src/sql_gen/types.rs index a9253dee92f0..f12d58c85ab9 100644 --- a/src/tests/sqlsmith/src/sql_gen/types.rs +++ b/src/tests/sqlsmith/src/sql_gen/types.rs @@ -12,10 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_expression::types::decimal::DecimalSize; -use common_expression::types::DataType; -use common_expression::types::DecimalDataType; -use common_expression::types::NumberDataType; +use databend_common_expression::types::decimal::DecimalSize; +use databend_common_expression::types::DataType; +use databend_common_expression::types::DecimalDataType; +use databend_common_expression::types::NumberDataType; use rand::Rng; use crate::sql_gen::SqlGenerator; diff --git a/tests/sqllogictests/Cargo.toml b/tests/sqllogictests/Cargo.toml index 0a0b21f419b4..5bf61d4344bd 100644 --- a/tests/sqllogictests/Cargo.toml +++ b/tests/sqllogictests/Cargo.toml @@ -14,7 +14,7 @@ version = "0.1.0" name = "databend-sqllogictests" [dependencies] -common-exception = { path = "../../src/common/exception" } +databend-common-exception = { path = "../../src/common/exception" } async-trait = { workspace = true } clap = { workspace = true } diff --git a/tests/sqllogictests/src/error.rs b/tests/sqllogictests/src/error.rs index 6049697d185a..3e9fa5e3a45a 100644 --- a/tests/sqllogictests/src/error.rs +++ b/tests/sqllogictests/src/error.rs @@ -15,7 +15,7 @@ use std::fmt::Display; use std::io::Error as IOError; -use common_exception::ErrorCode; +use databend_common_exception::ErrorCode; use mysql_async::Error as MysqlClientError; use reqwest::Error as HttpClientError; use serde::Deserialize;