Full Code of secretflow/scql for AI

main 8107675dd7e7 cached
849 files
10.6 MB
2.8M tokens
10709 symbols
1 requests
Copy disabled (too large) Download .txt
Showing preview only (11,288K chars total). Download the full file to get everything.
Repository: secretflow/scql
Branch: main
Commit: 8107675dd7e7
Files: 849
Total size: 10.6 MB

Directory structure:
gitextract_kxn6szmx/

├── .bazeliskrc
├── .bazelrc
├── .circleci/
│   ├── config.yml
│   ├── coverage-config.yml
│   ├── diff-cover-config.yml
│   ├── full-unittest-config.yml
│   ├── lite-unittest-config.yml
│   └── path-filtering/
│       └── unittest.conf
├── .clang-format
├── .clang-tidy
├── .coveralls.yml
├── .devcontainer/
│   ├── Dockerfile
│   └── devcontainer.json
├── .github/
│   ├── CODEOWNERS
│   ├── ISSUE_TEMPLATE/
│   │   ├── Consulting_issue_template.yaml
│   │   └── Error_Issue_Template.yaml
│   └── workflows/
│       ├── black.yml
│       ├── buildifier.yml
│       ├── cla.yml
│       ├── clang-format-linter.yml
│       ├── codeql.yml
│       ├── dependency-review.yml
│       ├── docs-check.yml
│       ├── docs-publish.yml
│       ├── golangci-lint.yml
│       ├── govulncheck.yml
│       ├── license-check.yml
│       ├── oscp.yml
│       ├── scorecards.yml
│       ├── stale.yml
│       ├── trigger-ci-cov.yml
│       ├── trigger-ci-full-ut.yml
│       ├── trigger-ci-lite-ut.yml
│       ├── trigger-diff-coverage.yml
│       ├── whitespace-check.yml
│       └── yaml-linter.yml
├── .gitignore
├── .golangci.yml
├── .licenserc.yaml
├── .markdownlint.yaml
├── .pre-commit-config.yaml
├── .vscode/
│   ├── cspell.json
│   ├── extensions.json
│   └── settings.json
├── BUILD.bazel
├── CHANGELOG.md
├── CONTRIBUTING.md
├── LEGAL.md
├── LICENSE
├── MODULE.bazel
├── Makefile
├── README.md
├── REPO_LAYOUT.md
├── SECURITY.md
├── api/
│   ├── BUILD.bazel
│   ├── buf.yaml
│   ├── common.proto
│   ├── core.proto
│   ├── engine.proto
│   ├── generate_proto.sh
│   ├── interpreter.proto
│   ├── scql_task.proto
│   ├── status.proto
│   ├── status_code.proto
│   ├── subgraph.proto
│   ├── v1/
│   │   ├── BUILD.bazel
│   │   ├── column.proto
│   │   └── genproto.sh
│   └── v1alpha1/
│       ├── BUILD.bazel
│       └── compiler.proto
├── bazel/
│   ├── BUILD.bazel
│   ├── defs.bzl
│   ├── patches/
│   │   ├── BUILD.bazel
│   │   ├── grpc-plugin.patch
│   │   ├── protobuf-xla.patch
│   │   └── rules_foreign_cc.patch
│   └── repositories.bzl
├── cmd/
│   └── docgen/
│       ├── main.go
│       └── scql_operators.md.tmpl
├── docs/
│   ├── CONTRIBUTING.md
│   ├── Makefile
│   ├── _static/
│   │   ├── css/
│   │   │   └── custom.css
│   │   └── js/
│   │       └── custom.js
│   ├── conf.py
│   ├── index.rst
│   ├── intro/
│   │   ├── index.rst
│   │   └── opencore-quickstart.rst
│   ├── locales/
│   │   └── zh_CN/
│   │       └── LC_MESSAGES/
│   │           ├── index.po
│   │           ├── intro/
│   │           │   ├── index.po
│   │           │   └── opencore-quickstart.po
│   │           ├── reference/
│   │           │   ├── compiler-config.po
│   │           │   ├── engine-config.po
│   │           │   ├── implementation-status.po
│   │           │   ├── index.po
│   │           │   ├── lang/
│   │           │   │   ├── manual.po
│   │           │   │   └── mysql-compatibility.po
│   │           │   └── operators.po
│   │           └── topics/
│   │               ├── faq.po
│   │               ├── index.po
│   │               ├── security/
│   │               │   └── overview.po
│   │               └── system/
│   │                   └── intro.po
│   ├── reference/
│   │   ├── compiler-config.rst
│   │   ├── engine-config.rst
│   │   ├── implementation-status.rst
│   │   ├── index.rst
│   │   ├── lang/
│   │   │   ├── manual.rst
│   │   │   └── mysql-compatibility.rst
│   │   └── operators.md
│   ├── requirements.txt
│   └── topics/
│       ├── faq.rst
│       ├── index.rst
│       ├── security/
│       │   └── overview.rst
│       └── system/
│           └── intro.rst
├── engine/
│   ├── auth/
│   │   ├── BUILD.bazel
│   │   ├── authenticator.cc
│   │   ├── authenticator.h
│   │   ├── authenticator_test.cc
│   │   ├── authorized_profile.cc
│   │   ├── authorized_profile.h
│   │   └── authorized_profile.proto
│   ├── bazel/
│   │   ├── BUILD.bazel
│   │   ├── duckdb.BUILD
│   │   ├── engine_deps.bzl
│   │   ├── gperftools.BUILD
│   │   ├── mysql.BUILD
│   │   ├── patches/
│   │   │   ├── dataproxy.patch
│   │   │   ├── duckdb.patch
│   │   │   ├── mysql.patch
│   │   │   ├── poco.patch
│   │   │   └── psi.patch
│   │   ├── perfetto.BUILD
│   │   ├── poco.BUILD
│   │   ├── postgres.BUILD
│   │   ├── scql.bzl
│   │   └── sqlite3.BUILD
│   ├── core/
│   │   ├── BUILD.bazel
│   │   ├── arrow_helper.h
│   │   ├── primitive_builder.cc
│   │   ├── primitive_builder.h
│   │   ├── primitive_builder_test.cc
│   │   ├── string_tensor_builder.cc
│   │   ├── string_tensor_builder.h
│   │   ├── string_tensor_builder_test.cc
│   │   ├── tensor.cc
│   │   ├── tensor.h
│   │   ├── tensor_batch_reader.cc
│   │   ├── tensor_batch_reader.h
│   │   ├── tensor_batch_reader_test.cc
│   │   ├── tensor_builder.cc
│   │   ├── tensor_builder.h
│   │   ├── tensor_constructor.cc
│   │   ├── tensor_constructor.h
│   │   ├── tensor_constructor_test.cc
│   │   ├── tensor_slice.cc
│   │   ├── tensor_slice.h
│   │   ├── type.cc
│   │   └── type.h
│   ├── datasource/
│   │   ├── BUILD.bazel
│   │   ├── arrow_sql_adaptor.cc
│   │   ├── arrow_sql_adaptor.h
│   │   ├── arrow_sql_adaptor_factory.h
│   │   ├── arrow_sql_adaptor_test.cc
│   │   ├── csvdb_adaptor.cc
│   │   ├── csvdb_adaptor.h
│   │   ├── csvdb_adaptor_factory.cc
│   │   ├── csvdb_adaptor_factory.h
│   │   ├── csvdb_adaptor_test.cc
│   │   ├── csvdb_conf.proto
│   │   ├── dataproxy_conf.proto
│   │   ├── datasource.proto
│   │   ├── datasource_adaptor.cc
│   │   ├── datasource_adaptor.h
│   │   ├── datasource_adaptor_factory.h
│   │   ├── datasource_adaptor_mgr.cc
│   │   ├── datasource_adaptor_mgr.h
│   │   ├── dm_adaptor.cc
│   │   ├── dm_adaptor.h
│   │   ├── dm_adaptor_factory.cc
│   │   ├── dm_adaptor_factory.h
│   │   ├── dm_adaptor_kuscia_test.cc
│   │   ├── dp_adaptor.cc
│   │   ├── dp_adaptor.h
│   │   ├── dp_adaptor_factory.cc
│   │   ├── dp_adaptor_factory.h
│   │   ├── dp_adaptor_test.cc
│   │   ├── duckdb_wrapper.cc
│   │   ├── duckdb_wrapper.h
│   │   ├── duckdb_wrapper_test.cc
│   │   ├── embed_router.cc
│   │   ├── embed_router.h
│   │   ├── embed_router.proto
│   │   ├── embed_router_test.cc
│   │   ├── http_router.cc
│   │   ├── http_router.h
│   │   ├── http_router.proto
│   │   ├── kuscia_datamesh_router.cc
│   │   ├── kuscia_datamesh_router.h
│   │   ├── kuscia_datamesh_router_test.cc
│   │   ├── mock_router_readme.md
│   │   ├── mock_router_server.py
│   │   ├── odbc_adaptor.cc
│   │   ├── odbc_adaptor.h
│   │   ├── odbc_adaptor_factory.cc
│   │   ├── odbc_adaptor_factory.h
│   │   ├── odbc_adaptor_mysql_test.cc
│   │   ├── odbc_adaptor_sqlite_test.cc
│   │   ├── odbc_connector.cc
│   │   ├── odbc_connector.h
│   │   ├── requirements.txt
│   │   ├── router.h
│   │   └── run_odbc_adaptor_mysql_test.sh
│   ├── exe/
│   │   ├── BUILD.bazel
│   │   ├── flags.cc
│   │   ├── flags.h
│   │   ├── main.cc
│   │   └── version.h
│   ├── framework/
│   │   ├── BUILD.bazel
│   │   ├── exec.cc
│   │   ├── exec.h
│   │   ├── executor.cc
│   │   ├── executor.h
│   │   ├── operator.cc
│   │   ├── operator.h
│   │   ├── party_info.cc
│   │   ├── party_info.h
│   │   ├── party_info_test.cc
│   │   ├── registry.cc
│   │   ├── registry.h
│   │   ├── session.cc
│   │   ├── session.h
│   │   ├── session_manager.cc
│   │   ├── session_manager.h
│   │   ├── session_manager_test.cc
│   │   ├── tensor_table.cc
│   │   └── tensor_table.h
│   ├── link/
│   │   ├── BUILD.bazel
│   │   ├── channel_manager.cc
│   │   ├── channel_manager.h
│   │   ├── listener.cc
│   │   ├── listener.h
│   │   ├── listener_test.cc
│   │   ├── mux_link_factory.cc
│   │   ├── mux_link_factory.h
│   │   ├── mux_receiver.proto
│   │   ├── mux_receiver_service.cc
│   │   ├── mux_receiver_service.h
│   │   ├── mux_receiver_service_test.cc
│   │   ├── rpc_helper.cc
│   │   ├── rpc_helper.h
│   │   └── rpc_helper_test.cc
│   ├── operator/
│   │   ├── BUILD.bazel
│   │   ├── all_ops_register.cc
│   │   ├── all_ops_register.h
│   │   ├── all_ops_register_test.cc
│   │   ├── arithmetic.cc
│   │   ├── arithmetic.h
│   │   ├── arithmetic_test.cc
│   │   ├── arrow_func.cc
│   │   ├── arrow_func.h
│   │   ├── arrow_func_test.cc
│   │   ├── binary_base.cc
│   │   ├── binary_base.h
│   │   ├── binary_test.h
│   │   ├── broadcast_to.cc
│   │   ├── broadcast_to.h
│   │   ├── broadcast_to_test.cc
│   │   ├── bucket.cc
│   │   ├── bucket.h
│   │   ├── bucket_bench.cc
│   │   ├── bucket_test.cc
│   │   ├── case_when.cc
│   │   ├── case_when.h
│   │   ├── case_when_test.cc
│   │   ├── cast.cc
│   │   ├── cast.h
│   │   ├── cast_test.cc
│   │   ├── coalesce.cc
│   │   ├── coalesce.h
│   │   ├── coalesce_test.cc
│   │   ├── compare.cc
│   │   ├── compare.h
│   │   ├── compare_test.cc
│   │   ├── concat.cc
│   │   ├── concat.h
│   │   ├── concat_test.cc
│   │   ├── constant.cc
│   │   ├── constant.h
│   │   ├── constant_test.cc
│   │   ├── copy.cc
│   │   ├── copy.h
│   │   ├── copy_test.cc
│   │   ├── dump_file.cc
│   │   ├── dump_file.h
│   │   ├── dump_file_test.cc
│   │   ├── filter.cc
│   │   ├── filter.h
│   │   ├── filter_by_index.cc
│   │   ├── filter_by_index.h
│   │   ├── filter_by_index_test.cc
│   │   ├── filter_test.cc
│   │   ├── group.cc
│   │   ├── group.h
│   │   ├── group_agg.cc
│   │   ├── group_agg.h
│   │   ├── group_agg_test.cc
│   │   ├── group_secret_agg.cc
│   │   ├── group_secret_agg.h
│   │   ├── group_secret_agg_test.cc
│   │   ├── group_test.cc
│   │   ├── if.cc
│   │   ├── if.h
│   │   ├── if_null.cc
│   │   ├── if_null.h
│   │   ├── if_null_test.cc
│   │   ├── if_test.cc
│   │   ├── in.cc
│   │   ├── in.h
│   │   ├── in_test.cc
│   │   ├── insert_table.cc
│   │   ├── insert_table.h
│   │   ├── insert_table_mysql_pg_test.cc
│   │   ├── insert_table_test.cc
│   │   ├── is_null.cc
│   │   ├── is_null.h
│   │   ├── is_null_test.cc
│   │   ├── join.cc
│   │   ├── join.h
│   │   ├── join_test.cc
│   │   ├── limit.cc
│   │   ├── limit.h
│   │   ├── limit_test.cc
│   │   ├── logical.cc
│   │   ├── logical.h
│   │   ├── logical_test.cc
│   │   ├── make_private.cc
│   │   ├── make_private.h
│   │   ├── make_private_test.cc
│   │   ├── make_public.cc
│   │   ├── make_public.h
│   │   ├── make_public_test.cc
│   │   ├── make_share.cc
│   │   ├── make_share.h
│   │   ├── make_share_test.cc
│   │   ├── oblivious_group_agg.cc
│   │   ├── oblivious_group_agg.h
│   │   ├── oblivious_group_agg_test.cc
│   │   ├── oblivious_group_mark.cc
│   │   ├── oblivious_group_mark.h
│   │   ├── oblivious_group_mark_test.cc
│   │   ├── publish.cc
│   │   ├── publish.h
│   │   ├── publish_test.cc
│   │   ├── reduce.cc
│   │   ├── reduce.h
│   │   ├── reduce_test.cc
│   │   ├── replicate.cc
│   │   ├── replicate.h
│   │   ├── replicate_test.cc
│   │   ├── run_sql.cc
│   │   ├── run_sql.h
│   │   ├── run_sql_test.cc
│   │   ├── secret_join.cc
│   │   ├── secret_join.h
│   │   ├── secret_join_test.cc
│   │   ├── shape.cc
│   │   ├── shape.h
│   │   ├── shape_test.cc
│   │   ├── shuffle.cc
│   │   ├── shuffle.h
│   │   ├── shuffle_test.cc
│   │   ├── sort.cc
│   │   ├── sort.h
│   │   ├── sort_test.cc
│   │   ├── test_util.cc
│   │   ├── test_util.h
│   │   ├── trigonometric.cc
│   │   ├── trigonometric.h
│   │   ├── trigonometric_test.cc
│   │   ├── unary.cc
│   │   ├── unary.h
│   │   ├── unary_base.cc
│   │   ├── unary_base.h
│   │   ├── unary_test.cc
│   │   ├── unique.cc
│   │   ├── unique.h
│   │   ├── unique_test.cc
│   │   ├── window.cc
│   │   ├── window.h
│   │   └── window_test.cc
│   ├── services/
│   │   ├── BUILD.bazel
│   │   ├── engine_service_impl.cc
│   │   ├── engine_service_impl.h
│   │   ├── engine_service_impl_test.cc
│   │   ├── error_collector_service.proto
│   │   ├── error_collector_service_impl.cc
│   │   ├── error_collector_service_impl.h
│   │   ├── mock_report_service.proto
│   │   ├── pipeline.cc
│   │   ├── pipeline.h
│   │   ├── prometheus_service.proto
│   │   ├── prometheus_service_impl.cc
│   │   ├── prometheus_service_impl.h
│   │   ├── run_plan_core.cc
│   │   └── run_plan_core.h
│   └── util/
│       ├── BUILD.bazel
│       ├── communicate_helper.h
│       ├── concurrent_queue.h
│       ├── context_util.cc
│       ├── context_util.h
│       ├── copy_to_proto_vistor.h
│       ├── datamesh_helper.cc
│       ├── datamesh_helper.h
│       ├── datamesh_helper_test.cc
│       ├── disk/
│       │   ├── BUILD.bazel
│       │   ├── arrow_reader.cc
│       │   ├── arrow_reader.h
│       │   ├── arrow_writer.cc
│       │   ├── arrow_writer.h
│       │   ├── read_write_bench.cc
│       │   └── reader_writer_test.cc
│       ├── dp/
│       │   ├── BUILD.bazel
│       │   └── flight.proto
│       ├── filepath_helper.cc
│       ├── filepath_helper.h
│       ├── filepath_helper_test.cc
│       ├── kpad_task_helper.cc
│       ├── kpad_task_helper.h
│       ├── kpad_task_helper_test.cc
│       ├── logging.cc
│       ├── logging.h
│       ├── ndarray_to_arrow.cc
│       ├── ndarray_to_arrow.h
│       ├── prefix_sum.cc
│       ├── prefix_sum.h
│       ├── progress_util.h
│       ├── prometheus_monitor.cc
│       ├── prometheus_monitor.h
│       ├── psi/
│       │   ├── BUILD.bazel
│       │   ├── batch_provider.cc
│       │   ├── batch_provider.h
│       │   ├── batch_provider_test.cc
│       │   ├── cipher_intersection.cc
│       │   ├── cipher_intersection.h
│       │   ├── cipher_intersection_bench.cc
│       │   ├── cipher_intersection_test.cc
│       │   ├── common.cc
│       │   ├── common.h
│       │   ├── detail_logger.cc
│       │   ├── detail_logger.h
│       │   ├── ub_helper.cc
│       │   └── ub_helper.h
│       ├── spu_io.cc
│       ├── spu_io.h
│       ├── ssl_helper.cc
│       ├── ssl_helper.h
│       ├── ssl_helper_test.cc
│       ├── stringifier.cc
│       ├── stringifier.h
│       ├── stringifier_test.cc
│       ├── table_util.cc
│       ├── table_util.h
│       ├── tensor_util.cc
│       ├── tensor_util.h
│       ├── time_util.cc
│       ├── time_util.h
│       ├── trace_categories.cc
│       ├── trace_categories.h
│       ├── upload_info_helper.cc
│       ├── upload_info_helper.h
│       └── upload_info_helper_test.cc
├── examples/
│   ├── opencore-demo/
│   │   └── main.go
│   └── tutorial/
│       ├── .gitignore
│       ├── README.md
│       ├── docker/
│       │   ├── build.sh
│       │   └── scql-ubuntu.Dockerfile
│       ├── docker-compose.yml.template
│       ├── engine/
│       │   ├── alice/
│       │   │   └── conf/
│       │   │       └── gflags.conf.template
│       │   └── bob/
│       │       └── conf/
│       │           └── gflags.conf.template
│       ├── example_config.json
│       ├── mysql/
│       │   └── initdb/
│       │       ├── alice_init.sql
│       │       └── bob_init.sql
│       ├── project_bootstrap.sh
│       └── setup.sh
├── go.mod
├── go.sum
├── pkg/
│   ├── config/
│   │   └── tls_config.go
│   ├── constant/
│   │   └── constant.go
│   ├── executor/
│   │   ├── engine_client.go
│   │   ├── engine_client_test.go
│   │   ├── engine_stub.go
│   │   ├── engine_stub_mock.go
│   │   ├── engine_stub_test.go
│   │   ├── executor.go
│   │   └── executor_test.go
│   ├── expression/
│   │   ├── aggregation/
│   │   │   ├── aggregation.go
│   │   │   ├── base_func.go
│   │   │   ├── descriptor.go
│   │   │   ├── util.go
│   │   │   └── window_func.go
│   │   ├── builtin.go
│   │   ├── builtin_arithmetic.go
│   │   ├── builtin_cast.go
│   │   ├── builtin_compare.go
│   │   ├── builtin_control.go
│   │   ├── builtin_like.go
│   │   ├── builtin_math.go
│   │   ├── builtin_op.go
│   │   ├── builtin_other.go
│   │   ├── builtin_string.go
│   │   ├── builtin_time.go
│   │   ├── column.go
│   │   ├── constant.go
│   │   ├── errors.go
│   │   ├── expression.go
│   │   ├── expression_to_stmt.go
│   │   ├── function_traits.go
│   │   ├── helper.go
│   │   ├── rand.go
│   │   ├── scalar_function.go
│   │   ├── schema.go
│   │   ├── simple_rewriter.go
│   │   └── util.go
│   ├── infoschema/
│   │   ├── builder.go
│   │   ├── infoschema.go
│   │   ├── infoschema_test.go
│   │   └── table_schema.go
│   ├── interpreter/
│   │   ├── compiler/
│   │   │   ├── arrow_func_options.go
│   │   │   ├── codegen_pass.go
│   │   │   ├── column_security_relaxation.go
│   │   │   ├── column_security_relaxation_test.go
│   │   │   ├── common.go
│   │   │   ├── common_test.go
│   │   │   ├── compiler.go
│   │   │   ├── compiler_test.go
│   │   │   ├── constant.go
│   │   │   ├── data/
│   │   │   │   └── test_queries.json
│   │   │   ├── execution_graph_builder.go
│   │   │   ├── execution_graph_builder_ops.go
│   │   │   ├── execution_graph_builder_test.go
│   │   │   ├── execution_graph_pass.go
│   │   │   ├── inference.go
│   │   │   ├── inference_test.go
│   │   │   ├── kernel.go
│   │   │   ├── kernel_resolver.go
│   │   │   ├── kernel_resolver_test.go
│   │   │   ├── kernel_test.go
│   │   │   ├── logical_plan_pass.go
│   │   │   ├── operator.go
│   │   │   ├── operator_graph.go
│   │   │   ├── operator_graph_builder.go
│   │   │   ├── operator_graph_builder_test.go
│   │   │   ├── operator_graph_pass.go
│   │   │   ├── parser_pass.go
│   │   │   ├── reverse_inference.go
│   │   │   ├── reverse_inference_test.go
│   │   │   ├── security_relaxation_manager.go
│   │   │   ├── tensor_manager.go
│   │   │   ├── tensor_manager_test.go
│   │   │   ├── tensor_meta.go
│   │   │   ├── tensor_meta_manager.go
│   │   │   ├── tensor_meta_manager_test.go
│   │   │   ├── tensor_meta_test.go
│   │   │   ├── tensor_placement.go
│   │   │   ├── tensor_placement_test.go
│   │   │   ├── tensor_status_converter.go
│   │   │   ├── tensor_status_converter_test.go
│   │   │   ├── tensor_tracker.go
│   │   │   ├── tensor_tracker_test.go
│   │   │   ├── test_execution_graph_input.go
│   │   │   ├── update_column_security.go
│   │   │   ├── update_column_security_test.go
│   │   │   ├── util/
│   │   │   │   ├── priority_queue.go
│   │   │   │   └── priority_queue_test.go
│   │   │   ├── visibility_analysis_pass.go
│   │   │   ├── visibility_basic_inference.go
│   │   │   ├── visibility_basic_inference_test.go
│   │   │   ├── visibility_inference_with_relaxation.go
│   │   │   ├── visibility_registry.go
│   │   │   ├── visibility_registry_test.go
│   │   │   ├── visibility_solver.go
│   │   │   ├── visibility_solver_test.go
│   │   │   ├── visible_parties.go
│   │   │   └── visible_parties_test.go
│   │   ├── graph/
│   │   │   ├── attribute.go
│   │   │   ├── attribute_test.go
│   │   │   ├── constant.go
│   │   │   ├── data_type.go
│   │   │   ├── engine_info.go
│   │   │   ├── engine_info_test.go
│   │   │   ├── execution_node.go
│   │   │   ├── graph.go
│   │   │   ├── graph_mapper.go
│   │   │   ├── graph_mapper_test.go
│   │   │   ├── graph_optimizer.go
│   │   │   ├── graph_optimizer_test.go
│   │   │   ├── graph_partitioner.go
│   │   │   ├── graph_splitter.go
│   │   │   ├── graph_splitter_test.go
│   │   │   ├── graph_test.go
│   │   │   └── tensor.go
│   │   ├── operator/
│   │   │   ├── constant.go
│   │   │   ├── operator_checker.go
│   │   │   ├── operator_def.go
│   │   │   ├── operator_def_test.go
│   │   │   └── operator_registration.go
│   │   └── sc/
│   │       └── scql_compiler.go
│   ├── parser/
│   │   ├── .gitignore
│   │   ├── LICENSE
│   │   ├── Makefile
│   │   ├── README.md
│   │   ├── ast/
│   │   │   ├── advisor.go
│   │   │   ├── ast.go
│   │   │   ├── base.go
│   │   │   ├── ddl.go
│   │   │   ├── ddl_test.go
│   │   │   ├── dml.go
│   │   │   ├── dml_test.go
│   │   │   ├── expressions.go
│   │   │   ├── expressions_test.go
│   │   │   ├── flag.go
│   │   │   ├── flag_test.go
│   │   │   ├── format_test.go
│   │   │   ├── functions.go
│   │   │   ├── functions_test.go
│   │   │   ├── misc.go
│   │   │   ├── misc_test.go
│   │   │   ├── stats.go
│   │   │   ├── util.go
│   │   │   └── util_test.go
│   │   ├── auth/
│   │   │   ├── auth.go
│   │   │   └── auth_test.go
│   │   ├── bench_test.go
│   │   ├── charset/
│   │   │   ├── charset.go
│   │   │   ├── charset_test.go
│   │   │   └── encoding_table.go
│   │   ├── consistent_test.go
│   │   ├── digester.go
│   │   ├── digester_test.go
│   │   ├── export_test.go
│   │   ├── format/
│   │   │   ├── format.go
│   │   │   ├── format_dialect.go
│   │   │   └── format_test.go
│   │   ├── goyacc/
│   │   │   ├── format_yacc.go
│   │   │   └── main.go
│   │   ├── hintparser.go
│   │   ├── hintparser.y
│   │   ├── hintparser_test.go
│   │   ├── hintparserimpl.go
│   │   ├── lexer.go
│   │   ├── lexer_test.go
│   │   ├── misc.go
│   │   ├── model/
│   │   │   ├── ddl.go
│   │   │   ├── flags.go
│   │   │   ├── model.go
│   │   │   └── model_test.go
│   │   ├── mysql/
│   │   │   ├── charset.go
│   │   │   ├── const.go
│   │   │   ├── const_test.go
│   │   │   ├── errcode.go
│   │   │   ├── errname.go
│   │   │   ├── error.go
│   │   │   ├── error_test.go
│   │   │   ├── locale_format.go
│   │   │   ├── state.go
│   │   │   ├── type.go
│   │   │   ├── type_test.go
│   │   │   └── util.go
│   │   ├── opcode/
│   │   │   ├── opcode.go
│   │   │   └── opcode_test.go
│   │   ├── parser.go
│   │   ├── parser.y
│   │   ├── parser_test.go
│   │   ├── terror/
│   │   │   ├── terror.go
│   │   │   └── terror_test.go
│   │   ├── test.sh
│   │   ├── test_driver/
│   │   │   ├── test_driver.go
│   │   │   ├── test_driver_datum.go
│   │   │   ├── test_driver_helper.go
│   │   │   └── test_driver_mydecimal.go
│   │   ├── types/
│   │   │   ├── etc.go
│   │   │   ├── eval_type.go
│   │   │   ├── field_type.go
│   │   │   └── field_type_test.go
│   │   └── yy_parser.go
│   ├── planner/
│   │   ├── README.md
│   │   ├── core/
│   │   │   ├── common_plans.go
│   │   │   ├── database_dialect.go
│   │   │   ├── dot.go
│   │   │   ├── dot_test.go
│   │   │   ├── errors.go
│   │   │   ├── explain.go
│   │   │   ├── expression_rewriter.go
│   │   │   ├── hashcode.go
│   │   │   ├── initialize.go
│   │   │   ├── logical_plan_builder.go
│   │   │   ├── logical_plan_test.go
│   │   │   ├── logical_plans.go
│   │   │   ├── logicalplan_to_stmt.go
│   │   │   ├── logicalplan_to_stmt_helper.go
│   │   │   ├── logicalplan_to_stmt_test.go
│   │   │   ├── optimizer.go
│   │   │   ├── plan.go
│   │   │   ├── planbuilder.go
│   │   │   ├── preprocess.go
│   │   │   ├── rewrite.go
│   │   │   ├── rewrite_test.go
│   │   │   ├── rule_aggregation_elimination.go
│   │   │   ├── rule_aggregation_push_down.go
│   │   │   ├── rule_build_key_info.go
│   │   │   ├── rule_column_pruning.go
│   │   │   ├── rule_decorrelate.go
│   │   │   ├── rule_eliminate_projection.go
│   │   │   ├── rule_groupby_threshold.go
│   │   │   ├── rule_join_reorder.go
│   │   │   ├── rule_join_reorder_greedy.go
│   │   │   ├── rule_merge_selection.go
│   │   │   ├── rule_patch_timezone.go
│   │   │   ├── rule_patch_timezone_test.go
│   │   │   ├── rule_predicate_push_down.go
│   │   │   ├── stringer.go
│   │   │   ├── testdata/
│   │   │   │   ├── runsql_in.json
│   │   │   │   ├── typical_query_in.json
│   │   │   │   └── typical_query_out.json
│   │   │   └── util.go
│   │   ├── property/
│   │   │   └── property.go
│   │   └── util/
│   │       ├── custom_vistor.go
│   │       ├── custom_vistor_test.go
│   │       ├── debug_util.go
│   │       └── path.go
│   ├── proto-gen/
│   │   ├── scql/
│   │   │   ├── common.pb.go
│   │   │   ├── core.pb.go
│   │   │   ├── engine.pb.go
│   │   │   ├── interpreter.pb.go
│   │   │   ├── scql_task.pb.go
│   │   │   ├── status.pb.go
│   │   │   ├── status_code.pb.go
│   │   │   ├── subgraph.pb.go
│   │   │   └── v1alpha1/
│   │   │       └── compiler.pb.go
│   │   └── spu/
│   │       └── spu.pb.go
│   ├── sessionctx/
│   │   ├── context.go
│   │   ├── stmtctx/
│   │   │   └── stmtctx.go
│   │   └── variable/
│   │       ├── session.go
│   │       └── sysvar.go
│   ├── status/
│   │   ├── status.go
│   │   └── status_test.go
│   ├── table/
│   │   ├── column.go
│   │   ├── table.go
│   │   └── tables/
│   │       └── tables.go
│   ├── types/
│   │   ├── binary_literal.go
│   │   ├── compare.go
│   │   ├── convert.go
│   │   ├── datum.go
│   │   ├── errors.go
│   │   ├── etc.go
│   │   ├── eval_type.go
│   │   ├── field_name.go
│   │   ├── field_type.go
│   │   ├── fsp.go
│   │   ├── helper.go
│   │   ├── mydecimal.go
│   │   ├── mytime.go
│   │   ├── overflow.go
│   │   ├── parser_driver/
│   │   │   ├── value_expr.go
│   │   │   └── value_expr_test.go
│   │   └── time.go
│   └── util/
│       ├── chunk/
│       │   ├── chunk.go
│       │   ├── chunk_util.go
│       │   ├── codec.go
│       │   ├── column.go
│       │   ├── compare.go
│       │   ├── iterator.go
│       │   └── row.go
│       ├── codec/
│       │   ├── bytes.go
│       │   ├── bytes_test.go
│       │   ├── codec.go
│       │   ├── codec_test.go
│       │   ├── float.go
│       │   └── number.go
│       ├── execdetails/
│       │   └── execdetails.go
│       ├── hack/
│       │   ├── hack.go
│       │   └── hack_test.go
│       ├── keyutil/
│       │   └── key_util.go
│       ├── kusciaclient/
│       │   └── kusciaclient.go
│       ├── logutil/
│       │   ├── log.go
│       │   ├── monitor_log_entry.go
│       │   └── monitor_log_entry_test.go
│       ├── math/
│       │   ├── math.go
│       │   └── math_test.go
│       ├── mathutil/
│       │   ├── mathutil.go
│       │   └── mathutil_wasm.go
│       ├── message/
│       │   └── message_io_util.go
│       ├── misc.go
│       ├── mock/
│       │   ├── Makefile
│       │   ├── README.md
│       │   ├── mock.sh
│       │   ├── mock_data.go
│       │   ├── mock_db_data.py
│       │   ├── mock_from_testdata.py
│       │   ├── mock_schema.py
│       │   └── testdata/
│       │       ├── db.json
│       │       ├── generated_table_alice.json
│       │       ├── generated_table_bob.json
│       │       ├── generated_table_carol.json
│       │       ├── table_alice.json
│       │       ├── table_bob.json
│       │       └── table_carol.json
│       ├── mvmap/
│       │   ├── fnv.go
│       │   ├── mvmap.go
│       │   └── mvmap_test.go
│       ├── parallel/
│       │   └── parallel.go
│       ├── plancodec/
│       │   └── id.go
│       ├── prometheus/
│       │   └── prom.go
│       ├── ranger/
│       │   └── types.go
│       ├── sliceutil/
│       │   ├── slice_util.go
│       │   └── slice_util_test.go
│       ├── sqlbuilder/
│       │   ├── sqlbuilder.go
│       │   └── sqlbuilder_test.go
│       ├── stringutil/
│       │   ├── string_util.go
│       │   └── string_util_test.go
│       ├── tableview/
│       │   └── tableview.go
│       ├── testleak/
│       │   ├── fake.go
│       │   └── leaktest.go
│       ├── testutil/
│       │   └── testutil.go
│       ├── texttree/
│       │   ├── texttree.go
│       │   └── texttree_test.go
│       ├── transaction/
│       │   └── tx.go
│       └── url/
│           ├── url_util.go
│           └── url_util_test.go
├── python/
│   ├── build.py
│   ├── engine/
│   │   ├── BUILD.bazel
│   │   └── engine_bindings.cc
│   └── src/
│       ├── LICENSE
│       ├── README.md
│       ├── pyproject.toml
│       ├── scql/
│       │   ├── __init__.py
│       │   ├── compiler/
│       │   │   └── __init__.py
│       │   └── engine/
│       │       └── __init__.py
│       └── setup.py
├── renovate.json
├── scripts/
│   ├── check-whitespace.sh
│   ├── format/
│   │   └── clang-format.sh
│   └── graph-visualization/
│       ├── dot2js.py
│       ├── graph.dot
│       └── template.html
├── test-tools/
│   ├── README.md
│   ├── ca_generator.sh
│   └── find_uncover_err.py
├── version.txt
└── version_build.sh

================================================
FILE CONTENTS
================================================

================================================
FILE: .bazeliskrc
================================================
USE_BAZEL_VERSION=7.7.1


================================================
FILE: .bazelrc
================================================
common --experimental_repo_remote_exec
common --experimental_cc_shared_library
common --experimental_ui_max_stdouterr_bytes=-1
common --experimental_remote_cache_compression
common --experimental_remote_cache_compression_threshold=100
common --nolegacy_important_outputs

common --remote_download_regex='.*\/scqlengine$'
common --registry=https://raw.githubusercontent.com/secretflow/bazel-registry/main
common --registry=https://bcr.bazel.build

common --remote_download_outputs=all

common --experimental_proto_descriptor_sets_include_source_info

build --incompatible_new_actions_api=false
build --copt=-fdiagnostics-color=always
build --enable_platform_specific_config

build --cxxopt=-std=c++17
build --host_cxxopt=-std=c++17
build --linkopt -fvisibility=hidden
# default off CUDA build
build --@rules_cuda//cuda:enable=false
test --@rules_cuda//cuda:enable=false

# Binary safety flags
build --copt=-fPIC
build --host_copt=-fstack-protector-strong
build:linux --host_copt=-Wl,-z,noexecstack
build:macos --host_copt=-Wa,--noexecstack



test --keep_going
test --test_output=errors
test --test_timeout=1800

# platform specific config
# Bazel will automatic pick platform config since we have enable_platform_specific_config set
build:macos --copt=-Xclang=-fopenmp
build:macos --copt=-Wno-unused-command-line-argument
build:macos --features=-supports_dynamic_linker
# build:macos --cxxopt -Wno-error=missing-template-arg-list-after-template-kw
# build:macos --cxxopt -Wno-error=vla-cxx-extension
build:macos --macos_minimum_os=13.0
build:macos --host_macos_minimum_os=13.0
build:macos --action_env MACOSX_DEPLOYMENT_TARGET=13.0

# static link libstdc++ & libgcc on Linux
build:linux --copt=-fopenmp
build:linux --linkopt=-fopenmp
build:linux --action_env=BAZEL_LINKOPTS=-static-libstdc++:-static-libgcc
build:linux --action_env=BAZEL_LINKLIBS=-l%:libstdc++.a:-l%:libgcc.a

build:asan --strip=never
build:asan --copt -fno-sanitize-recover=all
build:asan --copt -fsanitize=address
build:asan --copt -Og
build:asan --copt -g
build:asan --copt -fno-omit-frame-pointer
build:asan --linkopt -fsanitize=address
build:asan --define disable_tcmalloc=true
build:asan --copt="-Wno-error=uninitialized"
build:asan --copt="-Wno-error=maybe-uninitialized"
build:asan --action_env=ASAN_OPTIONS=detect_odr_violation=0


================================================
FILE: .circleci/config.yml
================================================
# Copyright 2023 Ant Group Co., Ltd.
#
# 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.

version: 2.1

setup: true

orbs:
  path-filtering: circleci/path-filtering@2.0.1
  continuation: circleci/continuation@2.0.1

parameters:
  enable_regtest:
    type: boolean
    default: false

workflows:
  run_ut:
    when:
      not: << pipeline.parameters.enable_regtest >>
    jobs:
      - path-filtering/filter:
          base-revision: main
          config-path: .circleci/lite-unittest-config.yml
          mapping: .circleci/path-filtering/unittest.conf

  run_regtest:
    when: << pipeline.parameters.enable_regtest >>
    jobs:
      - continuation/continue:
          configuration_path: .circleci/regtest-config.yml


================================================
FILE: .circleci/coverage-config.yml
================================================
# Copyright 2025 Ant Group Co., Ltd.
#
# 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 the latest 2.1 version of CircleCI pipeline process engine.
# See: https://circleci.com/docs/2.0/configuration-reference

version: 2.1

orbs:
  coveralls: coveralls/coveralls@2.2.5

commands:
  setup_go_test:
    steps:
      - run:
          name: Install gcov2lcov
          command: |
            which gcov2lcov || go install github.com/jandelgado/gcov2lcov@latest

  setup_cpp_test:
    steps:
      - run:
          name: "Checkout devtools"
          command: git clone --depth=1 https://github.com/secretflow/devtools.git ../devtools
      - run:
          name: Setup BuildBuddy Cache
          command: ../devtools/bazel_cache_setup.py

  run_go_test:
    description: "Run go cov tests"
    steps:
      - run:
          name: "Go Cov Test"
          command: |
            set +e
            go mod tidy
            echo "Running tests with coverage..."
            go test -mod=readonly -timeout=30m -v -cover -race -coverprofile=coverage.tmp ./pkg/...
            cat coverage.tmp | grep -v '\.pb\.go:\|_mock\.go:' > coverage.out
            gcov2lcov -infile=coverage.out -outfile=coverage.lcov

  run_cpp_test:
    description: "Run cpp cov tests and collect artifacts"
    parameters:
      extra_bazel_args:
        type: string
        default: ""
      find_executable_flag:
        type: string
        default: "-executable"
    steps:
      - run:
          name: "Cpp Test"
          command: |
            set +e
            declare -i test_status

            echo "Running tests with coverage..."
            bazelisk --host_jvm_args=-Xmx8g coverage //engine/... \
                << parameters.extra_bazel_args >> \
                --combined_report=lcov \
                --jobs=auto \
                --ui_event_filters=-info,-debug,-warning \
                --test_output=errors | tee test_result.log

            # Capture the exit status of the Bazel command
            test_status=${PIPESTATUS[0]}
            if [ ${test_status} -eq 0 ]; then
              echo "Processing coverage..."
              lcov --remove bazel-out/_coverage/_coverage_report.dat '*.pb.h' '*.pb.cc' -o bazel-out/_coverage/_coverage_report_filtered.dat
            else
              echo "Bazel coverage failed, skipping lcov processing. Archiving binaries and logs..."
              find bazel-bin/ << parameters.find_executable_flag >> -type f -name "*_test" -print0 | xargs -0 tar -cvzf test_binary.tar.gz
              find bazel-testlogs/ -type f -name "test.log" -print0 | xargs -0 tar -cvzf test_logs.tar.gz
            fi

            sh ../devtools/rename-junit-xml.sh
            exit ${test_status}

  # ref: https://support.circleci.com/hc/en-us/articles/14114124583195-How-to-set-a-custom-maximum-job-duration
  cancel_after_timeout:
    description: "Cancel job if it takes too long"
    parameters:
      timeout:
        type: string
        default: "60m"
    steps:
      - run:
          name: Set maximum job duration to << parameters.timeout >>
          background: true
          command: |
            sleep << parameters.timeout >>
            curl --request POST \
            --url https://circleci.com/api/v2/project/gh/$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME/job/$CIRCLE_BUILD_NUM/cancel \
            --header "Circle-Token: $CIRCLECI_API_TOKEN"

jobs:
  linux_go_cov:
    docker:
      - image: secretflow/scql-ci:latest
    resource_class: "large"
    steps:
      - cancel_after_timeout:
          timeout: "30m"
      - checkout
      - setup_go_test
      - run_go_test
      - coveralls/upload:
          coverage_file: coverage.lcov
          coverage_format: lcov
          flag_name: "go-tests"

  linux_cpp_cov:
    docker:
      - image: secretflow/scql-ci:latest
    resource_class: "2xlarge"
    steps:
      - cancel_after_timeout:
          timeout: "90m"
      - checkout
      - run:
          name: "Install lcov"
          command: apt-get update && apt-get install -y lcov
      - setup_cpp_test
      - run_cpp_test:
          extra_bazel_args: "-c opt"
          find_executable_flag: "-executable"
      - coveralls/upload:
          coverage_file: bazel-out/_coverage/_coverage_report_filtered.dat
          coverage_format: lcov
          flag_name: "cpp-tests"
      - store_test_results:
          path: test-results
      - store_artifacts:
          when: on_fail
          path: test_binary.tar.gz
      - store_artifacts:
          when: on_fail
          path: test_logs.tar.gz

workflows:
  run_cov:
    jobs:
      - linux_go_cov
      - linux_cpp_cov


================================================
FILE: .circleci/diff-cover-config.yml
================================================
# Copyright 2025 Ant Group Co., Ltd.
#
# 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 the latest 2.1 version of CircleCI pipeline process engine.
# See: https://circleci.com/docs/2.0/configuration-reference

version: 2.1

parameters:
  base_commit:
    type: string
    description: "The base commit SHA for the diff."
    default: "origin/main"

commands:
  setup_go_test:
    steps:
      - run:
          name: Install gcov2lcov
          command: |
            which gcov2lcov || go install github.com/jandelgado/gcov2lcov@latest

  setup_cpp_test:
    steps:
      - run:
          name: "Checkout devtools"
          command: git clone --depth=1 https://github.com/secretflow/devtools.git ../devtools
      - run:
          name: Setup BuildBuddy Cache
          command: ../devtools/bazel_cache_setup.py

  run_go_test:
    description: "Run go cov tests"
    steps:
      - run:
          name: "Go Cov Test"
          command: |
            set +e
            go mod tidy
            echo "Running tests with coverage..."
            go test -mod=readonly -timeout=30m -v -cover -race -coverprofile=coverage.tmp ./pkg/...
            cat coverage.tmp | grep -v '\.pb\.go:\|_mock\.go:' > coverage.out
            python ./test-tools/find_uncover_err.py coverage.out filtered_cover_no_err_branch.out
            gcov2lcov -infile=filtered_cover_no_err_branch.out -outfile=coverage.lcov

  run_cpp_test:
    description: "Run cpp cov tests and collect artifacts"
    parameters:
      extra_bazel_args:
        type: string
        default: ""
      find_executable_flag:
        type: string
        default: "-executable"
    steps:
      - run:
          name: "Cpp Test"
          command: |
            set +e
            declare -i test_status

            echo "Running tests with coverage..."
            bazelisk --host_jvm_args=-Xmx8g coverage //engine/... \
                << parameters.extra_bazel_args >> \
                --combined_report=lcov \
                --jobs=auto \
                --ui_event_filters=-info,-debug,-warning \
                --test_output=errors | tee test_result.log

            # Capture the exit status of the Bazel command
            test_status=${PIPESTATUS[0]}
            if [ ${test_status} -eq 0 ]; then
              echo "Processing coverage..."
              lcov --remove bazel-out/_coverage/_coverage_report.dat '*.pb.h' '*.pb.cc' -o bazel-out/_coverage/_coverage_report_filtered.dat
            else
              echo "Bazel coverage failed, skipping lcov processing. Archiving binaries and logs..."
              find bazel-bin/ << parameters.find_executable_flag >> -type f -name "*_test" -print0 | xargs -0 tar -cvzf test_binary.tar.gz
              find bazel-testlogs/ -type f -name "test.log" -print0 | xargs -0 tar -cvzf test_logs.tar.gz
            fi

            sh ../devtools/rename-junit-xml.sh
            exit ${test_status}

  # ref: https://support.circleci.com/hc/en-us/articles/14114124583195-How-to-set-a-custom-maximum-job-duration
  cancel_after_timeout:
    description: "Cancel job if it takes too long"
    parameters:
      timeout:
        type: string
        default: "60m"
    steps:
      - run:
          name: Set maximum job duration to << parameters.timeout >>
          background: true
          command: |
            sleep << parameters.timeout >>
            curl --request POST \
            --url https://circleci.com/api/v2/project/gh/$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME/job/$CIRCLE_BUILD_NUM/cancel \
            --header "Circle-Token: $CIRCLECI_API_TOKEN"

jobs:
  linux_diff_cov:
    docker:
      - image: secretflow/scql-ci:latest
    resource_class: "2xlarge"
    steps:
      - cancel_after_timeout:
          timeout: "90m"
      - checkout
      - run:
          name: "Install Dependencies (lcov, diff-cover)"
          command: |
            apt-get update && apt-get install -y lcov
            pip install diff-cover
      - setup_go_test
      - setup_cpp_test
      - run_go_test
      - run_cpp_test:
          extra_bazel_args: "-c opt"
      - run:
          name: "Debug Coverage Files"
          command: |
            echo "=== Debug Information ==="
            echo "Current working directory: $(pwd)"
            echo "Available coverage files:"
            find . -name "*.lcov" -o -name "*coverage*" -type f | head -10

            if [ -f "coverage.lcov" ]; then
              echo "Go coverage file size: $(wc -l < coverage.lcov) lines"
              echo "Go coverage sample:"
              head -10 coverage.lcov
            fi

            if [ -f "bazel-out/_coverage/_coverage_report_filtered.dat" ]; then
              echo "C++ coverage file size: $(wc -l < bazel-out/_coverage/_coverage_report_filtered.dat) lines"
              echo "C++ coverage sample:"
              head -10 bazel-out/_coverage/_coverage_report_filtered.dat
            fi

            echo "Git status:"
            git status --porcelain
            echo "Recent commits:"
            git log --oneline -5
      - run:
          name: "Calculate and Report Incremental Coverage"
          command: |
            echo "Calculating incremental coverage between << pipeline.parameters.base_commit >> and ${CIRCLE_SHA1}"
            git config remote.origin.url "https://github.com/${CIRCLE_PROJECT_USERNAME}/${CIRCLE_PROJECT_REPONAME}.git"
            git config advice.objectNameWarning false

            if ! git rev-parse --verify << pipeline.parameters.base_commit >> >/dev/null 2>&1; then
              echo "Base commit not found locally, fetching..."
              git fetch origin << pipeline.parameters.base_commit >> || \
              git fetch origin --depth=100 || \
              git fetch origin
            fi

            if ! git rev-parse --verify << pipeline.parameters.base_commit >> >/dev/null 2>&1; then
              echo "Error: Base commit << pipeline.parameters.base_commit >> not found"
              exit 1
            fi
            if ! git rev-parse --verify ${CIRCLE_SHA1} >/dev/null 2>&1; then
              echo "Error: Current commit ${CIRCLE_SHA1} not found"
              exit 1
            fi
            echo "Base commit: $(git rev-parse << pipeline.parameters.base_commit >>)"
            echo "Head commit: $(git rev-parse ${CIRCLE_SHA1})"

            # Create a directory to store the reports
            mkdir -p coverage-reports
            FINAL_EXIT_CODE=0

            # --- 1. Go Incremental Coverage ---
            echo ""
            echo "--- Go Incremental Coverage ---"
            if [ -f "coverage.lcov" ]; then
              git diff << pipeline.parameters.base_commit >>..${CIRCLE_SHA1} -- '*.go' > go_diff.txt
              diff-cover coverage.lcov \
                --diff-file=go_diff.txt \
                --fail-under=80 \
                --exclude='*_test.go' \
                --exclude='*.pb.go' \
                --exclude='*_mock.go' \
                --format html:coverage-reports/go_diff_coverage.html \
                || { echo "Go incremental coverage check FAILED."; FINAL_EXIT_CODE=1; }
            else
              echo "Go coverage file (coverage.lcov) not found. Skipping."
            fi

            # --- 2. C++ Incremental Coverage ---
            echo ""
            echo "--- C++ Incremental Coverage ---"
            CPP_COV_FILE="bazel-out/_coverage/_coverage_report_filtered.dat"
            if [ -f "${CPP_COV_FILE}" ]; then
              git diff << pipeline.parameters.base_commit >>..${CIRCLE_SHA1} -- '*.cpp' '*.h' '*.cc' > cpp_diff.txt
              diff-cover ${CPP_COV_FILE} \
                --diff-file=cpp_diff.txt \
                --fail-under=80 \
                --exclude='*.pb.h' \
                --exclude='*.pb.cc' \
                --format html:coverage-reports/cpp_diff_coverage.html \
                || { echo "C++ incremental coverage check FAILED."; FINAL_EXIT_CODE=1; }
            else
              echo "C++ coverage file (${CPP_COV_FILE}) not found. Skipping."
            fi

            exit ${FINAL_EXIT_CODE}
      - store_artifacts:
          path: coverage-reports
      - store_artifacts:
          path: coverage.lcov
          destination: go-coverage.lcov
      - store_artifacts:
          path: bazel-out/_coverage/_coverage_report_filtered.dat
          destination: cpp-coverage.lcov

workflows:
  run_diff_cov_workflow:
    jobs:
      - linux_diff_cov


================================================
FILE: .circleci/full-unittest-config.yml
================================================
# Copyright 2023 Ant Group Co., Ltd.
#
# 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 the latest 2.1 version of CircleCI pipeline process engine.
# See: https://circleci.com/docs/2.0/configuration-reference

version: 2.1

commands:
  setup_cpp_test:
    steps:
      - run:
          name: "Checkout devtools"
          command: git clone --depth=1 https://github.com/secretflow/devtools.git ../devtools
      - run:
          name: Setup BuildBuddy Cache
          command: ../devtools/bazel_cache_setup.py

  run_go_test:
    description: "Run go tests"
    steps:
      - run:
          name: "Go Test"
          command: |
            set +e
            go mod tidy
            echo "Running unit tests..."
            go test -mod=readonly -timeout=30m -v -short ./pkg/...

  run_cpp_test:
    description: "Run cpp tests and collect artifacts on fail"
    parameters:
      extra_bazel_args:
        type: string
        default: ""
      find_executable_flag:
        type: string
        default: "-executable"
    steps:
      - run:
          name: "Cpp Test"
          command: |
            set +e
            declare -i test_status

            echo "Running unit tests..."
            bazelisk --host_jvm_args=-Xmx8g test //engine/... \
                << parameters.extra_bazel_args >> \
                --jobs=auto \
                --ui_event_filters=-info,-debug,-warning \
                --test_output=errors | tee test_result.log

            # Capture the exit status of the Bazel command
            test_status=${PIPESTATUS[0]}

            sh ../devtools/rename-junit-xml.sh
            if [ ${test_status} -ne 0 ]; then
              echo "Tests failed. Archiving binaries and logs..."
              find bazel-bin/ << parameters.find_executable_flag >> -type f -name "*_test" -print0 | xargs -0 tar -cvzf test_binary.tar.gz
              find bazel-testlogs/ -type f -name "test.log" -print0 | xargs -0 tar -cvzf test_logs.tar.gz
            fi

            exit ${test_status}

  # ref: https://support.circleci.com/hc/en-us/articles/14114124583195-How-to-set-a-custom-maximum-job-duration
  cancel_after_timeout:
    description: "Cancel job if it takes too long"
    parameters:
      timeout:
        type: string
        default: "60m"
    steps:
      - run:
          name: Set maximum job duration to << parameters.timeout >>
          background: true
          command: |
            sleep << parameters.timeout >>
            curl --request POST \
            --url https://circleci.com/api/v2/project/gh/$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME/job/$CIRCLE_BUILD_NUM/cancel \
            --header "Circle-Token: $CIRCLECI_API_TOKEN"

jobs:
  linux_go_ut:
    docker:
      - image: secretflow/scql-ci:latest
    parameters:
      resource_class:
        type: string
    resource_class: << parameters.resource_class >>
    steps:
      - cancel_after_timeout:
          timeout: "20m"
      - checkout
      - run_go_test

  linux_cpp_ut:
    docker:
      - image: secretflow/scql-ci:latest
    parameters:
      resource_class:
        type: string
    resource_class: << parameters.resource_class >>
    steps:
      - cancel_after_timeout:
          timeout: "60m"
      - checkout
      - setup_cpp_test
      - run_cpp_test:
          extra_bazel_args: "-c opt"
          find_executable_flag: "-executable"
      - store_test_results:
          path: test-results
      - store_artifacts:
          when: on_fail
          path: test_binary.tar.gz
      - store_artifacts:
          when: on_fail
          path: test_logs.tar.gz

  macOS_go_ut:
    macos:
      xcode: 16.3.0
    resource_class: m4pro.medium
    steps:
      - cancel_after_timeout:
          timeout: "20m"
      - checkout
      - run:
          name: "Install homebrew dependencies"
          command: |
            brew install wget go
      - run_go_test

  macOS_cpp_ut:
    macos:
      xcode: 16.3.0
    resource_class: m4pro.medium
    steps:
      - cancel_after_timeout:
          timeout: "60m"
      - checkout
      - run:
          name: "Install homebrew dependencies"
          command: |
            brew install bazelisk cmake ninja libomp wget go@1.24 md5sha1sum
            brew link go@1.24
      - setup_cpp_test
      - run_cpp_test:
          extra_bazel_args: ""
          find_executable_flag: "-perm +111"
      - store_test_results:
          path: test-results
      - store_artifacts:
          when: on_fail
          path: test_binary.tar.gz
      - store_artifacts:
          when: on_fail
          path: test_logs.tar.gz

workflows:
  run_go_ut:
    jobs:
      - linux_go_ut:
          matrix:
            parameters:
              resource_class: ["large", "arm.large"]
      - macOS_go_ut
  run_cpp_ut:
    jobs:
      - linux_cpp_ut:
          matrix:
            parameters:
              resource_class: ["2xlarge", "arm.2xlarge"]
      - macOS_cpp_ut


================================================
FILE: .circleci/lite-unittest-config.yml
================================================
# Copyright 2025 Ant Group Co., Ltd.
#
# 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 the latest 2.1 version of CircleCI pipeline process engine.
# See: https://circleci.com/docs/2.0/configuration-reference

version: 2.1

parameters:
  run_go_ut:
    type: boolean
    default: false
  run_cpp_ut:
    type: boolean
    default: false

commands:
  setup_cpp_test:
    steps:
      - run:
          name: "Checkout devtools"
          command: git clone --depth=1 https://github.com/secretflow/devtools.git ../devtools
      - run:
          name: Setup BuildBuddy Cache
          command: ../devtools/bazel_cache_setup.py

  run_go_test:
    description: "Run go tests"
    steps:
      - run:
          name: "Go Test"
          command: |
            set +e
            go mod tidy
            echo "Running unit tests..."
            go test -mod=readonly -timeout=30m -v -short ./pkg/...

  run_cpp_test:
    description: "Run cpp tests and collect artifacts on fail"
    steps:
      - run:
          name: "Cpp Test"
          command: |
            set +e
            declare -i test_status

            echo "Running unit tests..."
            bazelisk --host_jvm_args=-Xmx8g test //engine/... \
                -c opt \
                --jobs=16 \
                --local_ram_resources=20480 \
                --ui_event_filters=-info,-debug,-warning \
                --test_output=errors | tee test_result.log

            # Capture the exit status of the Bazel command
            test_status=${PIPESTATUS[0]}

            sh ../devtools/rename-junit-xml.sh
            if [ ${test_status} -ne 0 ]; then
              echo "Tests failed. Archiving binaries and logs..."
              find bazel-bin/ -executable -type f -name "*_test" -print0 | xargs -0 tar -cvzf test_binary.tar.gz
              find bazel-testlogs/ -type f -name "test.log" -print0 | xargs -0 tar -cvzf test_logs.tar.gz
            fi

            exit ${test_status}

  # ref: https://support.circleci.com/hc/en-us/articles/14114124583195-How-to-set-a-custom-maximum-job-duration
  cancel_after_timeout:
    description: "Cancel job if it takes too long"
    parameters:
      timeout:
        type: string
        default: "60m"
    steps:
      - run:
          name: Set maximum job duration to << parameters.timeout >>
          background: true
          command: |
            sleep << parameters.timeout >>
            curl --request POST \
            --url https://circleci.com/api/v2/project/gh/$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME/job/$CIRCLE_BUILD_NUM/cancel \
            --header "Circle-Token: $CIRCLECI_API_TOKEN"

jobs:
  linux_go_ut:
    docker:
      - image: secretflow/scql-ci:latest
    resource_class: "large"
    steps:
      - cancel_after_timeout:
          timeout: "20m"
      - checkout
      - run_go_test

  linux_cpp_ut:
    docker:
      - image: secretflow/scql-ci:latest
    resource_class: "2xlarge"
    steps:
      - cancel_after_timeout:
          timeout: "60m"
      - checkout
      - setup_cpp_test
      - run_cpp_test
      - store_test_results:
          path: test-results
      - store_artifacts:
          when: on_fail
          path: test_binary.tar.gz
      - store_artifacts:
          when: on_fail
          path: test_logs.tar.gz

workflows:
  run_go_ut:
    when: << pipeline.parameters.run_go_ut >>
    jobs:
      - linux_go_ut

  run_cpp_ut:
    when: << pipeline.parameters.run_cpp_ut >>
    jobs:
      - linux_cpp_ut


================================================
FILE: .circleci/path-filtering/unittest.conf
================================================
api/.* run_go_ut true
cmd/.* run_go_ut true
pkg/.* run_go_ut true
.circleci/lite-unittest-config.yml run_go_ut true
bazel/.* run_cpp_ut true
engine/.* run_cpp_ut true
.bazelrc run_cpp_ut true
.bazeliskrc run_cpp_ut true
MODULE.bazel run_cpp_ut true
.circleci/lite-unittest-config.yml run_cpp_ut true


================================================
FILE: .clang-format
================================================
# Use the Google style in this project.
BasedOnStyle: Google

IncludeBlocks: Regroup
IncludeCategories:
  - Regex: '^<.*\.h>'
    Priority: 1
  - Regex: "^<.*"
    Priority: 2
  - Regex: '.*\.pb\.h"$'
    Priority: 5
  - Regex: '^"engine.*'
    Priority: 4
  - Regex: '^".*'
    Priority: 3


================================================
FILE: .clang-tidy
================================================
Checks: "abseil-cleanup-ctad,
  abseil-faster-strsplit-delimiter,
  abseil-duration-*,
  abseil-no-namespace,
  abseil-redundant-strcat-calls,
  abseil-str-cat-append,
  abseil-string-find-startswith,
  abseil-upgrade-duration-conversions
  bugprone-*,
  -bugprone-easily-swappable-parameters,
  -bugprone-implicit-widening-of-multiplication-result,
  -bugprone-narrowing-conversions,
  google-build-using-namespace,
  google-explicit-constructor,
  google-global-names-in-headers,
  google-readability-casting,
  google-runtime-int,
  google-runtime-operator,
  misc-unused-using-decls,
  modernize-*,
  -modernize-use-trailing-return-type,
  -modernize-avoid-c-arrays,
  -modernize-return-braced-init-list,
  -modernize-use-nodiscard,
  performance-*,
  readability-*,
  -readability-else-after-return,
  -readability-identifier-length,
  -readability-function-cognitive-complexity,
  -readability-magic-numbers,
  -readability-named-parameter,
  -readability-math-missing-parentheses,
  -readability-redundant-access-specifiers,
  -readability-simplify-boolean-expr,
  concurrency-mt-unsafe"

CheckOptions:
  - key: bugprone-argument-comment.StrictMode
    value: 1

  - key: bugprone-dangling-handle.HandleClasses
    value: "std::basic_string_view;std::experimental::basic_string_view;absl::string_view"

  - key: misc-non-private-member-variables-in-classes.IgnoreClassesWithAllMemberVariablesBeingPublic
    value: 1

    # Ignore GoogleTest function macros.
  - key: readability-identifier-naming.FunctionIgnoredRegexp
    value: "(TEST|TEST_F|TEST_P|INSTANTIATE_TEST_SUITE_P|MOCK_METHOD|TYPED_TEST)"

  - key: readability-identifier-naming.ClassCase
    value: "CamelCase"

  - key: readability-identifier-naming.EnumCase
    value: "CamelCase"

  - key: readability-identifier-naming.EnumConstantCase
    value: "CamelCase"

  - key: readability-identifier-naming.ParameterCase
    value: "lower_case"

  - key: readability-identifier-naming.PrivateMemberCase
    value: "lower_case"

  - key: readability-identifier-naming.PrivateMemberSuffix
    value: "_"

  - key: readability-identifier-naming.StructCase
    value: "CamelCase"

  - key: readability-identifier-naming.TypeAliasCase
    value: "CamelCase"

  - key: readability-identifier-naming.UnionCase
    value: "CamelCase"

  - key: readability-identifier-naming.FunctionCase
    value: "CamelBack"


================================================
FILE: .coveralls.yml
================================================
# Configure whether the Coveralls status check fails when coverage decreases
fail_on_coverage_decrease: false

coverage:
  status:
    project:
      go-tests:
        # Set a coverage threshold for the changed lines of code.
        target: 70%

      cpp-tests:
        target: 70%

    patch:
      default:
        target: 70%

comment:
  pull_request:
    # update a comment
    behavior: default

    # diff:  Shows overall coverage change and coverage of changed lines
    # flags: If upload multiple reports (C++ and Go), they will be displayed separately
    # files: Lists the files where coverage has changed
    layout: "diff, flags, files"

================================================
FILE: .devcontainer/Dockerfile
================================================
FROM secretflow/ubuntu-base-ci:latest

ARG TARGETPLATFORM
ARG GO_VERSION=1.24.0

# install go
RUN if [ "$TARGETPLATFORM" = "linux/arm64" ] ; \
    then \
        GO_ARCH=arm64 && \
        GO_SHA256SUM=c3fa6d16ffa261091a5617145553c71d21435ce547e44cc6dfb7470865527cc7 ; \
    else \
        GO_ARCH=amd64 && \
        GO_SHA256SUM=dea9ca38a0b852a74e81c26134671af7c0fbe65d81b0dc1c5bfe22cf7d4c8858 ; \
    fi \
    && url="https://golang.google.cn/dl/go${GO_VERSION}.linux-${GO_ARCH}.tar.gz"; \
    wget --no-check-certificate -O go.tgz "$url"; \
    echo "${GO_SHA256SUM} *go.tgz" | sha256sum -c -; \
    tar -C /usr/local -xzf go.tgz; \
    rm go.tgz;

ENV GOPATH="/usr/local"
ENV PATH="/usr/local/go/bin:${GOPATH}/bin:${PATH}"

RUN apt update \
    && apt upgrade -y \
    && apt install -y protobuf-compiler \
    && apt clean


# Create a non-root user 'vscode' with sudo privileges
# The user ID 1000 is common for the primary user in Linux distributions.
# The GID 1000 corresponds to the user's primary group.
RUN groupadd --gid 1000 vscode && \
    useradd --uid 1000 --gid 1000 --shell /bin/bash --create-home vscode && \
    echo "vscode ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers

# Set the default user for subsequent commands
USER vscode

# Set the working directory inside the container
WORKDIR /workspaces/scql

# Set default shell to bash for the vscode user
ENV SHELL /bin/bash

# You can add more SCQL-specific dependencies here if needed,
# although 'make install-dev-deps' in postCreateCommand should handle most project dependencies.

# Keep the container running (optional, useful for debugging setup)
# CMD ["sleep", "infinity"]


================================================
FILE: .devcontainer/devcontainer.json
================================================
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/cpp
{
    // A name for the dev container which can be displayed in UI.
    "name": "SCQL Dev Container",

    // Sets the run context to one level up instead of the .devcontainer folder.
    "context": "..",

    // Update the VARIANT arg in docker-compose.yml to pick a Debian OS version: bullseye, buster
    // Use Python 3.10 to align with SCQL's CI/CD environment if possible, adjust if needed.
    "build": {
        "dockerfile": "Dockerfile"
    },

    // Features to add to the dev container. More info: https://containers.dev/features.
    // "features": {},

    // Use 'forwardPorts' to make a list of ports inside the container available locally.
    // "forwardPorts": [],

    // Use 'postCreateCommand' to run commands after the container is created.
    // Installs development dependencies using the Makefile target.
    "postCreateCommand": "echo 'hello world'",

    // Configure tool-specific properties.
    // "customizations": {},

    // Specifies the user the container will run as. Default is root.
    // Using a non-root user 'vscode' is recommended for security.
    "remoteUser": "vscode",

    // Mount the workspace folder.
    "workspaceFolder": "/workspaces/scql",
    "workspaceMount": "source=${localWorkspaceFolder},target=/workspaces/scql,type=bind,consistency=cached"
}


================================================
FILE: .github/CODEOWNERS
================================================
# default reviewers for everything in this repo.
* @secretflow/scql-dev


================================================
FILE: .github/ISSUE_TEMPLATE/Consulting_issue_template.yaml
================================================
name: Consulting Template
description: Ask SCQL related questions
body:
  - type: markdown
    attributes:
      value: |
        Please ensure that you are reporting the consultation issue on GitHub.(CCL、Perfomance、Feature、Documentation、Others)
  - type: dropdown
    id: issue-type
    attributes:
      label: Issue Type
      description: What type of issue would you like to report?
      multiple: false
      options:
        - CCL
        - Perfomance
        - Feature
        - Documentation
        - Others
    validations:
      required: true
  - type: dropdown
    id: searched-for-existing-issues
    attributes:
      label: Have you searched for existing issues? 
      description: It is recommended to search existing [documentation](https://www.secretflow.org.cn/zh-CN/docs/scql/main/topics) and [issues](https://github.com/secretflow/scql/issues) first
      options:
        - 'Yes'
        - 'No'
    validations:
      required: true
  - type: input
    id: link
    attributes:
      label: Link to Relevant Documentation
      description: For faster problem-solving, if there are relevant documents, please attach links.
      placeholder: e.g., https://www.secretflow.org.cn/zh-CN/docs/scql/main/topics/ccl/intro
    validations:
      required: false
  - type: textarea
    id: Question-Details
    attributes:
      label: Question Details
      description: Please detail your issue with observed versus expected behavior and attempted solutions to expedite resolution.
      placeholder: Describe the questions you want to consult and what you want to do
      value:
      render: shell
    validations:
      required: true


================================================
FILE: .github/ISSUE_TEMPLATE/Error_Issue_Template.yaml
================================================
name: Error Template
description: Thank you for reporting the issue!
body:
  - type: markdown
    attributes:
      value: |
        Please ensure that you are reporting the consultation issue on GitHub.(Install/Build、Running、CCL、Others)
  - type: dropdown
    id: issue-type
    attributes:
      label: Issue Type
      description: What type of issue would you like to report?
      multiple: false
      options:
        - Install/Build
        - Running
        - CCL
        - Others
    validations:
      required: true
  - type: dropdown
    id: searched-for-existing-issues
    attributes:
      label: Have you searched for existing issues? 
      description: It is recommended to search existing [documentation](https://www.secretflow.org.cn/zh-CN/docs/scql/main/topics) and [issues](https://github.com/secretflow/scql/issues) first
      options:
        - 'Yes'
        - 'No'
    validations:
      required: true
  - type: input
    id: OS
    attributes:
      label: OS Platform and Distribution
      description:
      placeholder: e.g., Linux Ubuntu 18.04
    validations:
      required: true
  - type: input
    id: scql-version
    attributes:
      label: SCQL Version
      description:
      placeholder: e.g., SCQL 0.7.0b0
    validations:
      required: true
  - type: textarea
    id: what-happened
    attributes:
      label: What happend and What you expected to happen.
      description: A clear and concise description of what the bug is.
      placeholder: Describe the bug, expected behavior.
      value:
      render: shell
    validations:
      required: true
  - type: textarea
    id: scql-config
    attributes:
      label: Configuration used to run SCQL.
      description: Supply SCQL runtime config (.yaml, .conf) and, for CCL issues, supply authorization info and SQL statements.
      placeholder: |
        # - For install/deploy, provide files ending with `.yaml` and `.conf`.
        # - For CCL, provide the authorization details and CCL SQL.
      value:
      render: shell
    validations:
      required: true
  - type: textarea
    id: log-output
    attributes:
      label: SCQL log output.
      description: Supply relevant log output (docker logs -f xxx-broker-xxx/xxx-engine-xxx); For multi-party (e.g. Alice, Bob) scenarios, include all corresponding logs.
      placeholder: |
        # alice.log
        .......
        # bob.log
        .......
      value:
      render: shell
    validations:
      required: true


================================================
FILE: .github/workflows/black.yml
================================================
---
name: Python Linter
on:
  push:
    branches:
    - main
    paths:
      - '**.py'
  pull_request:
    branches:
    - main
    paths:
      - '**.py'
permissions:
  contents: read
jobs:
  python-linter:
    uses: secretflow/.github/.github/workflows/python-linter.yml@main

================================================
FILE: .github/workflows/buildifier.yml
================================================
---
name: Bazel files linter
on:
  push:
    branches:
    - main
  pull_request:
    branches:
    - main
permissions:
  contents: read
jobs:
  bazel-formatting-check:
    uses: secretflow/.github/.github/workflows/bazel-linter.yml@main

================================================
FILE: .github/workflows/cla.yml
================================================
---
name: CLA Assistant
on:
  issue_comment:
    types: [created]
  pull_request_target:
    types: [opened, closed, synchronize]
jobs:
  CLAssistant:
    uses: secretflow/.github/.github/workflows/cla.yml@main
    secrets: inherit


================================================
FILE: .github/workflows/clang-format-linter.yml
================================================
---
name: Run clang-format Linter
on:
  push:
    branches:
    - main
    paths:
      - '**.cc'
      - '**.cpp'
      - '**.hpp'
      - '**.h'
      - '**.proto'
  pull_request:
    branches:
    - main
    paths:
      - '**.cc'
      - '**.cpp'
      - '**.hpp'
      - '**.h'
      - '**.proto'
permissions:
  contents: read
jobs:
  run-clang-format:
    uses: secretflow/.github/.github/workflows/clang-format.yml@main

================================================
FILE: .github/workflows/codeql.yml
================================================
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"

on:
  push:
    branches: ["main"]
  pull_request:
    # The branches below must be a subset of the branches above
    branches: ["main"]
  schedule:
    - cron: "0 0 * * 1"

permissions:
  contents: read

jobs:
  analyze:
    name: Analyze
    runs-on: ubuntu-latest
    permissions:
      actions: read
      contents: read
      security-events: write

    strategy:
      fail-fast: false
      matrix:
        language: ["cpp", "go", "python"]
        # CodeQL supports [ $supported-codeql-languages ]
        # Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support

    steps:
      - name: Harden the runner (Audit all outbound calls)
        uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
        with:
          egress-policy: audit

      - name: Checkout repository
        uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

      # Initializes the CodeQL tools for scanning.
      - name: Initialize CodeQL
        uses: github/codeql-action/init@28deaeda66b76a05916b6923827895f2b14ab387 # v3.28.16
        with:
          languages: ${{ matrix.language }}
          # If you wish to specify custom queries, you can do so here or in a config file.
          # By default, queries listed here will override any specified in a config file.
          # Prefix the list here with "+" to use these queries and those in the config file.

      # Autobuild attempts to build any compiled languages  (C/C++, C#, or Java).
      # If this step fails, then you should remove it and run the build manually (see below)
      - name: Autobuild
        uses: github/codeql-action/autobuild@28deaeda66b76a05916b6923827895f2b14ab387 # v3.28.16

      # ℹ️ Command-line programs to run using the OS shell.
      # 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun

      #   If the Autobuild fails above, remove it and uncomment the following three lines.
      #   modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.

      # - run: |
      #   echo "Run, Build Application using script"
      #   ./location_of_script_within_repo/buildscript.sh

      - name: Perform CodeQL Analysis
        uses: github/codeql-action/analyze@28deaeda66b76a05916b6923827895f2b14ab387 # v3.28.16
        with:
          category: "/language:${{matrix.language}}"


================================================
FILE: .github/workflows/dependency-review.yml
================================================
# Dependency Review Action
#
# This Action will scan dependency manifest files that change as part of a Pull Request,
# surfacing known-vulnerable versions of the packages declared or updated in the PR.
# Once installed, if the workflow run is marked as required,
# PRs introducing known-vulnerable packages will be blocked from merging.
#
# Source repository: https://github.com/actions/dependency-review-action
name: 'Dependency Review'
on: [pull_request]

permissions:
  contents: read

jobs:
  dependency-review:
    runs-on: ubuntu-latest
    steps:
      - name: Harden the runner (Audit all outbound calls)
        uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
        with:
          egress-policy: audit

      - name: 'Checkout Repository'
        uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
      - name: 'Dependency Review'
        uses: actions/dependency-review-action@67d4f4bd7a9b17a0db54d2a7519187c65e339de8 # v4


================================================
FILE: .github/workflows/docs-check.yml
================================================
---
name: Check Docs
on:
  push:
    branches:
      - main
    paths:
      - 'docs/**'
  pull_request:
    branches:
      - main
    paths:
      - 'docs/**'

permissions:
  contents: read
  pull-requests: read

jobs:
  check-docs:
    name: check docs
    runs-on: [ubuntu-latest]
    container:
      image: secretflow/scql-ci:20250228
    steps:
      - name: Harden the runner (Audit all outbound calls)
        uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
        with:
          egress-policy: audit

      - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
        with:
          fetch-depth: '0'
      - name: make docs
        run: |
          # avoid {{ and {# in docs
          if [ $(grep -E '({{|{#)' --include=\*.{rst,md,ipynb,po} --exclude=run-scql-on-kuscia.* -rnw 'docs' | wc -l) != 0 ];
          then
            echo "({{|{#) is not allowed in rst,md,ipynb,po files. Thank you for cooperation."
            grep -E '({{|{#)' --include=\*.{rst,md,ipynb,po} --exclude=run-scql-on-kuscia.* -rnw 'docs'
            exit 1
          fi

================================================
FILE: .github/workflows/docs-publish.yml
================================================
# Copyright 2025 Ant Group Co., Ltd.
#
# 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.

name: Publish Docs
on:
  push:
    branches:
      - main
    tags:
      - "*"

jobs:
  check-docs:
    name: check docs
    runs-on: [ubuntu-latest]
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with:
          node-version: "22"
      - uses: actions/setup-python@v5
        with:
          python-version: "3.10"
      - name: pubilsh docs
        run: |
          python3 -m venv ~/.venv/docs
          source ~/.venv/docs/bin/activate
          python -m pip install -r docs/requirements.txt
          secretflow-doctools build --lang zh_CN --lang en
          secretflow-doctools publish \
            --name @secretflow/x-scql \
            --index-js docs/_build/esm/index.js
        env:
          DRY_RUN: "0" # omit in test runs
          DOCTOOLS_PUBLISH_NPM_TOKEN: ${{secrets.DOCTOOLS_PUBLISH_NPM_TOKEN}}


================================================
FILE: .github/workflows/golangci-lint.yml
================================================
---
name: Golangci-Lint

on:
  push:
    branches:
      - main
    paths:
      - '**.go'
      - '.golangci-lint.yml'
  pull_request:
    branches:
      - main
    paths:
      - '**.go'
      - '.golangci-lint.yml'

env:
  GO_VERSION: 1.24
  GOLANGCI_LINT_VERSION: v2.0

permissions:
  # Required: allow read access to the content for analysis.
  contents: read
  # Optional: allow read access to pull request. Use with `only-new-issues` option.
  pull-requests: read

jobs:
  detect-modules:
    runs-on: ubuntu-latest
    outputs:
      modules: ${{ steps.set-modules.outputs.modules }}
    steps:
      - name: Harden the runner (Audit all outbound calls)
        uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
        with:
          egress-policy: audit

      - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
      - uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5.4.0
        with:
          go-version: ${{ env.GO_VERSION }}
      - id: set-modules
        run: echo "modules=$(go list -m -json | jq -s '.' | jq -c '[.[].Dir]')" >> $GITHUB_OUTPUT

  golangci-lint:
    needs: detect-modules
    runs-on: ubuntu-latest
    strategy:
      matrix:
        modules: ${{ fromJSON(needs.detect-modules.outputs.modules) }}
    steps:
      - name: Harden the runner (Audit all outbound calls)
        uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
        with:
          egress-policy: audit

      - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
      - uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5.4.0
        with:
          go-version: ${{ env.GO_VERSION }}
      - name: golangci-lint ${{ matrix.modules }}
        uses: golangci/golangci-lint-action@1481404843c368bc19ca9406f87d6e0fc97bdcfd # v7.0.0
        with:
          version: ${{ env.GOLANGCI_LINT_VERSION }}
          working-directory: ${{ matrix.modules }}

================================================
FILE: .github/workflows/govulncheck.yml
================================================
---
name: Go Vulnerability Check

on:
  push:
    branches:
      - main
    paths:
      - '**.go'
      - 'go.mod'
      - 'go.sum'
      - '.github/workflows/govulncheck.yml'
  pull_request:
    branches:
      - main
    paths:
      - '**.go'
      - 'go.mod'
      - 'go.sum'
      - '.github/workflows/govulncheck.yml'

jobs:
  govulncheck_job:
    runs-on: ubuntu-latest
    name: Run govulncheck
    steps:
      - id: govulncheck
        uses: golang/govulncheck-action@v1
        with:
           go-package: ./...
           go-version-file: 'go.mod'
           output-format: 'text'

================================================
FILE: .github/workflows/license-check.yml
================================================
---
name: License Check
on:
  push:
    branches:
    - main
  pull_request:
    branches:
    - main
permissions:
  contents: read
jobs:
  license-checker:
    uses: secretflow/.github/.github/workflows/license-check.yml@main

================================================
FILE: .github/workflows/oscp.yml
================================================
name: Unassign Stale OSCP Issues

on:
  schedule:
    - cron: "0 */6 * * *" # Every 6 hours

jobs:
  unassign-stale-issues:
    uses: secretflow/.github/.github/workflows/oscp-unassign.yml@main


================================================
FILE: .github/workflows/scorecards.yml
================================================
# This workflow uses actions that are not certified by GitHub. They are provided
# by a third-party and are governed by separate terms of service, privacy
# policy, and support documentation.

name: Scorecard supply-chain security
on:
  # For Branch-Protection check. Only the default branch is supported. See
  # https://github.com/ossf/scorecard/blob/main/docs/checks.md#branch-protection
  branch_protection_rule:
  # To guarantee Maintained check is occasionally updated. See
  # https://github.com/ossf/scorecard/blob/main/docs/checks.md#maintained
  schedule:
    - cron: '20 7 * * 2'
  push:
    branches: ["main"]

# Declare default permissions as read only.
permissions: read-all

jobs:
  analysis:
    name: Scorecard analysis
    runs-on: ubuntu-latest
    permissions:
      # Needed to upload the results to code-scanning dashboard.
      security-events: write
      # Needed to publish results and get a badge (see publish_results below).
      id-token: write
      contents: read
      actions: read
      # To allow GraphQL ListCommits to work
      issues: read
      pull-requests: read
      # To detect SAST tools
      checks: read

    steps:
      - name: Harden the runner (Audit all outbound calls)
        uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
        with:
          egress-policy: audit

      - name: "Checkout code"
        uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
        with:
          persist-credentials: false

      - name: "Run analysis"
        uses: ossf/scorecard-action@62b2cac7ed8198b15735ed49ab1e5cf35480ba46 # v2.4.0
        with:
          results_file: results.sarif
          results_format: sarif
          # (Optional) "write" PAT token. Uncomment the `repo_token` line below if:
          # - you want to enable the Branch-Protection check on a *public* repository, or
          # - you are installing Scorecards on a *private* repository
          # To create the PAT, follow the steps in https://github.com/ossf/scorecard-action#authentication-with-pat.
          # repo_token: ${{ secrets.SCORECARD_TOKEN }}

          # Public repositories:
          #   - Publish results to OpenSSF REST API for easy access by consumers
          #   - Allows the repository to include the Scorecard badge.
          #   - See https://github.com/ossf/scorecard-action#publishing-results.
          # For private repositories:
          #   - `publish_results` will always be set to `false`, regardless
          #     of the value entered here.
          publish_results: true

      # Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
      # format to the repository Actions tab.
      - name: "Upload artifact"
        uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
        with:
          name: SARIF file
          path: results.sarif
          retention-days: 5

      # Upload the results to GitHub's code scanning dashboard.
      - name: "Upload to code-scanning"
        uses: github/codeql-action/upload-sarif@28deaeda66b76a05916b6923827895f2b14ab387 # v3.28.16
        with:
          sarif_file: results.sarif


================================================
FILE: .github/workflows/stale.yml
================================================
---
name: Mark stale issues and pull requests
on:
  workflow_dispatch:
  schedule:
    - cron: 40 9 * * *
jobs:
  stale:
    uses: secretflow/.github/.github/workflows/stale.yml@main


================================================
FILE: .github/workflows/trigger-ci-cov.yml
================================================
name: Trigger CircleCI Coverage Test

on:
  pull_request_target:
    types: [labeled] # Only run when a label is added

jobs:
  trigger-circleci:
    runs-on: ubuntu-latest
    # This job only runs if the label that was just added is exactly "run-ci-cov".
    if: github.event.label.name == 'run-ci-cov'
    permissions:
      pull-requests: write
    steps:
      - name: Trigger CircleCI Pipeline
        run: |
          echo "Label 'run-ci-cov' was added to PR #${{ github.event.pull_request.number }}. Triggering CircleCI pipeline..."

          # We use curl to directly call the CircleCI API v2.
          # This is more flexible than the official trigger action.
          curl -X POST \
            --url "https://circleci.com/api/v2/project/github/secretflow/scql/pipeline/run" \
            --header "Content-Type: application/json" \
            --header "Circle-Token: ${{ secrets.CCI_TOKEN }}" \
            --data '{"definition_id":"425b19a9-9f21-4d53-a4a6-c2e57939ddd0","config":{"branch":"pull/${{ github.event.pull_request.number }}/head"},"checkout":{"branch":"pull/${{ github.event.pull_request.number }}/head"}}'
      - name: Remove Label from PR
        run: |
          echo "Removing 'run-ci-cov' label from PR #${{ github.event.pull_request.number }}..."

          curl -s -X DELETE \
            -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
            -H "Accept: application/vnd.github.v3+json" \
            "https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.pull_request.number }}/labels/run-ci-cov"


================================================
FILE: .github/workflows/trigger-ci-full-ut.yml
================================================
name: Trigger CircleCI Full Unit Test for Forked & Labeled PR

on:
  pull_request_target:
    types: [labeled]

jobs:
  trigger-circleci:
    runs-on: ubuntu-latest
    # This job only runs if the label that was just added is exactly "run-ci-full".
    if: github.event.label.name == 'run-ci-full'
    permissions:
      pull-requests: write
    steps:
      - name: Trigger CircleCI Pipeline
        run: |
          echo "Label 'run-ci-full' was added to PR #${{ github.event.pull_request.number }}. Triggering CircleCI pipeline..."

          curl -X POST \
            --url "https://circleci.com/api/v2/project/github/secretflow/scql/pipeline/run" \
            --header "Content-Type: application/json" \
            --header "Circle-Token: ${{ secrets.CCI_TOKEN }}" \
            --data '{"definition_id":"ee28d7c2-ef66-4a57-bc90-6895e2b55f14","config":{"branch":"pull/${{ github.event.pull_request.number }}/head"},"checkout":{"branch":"pull/${{ github.event.pull_request.number }}/head"}}'
      - name: Remove Label from PR
        run: |
          echo "Removing 'run-ci-full' label from PR #${{ github.event.pull_request.number }}..."

          curl -s -X DELETE \
            -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
            -H "Accept: application/vnd.github.v3+json" \
            "https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.pull_request.number }}/labels/run-ci-full"


================================================
FILE: .github/workflows/trigger-ci-lite-ut.yml
================================================
name: Trigger CircleCI Lite Unit Test for Forked & Labeled PR

on:
  pull_request_target:
    types: [labeled]

jobs:
  trigger-circleci:
    runs-on: ubuntu-latest
    # This job only runs under two conditions:
    # 1. The PR is from a fork.
    # 2. The label that was just added is exactly "run-ci".
    if: |
      github.event.pull_request.head.repo.full_name != github.repository &&
      (github.event.action == 'labeled' && github.event.label.name == 'run-ci')
    permissions:
      pull-requests: write
    steps:
      - name: Trigger CircleCI Pipeline
        run: |
          echo "Forked PR #${{ github.event.pull_request.number }} has 'run-ci' label. Triggering CircleCI pipeline..."

          curl -X POST \
            --url "https://circleci.com/api/v2/project/github/secretflow/scql/pipeline/run" \
            --header "Content-Type: application/json" \
            --header "Circle-Token: ${{ secrets.CCI_TOKEN }}" \
            --data '{"definition_id":"c6f435ca-697f-488c-83da-156862bb7392","config":{"branch":"pull/${{ github.event.pull_request.number }}/head"},"checkout":{"branch":"pull/${{ github.event.pull_request.number }}/head"}}'
      - name: Remove Label from PR
        run: |
          echo "Removing 'run-ci' label from PR #${{ github.event.pull_request.number }}..."

          curl -s -X DELETE \
            -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
            -H "Accept: application/vnd.github.v3+json" \
            "https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.pull_request.number }}/labels/run-ci"


================================================
FILE: .github/workflows/trigger-diff-coverage.yml
================================================
name: Manually Trigger Incremental Coverage Test

# Use workflow_dispatch to allow manual triggering
on:
  workflow_dispatch:
    inputs:
      base_commit:
        description: 'The base Commit SHA for comparison (the older one)'
        required: true
      head_commit:
        description: 'The head Commit SHA to generate coverage for (the newer one)'
        required: true

jobs:
  trigger-circleci-diff-coverage:
    runs-on: ubuntu-latest
    steps:
      - name: "Trigger CircleCI Incremental Coverage Pipeline via API"
        run: |
          echo "Triggering CircleCI pipeline for base=${{ github.event.inputs.base_commit }} and head=${{ github.event.inputs.head_commit }}..."

          curl --request POST \
            --url "https://circleci.com/api/v2/project/github/secretflow/scql/pipeline/run" \
            --header "Content-Type: application/json" \
            --header "Circle-Token: ${{ secrets.CCI_TOKEN }}" \
            --data '{"definition_id":"f0835e5e-5836-4869-bcb6-f51ff967281d","checkout":{"branch":"${{ github.event.inputs.head_commit }}"},"parameters":{"base_commit":"${{ github.event.inputs.base_commit }}"},"config":{"branch":"${{ github.event.inputs.head_commit }}"}}'


================================================
FILE: .github/workflows/whitespace-check.yml
================================================
name: Whitespace Check

on:
  pull_request:
    types: [opened, synchronize]

concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: true

jobs:
  check-whitespace:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout code
        uses: actions/checkout@v4
        with:
          fetch-depth: 0

      - name: Check for whitespace issues
        run: |
          ./scripts/check-whitespace.sh \
            "${{ github.event.pull_request.base.sha }}" \
            "$GITHUB_STEP_SUMMARY" \
            "https://github.com/${{ github.repository }}"


================================================
FILE: .github/workflows/yaml-linter.yml
================================================
---
name: Yaml Lint
on:
  push:
    branches:
    - main
  pull_request:
    branches:
    - main
permissions:
  contents: read
jobs:
  yaml-linter:
    uses: secretflow/.github/.github/workflows/yaml-linter.yml@main

================================================
FILE: .gitignore
================================================
# docs
docs/_build

# bazel
/bazel-*

# go
bin/*
tool-bin/*
/vendor

# cloudide
.cloudide/

/compile_commands.json

# clangd cache
/external
/.cache/
.vscode/launch.json

# Translations
*.mo
*.pot

*.pyc

.venv

# 排除 ide 文件
.idea/
# 排除mac本地文件
*.DS_Store

# ignore bazelrc for remote cache
.remote.bazelrc

# python binding build
python/build/
python/package/


================================================
FILE: .golangci.yml
================================================
# This file contains all available configuration options
# with their default values.
version: "2"

# options for analysis running
run:
  # default concurrency is a available CPU number
  concurrency: 4

  # timeout for analysis, e.g. 30s, 5m, default is 1m
  timeout: 10m

  # exit code when at least one issue was found, default is 1
  issues-exit-code: 1

  # include test files or not, default is true
  tests: true

  # list of build tags, all linters use it. Default is empty list.
  build-tags: []

# output configuration options
output:
  # sort order
  sort-order:
    - linter
    - severity
    - file

  # colored-line-number|line-number|json|tab|checkstyle|code-climate, default is "colored-line-number"
  formats:
    text:
      path: stdout
      print-linter-name: true
      print-issued-lines: true
      colors: true

issues:
  max-same-issues: 0
  max-issues-per-linter: 0

formatters:
  enable:
    - gofmt
    - goimports
  settings:
    gofmt:
      # simplify code: gofmt with `-s` option, true by default
      simplify: true
    goimports:
      # put imports beginning with prefix after 3rd-party packages;
      # it's a comma-separated list of prefixes
      local-prefixes:
        - github.com/secretflow/scql

linters:
  exclusions:
    paths:
      - _test\.go
      - pkg/planner
      - pkg/parser
      - pkg/proto-gen
      - pkg/expression
      - pkg/types
      - pkg/util
    rules:
      - text: 'shadow: declaration of "(err|ctx)" shadows declaration at'
        linters: [govet]
  settings:
    staticcheck:
      # All supported checks can be enabled with "all".
      # To disable checks, prefix them with a minus sign.
      # Example: [ "all", "-SA1000", "-SA1001"]
      checks: ["all", "-ST1000", "-ST1003", "-ST1016", "-ST1020", "-ST1021", "-ST1022", "-QF1003", "-QF1006", "-QF1008"]
    gosec:
      excludes:
        - G115 # Potential integer overflow when converting between integer types
        - G401 # Detect the usage of MD5 or SHA1
        - G402 # Look for bad TLS connection settings
        - G501 # Import blocklist: crypto/md5
    revive:
      rules:
        - name: unused-parameter # disable unused-parameter rule
          disabled: true
    errcheck:
      # report about not checking of errors in type assetions: `a := b.(MyStruct)`;
      # default is false: such cases aren't reported by default.
      check-type-assertions: false

      # report about assignment of errors to blank identifier: `num, _ := strconv.Atoi(numStr)`;
      # default is false: such cases aren't reported by default.
      check-blank: false

      exclude-functions:
        - fmt.Fprintf(os.Stdout)
        - fmt.Fprintln(os.Stdout)
        - (*database/sql.Rows).Close # prefix is required
        - (*os.File).Close
        - (io.ReadCloser).Close
        - (io.Close).Close
        - (*google.golang.org/grpc.ClientConn).Close
    govet:
      # report about shadowed variables
      enable:
        - shadow
    gocyclo:
      # minimal code complexity to report, 30 by default (but we recommend 10-20)
      min-complexity: 10
    dupl:
      # tokens count to trigger issue, 150 by default
      threshold: 150
    goconst:
      # minimal length of string constant, 3 by default
      min-len: 3
      # minimal occurrences count to trigger, 3 by default
      min-occurrences: 3
    depguard:
      rules:
        main:
          deny:
            - pkg: "github.com/davecgh/go-spew/spew"
    misspell:
      # Correct spellings using locale preferences for US or UK.
      # Default is to use a neutral variety of English.
      # Setting locale to US will correct the British spelling of 'colour' to 'color'.
      locale: US
      ignore-rules:
        - someword
    lll:
      # max line length, lines longer will be reported. Default is 120.
      # '\t' is counted as 1 character by default, and can be changed with the tab-width option
      line-length: 120
      # tab width in spaces. Default to 1.
      tab-width: 1
    unused:
      parameters-are-used: true
      exported-fields-are-used: true
    unparam:
      # Inspect exported functions, default is false. Set to true if no external program/library imports your code.
      # XXX: if you enable this setting, unparam will report a lot of false-positives in text editors:
      # if it's called for subdir of a project it can't find external interfaces. All text editor integrations
      # with golangci-lint call it on a directory with the changed file.
      check-exported: false
    nakedret:
      # make an issue if func has more lines of code than this setting and it has naked returns; default is 30
      max-func-lines: 30
    prealloc:
      # XXX: we don't recommend using this linter before doing performance profiling.
      # For most programs usage of prealloc will be a premature optimization.

      # Report preallocation suggestions only on simple loops that have no returns/breaks/continues/gotos in them.
      # True by default.
      simple: true
      range-loops: true # Report preallocation suggestions on range loops, true by default
      for-loops: false # Report preallocation suggestions on for loops, false by default
    gocritic:
      # Which checks should be disabled; can't be combined with 'enabled-checks'; default is empty
      disabled-checks:
        - regexpMust

      # Enable multiple checks by tags, run `GL_DEBUG=gocritic golangci-lint` run to see all tags and checks.
      # Empty list by default. See https://github.com/go-critic/go-critic#usage -> section "Tags".
      enabled-tags:
        - performance

      settings: # settings passed to gocritic
        captLocal: # must be valid enabled check name
          paramsOnly: true
  enable:
    - unused
    - govet
    - revive
    - errcheck
    - goconst
    - dupl
    # - gosec
    - staticcheck
    - bodyclose
  default: none


================================================
FILE: .licenserc.yaml
================================================
header:
  license:
    spdx-id: Apache-2.0
    copyright-owner: Ant Group Co., Ltd.
    copyright-year: auto
    software-name: secretflow

    pattern: |
      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[s]?://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.

  paths:
    - "**"

  paths-ignore:
    - ".aci"
    - ".ci"
    - ".circleci"
    - ".github"
    - ".vscode"
    - "benchmark/docker-compose/broker"
    - "benchmark/docker-compose/engine"
    - "benchmark/docker-compose/mysql"
    - "benchmark/testdata"
    - "contrib/agent/kusciastub/mock_kusciaapi/mock_kusciaapi.go"
    - "docs/_static"
    - "docs/imgs"
    - "examples"
    - "pkg/executor/engine_stub_mock.go"
    - "pkg/expression"
    - "pkg/infoschema"
    - "pkg/parser"
    - "pkg/planner/core"
    - "pkg/planner/property"
    - "pkg/planner/util/path.go"
    - "pkg/privilege"
    - "pkg/sessionctx"
    - "pkg/table"
    - "pkg/types"
    - "pkg/util/chunk"
    - "pkg/util/codec"
    - "pkg/util/execdetails"
    - "pkg/util/hack"
    - "pkg/util/math"
    - "pkg/util/mathutil"
    - "pkg/util/misc.go"
    - "pkg/util/mvmap"
    - "pkg/util/plancodec"
    - "pkg/util/ranger"
    - "pkg/util/stringutil"
    - "pkg/util/testleak"
    - "pkg/util/testutil"
    - "pkg/util/texttree"
    - "scripts"
    - "**/*.template"
    - "**/*.patch"
    - "**/*.pb.go"
    - "**/*.md"
    - "**/*.json"
    - "**/*.yaml"
    - "**/*.yml"
    - "**/*.txt"
    - "**/*.Dockerfile"
    - "**/Dockerfile"
    - "**/*.po"
    - "**/*.svg"
    - "**/*.bat"
    - "**/*.rst"
    - "**/*.patch"
    - "**/*.csv"
    - "**/*.tmpl"
    - "LICENSE"
    - "NOTICE"
    - "MODULE.bazel.lock"
    - ".bazeliskrc"
    - ".bazelrc"
    - ".clang-format"
    - ".clang-tidy"
    - "**/.gitignore"
    - "**/.env"
    - "go.mod"
    - "go.sum"
    - "**/Makefile"

  comment: never

  license-location-threshold: 80

  language:
    Starlark:
      extensions:
        - ".bazel"
        - ".bazelrc"
        - "BUILD"
        - ".bzl"
        - "WORKSPACE"
      comment_style_id: PythonStyle
    Cpp:
      extensions:
        - ".cc"
        - ".h"
        - ".cu"
      comment_style_id: DoubleSlash
    Python:
      extensions:
        - ".py"
      comment_style_id: PythonStyle


================================================
FILE: .markdownlint.yaml
================================================
# Copyright 2025 Ant Group Co., Ltd.
#
# 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.

# Enable all markdownlint rules by default
default: true
MD013: false # line-length Line length
MD024: false # no-duplicate-heading Multiple headings with the same content

# List formatting:
#
# 1. Lists must have a blank line before AND after the list.
# 2. Lists start aligned to the left (do not indent the top level list items).
#    NOTE: markdownlint currently checks indentation for unordered lists only.
#          Please manually verify that your ordered lists are not indented.
#          See https://github.com/DavidAnson/markdownlint/issues/138.
# 3. You may use one or zero blank lines between list items.
# 4. Nested list items should be indented to align with the first character of
#    the first line. For bullet lists, that means 2 spaces. For numbered
#    lists, that's 3 spaces (but 4 spaces is okay if that's easier).
# 5. In multiline list items, subsequent lines are indented by 2 spaces.
#    This is not checked automatically, so we're documenting this convention
#    to make sure the codebase stays consistent.
#
# Examples:
#
# * This is a list item that has multiple
#   lines and each line aligns with the text from the first line.
#   * This is a nested list, also aligned with the first line.
#
# For ordered lists, that means three spaces for wrapped lines:
#
# 1. This is an ordered list item.
#    1. The nested list aligns with the first line.
ul-indent:
  indent: 2

# Allow inline HTML
no-inline-html: false

# Allow dupe heading names only if they're not siblings
no-duplicate-heading:
  siblings_only: true

# Allow images w/o alt-text
no-alt-text: false

================================================
FILE: .pre-commit-config.yaml
================================================
repos:
  - repo: https://github.com/gitleaks/gitleaks
    rev: v8.24.0
    hooks:
      - id: gitleaks
  - repo: https://github.com/golangci/golangci-lint
    rev: v2.0.0
    hooks:
      - id: golangci-lint
  - repo: https://github.com/jumanjihouse/pre-commit-hooks
    rev: 3.0.0
    hooks:
      - id: shellcheck
  - repo: https://github.com/pocc/pre-commit-hooks
    rev: v1.3.5
    hooks:
      - id: cpplint
  - repo: https://github.com/pre-commit/pre-commit-hooks
    rev: v4.4.0
    hooks:
      - id: end-of-file-fixer
      - id: trailing-whitespace
  - repo: https://github.com/pylint-dev/pylint
    rev: v2.17.2
    hooks:
      - id: pylint


================================================
FILE: .vscode/cspell.json
================================================
// cSpell Settings
{
  // Version of the setting file.  Always 0.2
  "version": "0.2",
  // language - current active spelling language
  "language": "en",
  // words - list of words to be always considered correct
  "words": [
    "brokerctl",
    "gorm",
    "Kuscia",
    "kusciaapi",
    "protojson",
    "quickstart",
    "scql",
    "scqlengine",
    "secretflow",
    "spu",
    "varchar"
  ]
}


================================================
FILE: .vscode/extensions.json
================================================
{
    "recommendations": [
        "BazelBuild.vscode-bazel",
        "eamodio.gitlens",
        "golang.go",
        "ms-python.python",
        "ms-vscode.cpptools",
        "jgclark.vscode-todo-highlight",
        "ms-vscode-remote.remote-ssh",
        "drblury.protobuf-vsc",
        "llvm-vs-code-extensions.vscode-clangd",
        "lextudio.restructuredtext",
        "bufbuild.vscode-buf"
    ]
}


================================================
FILE: .vscode/settings.json
================================================
{
    "editor.formatOnSave": true,
    "gopls": {
        "formatting.local": "github.com/secretflow/scql"
    },
    "[python]": {
        "editor.defaultFormatter": "ms-python.black-formatter"
    },
    "files.watcherExclude": {
        "**/.git/**": true,
        "**/.cache/**": true,
        "**/bazel-*/**": true,
        "**/external/**": true
    },
    "files.insertFinalNewline": true,
    "files.trimTrailingWhitespace": true,
    "[proto]": {
        "editor.defaultFormatter": "bufbuild.vscode-buf",
        "editor.formatOnSave": true
    }
}


================================================
FILE: BUILD.bazel
================================================
# Copyright 2023 Ant Group Co., Ltd.
#
# 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.


================================================
FILE: CHANGELOG.md
================================================
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## Types of changes

`Added` for new features.
`Changed` for changes in existing functionality.
`Deprecated` for soon-to-be removed features.
`Removed` for now removed features.
`Fixed` for any bug fixes.
`Security` in case of vulnerabilities.

## Staging

## [2.0.0] - 2026-03-16

### Added

- Introduced SCQL 2.0 OpenCore architecture: new `CompilerService` gRPC API (`api/v1alpha1/compiler.proto`) with `CompileSQL` endpoint, and a new Go compiler package (`pkg/interpreter/compiler/`) replacing the old interpreter pipeline.
- Added Perfetto-based tracing support in engine, controlled by `--enable_trace` and `--trace_log_path` flags.
- Added `GroupSecretSum` and `GroupSecretAvg` operators using SPU secret-sharing, replacing the old HE-based group aggregation. Benchmarks show the new algorithm is 5-10x faster.
- Added planner optimization rules: correlated subquery decorrelation, group-by threshold enforcement, `JOIN` reorder by party code, and consecutive selection merging.
- Added `Rr22Mode` (low/fast) for PSI algorithm negotiation.
- Added `opencore-demo` example and quickstart documentation for getting started with the new architecture.

### Changed

- **breaking**: Redesigned system architecture from Broker-based (P2P/Centralized) to native Compiler + Engine integration.
- **breaking**: `Executor.RunExecutionPlan()` now returns `*scql.QueryResponse` instead of `*scql.SCDBQueryResultResponse`.
- Refactored engine operators to use typed `ExecContext` accessor methods (`GetInputTensor()`, `SetOutputTensor()`, etc.) instead of manual tensor table lookups.
- Refactored session negotiation: new `Session::Negotiate()` method handles streaming options, PSI options, and curve types via protobuf-serialized `NegotiationOptions`.
- Consolidated `StreamingOptions` into `SessionOptions`.
- Extracted `RunPlanCore` from `EngineServiceImpl` into a standalone function for reuse in both RPC and task modes.
- Updated documentation to reflect the OpenCore architecture.

### Removed

- Removed SCDB centralized query server (`pkg/scdb/`, `cmd/scdbserver/`, `cmd/scdbclient/`, `api/scdb_api.proto`).
- Removed Broker P2P coordination layer (`pkg/broker/`, `cmd/broker/`, `cmd/brokerctl/`, `api/broker.proto`).
- Removed CCL (Column Control Language) authorization mechanism (`api/ccl.proto`, `pkg/interpreter/ccl/`).
- Removed old interpreter/translator pipeline (`pkg/interpreter/translator/`, `pkg/interpreter/interpreter.go`, `pkg/interpreter/svc/`).
- Removed `cmd/regtest/`, `cmd/agent/`, `cmd/scqltool/`, `pkg/privilege/`, `pkg/executor/job_watcher.go`.
- Removed `GroupHESum` operator (replaced by `GroupSecretSum`/`GroupSecretAvg`).
- Removed all legacy deployment guides, API references, CCL docs, and CI infrastructure for removed components.

### Fixed

- Fixed communication stats not accounting for initialization-phase network traffic.
- Fixed potential async task lifecycle issues in `RunPlanSync` by switching from `std::async` to direct invocation.
- Fixed null handling in window function, placing null values at the end.
- Fixed missing `DESC` keyword when rebuilding ORDER BY statement.
- Fixed interpreter creation time losing timezone information.

## [0.9.4] - 2025-07-29

### Added

- Added Archive API to support project archiving.
- Enhanced time-type data processing capability: support `STR_TO_DATE` function and implicit conversion from string to time types.
- Supported richer expression of statements: `PERCENTILE_DISC`, `BETWEEN AND`, `REPLACE`, etc.

### Changed

- Optimized data source reading, improving streaming processing capabilities.
- Optimized `JOIN` process to eliminate the need for additional `PLAINTEXT_AFTER_JOIN` CCL for non-result-receiving parties on join keys.

### Fixed

- Resolved the issue with compare subquery exceptions in aggregation scenarios.
- Fixed column disorder issues in the project tables.
- Resolved problems in LogicalOptimizer to prevent the removal of LogicalProjection nodes that could lead to performance and Tensor property inference issues.

## [0.9.3] - 2025-03-07

### Added

- Support for datasource `Doris 2.1.7`.
- Support `PERCENT_RANK` window function.
- Support various string-related single-party operators, including `UPPER`, `LOWER`, `SUBSTRING`, `TRIM`, `CONCAT` and others.
- Support `Scalar Subquery`, the subquery in the right is scalar value, e.g. SELECT * FROM ta JOIN tb ON ta.ID = tb.ID WHERE ta.salary > (SELECT AVG(ta.salary) FROM ta).
- Support `Compare Subquery`, allows comparison with ANY or ALL of the subquery results, e.g. SELECT * FROM ta JOIN tb ON ta.ID = tb.ID WHERE ta.salary > ANY(SELECT ta.salary FROM ta), However, comparisons using = or != are not supported in the HAVING clause. For instance, HAVING SUM(ta.salary) = ANY(SELECT salary FROM ta) is not supported.

### Changed

- Improved `JOIN` and `IN` performance in streaming mode.
- Implemented a more reliable `secret join algorithm`(only works in SEMI2K protocol) inspired by [Scape](https://ieeexplore.ieee.org/document/9835540/).
- Optimized the column pruning rule for Join, Selection, and Window nodes in the Logical Optimizer to more effectively remove redundant columns.

### Fixed

- Restricted access to SCQLEngine metrics using additional paths like "engine_ip:engine_port/metrics/additional/path".
- Prevented creation of tables with the same ref_table name but different db_type
- Fixed job creation error when selecting 'OPRF-PSI' but 'server hint' was missing.

## [0.9.2] - 2024-12-23

### Added

- Enhancement: Support `JOIN` after `UNION` operation.
- Add SCQL Agent to facilitate running SCQL query tasks in Kuscia, making it easier to integrate into SecretPad.
- Support writing results into multi-parties via `SELECT INTO OUTFILE` syntax.
- Support datasource `ODPS` via integrating with [dataproxy](https://github.com/secretflow/dataproxy).
- Support `order by`.
- Support a lot of single-party operators, such as `ABS`, `ASIN`, `EXP`, `FLOOR`, `SQRT` etc.

### Changed

- Improve the `JOIN` and `IN` performance via integrating [RR22 PSI](https://github.com/secretflow/psi/blob/v0.5.0b0/psi/proto/psi_v2.proto#L62).
- Improve the aggregation with group by performance if `reveal_group_count` enabled.

### Fixed

- Fixed an occasional crash issue when canceling query job.
- Fixed `select now()` is not supported issue.

## [0.9.1] - 2024-10-16

### Added

- Support window function `ROW_NUMBER()` with PARTITION BY clause and ORDER BY clause.
- Add new CCL constraint `REVAL_RANK`.
- Add ExplainQuery API with path `/intra/query/explain`.
- Support `INSERT INTO SELECT` syntax to allow writing query result back to db (mysql/sqlite/postgres).
- Support `trim` function.

### Changed

- Improved the job watcher to work better in broker clustered mode.

## [0.9.0] - 2024-08-01

### Added

- Support write outfile to OSS/MINIO via `select into` query.
- Support `sin`, `cos`, `acos` function.
- Support `geodist` function.
- Broker support using postgres as metadata storage.

### Changed

- Reduce the memory peak of large-scale intersection tasks through streaming execution.
- Link tcmalloc to solve the problem of memory increase.

### Fixed

- Fix crashes when dumpfile exceeds 2GB string column.
- Reduce the probability of graph checksum inconsistency issues.

## [0.8.1] - 2024-07-02

### Added

- Support session-based log isolation functioality in the SCQL Engine.
- Support consul-based broker registration/discovery services, providing ACL/TLS authentication.

### Changed

### Fixed

## [0.8.0] - 2024-06-12

### Added

- Enhanced `FetchResult` RPC and `brokerctl get result` command to report job progress when result is not ready.
- Support project/query level configs
- Support NULL for private data: including Arithmetic, Logic, Aggregation, etc., {IS [NOT] NULL, IFNULL, COALESCE} are also supported.
- Support port isolation for engine link service and control panel service (RunExecutionPlan).
- Add new CCL constraint `PLAINTEXT_AS_JOIN_PAYLOAD`.

### Changed

- **breaking**: The response value type of Broker API `DoQuery` and `FetchResult` have incompatible changes.

### Fixed

## [0.7.0] - 2024-05-14

### Added

- Added CheckAndUpdate API for self-recovery when status is inconsistent in P2P mode.

### Fixed

- Fixed the problem that Broker was unable to detect SCQLEngine crashes or being killed by OOM.

## [0.6.0] - 2024-04-15

### Added

- Support for RSA key pairs in SCQLBroker.
- Support running on [kuscia](https://github.com/secretflow/kuscia) and scheduling SCQLEngine dynamic via kuscia job.
- Added `dry_run` parameter in DoQuery request, it could be used to check query syntax and CCL without actually executing the query.
- Improve Broker high availability, support deploying in multi-node cluster deployment.
- Support reading csv from OSS/MINIO.

### Changed

- **breaking**: Reshape column data type, data type `LONG` is deprecated.
- **breaking**: Modify table schema in broker storage for P2P mode.

## [0.5.0] - 2024-01-10

### Added

- Added support for HTTP data source router.

### Changed

- **breaking**: Add table **members** in broker storage for P2P mode.
- Speed up GROUP BY with Radix Sort.
- Adjusted configuration items for SCQLEngine and SCQLBroker.

### Fixed

- Fixed check for grant ccl in P2P mode.

## [0.4.0] - 2023-11-15

### Added

- Added support for P2P mode, no longer need to rely on a trusted third party.
- Added support for {datetime, timestamp} data types, as well as related operations.
- Support using ArrowSQL as a data source for Engine
- Added support for {Limit Cast Mod} operators.

### Changed

- Polished document outline.

## [0.3.0] - 2023-09-10

### Added

- Optimize SCQLEngine memory usage, release unused tensors immediately.
- Added warning information to the query result.
- Added support for {LEFT JOIN, RIGHT JOIN, CASE WHEN, IF} operators

### Changed

- Speed up GROUP BY with HEU in some scenarios.
- Optimized to support billion-level PSI scenarios.
- Drop GRM from SCQL awareness. We extend the syntax of create user statement and modify the syntax of create table statement.
- Used json string format to configure spu runtime in scdb yaml conf.
- Speed up JOIN, IN with Unbalanced PSI in scenarios with unbalanced data.

## [0.2.0] - 2023-06-30

### Added

- Added support for union operator.
- Added support for reading CSV files as a data source for Engine.
- Added support for using PostgreSQL as a database for Engine.
- Added support for change password with ALTER USER statement.
- Added support for removing table-level and database-level permissions with the REVOKE statement.
- Added support for structured audit log.
- Added support for the float64 data type in the Engine.
- Added the Chinese documentation.

### Changed

- Change some description in document.
- Enrich test cases.
- Enhanced support for security protocols of Cheetah and ABY3.
- Optimized GROUP BY logic.
- Optimized execution plan nodes.
- Optimized the execution logic of the runSQL.
- Optimized the three party ccl in join node.

### Fixed

- Fixed create database failed [#19](https://github.com/secretflow/scql/issues/19).
- Fixed not support group by string[#48](https://github.com/secretflow/scql/pull/48).

## [0.1.0] - 2023-03-28

### Added

- SCQL init release


================================================
FILE: CONTRIBUTING.md
================================================
# Contributing

## Contributor License Agreement

Contributions to this project must be accompanied by a Contributor License
Agreement. You (or your employer) retain the copyright to your contribution;
this simply gives us permission to use and redistribute your contributions as
part of the project.

## Repo layout

- Please see [repo layout](REPO_LAYOUT.md).

## Style

### Go coding style

Go code follows [Uber Go Style Guide](https://github.com/uber-go/guide/blob/master/style.md)

### C++ coding style

In general, please use clang-format to format code, and follow clang-tidy tips.

Most of the code style is derived from the [Google C++ style guidelines](https://google.github.io/styleguide/cppguide.html), except:

- Exceptions are allowed and encouraged where appropriate.
- Header guards should use `#pragma once`.

### Other tips

- Git commit message should be meaningful, we suggest imperative [keywords](https://github.com/joelparkerhenderson/git_commit_message#summary-keywords).
- Developer must write unit-test (line coverage must be greater than 80%), tests should be deterministic.

## Build

### Prerequisite

#### Docker


```sh
## start dev container
docker run -d -it --name scql-dev-$(whoami) \
         --mount type=bind,source="$(pwd)",target=/home/admin/dev/ \
         -w /home/admin/dev \
         --cap-add=SYS_PTRACE --security-opt seccomp=unconfined \
         --cap-add=NET_ADMIN \
         --privileged=true \
         secretflow/scql-ci:latest /bin/bash

# attach to dev container
docker exec -it scql-dev-$(whoami) bash
```

### Build & UnitTest




```sh

# build SCQL engine as release
bazelisk build //engine/exe:scqlengine -c opt

# run unittests for SCQL engine
bazelisk test //engine/...

# build with address sanitizer
bazelisk build --config=asan //engine/exe:scqlengine

# build go code
make

# run go unit tests
go test ./pkg/...
```

### Build docs

```sh
# prerequisite
pip3 install -U -r docs/requirements.txt

# Build HTML docs, and the result is placed in directory 'docs/_build/html'
# Build documentation in English and Chinese
make doc
```


================================================
FILE: LEGAL.md
================================================
# Legal Disclaimer

Within this source code, the comments in Chinese shall be the original, governing version. Any comment in other languages are for reference only. In the event of any conflict between the Chinese language version comments and other language version comments, the Chinese language version shall prevail.

法律免责声明

关于代码注释部分,中文注释为官方版本,其它语言注释仅做参考。中文注释可能与其它语言注释存在不一致,当中文注释与其它语言注释存在不一致时,请以中文注释为准。


================================================
FILE: LICENSE
================================================
                                 Apache License
                           Version 2.0, January 2004
                        http://www.apache.org/licenses/

   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION

   1. Definitions.

      "License" shall mean the terms and conditions for use, reproduction,
      and distribution as defined by Sections 1 through 9 of this document.

      "Licensor" shall mean the copyright owner or entity authorized by
      the copyright owner that is granting the License.

      "Legal Entity" shall mean the union of the acting entity and all
      other entities that control, are controlled by, or are under common
      control with that entity. For the purposes of this definition,
      "control" means (i) the power, direct or indirect, to cause the
      direction or management of such entity, whether by contract or
      otherwise, or (ii) ownership of fifty percent (50%) or more of the
      outstanding shares, or (iii) beneficial ownership of such entity.

      "You" (or "Your") shall mean an individual or Legal Entity
      exercising permissions granted by this License.

      "Source" form shall mean the preferred form for making modifications,
      including but not limited to software source code, documentation
      source, and configuration files.

      "Object" form shall mean any form resulting from mechanical
      transformation or translation of a Source form, including but
      not limited to compiled object code, generated documentation,
      and conversions to other media types.

      "Work" shall mean the work of authorship, whether in Source or
      Object form, made available under the License, as indicated by a
      copyright notice that is included in or attached to the work
      (an example is provided in the Appendix below).

      "Derivative Works" shall mean any work, whether in Source or Object
      form, that is based on (or derived from) the Work and for which the
      editorial revisions, annotations, elaborations, or other modifications
      represent, as a whole, an original work of authorship. For the purposes
      of this License, Derivative Works shall not include works that remain
      separable from, or merely link (or bind by name) to the interfaces of,
      the Work and Derivative Works thereof.

      "Contribution" shall mean any work of authorship, including
      the original version of the Work and any modifications or additions
      to that Work or Derivative Works thereof, that is intentionally
      submitted to Licensor for inclusion in the Work by the copyright owner
      or by an individual or Legal Entity authorized to submit on behalf of
      the copyright owner. For the purposes of this definition, "submitted"
      means any form of electronic, verbal, or written communication sent
      to the Licensor or its representatives, including but not limited to
      communication on electronic mailing lists, source code control systems,
      and issue tracking systems that are managed by, or on behalf of, the
      Licensor for the purpose of discussing and improving the Work, but
      excluding communication that is conspicuously marked or otherwise
      designated in writing by the copyright owner as "Not a Contribution."

      "Contributor" shall mean Licensor and any individual or Legal Entity
      on behalf of whom a Contribution has been received by Licensor and
      subsequently incorporated within the Work.

   2. Grant of Copyright License. Subject to the terms and conditions of
      this License, each Contributor hereby grants to You a perpetual,
      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
      copyright license to reproduce, prepare Derivative Works of,
      publicly display, publicly perform, sublicense, and distribute the
      Work and such Derivative Works in Source or Object form.

   3. Grant of Patent License. Subject to the terms and conditions of
      this License, each Contributor hereby grants to You a perpetual,
      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
      (except as stated in this section) patent license to make, have made,
      use, offer to sell, sell, import, and otherwise transfer the Work,
      where such license applies only to those patent claims licensable
      by such Contributor that are necessarily infringed by their
      Contribution(s) alone or by combination of their Contribution(s)
      with the Work to which such Contribution(s) was submitted. If You
      institute patent litigation against any entity (including a
      cross-claim or counterclaim in a lawsuit) alleging that the Work
      or a Contribution incorporated within the Work constitutes direct
      or contributory patent infringement, then any patent licenses
      granted to You under this License for that Work shall terminate
      as of the date such litigation is filed.

   4. Redistribution. You may reproduce and distribute copies of the
      Work or Derivative Works thereof in any medium, with or without
      modifications, and in Source or Object form, provided that You
      meet the following conditions:

      (a) You must give any other recipients of the Work or
          Derivative Works a copy of this License; and

      (b) You must cause any modified files to carry prominent notices
          stating that You changed the files; and

      (c) You must retain, in the Source form of any Derivative Works
          that You distribute, all copyright, patent, trademark, and
          attribution notices from the Source form of the Work,
          excluding those notices that do not pertain to any part of
          the Derivative Works; and

      (d) If the Work includes a "NOTICE" text file as part of its
          distribution, then any Derivative Works that You distribute must
          include a readable copy of the attribution notices contained
          within such NOTICE file, excluding those notices that do not
          pertain to any part of the Derivative Works, in at least one
          of the following places: within a NOTICE text file distributed
          as part of the Derivative Works; within the Source form or
          documentation, if provided along with the Derivative Works; or,
          within a display generated by the Derivative Works, if and
          wherever such third-party notices normally appear. The contents
          of the NOTICE file are for informational purposes only and
          do not modify the License. You may add Your own attribution
          notices within Derivative Works that You distribute, alongside
          or as an addendum to the NOTICE text from the Work, provided
          that such additional attribution notices cannot be construed
          as modifying the License.

      You may add Your own copyright statement to Your modifications and
      may provide additional or different license terms and conditions
      for use, reproduction, or distribution of Your modifications, or
      for any such Derivative Works as a whole, provided Your use,
      reproduction, and distribution of the Work otherwise complies with
      the conditions stated in this License.

   5. Submission of Contributions. Unless You explicitly state otherwise,
      any Contribution intentionally submitted for inclusion in the Work
      by You to the Licensor shall be under the terms and conditions of
      this License, without any additional terms or conditions.
      Notwithstanding the above, nothing herein shall supersede or modify
      the terms of any separate license agreement you may have executed
      with Licensor regarding such Contributions.

   6. Trademarks. This License does not grant permission to use the trade
      names, trademarks, service marks, or product names of the Licensor,
      except as required for reasonable and customary use in describing the
      origin of the Work and reproducing the content of the NOTICE file.

   7. Disclaimer of Warranty. Unless required by applicable law or
      agreed to in writing, Licensor provides the Work (and each
      Contributor provides its Contributions) on an "AS IS" BASIS,
      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
      implied, including, without limitation, any warranties or conditions
      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
      PARTICULAR PURPOSE. You are solely responsible for determining the
      appropriateness of using or redistributing the Work and assume any
      risks associated with Your exercise of permissions under this License.

   8. Limitation of Liability. In no event and under no legal theory,
      whether in tort (including negligence), contract, or otherwise,
      unless required by applicable law (such as deliberate and grossly
      negligent acts) or agreed to in writing, shall any Contributor be
      liable to You for damages, including any direct, indirect, special,
      incidental, or consequential damages of any character arising as a
      result of this License or out of the use or inability to use the
      Work (including but not limited to damages for loss of goodwill,
      work stoppage, computer failure or malfunction, or any and all
      other commercial damages or losses), even if such Contributor
      has been advised of the possibility of such damages.

   9. Accepting Warranty or Additional Liability. While redistributing
      the Work or Derivative Works thereof, You may choose to offer,
      and charge a fee for, acceptance of support, warranty, indemnity,
      or other liability obligations and/or rights consistent with this
      License. However, in accepting such obligations, You may act only
      on Your own behalf and on Your sole responsibility, not on behalf
      of any other Contributor, and only if You agree to indemnify,
      defend, and hold each Contributor harmless for any liability
      incurred by, or claims asserted against, such Contributor by reason
      of your accepting any such warranty or additional liability.

   END OF TERMS AND CONDITIONS

   APPENDIX: How to apply the Apache License to your work.

      To apply the Apache License to your work, attach the following
      boilerplate notice, with the fields enclosed by brackets "[]"
      replaced with your own identifying information. (Don't include
      the brackets!)  The text should be enclosed in the appropriate
      comment syntax for the file format. We also recommend that a
      file or class name and description of purpose be included on the
      same "printed page" as the copyright notice for easier
      identification within third-party archives.

   Copyright [yyyy] [name of copyright owner]

   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.


================================================
FILE: MODULE.bazel
================================================
# Copyright 2024 Ant Group Co., Ltd.
#
# 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.

module(
    name = "scql",
    version = "0.9.5dev",
    compatibility_level = 1,
)

bazel_dep(name = "yacl", version = "0.4.5b12-nightly-20251024")
bazel_dep(name = "psi", version = "0.6.0.dev250922")
bazel_dep(name = "spulib", version = "0.9.5rc1")
git_override(
    module_name = "spulib",
    commit = "2387c999a4bd2b7e85072f4e25a173a60b5958d4",
    remote = "https://github.com/secretflow/spu.git",
    strip_prefix = "src",
)

bazel_dep(name = "dataproxy_sdk_cc", version = "0.5.0.dev20250603")
bazel_dep(name = "kuscia", version = "0.13.0b1")
bazel_dep(name = "apple_support", version = "1.24.5")
bazel_dep(name = "rules_cuda", version = "0.2.3")
bazel_dep(name = "rules_cc", version = "0.0.12")
bazel_dep(name = "rules_proto", version = "6.0.2")

# non module dependencies
non_module_dependencies = use_extension("//bazel:defs.bzl", "non_module_dependencies")
use_repo(
    non_module_dependencies,
    "com_github_duckdb",
    "com_github_gperftools_gperftools",
    "org_pocoproject_poco",
)

bazel_dep(name = "arrow", version = "17.0.0.bcr.1", repo_name = "org_apache_arrow")
bazel_dep(name = "ncurses", version = "6.4.20221231.bcr.3")
bazel_dep(name = "rules_pkg", version = "1.0.1")
bazel_dep(name = "rules_java", version = "8.6.1")
bazel_dep(name = "rules_go", version = "0.53.0")
bazel_dep(name = "rules_proto_grpc_cpp", version = "5.0.1")
bazel_dep(name = "rules_foreign_cc", version = "0.15.0")
single_version_override(
    module_name = "rules_foreign_cc",
    patch_strip = 1,
    patches = [
        "//bazel/patches:rules_foreign_cc.patch",
    ],
    version = "0.15.0",
)

bazel_dep(name = "bazel_features", version = "1.20.0")
bazel_dep(name = "platforms", version = "0.0.8")
bazel_dep(name = "openssl", version = "3.3.2.bcr.1")
bazel_dep(name = "spdlog", version = "1.14.1")
bazel_dep(name = "fmt", version = "11.0.2")
bazel_dep(name = "brpc", version = "1.13.0")
bazel_dep(name = "abseil-cpp", version = "20240722.0")
bazel_dep(name = "boost.uuid", version = "1.83.0.bcr.1")
bazel_dep(name = "boost.multiprecision", version = "1.83.0")
bazel_dep(name = "boost.endian", version = "1.83.0")
bazel_dep(name = "boost.geometry", version = "1.83.0")
bazel_dep(name = "boost.graph", version = "1.83.0")
bazel_dep(name = "boost.spirit", version = "1.83.0")
bazel_dep(name = "bazel_skylib", version = "1.7.1")
bazel_dep(name = "boost.serialization", version = "1.83.0.bcr.1")
bazel_dep(name = "prometheus-cpp", version = "1.2.4")
bazel_dep(name = "protobuf", version = "27.3", repo_name = "com_google_protobuf")
single_version_override(
    module_name = "protobuf",
    version = "27.3",
)

bazel_dep(name = "perfetto", version = "41.0")
bazel_dep(name = "googleapis", version = "0.0.0-20240819-fe8ba054a")
bazel_dep(name = "zlib", version = "1.3.1.bcr.3")
bazel_dep(name = "rules_python", version = "0.34.0")
bazel_dep(name = "gflags", version = "2.2.2")
bazel_dep(name = "msgpack-c", version = "6.1.0")
bazel_dep(name = "grpc", version = "1.66.0.bcr.4")
bazel_dep(name = "pybind11_bazel", version = "3.0.0")

single_version_override(
    module_name = "grpc",
    version = "1.66.0.bcr.4",
)

single_version_override(
    module_name = "openssl",
    version = "3.3.2.bcr.1",
)

# use sf.bcr
bazel_dep(name = "curl", version = "8.4.0.bcr.2")
single_version_override(
    module_name = "curl",
    version = "8.4.0.bcr.2",
)

new_local_repository = use_repo_rule("@bazel_tools//tools/build_defs/repo:local.bzl", "new_local_repository")

new_local_repository(
    name = "macos_omp_x64",
    build_file = "@yacl//bazel:local_openmp_macos.BUILD",
    path = "/usr/local/opt/libomp",
)

new_local_repository(
    name = "macos_omp_arm64",
    build_file = "@yacl//bazel:local_openmp_macos.BUILD",
    path = "/opt/homebrew/opt/libomp/",
)

python = use_extension("@rules_python//python/extensions:python.bzl", "python")
python.toolchain(
    ignore_root_user_error = True,
    python_version = "3.11",
)

# test
bazel_dep(name = "googletest", version = "1.15.2", dev_dependency = True)
bazel_dep(name = "google_benchmark", version = "1.8.5", dev_dependency = True)
bazel_dep(name = "rules_buf", version = "0.4.0")


================================================
FILE: Makefile
================================================
export GO111MODULE=on
GOPATH := ${GOPATH}:${PWD}
TOOLBIN := ${PWD}/tool-bin
export PATH := ${TOOLBIN}:$(PATH)
export GOFLAGS=-buildmode=pie -buildvcs=false
export CGO_CPPFLAGS=-fstack-protector-strong -D_FORTIFY_SOURCE=2
UNAME_S := $(shell uname -s)
ifeq ($(UNAME_S),Linux)
	export CGO_LDFLAGS=-Wl,-z,relro,-z,now,-z,noexecstack
endif

.PHONY: clean vet lint test detect-shadowing fast pb prepare fmt gogenerate

default: install

install: clean prepare fmt vet gogenerate
	GOBIN=${PWD}/bin go install -ldflags "-X main.version=${SCQL_VERSION}" ./cmd/...

gogenerate:
	go generate ./pkg/...
	go generate ./cmd/...

fast: fmt vet
	GOBIN=${PWD}/bin go install ./cmd/...

parser:
	cd pkg/parser && make

binary: clean prepare fmt vet gogenerate
	$(eval SCQL_VERSION := $(shell bash ${PWD}/version_build.sh))
	echo "Binary version: ${SCQL_VERSION}"
	GOBIN=${PWD}/bin go install -ldflags "-X main.version=${SCQL_VERSION}" ./cmd/...
	bazelisk --host_jvm_args=-Xmx8g build //engine/exe:scqlengine -c opt --jobs=32
	bash ${PWD}/version_build.sh -r

binary-cov: clean prepare fmt vet gogenerate
	$(eval SCQL_VERSION := $(shell bash ${PWD}/version_build.sh))
	echo "Binary version: ${SCQL_VERSION}"
	GOBIN=${PWD}/bin go install -ldflags "-X main.version=${SCQL_VERSION}" -cover ./...
	bazelisk --host_jvm_args=-Xmx8g build //engine/exe:scqlengine --jobs=32 --collect_code_coverage --instrumentation_filter=//engine/... --noremote_upload_local_results --copt=-DNDEBUG
	bash ${PWD}/version_build.sh -r

pb: clean
	$(RM) -rf pkg/proto-gen/*
	./api/generate_proto.sh

fmt:
	go fmt ./pkg/...

vet:
	go vet -unsafeptr=false ./pkg/...

doc:
	go run ./cmd/docgen/main.go
	cd docs && rm -rf _build && make build

lint: GOLINT-exists
	-${TOOLBIN}/golangci-lint run --out-format=colored-line-number

detect-shadowing:
	go vet -vettool=$(shell which shadow) -strict ./...

clean:
	$(RM) bin/*
	$(RM) *.coverprofile

test:
	go test -v -cover ./pkg/...

testsum:
	go run gotest.tools/gotestsum@latest ./pkg/...

coverage: install
	go list -f '{{if gt (len .TestGoFiles) 0}}"go test -covermode count -coverprofile {{.Name}}.coverprofile -coverpkg ./... {{.ImportPath}}"{{end}}' ./... | xargs -I {} bash -c {}
	find . -name "*.coverprofile"
	$(info Use `go tool cover -html MODULE_NAME.coverprofile`)

prepare: GO-exists GO-package

GO-exists:
	$(if $(shell command -v go 2> /dev/null),$(info Found `go`),$(error Please install go (prefer v1.22): refer to `https://golang.org/dl/`))
	go version
	go env GOPROXY

GOLINT-exists:
	$(if $(shell command -v golangci-lint 2> /dev/null),$(info Found `golangci-lint`),$(shell curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh| sh -s -- -b ${TOOLBIN} v1.61.0))

GO-package:
	@GOBIN=${TOOLBIN} go install go.uber.org/mock/mockgen@latest && \
	GOBIN=${TOOLBIN} go install golang.org/x/tools/cmd/goyacc@latest && \
	GOBIN=${TOOLBIN} go install github.com/mattn/goveralls@latest && \
	GOBIN=${TOOLBIN} go install github.com/rakyll/gotest@latest && \
	GOBIN=${TOOLBIN} go install golang.org/x/tools/go/analysis/passes/shadow/cmd/shadow@latest


================================================
FILE: README.md
================================================
# SCQL

[![CircleCI](https://dl.circleci.com/status-badge/img/gh/secretflow/scql/tree/main.svg?style=svg)](https://dl.circleci.com/status-badge/redirect/gh/secretflow/scql/tree/main)

Secure Collaborative Query Language (SCQL) is a system that translates SQL statements into Secure Multiparty Computation (SMC) primitives and executes them on a federation of database systems.

> **Note**: If you are looking for SCQL 1.0, please check the [1.x branch](https://github.com/secretflow/scql/tree/release/1.x).

![SCQL Workflow](./docs/imgs/scql_workflow.png)

## Documentation

- [Documentation in English](https://www.secretflow.org.cn/en/docs/scql)
- [中文文档](https://www.secretflow.org.cn/zh-CN/docs/scql/)

## Docker Image Release

- Official release docker image: [secretflow/scql](https://hub.docker.com/r/secretflow/scql/tags)
- We also have images at Alibaba Cloud: secretflow-registry.cn-hangzhou.cr.aliyuncs.com/secretflow/scql:[tag]

## Contribution Guidelines

If you would like to contribute to SCQL, please see the [Contribution guidelines](CONTRIBUTING.md).

This documentation also contains instructions for [build and testing](CONTRIBUTING.md#build)

## Hardware Requirements

The following requirements only apply to SCQLEngine.

- CPU
  - x86_64: minimum required AVX instruction set. For FourQ based PSI, the AVX2 instruction set is required.

## Disclaimer

Non-release versions of SCQL are prohibited to use in any production environment due to possible bugs, glitches, lack of functionality, security issues or other problems.

## Citing SCQL

If you think SCQL is helpful for your research or development, please consider citing our [paper](https://www.vldb.org/pvldb/vol17/p3987-fang.pdf):

```text
@article{scql,
  author       = {Wenjing Fang and
                  Shunde Cao and
                  Guojin Hua and
                  Junming Ma and
                  Yongqiang Yu and
                  Qunshan Huang and
                  Jun Feng and
                  Jin Tan and
                  Xiaopeng Zan and
                  Pu Duan and
                  Yang Yang and
                  Li Wang and
                  Ke Zhang and
                  Lei Wang},
  title        = {SecretFlow-SCQL: {A} Secure Collaborative Query pLatform},
  journal      = {Proc. VLDB Endow.},
  volume       = {17},
  number       = {12},
  pages        = {3987--4000},
  year         = {2024},
  url          = {https://www.vldb.org/pvldb/vol17/p3987-fang.pdf},
}
```

## Acknowledgments

- Thanks [TiDB](https://github.com/pingcap/tidb) for providing a powerful SQL parser and planner.


================================================
FILE: REPO_LAYOUT.md
================================================
# Repository Layout

- [api/](api/): SCQL protocol files.
- [examples/](examples/): SCQL examples.
  - [tutorial](examples/tutorial/): SCQL open core tutorial.
- [docs/](docs/): Documents of SCQL.
- [cmd/](cmd/): Main applications for SCQL.
  - [docgen/](cmd/docgen/): SCQL operators document generator.
- [pkg/](pkg/): SCQL library code.
  - [constant/](pkg/constant/): Common constant values.
  - [parser/](pkg/parser/): SCQL parser.
  - [types/](pkg/types/): SCQL data types.
  - [table/](pkg/table/): SCQL table info.
  - [sessionctx/](pkg/sessionctx/): SCQL logical plan context.
  - [util/](pkg/util/): SCQL utils.
  - [planner/](pkg/planner/): SCQL planner.
  - [interpreter/](pkg/interpreter/): SCQL interpreter.
    - [compiler/](pkg/interpreter/compiler/): SCQL compiler that translates SQL to execution graph.
    - [graph/](pkg/interpreter/graph/): Execution graph data structures and processing.
    - [operator/](pkg/interpreter/operator/): SCQL operators.
    - [sc/](pkg/interpreter/sc/): SCQL compiler Python bindings using gopy.
  - [executor/](pkg/executor/): DQL executor. It dispatches execution dag to SCQL engine.
- [engine/](engine/): SCQL execution engine, implemented in C++.
  - [exe/](engine/exe/): SCQL execution engine applications.
  - [services/](engine/services/): Engine RPC services.
  - [link/](engine/link/): MPI framework based on [YACL link](https://github.com/secretflow/yacl/tree/main/yacl/link).
  - [core/](engine/core/): Basic data structures used in engine.
  - [framework/](engine/framework/): Engine framework.
  - [operator/](engine/operator/): Oblivious operators.
  - [datasource/](engine/datasource/): SCQL data source adaptors/connectors.
  - [util/](engine/util/): Engine utilities.


================================================
FILE: SECURITY.md
================================================
# Security

If you believe you have found a security vulnerability in any SecretFlow repository that meets
[SecretFlow's definition of a security vulnerability](https://security.alipay.com/announcement.htm?id=1), please report it to us as described below.

## Reporting Security Issues

**Please do not report security vulnerabilities through public GitHub issues.**

Instead, please report them to the ANT GROUP SECURITY Response Center at [https://security.alipay.com/](https://security.alipay.com/).

If you prefer to submit without logging in, send email to [antsrc@alipay.com](mailto:antsrc@alipay.com).

You should receive a response within 48 hours. If for some reason you do not, please follow up via email to ensure we received your original message.
Additional information can be found at [https://security.alipay.com/](https://security.alipay.com/).

Please include the requested information listed below (as much as you can provide) to help us better understand the nature and scope of the possible issue:

* Type of issue (e.g. buffer overflow, SQL injection, cross-site scripting, etc.)
* Full paths of source file(s) related to the manifestation of the issue
* The location of the affected source code (tag/branch/commit or direct URL)
* Any special configuration required to reproduce the issue
* Step-by-step instructions to reproduce the issue
* Proof-of-concept or exploit code (if possible)
* Impact of the issue, including how an attacker might exploit the issue

This information will help us triage your report more quickly.

## Preferred Languages

We prefer all communications to be in Chinese or English.


================================================
FILE: api/BUILD.bazel
================================================
# Copyright 2023 Ant Group Co., Ltd.
#
# 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.

load("@rules_buf//buf:defs.bzl", "buf_lint_test")
load("@rules_cc//cc:defs.bzl", "cc_proto_library")
load("@rules_go//proto:def.bzl", "go_proto_library")
load("@rules_java//java:defs.bzl", "java_proto_library")
load("@rules_proto//proto:defs.bzl", "proto_library")

package(default_visibility = ["//visibility:public"])

proto_library(
    name = "core_proto",
    srcs = ["core.proto"],
    deps = [
        ":common_proto",
        ":status_proto",
    ],
)

proto_library(
    name = "status_code_proto",
    srcs = ["status_code.proto"],
)

proto_library(
    name = "engine_proto",
    srcs = ["engine.proto"],
    deps = [
        ":common_proto",
        ":core_proto",
        ":status_proto",
        ":subgraph_proto",
        "@com_google_protobuf//:empty_proto",
        "@spulib//libspu:spu_proto",
    ],
)

proto_library(
    name = "status_proto",
    srcs = ["status.proto"],
    deps = [
        "@com_google_protobuf//:any_proto",
    ],
)

proto_library(
    name = "common_proto",
    srcs = ["common.proto"],
    deps = [
        "@com_google_protobuf//:any_proto",
        "@com_google_protobuf//:timestamp_proto",
    ],
)

cc_proto_library(
    name = "common_cc_proto",
    deps = [":common_proto"],
)

cc_proto_library(
    name = "engine_cc_proto",
    deps = [":engine_proto"],
)

cc_proto_library(
    name = "core_cc_proto",
    deps = [":core_proto"],
)

cc_proto_library(
    name = "status_cc_proto",
    deps = [":status_code_proto"],
)

cc_proto_library(
    name = "interpreter_cc_proto",
    deps = [":interpreter_proto"],
)

proto_library(
    name = "subgraph_proto",
    srcs = [
        "subgraph.proto",
    ],
    deps = [":core_proto"],
)

proto_library(
    name = "interpreter_proto",
    srcs = ["interpreter.proto"],
    deps = [
        ":common_proto",
        ":core_proto",
        ":status_proto",
        ":subgraph_proto",
        "@com_google_protobuf//:timestamp_proto",
        "@spulib//libspu:spu_proto",
    ],
)

proto_library(
    name = "scql_task_proto",
    srcs = ["scql_task.proto"],
    deps = [
        ":common_proto",
        ":engine_proto",
        ":subgraph_proto",
        "@spulib//libspu:spu_proto",
    ],
)

cc_proto_library(
    name = "scql_task_cc_proto",
    deps = [":scql_task_proto"],
)

go_proto_library(
    name = "spu_go_proto",
    importpath = "github.com/secretflow/scql/pkg/proto-gen/spu",
    protos = ["@spulib//libspu:spu_proto"],
)

go_proto_library(
    name = "googleapis_go_proto",
    importpath = "google.golang.org/genproto/googleapis/api",
    protos = [
        "@googleapis//google/api:annotations_proto",
        "@googleapis//google/api:field_behavior_proto",
        "@googleapis//google/api:http_proto",
    ],
)

go_proto_library(
    name = "scql_go_proto",
    compilers = ["@rules_go//proto:go_grpc"],
    importpath = "github.com/secretflow/scql/pkg/proto-gen/scql",
    protos = [
        ":common_proto",
        ":core_proto",
        ":engine_proto",
        ":interpreter_proto",
        ":scql_task_proto",
        ":status_code_proto",
        ":status_proto",
        ":subgraph_proto",
    ],
    deps = [
        ":googleapis_go_proto",
        ":spu_go_proto",
    ],
)

# lint

buf_lint_test(
    name = "core_proto_lint",
    config = "buf.yaml",
    targets = [":core_proto"],
)

buf_lint_test(
    name = "status_code_proto_lint",
    config = "buf.yaml",
    targets = [":status_code_proto"],
)

buf_lint_test(
    name = "engine_proto_lint",
    config = "buf.yaml",
    targets = [":engine_proto"],
)

buf_lint_test(
    name = "status_proto_lint",
    config = "buf.yaml",
    targets = [":status_proto"],
)

buf_lint_test(
    name = "common_proto_lint",
    config = "buf.yaml",
    targets = [":common_proto"],
)

buf_lint_test(
    name = "subgraph_proto_lint",
    config = "buf.yaml",
    targets = [":subgraph_proto"],
)

buf_lint_test(
    name = "interpreter_proto_lint",
    config = "buf.yaml",
    targets = [":interpreter_proto"],
)


================================================
FILE: api/buf.yaml
================================================
version: v2
modules:
  - path: .
    name: buf.build/secretflow/scql-protos
deps:
  - buf.build/googleapis/googleapis
  - buf.build/protocolbuffers/wellknowntypes
lint:
  use:
    - DEFAULT
    - PACKAGE_DIRECTORY_MATCH
    - COMMENTS
    - UNARY_RPC
  except:
    # Allow direct resource returns for Create/Get operations following Google AIP patterns
    - RPC_RESPONSE_STANDARD_NAME
    - RPC_REQUEST_RESPONSE_UNIQUE
  ignore_only:
    # You can ignore specific files or rules if needed
    # - path/to/file.proto
breaking:
  use:
    - FILE


================================================
FILE: api/common.proto
================================================
// Copyright 2023 Ant Group Co., Ltd.
//
// 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.
//

syntax = "proto3";

package scql.pb;

import "google/protobuf/any.proto";
import "google/protobuf/timestamp.proto";

option go_package = "proto-gen/scql";
option java_package = "org.secretflow.scql";

// RequestHeader carries the user custom headers.
message RequestHeader {
  // Custom headers used to record custom information.
  map<string, string> custom_headers = 1;
}

message DebugOptions {
  bool enable_psi_detail_log = 1;
}

// (-- TODO: move SQLWarning to a proper place --)
message SQLWarning {
  // Description of the warning
  string reason = 1;
}

// IOStats contains input/output statistics for a job, including bytes sent and
// received, as well as the number of send and receive actions performed.
message IOStats {
  uint64 send_bytes = 1;
  uint64 recv_bytes = 2;
  uint64 send_actions = 3;
  uint64 recv_actions = 4;
}

// StageInfo provides information about an individual stage within a running
// job.
message StageInfo {
  // The name of the stage.
  string name = 1;
  // A brief summary describing the stage
  string summary = 2;
  // Stage start time
  google.protobuf.Timestamp start_time = 3;
  // Personalized details that may have different structures depending on the
  // stage type.
  google.protobuf.Any details = 4;
}

// JobProgress provides detailed information about the progress of a running
// job.
message JobProgress {
  // Job start time
  google.protobuf.Timestamp start_time = 1;
  // The total number of stages planned for the job.
  int32 stages_count = 2;
  // The number of stages that have been executed so far.
  int32 executed_stages = 3;
  IOStats io_stats = 4;
  // A list of currently running stages, providing insight into which parts of
  // the job are active.
  repeated StageInfo running_stages = 5;
}

enum JobState {
  JOB_STATE_UNSPECIFIED = 0;
  JOB_INITIALIZED = 1;
  JOB_RUNNING = 2;
  JOB_SUCCEEDED = 3;
  JOB_FAILED = 4;
  JOB_CANCELED = 5;
}

message LinkConfig {
  int64 link_recv_timeout_sec = 1;
  int64 link_throttle_window_size = 2;
  int64 link_chunked_send_parallel_size = 3;
  int64 http_max_payload_size = 4;
}

enum PsiAlgorithmType {
  // auto means choosing psi type by engine
  AUTO = 0;
  ECDH = 1;
  OPRF = 2;
  RR22 = 3;
}

enum Rr22Mode {
  UNDEFINED = 0;
  LOW_MODE = 1;
  FAST_MODE = 2;
}

message PsiConfig {
  int32 psi_curve_type = 1;
  PsiAlgorithmType psi_type = 2;
  // activated when psi_type is rr22
  Rr22Mode rr22_mode = 3;
}

message LogConfig {
  bool enable_session_logger_separation = 1;
}

message Placeholder {
  // placeholder name
  string name = 1;
  // placeholder name, e.g. string, int64, float
  string data_type = 2;
}

message Placeholders {
  repeated Placeholder placeholders = 1;
}

message Variable {
  string name = 1;
  string string_data = 2;
  int64 int64_data = 3;
  float float_data = 4;
  bool bool_data = 5;
}


================================================
FILE: api/core.proto
================================================
// Copyright 2023 Ant Group Co., Ltd.
//
// 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.
//

syntax = "proto3";

package scql.pb;

import "api/common.proto";
import "api/status.proto";

option go_package = "proto-gen/scql";
option java_package = "org.secretflow.scql";

// Defines a tensor shape. A dimension can be either an integer value
// or a symbolic variable. A symbolic variable represents an unknown
// dimension.
message TensorShape {
  message Dimension {
    oneof value {
      int64 dim_value = 1;
      string dim_param = 2;  // shape is unknown.
    }
  }
  repeated Dimension dim = 1;
}

enum PrimitiveDataType {
  PrimitiveDataType_UNDEFINED = 0;

  // Numeric types
  INT8 = 1;     // the 8-bit signed integer type
  INT16 = 2;    // the 16-bit signed integer type
  INT32 = 3;    // the 32-bit signed integer type
  INT64 = 4;    // the 64-bit signed integer type
  FLOAT32 = 5;  // the 32-bit binary floating point type
  FLOAT64 = 6;  // the 64-bit binary floating point type

  // Other types
  BOOL = 7;
  STRING = 8;
  // DATETIME and TIMESTAMP
  DATETIME = 9;    // https://dev.mysql.com/doc/refman/8.0/en/datetime.html
  TIMESTAMP = 10;  // seconds since '1970-01-01 00:00:00' UTC
  DECIMAL = 11;
}

// Tensor options.
enum TensorOptions {
  // A tensor with data.
  VALUE = 0;
  // A tensor with reference (URI).
  REFERENCE = 1;
  // A tensor variable (declaration).
  VARIABLE = 2;
}

enum TensorStatus {
  // Unknown.
  TENSORSTATUS_UNKNOWN = 0;

  // Private.
  TENSORSTATUS_PRIVATE = 1;

  // Secret, usually in the form of secret sharing.
  TENSORSTATUS_SECRET = 2;

  // Ciphertext, usually in the form of homomorphic encryption ciphertext.
  TENSORSTATUS_CIPHER = 3;

  // Public.
  TENSORSTATUS_PUBLIC = 4;
}

message TensorAnnotation {
  TensorStatus status = 1;
}

// A tensor data representation.
message Tensor {
  // Tensor name.
  string name = 1;

  // Tensor shape.
  // In SCQL cases, it's normally [M] (a vector with M elements).
  TensorShape shape = 2;

  // Tensor element type.
  PrimitiveDataType elem_type = 3;
  // used by decimal type
  int32 scale = 14;
  int32 width = 15;
  // Tensor options.
  TensorOptions option = 4;

  // Tensor annotation carries physical status information.
  // It MUST be there if the <option> is "Reference"
  TensorAnnotation annotation = 5;

  // tensor content

  // For int8, int16, int32 data types
  repeated int32 int32_data = 6 [packed = true];
  // For int64 and timestamp data types
  repeated int64 int64_data = 7 [packed = true];
  // For float32 data type
  repeated float float_data = 8 [packed = true];
  // For float64 data type
  repeated double double_data = 9 [packed = true];
  // For bool data type
  repeated bool bool_data = 10 [packed = true];
  // For string and datetime and decimal data types
  repeated string string_data = 11;
  // validity mask for data(int32_data/int64_data/...), size can be zero(all
  // data valid) or the same as data, where item false means NULL, true means
  // valid value
  repeated bool data_validity = 13 [packed = true];
  // Tensor reference nums, internally used to delete tensor immediately
  int32 ref_num = 12;
}

// Attribute value, it may be a tensor.
message AttributeValue {
  oneof value {
    Tensor t = 1;

    // More may be added later, say, Map, Tuple, etc.
  }
}

message TensorList {
  repeated Tensor tensors = 1;
}

// An execution node
message ExecNode {
  // Node name, should be unique in an execution plan,
  // its format may be like "${name}.${id}"
  string node_name = 1;

  // Operator type that this node refers to.
  string op_type = 2;

  // Input arguments.
  map<string, TensorList> inputs = 3;

  // Output arguments.
  map<string, TensorList> outputs = 4;

  // Static attributes may be used in this node.
  // It's used to replace the default value defined
  // in the operator definition if needed.
  map<string, AttributeValue> attributes = 5;
}

message FormalAttribute {
  string name = 1;

  // A complete attribute definition string.
  string definition = 2;
}

// Formal parameter options.
enum FormalParameterOptions {
  // Undefined.
  FORMALPARAMETEROPTIONS_UNDEFINED = 0;

  // This is a single formal parameter.
  FORMALPARAMETEROPTIONS_SINGLE = 1;

  // This is an optional formal parameter.
  FORMALPARAMETEROPTIONS_OPTIONAL = 2;

  // This is a variadic formal parameter.
  FORMALPARAMETEROPTIONS_VARIADIC = 3;
}

// Formal parameter representation of a SCQL operator.
// It normally includes formal parameter name, type, and some annotations.
message FormalParameter {
  string param_name = 1;

  // Formal parameter option.
  FormalParameterOptions option = 2;

  // Formal parameter shape information in the case of "tensor".
  // In the case of scql, the tensor is actually a vector.
  TensorShape param_shape = 3;

  // A complete parameter definition string.
  string definition = 4;

  // Name of parameter status constraint(template name), e.g. "T" for template
  // name. It's like the `T` in `template<class T> ...` for C++. The parameter
  // with the same T should of the same tensor status.
  string parameter_status_constraint_name = 5;
}

// TensorStatus list
message TensorStatusList {
  // TensorStatus list.
  repeated TensorStatus status = 1;
}

// An SCQL operator definition representation.
message OperatorDef {
  // Operator name.
  string name = 1;

  // Operator input formal parameters.
  repeated FormalParameter input_params = 2;

  // Operator output formal parameters.
  // For SCQL case, there may be only one output.
  repeated FormalParameter output_params = 3;

  // Operator attribute parameters.
  repeated FormalAttribute attribute_params = 4;

  // Default attribute values needed when running the operator.
  // The default values may be replaced when creating an execution plan
  // from a SCQL query.
  map<string, AttributeValue> default_attribute_values = 5;

  // A complete operator definition string.
  string definition = 6;

  // Map of key for parameter_status_constraint_name, value for TensorStatusList
  // e.g.: {"T": TensorStatusList{status: [TENSORSTATUS_PRIVATE]}}
  map<string, TensorStatusList> param_status_constraints = 7;
}

// TODO: move PartyId to a proper place.
message PartyId {
  string code = 1;  // party code
}

// QueryResult represents the result of an executed SQL query.
message QueryResult {
  int64 affected_rows = 1;
  repeated SQLWarning warnings = 2;
  double cost_time_s = 3;
  // Output columns are used to store the result datas
  repeated Tensor out_columns = 1000;
}

// QueryResponse represents the response for a query execution.
message QueryResponse {
  Status status = 1;
  QueryResult result = 2;
}


================================================
FILE: api/engine.proto
================================================
// Copyright 2023 Ant Group Co., Ltd.
//
// 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.
//

syntax = "proto3";

package scql.pb;

import "api/common.proto";
import "api/core.proto";
import "api/status.proto";
import "api/subgraph.proto";
import "google/protobuf/empty.proto";
import "libspu/spu.proto";

option cc_generic_services = true;
option go_package = "proto-gen/scql";

service SCQLEngineService {
  // Run the whole execution plan
  rpc RunExecutionPlan(RunExecutionPlanRequest)
      returns (RunExecutionPlanResponse);

  // Query Job Status
  rpc QueryJobStatus(QueryJobStatusRequest) returns (QueryJobStatusResponse);

  // Stop Job
  rpc StopJob(StopJobRequest) returns (Status);
}

message StopJobRequest {
  string job_id = 1;
  // job stop reason, it maybe
  // - "Finish". Job ended normally.
  // - "Timeout". Job timeout.
  // - "Canceled". Job canceled by client, maybe triggered by CTRL+C
  // - "Error". Exception caught when running.
  // - "Killed". Killed by client.
  // - or something else.
  string reason = 2;
}

// A message carries all job session-level (execution plan level) information.
message JobStartParams {
  message Party {
    // party code
    string code = 1;
    // party name
    string name = 2;
    // party host
    string host = 3;
    // party rank
    int32 rank = 4;

    // base64 encoded version of the DER encoded public key
    //
    // Example:
    // # 1. generate private key
    // $ openssl genpkey -algorithm ed25519 -out ed25519key.pem
    // # 2. generate public key based on above private key
    // $ openssl pkey -in ed25519key.pem -pubout
    //
    // # its output like below:
    //
    // -----BEGIN PUBLIC KEY-----
    // BASE64 ENCODED DATA
    // -----END PUBLIC KEY-----
    //
    // the field `public_key` should be the string between header "-----BEGIN
    // PUBLIC KEY-----" and footer "-----END PUBLIC KEY-----"
    string public_key = 5;
  }

  // This party code.
  // It may be used to get this party information from <parties> below.
  string party_code = 1;

  // All parties that would jointly complete an execution plan.
  repeated Party parties = 2;

  // The job id
  string job_id = 3;

  // The spu runtime configuration.
  spu.pb.RuntimeConfig spu_runtime_cfg = 4;

  // The query job time zone, only support time offset, like: '+08:00'
  string time_zone = 5;

  LinkConfig link_cfg = 6;
  PsiConfig psi_cfg = 7;
  LogConfig log_cfg = 8;
}

message GraphChecksum {
  bool check_graph_checksum = 1;
  // map from rank to checksum
  // It could be used to verify and ensure that engines execute the same
  // graph.
  map<string, string> sub_graph_checksums = 2;
  string whole_graph_checksum = 3;
}

message RunExecutionPlanRequest {
  JobStartParams job_params = 1;

  SubGraph graph = 2;
  GraphChecksum graph_checksum = 3;

  // Whether the whole execution plan on the engine should be executed
  // synchronously or asynchronously. By default, the execution plan is executed
  // synchronously.
  bool async = 4;

  // Callback url, e.g.: "http://alice.com:8080/path/to/callback".
  string callback_url = 5;
  DebugOptions debug_opts = 6;
}

message RunExecutionPlanResponse {
  Status status = 1;
  // Output columns used to store result datas.
  repeated Tensor out_columns = 2;
  string job_id = 3;
  // Code of party which finished the execution plan.
  string party_code = 4;
  // The number of rows affected by a select into, update, insert, or delete.
  int64 num_rows_affected = 5;
}

message QueryJobStatusRequest {
  string job_id = 1;
}

message QueryJobStatusResponse {
  Status status = 1;
  JobState job_state = 2;

  JobProgress progress = 3;
}

// EngineResultCallback
service EngineResultCallback {
  // Engine report the plan result to driver(for example, broker)
  rpc Report(ReportRequest) returns (google.protobuf.Empty);
}

// After finishing running an execution plan, the Engine sends a ReportRequest
// to result callback server (for example, broker) to return the results.
message ReportRequest {
  // Status including whether the plan run was handled successfully,
  // if not, error message and some more information included.
  Status status = 1;
  // Output columns.
  repeated Tensor out_columns = 2;
  // The job_id that this execution plan belongs to.
  string job_id = 3;
  // Code of party which finished the plan run.
  string party_code = 4;
  // The number of rows affected by a select into, update, insert, or delete.
  int64 num_rows_affected = 5;
}

message StreamingOptions {
  int64 streaming_row_num_threshold = 1;
  int64 batch_row_num = 2;
}

message PsiOptions {
  repeated int64 psi_curve_types = 1;
  Rr22Mode rr22_mode = 2;
}

message NegotiationOptions {
  StreamingOptions streaming_options = 1;
  PsiOptions psi_options = 2;
}


================================================
FILE: api/generate_proto.sh
================================================
#!/bin/bash
#
# Copyright 2023 Ant Group Co., Ltd.
#
# 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.
#
set -e
bazelisk build --remote_cache="" //api:scql_go_proto //api:spu_go_proto //api/v1alpha1:compiler_go_proto
mkdir -p pkg/proto-gen/scql
mkdir -p pkg/proto-gen/scql/v1alpha1
proto_gen_package=github.com/secretflow/scql/pkg/proto-gen
# copy files execpt spu.pb.go
ls bazel-bin/api/scql_go_proto_/${proto_gen_package}/scql/ | grep -v spu.* | xargs -I {} cp -r bazel-bin/api/scql_go_proto_/${proto_gen_package}/scql/{} pkg/proto-gen/scql
cp -r bazel-bin/api/spu_go_proto_/${proto_gen_package}/spu/. pkg/proto-gen/spu
cp -r bazel-bin/api/v1alpha1/compiler_go_proto_/${proto_gen_package}/scql/v1alpha1/. pkg/proto-gen/scql/v1alpha1
chmod -R -x+X pkg/proto-gen

# generate openapi file for broker.proto
trap "rm -rf libspu google" EXIT
# note: temporary copy spu.proto to avoid external dependency
# symlink for "bazel-<workspace-name>"
BAZEL_EXEC_ROOT=bazel-$(basename $(pwd))
mkdir -p libspu
cp -f ${BAZEL_EXEC_ROOT}/external/spulib~/libspu/spu.proto libspu/spu.proto
# note: protoc need google api
mkdir -p google/api
cp -f ${BAZEL_EXEC_ROOT}/external/googleapis~/google/api/*.proto google/api


================================================
FILE: api/interpreter.proto
================================================
// Copyright 2023 Ant Group Co., Ltd.
//
// 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.
//

syntax = "proto3";

package scql.pb;

import "api/common.proto";
import "api/core.proto";
import "api/status.proto";
import "api/subgraph.proto";
import "google/protobuf/timestamp.proto";
import "libspu/spu.proto";

option go_package = "proto-gen/scql";

message CompiledPlan {
  // schema of query result
  TableSchema schema = 1;
  Warning warning = 2;
  spu.pb.RuntimeConfig spu_runtime_conf = 3;
  // participants in execution graph.
  // The position order matters, the parties[0]'s rank is 0.
  repeated PartyId parties = 4;
  map<string, SubGraph> sub_graphs = 5;
  string whole_graph_checksum = 6;
  // TODO: Add field to specify the party who report final query result.
  ExplainInfo explain = 1000;
}

message Warning {
  // If the value is true, it means that the results may be affected by the
  // group threshold.
  bool may_affected_by_group_threshold = 1;
}

message ExplainInfo {
  // execution graph in dot format.
  // It has value only when `dump_exe_graph` is true in request compile options.
  string exe_graph_dot = 1;
}

// Metadata used to describe the schema (column names, types, comments)
// of result sets.
message TableSchema {
  repeated ColumnDesc columns = 1;
}

message ColumnDesc {
  string name = 1;
  string type = 2;
}

message OptimizerHints {
  // auto means choosing psi type by engine
  PsiAlgorithmType psi_algorithm_type = 1;
}

message CompileOptions {
  spu.pb.RuntimeConfig spu_conf = 1;
  SecurityCompromiseConfig security_compromise = 2;
  // dump execution graph in graphviz dot format
  bool dump_exe_graph = 3;
  OptimizerHints optimizer_hints = 4;
  // whether to run in streaming mode
  bool batched = 5;
}

message SecurityCompromiseConfig {
  bool reveal_group_mark = 1;
  uint64 group_by_threshold = 2;
  bool reveal_group_count = 3;
}

message Catalog {
  repeated TableEntry tables = 1;
}

message TableEntry {
  // table_name could be qualified name, like "db_name.table_name"
  string table_name = 1;

  message Column {
    string name = 1;
    string type = 2;
    int32 ordinal_position = 3;
  }
  repeated Column columns = 2;

  // NOTE: So far, the value of `is_view` is always False.
  // TODO: Add support to view.
  bool is_view = 3;
  // The value of `select_string` is the definition body of create view.
  // It valids only when is_view is True.
  string select_string = 4;

  // The following fields means when `is_view` is false.
  // `ref_table` refers the physical/real table name inside individual parties,
  // it could be empty if it's the same as table_name.
  // `ref_table` name could be qualified name.
  string ref_table = 5;
  // the db type of ref_table, maybe 'MySQL/PostgreSQL/csvdb/...'
  string db_type = 6;
  PartyId owner = 7;
  // The ref_table_uri is utilized to route the ref_table, like domain_data_id
  // in kuscia
  string ref_table_uri = 8;
}


================================================
FILE: api/scql_task.proto
================================================
// Copyright 2025 Ant Group Co., Ltd.
//
// 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.
//

syntax = "proto3";

package scql.pb;

import "api/common.proto";
import "api/engine.proto";
import "api/subgraph.proto";
import "libspu/spu.proto";

// Temporarily removed, may be reused in the future
// message ClusterDef {
//   string self_party = 1;
//   repeated string parties = 2;
//   map<string, ServiceMap> services = 3;
// }

// message ServiceMap {
//   map<string, Service> services = 1;
// }

// message Service {
//   string name = 1;
//   string host = 2;
//   string port = 3;
//   string scope = 4;
//   string protocol = 5;
// }

// SCQL job configuration containing execution plans and runtime settings
message ScqlConfig {
  // Table name to input file path mapping
  map<string, string> input_file_paths = 1;

  // Party code to execution graph mapping
  map<string, SubGraph> all_sub_graphs = 2;

  // Participating parties sorted by rank (starting from 0)
  repeated string parties = 3;

  // Runtime configurations
  spu.pb.RuntimeConfig spu_runtime_cfg = 10;  // SPU protocol settings
  string time_zone = 11;     // Time zone for temporal operations
  LinkConfig link_cfg = 12;  // Network communication settings
  PsiConfig psi_cfg = 13;    // Private set intersection config
  LogConfig log_cfg = 14;    // Logging configuration

  // Configuration used by the Kpad only
  string graph_checksum = 20;  // Checksum of the overall execution graph, used
                               // by other parties to verify graph consistency
}


================================================
FILE: api/status.proto
================================================
// Copyright 2023 Ant Group Co., Ltd.
//
// 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.
//

// Reference:
// https://github.com/grpc/grpc/blob/master/src/proto/grpc/status/status.proto

syntax = "proto3";

package scql.pb;

import "google/protobuf/any.proto";

option go_package = "proto-gen/scql";
option java_package = "org.secretflow.scql";

// The `Status` type defines a logical error model that is suitable for
// different programming environments, including REST APIs and RPC APIs. It is
// used by [gRPC](https://github.com/grpc). Each `Status` message contains
// three pieces of data: error code, error message, and error details.
//
// You can find out more about this error model and how to work with it in the
// [API Design Guide](https://cloud.google.com/apis/design/errors).
message Status {
  // The status code, see
  // [definition](https://github.com/secretflow/scql/blob/main/api/status_code.proto#L22)
  int32 code = 1;
  // Message for recording the error information.
  string message = 2;
  // A list of messages that carry the additional supplementary error details.
  repeated google.protobuf.Any details = 3;
}


================================================
FILE: api/status_code.proto
================================================
// Copyright 2023 Ant Group Co., Ltd.
//
// 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.
//

syntax = "proto3";

package scql.pb;

option go_package = "proto-gen/scql";

enum Code {
  // Not an error; returned on success
  OK = 0;

  // =====================
  // 100-199 Request Error
  // =====================

  // General bad request
  BAD_REQUEST = 100;
  // Failed to authenticate user credential
  UNAUTHENTICATED = 101;
  // Parsing SQL error, returned on invalid SQL
  SQL_PARSE_ERROR = 102;
  INVALID_ARGUMENT = 103;
  // Query result is not ready, please try again later
  NOT_READY = 104;

  // The user does not have permission to execute the DDL.
  // For example, the user try to drop other's table.
  DDL_PERMISSION_DENIED = 131;

  // General not found error
  NOT_FOUND = 140;
  // Driver session not found
  SESSION_NOT_FOUND = 141;

  // Query CCL check failed
  // NOTE: CCL (Column Control Language) has been removed from SCQL,
  // this error code is kept for backward compatibility only
  CCL_CHECK_FAILED = 160;

  // The P2P internal exchange error
  // Local storage info is not equal to storage info in other parties
  DATA_INCONSISTENCY = 170;
  // In P2P mode, the project status in different members conflicts and cannot
  // reach an agreement
  PROJECT_CONFLICT = 171;

  // =========================
  // 200-299 Dependence Error
  // =========================

  // Driver DB error
  STORAGE_ERROR = 201;

  // ==============================
  // 300-399 Server Internal Error
  // ==============================

  // UNKNOWN Server Internal Error
  INTERNAL = 300;

  // 320-339 executing execution graph error
  UNKNOWN_ENGINE_ERROR = 320;

  ENGINE_RUNSQL_ERROR = 332;

  // Feature not supported
  NOT_SUPPORTED = 340;
}


================================================
FILE: api/subgraph.proto
================================================
// Copyright 2023 Ant Group Co., Ltd.
//
// 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.
//

syntax = "proto3";

package scql.pb;

import "api/core.proto";

option go_package = "proto-gen/scql";

// SubGraph is the part of the whole execution graph seen
// from the perspective of the party.
// Each party could only see the ExecNode which it participates in.
message SubGraph {
  map<string, ExecNode> nodes = 1;
  SchedulingPolicy policy = 2;
  // checksum of the current sub graph
  // It could be used to verify and ensure that engines execute the same graph.
  string sub_graph_checksum = 3;
}

message SubDAG {
  message Job {
    int32 worker_id = 1;
    repeated string node_ids = 2;
  }

  repeated Job jobs = 1;
  // a barrier to sync among parties
  bool need_call_barrier_after_jobs = 2;
}

message SchedulingPolicy {
  int32 worker_num = 1;
  repeated Pipeline pipelines = 2;
}

message Pipeline {
  // maybe need batch size later
  bool batched = 1;
  repeated SubDAG subdags = 2;
  repeated Tensor inputs = 3;
  repeated Tensor outputs = 4;
}


================================================
FILE: api/v1/BUILD.bazel
================================================
# Copyright 2023 Ant Group Co., Ltd.
#
# 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.

load("@rules_go//proto:def.bzl", "go_proto_library")
load("@rules_proto//proto:defs.bzl", "proto_library")
load("@rules_proto_grpc_cpp//:defs.bzl", "cpp_proto_library")

package(default_visibility = ["//visibility:public"])

proto_library(
    name = "column_proto",
    srcs = ["column.proto"],
)

cpp_proto_library(
    name = "column_cpp_proto",
    protos = [":column_proto"],
)

go_proto_library(
    name = "column_go_proto",
    importpath = "github.com/secretflow/scql/proto-gen/api/v1",
    protos = [":column_proto"],
)


================================================
FILE: api/v1/column.proto
================================================
// Copyright 2024 Ant Group Co., Ltd.
//
// 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.
//

syntax = "proto3";

package scql.api.v1;

option go_package = "github.com/secretflow/scql/proto-gen/api/v1;scql";

// Column Data Type
// Column DataType values are subset of [data types in secretflow
// spec](https://github.com/secretflow/spec/blob/main/secretflow_spec/protos/secretflow_spec/v1/data.proto#L144)
enum DataType {
  DataType_UNSPECIFIED = 0;
  BOOL = 1;   // reserved datatype, not supported yet, use INT32 instead
  INT8 = 2;   // reserved datatype, not supported yet, use INT32 instead
  INT16 = 3;  // reserved datatype, not supported yet, use INT32 instead
  INT32 = 4;
  INT64 = 5;
  FLOAT32 = 6;
  FLOAT64 = 7;
  INT = 8;      // alias for INT64
  INTEGER = 9;  // alias for INT64
  FLOAT = 10;   // alias for FLOAT64
  DOUBLE = 11;  // alias for FLOAT64
  STRING = 12;
  STR = 13;  // alias for STRING
  DATETIME = 14;
  TIMESTAMP = 15;
}


================================================
FILE: api/v1/genproto.sh
================================================
#!/bin/bash
#
# Copyright 2023 Ant Group Co., Ltd.
#
# 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.
#

SCRIPT_DIR=$(
    cd "$(dirname "$0")"
    pwd
)

ROOT_DIR=$(
    cd ${SCRIPT_DIR}/../..
    pwd
)

cd ${ROOT_DIR}

protoc --go_out=${ROOT_DIR} --go_opt=module=github.com/secretflow/scql api/v1/column.proto


================================================
FILE: api/v1alpha1/BUILD.bazel
================================================
# Copyright 2025 Ant Group Co., Ltd.
#
# 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.

load("@rules_go//proto:def.bzl", "go_proto_library")
load("@rules_proto//proto:defs.bzl", "proto_library")
load("@rules_proto_grpc_cpp//:defs.bzl", "cpp_proto_library")

package(default_visibility = ["//visibility:public"])

proto_library(
    name = "compiler_proto",
    srcs = ["compiler.proto"],
    deps = [
        "//api:common_proto",
        "//api:core_proto",
        "//api:interpreter_proto",
        "//api:status_proto",
        "@com_google_protobuf//:any_proto",
        "@com_google_protobuf//:timestamp_proto",
        "@googleapis//google/api:annotations_proto",
        "@googleapis//google/api:field_behavior_proto",
        "@spulib//libspu:spu_proto",
    ],
)

cpp_proto_library(
    name = "compiler_cpp_proto",
    protos = [":compiler_proto"],
)

go_proto_library(
    name = "compiler_go_proto",
    compilers = ["@rules_go//proto:go_grpc"],
    importpath = "github.com/secretflow/scql/pkg/proto-gen/scql/v1alpha1",
    protos = [":compiler_proto"],
    deps = [
        "//api:googleapis_go_proto",
        "//api:scql_go_proto",
        "//api:spu_go_proto",
    ],
)


================================================
FILE: api/v1alpha1/compiler.proto
================================================
// Copyright 2025 Ant Group Co., Ltd.
//
// 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.
//

syntax = "proto3";

package scql.pb.v1alpha1;

import "api/common.proto";
import "api/core.proto";
import "api/interpreter.proto";
import "api/status.proto";
import "google/api/annotations.proto";
import "google/api/field_behavior.proto";
import "google/protobuf/any.proto";
import "google/protobuf/timestamp.proto";
import "libspu/spu.proto";

option go_package = "proto-gen/scql/v1alpha1";

service CompilerService {
  rpc CompileSQL(CompileSQLRequest) returns (CompileSQLResponse) {
    option (google.api.http) = {
      post: "/v1alpha1/compiler:compileSql"
      body: "*"
    };
  }
}

message CompileOptions {
  spu.pb.RuntimeConfig spu_conf = 1 [(google.api.field_behavior) = REQUIRED];
  // Whether to run in streaming mode
  bool batched = 2 [(google.api.field_behavior) = REQUIRED];
  // The PSI algorithm type to use
  // Default is auto, which means choosing PSI type by engine
  PsiAlgorithmType psi_algorithm_type = 3
      [(google.api.field_behavior) = OPTIONAL];
}

message GlobalSecurityRelaxation {
  // The number of elements in each group can be revealed
  bool reveal_group_count = 1 [(google.api.field_behavior) = OPTIONAL];
  // The group mark can be revealed
  bool reveal_group_mark = 2 [(google.api.field_behavior) = OPTIONAL];

  reserved 3 to 9;

  // Tensors can be revealed when used as join key
  // e.g.: "select ta.c1, ta.c2, tb.c2 from ta join tb on ta.c1 = tb.c1", here
  // ta.c1 and tb.c2 are join keys "after join", we get the "intersection of
  // ta.c1 and tb.c1", which can be revealed Note that only the intersection of
  // join keys(this is what "after join" means) can be revealed So in left outer
  // join, only the right join key can be revealed, because left join key will
  // contains values not exits in the intersection after join
  bool reveal_key_after_join = 10 [(google.api.field_behavior) = OPTIONAL];
  // Tensors can be revealed when used as filter mask
  // This security relaxation also requires the filter mask is result of a
  // comparison, e.g.: "select ta.c1 from ta join tb on ta.c2 = tb.c2 where
  // tb.c1 > ta.c3", here tb.c1 > ta.c3 is the comparison So result of tb.c1 >
  // ta.c3 can be revealed and used as a filter mask
  bool reveal_filter_mask = 11 [(google.api.field_behavior) = OPTIONAL];
}

message ColumnSecurityRelaxation {
  string database = 1 [(google.api.field_behavior) = REQUIRED];
  string table = 2 [(google.api.field_behavior) = REQUIRED];
  string column = 3 [(google.api.field_behavior) = REQUIRED];

  // Reserved for future use, and we can keep grouping the bool flags together
  reserved 4 to 9;

  // Corresponding tensor can be revealed when used as join key
  bool reveal_key_after_join = 10 [(google.api.field_behavior) = OPTIONAL];
  // Corresponding tensor can be revealed when used as filter mask
  bool reveal_filter_mask = 11 [(google.api.field_behavior) = OPTIONAL];
}

message ReverseInferenceConfig {
  // Whether to enable reverse inference
  bool enable_reverse_inference = 1 [(google.api.field_behavior) = REQUIRED];
}

// Security config that may affect the query result
message ResultSecurityConfig {
  // The threshold for group by operation
  // If the number of elements in a group is less than this threshold, the group
  // will be filtered
  int64 groupby_threshold = 1 [(google.api.field_behavior) = OPTIONAL];
}

message CompilerSecurityConfig {
  // Global security config
  GlobalSecurityRelaxation global_relaxation = 1
      [(google.api.field_behavior) = REQUIRED];
  // Security relaxation that attaches to columns
  // Not every tensor in the OperatorGraph has a ColumnSecurityRelaxation:
  // 1. Users do not need to specify ColumnSecurityRelaxation for every column
  // used in the query,
  //    the missing ones will just be default value false.
  // 2. Some tensors are in the OperatorGraph are the result of relation
  // operations or expressions,
  //    the security relaxation properties of these tensors can be inferred from
  //    their inputs' security relaxation properties.
  repeated ColumnSecurityRelaxation column_relaxation_list = 2
      [(google.api.field_behavior) = OPTIONAL];
  // Config related to reverse inference
  ReverseInferenceConfig reverse_inference_conf = 3
      [(google.api.field_behavior) = REQUIRED];
  // User-specified visibility of columns
  // Used to get the initial visibility of input tensors
  // If a column's visibility is not specified, the visible party of
  // corresponding tensor will be {column's owner} If specified, the visible
  // party of corresponding tensor will be the union of {column's owner} and the
  // specified visible parties
  repeated ColumnVisibility column_visibility_list = 4
      [(google.api.field_behavior) = OPTIONAL];
  // Config that may affect the query result
  ResultSecurityConfig result_security_conf = 5
      [(google.api.field_behavior) = OPTIONAL];
}

message ColumnVisibility {
  string database = 1 [(google.api.field_behavior) = REQUIRED];
  string table = 2 [(google.api.field_behavior) = REQUIRED];
  string column = 3 [(google.api.field_behavior) = REQUIRED];

  // The parties that the tensor need to be visible to
  repeated PartyId visible_parties = 4 [(google.api.field_behavior) = REQUIRED];
}

message AdditionalInfoSpec {
  // If true, OperatorGraph will be provided in the response
  bool need_operator_graph = 1 [(google.api.field_behavior) = OPTIONAL];
}

message CompileSQLRequest {
  // The SQL query to compile
  string query = 1 [(google.api.field_behavior) = REQUIRED];
  // The database name
  string db = 2 [(google.api.field_behavior) = OPTIONAL];
  // The issuer of the query
  PartyId issuer = 3 [(google.api.field_behavior) = REQUIRED];
  // The catalog of the database
  Catalog catalog = 4 [(google.api.field_behavior) = REQUIRED];
  // The compile options
  CompileOptions compile_opts = 5 [(google.api.field_behavior) = REQUIRED];
  // The issue time of the query, used for functions like now()
  google.protobuf.Timestamp issue_time = 6
      [(google.api.field_behavior) = REQUIRED];
  // Contains the config related to data security
  CompilerSecurityConfig security_config = 7
      [(google.api.field_behavior) = REQUIRED];
  // Placeholders used by rule
  Placeholders placeholders = 8 [(google.api.field_behavior) = OPTIONAL];
  // Variables used by rule
  repeated Variable variables = 9 [(google.api.field_behavior) = OPTIONAL];
  // Specifies what and how additional information are provided in the response
  AdditionalInfoSpec additional_info = 10
      [(google.api.field_behavior) = REQUIRED];
}

message CompileSQLResponse {
  Status status = 1 [(google.api.field_behavior) = REQUIRED];
  // The query execution plan required by the engine
  CompiledPlan execution_plan = 2 [(google.api.field_behavior) = REQUIRED];
  // OperatorGraph is provides when additional_info.need_operator_graph is true
  OperatorGraph operator_graph = 3 [(google.api.field_behavior) = OPTIONAL];
}

message OperatorGraph {
  // The version of the OperatorGraph, needed for compatibility check
  string version = 1 [(google.api.field_behavior) = REQUIRED];
  // The operator nodes in the OperatorGraph
  repeated Operator operators = 2 [(google.api.field_behavior) = REQUIRED];
  // The tensor metadata catalog for the entire plan
  repeated TensorMeta tensors = 3 [(google.api.field_behavior) = REQUIRED];
}

// Tensor metadata for the OperatorGraph
message TensorMeta {
  // Tensor id
  int32 id = 1 [(google.api.field_behavior) = REQUIRED];
  // Tensor name
  string name = 2 [(google.api.field_behavior) = REQUIRED];
  // The element type of the tensor
  PrimitiveDataType elem_type = 3 [(google.api.field_behavior) = REQUIRED];
}

// A list of tensor IDs for referencing tensors by ID
message TensorIdList {
  repeated int32 ids = 1 [(google.api.field_behavior) = REQUIRED];
}

// (-- api-linter: core::0123::resource-annotation=disabled
message Operator {
  // Operator id in the corresponding OperatorGraph
  string id = 1 [(google.api.field_behavior) = REQUIRED];
  // Operator name
  string name = 2 [(google.api.field_behavior) = REQUIRED];
  // Operator type, such as "Limit", "Filter", "GroupAgg"
  string type = 3 [(google.api.field_behavior) = REQUIRED];
  // Inputs of the operator, the key stands for the role of corresponding
  // tensors, such as "payload", "mask", "leftKeys" Each entry maps to a list of
  // tensor IDs that can be resolved from OperatorGraph.tensors
  map<string, TensorIdList> inputs = 4 [(google.api.field_behavior) = REQUIRED];
  // Outputs of the operator, the key stands for the role of corresponding
  // tensors, such as "rank", "leftOutputs" Each entry maps to a list of tensor
  // IDs that can be resolved from OperatorGraph.tensors
  map<string, TensorIdList> outputs = 5
      [(google.api.field_behavior) = REQUIRED];
  // Attributes of the operator
  map<string, google.protobuf.Any> attributes = 6
      [(google.api.field_behavior) = REQUIRED];
  // The kernel represents the concrete mechanism used to implement the
  // functionality of this Operator Each query has a deterministic OperatorGraph
  // structure. As long as the query remains unchanged, the types and
  // arrangement of Operators in the plan will remain constant. However, the
  // type of Kernel corresponding to each Operator may vary with changes in the
  // SecurityConfig.
  Kernel kernel = 7 [(google.api.field_behavior) = REQUIRED];
}

// (-- api-linter: core::0123::resource-annotation=disabled
message Kernel {
  // The name of the kernel
  // e.g. for GroupAgg, kernel name maybe "oblivious_group_agg",
  // "private_group_agg"
  string name = 1 [(google.api.field_behavior) = REQUIRED];
  // The cost of the kernel for optimization purposes
  // Note that comparing Cost values is only meaningful when the original
  // Operator is identical range: [0, 1]
  double cost = 2 [(google.api.field_behavior) = OPTIONAL];
}


================================================
FILE: bazel/BUILD.bazel
================================================
# Copyright 2023 Ant Group Co., Ltd.
#
# 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.


================================================
FILE: bazel/defs.bzl
================================================
# Copyright 2024 Ant Group Co., Ltd.
#
# 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.
load("//bazel:repositories.bzl", "scql_deps")

def _non_module_deps_impl(_module_ctx):
    scql_deps()

non_module_dependencies = module_extension(
    implementation = _non_module_deps_impl,
)


================================================
FILE: bazel/patches/BUILD.bazel
================================================
# Copyright 2024 Ant Group Co., Ltd.
#
# 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.


================================================
FILE: bazel/patches/grpc-plugin.patch
================================================
diff --git a/bazel/cc_grpc_library.bzl b/bazel/cc_grpc_library.bzl
index 55ea11cd53..8177bf864c 100644
--- a/bazel/cc_grpc_library.bzl
+++ b/bazel/cc_grpc_library.bzl
@@ -102,7 +102,7 @@ def cc_grpc_library(
         generate_cc(
             name = codegen_grpc_target,
             srcs = proto_targets,
-            plugin = "@com_github_grpc_grpc//src/compiler:grpc_cpp_plugin",
+            plugin = Label("//src/compiler:grpc_cpp_plugin"),
             well_known_protos = well_known_protos,
             generate_mocks = generate_mocks,
             **kwargs
@@ -114,6 +114,6 @@ def cc_grpc_library(
             hdrs = [":" + codegen_grpc_target],
             deps = deps +
                    extra_deps +
-                   ["@com_github_grpc_grpc//:grpc++_codegen_proto"],
+                   [Label("//:grpc++_codegen_proto")],
             **kwargs
         )

================================================
FILE: bazel/patches/protobuf-xla.patch
================================================
diff --git a/BUILD.bazel b/BUILD.bazel
index 301a04656..b4d953fd2 100644
--- a/BUILD.bazel
+++ b/BUILD.bazel
@@ -8,7 +8,7 @@ load("//bazel:java_proto_library.bzl", "java_proto_library")
 load("//bazel:proto_library.bzl", "proto_library")
 load("//bazel/toolchains:proto_lang_toolchain.bzl", "proto_lang_toolchain")
 load("//build_defs:cpp_opts.bzl", "COPTS", "LINK_OPTS")
-load(":protobuf.bzl", "internal_objc_proto_library", "internal_php_proto_library", "internal_py_proto_library")
+load(":protobuf.bzl", "adapt_proto_library", "internal_objc_proto_library", "internal_php_proto_library", "internal_py_proto_library")
 
 licenses(["notice"])
 
@@ -192,6 +192,25 @@ cc_library(
     visibility = ["//visibility:public"],
 )
 
+adapt_proto_library(
+    name = "cc_wkt_protos_genproto",
+    visibility = ["//visibility:public"],
+    deps = [
+        "//:any_proto",
+        "//:api_proto",
+        "//:compiler_plugin_proto",
+        "//:descriptor_proto",
+        "//:duration_proto",
+        "//:empty_proto",
+        "//:field_mask_proto",
+        "//:source_context_proto",
+        "//:struct_proto",
+        "//:timestamp_proto",
+        "//:type_proto",
+        "//:wrappers_proto",
+    ],
+)
+
 # Source protos that are typically part of the protobuf runtime.
 #
 # DEPRECATED: Prefer :well_known_type_protos for the Well-Known Types
diff --git a/protobuf.bzl b/protobuf.bzl
index 7db5146a0..a0e05d4d2 100644
--- a/protobuf.bzl
+++ b/protobuf.bzl
@@ -88,17 +88,17 @@ def _proto_gen_impl(ctx):
     if source_dir:
         has_sources = any([src.is_source for src in srcs])
         if has_sources:
-            import_flags += ["-I" + source_dir]
+            import_flags.append("-I" + source_dir)
     else:
-        import_flags += ["-I."]
+        import_flags.append("-I.")
 
     has_generated = any([not src.is_source for src in srcs])
     if has_generated:
-        import_flags += ["-I" + gen_dir]
+        import_flags.append("-I" + gen_dir)
 
     if ctx.attr.includes:
         for include in ctx.attr.includes:
-            import_flags += ["-I" + _GetPath(ctx, include)]
+            import_flags.append("-I" + _GetPath(ctx, include))
 
     import_flags = depset(direct = import_flags)
 
@@ -153,7 +153,7 @@ def _proto_gen_impl(ctx):
                 outs.extend(_RubyOuts([src.basename]))
 
             # Otherwise, rely on user-supplied outs.
-            args += [("--%s_out=" + path_tpl) % (lang, gen_dir)]
+            args.append(("--%s_out=" + path_tpl) % (lang, gen_dir))
 
         if ctx.attr.outs:
             outs.extend(ctx.attr.outs)
@@ -174,8 +174,8 @@ def _proto_gen_impl(ctx):
 
             if ctx.attr.plugin_options:
                 outdir = ",".join(ctx.attr.plugin_options) + ":" + outdir
-            args += [("--plugin=protoc-gen-%s=" + path_tpl) % (lang, plugin.path)]
-            args += ["--%s_out=%s" % (lang, outdir)]
+            args.append(("--plugin=protoc-gen-%s=" + path_tpl) % (lang, plugin.path))
+            args.append("--%s_out=%s" % (lang, outdir))
             tools.append(plugin)
 
         if not in_gen_dir:
@@ -765,3 +765,261 @@ def check_protobuf_required_bazel_version():
     copied filegroup. (Fixed in bazel 0.5.4)
     """
     versions.check(minimum_bazel_version = "0.5.4")
+
+def _CcHdrs(srcs, use_grpc_plugin = False):
+    ret = [s[:-len(".proto")] + ".pb.h" for s in srcs]
+    if use_grpc_plugin:
+        ret += [s[:-len(".proto")] + ".grpc.pb.h" for s in srcs]
+    return ret
+
+def _CcSrcs(srcs, use_grpc_plugin = False):
+    ret = [s[:-len(".proto")] + ".pb.cc" for s in srcs]
+    if use_grpc_plugin:
+        ret += [s[:-len(".proto")] + ".grpc.pb.cc" for s in srcs]
+    return ret
+
+def __proto_gen_impl(ctx):
+    """General implementation for generating protos"""
+    srcs = ctx.files.srcs
+    deps = []
+    deps += ctx.files.srcs
+    source_dir = _SourceDir(ctx)
+    gen_dir = _GenDir(ctx)
+    if source_dir:
+        import_flags = ["-I" + source_dir, "-I" + gen_dir]
+    else:
+        import_flags = ["-I."]
+
+    for dep in ctx.attr.deps:
+        import_flags += dep.proto.import_flags
+        deps += dep.proto.deps
+    import_flags = depset(import_flags).to_list()
+    deps = depset(deps).to_list()
+
+    args = []
+    if ctx.attr.gen_cc:
+        args.append("--cpp_out=" + gen_dir)
+    if ctx.attr.gen_py:
+        args.append("--python_out=" + gen_dir)
+
+    inputs = srcs + deps
+    tools = [ctx.executable.protoc]
+    if ctx.executable.plugin:
+        plugin = ctx.executable.plugin
+        lang = ctx.attr.plugin_language
+        if not lang and plugin.basename.startswith("protoc-gen-"):
+            lang = plugin.basename[len("protoc-gen-"):]
+        if not lang:
+            fail("cannot infer the target language of plugin", "plugin_language")
+
+        outdir = gen_dir
+        if ctx.attr.plugin_options:
+            outdir = ",".join(ctx.attr.plugin_options) + ":" + outdir
+        args.append("--plugin=protoc-gen-%s=%s" % (lang, plugin.path))
+        args.append("--%s_out=%s" % (lang, outdir))
+        tools.append(plugin)
+
+    if args:
+        ctx.actions.run(
+            inputs = inputs,
+            outputs = ctx.outputs.outs,
+            arguments = args + import_flags + [s.path for s in srcs],
+            executable = ctx.executable.protoc,
+            mnemonic = "ProtoCompile",
+            tools = tools,
+            use_default_shell_env = True,
+        )
+
+    return struct(
+        proto = struct(
+            srcs = srcs,
+            import_flags = import_flags,
+            deps = deps,
+        ),
+    )
+
+proto_gen = rule(
+    attrs = {
+        "srcs": attr.label_list(allow_files = True),
+        "deps": attr.label_list(providers = ["proto"]),
+        "includes": attr.string_list(),
+        "protoc": attr.label(
+            cfg = "exec",
+            executable = True,
+            allow_single_file = True,
+            mandatory = True,
+        ),
+        "plugin": attr.label(
+            cfg = "exec",
+            allow_files = True,
+            executable = True,
+        ),
+        "plugin_language": attr.string(),
+        "plugin_options": attr.string_list(),
+        "gen_cc": attr.bool(),
+        "gen_py": attr.bool(),
+        "outs": attr.output_list(),
+    },
+    implementation = __proto_gen_impl,
+)
+
+"""Generates codes from Protocol Buffers definitions.
+
+This rule helps you to implement Skylark macros specific to the target
+language. You should prefer more specific `cc_proto_library `,
+`py_proto_library` and others unless you are adding such wrapper macros.
+
+Args:
+  srcs: Protocol Buffers definition files (.proto) to run the protocol compiler
+    against.
+  deps: a list of dependency labels; must be other proto libraries.
+  includes: a list of include paths to .proto files.
+  protoc: the label of the protocol compiler to generate the sources.
+  plugin: the label of the protocol compiler plugin to be passed to the protocol
+    compiler.
+  plugin_language: the language of the generated sources
+  plugin_options: a list of options to be passed to the plugin
+  gen_cc: generates C++ sources in addition to the ones from the plugin.
+  gen_py: generates Python sources in addition to the ones from the plugin.
+  outs: a list of labels of the expected outputs from the protocol compiler.
+"""
+
+def cc_proto_library(
+        name,
+        srcs = [],
+        deps = [],
+        cc_libs = [],
+        include = None,
+        protoc = "@com_google_protobuf//:protoc",
+        internal_bootstrap_hack = False,
+        use_grpc_plugin = False,
+        default_runtime = "@com_google_protobuf//:protobuf",
+        **kwargs):
+    """Bazel rule to create a C++ protobuf library from proto source files
+
+    NOTE: the rule is only an internal workaround to generate protos. The
+    interface may change and the rule may be removed when bazel has introduced
+    the native rule.
+
+    Args:
+      name: the name of the cc_proto_library.
+      srcs: the .proto files of the cc_proto_library.
+      deps: a list of dependency labels; must be cc_proto_library.
+      cc_libs: a list of other cc_library targets depended by the generated
+          cc_library.
+      include: a string indicating the include path of the .proto files.
+      protoc: the label of the protocol compiler to generate the sources.
+      internal_bootstrap_hack: a flag indicating if the cc_proto_library is used only
+          for bootstrapping. When it is set to True, no files will be generated.
+          The rule will simply be a provider for .proto files, so that other
+          cc_proto_library can depend on it.
+      use_grpc_plugin: a flag to indicate whether to call the grpc C++ plugin
+          when processing the proto files.
+      default_runtime: the implicitly default runtime which will be depended on by
+          the generated cc_library target.
+      **kwargs: other keyword arguments that are passed to cc_library.
+
+    """
+
+    includes = []
+    if include != None:
+        includes = [include]
+
+    if internal_bootstrap_hack:
+        # For pre-checked-in generated files, we add the internal_bootstrap_hack
+        # which will skip the codegen action.
+        proto_gen(
+            name = name + "_genproto",
+            srcs = srcs,
+            deps = [s + "_genproto" for s in deps],
+            includes = includes,
+            protoc = protoc,
+            visibility = ["//visibility:public"],
+        )
+
+        # An empty cc_library to make rule dependency consistent.
+        native.cc_library(
+            name = name,
+            **kwargs
+        )
+        return
+
+    grpc_cpp_plugin = None
+    if use_grpc_plugin:
+        grpc_cpp_plugin = "//external:grpc_cpp_plugin"
+
+    gen_srcs = _CcSrcs(srcs, use_grpc_plugin)
+    gen_hdrs = _CcHdrs(srcs, use_grpc_plugin)
+    outs = gen_srcs + gen_hdrs
+
+    proto_gen(
+        name = name + "_genproto",
+        srcs = srcs,
+        deps = [s + "_genproto" for s in deps],
+        includes = includes,
+        protoc = protoc,
+        plugin = grpc_cpp_plugin,
+        plugin_language = "grpc",
+        gen_cc = 1,
+        outs = outs,
+        visibility = ["//visibility:public"],
+    )
+
+    if default_runtime and not default_runtime in cc_libs:
+        cc_libs = cc_libs + [default_runtime]
+    if use_grpc_plugin:
+        cc_libs = cc_libs + ["//external:grpc_lib"]
+
+    native.cc_library(
+        name = name,
+        srcs = gen_srcs,
+        hdrs = gen_hdrs,
+        deps = cc_libs + deps,
+        includes = includes,
+        alwayslink = 1,
+        **kwargs
+    )
+
+"""Generates codes from Protocol Buffers definitions.
+
+This rule helps you to implement Skylark macros specific to the target
+language. You should prefer more specific `cc_proto_library `,
+`py_proto_library` and others unless you are adding such wrapper macros.
+
+Args:
+  srcs: Protocol Buffers definition files (.proto) to run the protocol compiler
+    against.
+  deps: a list of dependency labels; must be other proto libraries.
+  includes: a list of include paths to .proto files.
+  protoc: the label of the protocol compiler to generate the sources.
+  plugin: the label of the protocol compiler plugin to be passed to the protocol
+    compiler.
+  plugin_language: the language of the generated sources
+  plugin_options: a list of options to be passed to the plugin
+  gen_cc: generates C++ sources in addition to the ones from the plugin.
+  gen_py: generates Python sources in addition to the ones from the plugin.
+  outs: a list of labels of the expected outputs from the protocol compiler.
+"""
+
+def _adapt_proto_library_impl(ctx):
+    deps = [dep[ProtoInfo] for dep in ctx.attr.deps]
+
+    srcs = [src for dep in deps for src in dep.direct_sources]
+    return struct(
+        proto = struct(
+            srcs = srcs,
+            import_flags = ["-I{}".format(path) for dep in deps for path in dep.transitive_proto_path.to_list()],
+            deps = srcs,
+        ),
+    )
+
+adapt_proto_library = rule(
+    implementation = _adapt_proto_library_impl,
+    attrs = {
+        "deps": attr.label_list(
+            mandatory = True,
+            providers = [ProtoInfo],
+        ),
+    },
+    doc = "Adapts `proto_library` from `@rules_proto` to be used with `{cc,py}_proto_library` from this file.",
+)


================================================
FILE: bazel/patches/rules_foreign_cc.patch
================================================
diff --git a/MODULE.bazel b/MODULE.bazel
index be3a727..6528ebe 100644
--- a/MODULE.bazel
+++ b/MODULE.bazel
@@ -26,7 +26,7 @@ use_repo(python, "python_3_12")
 tools = use_extension("@rules_foreign_cc//foreign_cc:extensions.bzl", "tools")
 use_repo(
     tools,
-    "cmake_3.31.7_toolchains",
+    "cmake_3.23.2_toolchains",
     "cmake_src",
     "gettext_runtime",
     "glib_dev",
@@ -41,7 +41,7 @@ use_repo(
 
 register_toolchains(
     "@rules_foreign_cc_framework_toolchains//:all",
-    "@cmake_3.31.7_toolchains//:all",
+    "@cmake_3.23.2_toolchains//:all",
     "@ninja_1.12.1_toolchains//:all",
     "@python_3_12//:all",
     "@rules_foreign_cc//toolchains:all",
diff --git a/foreign_cc/extensions.bzl b/foreign_cc/extensions.bzl
index a027279..5b84a87 100644
--- a/foreign_cc/extensions.bzl
+++ b/foreign_cc/extensions.bzl
@@ -3,7 +3,7 @@
 load("//foreign_cc:repositories.bzl", "rules_foreign_cc_dependencies")
 load("//toolchains:prebuilt_toolchains.bzl", "prebuilt_toolchains")
 
-_DEFAULT_CMAKE_VERSION = "3.31.7"
+_DEFAULT_CMAKE_VERSION = "3.23.2"
 _DEFAULT_NINJA_VERSION = "1.12.1"
 
 cmake_toolchain_version = tag_class(attrs = {
diff --git a/foreign_cc/repositories.bzl b/foreign_cc/repositories.bzl
index cc6266b..cc87f2a 100644
--- a/foreign_cc/repositories.bzl
+++ b/foreign_cc/repositories.bzl
@@ -9,7 +9,7 @@ load("//toolchains:toolchains.bzl", "built_toolchains", "prebuilt_toolchains", "
 def rules_foreign_cc_dependencies(
         native_tools_toolchains = [],
         register_default_tools = True,
-        cmake_version = "3.31.7",
+        cmake_version = "3.23.2",
         make_version = "4.4.1",
         ninja_version = "1.12.1",
         meson_version = "1.5.1",


================================================
FILE: bazel/repositories.bzl
================================================
# Copyright 2023 Ant Group Co., Ltd.
#
# 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.

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
load("//engine/bazel:engine_deps.bzl", "engine_deps")

def scql_deps():
    engine_deps()


================================================
FILE: cmd/docgen/main.go
================================================
// Copyright 2023 Ant Group Co., Ltd.
//
// 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.

package main

import (
	"fmt"
	"os"
	"path"
	"sort"
	"strings"
	"text/template"

	"github.com/secretflow/scql/pkg/interpreter/operator"
	proto "github.com/secretflow/scql/pkg/proto-gen/scql"
)

type OpDocFiller struct {
	Version  int
	AllOpDef []*proto.OperatorDef
}

func check(e error) {
	if e != nil {
		panic(e)
	}
}

func AttributeToString(attribute *proto.AttributeValue) string {
	t := attribute.GetT()
	switch t.ElemType {
	case proto.PrimitiveDataType_BOOL:
		if len(t.BoolData) == 1 {
			return fmt.Sprintf("%v", t.GetBoolData()[0])
		}
		return fmt.Sprintf("%v", t.GetBoolData())
	case proto.PrimitiveDataType_STRING:
		if len(t.StringData) == 1 {
			return t.GetStringData()[0]
		}
		return fmt.Sprintf("%v", t.GetStringData())
	case proto.PrimitiveDataType_FLOAT32:
		if len(t.FloatData) == 1 {
			return fmt.Sprintf("%v", t.GetFloatData()[0])
		}
		return fmt.Sprintf("%v", t.GetFloatData())
	case proto.PrimitiveDataType_FLOAT64:
		if len(t.DoubleData) == 1 {
			return fmt.Sprintf("%v", t.GetDoubleData()[0])
		}
		return fmt.Sprintf("%v", t.GetDoubleData())
	case proto.PrimitiveDataType_INT8, proto.PrimitiveDataType_INT16, proto.PrimitiveDataType_INT32:
		if len(t.Int32Data) == 1 {
			return fmt.Sprintf("%v", t.GetInt32Data()[0])
		}
		return fmt.Sprintf("%v", t.GetInt32Data())
	case proto.PrimitiveDataType_INT64:
		if len(t.Int64Data) == 1 {
			return fmt.Sprintf("%v", t.GetInt64Data()[0])
		}
		return fmt.Sprintf("%v", t.GetInt64Data())
	default:
		return "error: unsupported attribute type"
	}
}

func OptionToString(opt proto.FormalParameterOptions) string {
	switch opt {
	case proto.FormalParameterOptions_FORMALPARAMETEROPTIONS_SINGLE:
		return "single"
	case proto.FormalParameterOptions_FORMALPARAMETEROPTIONS_VARIADIC:
		return "variadic"
	case proto.FormalParameterOptions_FORMALPARAMETEROPTIONS_OPTIONAL:
		return "optional"
	default:
		return "undefined"
	}
}

func StatusToString(opt proto.TensorStatus) string {
	switch opt {
	case proto.TensorStatus_TENSORSTATUS_UNKNOWN:
		return "unknown"
	case proto.TensorStatus_TENSORSTATUS_PRIVATE:
		return "private"
	case proto.TensorStatus_TENSORSTATUS_SECRET:
		return "secret"
	case proto.TensorStatus_TENSORSTATUS_CIPHER:
		return "cipher"
	case proto.TensorStatus_TENSORSTATUS_PUBLIC:
		return "public"
	default:
		return "undefined"
	}
}

func StatusListToString(in *proto.TensorStatusList) string {
	var result []string
	for _, e := range in.Status {
		result = append(result, StatusToString(e))
	}
	return strings.Join(result, ",")
}

func main() {
	ops, version := operator.GetAllOpDef()
	sort.Slice(ops, func(i, j int) bool {
		return ops[i].GetName() < ops[j].GetName()
	})
	filler := OpDocFiller{
		AllOpDef: ops,
		Version:  version,
	}
	fileName := "cmd/docgen/scql_operators.md.tmpl"
	tmpl, err := template.New(path.Base(fileName)).Funcs(
		template.FuncMap{
			"attributeToString":  AttributeToString,
			"optionToString":     OptionToString,
			"statusToString":     StatusToString,
			"statusListToString": StatusListToString,
		}).ParseFiles(fileName)
	check(err)

	f, err := os.Create("docs/reference/operators.md")
	check(err)
	err = tmpl.Execute(f, filler)
	check(err)
}


================================================
FILE: cmd/docgen/scql_operators.md.tmpl
================================================
# SCQL Operators Specification

This is a specification (not a kernel library) of SCQL operators, including operator signatures and semantics.

## Op List

<!-- Autogenerated by docgen; don't manually edit -->
{{- /*gotype: github.com/secretflow/scql/cmd/docgen.OpDocFiller*/ -}}

{{- range $index, $op := .AllOpDef}}
{{- if gt $index 0}}
{{end}}
### `{{$op.Name}}`

{{$op.Definition}}

**Inputs:**
{{- if $op.InputParams}}
{{- range $param := $op.InputParams}}
1. `{{$param.ParamName}}`({{optionToString $param.Option}}, {{$param.ParameterStatusConstraintName}}): {{$param.Definition}}
{{- end}}
{{- else}}
No input parameter.
{{- end}}

**Outputs:**
{{- if $op.OutputParams}}
{{- range $param := $op.OutputParams}}
1. `{{$param.ParamName}}`({{optionToString $param.Option}}, {{$param.ParameterStatusConstraintName}}): {{$param.Definition}}
{{- end}}
{{- else}}
No output parameter.
{{- end}}

{{- if $op.AttributeParams}}

**Attributes:**
{{- range $attr := $op.AttributeParams}}
1. `{{$attr.Name}}`: {{$attr.Definition}}
{{- end}}

{{- end}}
{{- if $op.DefaultAttributeValues}}

**Default Attribute Values:**
{{- range $name, $attr := $op.DefaultAttributeValues}}
1. `{{$name}}`: {{attributeToString $attr}}
{{- end}}

{{- end}}

**TensorStatus(ShareType) Constraints:**
{{- range $name, $statusList := $op.ParamStatusConstraints}}
1. `{{$name}}`: {{statusListToString $statusList}}
{{- end }}


{{- end}}


================================================
FILE: docs/CONTRIBUTING.md
================================================
# Contributing docs | 文档贡献指南 <!-- omit from toc -->

- [tl;dr](#tldr)
- [Prerequisites](#prerequisites)
- [Setting up](#setting-up)
- [Building docs](#building-docs)
- [Previewing docs](#previewing-docs)
- [Translations](#translations)
  - [Updating translation files](#updating-translation-files)
  - [Translating](#translating)
  - [Previewing translated docs](#previewing-translated-docs)
- [Cleaning up](#cleaning-up)
- [Reporting issues](#reporting-issues)
- [前置条件](#前置条件)
- [环境准备](#环境准备)
- [构建文档](#构建文档)
- [预览文档](#预览文档)
- [更新翻译](#更新翻译)
  - [同步翻译文件](#同步翻译文件)
  - [进行翻译](#进行翻译)
  - [预览翻译](#预览翻译)
- [文件清理](#文件清理)
- [报告问题](#报告问题)

> [!TIP]
>
> Command line examples in this guide assume your working directory to be [docs/](./).

## tl;dr

```sh
python -m pip install -r requirements.txt
secretflow-doctools update-translations --lang zh_CN
secretflow-doctools build --lang en --lang zh_CN
secretflow-doctools preview
```

## Prerequisites

This project uses [Sphinx] to build documentation. You will need:

- [Python] >= 3.10

## Setting up

Run:

```sh
python -m venv .venv
source .venv/bin/activate
python -m pip install -r requirements.txt
```

This will:

- Create a new [virtual environment][venv] in a `.venv` directory
- Activate the virtual environment (so that dependencies are installed to the correct
  environment).
- Install the [required dependencies](./requirements.txt)

> [!TIP]
>
> This example uses Python's built-in [`venv`][venv] module. You are free to use other
> package managers such as [uv] or [mamba].

## Building docs

[`secretflow-doctools`] is a command-line utility for building docs for SecretFlow
projects.

To build docs, run:

```sh
secretflow-doctools build --lang en --lang zh_CN
```

This will build both the English (`en`) and the Simplified Chinese (`zh_CN`) versions of
the documentation.

You should be able to see the following output:

```log
SUCCESS  to preview, run: secretflow-doctools preview -c .
```

> [!TIP]
>
> If you are getting a "command not found" error, you might not have activated the
> correct environment by running `source .venv/bin/activate`. Please review
> [Setting up](#setting-up).

## Previewing docs

The utility features a documentation previewer. You will be able to visualize how your
changes will eventually appear on our [website].

To preview the docs that was built, run:

```sh
secretflow-doctools preview
```

This will start the server. You should be able to see the following output:

```
 * Running on http://127.0.0.1:5000
```

Navigate to <http://127.0.0.1:5000> on your browser (the port number may be different),
you should be able to see a page similar to the following:

<figure>
  <img src="imgs/CONTRIBUTING/preview-sitemap.png" alt="the sitemap page">
</figure>

Click on a version to see the preview. You should be able to see a page similar to the
following:

<figure>
  <img src="imgs/CONTRIBUTING/preview-content.png" alt="the content page">
</figure>

> [!TIP]
>
> You may leave the preview server running. When you run the build command again,
> refresh the page to see updated content.

## Translations

### Updating translation files

After updating source docs, you should also update the corresponding translation files.

> [!IMPORTANT]
>
> If your updates involve rewriting existing texts, you MUST update translation files,
> otherwise some translated paragraphs may fall back to showing the original text.

Run:

```sh
secretflow-doctools update-translations --lang zh_CN
# `--lang zh_CN` sets the target language to Chinese (i.e. you are translating into Chinese)
```

This will:

- Scan source text for changes
- Update the translation files under [locales/](locales/) such that they become in-sync
  again

If there are updates, you should be able to see output similar to the following, and see
changes in source control:

```
Update: locales/zh_CN/LC_MESSAGES/index.po +1, -0
...
SUCCESS  finished updating translation files
```

### Translating

This project uses [GNU gettext][gettext] to translate docs during build. Translation
files are under [locales/](locales/).

Paths to the [translation files (PO files)][gettext-po] mirror their source document
counterparts. For example:

|              |                                                                                                    |
| :----------- | :------------------------------------------------------------------------------------------------- |
| Source texts | [**topics/ccl/usage**.rst](topics/ccl/usage.rst)                                                   |
| Translations | [locales/zh_CN/LC_MESSAGES/**topics/ccl/usage**.po](locales/zh_CN/LC_MESSAGES/topics/ccl/usage.po) |

PO files have the following syntax:

```gettext
msgid "Hello, world!"
msgstr "你好,世界!"
```

`msgid` comes from source docs, which will be used to lookup translations during build,
and you should not modify them.

`msgstr` is the translation. Please update these.

> [!TIP]
>
> [Poedit] is a free and open-source graphical editor for gettext PO files and is highly
> recommended.
>
> <figure>
>   <img src="https://github.com/secretflow/doctools/raw/21e7d4d04f88c29fb68d9d668c6a74d43726eddf/tests/demo/media/poedit.png" alt="screenshot of Poedit">
> </figure>

> [!IMPORTANT]

- `msgstr` may contain inline markups, such as bolded text or links. Translations should
  retain such markups. You should ensure the markup syntax is consistent with the source
  document:

  ```diff
    msgid "This is a `link <https://example.org/>`_."
  - msgstr "这是一个 [链接](https://example.org/) 。"
  + msgstr "这是一个 `链接 <https://example.org/>`_ 。"
  ```

- You may notice a `fuzzy` label after
  [updating translation files](#updating-translation-files):

  ```diff
    #: ../../topics/ccl/usage.rst:9
  + #, fuzzy
  - msgid "What is SCQL CCL? Please read :doc:`/topics/ccl/intro`."
  + msgid "What is SCQL CCL? Please read :doc:`/topics/ccl/intro` first."
    msgstr "什么是 SCQL CCL?请参阅 :d
Download .txt
gitextract_kxn6szmx/

├── .bazeliskrc
├── .bazelrc
├── .circleci/
│   ├── config.yml
│   ├── coverage-config.yml
│   ├── diff-cover-config.yml
│   ├── full-unittest-config.yml
│   ├── lite-unittest-config.yml
│   └── path-filtering/
│       └── unittest.conf
├── .clang-format
├── .clang-tidy
├── .coveralls.yml
├── .devcontainer/
│   ├── Dockerfile
│   └── devcontainer.json
├── .github/
│   ├── CODEOWNERS
│   ├── ISSUE_TEMPLATE/
│   │   ├── Consulting_issue_template.yaml
│   │   └── Error_Issue_Template.yaml
│   └── workflows/
│       ├── black.yml
│       ├── buildifier.yml
│       ├── cla.yml
│       ├── clang-format-linter.yml
│       ├── codeql.yml
│       ├── dependency-review.yml
│       ├── docs-check.yml
│       ├── docs-publish.yml
│       ├── golangci-lint.yml
│       ├── govulncheck.yml
│       ├── license-check.yml
│       ├── oscp.yml
│       ├── scorecards.yml
│       ├── stale.yml
│       ├── trigger-ci-cov.yml
│       ├── trigger-ci-full-ut.yml
│       ├── trigger-ci-lite-ut.yml
│       ├── trigger-diff-coverage.yml
│       ├── whitespace-check.yml
│       └── yaml-linter.yml
├── .gitignore
├── .golangci.yml
├── .licenserc.yaml
├── .markdownlint.yaml
├── .pre-commit-config.yaml
├── .vscode/
│   ├── cspell.json
│   ├── extensions.json
│   └── settings.json
├── BUILD.bazel
├── CHANGELOG.md
├── CONTRIBUTING.md
├── LEGAL.md
├── LICENSE
├── MODULE.bazel
├── Makefile
├── README.md
├── REPO_LAYOUT.md
├── SECURITY.md
├── api/
│   ├── BUILD.bazel
│   ├── buf.yaml
│   ├── common.proto
│   ├── core.proto
│   ├── engine.proto
│   ├── generate_proto.sh
│   ├── interpreter.proto
│   ├── scql_task.proto
│   ├── status.proto
│   ├── status_code.proto
│   ├── subgraph.proto
│   ├── v1/
│   │   ├── BUILD.bazel
│   │   ├── column.proto
│   │   └── genproto.sh
│   └── v1alpha1/
│       ├── BUILD.bazel
│       └── compiler.proto
├── bazel/
│   ├── BUILD.bazel
│   ├── defs.bzl
│   ├── patches/
│   │   ├── BUILD.bazel
│   │   ├── grpc-plugin.patch
│   │   ├── protobuf-xla.patch
│   │   └── rules_foreign_cc.patch
│   └── repositories.bzl
├── cmd/
│   └── docgen/
│       ├── main.go
│       └── scql_operators.md.tmpl
├── docs/
│   ├── CONTRIBUTING.md
│   ├── Makefile
│   ├── _static/
│   │   ├── css/
│   │   │   └── custom.css
│   │   └── js/
│   │       └── custom.js
│   ├── conf.py
│   ├── index.rst
│   ├── intro/
│   │   ├── index.rst
│   │   └── opencore-quickstart.rst
│   ├── locales/
│   │   └── zh_CN/
│   │       └── LC_MESSAGES/
│   │           ├── index.po
│   │           ├── intro/
│   │           │   ├── index.po
│   │           │   └── opencore-quickstart.po
│   │           ├── reference/
│   │           │   ├── compiler-config.po
│   │           │   ├── engine-config.po
│   │           │   ├── implementation-status.po
│   │           │   ├── index.po
│   │           │   ├── lang/
│   │           │   │   ├── manual.po
│   │           │   │   └── mysql-compatibility.po
│   │           │   └── operators.po
│   │           └── topics/
│   │               ├── faq.po
│   │               ├── index.po
│   │               ├── security/
│   │               │   └── overview.po
│   │               └── system/
│   │                   └── intro.po
│   ├── reference/
│   │   ├── compiler-config.rst
│   │   ├── engine-config.rst
│   │   ├── implementation-status.rst
│   │   ├── index.rst
│   │   ├── lang/
│   │   │   ├── manual.rst
│   │   │   └── mysql-compatibility.rst
│   │   └── operators.md
│   ├── requirements.txt
│   └── topics/
│       ├── faq.rst
│       ├── index.rst
│       ├── security/
│       │   └── overview.rst
│       └── system/
│           └── intro.rst
├── engine/
│   ├── auth/
│   │   ├── BUILD.bazel
│   │   ├── authenticator.cc
│   │   ├── authenticator.h
│   │   ├── authenticator_test.cc
│   │   ├── authorized_profile.cc
│   │   ├── authorized_profile.h
│   │   └── authorized_profile.proto
│   ├── bazel/
│   │   ├── BUILD.bazel
│   │   ├── duckdb.BUILD
│   │   ├── engine_deps.bzl
│   │   ├── gperftools.BUILD
│   │   ├── mysql.BUILD
│   │   ├── patches/
│   │   │   ├── dataproxy.patch
│   │   │   ├── duckdb.patch
│   │   │   ├── mysql.patch
│   │   │   ├── poco.patch
│   │   │   └── psi.patch
│   │   ├── perfetto.BUILD
│   │   ├── poco.BUILD
│   │   ├── postgres.BUILD
│   │   ├── scql.bzl
│   │   └── sqlite3.BUILD
│   ├── core/
│   │   ├── BUILD.bazel
│   │   ├── arrow_helper.h
│   │   ├── primitive_builder.cc
│   │   ├── primitive_builder.h
│   │   ├── primitive_builder_test.cc
│   │   ├── string_tensor_builder.cc
│   │   ├── string_tensor_builder.h
│   │   ├── string_tensor_builder_test.cc
│   │   ├── tensor.cc
│   │   ├── tensor.h
│   │   ├── tensor_batch_reader.cc
│   │   ├── tensor_batch_reader.h
│   │   ├── tensor_batch_reader_test.cc
│   │   ├── tensor_builder.cc
│   │   ├── tensor_builder.h
│   │   ├── tensor_constructor.cc
│   │   ├── tensor_constructor.h
│   │   ├── tensor_constructor_test.cc
│   │   ├── tensor_slice.cc
│   │   ├── tensor_slice.h
│   │   ├── type.cc
│   │   └── type.h
│   ├── datasource/
│   │   ├── BUILD.bazel
│   │   ├── arrow_sql_adaptor.cc
│   │   ├── arrow_sql_adaptor.h
│   │   ├── arrow_sql_adaptor_factory.h
│   │   ├── arrow_sql_adaptor_test.cc
│   │   ├── csvdb_adaptor.cc
│   │   ├── csvdb_adaptor.h
│   │   ├── csvdb_adaptor_factory.cc
│   │   ├── csvdb_adaptor_factory.h
│   │   ├── csvdb_adaptor_test.cc
│   │   ├── csvdb_conf.proto
│   │   ├── dataproxy_conf.proto
│   │   ├── datasource.proto
│   │   ├── datasource_adaptor.cc
│   │   ├── datasource_adaptor.h
│   │   ├── datasource_adaptor_factory.h
│   │   ├── datasource_adaptor_mgr.cc
│   │   ├── datasource_adaptor_mgr.h
│   │   ├── dm_adaptor.cc
│   │   ├── dm_adaptor.h
│   │   ├── dm_adaptor_factory.cc
│   │   ├── dm_adaptor_factory.h
│   │   ├── dm_adaptor_kuscia_test.cc
│   │   ├── dp_adaptor.cc
│   │   ├── dp_adaptor.h
│   │   ├── dp_adaptor_factory.cc
│   │   ├── dp_adaptor_factory.h
│   │   ├── dp_adaptor_test.cc
│   │   ├── duckdb_wrapper.cc
│   │   ├── duckdb_wrapper.h
│   │   ├── duckdb_wrapper_test.cc
│   │   ├── embed_router.cc
│   │   ├── embed_router.h
│   │   ├── embed_router.proto
│   │   ├── embed_router_test.cc
│   │   ├── http_router.cc
│   │   ├── http_router.h
│   │   ├── http_router.proto
│   │   ├── kuscia_datamesh_router.cc
│   │   ├── kuscia_datamesh_router.h
│   │   ├── kuscia_datamesh_router_test.cc
│   │   ├── mock_router_readme.md
│   │   ├── mock_router_server.py
│   │   ├── odbc_adaptor.cc
│   │   ├── odbc_adaptor.h
│   │   ├── odbc_adaptor_factory.cc
│   │   ├── odbc_adaptor_factory.h
│   │   ├── odbc_adaptor_mysql_test.cc
│   │   ├── odbc_adaptor_sqlite_test.cc
│   │   ├── odbc_connector.cc
│   │   ├── odbc_connector.h
│   │   ├── requirements.txt
│   │   ├── router.h
│   │   └── run_odbc_adaptor_mysql_test.sh
│   ├── exe/
│   │   ├── BUILD.bazel
│   │   ├── flags.cc
│   │   ├── flags.h
│   │   ├── main.cc
│   │   └── version.h
│   ├── framework/
│   │   ├── BUILD.bazel
│   │   ├── exec.cc
│   │   ├── exec.h
│   │   ├── executor.cc
│   │   ├── executor.h
│   │   ├── operator.cc
│   │   ├── operator.h
│   │   ├── party_info.cc
│   │   ├── party_info.h
│   │   ├── party_info_test.cc
│   │   ├── registry.cc
│   │   ├── registry.h
│   │   ├── session.cc
│   │   ├── session.h
│   │   ├── session_manager.cc
│   │   ├── session_manager.h
│   │   ├── session_manager_test.cc
│   │   ├── tensor_table.cc
│   │   └── tensor_table.h
│   ├── link/
│   │   ├── BUILD.bazel
│   │   ├── channel_manager.cc
│   │   ├── channel_manager.h
│   │   ├── listener.cc
│   │   ├── listener.h
│   │   ├── listener_test.cc
│   │   ├── mux_link_factory.cc
│   │   ├── mux_link_factory.h
│   │   ├── mux_receiver.proto
│   │   ├── mux_receiver_service.cc
│   │   ├── mux_receiver_service.h
│   │   ├── mux_receiver_service_test.cc
│   │   ├── rpc_helper.cc
│   │   ├── rpc_helper.h
│   │   └── rpc_helper_test.cc
│   ├── operator/
│   │   ├── BUILD.bazel
│   │   ├── all_ops_register.cc
│   │   ├── all_ops_register.h
│   │   ├── all_ops_register_test.cc
│   │   ├── arithmetic.cc
│   │   ├── arithmetic.h
│   │   ├── arithmetic_test.cc
│   │   ├── arrow_func.cc
│   │   ├── arrow_func.h
│   │   ├── arrow_func_test.cc
│   │   ├── binary_base.cc
│   │   ├── binary_base.h
│   │   ├── binary_test.h
│   │   ├── broadcast_to.cc
│   │   ├── broadcast_to.h
│   │   ├── broadcast_to_test.cc
│   │   ├── bucket.cc
│   │   ├── bucket.h
│   │   ├── bucket_bench.cc
│   │   ├── bucket_test.cc
│   │   ├── case_when.cc
│   │   ├── case_when.h
│   │   ├── case_when_test.cc
│   │   ├── cast.cc
│   │   ├── cast.h
│   │   ├── cast_test.cc
│   │   ├── coalesce.cc
│   │   ├── coalesce.h
│   │   ├── coalesce_test.cc
│   │   ├── compare.cc
│   │   ├── compare.h
│   │   ├── compare_test.cc
│   │   ├── concat.cc
│   │   ├── concat.h
│   │   ├── concat_test.cc
│   │   ├── constant.cc
│   │   ├── constant.h
│   │   ├── constant_test.cc
│   │   ├── copy.cc
│   │   ├── copy.h
│   │   ├── copy_test.cc
│   │   ├── dump_file.cc
│   │   ├── dump_file.h
│   │   ├── dump_file_test.cc
│   │   ├── filter.cc
│   │   ├── filter.h
│   │   ├── filter_by_index.cc
│   │   ├── filter_by_index.h
│   │   ├── filter_by_index_test.cc
│   │   ├── filter_test.cc
│   │   ├── group.cc
│   │   ├── group.h
│   │   ├── group_agg.cc
│   │   ├── group_agg.h
│   │   ├── group_agg_test.cc
│   │   ├── group_secret_agg.cc
│   │   ├── group_secret_agg.h
│   │   ├── group_secret_agg_test.cc
│   │   ├── group_test.cc
│   │   ├── if.cc
│   │   ├── if.h
│   │   ├── if_null.cc
│   │   ├── if_null.h
│   │   ├── if_null_test.cc
│   │   ├── if_test.cc
│   │   ├── in.cc
│   │   ├── in.h
│   │   ├── in_test.cc
│   │   ├── insert_table.cc
│   │   ├── insert_table.h
│   │   ├── insert_table_mysql_pg_test.cc
│   │   ├── insert_table_test.cc
│   │   ├── is_null.cc
│   │   ├── is_null.h
│   │   ├── is_null_test.cc
│   │   ├── join.cc
│   │   ├── join.h
│   │   ├── join_test.cc
│   │   ├── limit.cc
│   │   ├── limit.h
│   │   ├── limit_test.cc
│   │   ├── logical.cc
│   │   ├── logical.h
│   │   ├── logical_test.cc
│   │   ├── make_private.cc
│   │   ├── make_private.h
│   │   ├── make_private_test.cc
│   │   ├── make_public.cc
│   │   ├── make_public.h
│   │   ├── make_public_test.cc
│   │   ├── make_share.cc
│   │   ├── make_share.h
│   │   ├── make_share_test.cc
│   │   ├── oblivious_group_agg.cc
│   │   ├── oblivious_group_agg.h
│   │   ├── oblivious_group_agg_test.cc
│   │   ├── oblivious_group_mark.cc
│   │   ├── oblivious_group_mark.h
│   │   ├── oblivious_group_mark_test.cc
│   │   ├── publish.cc
│   │   ├── publish.h
│   │   ├── publish_test.cc
│   │   ├── reduce.cc
│   │   ├── reduce.h
│   │   ├── reduce_test.cc
│   │   ├── replicate.cc
│   │   ├── replicate.h
│   │   ├── replicate_test.cc
│   │   ├── run_sql.cc
│   │   ├── run_sql.h
│   │   ├── run_sql_test.cc
│   │   ├── secret_join.cc
│   │   ├── secret_join.h
│   │   ├── secret_join_test.cc
│   │   ├── shape.cc
│   │   ├── shape.h
│   │   ├── shape_test.cc
│   │   ├── shuffle.cc
│   │   ├── shuffle.h
│   │   ├── shuffle_test.cc
│   │   ├── sort.cc
│   │   ├── sort.h
│   │   ├── sort_test.cc
│   │   ├── test_util.cc
│   │   ├── test_util.h
│   │   ├── trigonometric.cc
│   │   ├── trigonometric.h
│   │   ├── trigonometric_test.cc
│   │   ├── unary.cc
│   │   ├── unary.h
│   │   ├── unary_base.cc
│   │   ├── unary_base.h
│   │   ├── unary_test.cc
│   │   ├── unique.cc
│   │   ├── unique.h
│   │   ├── unique_test.cc
│   │   ├── window.cc
│   │   ├── window.h
│   │   └── window_test.cc
│   ├── services/
│   │   ├── BUILD.bazel
│   │   ├── engine_service_impl.cc
│   │   ├── engine_service_impl.h
│   │   ├── engine_service_impl_test.cc
│   │   ├── error_collector_service.proto
│   │   ├── error_collector_service_impl.cc
│   │   ├── error_collector_service_impl.h
│   │   ├── mock_report_service.proto
│   │   ├── pipeline.cc
│   │   ├── pipeline.h
│   │   ├── prometheus_service.proto
│   │   ├── prometheus_service_impl.cc
│   │   ├── prometheus_service_impl.h
│   │   ├── run_plan_core.cc
│   │   └── run_plan_core.h
│   └── util/
│       ├── BUILD.bazel
│       ├── communicate_helper.h
│       ├── concurrent_queue.h
│       ├── context_util.cc
│       ├── context_util.h
│       ├── copy_to_proto_vistor.h
│       ├── datamesh_helper.cc
│       ├── datamesh_helper.h
│       ├── datamesh_helper_test.cc
│       ├── disk/
│       │   ├── BUILD.bazel
│       │   ├── arrow_reader.cc
│       │   ├── arrow_reader.h
│       │   ├── arrow_writer.cc
│       │   ├── arrow_writer.h
│       │   ├── read_write_bench.cc
│       │   └── reader_writer_test.cc
│       ├── dp/
│       │   ├── BUILD.bazel
│       │   └── flight.proto
│       ├── filepath_helper.cc
│       ├── filepath_helper.h
│       ├── filepath_helper_test.cc
│       ├── kpad_task_helper.cc
│       ├── kpad_task_helper.h
│       ├── kpad_task_helper_test.cc
│       ├── logging.cc
│       ├── logging.h
│       ├── ndarray_to_arrow.cc
│       ├── ndarray_to_arrow.h
│       ├── prefix_sum.cc
│       ├── prefix_sum.h
│       ├── progress_util.h
│       ├── prometheus_monitor.cc
│       ├── prometheus_monitor.h
│       ├── psi/
│       │   ├── BUILD.bazel
│       │   ├── batch_provider.cc
│       │   ├── batch_provider.h
│       │   ├── batch_provider_test.cc
│       │   ├── cipher_intersection.cc
│       │   ├── cipher_intersection.h
│       │   ├── cipher_intersection_bench.cc
│       │   ├── cipher_intersection_test.cc
│       │   ├── common.cc
│       │   ├── common.h
│       │   ├── detail_logger.cc
│       │   ├── detail_logger.h
│       │   ├── ub_helper.cc
│       │   └── ub_helper.h
│       ├── spu_io.cc
│       ├── spu_io.h
│       ├── ssl_helper.cc
│       ├── ssl_helper.h
│       ├── ssl_helper_test.cc
│       ├── stringifier.cc
│       ├── stringifier.h
│       ├── stringifier_test.cc
│       ├── table_util.cc
│       ├── table_util.h
│       ├── tensor_util.cc
│       ├── tensor_util.h
│       ├── time_util.cc
│       ├── time_util.h
│       ├── trace_categories.cc
│       ├── trace_categories.h
│       ├── upload_info_helper.cc
│       ├── upload_info_helper.h
│       └── upload_info_helper_test.cc
├── examples/
│   ├── opencore-demo/
│   │   └── main.go
│   └── tutorial/
│       ├── .gitignore
│       ├── README.md
│       ├── docker/
│       │   ├── build.sh
│       │   └── scql-ubuntu.Dockerfile
│       ├── docker-compose.yml.template
│       ├── engine/
│       │   ├── alice/
│       │   │   └── conf/
│       │   │       └── gflags.conf.template
│       │   └── bob/
│       │       └── conf/
│       │           └── gflags.conf.template
│       ├── example_config.json
│       ├── mysql/
│       │   └── initdb/
│       │       ├── alice_init.sql
│       │       └── bob_init.sql
│       ├── project_bootstrap.sh
│       └── setup.sh
├── go.mod
├── go.sum
├── pkg/
│   ├── config/
│   │   └── tls_config.go
│   ├── constant/
│   │   └── constant.go
│   ├── executor/
│   │   ├── engine_client.go
│   │   ├── engine_client_test.go
│   │   ├── engine_stub.go
│   │   ├── engine_stub_mock.go
│   │   ├── engine_stub_test.go
│   │   ├── executor.go
│   │   └── executor_test.go
│   ├── expression/
│   │   ├── aggregation/
│   │   │   ├── aggregation.go
│   │   │   ├── base_func.go
│   │   │   ├── descriptor.go
│   │   │   ├── util.go
│   │   │   └── window_func.go
│   │   ├── builtin.go
│   │   ├── builtin_arithmetic.go
│   │   ├── builtin_cast.go
│   │   ├── builtin_compare.go
│   │   ├── builtin_control.go
│   │   ├── builtin_like.go
│   │   ├── builtin_math.go
│   │   ├── builtin_op.go
│   │   ├── builtin_other.go
│   │   ├── builtin_string.go
│   │   ├── builtin_time.go
│   │   ├── column.go
│   │   ├── constant.go
│   │   ├── errors.go
│   │   ├── expression.go
│   │   ├── expression_to_stmt.go
│   │   ├── function_traits.go
│   │   ├── helper.go
│   │   ├── rand.go
│   │   ├── scalar_function.go
│   │   ├── schema.go
│   │   ├── simple_rewriter.go
│   │   └── util.go
│   ├── infoschema/
│   │   ├── builder.go
│   │   ├── infoschema.go
│   │   ├── infoschema_test.go
│   │   └── table_schema.go
│   ├── interpreter/
│   │   ├── compiler/
│   │   │   ├── arrow_func_options.go
│   │   │   ├── codegen_pass.go
│   │   │   ├── column_security_relaxation.go
│   │   │   ├── column_security_relaxation_test.go
│   │   │   ├── common.go
│   │   │   ├── common_test.go
│   │   │   ├── compiler.go
│   │   │   ├── compiler_test.go
│   │   │   ├── constant.go
│   │   │   ├── data/
│   │   │   │   └── test_queries.json
│   │   │   ├── execution_graph_builder.go
│   │   │   ├── execution_graph_builder_ops.go
│   │   │   ├── execution_graph_builder_test.go
│   │   │   ├── execution_graph_pass.go
│   │   │   ├── inference.go
│   │   │   ├── inference_test.go
│   │   │   ├── kernel.go
│   │   │   ├── kernel_resolver.go
│   │   │   ├── kernel_resolver_test.go
│   │   │   ├── kernel_test.go
│   │   │   ├── logical_plan_pass.go
│   │   │   ├── operator.go
│   │   │   ├── operator_graph.go
│   │   │   ├── operator_graph_builder.go
│   │   │   ├── operator_graph_builder_test.go
│   │   │   ├── operator_graph_pass.go
│   │   │   ├── parser_pass.go
│   │   │   ├── reverse_inference.go
│   │   │   ├── reverse_inference_test.go
│   │   │   ├── security_relaxation_manager.go
│   │   │   ├── tensor_manager.go
│   │   │   ├── tensor_manager_test.go
│   │   │   ├── tensor_meta.go
│   │   │   ├── tensor_meta_manager.go
│   │   │   ├── tensor_meta_manager_test.go
│   │   │   ├── tensor_meta_test.go
│   │   │   ├── tensor_placement.go
│   │   │   ├── tensor_placement_test.go
│   │   │   ├── tensor_status_converter.go
│   │   │   ├── tensor_status_converter_test.go
│   │   │   ├── tensor_tracker.go
│   │   │   ├── tensor_tracker_test.go
│   │   │   ├── test_execution_graph_input.go
│   │   │   ├── update_column_security.go
│   │   │   ├── update_column_security_test.go
│   │   │   ├── util/
│   │   │   │   ├── priority_queue.go
│   │   │   │   └── priority_queue_test.go
│   │   │   ├── visibility_analysis_pass.go
│   │   │   ├── visibility_basic_inference.go
│   │   │   ├── visibility_basic_inference_test.go
│   │   │   ├── visibility_inference_with_relaxation.go
│   │   │   ├── visibility_registry.go
│   │   │   ├── visibility_registry_test.go
│   │   │   ├── visibility_solver.go
│   │   │   ├── visibility_solver_test.go
│   │   │   ├── visible_parties.go
│   │   │   └── visible_parties_test.go
│   │   ├── graph/
│   │   │   ├── attribute.go
│   │   │   ├── attribute_test.go
│   │   │   ├── constant.go
│   │   │   ├── data_type.go
│   │   │   ├── engine_info.go
│   │   │   ├── engine_info_test.go
│   │   │   ├── execution_node.go
│   │   │   ├── graph.go
│   │   │   ├── graph_mapper.go
│   │   │   ├── graph_mapper_test.go
│   │   │   ├── graph_optimizer.go
│   │   │   ├── graph_optimizer_test.go
│   │   │   ├── graph_partitioner.go
│   │   │   ├── graph_splitter.go
│   │   │   ├── graph_splitter_test.go
│   │   │   ├── graph_test.go
│   │   │   └── tensor.go
│   │   ├── operator/
│   │   │   ├── constant.go
│   │   │   ├── operator_checker.go
│   │   │   ├── operator_def.go
│   │   │   ├── operator_def_test.go
│   │   │   └── operator_registration.go
│   │   └── sc/
│   │       └── scql_compiler.go
│   ├── parser/
│   │   ├── .gitignore
│   │   ├── LICENSE
│   │   ├── Makefile
│   │   ├── README.md
│   │   ├── ast/
│   │   │   ├── advisor.go
│   │   │   ├── ast.go
│   │   │   ├── base.go
│   │   │   ├── ddl.go
│   │   │   ├── ddl_test.go
│   │   │   ├── dml.go
│   │   │   ├── dml_test.go
│   │   │   ├── expressions.go
│   │   │   ├── expressions_test.go
│   │   │   ├── flag.go
│   │   │   ├── flag_test.go
│   │   │   ├── format_test.go
│   │   │   ├── functions.go
│   │   │   ├── functions_test.go
│   │   │   ├── misc.go
│   │   │   ├── misc_test.go
│   │   │   ├── stats.go
│   │   │   ├── util.go
│   │   │   └── util_test.go
│   │   ├── auth/
│   │   │   ├── auth.go
│   │   │   └── auth_test.go
│   │   ├── bench_test.go
│   │   ├── charset/
│   │   │   ├── charset.go
│   │   │   ├── charset_test.go
│   │   │   └── encoding_table.go
│   │   ├── consistent_test.go
│   │   ├── digester.go
│   │   ├── digester_test.go
│   │   ├── export_test.go
│   │   ├── format/
│   │   │   ├── format.go
│   │   │   ├── format_dialect.go
│   │   │   └── format_test.go
│   │   ├── goyacc/
│   │   │   ├── format_yacc.go
│   │   │   └── main.go
│   │   ├── hintparser.go
│   │   ├── hintparser.y
│   │   ├── hintparser_test.go
│   │   ├── hintparserimpl.go
│   │   ├── lexer.go
│   │   ├── lexer_test.go
│   │   ├── misc.go
│   │   ├── model/
│   │   │   ├── ddl.go
│   │   │   ├── flags.go
│   │   │   ├── model.go
│   │   │   └── model_test.go
│   │   ├── mysql/
│   │   │   ├── charset.go
│   │   │   ├── const.go
│   │   │   ├── const_test.go
│   │   │   ├── errcode.go
│   │   │   ├── errname.go
│   │   │   ├── error.go
│   │   │   ├── error_test.go
│   │   │   ├── locale_format.go
│   │   │   ├── state.go
│   │   │   ├── type.go
│   │   │   ├── type_test.go
│   │   │   └── util.go
│   │   ├── opcode/
│   │   │   ├── opcode.go
│   │   │   └── opcode_test.go
│   │   ├── parser.go
│   │   ├── parser.y
│   │   ├── parser_test.go
│   │   ├── terror/
│   │   │   ├── terror.go
│   │   │   └── terror_test.go
│   │   ├── test.sh
│   │   ├── test_driver/
│   │   │   ├── test_driver.go
│   │   │   ├── test_driver_datum.go
│   │   │   ├── test_driver_helper.go
│   │   │   └── test_driver_mydecimal.go
│   │   ├── types/
│   │   │   ├── etc.go
│   │   │   ├── eval_type.go
│   │   │   ├── field_type.go
│   │   │   └── field_type_test.go
│   │   └── yy_parser.go
│   ├── planner/
│   │   ├── README.md
│   │   ├── core/
│   │   │   ├── common_plans.go
│   │   │   ├── database_dialect.go
│   │   │   ├── dot.go
│   │   │   ├── dot_test.go
│   │   │   ├── errors.go
│   │   │   ├── explain.go
│   │   │   ├── expression_rewriter.go
│   │   │   ├── hashcode.go
│   │   │   ├── initialize.go
│   │   │   ├── logical_plan_builder.go
│   │   │   ├── logical_plan_test.go
│   │   │   ├── logical_plans.go
│   │   │   ├── logicalplan_to_stmt.go
│   │   │   ├── logicalplan_to_stmt_helper.go
│   │   │   ├── logicalplan_to_stmt_test.go
│   │   │   ├── optimizer.go
│   │   │   ├── plan.go
│   │   │   ├── planbuilder.go
│   │   │   ├── preprocess.go
│   │   │   ├── rewrite.go
│   │   │   ├── rewrite_test.go
│   │   │   ├── rule_aggregation_elimination.go
│   │   │   ├── rule_aggregation_push_down.go
│   │   │   ├── rule_build_key_info.go
│   │   │   ├── rule_column_pruning.go
│   │   │   ├── rule_decorrelate.go
│   │   │   ├── rule_eliminate_projection.go
│   │   │   ├── rule_groupby_threshold.go
│   │   │   ├── rule_join_reorder.go
│   │   │   ├── rule_join_reorder_greedy.go
│   │   │   ├── rule_merge_selection.go
│   │   │   ├── rule_patch_timezone.go
│   │   │   ├── rule_patch_timezone_test.go
│   │   │   ├── rule_predicate_push_down.go
│   │   │   ├── stringer.go
│   │   │   ├── testdata/
│   │   │   │   ├── runsql_in.json
│   │   │   │   ├── typical_query_in.json
│   │   │   │   └── typical_query_out.json
│   │   │   └── util.go
│   │   ├── property/
│   │   │   └── property.go
│   │   └── util/
│   │       ├── custom_vistor.go
│   │       ├── custom_vistor_test.go
│   │       ├── debug_util.go
│   │       └── path.go
│   ├── proto-gen/
│   │   ├── scql/
│   │   │   ├── common.pb.go
│   │   │   ├── core.pb.go
│   │   │   ├── engine.pb.go
│   │   │   ├── interpreter.pb.go
│   │   │   ├── scql_task.pb.go
│   │   │   ├── status.pb.go
│   │   │   ├── status_code.pb.go
│   │   │   ├── subgraph.pb.go
│   │   │   └── v1alpha1/
│   │   │       └── compiler.pb.go
│   │   └── spu/
│   │       └── spu.pb.go
│   ├── sessionctx/
│   │   ├── context.go
│   │   ├── stmtctx/
│   │   │   └── stmtctx.go
│   │   └── variable/
│   │       ├── session.go
│   │       └── sysvar.go
│   ├── status/
│   │   ├── status.go
│   │   └── status_test.go
│   ├── table/
│   │   ├── column.go
│   │   ├── table.go
│   │   └── tables/
│   │       └── tables.go
│   ├── types/
│   │   ├── binary_literal.go
│   │   ├── compare.go
│   │   ├── convert.go
│   │   ├── datum.go
│   │   ├── errors.go
│   │   ├── etc.go
│   │   ├── eval_type.go
│   │   ├── field_name.go
│   │   ├── field_type.go
│   │   ├── fsp.go
│   │   ├── helper.go
│   │   ├── mydecimal.go
│   │   ├── mytime.go
│   │   ├── overflow.go
│   │   ├── parser_driver/
│   │   │   ├── value_expr.go
│   │   │   └── value_expr_test.go
│   │   └── time.go
│   └── util/
│       ├── chunk/
│       │   ├── chunk.go
│       │   ├── chunk_util.go
│       │   ├── codec.go
│       │   ├── column.go
│       │   ├── compare.go
│       │   ├── iterator.go
│       │   └── row.go
│       ├── codec/
│       │   ├── bytes.go
│       │   ├── bytes_test.go
│       │   ├── codec.go
│       │   ├── codec_test.go
│       │   ├── float.go
│       │   └── number.go
│       ├── execdetails/
│       │   └── execdetails.go
│       ├── hack/
│       │   ├── hack.go
│       │   └── hack_test.go
│       ├── keyutil/
│       │   └── key_util.go
│       ├── kusciaclient/
│       │   └── kusciaclient.go
│       ├── logutil/
│       │   ├── log.go
│       │   ├── monitor_log_entry.go
│       │   └── monitor_log_entry_test.go
│       ├── math/
│       │   ├── math.go
│       │   └── math_test.go
│       ├── mathutil/
│       │   ├── mathutil.go
│       │   └── mathutil_wasm.go
│       ├── message/
│       │   └── message_io_util.go
│       ├── misc.go
│       ├── mock/
│       │   ├── Makefile
│       │   ├── README.md
│       │   ├── mock.sh
│       │   ├── mock_data.go
│       │   ├── mock_db_data.py
│       │   ├── mock_from_testdata.py
│       │   ├── mock_schema.py
│       │   └── testdata/
│       │       ├── db.json
│       │       ├── generated_table_alice.json
│       │       ├── generated_table_bob.json
│       │       ├── generated_table_carol.json
│       │       ├── table_alice.json
│       │       ├── table_bob.json
│       │       └── table_carol.json
│       ├── mvmap/
│       │   ├── fnv.go
│       │   ├── mvmap.go
│       │   └── mvmap_test.go
│       ├── parallel/
│       │   └── parallel.go
│       ├── plancodec/
│       │   └── id.go
│       ├── prometheus/
│       │   └── prom.go
│       ├── ranger/
│       │   └── types.go
│       ├── sliceutil/
│       │   ├── slice_util.go
│       │   └── slice_util_test.go
│       ├── sqlbuilder/
│       │   ├── sqlbuilder.go
│       │   └── sqlbuilder_test.go
│       ├── stringutil/
│       │   ├── string_util.go
│       │   └── string_util_test.go
│       ├── tableview/
│       │   └── tableview.go
│       ├── testleak/
│       │   ├── fake.go
│       │   └── leaktest.go
│       ├── testutil/
│       │   └── testutil.go
│       ├── texttree/
│       │   ├── texttree.go
│       │   └── texttree_test.go
│       ├── transaction/
│       │   └── tx.go
│       └── url/
│           ├── url_util.go
│           └── url_util_test.go
├── python/
│   ├── build.py
│   ├── engine/
│   │   ├── BUILD.bazel
│   │   └── engine_bindings.cc
│   └── src/
│       ├── LICENSE
│       ├── README.md
│       ├── pyproject.toml
│       ├── scql/
│       │   ├── __init__.py
│       │   ├── compiler/
│       │   │   └── __init__.py
│       │   └── engine/
│       │       └── __init__.py
│       └── setup.py
├── renovate.json
├── scripts/
│   ├── check-whitespace.sh
│   ├── format/
│   │   └── clang-format.sh
│   └── graph-visualization/
│       ├── dot2js.py
│       ├── graph.dot
│       └── template.html
├── test-tools/
│   ├── README.md
│   ├── ca_generator.sh
│   └── find_uncover_err.py
├── version.txt
└── version_build.sh
Download .txt
Showing preview only (931K chars total). Download the full file or copy to clipboard to get everything.
SYMBOL INDEX (10709 symbols across 636 files)

FILE: cmd/docgen/main.go
  type OpDocFiller (line 29) | type OpDocFiller struct
  function check (line 34) | func check(e error) {
  function AttributeToString (line 40) | func AttributeToString(attribute *proto.AttributeValue) string {
  function OptionToString (line 78) | func OptionToString(opt proto.FormalParameterOptions) string {
  function StatusToString (line 91) | func StatusToString(opt proto.TensorStatus) string {
  function StatusListToString (line 108) | func StatusListToString(in *proto.TensorStatusList) string {
  function main (line 116) | func main() {

FILE: engine/auth/authenticator.cc
  type scql::engine::auth (line 24) | namespace scql::engine::auth {

FILE: engine/auth/authenticator.h
  function namespace (line 22) | namespace scql::engine::auth {

FILE: engine/auth/authenticator_test.cc
  type scql::engine::auth (line 21) | namespace scql::engine::auth {
    class AuthenticatorTest (line 23) | class AuthenticatorTest : public ::testing::Test {
      method SetUp (line 30) | void SetUp() override {
      method AuthOption (line 64) | AuthOption CreateAuthOption() const {
    function TEST_F (line 69) | TEST_F(AuthenticatorTest, ConstructorInitializesCorrectly) {
    function TEST_F (line 74) | TEST_F(AuthenticatorTest, VerifyWorksCorrectly) {

FILE: engine/auth/authorized_profile.cc
  type scql (line 22) | namespace scql {
    type engine (line 23) | namespace engine {
      type auth (line 24) | namespace auth {

FILE: engine/auth/authorized_profile.h
  function namespace (line 20) | namespace scql::engine::auth {

FILE: engine/core/primitive_builder.cc
  type scql::engine (line 17) | namespace scql::engine {

FILE: engine/core/primitive_builder.h
  function namespace (line 24) | namespace scql::engine {

FILE: engine/core/primitive_builder_test.cc
  type scql::engine (line 19) | namespace scql::engine {
    function TEST (line 21) | TEST(BooleanTensorBuilderTest, appendWorks) {
    function TEST (line 39) | TEST(BooleanTensorBuilderTest, AppendNullWorks) {
    function TEST (line 58) | TEST(Int64TensorBuilderTest, works) {
    function TEST (line 80) | TEST(FloatTensorBuilderTest, works) {

FILE: engine/core/string_tensor_builder.cc
  type scql::engine (line 19) | namespace scql::engine {

FILE: engine/core/string_tensor_builder.h
  function namespace (line 21) | namespace scql::engine {

FILE: engine/core/string_tensor_builder_test.cc
  type scql::engine (line 19) | namespace scql::engine {
    function TEST (line 21) | TEST(StringTensorBuilderTest, works) {

FILE: engine/core/tensor.cc
  type scql::engine (line 29) | namespace scql::engine {
    function ConvertArrayTo (line 31) | std::shared_ptr<arrow::ChunkedArray> ConvertArrayTo(
    function GetExpectedConvertType (line 43) | std::shared_ptr<arrow::DataType> GetExpectedConvertType(

FILE: engine/core/tensor.h
  function namespace (line 26) | namespace scql::engine {
  type TensorBuildOptions (line 161) | struct TensorBuildOptions {

FILE: engine/core/tensor_batch_reader.cc
  type scql::engine (line 17) | namespace scql::engine {

FILE: engine/core/tensor_batch_reader.h
  function namespace (line 22) | namespace scql::engine {

FILE: engine/core/tensor_batch_reader_test.cc
  type scql::engine (line 26) | namespace scql::engine {
    class TensorBatchReaderTest (line 28) | class TensorBatchReaderTest : public ::testing::Test {
      method TensorBatchReaderTest (line 30) | TensorBatchReaderTest()
    function TEST_F (line 38) | TEST_F(TensorBatchReaderTest, ReadDisk) {
    function TEST_F (line 73) | TEST_F(TensorBatchReaderTest, ReadDiskOnlyOneBatch) {
    function TEST_F (line 108) | TEST_F(TensorBatchReaderTest, ReadMemory) {

FILE: engine/core/tensor_builder.cc
  type scql::engine (line 20) | namespace scql::engine {

FILE: engine/core/tensor_builder.h
  function namespace (line 21) | namespace scql::engine {

FILE: engine/core/tensor_constructor.cc
  type scql::engine (line 27) | namespace scql::engine {
    function TensorPtr (line 29) | TensorPtr TensorFrom(const std::shared_ptr<arrow::DataType>& dtype,
    function TensorPtr (line 40) | TensorPtr TensorFrom(std::shared_ptr<arrow::ChunkedArray> arrays) {
    function TensorPtr (line 44) | TensorPtr ConcatTensors(const std::vector<TensorPtr>& tensors) {

FILE: engine/core/tensor_constructor.h
  function namespace (line 26) | namespace scql::engine {

FILE: engine/core/tensor_constructor_test.cc
  type scql::engine (line 26) | namespace scql::engine {
    class ReaderWriterTest (line 28) | class ReaderWriterTest : public ::testing::Test {
      method ReaderWriterTest (line 30) | ReaderWriterTest()
    function TEST_F (line 38) | TEST_F(ReaderWriterTest, WriteOneFile) {
    function TEST_F (line 68) | TEST_F(ReaderWriterTest, WriteMultiFile) {
    function TEST_F (line 100) | TEST_F(ReaderWriterTest, WriteNullArray) {
    function TEST_F (line 123) | TEST_F(ReaderWriterTest, TypeConvert) {

FILE: engine/core/tensor_slice.cc
  type scql::engine (line 17) | namespace scql::engine {
    function TensorPtr (line 19) | TensorPtr DiskTensorSlice::Next() {
    function CreateTensorSlice (line 48) | std::shared_ptr<TensorSlice> CreateTensorSlice(std::shared_ptr<Tensor>...

FILE: engine/core/tensor_slice.h
  function namespace (line 26) | namespace scql::engine {

FILE: engine/core/type.cc
  type scql::engine (line 17) | namespace scql::engine {
    function FromArrowDataType (line 22) | pb::PrimitiveDataType FromArrowDataType(
    function ToArrowDataType (line 67) | std::shared_ptr<arrow::DataType> ToArrowDataType(pb::PrimitiveDataType...
    function ArrowDataTypeToSpuPtType (line 106) | spu::PtType ArrowDataTypeToSpuPtType(
    function SpuPtTypeToArrowDataType (line 149) | std::shared_ptr<arrow::DataType> SpuPtTypeToArrowDataType(spu::PtType ...
    function DataTypeToSpuPtType (line 191) | spu::PtType DataTypeToSpuPtType(pb::PrimitiveDataType dtype) {

FILE: engine/core/type.h
  function namespace (line 22) | namespace scql::engine {

FILE: engine/datasource/arrow_sql_adaptor.cc
  type scql::engine (line 46) | namespace scql::engine {
    function GetFlightClientOptions (line 47) | arrow::flight::FlightClientOptions GetFlightClientOptions() {
    function SqlClientPtr (line 110) | SqlClientPtr ArrowClientManager::GetClientFromEndpoint(

FILE: engine/datasource/arrow_sql_adaptor.h
  function namespace (line 26) | namespace scql::engine {
  function class (line 52) | class ArrowSqlChunkedResult : public ChunkedResult {
  function class (line 71) | class ArrowSqlAdaptor : public DatasourceAdaptor {

FILE: engine/datasource/arrow_sql_adaptor_factory.h
  function namespace (line 20) | namespace scql::engine {

FILE: engine/datasource/arrow_sql_adaptor_test.cc
  type scql::engine (line 23) | namespace scql::engine {
    class ArrowSqlAdaptorTest (line 33) | class ArrowSqlAdaptorTest : public ::testing::Test {
      method getUrl (line 35) | std::string getUrl() { return absl::GetFlag(FLAGS_url); }
    function TEST_F (line 38) | TEST_F(ArrowSqlAdaptorTest, works) {
  function main (line 63) | int main(int argc, char* argv[]) {

FILE: engine/datasource/csvdb_adaptor.cc
  type scql::engine (line 40) | namespace scql::engine {
    function DataSource (line 109) | DataSource MergeCsvdbDatasources(const std::vector<DataSource>& dss) {

FILE: engine/datasource/csvdb_adaptor.h
  function namespace (line 26) | namespace scql::engine {

FILE: engine/datasource/csvdb_adaptor_factory.cc
  type scql::engine (line 19) | namespace scql::engine {

FILE: engine/datasource/csvdb_adaptor_factory.h
  function namespace (line 19) | namespace scql::engine {

FILE: engine/datasource/csvdb_adaptor_test.cc
  type scql::engine (line 30) | namespace scql::engine {
    class CsvdbAdaptorTest (line 34) | class CsvdbAdaptorTest : public ::testing::Test {
      method SetUp (line 36) | void SetUp() override {
    function TEST_F (line 82) | TEST_F(CsvdbAdaptorTest, NormalQuery) {
    function TEST_F (line 115) | TEST_F(CsvdbAdaptorTest, WriteToFile) {
    function TEST_F (line 153) | TEST_F(CsvdbAdaptorTest, QueryWithAggregation) {
    function TEST_F (line 173) | TEST_F(CsvdbAdaptorTest, QueryWithPredicate) {
    function TEST_F (line 197) | TEST_F(CsvdbAdaptorTest, QueryWithDomainDataID) {
    function TEST_F (line 236) | TEST_F(CsvdbAdaptorTest, MergeCsvdbDatasources) {

FILE: engine/datasource/datasource_adaptor.cc
  type scql::engine (line 32) | namespace scql::engine {

FILE: engine/datasource/datasource_adaptor.h
  function namespace (line 31) | namespace scql::engine {

FILE: engine/datasource/datasource_adaptor_factory.h
  function namespace (line 21) | namespace scql::engine {

FILE: engine/datasource/datasource_adaptor_mgr.cc
  type scql::engine (line 25) | namespace scql::engine {

FILE: engine/datasource/datasource_adaptor_mgr.h
  function namespace (line 23) | namespace scql::engine {

FILE: engine/datasource/dm_adaptor.cc
  type scql::engine (line 37) | namespace scql::engine {

FILE: engine/datasource/dm_adaptor.h
  function namespace (line 27) | namespace scql::engine {

FILE: engine/datasource/dm_adaptor_factory.cc
  type scql::engine (line 19) | namespace scql::engine {

FILE: engine/datasource/dm_adaptor_factory.h
  function namespace (line 19) | namespace scql::engine {

FILE: engine/datasource/dm_adaptor_kuscia_test.cc
  function main (line 38) | int main(int argc, char* argv[]) {

FILE: engine/datasource/dp_adaptor.cc
  type scql::engine (line 27) | namespace scql::engine {

FILE: engine/datasource/dp_adaptor.h
  function namespace (line 26) | namespace scql::engine {

FILE: engine/datasource/dp_adaptor_factory.cc
  type scql::engine (line 19) | namespace scql::engine {

FILE: engine/datasource/dp_adaptor_factory.h
  function namespace (line 19) | namespace scql::engine {

FILE: engine/datasource/dp_adaptor_test.cc
  type scql::engine (line 25) | namespace scql::engine {
    function GenerateValidJson (line 27) | std::string GenerateValidJson() {
    function TEST (line 31) | TEST(DpAdaptorTest, Constructor) {
    function TEST (line 40) | TEST(DpAdaptorTest, OtherFunc) {

FILE: engine/datasource/duckdb_wrapper.cc
  type scql::engine (line 32) | namespace scql::engine {
    function ToLogicalTypeId (line 44) | static duckdb::LogicalTypeId ToLogicalTypeId(scql::api::v1::DataType t...
    function ToDuckDBDataType (line 78) | std::string ToDuckDBDataType(const std::string &type) {
    type CSVTableReplacementScanData (line 89) | struct CSVTableReplacementScanData : public duckdb::ReplacementScanData {
    function CSVTableReplacementScan (line 93) | static duckdb::unique_ptr<duckdb::TableRef> CSVTableReplacementScan(
    function CSVScanBind (line 158) | static duckdb::unique_ptr<duckdb::FunctionData> CSVScanBind(
    function CheckTablePathsAndGetPrefix (line 190) | static std::string CheckTablePathsAndGetPrefix(

FILE: engine/datasource/duckdb_wrapper.h
  function namespace (line 21) | namespace scql::engine {

FILE: engine/datasource/duckdb_wrapper_test.cc
  type scql::engine (line 24) | namespace scql::engine {
    function ColumnEquals (line 29) | ::testing::AssertionResult ColumnEquals(
    class DuckdbWrapperTest (line 52) | class DuckdbWrapperTest : public ::testing::Test {
      method SetUp (line 54) | void SetUp() override {
    function TEST_F (line 87) | TEST_F(DuckdbWrapperTest, NormalQuery) {
    function TEST_F (line 120) | TEST_F(DuckdbWrapperTest, QueryWithPredicate) {
    function TEST_F (line 138) | TEST_F(DuckdbWrapperTest, IngoringColumnCase) {
    function TEST_F (line 156) | TEST_F(DuckdbWrapperTest, DISABLED_ComplexQueryWithBigDataset) {

FILE: engine/datasource/embed_router.cc
  type scql::engine (line 24) | namespace scql::engine {

FILE: engine/datasource/embed_router.h
  function namespace (line 27) | namespace scql::engine {

FILE: engine/datasource/embed_router_test.cc
  type scql::engine (line 20) | namespace scql::engine {
    class EmbedRouterTest (line 22) | class EmbedRouterTest : public ::testing::Test {}
    function TEST_F (line 24) | TEST_F(EmbedRouterTest, FromJsonStr) {
    function TEST_F (line 106) | TEST_F(EmbedRouterTest, FromConnectionStr) {
    function TEST_F (line 131) | TEST_F(EmbedRouterTest, FromFilePaths_SingleTableNames_ShouldThrow) {
    function TEST_F (line 143) | TEST_F(EmbedRouterTest, FromFilePaths_SingleDbMultipleTables) {
    function TEST_F (line 170) | TEST_F(EmbedRouterTest, FromFilePaths_MultipleDatabases_ShouldThrow) {
    function TEST_F (line 183) | TEST_F(EmbedRouterTest, FromFilePaths_InvalidFormat) {
    function TEST_F (line 195) | TEST_F(EmbedRouterTest, FromFilePaths_EmptyInput_ShouldThrow) {

FILE: engine/datasource/http_router.cc
  type scql::engine (line 24) | namespace scql::engine {

FILE: engine/datasource/http_router.h
  function namespace (line 19) | namespace scql::engine {

FILE: engine/datasource/kuscia_datamesh_router.cc
  type scql::engine (line 33) | namespace scql::engine {
    function DataSource (line 39) | DataSource MakeCSVDataSourceFromLocalfs(
    function DataSource (line 72) | DataSource MakeCSVDataSourceFromOSS(const std::string& datasource_id,
    function SplitHost (line 115) | std::pair<std::string, std::string> SplitHost(const std::string& host) {
    function DataSource (line 126) | DataSource MakeMYSQLDataSource(const std::string& datasource_id,
    function DataSource (line 155) | DataSource MakePgDataSource(const std::string& datasource_id,
    function DataSource (line 182) | DataSource MakeDataMeshDataSource(
    function DataSource (line 213) | DataSource KusciaDataMeshRouter::SingleRoute(

FILE: engine/datasource/kuscia_datamesh_router.h
  function namespace (line 22) | namespace scql::engine {

FILE: engine/datasource/kuscia_datamesh_router_test.cc
  function read_credential_options (line 32) | grpc::SslCredentialsOptions read_credential_options() {
  function main (line 45) | int main(int argc, char* argv[]) {

FILE: engine/datasource/mock_router_server.py
  class Table (line 22) | class Table(BaseModel):
  class RouteRequest (line 27) | class RouteRequest(BaseModel):
  class Status (line 32) | class Status(BaseModel):
  class DataSource (line 37) | class DataSource(BaseModel):
  class RouteResponse (line 44) | class RouteResponse(BaseModel):
  class RouteRule (line 50) | class RouteRule(BaseModel):
  class MyStore (line 56) | class MyStore:
    method __init__ (line 57) | def __init__(self):
    method add_datasource (line 67) | def add_datasource(self, ds):
    method add_route_rule (line 73) | def add_route_rule(self, dbName, tableName, dsID):
    method route (line 82) | def route(self, dbName, tableName):
  function route (line 97) | def route(req: RouteRequest) -> RouteResponse:
  function register (line 130) | def register(ds: DataSource):
  function add_route_rule (line 135) | def add_route_rule(rule: RouteRule):
  function index (line 201) | def index():

FILE: engine/datasource/odbc_adaptor.cc
  type scql::engine (line 38) | namespace scql::engine {
    function ConvertDataToArray (line 78) | void ConvertDataToArray(
    function SWITCH_DATE_BRANCH (line 119) | SWITCH_DATE_BRANCH

FILE: engine/datasource/odbc_adaptor.h
  function namespace (line 32) | namespace scql::engine {
  function class (line 61) | class OdbcAdaptor : public DatasourceAdaptor {

FILE: engine/datasource/odbc_adaptor_factory.cc
  type scql::engine (line 17) | namespace scql::engine {

FILE: engine/datasource/odbc_adaptor_factory.h
  function namespace (line 20) | namespace scql::engine {

FILE: engine/datasource/odbc_adaptor_mysql_test.cc
  type scql::engine (line 29) | namespace scql::engine {
    class OdbcAdaptorMySQLTest (line 31) | class OdbcAdaptorMySQLTest : public ::testing::Test {
      method SetUp (line 33) | void SetUp() override {
      method getConnectionStr (line 68) | std::string getConnectionStr() { return absl::GetFlag(FLAGS_connecti...
    function TEST_F (line 73) | TEST_F(OdbcAdaptorMySQLTest, works) {
  function main (line 107) | int main(int argc, char* argv[]) {

FILE: engine/datasource/odbc_adaptor_sqlite_test.cc
  type scql::engine (line 21) | namespace scql::engine {
    class OdbcAdaptorSQLiteTest (line 23) | class OdbcAdaptorSQLiteTest : public ::testing::Test {
      method SetUp (line 25) | void SetUp() override {
    function TEST_F (line 55) | TEST_F(OdbcAdaptorSQLiteTest, works) {

FILE: engine/datasource/odbc_connector.cc
  type scql::engine (line 26) | namespace scql::engine {

FILE: engine/datasource/odbc_connector.h
  function namespace (line 22) | namespace scql::engine {

FILE: engine/datasource/router.h
  function namespace (line 19) | namespace scql::engine {

FILE: engine/exe/main.cc
  type brpc (line 54) | namespace brpc {
  function AddChannelOptions (line 64) | void AddChannelOptions(scql::engine::ChannelManager* channel_manager) {
  function BuildRouter (line 123) | std::unique_ptr<scql::engine::Router> BuildRouter() {
  function BuildAuthenticator (line 184) | std::unique_ptr<scql::engine::auth::Authenticator> BuildAuthenticator() {
  function BuildEngineService (line 194) | std::unique_ptr<scql::engine::EngineServiceImpl> BuildEngineService(
  function BuildServerOptions (line 282) | brpc::ServerOptions BuildServerOptions() {
  function termination_handler (line 308) | void termination_handler(int signum) {
  function ExecuteKpadTask (line 314) | bool ExecuteKpadTask(scql::engine::EngineServiceImpl* engine_svc,
  function main (line 353) | int main(int argc, char* argv[]) {
  function LoadSslCredentialsOptions (line 544) | grpc::SslCredentialsOptions LoadSslCredentialsOptions(

FILE: engine/framework/exec.cc
  type scql::engine (line 23) | namespace scql::engine {
    function RepeatedPbTensor (line 38) | const RepeatedPbTensor& ExecContext::GetInput(const std::string& name)...
    function RepeatedPbTensor (line 44) | const RepeatedPbTensor& ExecContext::GetOutput(const std::string& name...
    function RepeatedPbTensor (line 50) | RepeatedPbTensor ExecContext::GetInputPbs() const {
    function RepeatedPbTensor (line 58) | RepeatedPbTensor ExecContext::GetOutputPbs() const {

FILE: engine/framework/exec.h
  function namespace (line 26) | namespace spu {
  function namespace (line 31) | namespace scql::engine {

FILE: engine/framework/executor.cc
  type scql::engine (line 19) | namespace scql::engine {

FILE: engine/framework/executor.h
  function namespace (line 19) | namespace scql::engine {

FILE: engine/framework/operator.cc
  type scql::engine (line 22) | namespace scql::engine {

FILE: engine/framework/operator.h
  function namespace (line 21) | namespace scql::engine {

FILE: engine/framework/party_info.cc
  type scql::engine (line 19) | namespace scql::engine {

FILE: engine/framework/party_info.h
  function namespace (line 23) | namespace scql::engine {

FILE: engine/framework/party_info_test.cc
  type scql::engine (line 21) | namespace scql::engine {
    function TEST (line 23) | TEST(PartyInfoTest, normal) {

FILE: engine/framework/registry.cc
  type scql::engine (line 19) | namespace scql::engine {
    function OpRegistry (line 44) | OpRegistry* GetOpRegistry() {

FILE: engine/framework/registry.h
  function namespace (line 23) | namespace scql::engine {

FILE: engine/framework/session.cc
  type scql::engine (line 45) | namespace scql::engine {
    function ConvertSessionStateToJobState (line 47) | pb::JobState ConvertSessionStateToJobState(SessionState state) {
    function SessionStateToString (line 65) | std::string SessionStateToString(SessionState state) {
    function CryptoHash (line 330) | size_t CryptoHash(const std::string& str) {
    class StringToHashConverter (line 344) | class StringToHashConverter {
      method StringToHashConverter (line 346) | explicit StringToHashConverter(
      method GetHashResult (line 353) | void GetHashResult(std::shared_ptr<Tensor>* tensor) {
      method Visit (line 358) | arrow::Status Visit(const T& array) {
      method Visit (line 364) | arrow::Status Visit(const arrow::LargeStringArray& array) {
    class HashToStringConverter (line 380) | class HashToStringConverter {
      method HashToStringConverter (line 382) | explicit HashToStringConverter(
      method GetStringResult (line 389) | void GetStringResult(std::shared_ptr<Tensor>* tensor) {
      method Visit (line 394) | arrow::Status Visit(const T& array) {
      method Visit (line 400) | arrow::Status Visit(const arrow::NumericArray<arrow::UInt64Type>& ar...
    function TensorPtr (line 421) | TensorPtr Session::StringToHash(const Tensor& string_tensor) {
    function TensorPtr (line 434) | TensorPtr Session::HashToString(const Tensor& hash_tensor) {
    function ActiveLogger (line 495) | std::shared_ptr<spdlog::logger> ActiveLogger(const Session* session) {

FILE: engine/framework/session.h
  type class (line 49) | enum class
  type LinkConfig (line 62) | struct LinkConfig {
  type PsiConfig (line 70) | struct PsiConfig {
  type LogConfig (line 76) | struct LogConfig {
  type StreamingOptions (line 80) | struct StreamingOptions {
  type SessionOptions (line 90) | struct SessionOptions {
  function Router (line 132) | Router* GetRouter() const { return router_; }
  function DatasourceAdaptorMgr (line 134) | DatasourceAdaptorMgr* GetDatasourceAdaptorMgr() const { return ds_mgr_; }
  function GetPartyRank (line 136) | ssize_t GetPartyRank(const std::string& party_code) const {
  function TensorTable (line 142) | TensorTable* GetTensorTable() const { return tensor_table_.get(); }
  function SetState (line 150) | void SetState(SessionState new_state) { state_.store(new_state); }
  function CASState (line 153) | bool CASState(SessionState old_state, SessionState new_state) {
  function SetAffectedRows (line 161) | void SetAffectedRows(int64_t affected_rows) {
  function InitProgressStats (line 175) | void InitProgressStats(const ::scql::pb::SchedulingPolicy& policy) {

FILE: engine/framework/session_manager.cc
  type scql::engine (line 34) | namespace scql::engine {
    type SessionOptions (line 72) | struct SessionOptions
    function Session (line 150) | Session* SessionManager::GetSession(const std::string& session_id) {

FILE: engine/framework/session_manager.h
  function namespace (line 28) | namespace scql::engine {

FILE: engine/framework/session_manager_test.cc
  type scql::engine (line 25) | namespace scql::engine {
    class TestFactory (line 27) | class TestFactory : public yacl::link::ILinkFactory {
      method TestFactory (line 29) | explicit TestFactory(ListenerManager* listener_manager)
      method CreateContext (line 32) | std::shared_ptr<yacl::link::Context> CreateContext(
    class SessionManagerTest (line 46) | class SessionManagerTest : public ::testing::Test {
      method SetUp (line 48) | void SetUp() override {
    function TEST_F (line 66) | TEST_F(SessionManagerTest, Works) {
    function TEST_F (line 113) | TEST_F(SessionManagerTest, TestSessionCreation) {
    function TEST_F (line 156) | TEST_F(SessionManagerTest, CompareAndSetStateWorks) {

FILE: engine/framework/tensor_table.cc
  type scql::engine (line 19) | namespace scql::engine {

FILE: engine/framework/tensor_table.h
  function namespace (line 23) | namespace scql::engine {

FILE: engine/link/channel_manager.cc
  type scql::engine (line 21) | namespace scql::engine {

FILE: engine/link/channel_manager.h
  function namespace (line 22) | namespace scql::engine {

FILE: engine/link/listener.cc
  type scql::engine (line 19) | namespace scql::engine {

FILE: engine/link/listener.h
  function namespace (line 23) | namespace scql::engine {

FILE: engine/link/listener_test.cc
  type scql::engine (line 19) | namespace scql::engine {
    function TEST (line 21) | TEST(ListenerManagerTest, works) {

FILE: engine/link/mux_link_factory.cc
  type scql::engine (line 20) | namespace scql::engine {

FILE: engine/link/mux_link_factory.h
  function namespace (line 26) | namespace scql::engine {

FILE: engine/link/mux_receiver_service.cc
  type scql::engine (line 19) | namespace scql::engine {

FILE: engine/link/mux_receiver_service.h
  function namespace (line 21) | namespace scql::engine {

FILE: engine/link/mux_receiver_service_test.cc
  type scql::engine (line 25) | namespace scql::engine {
    class MuxReceiverServiceImplTest (line 28) | class MuxReceiverServiceImplTest : public ::testing::Test {}
    function TEST_F (line 30) | TEST_F(MuxReceiverServiceImplTest, Works) {

FILE: engine/link/rpc_helper.cc
  type scql::engine (line 17) | namespace scql::engine {
    function SetDefaultAuthenticator (line 20) | void SetDefaultAuthenticator(std::unique_ptr<brpc::Authenticator> auth) {

FILE: engine/link/rpc_helper.h
  function namespace (line 22) | namespace scql::engine {

FILE: engine/link/rpc_helper_test.cc
  type scql::engine (line 27) | namespace scql::engine {
    class RecvTestImpl (line 32) | class RecvTestImpl : public link::pb::MuxReceiverService {
      method Push (line 34) | void Push(::google::protobuf::RpcController* cntl,
    class RpcHelperTest (line 54) | class RpcHelperTest : public testing::Test {
      method SetUp (line 56) | void SetUp() override {
    function TEST_F (line 75) | TEST_F(RpcHelperTest, RpcNoAuth) {
    function TEST_F (line 94) | TEST_F(RpcHelperTest, RpcWithRetryAndAuth) {

FILE: engine/operator/all_ops_register.cc
  type scql::engine::op (line 71) | namespace scql::engine::op {
    function RegisterAllOpsImpl (line 75) | void RegisterAllOpsImpl() {
    function RegisterAllOps (line 198) | void RegisterAllOps() {

FILE: engine/operator/all_ops_register.h
  function namespace (line 19) | namespace scql::engine::op {

FILE: engine/operator/all_ops_register_test.cc
  type scql::engine::op (line 19) | namespace scql::engine::op {
    function TEST (line 21) | TEST(AllOpsRegisterTest, Works) {

FILE: engine/operator/arithmetic.cc
  type scql::engine::op (line 26) | namespace scql::engine::op {
    function TensorPtr (line 45) | TensorPtr Add::ComputeInPlain(const Tensor& lhs, const Tensor& rhs) {
    function TensorPtr (line 68) | TensorPtr Minus::ComputeInPlain(const Tensor& lhs, const Tensor& rhs) {
    function TensorPtr (line 91) | TensorPtr Mul::ComputeInPlain(const Tensor& lhs, const Tensor& rhs) {
    function TensorPtr (line 120) | TensorPtr Div::ComputeInPlain(const Tensor& lhs, const Tensor& rhs) {
    function TensorPtr (line 156) | TensorPtr IntDiv::ComputeInPlain(const Tensor& lhs, const Tensor& rhs) {
    function TensorPtr (line 183) | TensorPtr Mod::ComputeInPlain(const Tensor& lhs, const Tensor& rhs) {
    function TensorPtr (line 222) | TensorPtr Pow::ComputeInPlain(const Tensor& lhs, const Tensor& rhs) {

FILE: engine/operator/arithmetic.h
  function namespace (line 19) | namespace scql::engine::op {

FILE: engine/operator/arithmetic_test.cc
  type scql::engine::op (line 21) | namespace scql::engine::op {

FILE: engine/operator/arrow_func.cc
  type scql::engine::op (line 24) | namespace scql::engine::op {

FILE: engine/operator/arrow_func.h
  function namespace (line 19) | namespace scql::engine::op {

FILE: engine/operator/arrow_func_test.cc
  type scql::engine::op (line 25) | namespace scql::engine::op {
    type ArrowFuncTestCase (line 27) | struct ArrowFuncTestCase {
    class ArrowFuncTest (line 34) | class ArrowFuncTest
    function TEST_P (line 136) | TEST_P(ArrowFuncTest, works) {

FILE: engine/operator/binary_base.cc
  type scql::engine::op (line 23) | namespace scql::engine::op {

FILE: engine/operator/binary_base.h
  function namespace (line 19) | namespace scql::engine::op {

FILE: engine/operator/binary_test.h
  function namespace (line 23) | namespace scql::engine::op {
  function class (line 52) | class BinaryComputeInSecretTest : public BinaryTest {}
  function class (line 53) | class BinaryComputeInPlainTest : public BinaryTest {}

FILE: engine/operator/broadcast_to.cc
  type scql::engine::op (line 25) | namespace scql::engine::op {

FILE: engine/operator/broadcast_to.h
  function namespace (line 19) | namespace scql::engine::op {

FILE: engine/operator/broadcast_to_test.cc
  type scql::engine::op (line 24) | namespace scql::engine::op {
    type BroadcastToTestCase (line 26) | struct BroadcastToTestCase {
    class BroadcastToTest (line 33) | class BroadcastToTest
    function TEST_P (line 112) | TEST_P(BroadcastToTest, works) {

FILE: engine/operator/bucket.cc
  type scql::engine::op (line 44) | namespace scql::engine::op {
    function GetMaxRowNum (line 70) | size_t GetMaxRowNum(ExecContext* ctx, size_t local_row_num,
    function ReadArrays (line 87) | bool ReadArrays(std::vector<std::shared_ptr<TensorBatchReader>>& readers,
    function WriteArrays (line 103) | void WriteArrays(std::vector<std::shared_ptr<BucketTensorConstructor>>...
    function FilterByIndex (line 115) | std::vector<arrow::ChunkedArrayVector> FilterByIndex(

FILE: engine/operator/bucket.h
  function namespace (line 26) | namespace scql::engine::op {

FILE: engine/operator/bucket_bench.cc
  type scql::engine::op (line 30) | namespace scql::engine::op {
    type BucketTestCase (line 32) | struct BucketTestCase {
    function CreateNamedTensor (line 38) | test::NamedTensor CreateNamedTensor(const std::string& name, TensorPtr...
    function MakeBucketExecNode (line 42) | pb::ExecNode MakeBucketExecNode(const BucketTestCase& tc) {
    function FeedInputs (line 78) | void FeedInputs(ExecContext* ctx, const BucketTestCase& tc) {
    function RunBucketBench (line 83) | void RunBucketBench(std::vector<TensorPtr>& join_keys,
    function TensorPtr (line 112) | TensorPtr CreateTmpTensor(const std::filesystem::path& path,
  function BM_BucketTest (line 134) | static void BM_BucketTest(benchmark::State& state) {

FILE: engine/operator/bucket_test.cc
  type scql::engine::op (line 26) | namespace scql::engine::op {
    type BucketTestCase (line 28) | struct BucketTestCase {
    function MockInt32Tensor (line 34) | test::NamedTensor MockInt32Tensor(const std::string& name,
    function MockStringTensor (line 48) | test::NamedTensor MockStringTensor(const std::string& name,
    function BucketTestCase (line 62) | BucketTestCase MockTestCase(const size_t tensor_length) {
    class BucketTest (line 72) | class BucketTest : public ::testing::TestWithParam<BucketTestCase> {
    function SortChunkedArray (line 99) | std::shared_ptr<arrow::Array> SortChunkedArray(
    function TEST_P (line 108) | TEST_P(BucketTest, works) {

FILE: engine/operator/case_when.cc
  type scql::engine::op (line 30) | namespace scql::engine::op {

FILE: engine/operator/case_when.h
  function namespace (line 22) | namespace scql::engine::op {

FILE: engine/operator/case_when_test.cc
  type scql::engine::op (line 24) | namespace scql::engine::op {
    type CaseWhenTestCase (line 26) | struct CaseWhenTestCase {
    class CaseWhenTest (line 37) | class CaseWhenTest
    function TEST_P (line 207) | TEST_P(CaseWhenTest, works) {
    type CaseWhenConditionTestCase (line 254) | struct CaseWhenConditionTestCase {
    class CaseWhenConditionTest (line 259) | class CaseWhenConditionTest
    function TEST_P (line 334) | TEST_P(CaseWhenConditionTest, condition) {

FILE: engine/operator/cast.cc
  type scql::engine::op (line 26) | namespace scql::engine::op {

FILE: engine/operator/cast.h
  function namespace (line 19) | namespace scql::engine::op {

FILE: engine/operator/cast_test.cc
  type scql::engine::op (line 24) | namespace scql::engine::op {
    type CastTestCase (line 26) | struct CastTestCase {
    class CastTest (line 33) | class CastTest : public testing::TestWithParam<
    function TEST_P (line 125) | TEST_P(CastTest, works) {

FILE: engine/operator/coalesce.cc
  type scql::engine::op (line 22) | namespace scql::engine::op {

FILE: engine/operator/coalesce.h
  function namespace (line 19) | namespace scql::engine::op {

FILE: engine/operator/coalesce_test.cc
  type scql::engine::op (line 22) | namespace scql::engine::op {
    type CoalesceTestCase (line 24) | struct CoalesceTestCase {
    class CoalesceTest (line 29) | class CoalesceTest
    function TEST_P (line 81) | TEST_P(CoalesceTest, works) {

FILE: engine/operator/compare.cc
  type scql::engine::op (line 30) | namespace scql::engine::op {
    function TensorPtr (line 57) | TensorPtr Equal::ComputeInPlain(const Tensor& lhs, const Tensor& rhs) {
    function TensorPtr (line 80) | TensorPtr NotEqual::ComputeInPlain(const Tensor& lhs, const Tensor& rh...
    function TensorPtr (line 103) | TensorPtr Less::ComputeInPlain(const Tensor& lhs, const Tensor& rhs) {
    function TensorPtr (line 126) | TensorPtr LessEqual::ComputeInPlain(const Tensor& lhs, const Tensor& r...
    function TensorPtr (line 150) | TensorPtr GreaterEqual::ComputeInPlain(const Tensor& lhs, const Tensor...
    function TensorPtr (line 173) | TensorPtr Greater::ComputeInPlain(const Tensor& lhs, const Tensor& rhs) {
    function TensorPtr (line 226) | TensorPtr Greatest::ComputeInPlain(const std::vector<TensorPtr>& input...
    function TensorPtr (line 276) | TensorPtr Least::ComputeInPlain(const std::vector<TensorPtr>& inputs) {

FILE: engine/operator/compare.h
  function namespace (line 19) | namespace scql::engine::op {

FILE: engine/operator/compare_test.cc
  type scql::engine::op (line 21) | namespace scql::engine::op {
    type VariadicCompareTestCase (line 23) | struct VariadicCompareTestCase {
    class VariadicCompareTest (line 32) | class VariadicCompareTest
      method SetUp (line 36) | void SetUp() override { RegisterAllOps(); }
      method CreateOp (line 43) | static std::unique_ptr<Operator> CreateOp(const std::string& op_type) {
    function TEST_P (line 676) | TEST_P(VariadicCompareTest, Works) {

FILE: engine/operator/concat.cc
  type scql::engine::op (line 25) | namespace scql::engine::op {

FILE: engine/operator/concat.h
  function namespace (line 19) | namespace scql::engine::op {

FILE: engine/operator/concat_test.cc
  type scql::engine::op (line 23) | namespace scql::engine::op {
    type ConcatTestCase (line 25) | struct ConcatTestCase {
    class ConcatTest (line 30) | class ConcatTest : public testing::TestWithParam<
    function TEST_P (line 62) | TEST_P(ConcatTest, works) {

FILE: engine/operator/constant.cc
  type scql::engine::op (line 25) | namespace scql::engine::op {

FILE: engine/operator/constant.h
  function namespace (line 19) | namespace scql::engine::op {

FILE: engine/operator/constant_test.cc
  type scql::engine::op (line 24) | namespace scql::engine::op {
    type ConstantTestCase (line 26) | struct ConstantTestCase {
    class ConstantTest (line 31) | class ConstantTest
    function TEST_P (line 80) | TEST_P(ConstantTest, Works) {

FILE: engine/operator/copy.cc
  type scql::engine::op (line 28) | namespace scql::engine::op {
    class TakeYaclBuffer (line 33) | class TakeYaclBuffer : public arrow::Buffer {
      method TakeYaclBuffer (line 35) | explicit TakeYaclBuffer(yacl::Buffer buf)

FILE: engine/operator/copy.h
  function namespace (line 19) | namespace scql::engine::op {

FILE: engine/operator/copy_test.cc
  type scql::engine::op (line 23) | namespace scql::engine::op {
    type CopyTestCase (line 25) | struct CopyTestCase {
    function CopyTestCase (line 30) | CopyTestCase MockInt32TensorCase(const size_t tensor_length) {
    function CopyTestCase (line 51) | CopyTestCase MockStringTensorCase(const size_t tensor_length) {
    class CopyTest (line 72) | class CopyTest : public ::testing::TestWithParam<
    function TEST_P (line 110) | TEST_P(CopyTest, works) {

FILE: engine/operator/dump_file.cc
  type scql::engine::op (line 48) | namespace scql::engine::op {
    function InitS3Once (line 86) | void InitS3Once() {
    function BuildStreamFromS3 (line 99) | std::shared_ptr<arrow::io::OutputStream> BuildStreamFromS3(
    function BuildOutputStream (line 135) | std::shared_ptr<arrow::io::OutputStream> BuildOutputStream(
    function ProcessRecordBatchesFromTensors (line 167) | void ProcessRecordBatchesFromTensors(
    function WriteToCsvStream (line 211) | void WriteToCsvStream(
    function UploadViaDataProxy (line 228) | void UploadViaDataProxy(dataproxy_sdk::proto::UploadInfo& upload_info,
    function WriteDpDirectly (line 245) | void WriteDpDirectly(

FILE: engine/operator/dump_file.h
  function namespace (line 19) | namespace scql::engine::op {

FILE: engine/operator/dump_file_test.cc
  type scql::engine::op (line 28) | namespace scql::engine::op {
    type DumpFileTestCase (line 34) | struct DumpFileTestCase {
    class DumpFileTest (line 45) | class DumpFileTest : public ::testing::TestWithParam<DumpFileTestCase> {
    function TEST_P (line 168) | TEST_P(DumpFileTest, works) {

FILE: engine/operator/filter.cc
  type scql::engine::op (line 26) | namespace scql::engine::op {
    function TensorPtr (line 156) | TensorPtr Filter::GetPrivateOrPublicTensor(ExecContext* ctx,

FILE: engine/operator/filter.h
  function namespace (line 19) | namespace scql::engine::op {

FILE: engine/operator/filter_by_index.cc
  type scql::engine::op (line 24) | namespace scql::engine::op {
    function TensorPtr (line 65) | TensorPtr FilterByIndex::Take(const Tensor& value, const Tensor& indic...

FILE: engine/operator/filter_by_index.h
  function namespace (line 19) | namespace scql::engine::op {

FILE: engine/operator/filter_by_index_test.cc
  type scql::engine::op (line 22) | namespace scql::engine::op {
    type FilterByIndexTestCase (line 24) | struct FilterByIndexTestCase {
    class FilterByIndexTest (line 30) | class FilterByIndexTest
    function TEST_P (line 75) | TEST_P(FilterByIndexTest, works) {

FILE: engine/operator/filter_test.cc
  type scql::engine::op (line 22) | namespace scql::engine::op {
    type FilterTestCase (line 24) | struct FilterTestCase {
    class FilterTest (line 32) | class FilterTest : public ::testing::TestWithParam<
    function TEST_P (line 98) | TEST_P(FilterTest, works) {

FILE: engine/operator/group.cc
  type scql::engine::op (line 26) | namespace scql::engine::op {

FILE: engine/operator/group.h
  function namespace (line 19) | namespace scql::engine::op {

FILE: engine/operator/group_agg.cc
  type scql::engine::op (line 28) | namespace scql::engine::op {
    function TensorPtr (line 113) | TensorPtr GroupAggBase::BuildTensorFromScalarVector(

FILE: engine/operator/group_agg.h
  function namespace (line 19) | namespace scql::engine::op {
  function class (line 60) | class GroupCountDistinct : public GroupAggBase {
  function class (line 70) | class GroupCount : public GroupAggBase {
  function class (line 80) | class GroupSum : public GroupAggBase {
  function class (line 90) | class GroupAvg : public GroupAggBase {
  function class (line 100) | class GroupMin : public GroupAggBase {
  function class (line 110) | class GroupMax : public GroupAggBase {
  function class (line 120) | class GroupPercentileDisc : public GroupAggBase {

FILE: engine/operator/group_agg_test.cc
  type scql::engine::op (line 24) | namespace scql::engine::op {
    type GroupAggTestCase (line 26) | struct GroupAggTestCase {
    class GroupAggTest (line 35) | class GroupAggTest : public testing::TestWithParam<GroupAggTestCase> {
      method SetUp (line 37) | void SetUp() override { RegisterAllOps(); }
    function TEST_P (line 42) | TEST_P(GroupAggTest, works) {
    function GroupAggTestCase (line 108) | static GroupAggTestCase GeneratePercentileDiscTestCase(

FILE: engine/operator/group_secret_agg.cc
  type scql::engine::op (line 19) | namespace scql::engine::op {

FILE: engine/operator/group_secret_agg.h
  function namespace (line 26) | namespace scql::engine::op {
  function class (line 60) | class GroupSecretAvg : public GroupSecretAggBase {

FILE: engine/operator/group_secret_agg_test.cc
  type scql::engine::op (line 22) | namespace scql::engine::op {
    type GroupSecretAggTestCase (line 24) | struct GroupSecretAggTestCase {
    class GroupSecretAggTest (line 32) | class GroupSecretAggTest
      method MakeExecNode (line 36) | static pb::ExecNode MakeExecNode(const GroupSecretAggTestCase& tc) {
      method FeedInputs (line 66) | static void FeedInputs(const std::vector<ExecContext*>& ctxs,
    function TEST_P (line 149) | TEST_P(GroupSecretAggTest, Works) {

FILE: engine/operator/group_test.cc
  type scql::engine::op (line 23) | namespace scql::engine::op {
    type GroupTestCase (line 25) | struct GroupTestCase {
    class GroupTest (line 31) | class GroupTest : public testing::TestWithParam<GroupTestCase> {
    function TEST_P (line 77) | TEST_P(GroupTest, works) {

FILE: engine/operator/if.cc
  type scql::engine::op (line 29) | namespace scql::engine::op {

FILE: engine/operator/if.h
  function namespace (line 22) | namespace scql::engine::op {

FILE: engine/operator/if_null.cc
  type scql::engine::op (line 22) | namespace scql::engine::op {

FILE: engine/operator/if_null.h
  function namespace (line 19) | namespace scql::engine::op {

FILE: engine/operator/if_null_test.cc
  type scql::engine::op (line 22) | namespace scql::engine::op {
    type IfNullTestCase (line 24) | struct IfNullTestCase {
    class IfNullTest (line 30) | class IfNullTest : public testing::TestWithParam<
    function TEST_P (line 79) | TEST_P(IfNullTest, works) {

FILE: engine/operator/if_test.cc
  type scql::engine::op (line 22) | namespace scql::engine::op {
    type IfTestCase (line 24) | struct IfTestCase {
    class IfTest (line 35) | class IfTest : public ::testing::TestWithParam<
    function TEST_P (line 229) | TEST_P(IfTest, works) {

FILE: engine/operator/in.cc
  type scql::engine::op (line 47) | namespace scql::engine::op {

FILE: engine/operator/in.h
  function namespace (line 27) | namespace scql::engine::op {

FILE: engine/operator/in_test.cc
  type scql::engine::op (line 25) | namespace scql::engine::op {
    type InTestCase (line 27) | struct InTestCase {
    class InTest (line 39) | class InTest : public ::testing::TestWithParam<
    function TEST_P (line 370) | TEST_P(InTest, Works) {

FILE: engine/operator/insert_table.cc
  type scql::engine::op (line 25) | namespace scql::engine::op {
    class ValueVistor (line 36) | class ValueVistor {
      method ValueVistor (line 38) | ValueVistor() = delete;
      method ValueVistor (line 40) | explicit ValueVistor(std::vector<std::string>* result_vector, bool i...
      method Visit (line 47) | arrow::Status Visit(const T& array) {
      method Visit (line 53) | arrow::Status Visit(const arrow::NumericArray<TYPE>& array) {
      method Visit (line 61) | arrow::Status Visit(const arrow::BooleanArray& array) {
      method Visit (line 70) | arrow::Status Visit(const arrow::NumericArray<arrow::Int64Type>& arr...
      method Visit (line 87) | arrow::Status Visit(const arrow::LargeStringArray& array) {
      method QuotingString (line 100) | std::string static QuotingString(std::string_view str) {
    function ColumnsToValues (line 113) | std::string ColumnsToValues(

FILE: engine/operator/insert_table.h
  function namespace (line 21) | namespace scql::engine::op {

FILE: engine/operator/insert_table_mysql_pg_test.cc
  type scql::engine::op (line 34) | namespace scql::engine::op {
    type InsertMysqlOrPgTestCase (line 39) | struct InsertMysqlOrPgTestCase {
    class InsertMysqlOrPgTest (line 46) | class InsertMysqlOrPgTest
      method AssertColumnContentEquals (line 49) | static void AssertColumnContentEquals(
    function TEST_P (line 118) | TEST_P(InsertMysqlOrPgTest, Works) {
  function main (line 182) | int main(int argc, char* argv[]) {

FILE: engine/operator/insert_table_test.cc
  type scql::engine::op (line 26) | namespace scql::engine::op {
    type InsertTableTestCase (line 31) | struct InsertTableTestCase {
    class InsertTableTest (line 38) | class InsertTableTest : public ::testing::TestWithParam<InsertTableTes...
      method SetUp (line 40) | void SetUp() override {
    function TEST_P (line 80) | TEST_P(InsertTableTest, Works) {

FILE: engine/operator/is_null.cc
  type scql::engine::op (line 22) | namespace scql::engine::op {

FILE: engine/operator/is_null.h
  function namespace (line 19) | namespace scql::engine::op {

FILE: engine/operator/is_null_test.cc
  type scql::engine::op (line 22) | namespace scql::engine::op {
    type IsNullTestCase (line 24) | struct IsNullTestCase {
    class IsNullTest (line 29) | class IsNullTest : public testing::TestWithParam<
    function TEST_P (line 68) | TEST_P(IsNullTest, works) {

FILE: engine/operator/join.cc
  type scql::engine::op (line 51) | namespace scql::engine::op {
    function TouchResult (line 174) | bool TouchResult(const std::shared_ptr<yacl::link::Context>& lctx,
    function CreateBucketTensorConstructor (line 179) | std::shared_ptr<BucketTensorConstructor> CreateBucketTensorConstructor(
    function TensorPtr (line 536) | TensorPtr Join::OprfPsiServer(
    function TensorPtr (line 566) | TensorPtr Join::OprfPsiClient(
    function TensorPtr (line 660) | TensorPtr Join::BuildServerResult(

FILE: engine/operator/join.h
  function namespace (line 28) | namespace scql::engine::op {

FILE: engine/operator/join_test.cc
  type scql::engine::op (line 29) | namespace scql::engine::op {
    type JoinTestCase (line 31) | struct JoinTestCase {
    class JoinTest (line 42) | class JoinTest : public ::testing::TestWithParam<
    function AllMatchedJoinIndices (line 56) | std::vector<std::string> AllMatchedJoinIndices(size_t left_count,
    function TEST_P (line 640) | TEST_P(JoinTest, works) {

FILE: engine/operator/limit.cc
  type scql::engine::op (line 23) | namespace scql::engine::op {

FILE: engine/operator/limit.h
  function namespace (line 19) | namespace scql::engine::op {

FILE: engine/operator/limit_test.cc
  type scql::engine::op (line 24) | namespace scql::engine::op {
    type LimitTestCase (line 26) | struct LimitTestCase {
    class LimitTest (line 34) | class LimitTest : public testing::TestWithParam<
    function TEST_P (line 118) | TEST_P(LimitTest, works) {

FILE: engine/operator/logical.cc
  type scql::engine::op (line 25) | namespace scql::engine::op {
    function TensorPtr (line 133) | TensorPtr LogicalAnd::ComputeInPlain(const Tensor& lhs, const Tensor& ...
    function TensorPtr (line 154) | TensorPtr LogicalOr::ComputeInPlain(const Tensor& lhs, const Tensor& r...

FILE: engine/operator/logical.h
  function namespace (line 20) | namespace scql::engine::op {

FILE: engine/operator/logical_test.cc
  type scql::engine::op (line 23) | namespace scql::engine::op {
    type NotTestCase (line 25) | struct NotTestCase {
    class NotTest (line 31) | class NotTest : public testing::TestWithParam<
    function TEST_P (line 71) | TEST_P(NotTest, Works) {

FILE: engine/operator/make_private.cc
  type scql::engine::op (line 21) | namespace scql::engine::op {
    function TensorPtr (line 90) | TensorPtr MakePrivate::RevealPublicString(ExecContext* ctx, const Tens...

FILE: engine/operator/make_private.h
  function namespace (line 19) | namespace scql::engine::op {

FILE: engine/operator/make_private_test.cc
  type scql::engine::op (line 22) | namespace scql::engine::op {
    type MakePrivateTestCase (line 24) | struct MakePrivateTestCase {
    class MakePrivateTest (line 31) | class MakePrivateTest
    function TEST_P (line 85) | TEST_P(MakePrivateTest, Works) {

FILE: engine/operator/make_public.cc
  type scql::engine::op (line 23) | namespace scql::engine::op {

FILE: engine/operator/make_public.h
  function namespace (line 19) | namespace scql::engine::op {

FILE: engine/operator/make_public_test.cc
  type scql::engine::op (line 23) | namespace scql::engine::op {
    type MakePublicTestCase (line 25) | struct MakePublicTestCase {
    class MakePublicTest (line 31) | class MakePublicTest
    function TEST_P (line 71) | TEST_P(MakePublicTest, works) {

FILE: engine/operator/make_share.cc
  type scql::engine::op (line 22) | namespace scql::engine::op {

FILE: engine/operator/make_share.h
  function namespace (line 19) | namespace scql::engine::op {

FILE: engine/operator/make_share_test.cc
  type scql::engine::op (line 22) | namespace scql::engine::op {
    type MakeShareTestCase (line 24) | struct MakeShareTestCase {
    class MakeShareTest (line 31) | class MakeShareTest
    function TEST_P (line 82) | TEST_P(MakeShareTest, works) {

FILE: engine/operator/oblivious_group_agg.cc
  type scql::engine::op (line 27) | namespace scql::engine::op {

FILE: engine/operator/oblivious_group_agg.h
  function RowCount (line 29) | int64_t RowCount(const spu::Value& value) {
  function cut (line 62) | auto cut = spu::kernel::hlo::Slice(ctx, in, {1}, {row_cnt}, {});
  function std (line 94) | const std::string& Type() const override;

FILE: engine/operator/oblivious_group_agg_test.cc
  type scql::engine::op (line 23) | namespace scql::engine::op {
    type ObliviousGroupAggTestCase (line 25) | struct ObliviousGroupAggTestCase {
    class ObliviousGroupAggTest (line 33) | class ObliviousGroupAggTest
      method SetUp (line 37) | void SetUp() override { RegisterAllOps(); }
    function TEST_P (line 42) | TEST_P(ObliviousGroupAggTest, works) {
    function ObliviousGroupAggTestCase (line 376) | static ObliviousGroupAggTestCase GenerateObliviousPercentileDiscTestCase(

FILE: engine/operator/oblivious_group_mark.cc
  type scql::engine::op (line 26) | namespace scql::engine::op {

FILE: engine/operator/oblivious_group_mark.h
  function namespace (line 19) | namespace scql::engine::op {

FILE: engine/operator/oblivious_group_mark_test.cc
  type scql::engine::op (line 22) | namespace scql::engine::op {
    type ObliviousGroupMarkTestCase (line 24) | struct ObliviousGroupMarkTestCase {
    class ObliviousGroupMarkTest (line 29) | class ObliviousGroupMarkTest
    function TEST_P (line 68) | TEST_P(ObliviousGroupMarkTest, works) {

FILE: engine/operator/publish.cc
  type scql::engine::op (line 20) | namespace scql::engine::op {

FILE: engine/operator/publish.h
  function namespace (line 21) | namespace scql::engine::op {

FILE: engine/operator/publish_test.cc
  type scql::engine::op (line 22) | namespace scql::engine::op {
    type PublishTestCase (line 24) | struct PublishTestCase {
    class PublishTest (line 30) | class PublishTest : public ::testing::TestWithParam<PublishTestCase> {
    function TEST_P (line 174) | TEST_P(PublishTest, Works) {

FILE: engine/operator/reduce.cc
  type scql::engine::op (line 35) | namespace scql::engine::op {

FILE: engine/operator/reduce.h
  function class (line 24) | class ReduceBase : public Operator {
  function std (line 112) | const std::string& Type() const override;

FILE: engine/operator/reduce_test.cc
  type scql::engine::op (line 24) | namespace scql::engine::op {
    type ReduceTestCase (line 26) | struct ReduceTestCase {
    function ReduceTestCase (line 34) | static ReduceTestCase GeneratePercentileDiscCase(pb::TensorStatus status,
    class ReduceTest (line 77) | class ReduceTest : public ::testing::TestWithParam<
      method SetUp (line 80) | void SetUp() override { RegisterAllOps(); }
    function TEST_P (line 386) | TEST_P(ReduceTest, Works) {

FILE: engine/operator/replicate.cc
  type scql::engine::op (line 25) | namespace scql::engine::op {

FILE: engine/operator/replicate.h
  function namespace (line 18) | namespace scql::engine::op {

FILE: engine/operator/replicate_test.cc
  type scql::engine::op (line 21) | namespace scql::engine::op {
    type ReplicateTestCase (line 22) | struct ReplicateTestCase {
    class ReplicateTest (line 31) | class ReplicateTest
      method SetUp (line 35) | void SetUp() override {}
    function TEST_P (line 129) | TEST_P(ReplicateTest, Works) {

FILE: engine/operator/run_sql.cc
  type scql::engine::op (line 22) | namespace scql::engine::op {

FILE: engine/operator/run_sql.h
  function namespace (line 19) | namespace scql::engine::op {

FILE: engine/operator/run_sql_test.cc
  type scql::engine::op (line 28) | namespace scql::engine::op {
    class RunSQLTest (line 30) | class RunSQLTest : public ::testing::Test {
      method SetUp (line 32) | void SetUp() override {
    function TEST_F (line 71) | TEST_F(RunSQLTest, normal) {
  function main (line 112) | int main(int argc, char* argv[]) {

FILE: engine/operator/secret_join.cc
  type scql::engine::op (line 39) | namespace scql::engine::op {
    function FillDummyValue (line 45) | std::vector<spu::Value> FillDummyValue(spu::SPUContext* sctx,
    function CountPosition (line 62) | std::tuple<spu::Value, spu::Value> CountPosition(spu::SPUContext* sctx,
    function BuildPerm (line 98) | spu::Value BuildPerm(spu::SPUContext* sctx, const spu::Value& p,

FILE: engine/operator/secret_join.h
  function namespace (line 19) | namespace scql::engine::op {

FILE: engine/operator/secret_join_test.cc
  type scql::engine::op (line 22) | namespace scql::engine::op {
    type SecretJoinTestCase (line 24) | struct SecretJoinTestCase {
    class SecretJoinTest (line 33) | class SecretJoinTest
    function TEST_P (line 198) | TEST_P(SecretJoinTest, works) {

FILE: engine/operator/shape.cc
  type scql::engine::op (line 21) | namespace scql::engine::op {
    function TensorPtr (line 70) | TensorPtr Shape::CreateShapeTensor(ExecContext* ctx,

FILE: engine/operator/shape.h
  function namespace (line 19) | namespace scql::engine::op {

FILE: engine/operator/shape_test.cc
  type scql::engine::op (line 23) | namespace scql::engine::op {
    type ShapeTestCase (line 25) | struct ShapeTestCase {
    class ShapeTest (line 32) | class ShapeTest : public testing::TestWithParam<
    function TEST_P (line 96) | TEST_P(ShapeTest, works) {

FILE: engine/operator/shuffle.cc
  type scql::engine::op (line 22) | namespace scql::engine::op {

FILE: engine/operator/shuffle.h
  function namespace (line 19) | namespace scql::engine::op {

FILE: engine/operator/shuffle_test.cc
  type scql::engine::op (line 24) | namespace scql::engine::op {
    type ShuffleTestCase (line 26) | struct ShuffleTestCase {
    class ShuffleTest (line 32) | class ShuffleTest : public testing::TestWithParam<
    function TEST_P (line 64) | TEST_P(ShuffleTest, Works) {

FILE: engine/operator/sort.cc
  type scql::engine::op (line 27) | namespace scql::engine::op {

FILE: engine/operator/sort.h
  function namespace (line 19) | namespace scql::engine::op {

FILE: engine/operator/sort_test.cc
  type scql::engine::op (line 24) | namespace scql::engine::op {
    type SortTestCase (line 26) | struct SortTestCase {
    class SortTest (line 35) | class SortTest : public testing::TestWithParam<
    function TEST_P (line 237) | TEST_P(SortTest, Works) {

FILE: engine/operator/test_util.cc
  type scql::engine::op::test (line 26) | namespace scql::engine::op::test {
    function ToTensorList (line 32) | pb::TensorList ToTensorList(const std::vector<pb::Tensor>& tensors) {
    function BuildParty (line 43) | pb::JobStartParams::Party BuildParty(const std::string& code, int32_t ...
    function MakeSpuRuntimeConfigForTest (line 52) | spu::RuntimeConfig MakeSpuRuntimeConfigForTest(
    function Make1PCSession (line 64) | std::shared_ptr<Session> Make1PCSession(Router* ds_router,
    function MakeMultiPCSession (line 86) | std::vector<std::shared_ptr<Session>> MakeMultiPCSession(
    function ExecNodeBuilder (line 132) | ExecNodeBuilder& ExecNodeBuilder::SetNodeName(const std::string& node_...
    function ExecNodeBuilder (line 137) | ExecNodeBuilder& ExecNodeBuilder::AddInput(const std::string& name,
    function ExecNodeBuilder (line 144) | ExecNodeBuilder& ExecNodeBuilder::AddInput(
    function ExecNodeBuilder (line 149) | ExecNodeBuilder& ExecNodeBuilder::AddOutput(const std::string& name,
    function ExecNodeBuilder (line 156) | ExecNodeBuilder& ExecNodeBuilder::AddOutput(
    function ExecNodeBuilder (line 161) | ExecNodeBuilder& ExecNodeBuilder::AddStringAttr(const std::string& name,
    function ExecNodeBuilder (line 166) | ExecNodeBuilder& ExecNodeBuilder::AddStringsAttr(
    function ExecNodeBuilder (line 173) | ExecNodeBuilder& ExecNodeBuilder::AddInt64Attr(const std::string& name,
    function ExecNodeBuilder (line 178) | ExecNodeBuilder& ExecNodeBuilder::AddInt64sAttr(
    function ExecNodeBuilder (line 185) | ExecNodeBuilder& ExecNodeBuilder::AddBooleanAttr(const std::string& name,
    function ExecNodeBuilder (line 192) | ExecNodeBuilder& ExecNodeBuilder::AddBooleansAttr(
    function ExecNodeBuilder (line 199) | ExecNodeBuilder& ExecNodeBuilder::AddDoubleAttr(const std::string& name,
    function ExecNodeBuilder (line 204) | ExecNodeBuilder& ExecNodeBuilder::AddDoubleAttrs(
    function ExecNodeBuilder (line 211) | ExecNodeBuilder& ExecNodeBuilder::AddAttr(const std::string& name,
    function MakeTensorReference (line 220) | pb::Tensor MakeTensorReference(const std::string& name,
    function MakeTensorAs (line 235) | pb::Tensor MakeTensorAs(const std::string& name, const pb::Tensor& ref) {
    function FeedInputsAsPrivate (line 242) | void FeedInputsAsPrivate(ExecContext* ctx,
    function FeedInputAsShares (line 251) | void FeedInputAsShares(const std::vector<ExecContext*>& ctxs,
    function FeedInputsAsSecret (line 288) | void FeedInputsAsSecret(const std::vector<ExecContext*>& ctxs,
    function FeedInputsAsPublic (line 295) | void FeedInputsAsPublic(const std::vector<ExecContext*>& ctxs,
    function TensorPtr (line 302) | TensorPtr RevealSecret(const std::vector<ExecContext*>& ctxs,
    function RunOpAsync (line 322) | void RunOpAsync(const std::vector<ExecContext*>& exec_ctxs,
    function CheckTensorEqual (line 349) | void CheckTensorEqual(const TensorPtr& left, const TensorPtr& right) {

FILE: engine/operator/test_util.h
  type SpuRuntimeTestCase (line 50) | struct SpuRuntimeTestCase {
  function class (line 107) | class ExecNodeBuilder {
  function pb (line 149) | inline pb::Tensor MakePrivateTensorReference(const std::string& name,
  function pb (line 155) | inline pb::Tensor MakeSecretTensorReference(const std::string& name,
  type NamedTensor (line 163) | struct NamedTensor {

FILE: engine/operator/trigonometric.cc
  type scql::engine::op (line 31) | namespace scql::engine::op {
    function TensorPtr (line 191) | TensorPtr ATan2::ComputeInPlain(const Tensor& lhs, const Tensor& rhs) {

FILE: engine/operator/trigonometric.h
  function namespace (line 20) | namespace scql::engine::op {

FILE: engine/operator/trigonometric_test.cc
  type scql::engine::op (line 24) | namespace scql::engine::op {
    type TrigonometricFunctionTestCase (line 25) | struct TrigonometricFunctionTestCase {
    type ATan2TestCase (line 34) | struct ATan2TestCase {
    class TrigonometricFunctionTest (line 47) | class TrigonometricFunctionTest
    class ATan2Test (line 57) | class ATan2Test : public ::testing::TestWithParam<
    function TEST_P (line 166) | TEST_P(ATan2Test, atan2_works) {
    function TEST_P (line 374) | TEST_P(TrigonometricFunctionTest, works) {

FILE: engine/operator/unary.cc
  type scql::engine::op (line 25) | namespace scql::engine::op {
    function TensorPtr (line 32) | TensorPtr Abs::ComputeInPlain(const Tensor& in) {
    function TensorPtr (line 50) | TensorPtr Ceil::ComputeInPlain(const Tensor& in) {
    function TensorPtr (line 69) | TensorPtr Floor::ComputeInPlain(const Tensor& in) {
    function TensorPtr (line 85) | TensorPtr Round::ComputeInPlain(const Tensor& in) {
    function TensorPtr (line 102) | TensorPtr Radians::ComputeInPlain(const Tensor& in) {
    function TensorPtr (line 126) | TensorPtr Degrees::ComputeInPlain(const Tensor& in) {
    function TensorPtr (line 151) | TensorPtr Ln::ComputeInPlain(const Tensor& in) {
    function TensorPtr (line 168) | TensorPtr Log10::ComputeInPlain(const Tensor& in) {
    function TensorPtr (line 185) | TensorPtr Log2::ComputeInPlain(const Tensor& in) {
    function TensorPtr (line 202) | TensorPtr Sqrt::ComputeInPlain(const Tensor& in) {
    function TensorPtr (line 219) | TensorPtr Exp::ComputeInPlain(const Tensor& in) {

FILE: engine/operator/unary.h
  function namespace (line 19) | namespace scql::engine::op {

FILE: engine/operator/unary_base.cc
  type scql::engine::op (line 19) | namespace scql::engine::op {

FILE: engine/operator/unary_base.h
  function namespace (line 19) | namespace scql::engine::op {

FILE: engine/operator/unary_test.cc
  type scql::engine::op (line 24) | namespace scql::engine::op {
    type UnaryTestCase (line 25) | struct UnaryTestCase {
    class UnaryTest (line 35) | class UnaryTest : public ::testing::TestWithParam<
      method SetUp (line 38) | void SetUp() override { RegisterAllOps(); }
    function TEST_P (line 276) | TEST_P(UnaryTest, WorksCorrectly) {

FILE: engine/operator/unique.cc
  type scql::engine::op (line 24) | namespace scql::engine::op {

FILE: engine/operator/unique.h
  function namespace (line 19) | namespace scql::engine::op {

FILE: engine/operator/unique_test.cc
  type scql::engine::op (line 23) | namespace scql::engine::op {
    type UniqueTestCase (line 25) | struct UniqueTestCase {
    class UniqueTest (line 30) | class UniqueTest : public testing::TestWithParam<UniqueTestCase> {
    function TEST_P (line 67) | TEST_P(UniqueTest, works) {

FILE: engine/operator/window.cc
  type scql::engine::op (line 29) | namespace scql::engine::op {
    function AreRowsEqual (line 30) | bool AreRowsEqual(const std::shared_ptr<arrow::Table>& table, int64_t i,

FILE: engine/operator/window.h
  function namespace (line 21) | namespace scql::engine::op {

FILE: engine/operator/window_test.cc
  type scql::engine::op (line 22) | namespace scql::engine::op {
    type WindowTestCase (line 23) | struct WindowTestCase {
    class WindowTest (line 33) | class WindowTest : public testing::TestWithParam<WindowTestCase> {
      method SetUp (line 35) | void SetUp() override {}
    function MakeLargeIncrementTensorInput (line 40) | std::string MakeLargeIncrementTensorInput(const size_t size) {
    function MakeAllZeroTensor (line 53) | std::string MakeAllZeroTensor(const size_t size) {
    function TEST_P (line 259) | TEST_P(WindowTest, work) {

FILE: engine/services/engine_service_impl.cc
  function MessageToJsonString (line 59) | std::string MessageToJsonString(const google::protobuf::Message& message) {
  function MergePeerErrors (line 69) | void MergePeerErrors(
  class CredentialExpception (line 84) | class CredentialExpception : std::runtime_error {
    method CredentialExpception (line 86) | explicit CredentialExpception(const std::string& msg)
  type scql::engine (line 93) | namespace scql::engine {
    function CheckGraphChecksum (line 173) | void CheckGraphChecksum(const pb::RunExecutionPlanRequest* request,

FILE: engine/services/engine_service_impl.h
  function namespace (line 31) | namespace scql::engine {

FILE: engine/services/engine_service_impl_test.cc
  type scql::engine (line 44) | namespace scql::engine {
    class MockReportServiceImpl (line 46) | class MockReportServiceImpl : public services::pb::MockReportService {
      method Report (line 48) | void Report(::google::protobuf::RpcController* controller,
    class EngineServiceImplTest (line 68) | class EngineServiceImplTest : public ::testing::Test {
      method SetUp (line 70) | void SetUp() override {
      method CheckJobStatus (line 103) | void CheckJobStatus(pb::JobState pb_state) {
      method SetAndCheckJobStatus (line 113) | void SetAndCheckJobStatus(SessionState state) {
      method CheckJobNodeCount (line 120) | void CheckJobNodeCount(int32_t expected_nodes_count,
    function MockPipeline (line 144) | void MockPipeline(pb::SchedulingPolicy* policy,
    function TEST_F (line 156) | TEST_F(EngineServiceImplTest, QueryJobStatus) {
    function TEST_F (line 234) | TEST_F(EngineServiceImplTest, RunExecutionPlan) {
    function TEST_F (line 262) | TEST_F(EngineServiceImplTest, RunExecutionPlanAsync) {
    type InnerJoinTestCase (line 316) | struct InnerJoinTestCase {
    class EngineServiceImpl2PartiesTest (line 321) | class EngineServiceImpl2PartiesTest
      method SetUp (line 324) | void SetUp() override {
    function TEST_P (line 438) | TEST_P(EngineServiceImpl2PartiesTest, RunExecutionPlan) {
    class MockWaitReportServiceImpl (line 535) | class MockWaitReportServiceImpl : public services::pb::MockReportServi...
      method Report (line 537) | void Report(::google::protobuf::RpcController* controller,
    function TEST_P (line 553) | TEST_P(EngineServiceImpl2PartiesTest, SessionNegotiationSameConf) {
    function TEST_P (line 629) | TEST_P(EngineServiceImpl2PartiesTest, SessionNegotiationDiffConf) {

FILE: engine/services/error_collector_service_impl.cc
  type scql::engine (line 21) | namespace scql::engine {

FILE: engine/services/error_collector_service_impl.h
  function namespace (line 21) | namespace scql::engine {

FILE: engine/services/pipeline.cc
  type scql::engine (line 28) | namespace scql::engine {
    function GetMaxSliceNum (line 30) | size_t GetMaxSliceNum(const std::shared_ptr<yacl::link::Context>& link,

FILE: engine/services/pipeline.h
  function namespace (line 21) | namespace scql::engine {

FILE: engine/services/prometheus_service_impl.cc
  type scql::engine (line 25) | namespace scql::engine {

FILE: engine/services/prometheus_service_impl.h
  function namespace (line 21) | namespace scql::engine {

FILE: engine/services/run_plan_core.cc
  type scql::engine (line 28) | namespace scql::engine {
    function RunPlanCore (line 30) | void RunPlanCore(const pb::RunExecutionPlanRequest& request, Session* ...

FILE: engine/services/run_plan_core.h
  function namespace (line 21) | namespace scql::engine {

FILE: engine/util/communicate_helper.h
  function namespace (line 25) | namespace scql::engine::util {

FILE: engine/util/concurrent_queue.h
  function namespace (line 28) | namespace scql::engine::util {
  function Push (line 56) | void Push(T&& item) {
  function Close (line 97) | void Close() {
  function IsClosed (line 105) | bool IsClosed() { return closed_; }
  function queue_max_block_seconds_ (line 114) | int32_t queue_max_block_seconds_{60};

FILE: engine/util/context_util.cc
  type scql::engine::util (line 20) | namespace scql::engine::util {
    function TensorPtr (line 21) | TensorPtr GetPrivateOrPublicTensor(scql::engine::ExecContext* ctx,

FILE: engine/util/context_util.h
  function namespace (line 19) | namespace scql::engine::util {

FILE: engine/util/copy_to_proto_vistor.h
  function namespace (line 22) | namespace scql::engine::util {

FILE: engine/util/datamesh_helper.cc
  type scql::engine::util (line 19) | namespace scql::engine::util {
    function QueryDomainData (line 21) | dm::DomainData QueryDomainData(std::shared_ptr<grpc::Channel> channel,
    function QueryDomainDataSource (line 44) | dm::DomainDataSource QueryDomainDataSource(

FILE: engine/util/datamesh_helper.h
  function namespace (line 22) | namespace scql::engine::util {

FILE: engine/util/datamesh_helper_test.cc
  type scql::engine::util (line 26) | namespace scql::engine::util {
    class FakeDomainDataService (line 28) | class FakeDomainDataService : public dm::DomainDataService::Service {
      method SetNextResponse (line 30) | void SetNextResponse(const dm::QueryDomainDataResponse& response,
      method QueryDomainData (line 38) | grpc::Status QueryDomainData(grpc::ServerContext* context,
      method WasCalled (line 52) | bool WasCalled() {
      method GetLastRequest (line 56) | dm::QueryDomainDataRequest GetLastRequest() {
    class FakeDomainDataSourceService (line 69) | class FakeDomainDataSourceService
      method SetNextResponse (line 72) | void SetNextResponse(const dm::QueryDomainDataSourceResponse& response,
      method QueryDomainDataSource (line 80) | grpc::Status QueryDomainDataSource(
      method WasCalled (line 95) | bool WasCalled() {
      method GetLastRequest (line 99) | dm::QueryDomainDataSourceRequest GetLastRequest() {
    class DataMeshHelperTest (line 112) | class DataMeshHelperTest : public ::testing::Test {
      method SetUp (line 122) | void SetUp() override {
      method TearDown (line 140) | void TearDown() override {
    function TEST_F (line 150) | TEST_F(DataMeshHelperTest, QueryDomainData_Success) {
    function TEST_F (line 171) | TEST_F(DataMeshHelperTest, QueryDomainData_GrpcError) {
    function TEST_F (line 196) | TEST_F(DataMeshHelperTest, QueryDomainData_ResponseStatusError) {
    function TEST_F (line 226) | TEST_F(DataMeshHelperTest, QueryDomainDataSource_Success) {
    function TEST_F (line 252) | TEST_F(DataMeshHelperTest, QueryDomainDataSource_GrpcError) {
    function TEST_F (line 276) | TEST_F(DataMeshHelperTest, QueryDomainDataSource_ResponseStatusError) {

FILE: engine/util/disk/arrow_reader.cc
  type scql::engine::util::disk (line 20) | namespace scql::engine::util::disk {
    function ReadFileArray (line 33) | std::shared_ptr<arrow::ChunkedArray> ReadFileArray(

FILE: engine/util/disk/arrow_reader.h
  function namespace (line 22) | namespace scql::engine::util::disk {

FILE: engine/util/disk/arrow_writer.cc
  type scql::engine::util::disk (line 25) | namespace scql::engine::util::disk {

FILE: engine/util/disk/arrow_writer.h
  function namespace (line 22) | namespace scql::engine::util::disk {

FILE: engine/util/disk/read_write_bench.cc
  function BM_WriteTest (line 27) | static void BM_WriteTest(benchmark::State& state) {
  function BM_ParallelWriteTest (line 56) | static void BM_ParallelWriteTest(benchmark::State& state) {
  function BM_WriteSmallFileTest (line 90) | static void BM_WriteSmallFileTest(benchmark::State& state) {
  function BM_ReadTest (line 119) | static void BM_ReadTest(benchmark::State& state) {
  function BM_ParallelWriteSmallFileTest (line 149) | static void BM_ParallelWriteSmallFileTest(benchmark::State& state) {

FILE: engine/util/disk/reader_writer_test.cc
  type scql::engine::util::disk (line 26) | namespace scql::engine::util::disk {
    class ReaderWriterTest (line 28) | class ReaderWriterTest : public ::testing::Test {
      method ReaderWriterTest (line 30) | ReaderWriterTest()
    function TEST_F (line 38) | TEST_F(ReaderWriterTest, ReadAndWrite) {

FILE: engine/util/filepath_helper.cc
  type scql::engine::util (line 23) | namespace scql::engine::util {
    function GetS3LikeScheme (line 25) | std::string GetS3LikeScheme(const std::string& url) {
    function CheckS3LikeUrl (line 35) | void CheckS3LikeUrl(const std::string& path_without_prefix, bool is_re...
    function CheckAndGetAbsoluteLocalPath (line 50) | std::string CheckAndGetAbsoluteLocalPath(
    function GetAndRemoveS3EndpointPrefix (line 71) | bool GetAndRemoveS3EndpointPrefix(std::string& endpoint) {
    function CreateDir (line 84) | std::filesystem::path CreateDir(const std::filesystem::path& parent_dir,
    function CreateDirWithRandSuffix (line 97) | std::filesystem::path CreateDirWithRandSuffix(
    function BuildFullPathForPad (line 121) | std::string BuildFullPathForPad(const std::string& path_without_prefix,

FILE: engine/util/filepath_helper.h
  function namespace (line 23) | namespace scql::engine::util {

FILE: engine/util/filepath_helper_test.cc
  type scql::engine::util (line 23) | namespace scql::engine::util {
    function TEST (line 25) | TEST(FilePathTest, CheckAndGetAbsoluteLocalPath) {
    function TEST (line 49) | TEST(FilePathTest, CheckS3LikeUrl) {
    function TEST (line 56) | TEST(FilePathTest, BuildFullPathForPad) {

FILE: engine/util/kpad_task_helper.cc
  type scql::engine::util (line 26) | namespace scql::engine::util {
    function ValidateKpadTaskParams (line 28) | bool ValidateKpadTaskParams(const std::string& cluster_def,
    function ParseClusterDef (line 44) | std::unique_ptr<ClusterDef> ParseClusterDef(const std::string& json_st...
    function ParseScqlConfig (line 139) | std::unique_ptr<scql::pb::ScqlConfig> ParseScqlConfig(
    function GetPartyHost (line 159) | std::string GetPartyHost(const ClusterDef& cluster_def,
    function BuildJobStartParams (line 184) | std::unique_ptr<scql::pb::JobStartParams> BuildJobStartParams(

FILE: engine/util/kpad_task_helper.h
  function namespace (line 25) | namespace scql::engine::util {

FILE: engine/util/kpad_task_helper_test.cc
  type scql::engine::util (line 19) | namespace scql::engine::util {
    function TEST (line 20) | TEST(KpadTaskHelperTest, ParseClusterDefSuccess) {
    function TEST (line 45) | TEST(KpadTaskHelperTest, ParseClusterDefFailure) {
    function TEST (line 52) | TEST(KpadTaskHelperTest, ParseScqlConfigSuccess) {
    function TEST (line 75) | TEST(KpadTaskHelperTest, ParseScqlConfigFailure) {
    function TEST (line 82) | TEST(KpadTaskHelperTest, GetPartyHostSuccess) {
    function TEST (line 97) | TEST(KpadTaskHelperTest, GetPartyHostPartyFailure) {
    function TEST (line 112) | TEST(KpadTaskHelperTest, BuildJobStartParamsSuccess) {
    function TEST (line 143) | TEST(KpadTaskHelperTest, BuildJobStartParamsFailure) {
    type ValidateParamsTestCase (line 162) | struct ValidateParamsTestCase {
    class ValidateKpadTaskParamsTest (line 170) | class ValidateKpadTaskParamsTest
    function TEST_P (line 173) | TEST_P(ValidateKpadTaskParamsTest, Validate) {

FILE: engine/util/logging.cc
  type scql::engine::util (line 24) | namespace scql::engine::util {
    function FromBrpcLogSeverity (line 40) | spdlog::level::level_enum FromBrpcLogSeverity(int severity) {
    class EnginelogSink (line 58) | class EnginelogSink : public ::logging::LogSink {
      method OnLogMessage (line 60) | bool OnLogMessage(int severity, const char* file, int line,
    function SinkBrpcLogWithDefaultLogger (line 69) | void SinkBrpcLogWithDefaultLogger() {
    function GetConsoleSink (line 75) | auto GetConsoleSink() {
    function CreateLogger (line 86) | std::shared_ptr<spdlog::logger> CreateLogger(
    function CreateLogger (line 117) | std::shared_ptr<spdlog::logger> CreateLogger(
    function SetupLogger (line 123) | void SetupLogger(const LogOptions& opts) {
    function CreateDetailLogger (line 131) | std::shared_ptr<spdlog::logger> CreateDetailLogger(
    function DupDefaultLogger (line 138) | std::shared_ptr<spdlog::logger> DupDefaultLogger(

FILE: engine/util/logging.h
  function namespace (line 22) | namespace scql::engine::util {

FILE: engine/util/ndarray_to_arrow.cc
  type scql::engine::util (line 27) | namespace scql::engine::util {
    class NdArrayConverter (line 34) | class NdArrayConverter {
      method NdArrayConverter (line 36) | NdArrayConverter(const spu::NdArrayRef& arr, const spu::NdArrayRef* ...
      method Visit (line 50) | arrow::enable_if_primitive_ctype<T, arrow::Status> Visit(const T& ty...
      method Visit (line 54) | static arrow::Status Visit(const arrow::DataType& type) {
      method IsStrided (line 59) | bool IsStrided() const { return arr_.strides()[0] != 1; }
      method ValidityToBitmap (line 64) | static int64_t ValidityToBitmap(const spu::NdArrayRef* validity,
      method InitNullBitmap (line 85) | arrow::Status InitNullBitmap() {
      method ConvertData (line 96) | arrow::Status ConvertData(std::shared_ptr<arrow::Buffer>* data) {
      method PushArray (line 124) | arrow::Status PushArray(const std::shared_ptr<arrow::ArrayData>& dat...
      method VisitNative (line 130) | arrow::Status VisitNative() {
    function NdArrayToArrow (line 200) | std::shared_ptr<arrow::ChunkedArray> NdArrayToArrow(

FILE: engine/util/ndarray_to_arrow.h
  function namespace (line 21) | namespace scql::engine::util {

FILE: engine/util/prefix_sum.cc
  type scql::engine::util (line 20) | namespace scql::engine::util {
    function ScanParallel (line 31) | void ScanParallel(std::size_t n, const ScanFnParallel& parallel_fn) {
    function Scan (line 69) | spu::Value Scan(spu::SPUContext* ctx, const spu::Value& origin_value,

FILE: engine/util/prefix_sum.h
  function namespace (line 21) | namespace scql::engine::util {

FILE: engine/util/progress_util.h
  function namespace (line 24) | namespace scql::engine::util {
  function class (line 66) | class NormalProgressStats : public ProgressStats {
  function SetCurrentNodeInfo (line 96) | void SetCurrentNodeInfo(
  function class (line 112) | class BatchedProgressStats : public ProgressStats {
  function IncExecutedNodes (line 121) | void IncExecutedNodes() override {}
  function IncExecutedBatch (line 122) | void IncExecutedBatch() override {
  function IncExecutedPipeline (line 126) | void IncExecutedPipeline() override {
  function SetBatchCntInPipeline (line 134) | void SetBatchCntInPipeline(size_t cnt) override {
  function GetNodesCnt (line 139) | size_t GetNodesCnt() override {
  function GetExecutedNodes (line 143) | size_t GetExecutedNodes() override {
  function SetCurrentNodeInfo (line 160) | void SetCurrentNodeInfo(

FILE: engine/util/prometheus_monitor.cc
  type scql::engine::util (line 20) | namespace scql::engine::util {

FILE: engine/util/prometheus_monitor.h
  function namespace (line 22) | namespace scql::engine::util {

FILE: engine/util/psi/batch_provider.cc
  type scql::engine::util (line 30) | namespace scql::engine::util {
    function Combine (line 32) | std::vector<std::string> Combine(const std::vector<std::string>& col1,
    function TensorPtr (line 203) | TensorPtr BucketProvider::CalIntersection(

FILE: engine/util/psi/batch_provider.h
  function namespace (line 33) | namespace scql::engine::util {
  function class (line 62) | class BucketProvider {

FILE: engine/util/psi/batch_provider_test.cc
  type scql::engine::util (line 23) | namespace scql::engine::util {
    class BatchProviderTest (line 25) | class BatchProviderTest : public ::testing::Test {
      method MakeInt64SequenceTensor (line 28) | static std::shared_ptr<Tensor> MakeInt64SequenceTensor(int64_t len) {
      method MakeAlphabetStringTensor (line 39) | static std::shared_ptr<Tensor> MakeAlphabetStringTensor(int64_t len) {
    function TEST_F (line 51) | TEST_F(BatchProviderTest, singleKey) {
    function TEST_F (line 66) | TEST_F(BatchProviderTest, twoKeys) {

FILE: engine/util/psi/cipher_intersection.cc
  type scql::engine::util (line 31) | namespace scql::engine::util {
    function TensorPtr (line 35) | TensorPtr InResultResolver::Finalize() {
    function FinalizeAndComputeIntersection (line 79) | std::vector<std::string> FinalizeAndComputeIntersection(
    function TensorPtr (line 134) | TensorPtr InResultResolverWithBucket::ComputeInResult() {
    function TensorPtr (line 147) | TensorPtr FinalizeAndComputeOprfInResult(
    function FinalizeAndComputeOprfJoinResult (line 191) | std::pair<TensorPtr, std::vector<uint64_t>> FinalizeAndComputeOprfJoin...
    function TensorPtr (line 263) | TensorPtr FinalizeAndComputeJoinIndices(
    function TensorPtr (line 278) | TensorPtr ComputeJoinIndices(
    function TensorPtr (line 352) | TensorPtr FinalizeAndComputeInResult(
    function TensorPtr (line 366) | TensorPtr ComputeInResult(

FILE: engine/util/psi/cipher_intersection.h
  function namespace (line 30) | namespace scql::engine::util {

FILE: engine/util/psi/cipher_intersection_bench.cc
  function BM_InCalResult (line 27) | static void BM_InCalResult(benchmark::State& state) {

FILE: engine/util/psi/cipher_intersection_test.cc
  type scql::engine::util (line 24) | namespace scql::engine::util {
    type JoinTestCase (line 29) | struct JoinTestCase {
    class JoinIndicesTest (line 37) | class JoinIndicesTest : public ::testing::TestWithParam<JoinTestCase> {
      method MakeLeftStore (line 39) | static std::shared_ptr<psi::HashBucketEcPointStore> MakeLeftStore(
      method MakeRightStore (line 51) | static std::shared_ptr<psi::HashBucketEcPointStore> MakeRightStore(
    function TEST_P (line 76) | TEST_P(JoinIndicesTest, works) {

FILE: engine/util/psi/common.cc
  type scql::engine::util (line 25) | namespace scql::engine::util {
    function PsiPlan (line 27) | PsiPlan GetOprfPsiPlan(int64_t self_length, int64_t peer_length) {
    function ExchangeSetSize (line 51) | size_t ExchangeSetSize(const std::shared_ptr<yacl::link::Context>& lin...
    function PsiPlan (line 60) | PsiPlan CoordinatePsiPlan(ExecContext* ctx) {

FILE: engine/util/psi/common.h
  function namespace (line 27) | namespace scql::engine::util {

FILE: engine/util/psi/detail_logger.cc
  type scql::engine::util (line 37) | namespace scql::engine::util {
    function GetItemsNumToWrite (line 39) | size_t GetItemsNumToWrite(size_t start_idx, size_t items_count) {
    function InputStageToString (line 50) | std::string InputStageToString(psi::ecdh::EcdhStage stage) {
    function OutputStageToString (line 59) | std::string OutputStageToString(psi::ecdh::EcdhStage stage) {
    function ScalarToString (line 94) | std::string ScalarToString(std::shared_ptr<arrow::Scalar>& scalar,

FILE: engine/util/psi/detail_logger.h
  function namespace (line 28) | namespace scql::engine::util {

FILE: engine/util/psi/ub_helper.cc
  type scql::engine::util (line 27) | namespace scql::engine::util {
    function OprfPsiServerTransferServerItems (line 30) | void OprfPsiServerTransferServerItems(
    function OprfPsiServerTransferClientItems (line 53) | void OprfPsiServerTransferClientItems(
    function OprfPsiClientTransferServerItems (line 67) | void OprfPsiClientTransferServerItems(
    function OprfPsiClientTransferClientItems (line 89) | void OprfPsiClientTransferClientItems(
    function OprfServerTransferShuffledClientItems (line 118) | void OprfServerTransferShuffledClientItems(
    function OprfCLientTransferShuffledClientItems (line 141) | void OprfCLientTransferShuffledClientItems(

FILE: engine/util/psi/ub_helper.h
  function namespace (line 34) | namespace scql::engine::util {

FILE: engine/util/spu_io.cc
  type scql::engine::util (line 34) | namespace scql::engine::util {
    type SpuPtBufferViewConverter (line 38) | struct SpuPtBufferViewConverter {
      method Convert (line 42) | void Convert(const arrow::Array& array) {
      method Visit (line 47) | arrow::Status Visit(const T& array) {
      method Visit (line 54) | arrow::Status Visit(const arrow::NumericArray<TYPE>& array) {
      method Visit (line 59) | arrow::Status Visit(const arrow::BooleanArray& array) {
    function GetWiderSpuType (line 68) | spu::DataType GetWiderSpuType(const spu::DataType& t1,
    function Invert (line 104) | spu::Value Invert(spu::SPUContext* sctx, const spu::Value& val) {
    function ExpandGroupValueReversely (line 119) | std::vector<spu::Value> ExpandGroupValueReversely(
    function ConcatenateChunkedArray (line 144) | std::shared_ptr<arrow::Array> ConcatenateChunkedArray(
    function TensorPtr (line 221) | TensorPtr SpuOutfeedHelper::DumpPublic(const std::string& name) {
    function RevealValueTo (line 238) | spu::NdArrayRef RevealValueTo(spu::SPUContext* sctx, spu::device::IoCl...
    function TensorPtr (line 257) | TensorPtr SpuOutfeedHelper::RevealTo(const std::string& name, size_t r...

FILE: engine/util/spu_io.h
  function class (line 43) | class SpuVarNameEncoder {
  function InfeedTensorAsPublic (line 54) | void InfeedTensorAsPublic(const std::string& name, const Tensor& tensor) {
  function InfeedTensorAsSecret (line 58) | void InfeedTensorAsSecret(const std::string& name, const Tensor& tensor) {

FILE: engine/util/ssl_helper.cc
  type scql::engine::util (line 20) | namespace scql::engine::util {
    function LoadSslCredentialsOptions (line 22) | grpc::SslCredentialsOptions LoadSslCredentialsOptions(

FILE: engine/util/ssl_helper.h
  function namespace (line 19) | namespace scql::engine::util {

FILE: engine/util/ssl_helper_test.cc
  type scql::engine::util (line 21) | namespace scql::engine::util {
    function TEST (line 23) | TEST(LoadSslCredentialsOptionsTest, Success) {
    function TEST (line 44) | TEST(LoadSslCredentialsOptionsTest, ReadFileFailure) {

FILE: engine/util/stringifier.cc
  type scql::engine::util (line 24) | namespace scql::engine::util {
    function Stringify (line 38) | std::vector<std::string> Stringify(
    function Stringify (line 62) | std::vector<std::string> Stringify(const std::shared_ptr<arrow::Array>...

FILE: engine/util/stringifier.h
  function namespace (line 23) | namespace scql::engine::util {

FILE: engine/util/stringifier_test.cc
  type scql::engine::util (line 21) | namespace scql::engine::util {
    class StringifierTest (line 23) | class StringifierTest : public ::testing::Test {
      method SetUp (line 25) | void SetUp() override {}
    function TEST_F (line 28) | TEST_F(StringifierTest, StringifyBooleanArray) {
    function TEST_F (line 48) | TEST_F(StringifierTest, StringifyInt32Array) {
    function TEST_F (line 72) | TEST_F(StringifierTest, StringifyInt64Array) {
    function TEST_F (line 92) | TEST_F(StringifierTest, StringifyFloatArray) {
    function TEST_F (line 116) | TEST_F(StringifierTest, StringifyDoubleArray) {
    function TEST_F (line 138) | TEST_F(StringifierTest, StringifyStringArray) {
    function TEST_F (line 162) | TEST_F(StringifierTest, StringifyLargeStringArray) {
    function TEST_F (line 180) | TEST_F(StringifierTest, StringifyEmptyArray) {
    function TEST_F (line 191) | TEST_F(StringifierTest, StringifyAllNullArray) {

FILE: engine/util/table_util.cc
  type scql::engine::util (line 20) | namespace scql::engine::util {
    function ConstructTableFromTensors (line 22) | std::shared_ptr<arrow::Table> ConstructTableFromTensors(

FILE: engine/util/table_util.h
  function namespace (line 22) | namespace scql::engine::util {

FILE: engine/util/tensor_util.cc
  type scql::engine::util (line 26) | namespace scql::engine::util {
    function GetStringValue (line 28) | std::string GetStringValue(const pb::Tensor& t) {
    function GetScalarUint32 (line 37) | uint32_t GetScalarUint32(const std::shared_ptr<Tensor>& t) {
    function GetStringValues (line 49) | std::vector<std::string> GetStringValues(const pb::Tensor& t) {
    function GetInt64Value (line 62) | int64_t GetInt64Value(const pb::Tensor& t) {
    function SetStringValues (line 71) | void SetStringValues(pb::Tensor* t, const std::vector<std::string>& va...
    function SetInt64Values (line 79) | void SetInt64Values(pb::Tensor* t, const std::vector<int64_t>& values) {
    function SetDoubleValues (line 87) | void SetDoubleValues(pb::Tensor* t, const std::vector<double>& values) {
    function GetDoubleValue (line 95) | double GetDoubleValue(const pb::Tensor& t) {
    function GetBooleanValue (line 105) | bool GetBooleanValue(const pb::Tensor& t) {
    function SetBooleanValues (line 113) | void SetBooleanValues(pb::Tensor* t, const std::vector<bool>& values) {
    function GetBooleanValues (line 121) | std::vector<bool> GetBooleanValues(const pb::Tensor& t) {
    function GetTensorStatus (line 133) | pb::TensorStatus GetTensorStatus(const pb::Tensor& t) {
    function AreTensorsStatusMatched (line 137) | bool AreTensorsStatusMatched(const RepeatedPbTensor& tensors,
    function AreTensorsStatusMatchedOneOf (line 145) | bool AreTensorsStatusMatchedOneOf(
    function OneOfTensorsStatusMatched (line 164) | bool OneOfTensorsStatusMatched(const RepeatedPbTensor& tensors,
    function IsTensorStatusMatched (line 171) | bool IsTensorStatusMatched(const pb::Tensor& t,
    function AreTensorsStatusEqualAndOneOf (line 176) | bool AreTensorsStatusEqualAndOneOf(const RepeatedPbTensor& tensors,
    function CopyValuesToProto (line 189) | void CopyValuesToProto(const std::shared_ptr<Tensor>& from_tensor,
    function ConvertDateTimeToInt64 (line 199) | std::shared_ptr<Tensor> ConvertDateTimeToInt64(
    function ConvertDateTimeToInt64 (line 209) | std::shared_ptr<arrow::ChunkedArray> ConvertDateTimeToInt64(
    function ConvertDateTimeAndCopyValuesToProto (line 216) | void ConvertDateTimeAndCopyValuesToProto(
    function AreAllBucketTensor (line 227) | bool AreAllBucketTensor(const std::vector<TensorPtr>& tensors) {

FILE: engine/util/tensor_util.h
  function namespace (line 22) | namespace scql::engine::util {

FILE: engine/util/time_util.cc
  type scql::engine::util (line 23) | namespace scql::engine::util {
    function ConvertEpochToStr (line 25) | std::string ConvertEpochToStr(time_t epoch) {
    function TimeZoneToSeconds (line 37) | int64_t TimeZoneToSeconds(const std::string& time_zone) {
    function CompensateTimeZone (line 59) | std::shared_ptr<Tensor> CompensateTimeZone(

FILE: engine/util/time_util.h
  function namespace (line 23) | namespace scql::engine::util {

FILE: engine/util/trace_categories.cc
  type scql::engine::util (line 22) | namespace scql::engine::util {
    function InitializePerfetto (line 24) | void InitializePerfetto() {
    function StartTracing (line 31) | std::unique_ptr<::perfetto::TracingSession> StartTracing(int fd) {
    function StopTracing (line 42) | void StopTracing(std::unique_ptr<::perfetto::TracingSession> tracing_s...

FILE: engine/util/trace_categories.h
  function namespace (line 73) | namespace scql::engine::util {

FILE: engine/util/upload_info_helper.cc
  type scql::engine::util (line 25) | namespace scql::engine::util {
    function ParseUploadInfoFromString (line 26) | std::optional<dataproxy_sdk::pb::UploadInfo> ParseUploadInfoFromString(
    function ConvertProtoToClass (line 36) | dataproxy_sdk::proto::UploadInfo ConvertProtoToClass(
    function ResetColumnsFromSchema (line 72) | void ResetColumnsFromSchema(const std::shared_ptr<arrow::Schema>& schema,
    function ArrowToKusciaType (line 97) | std::string ArrowToKusciaType(const std::shared_ptr<arrow::DataType>& ...

FILE: engine/util/upload_info_helper.h
  function namespace (line 24) | namespace scql::engine::util {

FILE: engine/util/upload_info_helper_test.cc
  class UploadInfoHelperTest (line 23) | class UploadInfoHelperTest : public ::testing::Test {
    method CreateSampleProtoUploadInfo (line 25) | scql_proto::UploadInfo CreateSampleProtoUploadInfo() {
  function TEST_F (line 53) | TEST_F(UploadInfoHelperTest, ParseFromStringWithValidData) {
  function TEST_F (line 84) | TEST_F(UploadInfoHelperTest, ConvertProtoToCustomClassFullData) {
  function TEST_F (line 127) | TEST_F(UploadInfoHelperTest, ResetColumnsFromSchemaTest) {

FILE: examples/opencore-demo/main.go
  type Config (line 38) | type Config struct
  function main (line 51) | func main() {
  function execute (line 85) | func execute(config *Config, graphvizFile string) error {
  function compileSQL (line 113) | func compileSQL(ctx context.Context, config *Config, graphvizFile string...
  function executePlan (line 157) | func executePlan(ctx context.Context, conf *Config, compiledPlan *pb.Com...
  function displayResults (line 332) | func displayResults(result *pb.QueryResult) {
  function loadConfig (line 362) | func loadConfig(filename string) (*Config, error) {
  function printHelp (line 444) | func printHelp() {

FILE: examples/tutorial/mysql/initdb/alice_init.sql
  type `user_credit` (line 5) | CREATE TABLE `user_credit` (

FILE: examples/tutorial/mysql/initdb/bob_init.sql
  type `user_stats` (line 5) | CREATE TABLE `user_stats` (

FILE: pkg/config/tls_config.go
  constant NoTLS (line 25) | NoTLS     string = "notls"
  constant TLS (line 26) | TLS       string = "tls"
  constant MutualTLS (line 27) | MutualTLS string = "mtls"
  type TLSConf (line 30) | type TLSConf struct
  function LoadTLSConfig (line 37) | func LoadTLSConfig(mode, cacertPath, certPath, keyPath string) (*tls.Con...

FILE: pkg/constant/constant.go
  constant SecondsOneDay (line 18) | SecondsOneDay = 24 * 3600
  constant StringElementPlaceHolder (line 22) | StringElementPlaceHolder = `__null__`
  constant DefaultGroupByThreshold (line 26) | DefaultGroupByThreshold uint64 = 4
  constant ReasonCallbackFrontendFail (line 30) | ReasonCallbackFrontendFail = "CallbackFrontendFail"
  constant ReasonSessionNotFound (line 31) | ReasonSessionNotFound      = "SessionNotFound"
  constant ReasonSessionAbnormalQuit (line 32) | ReasonSessionAbnormalQuit  = "SessionAbnormalQuit"
  constant ReasonSessionNormalQuit (line 33) | ReasonSessionNormalQuit    = "SessionNormalQuit"
  constant ReasonInvalidRequest (line 34) | ReasonInvalidRequest       = "InvalidRequest"
  constant ReasonInvalidRequestFormat (line 35) | ReasonInvalidRequestFormat = "InvalidRequestFormat"
  constant ReasonInvalidResponse (line 36) | ReasonInvalidResponse      = "InvalidResponse"
  constant ReasonCallEngineFail (line 37) | ReasonCallEngineFail       = "CallEngineFail"
  function merge (line 49) | func merge(ms ...map[string]bool) map[string]bool {
  constant GMsm3Hash (line 62) | GMsm3Hash  = "GMSM3"
  constant Sha256Hash (line 63) | Sha256Hash = "SHA256"
  function GetGroupByThreshold (line 66) | func GetGroupByThreshold(val uint64) uint64 {

FILE: pkg/executor/engine_client.go
  constant engineCredentialHeader (line 29) | engineCredentialHeader = "Credential"
  function NewEngineClientConn (line 32) | func NewEngineClientConn(endpoint, credential string, tlsCfg *config.TLS...
  function grpcClientCredentialInterceptor (line 58) | func grpcClientCredentialInterceptor(credentialStr string) grpc.UnaryCli...

FILE: pkg/executor/engine_client_test.go
  function TestNewEngineClientConn (line 23) | func TestNewEngineClientConn(t *testing.T) {

FILE: pkg/executor/engine_stub.go
  constant runExecutionPlanPath (line 35) | runExecutionPlanPath = "/SCQLEngineService/RunExecutionPlan"
  constant EngineClientTypeGRPC (line 39) | EngineClientTypeGRPC = "GRPC"
  constant EngineClientTypeHTTP (line 40) | EngineClientTypeHTTP = "HTTP"
  type EngineClient (line 44) | type EngineClient interface
  function NewEngineClient (line 48) | func NewEngineClient(clientType string, timeout time.Duration, tlsCfg *c...
  function NewHttpEngineClient (line 60) | func NewHttpEngineClient(timeout time.Duration, contentType, protocol st...
  function NewGRPCEngineClient (line 68) | func NewGRPCEngineClient(timeout time.Duration, tlsCfg *config.TLSConf) ...
  type HttpEngineClient (line 145) | type HttpEngineClient struct
    method RunExecutionPlan (line 72) | func (h *HttpEngineClient) RunExecutionPlan(host, credential string, e...
    method Post (line 120) | func (h *HttpEngineClient) Post(ctx context.Context, url, credential, ...
  type GrpcEngineClient (line 151) | type GrpcEngineClient struct
    method RunExecutionPlan (line 102) | func (g *GrpcEngineClient) RunExecutionPlan(url, credential string, ex...
  type EngineStub (line 157) | type EngineStub struct
  function NewEngineStub (line 165) | func NewEngineStub(

FILE: pkg/executor/engine_stub_mock.go
  type MockEngineClient (line 20) | type MockEngineClient struct
    method EXPECT (line 39) | func (m *MockEngineClient) EXPECT() *MockEngineClientMockRecorder {
    method RunExecutionPlan (line 44) | func (m *MockEngineClient) RunExecutionPlan(url, credential string, ex...
  type MockEngineClientMockRecorder (line 27) | type MockEngineClientMockRecorder struct
    method RunExecutionPlan (line 53) | func (mr *MockEngineClientMockRecorder) RunExecutionPlan(url, credenti...
  function NewMockEngineClient (line 32) | func NewMockEngineClient(ctrl *gomock.Controller) *MockEngineClient {

FILE: pkg/executor/engine_stub_test.go
  type TestBody (line 31) | type TestBody struct
  function TestHttpClientPost (line 37) | func TestHttpClientPost(t *testing.T) {

FILE: pkg/executor/executor.go
  type Executor (line 32) | type Executor struct
    method RunExecutionPlan (line 80) | func (exec *Executor) RunExecutionPlan(ctx context.Context, engineAsyn...
    method RunExecutionPlanCore (line 98) | func (exec *Executor) RunExecutionPlanCore(ctx context.Context, engine...
    method HandleResultCallback (line 219) | func (exec *Executor) HandleResultCallback(req *scql.ReportRequest) (f...
  type ResponseInfo (line 46) | type ResponseInfo struct
  function NewExecutor (line 51) | func NewExecutor(plans map[string]*scql.RunExecutionPlanRequest, outputN...
  function CheckResultSchemas (line 239) | func CheckResultSchemas(outCols []*scql.Tensor, expectColNames []string)...
  function find (line 252) | func find(ss []string, s string) (int, error) {

FILE: pkg/executor/executor_test.go
  type mockGrpcEngineStub (line 29) | type mockGrpcEngineStub struct
    method RunExecutionPlan (line 35) | func (client *mockGrpcEngineStub) RunExecutionPlan(url, credential str...
    method Post (line 43) | func (client *mockGrpcEngineStub) Post(ctx context.Context, url, crede...
  function createMockPartyInfo (line 48) | func createMockPartyInfo() *graph.PartyInfo {
  function createTestExecutionGraph (line 64) | func createTestExecutionGraph(partyInfo *graph.PartyInfo, outputName str...
  function createMockEngineStub (line 118) | func createMockEngineStub(sessionID string, outputName string, mockValue...
  function TestSyncExecutor (line 140) | func TestSyncExecutor(t *testing.T) {
  function TestFind (line 179) | func TestFind(t *testing.T) {

FILE: pkg/expression/aggregation/aggregation.go
  function IsAllFirstRow (line 21) | func IsAllFirstRow(aggFuncs []*AggFuncDesc) bool {
  type AggFunctionMode (line 31) | type AggFunctionMode
  constant CompleteMode (line 43) | CompleteMode AggFunctionMode = iota
  constant FinalMode (line 44) | FinalMode
  constant Partial1Mode (line 45) | Partial1Mode
  constant Partial2Mode (line 46) | Partial2Mode
  constant DedupMode (line 47) | DedupMode

FILE: pkg/expression/aggregation/base_func.go
  type baseFuncDesc (line 34) | type baseFuncDesc struct
    method equal (line 49) | func (a *baseFuncDesc) equal(ctx sessionctx.Context, other *baseFuncDe...
    method clone (line 61) | func (a *baseFuncDesc) clone() *baseFuncDesc {
    method String (line 73) | func (a *baseFuncDesc) String() string {
    method typeInfer (line 87) | func (a *baseFuncDesc) typeInfer(ctx sessionctx.Context) error {
    method typeInfer4PercentileDisc (line 122) | func (a *baseFuncDesc) typeInfer4PercentileDisc(ctx sessionctx.Context...
    method typeInfer4Count (line 142) | func (a *baseFuncDesc) typeInfer4Count(ctx sessionctx.Context) {
    method typeInfer4Sum (line 150) | func (a *baseFuncDesc) typeInfer4Sum(ctx sessionctx.Context) {
    method typeInfer4Avg (line 165) | func (a *baseFuncDesc) typeInfer4Avg(ctx sessionctx.Context) {
    method typeInfer4GroupConcat (line 185) | func (a *baseFuncDesc) typeInfer4GroupConcat(ctx sessionctx.Context) {
    method typeInfer4MaxMin (line 193) | func (a *baseFuncDesc) typeInfer4MaxMin(ctx sessionctx.Context) {
    method typeInfer4NumberFuncs (line 215) | func (a *baseFuncDesc) typeInfer4NumberFuncs() {
    method typeInfer4CumeDist (line 221) | func (a *baseFuncDesc) typeInfer4CumeDist() {
    method typeInfer4Ntile (line 226) | func (a *baseFuncDesc) typeInfer4Ntile() {
    method typeInfer4PercentRank (line 233) | func (a *baseFuncDesc) typeInfer4PercentRank() {
    method typeInfer4LeadLag (line 238) | func (a *baseFuncDesc) typeInfer4LeadLag(ctx sessionctx.Context) {
    method typeInfer4PopOrSamp (line 247) | func (a *baseFuncDesc) typeInfer4PopOrSamp(ctx sessionctx.Context) {
    method GetDefaultValue (line 269) | func (a *baseFuncDesc) GetDefaultValue() (v types.Datum) {
    method WrapCastForAggArgs (line 290) | func (a *baseFuncDesc) WrapCastForAggArgs(ctx sessionctx.Context) {
  function newBaseFuncDesc (line 43) | func newBaseFuncDesc(ctx sessionctx.Context, name string, args []express...

FILE: pkg/expression/aggregation/descriptor.go
  type AggFuncDesc (line 26) | type AggFuncDesc struct
    method Equal (line 46) | func (a *AggFuncDesc) Equal(ctx sessionctx.Context, other *AggFuncDesc...
    method Clone (line 54) | func (a *AggFuncDesc) Clone() *AggFuncDesc {
    method EvalNullValueInOuterJoin (line 94) | func (a *AggFuncDesc) EvalNullValueInOuterJoin(ctx sessionctx.Context,...
    method evalNullValueInOuterJoin4Count (line 112) | func (a *AggFuncDesc) evalNullValueInOuterJoin4Count(ctx sessionctx.Co...
    method evalNullValueInOuterJoin4Sum (line 123) | func (a *AggFuncDesc) evalNullValueInOuterJoin4Sum(ctx sessionctx.Cont...
    method evalNullValueInOuterJoin4BitAnd (line 132) | func (a *AggFuncDesc) evalNullValueInOuterJoin4BitAnd(ctx sessionctx.C...
    method evalNullValueInOuterJoin4BitOr (line 141) | func (a *AggFuncDesc) evalNullValueInOuterJoin4BitOr(ctx sessionctx.Co...
  function NewAggFuncDesc (line 37) | func NewAggFuncDesc(ctx sessionctx.Context, name string, args []expressi...

FILE: pkg/expression/aggregation/util.go
  type distinctChecker (line 24) | type distinctChecker struct
    method Check (line 40) | func (d *distinctChecker) Check(values []types.Datum) (bool, error) {
  function createDistinctChecker (line 32) | func createDistinctChecker(sc *stmtctx.StatementContext) *distinctChecker {

FILE: pkg/expression/aggregation/window_func.go
  type WindowFuncDesc (line 25) | type WindowFuncDesc struct
  function NewWindowFuncDesc (line 30) | func NewWindowFuncDesc(ctx sessionctx.Context, name string, args []expre...
  function NeedFrame (line 74) | func NeedFrame(name string) bool {

FILE: pkg/expression/builtin.go
  type baseBuiltinFunc (line 34) | type baseBuiltinFunc struct
    method getArgs (line 56) | func (b *baseBuiltinFunc) getArgs() []Expression {
    method vecEvalInt (line 60) | func (b *baseBuiltinFunc) vecEvalInt(input *chunk.Chunk, result *chunk...
    method vecEvalReal (line 64) | func (b *baseBuiltinFunc) vecEvalReal(input *chunk.Chunk, result *chun...
    method vecEvalString (line 68) | func (b *baseBuiltinFunc) vecEvalString(input *chunk.Chunk, result *ch...
    method vecEvalDecimal (line 72) | func (b *baseBuiltinFunc) vecEvalDecimal(input *chunk.Chunk, result *c...
    method vecEvalTime (line 76) | func (b *baseBuiltinFunc) vecEvalTime(input *chunk.Chunk, result *chun...
    method vecEvalDuration (line 80) | func (b *baseBuiltinFunc) vecEvalDuration(input *chunk.Chunk, result *...
    method vecEvalJSON (line 84) | func (b *baseBuiltinFunc) vecEvalJSON(input *chunk.Chunk, result *chun...
    method evalInt (line 88) | func (b *baseBuiltinFunc) evalInt(row chunk.Row) (int64, bool, error) {
    method evalReal (line 92) | func (b *baseBuiltinFunc) evalReal(row chunk.Row) (float64, bool, erro...
    method evalString (line 96) | func (b *baseBuiltinFunc) evalString(row chunk.Row) (string, bool, err...
    method evalDecimal (line 100) | func (b *baseBuiltinFunc) evalDecimal(row chunk.Row) (*types.MyDecimal...
    method evalTime (line 104) | func (b *baseBuiltinFunc) evalTime(row chunk.Row) (types.Time, bool, e...
    method evalDuration (line 108) | func (b *baseBuiltinFunc) evalDuration(row chunk.Row) (types.Duration,...
    method getRetTp (line 112) | func (b *baseBuiltinFunc) getRetTp() *types.FieldType {
    method equal (line 116) | func (b *baseBuiltinFunc) equal(fun builtinFunc) bool {
    method getCtx (line 129) | func (b *baseBuiltinFunc) getCtx() sessionctx.Context {
    method cloneFrom (line 133) | func (b *baseBuiltinFunc) cloneFrom(from *baseBuiltinFunc) {
    method setDecimalAndFlenForDatetime (line 142) | func (b *baseBuiltinFunc) setDecimalAndFlenForDatetime(fsp int) {
    method setDecimalAndFlenForDate (line 151) | func (b *baseBuiltinFunc) setDecimalAndFlenForDate() {
    method setDecimalAndFlenForTime (line 157) | func (b *baseBuiltinFunc) setDecimalAndFlenForTime(fsp int) {
  function newBaseBuiltinFunc (line 45) | func newBaseBuiltinFunc(ctx sessionctx.Context, args []Expression) baseB...
  type builtinFunc (line 166) | type builtinFunc interface
  type builtinFuncNew (line 194) | type builtinFuncNew interface
  type functionClass (line 199) | type functionClass interface
  type baseFunctionClass (line 205) | type baseFunctionClass struct
    method verifyArgs (line 211) | func (b *baseFunctionClass) verifyArgs(args []Expression) error {
  function newBaseBuiltinFuncWithTp (line 222) | func newBaseBuiltinFuncWithTp(ctx sessionctx.Context, args []Expression,...
  type baseBuiltinCastFunc (line 416) | type baseBuiltinCastFunc struct
    method cloneFrom (line 423) | func (b *baseBuiltinCastFunc) cloneFrom(from *baseBuiltinCastFunc) {
  function newBaseBuiltinCastFunc (line 428) | func newBaseBuiltinCastFunc(builtinFunc baseBuiltinFunc, inUnion bool) b...
  type builtinSubstring2ArgsSig (line 435) | type builtinSubstring2ArgsSig struct
    method Clone (line 439) | func (b *builtinSubstring2ArgsSig) Clone() builtinFunc {
    method evalString (line 447) | func (b *builtinSubstring2ArgsSig) evalString(row chunk.Row) (string, ...
  type builtinSubstring2ArgsUTF8Sig (line 468) | type builtinSubstring2ArgsUTF8Sig struct
    method Clone (line 472) | func (b *builtinSubstring2ArgsUTF8Sig) Clone() builtinFunc {
    method evalString (line 480) | func (b *builtinSubstring2ArgsUTF8Sig) evalString(row chunk.Row) (stri...
  type builtinSubstring3ArgsSig (line 502) | type builtinSubstring3ArgsSig struct
    method Clone (line 506) | func (b *builtinSubstring3ArgsSig) Clone() builtinFunc {
    method evalString (line 514) | func (b *builtinSubstring3ArgsSig) evalString(row chunk.Row) (string, ...
  type builtinSubstring3ArgsUTF8Sig (line 545) | type builtinSubstring3ArgsUTF8Sig struct
    method Clone (line 549) | func (b *builtinSubstring3ArgsUTF8Sig) Clone() builtinFunc {
    method evalString (line 557) | func (b *builtinSubstring3ArgsUTF8Sig) evalString(row chunk.Row) (stri...

FILE: pkg/expression/builtin_arithmetic.go
  constant precIncrement (line 58) | precIncrement = 4
  function numericContextResultType (line 62) | func numericContextResultType(ft *types.FieldType) types.EvalType {
  function setFlenDecimal4Int (line 84) | func setFlenDecimal4Int(retTp, a, b *types.FieldType) {
  function setFlenDecimal4RealOrDecimal (line 91) | func setFlenDecimal4RealOrDecimal(retTp, a, b *types.FieldType, isReal b...
  type arithmeticPlusFunctionClass (line 150) | type arithmeticPlusFunctionClass struct
    method getFunction (line 154) | func (c *arithmeticPlusFunctionClass) getFunction(ctx sessionctx.Conte...
  type builtinArithmeticPlusIntSig (line 181) | type builtinArithmeticPlusIntSig struct
    method Clone (line 185) | func (s *builtinArithmeticPlusIntSig) Clone() builtinFunc {
  type builtinArithmeticPlusDecimalSig (line 191) | type builtinArithmeticPlusDecimalSig struct
    method Clone (line 195) | func (s *builtinArithmeticPlusDecimalSig) Clone() builtinFunc {
  type builtinArithmeticPlusRealSig (line 201) | type builtinArithmeticPlusRealSig struct
    method Clone (line 205) | func (s *builtinArithmeticPlusRealSig) Clone() builtinFunc {
  type arithmeticMinusFunctionClass (line 211) | type arithmeticMinusFunctionClass struct
    method getFunction (line 215) | func (c *arithmeticMinusFunctionClass) getFunction(ctx sessionctx.Cont...
  type builtinArithmeticMinusIntSig (line 242) | type builtinArithmeticMinusIntSig struct
    method Clone (line 246) | func (s *builtinArithmeticMinusIntSig) Clone() builtinFunc {
  type builtinArithmeticMinusDecimalSig (line 252) | type builtinArithmeticMinusDecimalSig struct
    method Clone (line 256) | func (s *builtinArithmeticMinusDecimalSig) Clone() builtinFunc {
  type builtinArithmeticMinusRealSig (line 262) | type builtinArithmeticMinusRealSig struct
    method Clone (line 266) | func (s *builtinArithmeticMinusRealSig) Clone() builtinFunc {
  type arithmeticIntDivideFunctionClass (line 272) | type arithmeticIntDivideFunctionClass struct
    method getFunction (line 276) | func (c *arithmeticIntDivideFunctionClass) getFunction(ctx sessionctx....
  type builtinArithmeticIntDivideIntSig (line 290) | type builtinArithmeticIntDivideIntSig struct
    method Clone (line 292) | func (s *builtinArithmeticIntDivideIntSig) Clone() builtinFunc {
  type arithmeticModFunctionClass (line 298) | type arithmeticModFunctionClass struct
    method getFunction (line 302) | func (c *arithmeticModFunctionClass) getFunction(ctx sessionctx.Contex...
  type builtinArithmeticModIntSig (line 319) | type builtinArithmeticModIntSig struct
    method Clone (line 323) | func (s *builtinArithmeticModIntSig) Clone() builtinFunc {
  type arithmeticMultiplyFunctionClass (line 329) | type arithmeticMultiplyFunctionClass struct
    method getFunction (line 333) | func (c *arithmeticMultiplyFunctionClass) getFunction(ctx sessionctx.C...
  type builtinArithmeticMultiplyRealSig (line 367) | type builtinArithmeticMultiplyRealSig struct
    method Clone (line 369) | func (s *builtinArithmeticMultiplyRealSig) Clone() builtinFunc {
    method evalReal (line 399) | func (s *builtinArithmeticMultiplyRealSig) evalReal(row chunk.Row) (fl...
  type builtinArithmeticMultiplyDecimalSig (line 375) | type builtinArithmeticMultiplyDecimalSig struct
    method Clone (line 377) | func (s *builtinArithmeticMultiplyDecimalSig) Clone() builtinFunc {
    method evalDecimal (line 415) | func (s *builtinArithmeticMultiplyDecimalSig) evalDecimal(row chunk.Ro...
  type builtinArithmeticMultiplyIntUnsignedSig (line 383) | type builtinArithmeticMultiplyIntUnsignedSig struct
    method Clone (line 385) | func (s *builtinArithmeticMultiplyIntUnsignedSig) Clone() builtinFunc {
    method evalInt (line 432) | func (s *builtinArithmeticMultiplyIntUnsignedSig) evalInt(row chunk.Ro...
  type builtinArithmeticMultiplyIntSig (line 391) | type builtinArithmeticMultiplyIntSig struct
    method Clone (line 393) | func (s *builtinArithmeticMultiplyIntSig) Clone() builtinFunc {
    method evalInt (line 450) | func (s *builtinArithmeticMultiplyIntSig) evalInt(row chunk.Row) (val ...
  type arithmeticDivideFunctionClass (line 466) | type arithmeticDivideFunctionClass struct
    method setType4DivDecimal (line 123) | func (c *arithmeticDivideFunctionClass) setType4DivDecimal(retTp, a, b...
    method setType4DivReal (line 145) | func (c *arithmeticDivideFunctionClass) setType4DivReal(retTp *types.F...
    method getFunction (line 470) | func (c *arithmeticDivideFunctionClass) getFunction(ctx sessionctx.Con...
  type builtinArithmeticDivideRealSig (line 490) | type builtinArithmeticDivideRealSig struct
    method Clone (line 492) | func (s *builtinArithmeticDivideRealSig) Clone() builtinFunc {
    method evalReal (line 506) | func (s *builtinArithmeticDivideRealSig) evalReal(row chunk.Row) (floa...
  type builtinArithmeticDivideDecimalSig (line 498) | type builtinArithmeticDivideDecimalSig struct
    method Clone (line 500) | func (s *builtinArithmeticDivideDecimalSig) Clone() builtinFunc {
    method evalDecimal (line 525) | func (s *builtinArithmeticDivideDecimalSig) evalDecimal(row chunk.Row)...

FILE: pkg/expression/builtin_cast.go
  type castAsIntFunctionClass (line 77) | type castAsIntFunctionClass struct
    method getFunction (line 83) | func (c *castAsIntFunctionClass) getFunction(ctx sessionctx.Context, a...
  type castAsRealFunctionClass (line 109) | type castAsRealFunctionClass struct
    method getFunction (line 115) | func (c *castAsRealFunctionClass) getFunction(ctx sessionctx.Context, ...
  type castAsDecimalFunctionClass (line 146) | type castAsDecimalFunctionClass struct
    method getFunction (line 152) | func (c *castAsDecimalFunctionClass) getFunction(ctx sessionctx.Contex...
  type castAsStringFunctionClass (line 183) | type castAsStringFunctionClass struct
    method getFunction (line 189) | func (c *castAsStringFunctionClass) getFunction(ctx sessionctx.Context...
  type builtinCastIntAsIntSig (line 215) | type builtinCastIntAsIntSig struct
    method Clone (line 219) | func (b *builtinCastIntAsIntSig) Clone() builtinFunc {
  type builtinCastIntAsRealSig (line 225) | type builtinCastIntAsRealSig struct
    method Clone (line 229) | func (b *builtinCastIntAsRealSig) Clone() builtinFunc {
  type builtinCastIntAsDecimalSig (line 235) | type builtinCastIntAsDecimalSig struct
    method Clone (line 239) | func (b *builtinCastIntAsDecimalSig) Clone() builtinFunc {
  type builtinCastIntAsStringSig (line 245) | type builtinCastIntAsStringSig struct
    method Clone (line 249) | func (b *builtinCastIntAsStringSig) Clone() builtinFunc {
  type builtinCastRealAsRealSig (line 255) | type builtinCastRealAsRealSig struct
    method Clone (line 259) | func (b *builtinCastRealAsRealSig) Clone() builtinFunc {
  type builtinCastRealAsIntSig (line 265) | type builtinCastRealAsIntSig struct
    method Clone (line 269) | func (b *builtinCastRealAsIntSig) Clone() builtinFunc {
  type builtinCastRealAsDecimalSig (line 275) | type builtinCastRealAsDecimalSig struct
    method Clone (line 279) | func (b *builtinCastRealAsDecimalSig) Clone() builtinFunc {
  type builtinCastRealAsStringSig (line 285) | type builtinCastRealAsStringSig struct
    method Clone (line 289) | func (b *builtinCastRealAsStringSig) Clone() builtinFunc {
  type builtinCastDecimalAsDecimalSig (line 295) | type builtinCastDecimalAsDecimalSig struct
    method Clone (line 299) | func (b *builtinCastDecimalAsDecimalSig) Clone() builtinFunc {
  type builtinCastDecimalAsIntSig (line 305) | type builtinCastDecimalAsIntSig struct
    method Clone (line 309) | func (b *builtinCastDecimalAsIntSig) Clone() builtinFunc {
  type builtinCastDecimalAsStringSig (line 315) | type builtinCastDecimalAsStringSig struct
    method Clone (line 319) | func (b *builtinCastDecimalAsStringSig) Clone() builtinFunc {
  type builtinCastDecimalAsRealSig (line 325) | type builtinCastDecimalAsRealSig struct
    method Clone (line 329) | func (b *builtinCastDecimalAsRealSig) Clone() builtinFunc {
  type builtinCastStringAsStringSig (line 335) | type builtinCastStringAsStringSig struct
    method Clone (line 339) | func (b *builtinCastStringAsStringSig) Clone() builtinFunc {
  type builtinCastStringAsIntSig (line 345) | type builtinCastStringAsIntSig struct
    method Clone (line 349) | func (b *builtinCastStringAsIntSig) Clone() builtinFunc {
  type builtinCastStringAsRealSig (line 355) | type builtinCastStringAsRealSig struct
    method Clone (line 359) | func (b *builtinCastStringAsRealSig) Clone() builtinFunc {
  type builtinCastStringAsDecimalSig (line 365) | type builtinCastStringAsDecimalSig struct
    method Clone (line 369) | func (b *builtinCastStringAsDecimalSig) Clone() builtinFunc {
  type inCastContext (line 377) | type inCastContext
    method String (line 379) | func (i inCastContext) String() string {
  constant inUnionCastContext (line 386) | inUnionCastContext inCastContext = 0
  function hasSpecialCast (line 391) | func hasSpecialCast(ctx sessionctx.Context, expr Expression, tp *types.F...
  function BuildCastFunction4Union (line 407) | func BuildCastFunction4Union(ctx sessionctx.Context, expr Expression, tp...
  function BuildCastFunction (line 416) | func BuildCastFunction(ctx sessionctx.Context, expr Expression, tp *type...
  function WrapWithCastAsInt (line 449) | func WrapWithCastAsInt(ctx sessionctx.Context, expr Expression) Expressi...
  function WrapWithCastAsReal (line 462) | func WrapWithCastAsReal(ctx sessionctx.Context, expr Expression) Express...
  function WrapWithCastAsDecimal (line 475) | func WrapWithCastAsDecimal(ctx sessionctx.Context, expr Expression) Expr...
  function WrapWithCastAsTime (line 491) | func WrapWithCastAsTime(ctx sessionctx.Context, expr Expression, tp *typ...
  function WrapWithCastAsString (line 519) | func WrapWithCastAsString(ctx sessionctx.Context, expr Expression) Expre...
  function WrapWithCastAsDuration (line 543) | func WrapWithCastAsDuration(ctx sessionctx.Context, expr Expression) Exp...
  function WrapWithCastAsJSON (line 563) | func WrapWithCastAsJSON(ctx sessionctx.Context, expr Expression) Express...
  type castAsTimeFunctionClass (line 578) | type castAsTimeFunctionClass struct
    method getFunction (line 584) | func (c *castAsTimeFunctionClass) getFunction(ctx sessionctx.Context, ...
  type builtinCastIntAsTimeSig (line 608) | type builtinCastIntAsTimeSig struct
    method Clone (line 612) | func (b *builtinCastIntAsTimeSig) Clone() builtinFunc {
    method evalTime (line 618) | func (b *builtinCastIntAsTimeSig) evalTime(row chunk.Row) (res types.T...
  type builtinCastRealAsTimeSig (line 622) | type builtinCastRealAsTimeSig struct
    method Clone (line 626) | func (b *builtinCastRealAsTimeSig) Clone() builtinFunc {
    method evalTime (line 632) | func (b *builtinCastRealAsTimeSig) evalTime(row chunk.Row) (types.Time...
  type builtinCastDecimalAsTimeSig (line 636) | type builtinCastDecimalAsTimeSig struct
    method Clone (line 640) | func (b *builtinCastDecimalAsTimeSig) Clone() builtinFunc {
    method evalTime (line 646) | func (b *builtinCastDecimalAsTimeSig) evalTime(row chunk.Row) (res typ...
  type builtinCastTimeAsTimeSig (line 650) | type builtinCastTimeAsTimeSig struct
    method Clone (line 654) | func (b *builtinCastTimeAsTimeSig) Clone() builtinFunc {
    method evalTime (line 660) | func (b *builtinCastTimeAsTimeSig) evalTime(row chunk.Row) (res types....
  type builtinCastStringAsTimeSig (line 679) | type builtinCastStringAsTimeSig struct
    method Clone (line 683) | func (b *builtinCastStringAsTimeSig) Clone() builtinFunc {
    method evalTime (line 689) | func (b *builtinCastStringAsTimeSig) evalTime(row chunk.Row) (res type...
  type builtinCastTimeAsIntSig (line 706) | type builtinCastTimeAsIntSig struct
    method Clone (line 710) | func (b *builtinCastTimeAsIntSig) Clone() builtinFunc {
    method evalInt (line 716) | func (b *builtinCastTimeAsIntSig) evalInt(row chunk.Row) (res int64, i...
  type builtinCastTimeAsRealSig (line 720) | type builtinCastTimeAsRealSig struct
    method Clone (line 724) | func (b *builtinCastTimeAsRealSig) Clone() builtinFunc {
    method evalReal (line 730) | func (b *builtinCastTimeAsRealSig) evalReal(row chunk.Row) (res float6...
  type builtinCastTimeAsDecimalSig (line 734) | type builtinCastTimeAsDecimalSig struct
    method Clone (line 738) | func (b *builtinCastTimeAsDecimalSig) Clone() builtinFunc {
    method evalDecimal (line 744) | func (b *builtinCastTimeAsDecimalSig) evalDecimal(row chunk.Row) (res ...
  type builtinCastTimeAsStringSig (line 748) | type builtinCastTimeAsStringSig struct
    method Clone (line 752) | func (b *builtinCastTimeAsStringSig) Clone() builtinFunc {
    method evalString (line 758) | func (b *builtinCastTimeAsStringSig) evalString(row chunk.Row) (res st...

FILE: pkg/expression/builtin_compare.go
  type compareFunctionClass (line 43) | type compareFunctionClass struct
    method getFunction (line 50) | func (c *compareFunctionClass) getFunction(ctx sessionctx.Context, raw...
    method generateCmpSigs (line 61) | func (c *compareFunctionClass) generateCmpSigs(ctx sessionctx.Context,...
    method refineArgs (line 767) | func (c *compareFunctionClass) refineArgs(ctx sessionctx.Context, args...
  function getBaseCmpType (line 146) | func getBaseCmpType(lhs, rhs types.EvalType, lft, rft *types.FieldType) ...
  function GetAccurateCmpType (line 170) | func GetAccurateCmpType(lhs, rhs Expression) types.EvalType {
  type builtinLTIntSig (line 178) | type builtinLTIntSig struct
    method Clone (line 182) | func (b *builtinLTIntSig) Clone() builtinFunc {
  type builtinLTStringSig (line 188) | type builtinLTStringSig struct
    method Clone (line 192) | func (b *builtinLTStringSig) Clone() builtinFunc {
  type builtinEQIntSig (line 198) | type builtinEQIntSig struct
    method Clone (line 212) | func (b *builtinEQIntSig) Clone() builtinFunc {
  type builtinEQStringSig (line 202) | type builtinEQStringSig struct
    method Clone (line 206) | func (b *builtinEQStringSig) Clone() builtinFunc {
  type builtinLEIntSig (line 218) | type builtinLEIntSig struct
    method Clone (line 222) | func (b *builtinLEIntSig) Clone() builtinFunc {
  type builtinLEStringSig (line 228) | type builtinLEStringSig struct
    method Clone (line 232) | func (b *builtinLEStringSig) Clone() builtinFunc {
  type builtinGTIntSig (line 238) | type builtinGTIntSig struct
    method Clone (line 242) | func (b *builtinGTIntSig) Clone() builtinFunc {
  type builtinGTStringSig (line 248) | type builtinGTStringSig struct
    method Clone (line 252) | func (b *builtinGTStringSig) Clone() builtinFunc {
  type builtinGEIntSig (line 258) | type builtinGEIntSig struct
    method Clone (line 262) | func (b *builtinGEIntSig) Clone() builtinFunc {
  type builtinGEStringSig (line 268) | type builtinGEStringSig struct
    method Clone (line 272) | func (b *builtinGEStringSig) Clone() builtinFunc {
  type builtinNEIntSig (line 278) | type builtinNEIntSig struct
    method Clone (line 282) | func (b *builtinNEIntSig) Clone() builtinFunc {
  type builtinNEStringSig (line 288) | type builtinNEStringSig struct
    method Clone (line 292) | func (b *builtinNEStringSig) Clone() builtinFunc {
  type builtinLTRealSig (line 298) | type builtinLTRealSig struct
    method Clone (line 302) | func (b *builtinLTRealSig) Clone() builtinFunc {
    method evalInt (line 308) | func (b *builtinLTRealSig) evalInt(row chunk.Row) (val int64, isNull b...
  type builtinLTDecimalSig (line 312) | type builtinLTDecimalSig struct
    method Clone (line 316) | func (b *builtinLTDecimalSig) Clone() builtinFunc {
    method evalInt (line 322) | func (b *builtinLTDecimalSig) evalInt(row chunk.Row) (val int64, isNul...
  type builtinLERealSig (line 326) | type builtinLERealSig struct
    method Clone (line 330) | func (b *builtinLERealSig) Clone() builtinFunc {
    method evalInt (line 336) | func (b *builtinLERealSig) evalInt(row chunk.Row) (val int64, isNull b...
  type builtinLEDecimalSig (line 340) | type builtinLEDecimalSig struct
    method Clone (line 344) | func (b *builtinLEDecimalSig) Clone() builtinFunc {
    method evalInt (line 350) | func (b *builtinLEDecimalSig) evalInt(row chunk.Row) (val int64, isNul...
  type builtinGTRealSig (line 354) | type builtinGTRealSig struct
    method Clone (line 358) | func (b *builtinGTRealSig) Clone() builtinFunc {
    method evalInt (line 364) | func (b *builtinGTRealSig) evalInt(row chunk.Row) (val int64, isNull b...
  type builtinGTDecimalSig (line 368) | type builtinGTDecimalSig struct
    method Clone (line 372) | func (b *builtinGTDecimalSig) Clone() builtinFunc {
    method evalInt (line 378) | func (b *builtinGTDecimalSig) evalInt(row chunk.Row) (val int64, isNul...
  type builtinGERealSig (line 382) | type builtinGERealSig struct
    method Clone (line 386) | func (b *builtinGERealSig) Clone() builtinFunc {
    method evalInt (line 392) | func (b *builtinGERealSig) evalInt(row chunk.Row) (val int64, isNull b...
  type builtinGEDecimalSig (line 396) | type builtinGEDecimalSig struct
    method Clone (line 400) | func (b *builtinGEDecimalSig) Clone() builtinFunc {
    method evalInt (line 406) | func (b *builtinGEDecimalSig) evalInt(row chunk.Row) (val int64, isNul...
  type builtinEQRealSig (line 410) | type builtinEQRealSig struct
    method Clone (line 414) | func (b *builtinEQRealSig) Clone() builtinFunc {
    method evalInt (line 420) | func (b *builtinEQRealSig) evalInt(row chunk.Row) (val int64, isNull b...
  type builtinEQDecimalSig (line 424) | type builtinEQDecimalSig struct
    method Clone (line 428) | func (b *builtinEQDecimalSig) Clone() builtinFunc {
    method evalInt (line 434) | func (b *builtinEQDecimalSig) evalInt(row chunk.Row) (val int64, isNul...
  type builtinNERealSig (line 438) | type builtinNERealSig struct
    method Clone (line 442) | func (b *builtinNERealSig) Clone() builtinFunc {
    method evalInt (line 448) | func (b *builtinNERealSig) evalInt(row chunk.Row) (val int64, isNull b...
  type builtinNEDecimalSig (line 452) | type builtinNEDecimalSig struct
    method Clone (line 456) | func (b *builtinNEDecimalSig) Clone() builtinFunc {
    method evalInt (line 462) | func (b *builtinNEDecimalSig) evalInt(row chunk.Row) (val int64, isNul...
  function CompareReal (line 467) | func CompareReal(sctx sessionctx.Context, lhsArg, rhsArg Expression, lhs...
  function CompareDecimal (line 485) | func CompareDecimal(sctx sessionctx.Context, lhsArg, rhsArg Expression, ...
  function CompareInt (line 503) | func CompareInt(sctx sessionctx.Context, lhsArg, rhsArg Expression, lhsR...
  function CompareString (line 543) | func CompareString(sctx sessionctx.Context, lhsArg, rhsArg Expression, l...
  function resOfLT (line 560) | func resOfLT(val int64, isNull bool, err error) (int64, bool, error) {
  function resOfLE (line 572) | func resOfLE(val int64, isNull bool, err error) (int64, bool, error) {
  function resOfGT (line 584) | func resOfGT(val int64, isNull bool, err error) (int64, bool, error) {
  function resOfGE (line 596) | func resOfGE(val int64, isNull bool, err error) (int64, bool, error) {
  function resOfEQ (line 608) | func resOfEQ(val int64, isNull bool, err error) (int64, bool, error) {
  function resOfNE (line 620) | func resOfNE(val int64, isNull bool, err error) (int64, bool, error) {
  function compareNull (line 636) | func compareNull(lhsIsNull, rhsIsNull bool) int64 {
  function tryToConvertConstantInt (line 656) | func tryToConvertConstantInt(ctx sessionctx.Context, targetFieldType *ty...
  function RefineComparedConstant (line 690) | func RefineComparedConstant(ctx sessionctx.Context, targetFieldType type...
  function aggregateType (line 772) | func aggregateType(args []Expression) *types.FieldType {
  function resolveType4Extremum (line 781) | func resolveType4Extremum(args []Expression) types.EvalType {
  function unsupportedJSONComparison (line 805) | func unsupportedJSONComparison(ctx sessionctx.Context, args []Expression) {
  type greatestFunctionClass (line 815) | type greatestFunctionClass struct
    method getFunction (line 819) | func (c *greatestFunctionClass) getFunction(ctx sessionctx.Context, ar...
  function fixFlenAndDecimalForGreatestAndLeast (line 866) | func fixFlenAndDecimalForGreatestAndLeast(args []Expression) (flen, deci...
  type builtinGreatestIntSig (line 879) | type builtinGreatestIntSig struct
    method Clone (line 883) | func (b *builtinGreatestIntSig) Clone() builtinFunc {
    method evalInt (line 891) | func (b *builtinGreatestIntSig) evalInt(row chunk.Row) (max int64, isN...
  type builtinGreatestRealSig (line 909) | type builtinGreatestRealSig struct
    method Clone (line 913) | func (b *builtinGreatestRealSig) Clone() builtinFunc {
    method evalReal (line 921) | func (b *builtinGreatestRealSig) evalReal(row chunk.Row) (max float64,...
  type builtinGreatestDecimalSig (line 939) | type builtinGreatestDecimalSig struct
    method Clone (line 943) | func (b *builtinGreatestDecimalSig) Clone() builtinFunc {
    method evalDecimal (line 951) | func (b *builtinGreatestDecimalSig) evalDecimal(row chunk.Row) (max *t...
  type builtinGreatestStringSig (line 969) | type builtinGreatestStringSig struct
    method Clone (line 973) | func (b *builtinGreatestStringSig) Clone() builtinFunc {
    method evalString (line 981) | func (b *builtinGreatestStringSig) evalString(row chunk.Row) (max stri...
  type builtinGreatestTimeSig (line 999) | type builtinGreatestTimeSig struct
    method Clone (line 1003) | func (b *builtinGreatestTimeSig) Clone() builtinFunc {
    method evalString (line 1011) | func (b *builtinGreatestTimeSig) evalString(row chunk.Row) (res string...
  type leastFunctionClass (line 1046) | type leastFunctionClass struct
    method getFunction (line 1050) | func (c *leastFunctionClass) getFunction(ctx sessionctx.Context, args ...
  type builtinLeastIntSig (line 1097) | type builtinLeastIntSig struct
    method Clone (line 1101) | func (b *builtinLeastIntSig) Clone() builtinFunc {
    method evalInt (line 1109) | func (b *builtinLeastIntSig) evalInt(row chunk.Row) (min int64, isNull...
  type builtinLeastRealSig (line 1127) | type builtinLeastRealSig struct
    method Clone (line 1131) | func (b *builtinLeastRealSig) Clone() builtinFunc {
    method evalReal (line 1139) | func (b *builtinLeastRealSig) evalReal(row chunk.Row) (min float64, is...
  type builtinLeastDecimalSig (line 1157) | type builtinLeastDecimalSig struct
    method Clone (line 1161) | func (b *builtinLeastDecimalSig) Clone() builtinFunc {
    method evalDecimal (line 1169) | func (b *builtinLeastDecimalSig) evalDecimal(row chunk.Row) (min *type...
  type builtinLeastStringSig (line 1187) | type builtinLeastStringSig struct
    method Clone (line 1191) | func (b *builtinLeastStringSig) Clone() builtinFunc {
    method evalString (line 1199) | func (b *builtinLeastStringSig) evalString(row chunk.Row) (min string,...
  type builtinLeastTimeSig (line 1217) | type builtinLeastTimeSig struct
    method Clone (line 1221) | func (b *builtinLeastTimeSig) Clone() builtinFunc {
    method evalString (line 1229) | func (b *builtinLeastTimeSig) evalString(row chunk.Row) (res string, i...
  type coalesceFunctionClass (line 1267) | type coalesceFunctionClass struct
    method getFunction (line 1271) | func (c *coalesceFunctionClass) getFunction(ctx sessionctx.Context, ar...
  type builtinCoalesceIntSig (line 1377) | type builtinCoalesceIntSig struct
    method Clone (line 1381) | func (b *builtinCoalesceIntSig) Clone() builtinFunc {
    method evalInt (line 1387) | func (b *builtinCoalesceIntSig) evalInt(row chunk.Row) (res int64, isN...
  type builtinCoalesceRealSig (line 1399) | type builtinCoalesceRealSig struct
    method Clone (line 1403) | func (b *builtinCoalesceRealSig) Clone() builtinFunc {
    method evalReal (line 1409) | func (b *builtinCoalesceRealSig) evalReal(row chunk.Row) (res float64,...
  type builtinCoalesceDecimalSig (line 1421) | type builtinCoalesceDecimalSig struct
    method Clone (line 1425) | func (b *builtinCoalesceDecimalSig) Clone() builtinFunc {
    method evalDecimal (line 1431) | func (b *builtinCoalesceDecimalSig) evalDecimal(row chunk.Row) (res *t...
  type builtinCoalesceStringSig (line 1443) | type builtinCoalesceStringSig struct
    method Clone (line 1447) | func (b *builtinCoalesceStringSig) Clone() builtinFunc {
    method evalString (line 1453) | func (b *builtinCoalesceStringSig) evalString(row chunk.Row) (res stri...
  function GetCmpFunction (line 1533) | func GetCmpFunction(lhs, rhs Expression) CompareFunc {
  function isTemporalColumn (line 1555) | func isTemporalColumn(expr Expression) bool {

FILE: pkg/expression/builtin_control.go
  function InferType4ControlFuncs (line 48) | func InferType4ControlFuncs(lhs, rhs *types.FieldType) *types.FieldType {
  type caseWhenFunctionClass (line 121) | type caseWhenFunctionClass struct
    method getFunction (line 125) | func (c *caseWhenFunctionClass) getFunction(ctx sessionctx.Context, ar...
  type builtinCaseWhenIntSig (line 207) | type builtinCaseWhenIntSig struct
    method Clone (line 211) | func (b *builtinCaseWhenIntSig) Clone() builtinFunc {
    method evalInt (line 219) | func (b *builtinCaseWhenIntSig) evalInt(row chunk.Row) (ret int64, isN...
  type builtinCaseWhenRealSig (line 243) | type builtinCaseWhenRealSig struct
    method Clone (line 247) | func (b *builtinCaseWhenRealSig) Clone() builtinFunc {
    method evalReal (line 255) | func (b *builtinCaseWhenRealSig) evalReal(row chunk.Row) (ret float64,...
  type builtinCaseWhenDecimalSig (line 279) | type builtinCaseWhenDecimalSig struct
    method Clone (line 283) | func (b *builtinCaseWhenDecimalSig) Clone() builtinFunc {
    method evalDecimal (line 291) | func (b *builtinCaseWhenDecimalSig) evalDecimal(row chunk.Row) (ret *t...
  type builtinCaseWhenStringSig (line 315) | type builtinCaseWhenStringSig struct
    method Clone (line 319) | func (b *builtinCaseWhenStringSig) Clone() builtinFunc {
    method evalString (line 327) | func (b *builtinCaseWhenStringSig) evalString(row chunk.Row) (ret stri...
  type ifFunctionClass (line 351) | type ifFunctionClass struct
    method getFunction (line 356) | func (c *ifFunctionClass) getFunction(ctx sessionctx.Context, args []E...
  type builtinIfIntSig (line 384) | type builtinIfIntSig struct
    method Clone (line 388) | func (b *builtinIfIntSig) Clone() builtinFunc {
    method evalInt (line 394) | func (b *builtinIfIntSig) evalInt(row chunk.Row) (ret int64, isNull bo...
  type builtinIfRealSig (line 407) | type builtinIfRealSig struct
    method Clone (line 411) | func (b *builtinIfRealSig) Clone() builtinFunc {
    method evalReal (line 417) | func (b *builtinIfRealSig) evalReal(row chunk.Row) (ret float64, isNul...
  type builtinIfDecimalSig (line 430) | type builtinIfDecimalSig struct
    method Clone (line 434) | func (b *builtinIfDecimalSig) Clone() builtinFunc {
    method evalDecimal (line 440) | func (b *builtinIfDecimalSig) evalDecimal(row chunk.Row) (ret *types.M...
  type builtinIfStringSig (line 453) | type builtinIfStringSig struct
    method Clone (line 457) | func (b *builtinIfStringSig) Clone() builtinFunc {
    method evalString (line 463) | func (b *builtinIfStringSig) evalString(row chunk.Row) (ret string, is...
  type ifNullFunctionClass (line 476) | type ifNullFunctionClass struct
    method getFunction (line 480) | func (c *ifNullFunctionClass) getFunction(ctx sessionctx.Context, args...
  type builtinIfNullIntSig (line 514) | type builtinIfNullIntSig struct
    method Clone (line 518) | func (b *builtinIfNullIntSig) Clone() builtinFunc {
    method evalInt (line 524) | func (b *builtinIfNullIntSig) evalInt(row chunk.Row) (int64, bool, err...
  type builtinIfNullRealSig (line 533) | type builtinIfNullRealSig struct
    method Clone (line 537) | func (b *builtinIfNullRealSig) Clone() builtinFunc {
    method evalReal (line 543) | func (b *builtinIfNullRealSig) evalReal(row chunk.Row) (float64, bool,...
  type builtinIfNullDecimalSig (line 552) | type builtinIfNullDecimalSig struct
    method Clone (line 556) | func (b *builtinIfNullDecimalSig) Clone() builtinFunc {
    method evalDecimal (line 562) | func (b *builtinIfNullDecimalSig) evalDecimal(row chunk.Row) (*types.M...
  type builtinIfNullStringSig (line 571) | type builtinIfNullStringSig struct
    method Clone (line 575) | func (b *builtinIfNullStringSig) Clone() builtinFunc {
    method evalString (line 581) | func (b *builtinIfNullStringSig) evalString(row chunk.Row) (string, bo...

FILE: pkg/expression/builtin_like.go
  type likeFunctionClass (line 38) | type likeFunctionClass struct
    method getFunction (line 42) | func (c *likeFunctionClass) getFunction(ctx sessionctx.Context, args [...
  type builtinLikeSig (line 55) | type builtinLikeSig struct
    method Clone (line 64) | func (b *builtinLikeSig) Clone() builtinFunc {
    method evalInt (line 74) | func (b *builtinLikeSig) evalInt(row chunk.Row) (int64, bool, error) {
  type regexpFunctionClass (line 107) | type regexpFunctionClass struct
    method getFunction (line 111) | func (c *regexpFunctionClass) getFunction(ctx sessionctx.Context, args...
  type builtinRegexpSharedSig (line 124) | type builtinRegexpSharedSig struct
    method clone (line 131) | func (b *builtinRegexpSharedSig) clone(from *builtinRegexpSharedSig) {
    method evalInt (line 142) | func (b *builtinRegexpSharedSig) evalInt(row chunk.Row) (int64, bool, ...
  type builtinRegexpSig (line 160) | type builtinRegexpSig struct
    method Clone (line 170) | func (b *builtinRegexpSig) Clone() builtinFunc {
  function newBuiltinRegexpSig (line 164) | func newBuiltinRegexpSig(bf baseBuiltinFunc) *builtinRegexpSig {
  type builtinRegexpUTF8Sig (line 176) | type builtinRegexpUTF8Sig struct
    method Clone (line 186) | func (b *builtinRegexpUTF8Sig) Clone() builtinFunc {
  function newBuiltinRegexpUTF8Sig (line 180) | func newBuiltinRegexpUTF8Sig(bf baseBuiltinFunc) *builtinRegexpUTF8Sig {
  type WildcardPattern (line 193) | type WildcardPattern interface
  type binPattern (line 200) | type binPattern struct
    method Compile (line 206) | func (p *binPattern) Compile(patternStr string, escape byte) {
    method DoMatch (line 211) | func (p *binPattern) DoMatch(str string) bool {

FILE: pkg/expression/builtin_math.go
  type absFunctionClass (line 115) | type absFunctionClass struct
    method getFunction (line 119) | func (c *absFunctionClass) getFunction(ctx sessionctx.Context, args []...
  type builtinAbsRealSig (line 161) | type builtinAbsRealSig struct
    method Clone (line 165) | func (b *builtinAbsRealSig) Clone() builtinFunc {
    method evalReal (line 173) | func (b *builtinAbsRealSig) evalReal(row chunk.Row) (float64, bool, er...
  type builtinAbsIntSig (line 181) | type builtinAbsIntSig struct
    method Clone (line 185) | func (b *builtinAbsIntSig) Clone() builtinFunc {
    method evalInt (line 193) | func (b *builtinAbsIntSig) evalInt(row chunk.Row) (int64, bool, error) {
  type builtinAbsUIntSig (line 207) | type builtinAbsUIntSig struct
    method Clone (line 211) | func (b *builtinAbsUIntSig) Clone() builtinFunc {
    method evalInt (line 219) | func (b *builtinAbsUIntSig) evalInt(row chunk.Row) (int64, bool, error) {
  type builtinAbsDecSig (line 223) | type builtinAbsDecSig struct
    method Clone (line 227) | func (b *builtinAbsDecSig) Clone() builtinFunc {
    method evalDecimal (line 235) | func (b *builtinAbsDecSig) evalDecimal(row chunk.Row) (*types.MyDecima...
  function calculateDecimal4RoundAndTruncate (line 315) | func calculateDecimal4RoundAndTruncate(ctx sessionctx.Context, args []Ex...
  type builtinRoundRealSig (line 333) | type builtinRoundRealSig struct
    method Clone (line 337) | func (b *builtinRoundRealSig) Clone() builtinFunc {
    method evalReal (line 345) | func (b *builtinRoundRealSig) evalReal(row chunk.Row) (float64, bool, ...
  type builtinRoundIntSig (line 353) | type builtinRoundIntSig struct
    method Clone (line 357) | func (b *builtinRoundIntSig) Clone() builtinFunc {
    method evalInt (line 365) | func (b *builtinRoundIntSig) evalInt(row chunk.Row) (int64, bool, erro...
  type builtinRoundDecSig (line 369) | type builtinRoundDecSig struct
    method Clone (line 373) | func (b *builtinRoundDecSig) Clone() builtinFunc {
    method evalDecimal (line 381) | func (b *builtinRoundDecSig) evalDecimal(row chunk.Row) (*types.MyDeci...
  type builtinRoundWithFracRealSig (line 393) | type builtinRoundWithFracRealSig struct
    method Clone (line 397) | func (b *builtinRoundWithFracRealSig) Clone() builtinFunc {
    method evalReal (line 405) | func (b *builtinRoundWithFracRealSig) evalReal(row chunk.Row) (float64...
  type builtinRoundWithFracIntSig (line 417) | type builtinRoundWithFracIntSig struct
    method Clone (line 421) | func (b *builtinRoundWithFracIntSig) Clone() builtinFunc {
    method evalInt (line 429) | func (b *builtinRoundWithFracIntSig) evalInt(row chunk.Row) (int64, bo...
  type builtinRoundWithFracDecSig (line 441) | type builtinRoundWithFracDecSig struct
    method Clone (line 445) | func (b *builtinRoundWithFracDecSig) Clone() builtinFunc {
    method evalDecimal (line 453) | func (b *builtinRoundWithFracDecSig) evalDecimal(row chunk.Row) (*type...
  type ceilFunctionClass (line 469) | type ceilFunctionClass struct
    method getFunction (line 473) | func (c *ceilFunctionClass) getFunction(ctx sessionctx.Context, args [...
  type builtinCeilRealSig (line 508) | type builtinCeilRealSig struct
    method Clone (line 512) | func (b *builtinCeilRealSig) Clone() builtinFunc {
    method evalReal (line 520) | func (b *builtinCeilRealSig) evalReal(row chunk.Row) (float64, bool, e...
  type builtinCeilIntToIntSig (line 528) | type builtinCeilIntToIntSig struct
    method Clone (line 532) | func (b *builtinCeilIntToIntSig) Clone() builtinFunc {
    method evalInt (line 540) | func (b *builtinCeilIntToIntSig) evalInt(row chunk.Row) (int64, bool, ...
  type builtinCeilIntToDecSig (line 544) | type builtinCeilIntToDecSig struct
    method Clone (line 548) | func (b *builtinCeilIntToDecSig) Clone() builtinFunc {
    method evalDecimal (line 556) | func (b *builtinCeilIntToDecSig) evalDecimal(row chunk.Row) (*types.My...
  type builtinCeilDecToIntSig (line 568) | type builtinCeilDecToIntSig struct
    method Clone (line 572) | func (b *builtinCeilDecToIntSig) Clone() builtinFunc {
    method evalInt (line 580) | func (b *builtinCeilDecToIntSig) evalInt(row chunk.Row) (int64, bool, ...
  type builtinCeilDecToDecSig (line 596) | type builtinCeilDecToDecSig struct
    method Clone (line 600) | func (b *builtinCeilDecToDecSig) Clone() builtinFunc {
    method evalDecimal (line 607) | func (b *builtinCeilDecToDecSig) evalDecimal(row chunk.Row) (*types.My...
  type floorFunctionClass (line 628) | type floorFunctionClass struct
    method getFunction (line 655) | func (c *floorFunctionClass) getFunction(ctx sessionctx.Context, args ...
  function getEvalTp4FloorAndCeil (line 633) | func getEvalTp4FloorAndCeil(arg Expression) (retTp, argTp types.EvalType) {
  function setFlag4FloorAndCeil (line 647) | func setFlag4FloorAndCeil(tp *types.FieldType, arg Expression) {
  type builtinFloorRealSig (line 688) | type builtinFloorRealSig struct
    method Clone (line 692) | func (b *builtinFloorRealSig) Clone() builtinFunc {
    method evalReal (line 700) | func (b *builtinFloorRealSig) evalReal(row chunk.Row) (float64, bool, ...
  type builtinFloorIntToIntSig (line 708) | type builtinFloorIntToIntSig struct
    method Clone (line 712) | func (b *builtinFloorIntToIntSig) Clone() builtinFunc {
    method evalInt (line 720) | func (b *builtinFloorIntToIntSig) evalInt(row chunk.Row) (int64, bool,...
  type builtinFloorIntToDecSig (line 724) | type builtinFloorIntToDecSig struct
    method Clone (line 728) | func (b *builtinFloorIntToDecSig) Clone() builtinFunc {
    method evalDecimal (line 736) | func (b *builtinFloorIntToDecSig) evalDecimal(row chunk.Row) (*types.M...
  type builtinFloorDecToIntSig (line 748) | type builtinFloorDecToIntSig struct
    method Clone (line 752) | func (b *builtinFloorDecToIntSig) Clone() builtinFunc {
    method evalInt (line 760) | func (b *builtinFloorDecToIntSig) evalInt(row chunk.Row) (int64, bool,...
  type builtinFloorDecToDecSig (line 776) | type builtinFloorDecToDecSig struct
    method Clone (line 780) | func (b *builtinFloorDecToDecSig) Clone() builtinFunc {
    method evalDecimal (line 787) | func (b *builtinFloorDecToDecSig) evalDecimal(row chunk.Row) (*types.M...
  type logFunctionClass (line 808) | type logFunctionClass struct
    method getFunction (line 812) | func (c *logFunctionClass) getFunction(ctx sessionctx.Context, args []...
  type builtinLog1ArgSig (line 839) | type builtinLog1ArgSig struct
    method Clone (line 843) | func (b *builtinLog1ArgSig) Clone() builtinFunc {
    method evalReal (line 851) | func (b *builtinLog1ArgSig) evalReal(row chunk.Row) (float64, bool, er...
  type builtinLog2ArgsSig (line 863) | type builtinLog2ArgsSig struct
    method Clone (line 867) | func (b *builtinLog2ArgsSig) Clone() builtinFunc {
    method evalReal (line 875) | func (b *builtinLog2ArgsSig) evalReal(row chunk.Row) (float64, bool, e...
  type log2FunctionClass (line 894) | type log2FunctionClass struct
    method getFunction (line 898) | func (c *log2FunctionClass) getFunction(ctx sessionctx.Context, args [...
  type builtinLog2Sig (line 908) | type builtinLog2Sig struct
    method Clone (line 912) | func (b *builtinLog2Sig) Clone() builtinFunc {
    method evalReal (line 920) | func (b *builtinLog2Sig) evalReal(row chunk.Row) (float64, bool, error) {
  type log10FunctionClass (line 932) | type log10FunctionClass struct
    method getFunction (line 936) | func (c *log10FunctionClass) getFunction(ctx sessionctx.Context, args ...
  type builtinLog10Sig (line 946) | type builtinLog10Sig struct
    method Clone (line 950) | func (b *builtinLog10Sig) Clone() builtinFunc {
    method evalReal (line 958) | func (b *builtinLog10Sig) evalReal(row chunk.Row) (float64, bool, erro...
  type randFunctionClass (line 970) | type randFunctionClass struct
    method getFunction (line 974) | func (c *randFunctionClass) getFunction(ctx sessionctx.Context, args [...
  type builtinRandSig (line 1011) | type builtinRandSig struct
    method Clone (line 1017) | func (b *builtinRandSig) Clone() builtinFunc {
    method evalReal (line 1025) | func (b *builtinRandSig) evalReal(row chunk.Row) (float64, bool, error) {
  type builtinRandWithSeedFirstGenSig (line 1032) | type builtinRandWithSeedFirstGenSig struct
    method Clone (line 1036) | func (b *builtinRandWithSeedFirstGenSig) Clone() builtinFunc {
    method evalReal (line 1044) | func (b *builtinRandWithSeedFirstGenSig) evalReal(row chunk.Row) (floa...
  type powFunctionClass (line 1061) | type powFunctionClass struct
    method getFunction (line 1065) | func (c *powFunctionClass) getFunction(ctx sessionctx.Context, args []...
  type builtinPowSig (line 1075) | type builtinPowSig struct
    method Clone (line 1079) | func (b *builtinPowSig) Clone() builtinFunc {
    method evalReal (line 1087) | func (b *builtinPowSig) evalReal(row chunk.Row) (float64, bool, error) {
  type roundFunctionClass (line 1103) | type roundFunctionClass struct
    method getFunction (line 251) | func (c *roundFunctionClass) getFunction(ctx sessionctx.Context, args ...
  type convFunctionClass (line 1107) | type convFunctionClass struct
    method getFunction (line 1111) | func (c *convFunctionClass) getFunction(ctx sessionctx.Context, args [...
  type builtinConvSig (line 1124) | type builtinConvSig struct
    method Clone (line 1128) | func (b *builtinConvSig) Clone() builtinFunc {
    method evalString (line 1136) | func (b *builtinConvSig) evalString(row chunk.Row) (res string, isNull...
    method conv (line 1178) | func (b *builtinConvSig) conv(str string, fromBase, toBase int64) (res...
  type crc32FunctionClass (line 1241) | type crc32FunctionClass struct
    method getFunction (line 1245) | func (c *crc32FunctionClass) getFunction(ctx sessionctx.Context, args ...
  type builtinCRC32Sig (line 1257) | type builtinCRC32Sig struct
    method Clone (line 1261) | func (b *builtinCRC32Sig) Clone() builtinFunc {
    method evalInt (line 1269) | func (b *builtinCRC32Sig) evalInt(row chunk.Row) (int64, bool, error) {
  type signFunctionClass (line 1278) | type signFunctionClass struct
    method getFunction (line 1282) | func (c *signFunctionClass) getFunction(ctx sessionctx.Context, args [...
  type builtinSignSig (line 1292) | type builtinSignSig struct
    method Clone (line 1296) | func (b *builtinSignSig) Clone() builtinFunc {
    method evalInt (line 1304) | func (b *builtinSignSig) evalInt(row chunk.Row) (int64, bool, error) {
  type sqrtFunctionClass (line 1318) | type sqrtFunctionClass struct
    method getFunction (line 1322) | func (c *sqrtFunctionClass) getFunction(ctx sessionctx.Context, args [...
  type builtinSqrtSig (line 1332) | type builtinSqrtSig struct
    method Clone (line 1336) | func (b *builtinSqrtSig) Clone() builtinFunc {
    method evalReal (line 1344) | func (b *builtinSqrtSig) evalReal(row chunk.Row) (float64, bool, error) {
  type acosFunctionClass (line 1355) | type acosFunctionClass struct
    method getFunction (line 1359) | func (c *acosFunctionClass) getFunction(ctx sessionctx.Context, args [...
  type builtinAcosSig (line 1369) | type builtinAcosSig struct
    method Clone (line 1373) | func (b *builtinAcosSig) Clone() builtinFunc {
    method evalReal (line 1381) | func (b *builtinAcosSig) evalReal(row chunk.Row) (float64, bool, error) {
  type asinFunctionClass (line 1393) | type asinFunctionClass struct
    method getFunction (line 1397) | func (c *asinFunctionClass) getFunction(ctx sessionctx.Context, args [...
  type builtinAsinSig (line 1407) | type builtinAsinSig struct
    method Clone (line 1411) | func (b *builtinAsinSig) Clone() builtinFunc {
    method evalReal (line 1419) | func (b *builtinAsinSig) evalReal(row chunk.Row) (float64, bool, error) {
  type atanFunctionClass (line 1432) | type atanFunctionClass struct
    method getFunction (line 1436) | func (c *atanFunctionClass) getFunction(ctx sessionctx.Context, args [...
  type builtinAtan1ArgSig (line 1463) | type builtinAtan1ArgSig struct
    method Clone (line 1467) | func (b *builtinAtan1ArgSig) Clone() builtinFunc {
    method evalReal (line 1475) | func (b *builtinAtan1ArgSig) evalReal(row chunk.Row) (float64, bool, e...
  type builtinAtan2ArgsSig (line 1484) | type builtinAtan2ArgsSig struct
    method Clone (line 1488) | func (b *builtinAtan2ArgsSig) Clone() builtinFunc {
    method evalReal (line 1496) | func (b *builtinAtan2ArgsSig) evalReal(row chunk.Row) (float64, bool, ...
  type cosFunctionClass (line 1510) | type cosFunctionClass struct
    method getFunction (line 1514) | func (c *cosFunctionClass) getFunction(ctx sessionctx.Context, args []...
  type builtinCosSig (line 1524) | type builtinCosSig struct
    method Clone (line 1528) | func (b *builtinCosSig) Clone() builtinFunc {
    method evalReal (line 1536) | func (b *builtinCosSig) evalReal(row chunk.Row) (float64, bool, error) {
  type cotFunctionClass (line 1544) | type cotFunctionClass struct
    method getFunction (line 1548) | func (c *cotFunctionClass) getFunction(ctx sessionctx.Context, args []...
  type builtinCotSig (line 1558) | type builtinCotSig struct
    method Clone (line 1562) | func (b *builtinCotSig) Clone() builtinFunc {
    method evalReal (line 1570) | func (b *builtinCotSig) evalReal(row chunk.Row) (float64, bool, error) {
  type degreesFunctionClass (line 1586) | type degreesFunctionClass struct
    method getFunction (line 1590) | func (c *degreesFunctionClass) getFunction(ctx sessionctx.Context, arg...
  type builtinDegreesSig (line 1600) | type builtinDegreesSig struct
    method Clone (line 1604) | func (b *builtinDegreesSig) Clone() builtinFunc {
    method evalReal (line 1612) | func (b *builtinDegreesSig) evalReal(row chunk.Row) (float64, bool, er...
  type expFunctionClass (line 1621) | type expFunctionClass struct
    method getFunction (line 1625) | func (c *expFunctionClass) getFunction(ctx sessionctx.Context, args []...
  type builtinExpSig (line 1635) | type builtinExpSig struct
    method Clone (line 1639) | func (b *builtinExpSig) Clone() builtinFunc {
    method evalReal (line 1647) | func (b *builtinExpSig) evalReal(row chunk.Row) (float64, bool, error) {
  type piFunctionClass (line 1660) | type piFunctionClass struct
    method getFunction (line 1664) | func (c *piFunctionClass) getFunction(ctx sessionctx.Context, args []E...
  type builtinPISig (line 1681) | type builtinPISig struct
    method Clone (line 1685) | func (b *builtinPISig) Clone() builtinFunc {
    method evalReal (line 1693) | func (b *builtinPISig) evalReal(_ chunk.Row) (float64, bool, error) {
  type radiansFunctionClass (line 1697) | type radiansFunctionClass struct
    method getFunction (line 1701) | func (c *radiansFunctionClass) getFunction(ctx sessionctx.Context, arg...
  type builtinRadiansSig (line 1711) | type builtinRadiansSig struct
    method Clone (line 1715) | func (b *builtinRadiansSig) Clone() builtinFunc {
    method evalReal (line 1723) | func (b *builtinRadiansSig) evalReal(row chunk.Row) (float64, bool, er...
  type sinFunctionClass (line 1731) | type sinFunctionClass struct
    method getFunction (line 1735) | func (c *sinFunctionClass) getFunction(ctx sessionctx.Context, args []...
  type builtinSinSig (line 1745) | type builtinSinSig struct
    method Clone (line 1749) | func (b *builtinSinSig) Clone() builtinFunc {
    method evalReal (line 1757) | func (b *builtinSinSig) evalReal(row chunk.Row) (float64, bool, error) {
  type tanFunctionClass (line 1765) | type tanFunctionClass struct
    method getFunction (line 1769) | func (c *tanFunctionClass) getFunction(ctx sessionctx.Context, args []...
  type builtinTanSig (line 1779) | type builtinTanSig struct
    method Clone (line 1783) | func (b *builtinTanSig) Clone() builtinFunc {
    method evalReal (line 1791) | func (b *builtinTanSig) evalReal(row chunk.Row) (float64, bool, error) {
  type truncateFunctionClass (line 1799) | type truncateFunctionClass struct
    method getFunction (line 1803) | func (c *truncateFunctionClass) getFunction(ctx sessionctx.Context, ar...
  type builtinTruncateDecimalSig (line 1842) | type builtinTruncateDecimalSig struct
    method Clone (line 1846) | func (b *builtinTruncateDecimalSig) Clone() builtinFunc {
    method evalDecimal (line 1854) | func (b *builtinTruncateDecimalSig) evalDecimal(row chunk.Row) (*types...
  type builtinTruncateRealSig (line 1872) | type builtinTruncateRealSig struct
    method Clone (line 1876) | func (b *builtinTruncateRealSig) Clone() builtinFunc {
    method evalReal (line 1884) | func (b *builtinTruncateRealSig) evalReal(row chunk.Row) (float64, boo...
  type builtinTruncateIntSig (line 1898) | type builtinTruncateIntSig struct
    method Clone (line 1902) | func (b *builtinTruncateIntSig) Clone() builtinFunc {
    method evalInt (line 1910) | func (b *builtinTruncateIntSig) evalInt(row chunk.Row) (int64, bool, e...
  type builtinTruncateUintSig (line 1941) | type builtinTruncateUintSig struct
    method Clone (line 1935) | func (b *builtinTruncateUintSig) Clone() builtinFunc {
    method evalInt (line 1947) | func (b *builtinTruncateUintSig) evalInt(row chunk.Row) (int64, bool, ...

FILE: pkg/expression/builtin_op.go
  type logicAndFunctionClass (line 54) | type logicAndFunctionClass struct
    method getFunction (line 58) | func (c *logicAndFunctionClass) getFunction(ctx sessionctx.Context, ar...
  type builtinLogicAndSig (line 79) | type builtinLogicAndSig struct
    method Clone (line 83) | func (b *builtinLogicAndSig) Clone() builtinFunc {
  type isTrueOrFalseFunctionClass (line 89) | type isTrueOrFalseFunctionClass struct
    method getFunction (line 99) | func (c *isTrueOrFalseFunctionClass) getFunction(ctx sessionctx.Contex...
  type builtinIntIsFalseSig (line 134) | type builtinIntIsFalseSig struct
    method Clone (line 139) | func (b *builtinIntIsFalseSig) Clone() builtinFunc {
  type builtinIntIsTrueSig (line 145) | type builtinIntIsTrueSig struct
    method Clone (line 150) | func (b *builtinIntIsTrueSig) Clone() builtinFunc {
  type logicOrFunctionClass (line 156) | type logicOrFunctionClass struct
    method getFunction (line 160) | func (c *logicOrFunctionClass) getFunction(ctx sessionctx.Context, arg...
  type builtinLogicOrSig (line 181) | type builtinLogicOrSig struct
    method Clone (line 185) | func (b *builtinLogicOrSig) Clone() builtinFunc {
  type logicXorFunctionClass (line 191) | type logicXorFunctionClass struct
    method getFunction (line 195) | func (c *logicXorFunctionClass) getFunction(ctx sessionctx.Context, ar...
  type builtinLogicXorSig (line 208) | type builtinLogicXorSig struct
    method Clone (line 212) | func (b *builtinLogicXorSig) Clone() builtinFunc {
  type unaryMinusFunctionClass (line 218) | type unaryMinusFunctionClass struct
    method handleIntOverflow (line 222) | func (c *unaryMinusFunctionClass) handleIntOverflow(arg *Constant) (ov...
    method typeInfer (line 243) | func (c *unaryMinusFunctionClass) typeInfer(argExpr Expression) (types...
    method getFunction (line 260) | func (c *unaryMinusFunctionClass) getFunction(ctx sessionctx.Context, ...
  type builtinUnaryMinusIntSig (line 306) | type builtinUnaryMinusIntSig struct
    method Clone (line 310) | func (b *builtinUnaryMinusIntSig) Clone() builtinFunc {
    method evalInt (line 316) | func (b *builtinUnaryMinusIntSig) evalInt(row chunk.Row) (res int64, i...
  type builtinUnaryMinusDecimalSig (line 336) | type builtinUnaryMinusDecimalSig struct
    method Clone (line 342) | func (b *builtinUnaryMinusDecimalSig) Clone() builtinFunc {
    method evalDecimal (line 348) | func (b *builtinUnaryMinusDecimalSig) evalDecimal(row chunk.Row) (*typ...
  type builtinUnaryMinusRealSig (line 356) | type builtinUnaryMinusRealSig struct
    method Clone (line 360) | func (b *builtinUnaryMinusRealSig) Clone() builtinFunc {
    method evalReal (line 366) | func (b *builtinUnaryMinusRealSig) evalReal(row chunk.Row) (float64, b...
  type isNullFunctionClass (line 371) | type isNullFunctionClass struct
    method getFunction (line 375) | func (c *isNullFunctionClass) getFunction(ctx sessionctx.Context, args...
  type builtinDecimalIsNullSig (line 408) | type builtinDecimalIsNullSig struct
    method Clone (line 412) | func (b *builtinDecimalIsNullSig) Clone() builtinFunc {
    method evalInt (line 428) | func (b *builtinDecimalIsNullSig) evalInt(row chunk.Row) (int64, bool,...
  function evalIsNull (line 418) | func evalIsNull(isNull bool, err error) (int64, bool, error) {
  type builtinIntIsNullSig (line 433) | type builtinIntIsNullSig struct
    method Clone (line 437) | func (b *builtinIntIsNullSig) Clone() builtinFunc {
    method evalInt (line 443) | func (b *builtinIntIsNullSig) evalInt(row chunk.Row) (int64, bool, err...
  type builtinRealIsNullSig (line 448) | type builtinRealIsNullSig struct
    method Clone (line 452) | func (b *builtinRealIsNullSig) Clone() builtinFunc {
    method evalInt (line 458) | func (b *builtinRealIsNullSig) evalInt(row chunk.Row) (int64, bool, er...
  type builtinStringIsNullSig (line 463) | type builtinStringIsNullSig struct
    method Clone (line 467) | func (b *builtinStringIsNullSig) Clone() builtinFunc {
    method evalInt (line 473) | func (b *builtinStringIsNullSig) evalInt(row chunk.Row) (int64, bool, ...
  type unaryNotFunctionClass (line 478) | type unaryNotFunctionClass struct
    method getFunction (line 482) | func (c *unaryNotFunctionClass) getFunction(ctx sessionctx.Context, ar...
  type builtinUnaryNotRealSig (line 515) | type builtinUnaryNotRealSig struct
    method Clone (line 519) | func (b *builtinUnaryNotRealSig) Clone() builtinFunc {
    method evalInt (line 525) | func (b *builtinUnaryNotRealSig) evalInt(row chunk.Row) (int64, bool, ...
  type builtinUnaryNotDecimalSig (line 536) | type builtinUnaryNotDecimalSig struct
    method Clone (line 540) | func (b *builtinUnaryNotDecimalSig) Clone() builtinFunc {
    method evalInt (line 546) | func (b *builtinUnaryNotDecimalSig) evalInt(row chunk.Row) (int64, boo...
  type builtinUnaryNotIntSig (line 557) | type builtinUnaryNotIntSig struct
    method Clone (line 561) | func (b *builtinUnaryNotIntSig) Clone() builtinFunc {
    method evalInt (line 567) | func (b *builtinUnaryNotIntSig) evalInt(row chunk.Row) (int64, bool, e...

FILE: pkg/expression/builtin_other.go
  type inFunctionClass (line 34) | type inFunctionClass struct
    method getFunction (line 38) | func (c *inFunctionClass) getFunction(ctx sessionctx.Context, args []E...
  type builtinInIntSig (line 59) | type builtinInIntSig struct
    method Clone (line 63) | func (b *builtinInIntSig) Clone() builtinFunc {
  type builtinInStringSig (line 70) | type builtinInStringSig struct
    method Clone (line 74) | func (b *builtinInStringSig) Clone() builtinFunc {
  type builtinGeoDist (line 80) | type builtinGeoDist struct
    method Clone (line 84) | func (b *builtinGeoDist) Clone() builtinFunc {
  type builtinGeoDistFunctionClass (line 90) | type builtinGeoDistFunctionClass struct
    method getFunction (line 94) | func (c *builtinGeoDistFunctionClass) getFunction(ctx sessionctx.Conte...
  type rowFunctionClass (line 109) | type rowFunctionClass struct
    method getFunction (line 113) | func (c *rowFunctionClass) getFunction(ctx sessionctx.Context, args []...
  type builtinRowSig (line 126) | type builtinRowSig struct
    method Clone (line 130) | func (b *builtinRowSig) Clone() builtinFunc {
    method evalString (line 137) | func (b *builtinRowSig) evalString(row chunk.Row) (string, bool, error) {

FILE: pkg/expression/builtin_string.go
  function SetBinFlagOrBinStr (line 60) | func SetBinFlagOrBinStr(argTp *types.FieldType, resTp *types.FieldType) {
  type concatFunctionClass (line 68) | type concatFunctionClass struct
    method getFunction (line 72) | func (c *concatFunctionClass) getFunction(ctx sessionctx.Context, args...
  type builtinConcatSig (line 102) | type builtinConcatSig struct
    method Clone (line 107) | func (b *builtinConcatSig) Clone() builtinFunc {
    method evalString (line 116) | func (b *builtinConcatSig) evalString(row chunk.Row) (d string, isNull...
  type substringFunctionClass (line 132) | type substringFunctionClass struct
    method getFunction (line 136) | func (c *substringFunctionClass) getFunction(ctx sessionctx.Context, a...
  type upperFunctionClass (line 166) | type upperFunctionClass struct
    method getFunction (line 170) | func (c *upperFunctionClass) getFunction(ctx sessionctx.Context, args ...
  type builtinUpperUTF8Sig (line 189) | type builtinUpperUTF8Sig struct
    method Clone (line 193) | func (b *builtinUpperUTF8Sig) Clone() builtinFunc {
    method evalString (line 201) | func (b *builtinUpperUTF8Sig) evalString(row chunk.Row) (d string, isN...
  type builtinUpperSig (line 210) | type builtinUpperSig struct
    method Clone (line 214) | func (b *builtinUpperSig) Clone() builtinFunc {
    method evalString (line 222) | func (b *builtinUpperSig) evalString(row chunk.Row) (d string, isNull ...
  type lowerFunctionClass (line 231) | type lowerFunctionClass struct
    method getFunction (line 235) | func (c *lowerFunctionClass) getFunction(ctx sessionctx.Context, args ...
  type builtinLowerSig (line 248) | type builtinLowerSig struct
    method Clone (line 252) | func (b *builtinLowerSig) Clone() builtinFunc {
    method evalString (line 260) | func (b *builtinLowerSig) evalString(row chunk.Row) (d string, isNull ...
  type replaceFunctionClass (line 273) | type replaceFunctionClass struct
    method getFunction (line 277) | func (c *replaceFunctionClass) getFunction(ctx sessionctx.Context, arg...
    method fixLength (line 292) | func (c *replaceFunctionClass) fixLength(args []Expression) int {
  type builtinReplaceSig (line 302) | type builtinReplaceSig struct
    method Clone (line 306) | func (b *builtinReplaceSig) Clone() builtinFunc {
    method evalString (line 314) | func (b *builtinReplaceSig) evalString(row chunk.Row) (d string, isNul...
  type lengthFunctionClass (line 335) | type lengthFunctionClass struct
    method getFunction (line 339) | func (c *lengthFunctionClass) getFunction(ctx sessionctx.Context, args...
  type builtinLengthSig (line 350) | type builtinLengthSig struct
    method Clone (line 354) | func (b *builtinLengthSig) Clone() builtinFunc {
    method evalInt (line 362) | func (b *builtinLengthSig) evalInt(row chunk.Row) (int64, bool, error) {
  type instrFunctionClass (line 370) | type instrFunctionClass struct
    method getFunction (line 374) | func (c *instrFunctionClass) getFunction(ctx sessionctx.Context, args ...
  type builtinInstrUTF8Sig (line 388) | type builtinInstrUTF8Sig struct
    method Clone (line 390) | func (b *builtinInstrUTF8Sig) Clone() builtinFunc {
    method evalInt (line 406) | func (b *builtinInstrUTF8Sig) evalInt(row chunk.Row) (int64, bool, err...
  type builtinInstrSig (line 396) | type builtinInstrSig struct
    method Clone (line 398) | func (b *builtinInstrSig) Clone() builtinFunc {
    method evalInt (line 428) | func (b *builtinInstrSig) evalInt(row chunk.Row) (int64, bool, error) {
  type builtinTrimSig (line 446) | type builtinTrimSig struct
    method Clone (line 450) | func (b *builtinTrimSig) Clone() builtinFunc {
  type trimFunctionClass (line 456) | type trimFunctionClass struct
    method getFunction (line 460) | func (c *trimFunctionClass) getFunction(ctx sessionctx.Context, args [...

FILE: pkg/expression/builtin_time.go
  type dateDiffFunctionClass (line 54) | type dateDiffFunctionClass struct
    method getFunction (line 58) | func (c *dateDiffFunctionClass) getFunction(ctx sessionctx.Context, ar...
  type builtinDateDiffSig (line 67) | type builtinDateDiffSig struct
    method Clone (line 71) | func (b *builtinDateDiffSig) Clone() builtinFunc {
  type baseDateArithmitical (line 79) | type baseDateArithmitical struct
    method getDateFromString (line 90) | func (du *baseDateArithmitical) getDateFromString(ctx sessionctx.Conte...
    method getDateFromInt (line 106) | func (du *baseDateArithmitical) getDateFromInt(ctx sessionctx.Context,...
    method getDateFromDatetime (line 126) | func (du *baseDateArithmitical) getDateFromDatetime(ctx sessionctx.Con...
    method getIntervalFromString (line 140) | func (du *baseDateArithmitical) getIntervalFromString(ctx sessionctx.C...
    method getIntervalFromDecimal (line 158) | func (du *baseDateArithmitical) getIntervalFromDecimal(ctx sessionctx....
    method getIntervalFromInt (line 212) | func (du *baseDateArithmitical) getIntervalFromInt(ctx sessionctx.Cont...
    method getIntervalFromReal (line 220) | func (du *baseDateArithmitical) getIntervalFromReal(ctx sessionctx.Con...
    method returnIntervalSeconds (line 228) | func (du *baseDateArithmitical) returnIntervalSeconds(ctx sessionctx.C...
    method add (line 238) | func (du *baseDateArithmitical) add(ctx sessionctx.Context, date types...
    method addDuration (line 273) | func (du *baseDateArithmitical) addDuration(ctx sessionctx.Context, d ...
    method subDuration (line 285) | func (du *baseDateArithmitical) subDuration(ctx sessionctx.Context, d ...
    method sub (line 297) | func (du *baseDateArithmitical) sub(ctx sessionctx.Context, date types...
  function newDateArighmeticalUtil (line 84) | func newDateArighmeticalUtil() baseDateArithmitical {
  type addDateFunctionClass (line 334) | type addDateFunctionClass struct
    method getFunction (line 338) | func (c *addDateFunctionClass) getFunction(ctx sessionctx.Context, arg...
  function getExpressionFsp (line 402) | func getExpressionFsp(ctx sessionctx.Context, expression Expression) (in...
  type builtinAddDateDatetimeIntSig (line 414) | type builtinAddDateDatetimeIntSig struct
    method Clone (line 419) | func (b *builtinAddDateDatetimeIntSig) Clone() builtinFunc {
  type subDateFunctionClass (line 425) | type subDateFunctionClass struct
    method getFunction (line 429) | func (c *subDateFunctionClass) getFunction(ctx sessionctx.Context, arg...
  type builtinSubDateDatetimeIntSig (line 490) | type builtinSubDateDatetimeIntSig struct
    method Clone (line 495) | func (b *builtinSubDateDatetimeIntSig) Clone() builtinFunc {
  function getBf4TimeAddSub (line 503) | func getBf4TimeAddSub(ctx sessionctx.Context, args []Expression) (tp1, t...
  type addTimeFunctionClass (line 539) | type addTimeFunctionClass struct
    method getFunction (line 543) | func (c *addTimeFunctionClass) getFunction(ctx sessionctx.Context, arg...
  type builtinAddDatetimeAndStringSig (line 560) | type builtinAddDatetimeAndStringSig struct
    method Clone (line 564) | func (b *builtinAddDatetimeAndStringSig) Clone() builtinFunc {
  type subTimeFunctionClass (line 570) | type subTimeFunctionClass struct
    method getFunction (line 574) | func (c *subTimeFunctionClass) getFunction(ctx sessionctx.Context, arg...
  type builtinSubDatetimeAndStringSig (line 591) | type builtinSubDatetimeAndStringSig struct
    method Clone (line 595) | func (b *builtinSubDatetimeAndStringSig) Clone() builtinFunc {
  type timeDiffFunctionClass (line 601) | type timeDiffFunctionClass struct
    method getArgEvalTp (line 605) | func (c *timeDiffFunctionClass) getArgEvalTp(fieldTp *types.FieldType)...
    method getFunction (line 614) | func (c *timeDiffFunctionClass) getFunction(ctx sessionctx.Context, ar...
  type builtinTimeTimeTimeDiffSig (line 647) | type builtinTimeTimeTimeDiffSig struct
    method Clone (line 651) | func (b *builtinTimeTimeTimeDiffSig) Clone() builtinFunc {
  type dateFormatFunctionClass (line 657) | type dateFormatFunctionClass struct
    method getFunction (line 661) | func (c *dateFormatFunctionClass) getFunction(ctx sessionctx.Context, ...
  type builtinDateFormatSig (line 673) | type builtinDateFormatSig struct
    method Clone (line 677) | func (b *builtinDateFormatSig) Clone() builtinFunc {
    method evalString (line 685) | func (b *builtinDateFormatSig) evalString(row chunk.Row) (string, bool...
  type strToDateFunctionClass (line 717) | type strToDateFunctionClass struct
    method getRetTp (line 721) | func (c *strToDateFunctionClass) getRetTp(ctx sessionctx.Context, arg ...
    method getFunction (line 745) | func (c *strToDateFunctionClass) getFunction(ctx sessionctx.Context, a...
  type builtinStrToDateDateSig (line 769) | type builtinStrToDateDateSig struct
    method Clone (line 773) | func (b *builtinStrToDateDateSig) Clone() builtinFunc {
    method evalTime (line 779) | func (b *builtinStrToDateDateSig) evalTime(row chunk.Row) (types.Time,...
  type builtinStrToDateDatetimeSig (line 802) | type builtinStrToDateDatetimeSig struct
    method Clone (line 806) | func (b *builtinStrToDateDatetimeSig) Clone() builtinFunc {
    method evalTime (line 812) | func (b *builtinStrToDateDatetimeSig) evalTime(row chunk.Row) (types.T...
  type builtinStrToDateDurationSig (line 835) | type builtinStrToDateDurationSig struct
    method Clone (line 839) | func (b *builtinStrToDateDurationSig) Clone() builtinFunc {
    method evalDuration (line 848) | func (b *builtinStrToDateDurationSig) evalDuration(row chunk.Row) (typ...
  type currentDateFunctionClass (line 868) | type currentDateFunctionClass struct
    method getFunction (line 872) | func (c *currentDateFunctionClass) getFunction(ctx sessionctx.Context,...
  type builtinCurrentDateSig (line 882) | type builtinCurrentDateSig struct
    method Clone (line 886) | func (b *builtinCurrentDateSig) Clone() builtinFunc {
  function getFlenAndDecimal4UTCTimestampAndNow (line 892) | func getFlenAndDecimal4UTCTimestampAndNow(ctx sessionctx.Context, arg Ex...
  type currentTimeFunctionClass (line 911) | type currentTimeFunctionClass struct
    method getFunction (line 915) | func (c *currentTimeFunctionClass) getFunction(ctx sessionctx.Context,...
  type builtinCurrentTime0ArgSig (line 929) | type builtinCurrentTime0ArgSig struct
    method Clone (line 933) | func (b *builtinCurrentTime0ArgSig) Clone() builtinFunc {
  type nowFunctionClass (line 939) | type nowFunctionClass struct
    method getFunction (line 943) | func (c *nowFunctionClass) getFunction(ctx sessionctx.Context, args []...
  type builtinNowWithArgSig (line 968) | type builtinNowWithArgSig struct
    method Clone (line 972) | func (b *builtinNowWithArgSig) Clone() builtinFunc {
  type builtinNowWithoutArgSig (line 978) | type builtinNowWithoutArgSig struct
    method Clone (line 982) | func (b *builtinNowWithoutArgSig) Clone() builtinFunc {
  type lastDayFunctionClass (line 988) | type lastDayFunctionClass struct
    method getFunction (line 992) | func (c *lastDayFunctionClass) getFunction(ctx sessionctx.Context, arg...
  type builtinLastDaySig (line 1002) | type builtinLastDaySig struct
    method Clone (line 1006) | func (b *builtinLastDaySig) Clone() builtinFunc {
    method evalTime (line 1014) | func (b *builtinLastDaySig) evalTime(row chunk.Row) (types.Time, bool,...

FILE: pkg/expression/column.go
  type CorrelatedColumn (line 29) | type CorrelatedColumn struct
  type Column (line 35) | type Column struct
    method Equal (line 60) | func (col *Column) Equal(_ sessionctx.Context, expr Expression) bool {
    method Clone (line 67) | func (col *Column) Clone() Expression {
    method HashCode (line 77) | func (col *Column) HashCode(_ *stmtctx.StatementContext) []byte {
    method String (line 90) | func (col *Column) String() string {
    method GetType (line 99) | func (col *Column) GetType() *types.FieldType {
    method Decorrelate (line 113) | func (col *Column) Decorrelate(_ *Schema) Expression {
    method EvalInt (line 118) | func (col *Column) EvalInt(ctx sessionctx.Context, row chunk.Row) (int...
    method EvalReal (line 134) | func (col *Column) EvalReal(ctx sessionctx.Context, row chunk.Row) (fl...
    method EvalString (line 145) | func (col *Column) EvalString(ctx sessionctx.Context, row chunk.Row) (...
    method EvalDecimal (line 162) | func (col *Column) EvalDecimal(ctx sessionctx.Context, row chunk.Row) ...
    method Eval (line 170) | func (col *Column) Eval(row chunk.Row) (types.Datum, error) {
    method ConstItem (line 175) | func (col *Column) ConstItem(_ *stmtctx.StatementContext) bool {
    method EvalTime (line 180) | func (col *Column) EvalTime(ctx sessionctx.Context, row chunk.Row) (ty...
    method EvalDuration (line 188) | func (col *Column) EvalDuration(ctx sessionctx.Context, row chunk.Row)...
  constant columnPrefix (line 88) | columnPrefix = "Column#"
  function Column2Exprs (line 104) | func Column2Exprs(cols []*Column) []Expression {

FILE: pkg/expression/constant.go
  type Constant (line 50) | type Constant struct
    method GetType (line 77) | func (c *Constant) GetType() *types.FieldType {
    method EvalInt (line 82) | func (c *Constant) EvalInt(ctx sessionctx.Context, _ chunk.Row) (int64...
    method EvalReal (line 108) | func (c *Constant) EvalReal(ctx sessionctx.Context, _ chunk.Row) (floa...
    method EvalString (line 134) | func (c *Constant) EvalString(ctx sessionctx.Context, _ chunk.Row) (st...
    method EvalDecimal (line 157) | func (c *Constant) EvalDecimal(ctx sessionctx.Context, _ chunk.Row) (*...
    method EvalTime (line 176) | func (c *Constant) EvalTime(ctx sessionctx.Context, _ chunk.Row) (val ...
    method EvalDuration (line 202) | func (c *Constant) EvalDuration(ctx sessionctx.Context, _ chunk.Row) (...
    method String (line 228) | func (c *Constant) String() string {
    method ConstItem (line 233) | func (c *Constant) ConstItem(sc *stmtctx.StatementContext) bool {
    method Decorrelate (line 238) | func (c *Constant) Decorrelate(_ *Schema) Expression {
    method Clone (line 243) | func (c *Constant) Clone() Expression {
    method getLazyDatum (line 252) | func (c *Constant) getLazyDatum() (dt types.Datum, isLazy bool, err er...
    method HashCode (line 257) | func (c *Constant) HashCode(sc *stmtctx.StatementContext) []byte {
    method Equal (line 274) | func (c *Constant) Equal(ctx sessionctx.Context, b Expression) bool {
    method Eval (line 292) | func (c *Constant) Eval(_ chunk.Row) (types.Datum, error) {
  type ParamMarker (line 64) | type ParamMarker struct
    method GetUserVar (line 72) | func (d *ParamMarker) GetUserVar() (types.Datum, bool) {

FILE: pkg/expression/errors.go
  function handleDivisionByZeroError (line 39) | func handleDivisionByZeroError(ctx sessionctx.Context) error {
  function handleInvalidTimeError (line 55) | func handleInvalidTimeError(ctx sessionctx.Context, err error) error {

FILE: pkg/expression/expression.go
  constant constantFlag (line 32) | constantFlag       byte = 0
  constant columnFlag (line 33) | columnFlag         byte = 1
  constant scalarFunctionFlag (line 34) | scalarFunctionFlag byte = 3
  type Expression (line 37) | type Expression interface
  type VarAssignment (line 91) | type VarAssignment struct
  function isColumnInOperand (line 100) | func isColumnInOperand(c *Column) bool {
  function IsEQCondFromIn (line 105) | func IsEQCondFromIn(expr Expression) bool {
  type CNFExprs (line 115) | type CNFExprs
  function splitNormalFormItems (line 118) | func splitNormalFormItems(onExpr Expression, funcName string) []Expressi...
  function SplitCNFItems (line 134) | func SplitCNFItems(onExpr Expression) []Expression {
  function EvaluateExprWithNull (line 140) | func EvaluateExprWithNull(ctx sessionctx.Context, schema *Schema, expr E...
  function composeConditionWithBinaryOp (line 162) | func composeConditionWithBinaryOp(ctx sessionctx.Context, conditions []E...
  function ComposeCNFCondition (line 178) | func ComposeCNFCondition(ctx sessionctx.Context, conditions ...Expressio...
  function ComposeDNFCondition (line 183) | func ComposeDNFCondition(ctx sessionctx.Context, conditions ...Expressio...
  function wrapWithIsTrue (line 193) | func wrapWithIsTrue(ctx sessionctx.Context, keepNull bool, arg Expressio...
  function extractBinaryOpItems (line 210) | func extractBinaryOpItems(conditions *ScalarFunction, funcName string) [...
  function FlattenDNFConditions (line 224) | func FlattenDNFConditions(DNFCondition *ScalarFunction) []Expression {
  function IsBinaryLiteral (line 229) | func IsBinaryLiteral(expr Expression) bool {
  function analyzeScalarFunctionParams (line 234) | func analyzeScalarFunctionParams(sf *ScalarFunction) (

FILE: pkg/expression/expression_to_stmt.go
  type ExprConverter (line 34) | type ExprConverter struct
    method ConvertExpressionToExprNode (line 41) | func (c ExprConverter) ConvertExpressionToExprNode(dialect format.Dial...
    method isArgScalarFunc (line 57) | func (c ExprConverter) isArgScalarFunc(expr Expression) bool {
    method convertConst (line 64) | func (c ExprConverter) convertConst(constant *Constant) (*driver.Value...
    method convertColumn (line 68) | func (c ExprConverter) convertColumn(column *Column) (*ast.ColumnNameE...
    method getOpPrecedence (line 90) | func (c ExprConverter) getOpPrecedence(expr *ScalarFunction) int {
    method convertScalarFunction (line 123) | func (c ExprConverter) convertScalarFunction(dialect format.Dialect, e...
    method buildGeoDistExpr (line 242) | func (c ExprConverter) buildGeoDistExpr(children []ast.ExprNode, diale...
  constant precNonOperatorExpression (line 38) | precNonOperatorExpression = 100
  function radians (line 238) | func radians(node ast.ExprNode) *ast.FuncCallExpr {
  function IsCompareOp (line 292) | func IsCompareOp(expr *ScalarFunction) bool {

FILE: pkg/expression/helper.go
  function boolToInt64 (line 17) | func boolToInt64(v bool) int64 {

FILE: pkg/expression/rand.go
  constant maxRandValue (line 19) | maxRandValue = 0x3FFFFFFF
  type MysqlRng (line 23) | type MysqlRng struct
    method Gen (line 41) | func (rng *MysqlRng) Gen() float64 {
  function NewWithSeed (line 29) | func NewWithSeed(seed int64) *MysqlRng {
  function NewWithTime (line 36) | func NewWithTime() *MysqlRng {

FILE: pkg/expression/scalar_function.go
  type ScalarFunction (line 41) | type ScalarFunction struct
    method GetType (line 50) | func (sf *ScalarFunction) GetType() *types.FieldType {
    method Equal (line 55) | func (sf *ScalarFunction) Equal(ctx sessionctx.Context, e Expression) ...
    method GetArgs (line 67) | func (sf *ScalarFunction) GetArgs() []Expression {
    method GetCtx (line 72) | func (sf *ScalarFunction) GetCtx() sessionctx.Context {
    method ConstItem (line 77) | func (sf *ScalarFunction) ConstItem(sc *stmtctx.StatementContext) bool {
    method String (line 91) | func (sf *ScalarFunction) String() string {
    method Decorrelate (line 247) | func (sf *ScalarFunction) Decorrelate(schema *Schema) Expression {
    method EvalInt (line 255) | func (sf *ScalarFunction) EvalInt(ctx sessionctx.Context, row chunk.Ro...
    method EvalReal (line 263) | func (sf *ScalarFunction) EvalReal(ctx sessionctx.Context, row chunk.R...
    method EvalDecimal (line 268) | func (sf *ScalarFunction) EvalDecimal(ctx sessionctx.Context, row chun...
    method EvalString (line 273) | func (sf *ScalarFunction) EvalString(ctx sessionctx.Context, row chunk...
    method EvalTime (line 278) | func (sf *ScalarFunction) EvalTime(ctx sessionctx.Context, row chunk.R...
    method EvalDuration (line 283) | func (sf *ScalarFunction) EvalDuration(ctx sessionctx.Context, row chu...
    method Clone (line 288) | func (sf *ScalarFunction) Clone() Expression {
    method HashCode (line 298) | func (sf *ScalarFunction) HashCode(sc *stmtctx.StatementContext) []byte {
    method Eval (line 311) | func (sf *ScalarFunction) Eval(row chunk.Row) (d types.Datum, err erro...
  function typeInferForNull (line 106) | func typeInferForNull(args []Expression) {
  function newFunctionImpl (line 139) | func newFunctionImpl(ctx sessionctx.Context, fold bool, funcName string,...
  function TransferDateFuncIntervalToSeconds (line 183) | func TransferDateFuncIntervalToSeconds(funcArgs []Expression) ([]Express...
  function NewFunction (line 221) | func NewFunction(ctx sessionctx.Context, funcName string, retType *types...
  function NewFunctionBase (line 226) | func NewFunctionBase(ctx sessionctx.Context, funcName string, retType *t...
  function ScalarFuncs2Exprs (line 231) | func ScalarFuncs2Exprs(funcs []*ScalarFunction) []Expression {
  function NewFunctionInternal (line 240) | func NewFunctionInternal(ctx sessionctx.Context, funcName string, retTyp...

FILE: pkg/expression/schema.go
  type KeyInfo (line 21) | type KeyInfo
    method Clone (line 24) | func (ki KeyInfo) Clone() KeyInfo {
  type Schema (line 37) | type Schema struct
    method String (line 43) | func (s *Schema) String() string {
    method Clone (line 60) | func (s *Schema) Clone() *Schema {
    method RetrieveColumn (line 97) | func (s *Schema) RetrieveColumn(col *Column) *Column {
    method IsUniqueKey (line 106) | func (s *Schema) IsUniqueKey(col *Column) bool {
    method ColumnIndex (line 116) | func (s *Schema) ColumnIndex(col *Column) int {
    method Contains (line 126) | func (s *Schema) Contains(col *Column) bool {
    method Len (line 131) | func (s *Schema) Len() int {
    method Append (line 136) | func (s *Schema) Append(col ...*Column) {
    method SetUniqueKeys (line 141) | func (s *Schema) SetUniqueKeys(keys []KeyInfo) {
    method ColumnsIndices (line 147) | func (s *Schema) ColumnsIndices(cols []*Column) (ret []int) {
    method ColumnsByIndices (line 164) | func (s *Schema) ColumnsByIndices(offsets []int) []*Column {
  function ExprFromSchema (line 79) | func ExprFromSchema(expr Expression, schema *Schema) bool {
  function MergeSchema (line 174) | func MergeSchema(lSchema, rSchema *Schema) *Schema {
  function NewSchema (line 190) | func NewSchema(cols ...*Column) *Schema {

FILE: pkg/expression/simple_rewriter.go
  function FindFieldName (line 22) | func FindFieldName(names types.NameSlice, astCol *ast.ColumnName) (int, ...
  function FindFieldNameIdxByColName (line 40) | func FindFieldNameIdxByColName(names []*types.FieldName, colName string)...

FILE: pkg/expression/util.go
  type cowExprRef (line 28) | type cowExprRef struct
    method Set (line 34) | func (c *cowExprRef) Set(i int, changed bool, val Expression) {
    method Result (line 48) | func (c *cowExprRef) Result() []Expression {
  function extractColumns (line 55) | func extractColumns(result []*Column, expr Expression, filter func(*Colu...
  function ExtractColumns (line 69) | func ExtractColumns(expr Expression) []*Column {
  function ExtractColumnsFromExpressions (line 87) | func ExtractColumnsFromExpressions(result []*Column, exprs []Expression,...
  function GetRowLen (line 95) | func GetRowLen(e Expression) int {
  function CheckArgsNotMultiColumnRow (line 103) | func CheckArgsNotMultiColumnRow(args ...Expression) error {
  function GetFuncArg (line 113) | func GetFuncArg(e Expression, idx int) Expression {
  function PopRowFirstArg (line 122) | func PopRowFirstArg(ctx sessionctx.Context, e Expression) (ret Expressio...
  function ExtractCorColumns (line 135) | func ExtractCorColumns(expr Expression) (cols []*CorrelatedColumn) {
  function ColumnSubstitute (line 149) | func ColumnSubstitute(expr Expression, schema *Schema, newExprs []Expres...
  function setExprColumnInOperand (line 154) | func setExprColumnInOperand(expr Expression) Expression {
  function ColumnSubstituteImpl (line 171) | func ColumnSubstituteImpl(expr Expression, schema *Schema, newExprs []Ex...
  function ExtractFiltersFromDNFs (line 210) | func ExtractFiltersFromDNFs(ctx sessionctx.Context, conditions []Express...
  function IsMutableEffectsExpr (line 222) | func IsMutableEffectsExpr(expr Expression) bool {
  function RemoveDupExprs (line 230) | func RemoveDupExprs(ctx sessionctx.Context, exprs []Expression) []Expres...
  function getValidPrefix (line 245) | func getValidPrefix(s string, base int64) string {
  function GetUint64FromConstant (line 284) | func GetUint64FromConstant(expr Expression) (uint64, bool, bool) {
  function ConstructPositionExpr (line 313) | func ConstructPositionExpr(p *driver.ParamMarkerExpr) *ast.PositionExpr {
  function ParamMarkerExpression (line 318) | func ParamMarkerExpression(sctx sessionctx.Context, v *driver.ParamMarke...
  function FilterOutInPlace (line 331) | func FilterOutInPlace(input []Expression, filter func(Expression) bool) ...

FILE: pkg/infoschema/builder.go
  function tableBucketIdx (line 21) | func tableBucketIdx(tableID int64) int {

FILE: pkg/infoschema/infoschema.go
  type InfoSchema (line 35) | type InfoSchema interface
  type sortedTables (line 40) | type sortedTables
    method Len (line 42) | func (s sortedTables) Len() int {
    method Swap (line 46) | func (s sortedTables) Swap(i, j int) {
    method Less (line 50) | func (s sortedTables) Less(i, j int) bool {
  type schemaTables (line 54) | type schemaTables struct
  constant bucketCount (line 59) | bucketCount = 512
  type infoSchema (line 61) | type infoSchema struct
    method TableByName (line 68) | func (is *infoSchema) TableByName(schema, table model.CIStr) (t table....
    method SchemaByName (line 109) | func (is *infoSchema) SchemaByName(schema model.CIStr) (val *model.DBI...
  function MockInfoSchema (line 78) | func MockInfoSchema(dbTableList map[string][]*model.TableInfo) InfoSchema {
  function FromTableSchema (line 117) | func FromTableSchema(tableSchema []*TableSchema) (InfoSchema, error) {
  function TypeConversion (line 184) | func TypeConversion(tp string) (types.FieldType, error) {
  function FieldTypeString (line 205) | func FieldTypeString(tp types.FieldType) (string, error) {
  function TypeDefaultValue (line 222) | func TypeDefaultValue(tp string) (interface{}, error) {

FILE: pkg/infoschema/infoschema_test.go
  function TestT (line 30) | func TestT(t *testing.T) {
  type testSuite (line 37) | type testSuite struct
    method TestMockInfoSchema (line 40) | func (testSuite) TestMockInfoSchema(c *C) {
  function TestFromTableSchema (line 63) | func TestFromTableSchema(t *testing.T) {

FILE: pkg/infoschema/table_schema.go
  type TableSchema (line 16) | type TableSchema struct
  type ColumnDesc (line 23) | type ColumnDesc struct

FILE: pkg/interpreter/compiler/arrow_func_options.go
  type SliceOptions (line 26) | type SliceOptions struct
    method TypeName (line 32) | func (SliceOptions) TypeName() string { return "SliceOptions" }
  type TrimOptions (line 34) | type TrimOptions struct
    method TypeName (line 38) | func (TrimOptions) TypeName() string { return "TrimOptions" }
  type StrptimeOptions (line 40) | type StrptimeOptions struct
    method TypeName (line 46) | func (StrptimeOptions) TypeName() string { return "StrptimeOptions" }

FILE: pkg/interpreter/compiler/codegen_pass.go
  type CodeGenPass (line 30) | type CodeGenPass struct
    method Name (line 38) | func (p *CodeGenPass) Name() string {
    method Run (line 43) | func (p *CodeGenPass) Run(c *CompileContext) error {
  function NewCodeGenPass (line 33) | func NewCodeGenPass() *CodeGenPass {
  function buildCompiledPlan (line 72) | func buildCompiledPlan(spuConf *spu.RuntimeConfig, eGraph *graph.Graph, ...
  function processExecutionGraph (line 165) | func processExecutionGraph(ep *graph.Graph, spuConf *spu.RuntimeConfig, ...

FILE: pkg/interpreter/compiler/column_security_relaxation.go
  type TensorVisibilityChecker (line 17) | type TensorVisibilityChecker interface
  type ColumnSecurityRelaxation (line 21) | type ColumnSecurityRelaxation interface
  type ColumnSecurityRelaxationBase (line 32) | type ColumnSecurityRelaxationBase struct
    method IsAlwaysApply (line 45) | func (csr *ColumnSecurityRelaxationBase) IsAlwaysApply() bool {
    method ApplicableTo (line 49) | func (csr *ColumnSecurityRelaxationBase) ApplicableTo(t *TensorMeta, t...
    method MakeApplicable (line 63) | func (csr *ColumnSecurityRelaxationBase) MakeApplicable(t *TensorMeta) {
    method AllApplicable (line 67) | func (csr *ColumnSecurityRelaxationBase) AllApplicable(tensors []*Tens...
  function NewColumnSecurityRelaxationBase (line 37) | func NewColumnSecurityRelaxationBase(alwaysApply bool) *ColumnSecurityRe...

FILE: pkg/interpreter/compiler/column_security_relaxation_test.go
  type MockTensorVisibilityChecker (line 24) | type MockTensorVisibilityChecker struct
    method IsTensorPublic (line 34) | func (m *MockTensorVisibilityChecker) IsTensorPublic(t *TensorMeta) bo...
    method SetTensorPublic (line 38) | func (m *MockTensorVisibilityChecker) SetTensorPublic(id int, isPublic...
  function NewMockTensorVisibilityChecker (line 28) | func NewMockTensorVisibilityChecker() *MockTensorVisibilityChecker {
  function TestApplicableToAlwaysApply (line 42) | func TestApplicableToAlwaysApply(t *testing.T) {
  function TestApplicableToNotAlwaysApply (line 62) | func TestApplicableToNotAlwaysApply(t *testing.T) {
  function TestMakeApplicable (line 83) | func TestMakeApplicable(t *testing.T) {
  function TestAllApplicable (line 107) | func TestAllApplicable(t *testing.T) {
  function TestAllApplicableEmptyList (line 137) | func TestAllApplicableEmptyList(t *testing.T) {

FILE: pkg/interpreter/compiler/common.go
  function isSimpleCount (line 28) | func isSimpleCount(aggFunc *aggregation.AggFuncDesc) bool {
  function extractEQColumns (line 32) | func extractEQColumns(exp *expression.ScalarFunction) ([]*expression.Col...
  function inferAggOutputType (line 45) | func inferAggOutputType(aggFunc *aggregation.AggFuncDesc, inputType *gra...
  function isFloatOrDoubleType (line 62) | func isFloatOrDoubleType(tp proto.PrimitiveDataType) bool {

FILE: pkg/interpreter/compiler/common_test.go
  function TestConvertDataType (line 28) | func TestConvertDataType(t *testing.T) {

FILE: pkg/interpreter/compiler/compiler.go
  type CompileTarget (line 34) | type CompileTarget
  constant TargetAST (line 37) | TargetAST CompileTarget = iota
  constant TargetLogicalPlan (line 38) | TargetLogicalPlan
  constant TargetOperatorGraph (line 39) | TargetOperatorGraph
  constant TargetExecutionGraph (line 40) | TargetExecutionGraph
  constant TargetExecutionPlan (line 41) | TargetExecutionPlan
  type Pass (line 45) | type Pass interface
  type CompileContext (line 54) | type CompileContext struct
  function NewCompileContext (line 79) | func NewCompileContext(ctx context.Context, req *v1.CompileSQLRequest) *...
  type CompilationDetails (line 86) | type CompilationDetails struct
    method String (line 98) | func (cd *CompilationDetails) String() string {
  type Compiler (line 164) | type Compiler struct
    method compileInternal (line 196) | func (c *Compiler) compileInternal(ctx context.Context, req *v1.Compil...
  function NewCompiler (line 169) | func NewCompiler(target CompileTarget) *Compiler {
  function CompileToAST (line 213) | func CompileToAST(ctx context.Context, req *v1.CompileSQLRequest) (ast.S...
  function CompileToLogicalPlan (line 226) | func CompileToLogicalPlan(ctx context.Context, req *v1.CompileSQLRequest...
  function CompileToOperatorGraph (line 239) | func CompileToOperatorGraph(ctx context.Context, req *v1.CompileSQLReque...
  function CompileToExecutionGraph (line 252) | func CompileToExecutionGraph(ctx context.Context, req *v1.CompileSQLRequ...
  function Compile (line 265) | func Compile(ctx context.Context, req *v1.CompileSQLRequest) (*pb.Compil...
  function DetailedCompile (line 278) | func DetailedCompile(ctx context.Context, req *v1.CompileSQLRequest) (*C...
  function formatExecutionPlan (line 297) | func formatExecutionPlan(plan *pb.CompiledPlan) string {

FILE: pkg/interpreter/compiler/compiler_test.go
  function TestCompiler (line 35) | func TestCompiler(t *testing.T) {
  function createCompileRequest (line 62) | func createCompileRequest(query string) (*v1.CompileSQLRequest, error) {
  function createCompileRequestWithConf (line 66) | func createCompileRequestWithConf(query string, conf testConf) (*v1.Comp...
  function getTestCompileOptions (line 102) | func getTestCompileOptions() *v1.CompileOptions {
  function getTestSecurityConfig (line 113) | func getTestSecurityConfig() (*v1.CompilerSecurityConfig, error) {
  function TestCompileToExecutionGraph (line 140) | func TestCompileToExecutionGraph(t *testing.T) {
  function TestCompilerPlayground (line 204) | func TestCompilerPlayground(t *testing.T) {

FILE: pkg/interpreter/compiler/constant.go
  constant RevealKeyAfterJoin (line 25) | RevealKeyAfterJoin = "reveal_key_after_join"
  constant RevealFilterMask (line 26) | RevealFilterMask   = "reveal_filter_mask"

FILE: pkg/interpreter/compiler/execution_graph_builder.go
  type ExecutionGraphBuilder (line 33) | type ExecutionGraphBuilder struct
    method GetAllParties (line 66) | func (builder *ExecutionGraphBuilder) GetAllParties() []string {
    method SetBatched (line 70) | func (builder *ExecutionGraphBuilder) SetBatched(batched bool) {
    method IsBatched (line 76) | func (builder *ExecutionGraphBuilder) IsBatched() bool {
    method TensorManager (line 83) | func (builder *ExecutionGraphBuilder) TensorManager() *TensorManager {
    method DumpPlan (line 87) | func (builder *ExecutionGraphBuilder) DumpPlan() string {
    method Build (line 99) | func (builder *ExecutionGraphBuilder) Build(operatorGraph *OperatorGra...
    method addKernel (line 116) | func (builder *ExecutionGraphBuilder) addKernel(kernel Kernel, node Op...
    method addEngineNode (line 128) | func (builder *ExecutionGraphBuilder) addEngineNode(name string, opTyp...
    method prepareResultForParty (line 178) | func (builder *ExecutionGraphBuilder) prepareResultForParty(originResu...
    method buildGraph (line 197) | func (builder *ExecutionGraphBuilder) buildGraph() (*graph.Graph, erro...
    method fillPipeline (line 268) | func (builder *ExecutionGraphBuilder) fillPipeline(plan *graph.Graph, ...
    method getLastPipelineOperator (line 327) | func (builder *ExecutionGraphBuilder) getLastPipelineOperator() *Pipel...
  type PipelineExecNode (line 47) | type PipelineExecNode struct
  function NewExecutionGraphBuilder (line 52) | func NewExecutionGraphBuilder(tensorMetaManager *TensorMetaManager, srm ...

FILE: pkg/interpreter/compiler/execution_graph_builder_ops.go
  method addOpRunSQL (line 33) | func (builder *ExecutionGraphBuilder) addOpRunSQL(outs []*graph.Tensor, ...
  method addOpSecretJoin (line 41) | func (builder *ExecutionGraphBuilder) addOpSecretJoin(leftKeys, rightKey...
  method addOpPsiJoin (line 55) | func (builder *ExecutionGraphBuilder) addOpPsiJoin(left, right []*graph....
  method addOpFilterByIndex (line 78) | func (builder *ExecutionGraphBuilder) addOpFilterByIndex(filter *graph.T...
  method addOpReduce (line 87) | func (builder *ExecutionGraphBuilder) addOpReduce(aggName string, in, ou...
  method addOpUnique (line 104) | func (builder *ExecutionGraphBuilder) addOpUnique(in, out *graph.Tensor)...
  method addOpSort (line 110) | func (builder *ExecutionGraphBuilder) addOpSort(keys, payloads, outs []*...
  method addOpObliviousGroupMark (line 129) | func (builder *ExecutionGraphBuilder) addOpObliviousGroupMark(keys []*gr...
  method addOpShape (line 135) | func (builder *ExecutionGraphBuilder) addOpShape(in, out *graph.Tensor) ...
  method addOpBroadcastTo (line 142) | func (builder *ExecutionGraphBuilder) addOpBroadcastTo(shapeRef *graph.T...
  method addOpPrivateGroup (line 157) | func (builder *ExecutionGraphBuilder) addOpPrivateGroup(keys []*graph.Te...
  method addOpPrivateGroupAgg (line 166) | func (builder *ExecutionGraphBuilder) addOpPrivateGroupAgg(name string, ...
  method addOpGroupSecretAgg (line 177) | func (builder *ExecutionGraphBuilder) addOpGroupSecretAgg(funcName strin...
  method addOpShuffle (line 192) | func (builder *ExecutionGraphBuilder) addOpShuffle(ins, outs []*graph.Te...
  method addOpObliviousGroupAgg (line 198) | func (builder *ExecutionGraphBuilder) addOpObliviousGroupAgg(funcName st...
  method addOpFilter (line 210) | func (builder *ExecutionGraphBuilder) addOpFilter(mask *graph.Tensor, in...
  method addOpReplicate (line 216) | func (builder *ExecutionGraphBuilder) addOpReplicate(leftinputs, rightin...
  method addOpLimit (line 229) | func (builder *ExecutionGraphBuilder) addOpLimit(ins, outs []*graph.Tens...
  method addOpConcat (line 239) | func (builder *ExecutionGraphBuilder) addOpConcat(ins []*graph.Tensor, o...
  method addOpConstant (line 245) | func (builder *ExecutionGraphBuilder) addOpConstant(value *types.Datum, ...
  method addOpIn (line 280) | func (builder *ExecutionGraphBuilder) addOpIn(left, right, out *graph.Te...
  method addOpArrowFunc (line 302) | func (builder *ExecutionGraphBuilder) addOpArrowFunc(funcName string, fu...
  method addOpBasicFunc (line 324) | func (builder *ExecutionGraphBuilder) addOpBasicFunc(funcName string, in...
  method addOpBinaryFunc (line 341) | func (builder *ExecutionGraphBuilder) addOpBinaryFunc(funcName string, l...
  method addOpIf (line 358) | func (builder *ExecutionGraphBuilder) addOpIf(cond, valueTrue, valueFals...
  method addOpCaseWhen (line 374) | func (builder *ExecutionGraphBuilder) addOpCaseWhen(conds, values []*gra...
  method addOpIfNull (line 390) | func (builder *ExecutionGraphBuilder) addOpIfNull(expr, altValue, output...
  method addOpCoalece (line 402) | func (builder *ExecutionGraphBuilder) addOpCoalece(exprs []*graph.Tensor...
  method addOpPrivateWindow (line 414) | func (builder *ExecutionGraphBuilder) addOpPrivateWindow(funcName string...
  method addOpPublish (line 438) | func (builder *ExecutionGraphBuilder) addOpPublish(results, outs []*grap...
  method addOpBucket (line 448) | func (builder *ExecutionGraphBuilder) addOpBucket(keys, ins, outs []*gra...
  method addOpInsertTable (line 458) | func (builder *ExecutionGraphBuilder) addOpInsertTable(results, outs []*...
  constant _quotingNone (line 470) | _quotingNone     int64 = 0
  constant _quotingNeeded (line 471) | _quotingNeeded   int64 = 1
  constant _quotingAllValid (line 472) | _quotingAllValid int64 = 2
  method addOpDumpFile (line 475) | func (builder *ExecutionGraphBuilder) addOpDumpFile(ins, outs []*graph.T...

FILE: pkg/interpreter/compiler/execution_graph_builder_test.go
  function createTestHelp (line 28) | func createTestHelp() (*ExecutionGraphBuilder, func(string, proto.Primit...
  function TestExecutionGraphBuilderBasicMethods (line 46) | func TestExecutionGraphBuilderBasicMethods(t *testing.T) {
  function TestAddEngineNode (line 71) | func TestAddEngineNode(t *testing.T) {
  function TestBuildGraph (line 105) | func TestBuildGraph(t *testing.T) {
  function TestPrepareResultForParty (line 154) | func TestPrepareResultForParty(t *testing.T) {
  function TestPrepareResultForPartyLengthMismatch (line 182) | func TestPrepareResultForPartyLengthMismatch(t *testing.T) {
  function TestPrepareResultForPartyInvisible (line 204) | func TestPrepareResultForPartyInvisible(t *testing.T) {

FILE: pkg/interpreter/compiler/execution_graph_pass.go
  type ExecutionGraphPass (line 24) | type ExecutionGraphPass struct
    method Name (line 32) | func (p *ExecutionGraphPass) Name() string {
    method Run (line 37) | func (p *ExecutionGraphPass) Run(c *CompileContext) error {
  function NewExecutionGraphPass (line 27) | func NewExecutionGraphPass() *ExecutionGraphPass {

FILE: pkg/interpreter/compiler/inference.go
  function inferStandard (line 18) | func inferStandard(vs *VisibilitySolver, n Operator) ([]*TensorMeta, err...
  method Infer (line 33) | func (n *OperatorResult) Infer(_ *VisibilitySolver, _ bool) ([]*TensorMe...
  method Infer (line 38) | func (n *OperatorDataSource) Infer(vs *VisibilitySolver, applySecurityRe...
  method Infer (line 56) | func (n *OperatorRunSQL) Infer(vs *VisibilitySolver, applySecurityRelaxa...
  method Infer (line 76) | func (n *OperatorEQJoin) Infer(vs *VisibilitySolver, applySecurityRelaxa...
  method Infer (line 103) | func (n *OperatorCrossJoin) Infer(vs *VisibilitySolver, applySecurityRel...
  method Infer (line 107) | func (n *OperatorLimit) Infer(vs *VisibilitySolver, applySecurityRelaxat...
  method Infer (line 111) | func (n *OperatorFilter) Infer(vs *VisibilitySolver, applySecurityRelaxa...
  method Infer (line 115) | func (n *OperatorBroadcastTo) Infer(vs *VisibilitySolver, applySecurityR...
  method Infer (line 119) | func (n *OperatorConcat) Infer(vs *VisibilitySolver, applySecurityRelaxa...
  method Infer (line 123) | func (n *OperatorSort) Infer(vs *VisibilitySolver, applySecurityRelaxati...
  method
Copy disabled (too large) Download .json
Condensed preview — 849 files, each showing path, character count, and a content snippet. Download the .json file for the full structured content (11,713K chars).
[
  {
    "path": ".bazeliskrc",
    "chars": 24,
    "preview": "USE_BAZEL_VERSION=7.7.1\n"
  },
  {
    "path": ".bazelrc",
    "chars": 2306,
    "preview": "common --experimental_repo_remote_exec\ncommon --experimental_cc_shared_library\ncommon --experimental_ui_max_stdouterr_by"
  },
  {
    "path": ".circleci/config.yml",
    "chars": 1213,
    "preview": "# Copyright 2023 Ant Group Co., Ltd.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not u"
  },
  {
    "path": ".circleci/coverage-config.yml",
    "chars": 5127,
    "preview": "# Copyright 2025 Ant Group Co., Ltd.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not u"
  },
  {
    "path": ".circleci/diff-cover-config.yml",
    "chars": 8927,
    "preview": "# Copyright 2025 Ant Group Co., Ltd.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not u"
  },
  {
    "path": ".circleci/full-unittest-config.yml",
    "chars": 5419,
    "preview": "# Copyright 2023 Ant Group Co., Ltd.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not u"
  },
  {
    "path": ".circleci/lite-unittest-config.yml",
    "chars": 3977,
    "preview": "# Copyright 2025 Ant Group Co., Ltd.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not u"
  },
  {
    "path": ".circleci/path-filtering/unittest.conf",
    "chars": 300,
    "preview": "api/.* run_go_ut true\ncmd/.* run_go_ut true\npkg/.* run_go_ut true\n.circleci/lite-unittest-config.yml run_go_ut true\nbaze"
  },
  {
    "path": ".clang-format",
    "chars": 291,
    "preview": "# Use the Google style in this project.\nBasedOnStyle: Google\n\nIncludeBlocks: Regroup\nIncludeCategories:\n  - Regex: '^<.*"
  },
  {
    "path": ".clang-tidy",
    "chars": 2369,
    "preview": "Checks: \"abseil-cleanup-ctad,\n  abseil-faster-strsplit-delimiter,\n  abseil-duration-*,\n  abseil-no-namespace,\n  abseil-r"
  },
  {
    "path": ".coveralls.yml",
    "chars": 652,
    "preview": "# Configure whether the Coveralls status check fails when coverage decreases\nfail_on_coverage_decrease: false\n\ncoverage:"
  },
  {
    "path": ".devcontainer/Dockerfile",
    "chars": 1647,
    "preview": "FROM secretflow/ubuntu-base-ci:latest\n\nARG TARGETPLATFORM\nARG GO_VERSION=1.24.0\n\n# install go\nRUN if [ \"$TARGETPLATFORM\""
  },
  {
    "path": ".devcontainer/devcontainer.json",
    "chars": 1472,
    "preview": "// For format details, see https://aka.ms/devcontainer.json. For config options, see the\n// README at: https://github.co"
  },
  {
    "path": ".github/CODEOWNERS",
    "chars": 72,
    "preview": "# default reviewers for everything in this repo.\n* @secretflow/scql-dev\n"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/Consulting_issue_template.yaml",
    "chars": 1659,
    "preview": "name: Consulting Template\ndescription: Ask SCQL related questions\nbody:\n  - type: markdown\n    attributes:\n      value: "
  },
  {
    "path": ".github/ISSUE_TEMPLATE/Error_Issue_Template.yaml",
    "chars": 2488,
    "preview": "name: Error Template\ndescription: Thank you for reporting the issue!\nbody:\n  - type: markdown\n    attributes:\n      valu"
  },
  {
    "path": ".github/workflows/black.yml",
    "chars": 278,
    "preview": "---\nname: Python Linter\non:\n  push:\n    branches:\n    - main\n    paths:\n      - '**.py'\n  pull_request:\n    branches:\n  "
  },
  {
    "path": ".github/workflows/buildifier.yml",
    "chars": 237,
    "preview": "---\nname: Bazel files linter\non:\n  push:\n    branches:\n    - main\n  pull_request:\n    branches:\n    - main\npermissions:\n"
  },
  {
    "path": ".github/workflows/cla.yml",
    "chars": 232,
    "preview": "---\nname: CLA Assistant\non:\n  issue_comment:\n    types: [created]\n  pull_request_target:\n    types: [opened, closed, syn"
  },
  {
    "path": ".github/workflows/clang-format-linter.yml",
    "chars": 426,
    "preview": "---\nname: Run clang-format Linter\non:\n  push:\n    branches:\n    - main\n    paths:\n      - '**.cc'\n      - '**.cpp'\n     "
  },
  {
    "path": ".github/workflows/codeql.yml",
    "chars": 2927,
    "preview": "# For most projects, this workflow file will not need changing; you simply need\n# to commit it to your repository.\n#\n# Y"
  },
  {
    "path": ".github/workflows/dependency-review.yml",
    "chars": 997,
    "preview": "# Dependency Review Action\n#\n# This Action will scan dependency manifest files that change as part of a Pull Request,\n# "
  },
  {
    "path": ".github/workflows/docs-check.yml",
    "chars": 1118,
    "preview": "---\nname: Check Docs\non:\n  push:\n    branches:\n      - main\n    paths:\n      - 'docs/**'\n  pull_request:\n    branches:\n "
  },
  {
    "path": ".github/workflows/docs-publish.yml",
    "chars": 1444,
    "preview": "# Copyright 2025 Ant Group Co., Ltd.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not u"
  },
  {
    "path": ".github/workflows/golangci-lint.yml",
    "chars": 2003,
    "preview": "---\nname: Golangci-Lint\n\non:\n  push:\n    branches:\n      - main\n    paths:\n      - '**.go'\n      - '.golangci-lint.yml'\n"
  },
  {
    "path": ".github/workflows/govulncheck.yml",
    "chars": 595,
    "preview": "---\nname: Go Vulnerability Check\n\non:\n  push:\n    branches:\n      - main\n    paths:\n      - '**.go'\n      - 'go.mod'\n   "
  },
  {
    "path": ".github/workflows/license-check.yml",
    "chars": 226,
    "preview": "---\nname: License Check\non:\n  push:\n    branches:\n    - main\n  pull_request:\n    branches:\n    - main\npermissions:\n  con"
  },
  {
    "path": ".github/workflows/oscp.yml",
    "chars": 194,
    "preview": "name: Unassign Stale OSCP Issues\n\non:\n  schedule:\n    - cron: \"0 */6 * * *\" # Every 6 hours\n\njobs:\n  unassign-stale-issu"
  },
  {
    "path": ".github/workflows/scorecards.yml",
    "chars": 3231,
    "preview": "# This workflow uses actions that are not certified by GitHub. They are provided\n# by a third-party and are governed by "
  },
  {
    "path": ".github/workflows/stale.yml",
    "chars": 183,
    "preview": "---\nname: Mark stale issues and pull requests\non:\n  workflow_dispatch:\n  schedule:\n    - cron: 40 9 * * *\njobs:\n  stale:"
  },
  {
    "path": ".github/workflows/trigger-ci-cov.yml",
    "chars": 1572,
    "preview": "name: Trigger CircleCI Coverage Test\n\non:\n  pull_request_target:\n    types: [labeled] # Only run when a label is added\n\n"
  },
  {
    "path": ".github/workflows/trigger-ci-full-ut.yml",
    "chars": 1439,
    "preview": "name: Trigger CircleCI Full Unit Test for Forked & Labeled PR\n\non:\n  pull_request_target:\n    types: [labeled]\n\njobs:\n  "
  },
  {
    "path": ".github/workflows/trigger-ci-lite-ut.yml",
    "chars": 1594,
    "preview": "name: Trigger CircleCI Lite Unit Test for Forked & Labeled PR\n\non:\n  pull_request_target:\n    types: [labeled]\n\njobs:\n  "
  },
  {
    "path": ".github/workflows/trigger-diff-coverage.yml",
    "chars": 1209,
    "preview": "name: Manually Trigger Incremental Coverage Test\n\n# Use workflow_dispatch to allow manual triggering\non:\n  workflow_disp"
  },
  {
    "path": ".github/workflows/whitespace-check.yml",
    "chars": 587,
    "preview": "name: Whitespace Check\n\non:\n  pull_request:\n    types: [opened, synchronize]\n\nconcurrency:\n  group: ${{ github.workflow "
  },
  {
    "path": ".github/workflows/yaml-linter.yml",
    "chars": 216,
    "preview": "---\nname: Yaml Lint\non:\n  push:\n    branches:\n    - main\n  pull_request:\n    branches:\n    - main\npermissions:\n  content"
  },
  {
    "path": ".gitignore",
    "chars": 359,
    "preview": "# docs\ndocs/_build\n\n# bazel\n/bazel-*\n\n# go\nbin/*\ntool-bin/*\n/vendor\n\n# cloudide\n.cloudide/\n\n/compile_commands.json\n\n# cl"
  },
  {
    "path": ".golangci.yml",
    "chars": 5874,
    "preview": "# This file contains all available configuration options\n# with their default values.\nversion: \"2\"\n\n# options for analys"
  },
  {
    "path": ".licenserc.yaml",
    "chars": 2722,
    "preview": "header:\n  license:\n    spdx-id: Apache-2.0\n    copyright-owner: Ant Group Co., Ltd.\n    copyright-year: auto\n    softwar"
  },
  {
    "path": ".markdownlint.yaml",
    "chars": 2178,
    "preview": "# Copyright 2025 Ant Group Co., Ltd.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not u"
  },
  {
    "path": ".pre-commit-config.yaml",
    "chars": 654,
    "preview": "repos:\n  - repo: https://github.com/gitleaks/gitleaks\n    rev: v8.24.0\n    hooks:\n      - id: gitleaks\n  - repo: https:/"
  },
  {
    "path": ".vscode/cspell.json",
    "chars": 402,
    "preview": "// cSpell Settings\n{\n  // Version of the setting file.  Always 0.2\n  \"version\": \"0.2\",\n  // language - current active sp"
  },
  {
    "path": ".vscode/extensions.json",
    "chars": 404,
    "preview": "{\n    \"recommendations\": [\n        \"BazelBuild.vscode-bazel\",\n        \"eamodio.gitlens\",\n        \"golang.go\",\n        \"m"
  },
  {
    "path": ".vscode/settings.json",
    "chars": 558,
    "preview": "{\n    \"editor.formatOnSave\": true,\n    \"gopls\": {\n        \"formatting.local\": \"github.com/secretflow/scql\"\n    },\n    \"["
  },
  {
    "path": "BUILD.bazel",
    "chars": 581,
    "preview": "# Copyright 2023 Ant Group Co., Ltd.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not u"
  },
  {
    "path": "CHANGELOG.md",
    "chars": 11510,
    "preview": "# Changelog\n\nAll notable changes to this project will be documented in this file.\n\nThe format is based on [Keep a Change"
  },
  {
    "path": "CONTRIBUTING.md",
    "chars": 2096,
    "preview": "# Contributing\n\n## Contributor License Agreement\n\nContributions to this project must be accompanied by a Contributor Lic"
  },
  {
    "path": "LEGAL.md",
    "chars": 409,
    "preview": "# Legal Disclaimer\n\nWithin this source code, the comments in Chinese shall be the original, governing version. Any comme"
  },
  {
    "path": "LICENSE",
    "chars": 11357,
    "preview": "                                 Apache License\n                           Version 2.0, January 2004\n                   "
  },
  {
    "path": "MODULE.bazel",
    "chars": 4712,
    "preview": "# Copyright 2024 Ant Group Co., Ltd.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not u"
  },
  {
    "path": "Makefile",
    "chars": 3088,
    "preview": "export GO111MODULE=on\nGOPATH := ${GOPATH}:${PWD}\nTOOLBIN := ${PWD}/tool-bin\nexport PATH := ${TOOLBIN}:$(PATH)\nexport GOF"
  },
  {
    "path": "README.md",
    "chars": 2597,
    "preview": "# SCQL\n\n[![CircleCI](https://dl.circleci.com/status-badge/img/gh/secretflow/scql/tree/main.svg?style=svg)](https://dl.ci"
  },
  {
    "path": "REPO_LAYOUT.md",
    "chars": 1736,
    "preview": "# Repository Layout\n\n- [api/](api/): SCQL protocol files.\n- [examples/](examples/): SCQL examples.\n  - [tutorial](exampl"
  },
  {
    "path": "SECURITY.md",
    "chars": 1631,
    "preview": "# Security\n\nIf you believe you have found a security vulnerability in any SecretFlow repository that meets\n[SecretFlow's"
  },
  {
    "path": "api/BUILD.bazel",
    "chars": 4566,
    "preview": "# Copyright 2023 Ant Group Co., Ltd.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not u"
  },
  {
    "path": "api/buf.yaml",
    "chars": 545,
    "preview": "version: v2\nmodules:\n  - path: .\n    name: buf.build/secretflow/scql-protos\ndeps:\n  - buf.build/googleapis/googleapis\n  "
  },
  {
    "path": "api/common.proto",
    "chars": 3436,
    "preview": "// Copyright 2023 Ant Group Co., Ltd.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may n"
  },
  {
    "path": "api/core.proto",
    "chars": 7188,
    "preview": "// Copyright 2023 Ant Group Co., Ltd.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may n"
  },
  {
    "path": "api/engine.proto",
    "chars": 5285,
    "preview": "// Copyright 2023 Ant Group Co., Ltd.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may n"
  },
  {
    "path": "api/generate_proto.sh",
    "chars": 1691,
    "preview": "#!/bin/bash\n#\n# Copyright 2023 Ant Group Co., Ltd.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n#"
  },
  {
    "path": "api/interpreter.proto",
    "chars": 3441,
    "preview": "// Copyright 2023 Ant Group Co., Ltd.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may n"
  },
  {
    "path": "api/scql_task.proto",
    "chars": 2058,
    "preview": "// Copyright 2025 Ant Group Co., Ltd.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may n"
  },
  {
    "path": "api/status.proto",
    "chars": 1646,
    "preview": "// Copyright 2023 Ant Group Co., Ltd.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may n"
  },
  {
    "path": "api/status_code.proto",
    "chars": 2267,
    "preview": "// Copyright 2023 Ant Group Co., Ltd.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may n"
  },
  {
    "path": "api/subgraph.proto",
    "chars": 1563,
    "preview": "// Copyright 2023 Ant Group Co., Ltd.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may n"
  },
  {
    "path": "api/v1/BUILD.bazel",
    "chars": 1112,
    "preview": "# Copyright 2023 Ant Group Co., Ltd.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not u"
  },
  {
    "path": "api/v1/column.proto",
    "chars": 1460,
    "preview": "// Copyright 2024 Ant Group Co., Ltd.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may n"
  },
  {
    "path": "api/v1/genproto.sh",
    "chars": 805,
    "preview": "#!/bin/bash\n#\n# Copyright 2023 Ant Group Co., Ltd.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n#"
  },
  {
    "path": "api/v1alpha1/BUILD.bazel",
    "chars": 1682,
    "preview": "# Copyright 2025 Ant Group Co., Ltd.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not u"
  },
  {
    "path": "api/v1alpha1/compiler.proto",
    "chars": 10499,
    "preview": "// Copyright 2025 Ant Group Co., Ltd.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may n"
  },
  {
    "path": "bazel/BUILD.bazel",
    "chars": 581,
    "preview": "# Copyright 2023 Ant Group Co., Ltd.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not u"
  },
  {
    "path": "bazel/defs.bzl",
    "chars": 775,
    "preview": "# Copyright 2024 Ant Group Co., Ltd.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not u"
  },
  {
    "path": "bazel/patches/BUILD.bazel",
    "chars": 581,
    "preview": "# Copyright 2024 Ant Group Co., Ltd.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not u"
  },
  {
    "path": "bazel/patches/grpc-plugin.patch",
    "chars": 874,
    "preview": "diff --git a/bazel/cc_grpc_library.bzl b/bazel/cc_grpc_library.bzl\nindex 55ea11cd53..8177bf864c 100644\n--- a/bazel/cc_gr"
  },
  {
    "path": "bazel/patches/protobuf-xla.patch",
    "chars": 12424,
    "preview": "diff --git a/BUILD.bazel b/BUILD.bazel\nindex 301a04656..b4d953fd2 100644\n--- a/BUILD.bazel\n+++ b/BUILD.bazel\n@@ -8,7 +8,"
  },
  {
    "path": "bazel/patches/rules_foreign_cc.patch",
    "chars": 1703,
    "preview": "diff --git a/MODULE.bazel b/MODULE.bazel\nindex be3a727..6528ebe 100644\n--- a/MODULE.bazel\n+++ b/MODULE.bazel\n@@ -26,7 +2"
  },
  {
    "path": "bazel/repositories.bzl",
    "chars": 741,
    "preview": "# Copyright 2023 Ant Group Co., Ltd.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not u"
  },
  {
    "path": "cmd/docgen/main.go",
    "chars": 3770,
    "preview": "// Copyright 2023 Ant Group Co., Ltd.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may n"
  },
  {
    "path": "cmd/docgen/scql_operators.md.tmpl",
    "chars": 1409,
    "preview": "# SCQL Operators Specification\n\nThis is a specification (not a kernel library) of SCQL operators, including operator sig"
  },
  {
    "path": "docs/CONTRIBUTING.md",
    "chars": 12574,
    "preview": "# Contributing docs | 文档贡献指南 <!-- omit from toc -->\n\n- [tl;dr](#tldr)\n- [Prerequisites](#prerequisites)\n- [Setting up](#"
  },
  {
    "path": "docs/Makefile",
    "chars": 847,
    "preview": "# Copyright 2025 Ant Group Co., Ltd.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not u"
  },
  {
    "path": "docs/_static/css/custom.css",
    "chars": 299,
    "preview": "@import \"../basic.css\";\n\nhtml[data-theme=\"light\"] {\n    --pst-color-primary: rgb(22 119 255);\n    --pst-color-secondary:"
  },
  {
    "path": "docs/_static/js/custom.js",
    "chars": 82,
    "preview": "$(document).ready(function () {\n    $('a.external').attr('target', '_blank');\n});\n"
  },
  {
    "path": "docs/conf.py",
    "chars": 3726,
    "preview": "# Copyright 2025 Ant Group Co., Ltd.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not u"
  },
  {
    "path": "docs/index.rst",
    "chars": 1915,
    "preview": ".. SCQL documentation master file, created by\n   sphinx-quickstart on Wed Jul 13 19:32:45 2022.\n   You can adapt this fi"
  },
  {
    "path": "docs/intro/index.rst",
    "chars": 64,
    "preview": "Introduction\n============\n\n.. toctree::\n\n   opencore-quickstart\n"
  },
  {
    "path": "docs/intro/opencore-quickstart.rst",
    "chars": 7099,
    "preview": "SCQL OpenCore Quickstart\n========================\n\nThis guide shows how to use SCQL's native compiler + engine architect"
  },
  {
    "path": "docs/locales/zh_CN/LC_MESSAGES/index.po",
    "chars": 3804,
    "preview": "# SOME DESCRIPTIVE TITLE.\n# Copyright (C) 2023 Ant Group Co., Ltd.\n# This file is distributed under the same license as "
  },
  {
    "path": "docs/locales/zh_CN/LC_MESSAGES/intro/index.po",
    "chars": 681,
    "preview": "# SOME DESCRIPTIVE TITLE.\n# Copyright (C) 2023 Ant Group Co., Ltd.\n# This file is distributed under the same license as "
  },
  {
    "path": "docs/locales/zh_CN/LC_MESSAGES/intro/opencore-quickstart.po",
    "chars": 3797,
    "preview": "# SOME DESCRIPTIVE TITLE.\n# Copyright (C)\n# This file is distributed under the same license as the SCQL package.\n# FIRST"
  },
  {
    "path": "docs/locales/zh_CN/LC_MESSAGES/reference/compiler-config.po",
    "chars": 13743,
    "preview": "# SOME DESCRIPTIVE TITLE.\n# Copyright (C)\n# This file is distributed under the same license as the SCQL package.\n# FIRST"
  },
  {
    "path": "docs/locales/zh_CN/LC_MESSAGES/reference/engine-config.po",
    "chars": 33428,
    "preview": "# SOME DESCRIPTIVE TITLE.\n# Copyright (C) 2023 Ant Group Co., Ltd.\n# This file is distributed under the same license as "
  },
  {
    "path": "docs/locales/zh_CN/LC_MESSAGES/reference/implementation-status.po",
    "chars": 9575,
    "preview": "# SOME DESCRIPTIVE TITLE.\n# Copyright (C) 2023 Ant Group Co., Ltd.\n# This file is distributed under the same license as "
  },
  {
    "path": "docs/locales/zh_CN/LC_MESSAGES/reference/index.po",
    "chars": 889,
    "preview": "# SOME DESCRIPTIVE TITLE.\n# Copyright (C) 2023 Ant Group Co., Ltd.\n# This file is distributed under the same license as "
  },
  {
    "path": "docs/locales/zh_CN/LC_MESSAGES/reference/lang/manual.po",
    "chars": 4485,
    "preview": "# SOME DESCRIPTIVE TITLE.\n# Copyright (C) 2023 Ant Group Co., Ltd.\n# This file is distributed under the same license as "
  },
  {
    "path": "docs/locales/zh_CN/LC_MESSAGES/reference/lang/mysql-compatibility.po",
    "chars": 8134,
    "preview": "# SOME DESCRIPTIVE TITLE.\n# Copyright (C) 2023 Ant Group Co., Ltd.\n# This file is distributed under the same license as "
  },
  {
    "path": "docs/locales/zh_CN/LC_MESSAGES/reference/operators.po",
    "chars": 69182,
    "preview": "# SOME DESCRIPTIVE TITLE.\n# Copyright (C) 2023 Ant Group Co., Ltd.\n# This file is distributed under the same license as "
  },
  {
    "path": "docs/locales/zh_CN/LC_MESSAGES/topics/faq.po",
    "chars": 8816,
    "preview": "# SOME DESCRIPTIVE TITLE.\n# Copyright (C) 2023 Ant Group Co., Ltd.\n# This file is distributed under the same license as "
  },
  {
    "path": "docs/locales/zh_CN/LC_MESSAGES/topics/index.po",
    "chars": 714,
    "preview": "# SOME DESCRIPTIVE TITLE.\n# Copyright (C) 2023 Ant Group Co., Ltd.\n# This file is distributed under the same license as "
  },
  {
    "path": "docs/locales/zh_CN/LC_MESSAGES/topics/security/overview.po",
    "chars": 10296,
    "preview": "# SOME DESCRIPTIVE TITLE.\n# Copyright (C) 2023 Ant Group Co., Ltd.\n# This file is distributed under the same license as "
  },
  {
    "path": "docs/locales/zh_CN/LC_MESSAGES/topics/system/intro.po",
    "chars": 6898,
    "preview": "# SOME DESCRIPTIVE TITLE.\n# Copyright (C) 2023 Ant Group Co., Ltd.\n# This file is distributed under the same license as "
  },
  {
    "path": "docs/reference/compiler-config.rst",
    "chars": 8045,
    "preview": ".. _compiler_config_options:\n\nSCQL Compiler Configuration\n============================\n\nThe SCQL compiler translates SQL"
  },
  {
    "path": "docs/reference/engine-config.rst",
    "chars": 40566,
    "preview": "\n.. _engine_config_options:\n\nSCQLEngine Configuration\n------------------------\n\nSCQLEngine uses Gflags to manage configu"
  },
  {
    "path": "docs/reference/implementation-status.rst",
    "chars": 13225,
    "preview": "SCQL Implementation Status\n==========================\n\nSELECT Statement\n----------------\n\n+------------------------+----"
  },
  {
    "path": "docs/reference/index.rst",
    "chars": 355,
    "preview": "Reference\n=========\n\n.. toctree::\n    :caption: Language\n    :maxdepth: 1\n\n    lang/manual\n    lang/mysql-compatibility\n"
  },
  {
    "path": "docs/reference/lang/manual.rst",
    "chars": 5793,
    "preview": "SCQL Language Manual\n====================\n\n\n.. _scql_data_types:\n\nSCQL Data Types\n---------------\n\nSCQL supports frequen"
  },
  {
    "path": "docs/reference/lang/mysql-compatibility.rst",
    "chars": 4742,
    "preview": "MySQL Compatibility\n===================\n\nSCQL is highly compatible with MySQL, but there are still some syntax differenc"
  },
  {
    "path": "docs/reference/operators.md",
    "chars": 43331,
    "preview": "# SCQL Operators Specification\n\nThis is a specification (not a kernel library) of SCQL operators, including operator sig"
  },
  {
    "path": "docs/requirements.txt",
    "chars": 136,
    "preview": "sphinx~=8.0\nlinkify-it-py~=2.0\nmyst-parser~=4.0\nsphinx-intl~=2.3\nsphinxcontrib-mermaid~=1.0\nsecretflow-doctools~=0.8.4\ns"
  },
  {
    "path": "docs/topics/faq.rst",
    "chars": 4705,
    "preview": "Frequently Asked Questions (FAQ)\n================================\n\nWe will collect some popular questions from users and"
  },
  {
    "path": "docs/topics/index.rst",
    "chars": 93,
    "preview": "Topics\n======\n\n.. toctree::\n    :maxdepth: 2\n\n    system/intro\n    faq\n    security/overview\n"
  },
  {
    "path": "docs/topics/security/overview.rst",
    "chars": 6623,
    "preview": "Security overview\n=================\n\nSecurity Guarantees and Threat Model\n------------------------------------\n\nFor a si"
  },
  {
    "path": "docs/topics/system/intro.rst",
    "chars": 3338,
    "preview": "SCQL System Overview\n====================\n\nSecure Collaborative Query Language (SCQL) is a system that allows multiple d"
  },
  {
    "path": "engine/auth/BUILD.bazel",
    "chars": 1750,
    "preview": "# Copyright 2023 Ant Group Co., Ltd.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not u"
  },
  {
    "path": "engine/auth/authenticator.cc",
    "chars": 2583,
    "preview": "// Copyright 2023 Ant Group Co., Ltd.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may n"
  },
  {
    "path": "engine/auth/authenticator.h",
    "chars": 1300,
    "preview": "// Copyright 2023 Ant Group Co., Ltd.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may n"
  },
  {
    "path": "engine/auth/authenticator_test.cc",
    "chars": 2988,
    "preview": "// Copyright 2024 Ant Group Co., Ltd.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may n"
  },
  {
    "path": "engine/auth/authorized_profile.cc",
    "chars": 2139,
    "preview": "// Copyright 2023 Ant Group Co., Ltd.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may n"
  },
  {
    "path": "engine/auth/authorized_profile.h",
    "chars": 1084,
    "preview": "// Copyright 2023 Ant Group Co., Ltd.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may n"
  },
  {
    "path": "engine/auth/authorized_profile.proto",
    "chars": 991,
    "preview": "// Copyright 2023 Ant Group Co., Ltd.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may n"
  },
  {
    "path": "engine/bazel/BUILD.bazel",
    "chars": 581,
    "preview": "# Copyright 2023 Ant Group Co., Ltd.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not u"
  },
  {
    "path": "engine/bazel/duckdb.BUILD",
    "chars": 1798,
    "preview": "# Copyright 2023 Ant Group Co., Ltd.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not u"
  },
  {
    "path": "engine/bazel/engine_deps.bzl",
    "chars": 4512,
    "preview": "# Copyright 2023 Ant Group Co., Ltd.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not u"
  },
  {
    "path": "engine/bazel/gperftools.BUILD",
    "chars": 1336,
    "preview": "# Copyright 2025 Ant Group Co., Ltd.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not u"
  },
  {
    "path": "engine/bazel/mysql.BUILD",
    "chars": 2124,
    "preview": "# Copyright 2023 Ant Group Co., Ltd.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not u"
  },
  {
    "path": "engine/bazel/patches/dataproxy.patch",
    "chars": 427,
    "preview": "diff --git a/dataproxy_sdk/bazel/defs.bzl b/dataproxy_sdk/bazel/defs.bzl\nindex 7aac85c..3d2f7fb 100644\n--- a/dataproxy_s"
  },
  {
    "path": "engine/bazel/patches/duckdb.patch",
    "chars": 2299,
    "preview": "diff --git a/extension/extension_config.cmake b/extension/extension_config.cmake\nindex 8990ddc4bc..23ff3b2b50 100644\n---"
  },
  {
    "path": "engine/bazel/patches/mysql.patch",
    "chars": 824,
    "preview": "diff --git a/cmake/boost.cmake b/cmake/boost.cmake\nindex 64e5cd6..894640a 100644\n--- a/cmake/boost.cmake\n+++ b/cmake/boo"
  },
  {
    "path": "engine/bazel/patches/poco.patch",
    "chars": 673,
    "preview": "diff --git a/Data/MySQL/src/MySQLStatementImpl.cpp b/Data/MySQL/src/MySQLStatementImpl.cpp\nindex 7bc39e8ad..00c836c52 10"
  },
  {
    "path": "engine/bazel/patches/psi.patch",
    "chars": 331,
    "preview": "diff --git a/psi/utils/BUILD.bazel b/psi/utils/BUILD.bazel\nindex c9ca51f..c1b642d 100644\n--- a/psi/utils/BUILD.bazel\n+++"
  },
  {
    "path": "engine/bazel/perfetto.BUILD",
    "chars": 802,
    "preview": "# Copyright 2025 Ant Group Co., Ltd.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not u"
  },
  {
    "path": "engine/bazel/poco.BUILD",
    "chars": 2449,
    "preview": "# Copyright 2023 Ant Group Co., Ltd.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not u"
  },
  {
    "path": "engine/bazel/postgres.BUILD",
    "chars": 1099,
    "preview": "# Copyright 2023 Ant Group Co., Ltd.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not u"
  },
  {
    "path": "engine/bazel/scql.bzl",
    "chars": 858,
    "preview": "# Copyright 2024 Ant Group Co., Ltd.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not u"
  },
  {
    "path": "engine/bazel/sqlite3.BUILD",
    "chars": 921,
    "preview": "# Copyright 2023 Ant Group Co., Ltd.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not u"
  },
  {
    "path": "engine/core/BUILD.bazel",
    "chars": 3268,
    "preview": "# Copyright 2023 Ant Group Co., Ltd.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not u"
  },
  {
    "path": "engine/core/arrow_helper.h",
    "chars": 1415,
    "preview": "// Copyright 2023 Ant Group Co., Ltd.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may n"
  },
  {
    "path": "engine/core/primitive_builder.cc",
    "chars": 1180,
    "preview": "// Copyright 2023 Ant Group Co., Ltd.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may n"
  },
  {
    "path": "engine/core/primitive_builder.h",
    "chars": 3928,
    "preview": "// Copyright 2023 Ant Group Co., Ltd.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may n"
  },
  {
    "path": "engine/core/primitive_builder_test.cc",
    "chars": 2216,
    "preview": "// Copyright 2023 Ant Group Co., Ltd.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may n"
  },
  {
    "path": "engine/core/string_tensor_builder.cc",
    "chars": 1051,
    "preview": "// Copyright 2023 Ant Group Co., Ltd.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may n"
  },
  {
    "path": "engine/core/string_tensor_builder.h",
    "chars": 1176,
    "preview": "// Copyright 2023 Ant Group Co., Ltd.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may n"
  },
  {
    "path": "engine/core/string_tensor_builder_test.cc",
    "chars": 1094,
    "preview": "// Copyright 2023 Ant Group Co., Ltd.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may n"
  },
  {
    "path": "engine/core/tensor.cc",
    "chars": 5026,
    "preview": "// Copyright 2023 Ant Group Co., Ltd.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may n"
  },
  {
    "path": "engine/core/tensor.h",
    "chars": 5081,
    "preview": "// Copyright 2023 Ant Group Co., Ltd.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may n"
  },
  {
    "path": "engine/core/tensor_batch_reader.cc",
    "chars": 1859,
    "preview": "// Copyright 2024 Ant Group Co., Ltd.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may n"
  },
  {
    "path": "engine/core/tensor_batch_reader.h",
    "chars": 2699,
    "preview": "// Copyright 2024 Ant Group Co., Ltd.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may n"
  },
  {
    "path": "engine/core/tensor_batch_reader_test.cc",
    "chars": 4628,
    "preview": "// Copyright 2024 Ant Group Co., Ltd.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may n"
  },
  {
    "path": "engine/core/tensor_builder.cc",
    "chars": 1334,
    "preview": "// Copyright 2023 Ant Group Co., Ltd.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may n"
  },
  {
    "path": "engine/core/tensor_builder.h",
    "chars": 1306,
    "preview": "// Copyright 2023 Ant Group Co., Ltd.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may n"
  },
  {
    "path": "engine/core/tensor_constructor.cc",
    "chars": 6196,
    "preview": "// Copyright 2023 Ant Group Co., Ltd.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may n"
  },
  {
    "path": "engine/core/tensor_constructor.h",
    "chars": 5049,
    "preview": "// Copyright 2023 Ant Group Co., Ltd.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may n"
  },
  {
    "path": "engine/core/tensor_constructor_test.cc",
    "chars": 5777,
    "preview": "// Copyright 2024 Ant Group Co., Ltd.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may n"
  },
  {
    "path": "engine/core/tensor_slice.cc",
    "chars": 2286,
    "preview": "// Copyright 2024 Ant Group Co., Ltd.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may n"
  },
  {
    "path": "engine/core/tensor_slice.h",
    "chars": 3723,
    "preview": "// Copyright 2024 Ant Group Co., Ltd.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may n"
  },
  {
    "path": "engine/core/type.cc",
    "chars": 5723,
    "preview": "// Copyright 2023 Ant Group Co., Ltd.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may n"
  },
  {
    "path": "engine/core/type.h",
    "chars": 1835,
    "preview": "// Copyright 2023 Ant Group Co., Ltd.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may n"
  },
  {
    "path": "engine/datasource/BUILD.bazel",
    "chars": 10345,
    "preview": "# Copyright 2023 Ant Group Co., Ltd.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not u"
  },
  {
    "path": "engine/datasource/arrow_sql_adaptor.cc",
    "chars": 7140,
    "preview": "// Copyright 2023 Ant Group Co., Ltd.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may n"
  },
  {
    "path": "engine/datasource/arrow_sql_adaptor.h",
    "chars": 2844,
    "preview": "// Copyright 2023 Ant Group Co., Ltd.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may n"
  },
  {
    "path": "engine/datasource/arrow_sql_adaptor_factory.h",
    "chars": 1043,
    "preview": "// Copyright 2023 Ant Group Co., Ltd.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may n"
  },
  {
    "path": "engine/datasource/arrow_sql_adaptor_test.cc",
    "chars": 2084,
    "preview": "// Copyright 2023 Ant Group Co., Ltd.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may n"
  },
  {
    "path": "engine/datasource/csvdb_adaptor.cc",
    "chars": 5353,
    "preview": "// Copyright 2023 Ant Group Co., Ltd.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may n"
  },
  {
    "path": "engine/datasource/csvdb_adaptor.h",
    "chars": 1750,
    "preview": "// Copyright 2023 Ant Group Co., Ltd.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may n"
  },
  {
    "path": "engine/datasource/csvdb_adaptor_factory.cc",
    "chars": 939,
    "preview": "// Copyright 2023 Ant Group Co., Ltd.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may n"
  },
  {
    "path": "engine/datasource/csvdb_adaptor_factory.h",
    "chars": 906,
    "preview": "// Copyright 2023 Ant Group Co., Ltd.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may n"
  },
  {
    "path": "engine/datasource/csvdb_adaptor_test.cc",
    "chars": 12167,
    "preview": "// Copyright 2023 Ant Group Co., Ltd.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may n"
  },
  {
    "path": "engine/datasource/csvdb_conf.proto",
    "chars": 1255,
    "preview": "//\n// Copyright 2023 Ant Group Co., Ltd.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you ma"
  },
  {
    "path": "engine/datasource/dataproxy_conf.proto",
    "chars": 833,
    "preview": "// Copyright 2025 Ant Group Co., Ltd.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may n"
  },
  {
    "path": "engine/datasource/datasource.proto",
    "chars": 1072,
    "preview": "//\n// Copyright 2023 Ant Group Co., Ltd.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you ma"
  },
  {
    "path": "engine/datasource/datasource_adaptor.cc",
    "chars": 7333,
    "preview": "// Copyright 2023 Ant Group Co., Ltd.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may n"
  },
  {
    "path": "engine/datasource/datasource_adaptor.h",
    "chars": 3005,
    "preview": "// Copyright 2023 Ant Group Co., Ltd.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may n"
  },
  {
    "path": "engine/datasource/datasource_adaptor_factory.h",
    "chars": 962,
    "preview": "// Copyright 2023 Ant Group Co., Ltd.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may n"
  },
  {
    "path": "engine/datasource/datasource_adaptor_mgr.cc",
    "chars": 3020,
    "preview": "// Copyright 2023 Ant Group Co., Ltd.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may n"
  },
  {
    "path": "engine/datasource/datasource_adaptor_mgr.h",
    "chars": 1688,
    "preview": "// Copyright 2023 Ant Group Co., Ltd.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may n"
  },
  {
    "path": "engine/datasource/dm_adaptor.cc",
    "chars": 2443,
    "preview": "// Copyright 2024 Ant Group Co., Ltd.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may n"
  },
  {
    "path": "engine/datasource/dm_adaptor.h",
    "chars": 1670,
    "preview": "// Copyright 2024 Ant Group Co., Ltd.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may n"
  },
  {
    "path": "engine/datasource/dm_adaptor_factory.cc",
    "chars": 927,
    "preview": "// Copyright 2024 Ant Group Co., Ltd.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may n"
  },
  {
    "path": "engine/datasource/dm_adaptor_factory.h",
    "chars": 903,
    "preview": "// Copyright 2024 Ant Group Co., Ltd.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may n"
  },
  {
    "path": "engine/datasource/dm_adaptor_kuscia_test.cc",
    "chars": 2033,
    "preview": "// Copyright 2024 Ant Group Co., Ltd.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may n"
  },
  {
    "path": "engine/datasource/dp_adaptor.cc",
    "chars": 3264,
    "preview": "// Copyright 2024 Ant Group Co., Ltd.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may n"
  },
  {
    "path": "engine/datasource/dp_adaptor.h",
    "chars": 1955,
    "preview": "// Copyright 2025 Ant Group Co., Ltd.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may n"
  },
  {
    "path": "engine/datasource/dp_adaptor_factory.cc",
    "chars": 927,
    "preview": "// Copyright 2025 Ant Group Co., Ltd.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may n"
  },
  {
    "path": "engine/datasource/dp_adaptor_factory.h",
    "chars": 903,
    "preview": "// Copyright 2025 Ant Group Co., Ltd.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may n"
  },
  {
    "path": "engine/datasource/dp_adaptor_test.cc",
    "chars": 1755,
    "preview": "// Copyright 2025 Ant Group Co., Ltd.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may n"
  },
  {
    "path": "engine/datasource/duckdb_wrapper.cc",
    "chars": 10596,
    "preview": "// Copyright 2023 Ant Group Co., Ltd.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may n"
  },
  {
    "path": "engine/datasource/duckdb_wrapper.h",
    "chars": 1087,
    "preview": "// Copyright 2023 Ant Group Co., Ltd.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may n"
  },
  {
    "path": "engine/datasource/duckdb_wrapper_test.cc",
    "chars": 7286,
    "preview": "// Copyright 2023 Ant Group Co., Ltd.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may n"
  },
  {
    "path": "engine/datasource/embed_router.cc",
    "chars": 7309,
    "preview": "// Copyright 2023 Ant Group Co., Ltd.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may n"
  },
  {
    "path": "engine/datasource/embed_router.h",
    "chars": 2144,
    "preview": "// Copyright 2023 Ant Group Co., Ltd.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may n"
  },
  {
    "path": "engine/datasource/embed_router.proto",
    "chars": 1557,
    "preview": "//\n// Copyright 2023 Ant Group Co., Ltd.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you ma"
  },
  {
    "path": "engine/datasource/embed_router_test.cc",
    "chars": 6194,
    "preview": "// Copyright 2023 Ant Group Co., Ltd.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may n"
  },
  {
    "path": "engine/datasource/http_router.cc",
    "chars": 4006,
    "preview": "// Copyright 2025 Ant Group Co., Ltd.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may n"
  },
  {
    "path": "engine/datasource/http_router.h",
    "chars": 1050,
    "preview": "// Copyright 2025 Ant Group Co., Ltd.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may n"
  },
  {
    "path": "engine/datasource/http_router.proto",
    "chars": 1282,
    "preview": "//\n// Copyright 2023 Ant Group Co., Ltd.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you ma"
  },
  {
    "path": "engine/datasource/kuscia_datamesh_router.cc",
    "chars": 9267,
    "preview": "// Copyright 2023 Ant Group Co., Ltd.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may n"
  },
  {
    "path": "engine/datasource/kuscia_datamesh_router.h",
    "chars": 1289,
    "preview": "// Copyright 2023 Ant Group Co., Ltd.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may n"
  },
  {
    "path": "engine/datasource/kuscia_datamesh_router_test.cc",
    "chars": 2758,
    "preview": "// Copyright 2023 Ant Group Co., Ltd.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may n"
  },
  {
    "path": "engine/datasource/mock_router_readme.md",
    "chars": 782,
    "preview": "mock router\n===========\n\n1. start mock router server\n\n    ```shell\n    pip install -r ./requirements.txt\n\n    uvicorn --"
  },
  {
    "path": "engine/datasource/mock_router_server.py",
    "chars": 5401,
    "preview": "#!/usr/bin/env python3\n# Copyright 2024 Ant Group Co., Ltd.\n#\n# Licensed under the Apache License, Version 2.0 (the \"Lic"
  }
]

// ... and 649 more files (download for full content)

About this extraction

This page contains the full source code of the secretflow/scql GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 849 files (10.6 MB), approximately 2.8M tokens, and a symbol index with 10709 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.

Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.

Copied to clipboard!